/* Enrol page (/) + preferences page (/preferences) — phone first (390 px), then two columns ≥ 960 px. */

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- top bar + header (website pattern) ---------- */
.topbar { background: var(--sage-ink); color: #F1E6D6; font-size: .8125rem; letter-spacing: .02em; }
.topbar p { margin: 0; min-height: 34px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; }
.topbar svg { width: 15px; height: 15px; opacity: .85; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.head .brand img { height: 48px; width: auto; }

/* ---------- layout ---------- */
.enroll { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "saved" "intro" "preview" "join" "steps"; padding-top: 8px; padding-bottom: 56px; }
.intro { grid-area: intro; }
.preview { grid-area: preview; }
.join { grid-area: join; }
.steps { grid-area: steps; }
.saved { grid-area: saved; }

/* ---------- intro ---------- */
.intro h1 { font-size: clamp(2.5rem, 1.7rem + 3.6vw, 4.4rem); line-height: 1; margin: 0 0 16px; }
html:lang(zh-Hans) .intro h1 { font-size: clamp(2.1rem, 1.6rem + 2.6vw, 3.6rem); line-height: 1.2; }
.lead { font-family: var(--f-display); font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem); line-height: 1.3; color: var(--ink-2); margin: 0 0 18px; max-width: 30em; }
html:lang(zh-Hans) .lead { font-family: var(--f-ui); font-size: 1.0625rem; line-height: 1.75; }
/* welcome offer (« 开卡送 2 个章 », client 2026-09-27): the pink « +2 » disc of the website (site.css .gift) + the welcome
   line and its hook « Votre 3e boisson à −50 % »; on the form's success screen: « 2 tampons offerts, déjà sur votre carte » */
.gift { display: flex; align-items: center; gap: 14px; margin: -4px 0 16px; max-width: 30em; font-size: var(--fs-sm); line-height: 1.35; color: var(--ink-2); }
.gift b { display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 50%; background: var(--pink); color: var(--pink-ink);
  font: 400 1.75rem/1 var(--f-display); rotate: -8deg; box-shadow: 0 6px 14px -8px rgba(138, 47, 76, .55); }
.gift-txt { display: grid; gap: 1px; min-width: 0; }
.gift strong { font: 700 1.0625rem/1.3 var(--f-ui); color: var(--ink); }
.gift--done { margin: 0; padding: 12px 14px; border-radius: 16px; background: var(--tint-rose); }
.gift--done b { width: 48px; height: 48px; font-size: 1.5rem; }
.gift--done strong { font-size: 1rem; }
/* the rule line (/api/config rulesText without its welcome part, shown by the gift): « −50 % sur la boisson de votre
   5e tampon · 10 tampons = 1 boisson au choix offerte », with the pass's golden « ½ » tag (stamps/milestone-ready.webp)
   on a chip of the pass colour. A part may wrap on a phone, never between a number and its word (core.js keepNums);
   Chinese parts stay whole. */
.rule-line { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; max-width: 30em; }
.rule-tag { flex: none; width: 52px; height: auto; padding: 3px 1px 1px; border-radius: 10px; background: var(--pass-bg); box-shadow: inset 0 0 0 1px rgba(122, 74, 28, .3); }
.rule-txt { display: grid; gap: 2px; min-width: 0; }
#rule-main { font: 400 1.0625rem/1.3 var(--f-ui); color: var(--ink); }
#rule-main b { color: var(--gold-ink); background: linear-gradient(transparent 58%, rgba(239, 203, 119, .6) 58%); padding: 0 1px; }
#rule-main { text-wrap: pretty; }
#rule-main .rs { display: block; height: 0; overflow: hidden; }   /* one part per line: the half price, then the reward */
html:lang(zh-Hans) .rp { white-space: nowrap; }
#rule-note { font-size: var(--fs-xs); color: var(--ink-3); }
.trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.trust li { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 11px 0 9px; border-radius: 999px; background: rgba(255, 253, 248, .75);
  border: 1px solid var(--line); font: 700 .78rem/1 var(--f-ui); color: var(--ink); white-space: nowrap; }
.trust svg { width: 16px; height: 16px; color: var(--sage-deep); }

/* ---------- pass preview (Apple storeCard anatomy: header · strip · fields · barcode) ---------- */
.preview { position: relative; margin: 28px 0 0; display: grid; justify-items: center; }
/* the pass (boutique-cream: the awning cream, navy values, deep blue labels): colours = assets/pass/palette.json */
.pass { position: relative; width: min(100%, 340px); border-radius: 16px; padding: 12px 14px 16px; color: var(--pass-fg);
  background-color: var(--pass-bg); background-image: linear-gradient(150deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 50%, rgba(42, 30, 22, .035) 100%);
  box-shadow: 0 34px 60px -30px rgba(42, 30, 22, .5), 0 0 0 1px rgba(42, 30, 22, .07), 0 1px 0 rgba(255, 255, 255, .55) inset; }
.pass::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background-image: var(--grain); opacity: .3; pointer-events: none; }
.pass-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.pass-logo { height: 38px; width: auto; }
.pass-hfs { display: flex; align-items: flex-end; gap: 14px; }   /* values on one baseline, as in Wallet, even when a label wraps */
.pass-hf { margin: 0; display: grid; justify-items: end; line-height: 1.05; }
.pass .k { display: block; font: 700 .625rem/1.2 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--pass-label); }
html:lang(zh-Hans) .pass .k { letter-spacing: .06em; font-size: .6875rem; }
.pass-hf .v { font: 400 1.625rem/1 var(--f-display); color: var(--pass-fg); }
.pass picture { display: block; }
.pass-strip { display: block; width: calc(100% + 28px); max-width: none; margin: 10px -14px 12px; height: auto; aspect-ratio: 375 / 144; object-fit: cover; background: var(--pass-bg); }
.pass-fields { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.pass-fields p { margin: 0; }
.pass-fields .v { display: block; margin-top: 3px; font: 400 1rem/1.2 var(--f-ui); color: var(--pass-fg); }
.pass-fields .r { text-align: right; }
.pass-code { margin: 16px auto 0; width: 132px; padding: 10px 10px 6px; background: #fff; border-radius: 6px; display: grid; justify-items: center; gap: 2px; color: #1b1b1b; box-shadow: 0 0 0 1px rgba(42, 30, 22, .06); }
.pass-code .qr { width: 104px; height: 104px; }
.pass-code .qr svg { width: 100%; height: 100%; }
.pass-code span { font: 400 .625rem/1.3 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em; }
.preview figcaption { margin-top: 18px; font: italic 400 1rem/1.3 var(--f-display); color: var(--ink-3); text-align: center; }
html:lang(zh-Hans) .preview figcaption { font: 400 .875rem/1.5 var(--f-ui); }
.preview-vert { display: none; }

/* ---------- join card ---------- */
.join { position: relative; z-index: 2; margin-top: 30px; padding: 26px 20px 22px; border-radius: 22px; scroll-margin-top: 12px; }
.join:focus { outline: none; }
.join h2 { font-size: 2rem; line-height: 1.05; margin: 0 0 16px; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--paper-2); margin: 0 0 14px; }
.mode { min-height: 44px; border: 0; border-radius: 999px; background: transparent; font: 700 .875rem/1.15 var(--f-ui); color: var(--ink-3); padding: 6px 10px; }
.mode[aria-pressed="true"] { background: var(--rice); color: var(--ink); box-shadow: 0 1px 2px rgba(42, 30, 22, .12), 0 0 0 1px var(--line); }
.join-intro { font-size: var(--fs-sm); color: var(--ink-2); margin: 0 0 18px; }
#form-alert { margin: 0 0 18px; }
#form-alert .notice-body b { display: block; margin-bottom: 2px; }

.phone { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 8px; }
.cc { position: relative; }
.cc-face { display: flex; align-items: center; gap: 8px; height: 100%; min-height: 54px; padding: 0 30px 0 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--rice);
  font: 700 1rem/1 var(--f-ui); color: var(--ink); background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.cc-flag { font-size: 1.25rem; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.cc select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.cc:focus-within .cc-face { border-color: var(--sage-deep); box-shadow: 0 0 0 3px rgba(62, 85, 55, .18); }
.cc:hover .cc-face { border-color: var(--ink-3); }
.phone .input { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

.consents { margin: 6px 0 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.consents .field-err { margin: -4px 0 8px 38px; }
.essentials { margin: 0 0 6px 38px; font-size: var(--fs-sm); }
.essentials summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-weight: 700; color: var(--sage-deep); list-style: none; }
.essentials summary::-webkit-details-marker { display: none; }
.essentials summary::after { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease); }
.essentials[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.essentials ul { margin: 2px 0 8px; padding: 12px 14px 12px 30px; background: var(--sage-mist); border-radius: 12px; color: var(--ink); }
.essentials li { margin: 0 0 6px; line-height: 1.45; }
.essentials li:last-child { margin: 0; }
.essentials p { margin: 0; }
.check--opt { border-top: 1px dashed var(--line); margin-top: 4px; }
.optin-kept { margin: 6px 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--sage-mist); font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.45; }
.consents .consent-link { color: var(--sage-deep); text-decoration: underline; text-underline-offset: 2px; }
.opt-tag { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: var(--paper-2); font: 700 .6875rem/1.6 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); vertical-align: 1px; }
html:lang(zh-Hans) .opt-tag { letter-spacing: .02em; }
.submit { min-height: 58px; font-size: 1.0625rem; margin-top: 8px; }
.submit svg { transition: transform .25s var(--ease); }
.submit:hover svg { transform: translateX(4px); }
.legal { margin: 14px 0 0; font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.55; }
.legal a { color: var(--ink-2); display: inline-block; padding: 4px 0; }

/* ---------- success ---------- */
.done { display: grid; gap: 16px; }
.done h2 { margin: 6px 0 0; }
.done h2:focus { outline: none; }
.done-lead { margin: 0; color: var(--ink-2); }
/* the member card = the pass: same cream, the same chiffon washes, the drawn cup filled with that cream (the washes
   stop at its outline), label and ticks in the pass's label colour, name in its value colour (--pass-* tokens) */
.member { position: relative; aspect-ratio: 1.586; border-radius: 18px; background: var(--pass-bg); background-image: var(--grain);
  box-shadow: 0 1px 0 #fff inset, 0 0 0 1px rgba(42, 30, 22, .08), 0 26px 44px -30px rgba(42, 30, 22, .55); isolation: isolate; }
.member .wash { z-index: -1; background: var(--pass-blob); opacity: .62; }
.member .wash-a { width: 62%; height: 78%; right: -14%; top: -18%; transform: rotate(-12deg); }
.member .wash-b { width: 44%; height: 50%; right: 14%; bottom: -22%; border-radius: 52% 48% 60% 40% / 50% 58% 42% 50%; background: var(--pass-blob-2); opacity: .3; }
.member .cup-sketch { right: 8%; top: 7%; height: 86%; width: auto; }
.member-txt { position: relative; height: 100%; padding: 7% 0 7% 7%; width: 64%; display: flex; flex-direction: column; justify-content: center; }
.member-logo { height: 30px; width: auto; margin: 0 0 auto -6px; align-self: flex-start; }
.member-txt p { margin: 0; }
.member-lbl { font: 700 .6875rem/1.2 var(--f-ui); letter-spacing: .22em; text-transform: uppercase; color: var(--pass-label); margin-top: 8px !important; }
html:lang(zh-Hans) .member-lbl { letter-spacing: .12em; }
.member-name { font: 400 clamp(1.75rem, 1.2rem + 2.4vw, 2.4rem)/1.05 var(--f-display); color: var(--pass-fg); overflow-wrap: anywhere; }
.member-rule { display: block; width: 30px; height: 1px; background: var(--pass-fg); margin: 10px 0 8px; opacity: .7; }
.member-zh { font: 400 .875rem/1.3 var(--f-ui); letter-spacing: .3em; color: var(--pass-fg); }
.member-count { font: 400 1.125rem/1.2 var(--f-display); color: var(--ink-2); margin-top: 4px !important; }
/* progress of a returning member: short brush-like ticks (no dots, no circles), the last one = the reward */
.member-ticks { display: flex; gap: 3px; margin-top: 8px; }
.member-ticks:empty { display: none; }
.member-ticks i { width: 11px; height: 4px; border-radius: 1px 3px 2px 1px; background: rgba(42, 30, 22, .16); }
.member-ticks i.on { background: var(--pass-label); }
.member-ticks i.goal { background: var(--cup-rim); }
.member-ticks i.goal.on { background: var(--caramel); }

.wallet-btns { display: grid; gap: 10px; justify-items: stretch; }
.wallet-btn { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 60px; padding: 8px 22px; border-radius: 14px; background: #000; color: #fff; text-decoration: none;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .7); transition: transform .1s, box-shadow .2s; }
.wallet-btn:hover { box-shadow: 0 14px 28px -14px rgba(0, 0, 0, .8); }
.wallet-btn:active { transform: scale(.985); }
.wallet-btn:focus-visible { outline: 3px solid var(--sage-deep); outline-offset: 3px; }
.wb-icon { width: 34px; height: 29px; flex: none; }
.wb-txt { display: grid; line-height: 1.05; text-align: left; }
.wb-txt small { font: 400 .75rem/1.2 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: .01em; }
.wb-txt b { font: 600 1.25rem/1.1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: -.01em; }
.next { list-style: none; margin: 6px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; font-size: var(--fs-sm); }
.next li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; }
.next .n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sage-mist); color: var(--sage-deep); font: 400 1rem/1 var(--f-display); }
.again { justify-self: center; background: none; border: 0; font-size: var(--fs-sm); color: var(--ink-3); }

/* ---------- same-phone memory (enroll.js, localStorage tm_card, 30 days): « Vous avez déjà une carte » + the Wallet
   buttons of the card shown earlier on this phone, « Ce n’est pas moi » forgets it. The pass's cream and navy. ---------- */
.saved { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; row-gap: 12px; align-items: center; margin: 2px 0 20px;
  padding: 14px 16px 8px; border-radius: 16px; background: var(--pass-bg); background-image: var(--grain); color: var(--pass-fg);
  box-shadow: inset 0 0 0 1px rgba(28, 88, 118, .2), 0 14px 30px -24px rgba(23, 43, 59, .6); }
.saved-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--rice); color: var(--pass-label); box-shadow: inset 0 0 0 1px rgba(28, 88, 118, .18); }
.saved-ic svg { width: 22px; height: 22px; }
.saved-txt { margin: 0; display: grid; gap: 2px; min-width: 0; font-size: var(--fs-sm); line-height: 1.35; color: var(--pass-label); }
.saved-txt b { font: 400 1.375rem/1.1 var(--f-display); color: var(--pass-fg); }
.saved-btns { grid-column: 1 / -1; display: grid; gap: 8px; }
.wallet-btn--sm { min-height: 52px; padding: 6px 18px; border-radius: 12px; }
.wallet-btn--sm .wb-icon { width: 30px; height: 26px; }
.wallet-btn--sm .wb-txt b { font-size: 1.125rem; }
.saved-not { grid-column: 1 / -1; justify-self: center; font-weight: 400; font-size: var(--fs-sm); color: var(--ink-3); background: none; border: 0; padding: 0 8px; }

/* ---------- steps ---------- */
.steps { margin-top: 44px; }
.steps h2 { margin: 0 0 14px; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: rgba(255, 253, 248, .7); border: 1px solid var(--line); }
.steps li svg { grid-row: span 2; width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--sage-mist); color: var(--sage-deep); }
.steps b { font: 400 1.25rem/1.2 var(--f-display); color: var(--ink); }
.steps li span { font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.4; }

/* ---------- footer ---------- */
.foot { background: var(--sage-ink); color: #C9CCBC; padding: 34px 0 calc(34px + env(safe-area-inset-bottom)); font-size: var(--fs-xs); }
.foot-in > p { margin: 0 0 10px; }
.foot-tag { font: italic 400 1.25rem/1.3 var(--f-display); color: #F1E6D6; }
.foot-tag [lang="zh-Hans"] { font: 400 .8125rem/1 var(--f-ui); letter-spacing: .3em; color: #9FA893; margin-left: 8px; font-style: normal; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot-links a { color: #F1E6D6; min-height: 32px; display: inline-flex; align-items: center; }
.foot .fine { color: #9FA893; }
.foot :focus-visible { outline-color: #F6E2CD; }

/* ---------- phones: the pass peeks out behind the form ---------- */
@media (max-width: 959px) {
  .preview { margin-top: 26px; }
  .preview figcaption { display: none; }
  .pass { width: min(88%, 330px); }
  .join { margin-top: -150px; }
  .enroll.is-done .join { margin-top: 22px; }
}
/* after enrolment the demo pass (Camille, 4/10, a sample QR) must not sit next to the member's own card */
.enroll.is-done .preview, .enroll.is-done .steps { display: none; }
@media (max-width: 380px) {
  .phone { grid-template-columns: 96px minmax(0, 1fr); }
  .join { padding-inline: 16px; }
}

/* ---------- desktop ---------- */
@media (min-width: 960px) {
  .head { min-height: 92px; }
  .head .brand img { height: 56px; }
  .enroll { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); grid-template-areas: "saved saved" "intro join" "preview join" "steps steps"; column-gap: clamp(40px, 6vw, 96px); padding-top: 28px; padding-bottom: 72px; }
  .intro { padding-top: 24px; }
  .join { align-self: start; margin-top: 0; padding: 32px 32px 26px; }
  .preview { justify-items: start; margin-top: 40px; padding-left: 56px; }
  .preview-vert { display: block; position: absolute; left: 0; top: 10px; font-size: 1.5rem; }
  .pass { width: 360px; }
  .preview figcaption { width: 360px; }
  .steps { margin-top: 64px; }
  .steps ol { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .steps li { grid-template-columns: 1fr; align-content: start; row-gap: 6px; padding: 22px; }
  .steps li svg { grid-row: auto; margin-bottom: 8px; }
  .wallet-btns { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
  .saved { grid-template-columns: 44px minmax(0, 1fr) auto auto; column-gap: 16px; margin: 0 0 20px; padding: 14px 18px; }
  .saved-btns { grid-column: auto; grid-auto-flow: column; grid-auto-columns: minmax(196px, auto); }
  .saved-not { grid-column: auto; justify-self: end; }
}

/* ---------- preferences page ---------- */
.prefs { max-width: 560px; padding-top: 12px; padding-bottom: 64px; }
.prefs h1 { font-size: clamp(2.2rem, 1.8rem + 2vw, 3.2rem); line-height: 1.05; margin: 0 0 14px; }
.prefs .panel { padding: 22px 20px; border-radius: 20px; margin-top: 22px; }
.pref-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.pref-row label { font-weight: 700; color: var(--ink); line-height: 1.45; font-size: var(--fs-sm); cursor: pointer; }
.pref-meta { margin: 14px 0 0; font-size: var(--fs-xs); color: var(--ink-3); }
.pref-wallet { margin: 16px 0 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 12px; justify-items: start; }
.pref-wallet p { margin: 0; font-size: var(--fs-sm); }
.pref-status { margin-top: 16px; }
.prefs .loading { display: flex; align-items: center; gap: 12px; color: var(--ink-3); }
.prefs .serial { font: 400 .8125rem/1 ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink-3); }
