/* =========================================================
   LE ROYAL – design system & interface
   Bleu nuit et champagne repris de la fiche d'accueil.
   Le distributeur 3D a sa propre feuille : css/machine.css
   ========================================================= */
:root {
  /* Couleurs */
  --navy: #142640;
  --navy-press: #0d1b2f;
  --navy-soft: #e9ecf1;
  --ivory: #f8f6f1;
  --paper: #ffffff;
  --champagne: #ad9061;
  --champagne-ink: #7a6239;   /* champagne lisible sur fond clair (texte) */
  --champagne-light: #d8c39b; /* champagne lisible sur bleu nuit */
  --ink: #25282c;
  --muted: #64635e;           /* gris chaud, contraste AA sur ivoire */
  --line: #e5e0d8;
  --line-strong: #d3ccc0;
  --ok: #2d6a45;
  --danger: #a4321c;

  /* Typographie */
  --serif: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --fs-display: clamp(32px, 9vw, 38px);
  --fs-page: clamp(30px, 8.4vw, 34px);
  --fs-section: 23px;
  --fs-item: 16px;
  --fs-body: 15px;
  --fs-small: 13px;

  /* Espacements (base 4 px) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;
  --gutter: 22px;

  /* Formes */
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;
  --shadow-sheet: 0 -8px 30px rgba(20, 38, 64, .12);
  --shadow-float: 0 6px 18px rgba(20, 38, 64, .16);

  /* Mouvement */
  --t-press: 130ms;
  --t-state: 180ms;
  --t-page: 200ms;
  --t-sheet: 280ms;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Barres */
  --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 72px; }
html, body { margin: 0; }
body {
  font-family: var(--sans); font-size: var(--fs-body); line-height: 1.55; color: var(--ink);
  background: var(--ivory); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--navy); }
img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.i { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

main { max-width: 480px; margin: 0 auto; }
.view { padding: 0 var(--gutter) calc(var(--tab-h) + var(--safe-b) + 40px); animation: viewIn var(--t-page) var(--ease); }
.view-shop.has-cart { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 100px); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Typographie ---------- */
.display { font-family: var(--serif); font-weight: 600; font-size: var(--fs-display); line-height: 1.05; letter-spacing: -.01em; }
.page-title { font-family: var(--serif); font-weight: 600; font-size: var(--fs-page); line-height: 1.1; color: var(--navy); }
.section-title { font-family: var(--serif); font-weight: 600; font-size: var(--fs-section); line-height: 1.2; color: var(--navy); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--champagne-ink); }
.page-head { padding: var(--s6) 0 var(--s2); }
.page-lead, .section-lead { margin-top: var(--s2); color: var(--muted); font-size: var(--fs-body); }
.section { margin-top: var(--s10); }
.section-title + .lines, .section-title + div { margin-top: var(--s3); }
.note { margin-top: var(--s3); font-size: var(--fs-small); color: var(--muted); }

/* ---------- En-tête ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  max-width: 480px; margin: 0 auto; padding: calc(var(--safe-t) + 10px) var(--gutter) 10px;
  background: var(--ivory); border-bottom: 1px solid transparent; transition: border-color var(--t-state);
}
.topbar.scrolled { border-bottom-color: var(--line); }
body[data-view="home"] .topbar:not(.scrolled) { background: var(--navy); }
body[data-view="home"] .topbar:not(.scrolled) .topbar-logo img { filter: brightness(0) invert(1); }
body[data-view="home"] .topbar:not(.scrolled) .top-chip { color: #fff; border-color: rgba(255, 255, 255, .28); }
.topbar-logo { display: block; line-height: 0; }
.topbar-logo img { height: 32px; width: auto; transition: filter var(--t-state); }
.topbar-actions { display: flex; gap: var(--s2); }
.top-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r-s);
  font-size: 13.5px; font-weight: 600; color: var(--navy); transition: background var(--t-press), color var(--t-state);
}
.top-chip .i { width: 16px; height: 16px; }
.top-chip:active { background: rgba(20, 38, 64, .06); }
.top-chip.is-empty { color: var(--muted); font-weight: 500; }

/* ---------- Accueil : bienvenue ---------- */
.hero {
  margin: 0 calc(var(--gutter) * -1); padding: var(--s4) var(--gutter) var(--s6);
  background: var(--navy); color: #fff;
}
.hero .eyebrow { color: var(--champagne-light); }
.hero .display { margin-top: var(--s2); }
.hero-text { margin-top: var(--s3); color: #cfd5df; font-size: var(--fs-body); max-width: 34ch; }
.hero-photo { margin: 0 calc(var(--gutter) * -1) var(--s5); aspect-ratio: 16 / 9; max-height: 230px; overflow: hidden; background: #1d3352; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.codes {
  display: grid; grid-template-columns: 1fr 1fr 1.15fr; margin-top: var(--s6);
  border-top: 1px solid rgba(255, 255, 255, .16); border-bottom: 1px solid rgba(255, 255, 255, .16);
}
.code-cell {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 14px 10px 14px 0; text-align: left; color: #fff; min-height: 76px; transition: opacity var(--t-press);
}
.code-cell + .code-cell { padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .16); }
.code-cell:active { opacity: .7; }
.code-label { font-size: 12.5px; color: #b9c1ce; }
.code-cell strong { font-size: 21px; font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.code-cell .code-text { font-size: 16px; letter-spacing: 0; line-height: 1.6; }
.code-cell small { font-size: 12px; color: #b9c1ce; }
.code-ic { position: absolute; top: 14px; right: 8px; width: 14px; height: 14px; color: var(--champagne-light); }
.code-cell.copied strong { color: var(--champagne-light); }
.hero-hint { margin-top: var(--s3); font-size: 12.5px; color: #aeb6c4; }

/* ---------- Lignes d'information ---------- */
.lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.lines li, .lines .line {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; column-gap: 14px;
  min-height: 56px; padding: 12px 0; border-bottom: 1px solid var(--line);
}
.lines .i { color: var(--champagne-ink); }
.l-label { font-weight: 500; }
.l-val { text-align: right; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }
.l-val small { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.l-link { text-decoration: none; }
.lines-boxed { margin-top: var(--s4); }
.status-open { color: var(--ok); }
.status-closed { color: var(--danger); }
.status-open::before, .status-closed::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }

/* ---------- Accueil : prestations ---------- */
.feature-bf {
  display: block; padding: var(--s6) var(--s5); background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-l); text-decoration: none; color: inherit; transition: transform var(--t-press) var(--ease);
}
.feature-bf:active { transform: scale(.99); }
.feature-bf h3 { margin-top: var(--s2); font-family: var(--serif); font-size: 27px; font-weight: 600; line-height: 1.15; color: var(--navy); }
.feature-bf p { margin-top: var(--s2); color: var(--muted); }
.feature-bf .price-duo { display: flex; gap: var(--s6); margin-top: var(--s4); }
.price-duo div { display: grid; }
.price-duo strong { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1; color: var(--navy); }
.price-duo span { margin-top: 4px; font-size: var(--fs-small); color: var(--muted); }
.link-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--s5); font-weight: 700; color: var(--navy); }
.link-cta .i { width: 18px; height: 18px; transition: transform var(--t-state) var(--ease); }
a:active .link-cta .i, .link-cta:active .i { transform: translateX(3px); }
.feature-bf .closed-note { margin-top: var(--s4); font-size: var(--fs-small); color: var(--muted); }

.duo { display: grid; grid-template-columns: 1fr 1fr; margin-top: var(--s4); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.duo > * { display: flex; flex-direction: column; gap: 4px; padding: var(--s5) var(--s4) var(--s5) 0; text-align: left; text-decoration: none; color: inherit; min-height: 128px; }
.duo > * + * { padding-left: var(--s4); border-left: 1px solid var(--line); }
.duo .i { width: 24px; height: 24px; color: var(--champagne-ink); margin-bottom: var(--s2); }
.duo strong { font-size: var(--fs-item); font-weight: 600; color: var(--ink); line-height: 1.3; }
.duo span { font-size: var(--fs-small); color: var(--muted); }
.duo .duo-price { margin-top: auto; font-weight: 600; color: var(--navy); }
.duo .is-off .duo-price { color: var(--danger); }
.more-link { display: flex; align-items: center; justify-content: space-between; min-height: 52px; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); }

/* ---------- Guide (accordéons) ---------- */
.guide { margin-top: var(--s4); border-top: 1px solid var(--line); }
.acc { border-bottom: 1px solid var(--line); }
.acc summary {
  display: grid; grid-template-columns: 22px 1fr 20px; align-items: center; column-gap: 14px;
  min-height: 60px; padding: 10px 0; list-style: none; cursor: pointer; font-size: var(--fs-item); font-weight: 600;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary .i { color: var(--champagne-ink); }
.acc summary .chev { color: var(--muted); transition: transform var(--t-state) var(--ease); }
.acc[open] summary .chev { transform: rotate(180deg); }
.acc-body { padding: 0 0 var(--s5) 36px; animation: accIn var(--t-state) var(--ease); }
@keyframes accIn { from { opacity: 0; transform: translateY(-4px); } }
.acc-body h4 { margin: var(--s4) 0 var(--s1); font-size: 14.5px; font-weight: 700; color: var(--navy); }
.acc-body h4:first-child { margin-top: 0; }
.acc-body p { margin: 0 0 6px; color: #45474b; font-size: 14.5px; }
.acc-body .code-inline { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; margin: 2px 0 6px; border: 1px solid var(--line-strong); border-radius: var(--r-s); font-weight: 700; letter-spacing: .06em; color: var(--navy); }
.acc-body .code-inline .i { width: 15px; height: 15px; }
.price-list { list-style: none; margin: 0 0 var(--s2); padding: 0; }
.price-list li { display: flex; justify-content: space-between; gap: var(--s4); padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.price-list li:last-child { border-bottom: 0; }
.price-list li span:last-child { flex-shrink: 0; max-width: 46%; text-align: right; font-weight: 600; color: var(--navy); }
.check-list { list-style: none; margin: 0 0 var(--s2); padding: 0; }
.check-list li { position: relative; padding: 5px 0 5px 24px; font-size: 14px; }
.check-list li::before { content: ''; position: absolute; left: 2px; top: 11px; width: 10px; height: 5px; border-left: 1.6px solid var(--ok); border-bottom: 1.6px solid var(--ok); transform: rotate(-45deg); }
.acc-body a { font-weight: 600; }

/* ---------- Partage & pied ---------- */
.share { display: flex; align-items: center; gap: var(--s4); padding-top: var(--s6); border-top: 1px solid var(--line); }
#qr { flex-shrink: 0; width: 92px; height: 92px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-s); }
#qr img, #qr canvas { display: block; width: 78px !important; height: 78px !important; }
.share strong { display: block; font-size: 15px; }
.share p { margin-top: 2px; font-size: var(--fs-small); color: var(--muted); }
.foot { margin-top: var(--s10); text-align: center; }
.foot img { width: 76px; height: auto; opacity: .9; }
.foot p { margin: var(--s2) auto 0; max-width: 30ch; font-family: var(--serif); font-size: 18px; font-style: italic; color: var(--muted); }

/* ---------- Extras ---------- */
.shuttle {
  display: block; width: 100%; margin-top: var(--s4); text-align: left; color: #fff;
  background: var(--navy); border-radius: var(--r-l); overflow: hidden; transition: transform var(--t-press) var(--ease);
}
.shuttle:active { transform: scale(.99); }
.shuttle img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shuttle-body { display: block; padding: var(--s6) var(--s5); }
.shuttle .eyebrow { color: var(--champagne-light); }
.shuttle h2 { margin-top: var(--s2); font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.1; }
.shuttle .car { display: block; margin-top: 4px; color: #dfe3ea; font-weight: 500; }
.shuttle .sub { display: block; margin-top: var(--s3); color: #b9c1ce; font-size: 14px; }
.shuttle .shuttle-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid rgba(255, 255, 255, .16); }
.shuttle .shuttle-foot span { font-size: var(--fs-small); color: #b9c1ce; }
.shuttle .shuttle-foot strong { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }

.cat { margin-top: var(--s8); }
.cat-title { display: flex; align-items: baseline; justify-content: space-between; font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--navy); padding-bottom: var(--s2); border-bottom: 1px solid var(--line-strong); }
.ex-list { list-style: none; margin: 0; padding: 0; }
.ex-row {
  display: grid; grid-template-columns: 40px 1fr auto 16px; align-items: center; column-gap: 12px; width: 100%;
  min-height: 72px; padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; text-decoration: none; color: inherit;
  transition: background var(--t-press);
}
.ex-row:active { background: rgba(20, 38, 64, .035); }
.ex-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); color: var(--navy); }
.ex-ic .i { width: 19px; height: 19px; }
.ex-txt { min-width: 0; }
.ex-txt strong { display: block; font-size: var(--fs-item); font-weight: 600; line-height: 1.3; }
.ex-txt small { display: block; margin-top: 2px; font-size: var(--fs-small); color: var(--muted); line-height: 1.4; }
.ex-price { max-width: 110px; text-align: right; font-size: 14px; font-weight: 600; color: var(--navy); line-height: 1.3; }
.ex-row > .i { width: 16px; height: 16px; color: var(--muted); }
.ex-row.is-off .ex-price { color: var(--danger); font-size: 12.5px; }
.ex-row.is-off strong { color: var(--muted); }

/* Bien-être : présentation éditoriale */
.ex-editorial { display: block; width: 100%; padding: var(--s5) 0; text-align: left; border-bottom: 1px solid var(--line); color: inherit; }
.ex-editorial .ed-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.ex-editorial h3 { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--navy); line-height: 1.15; }
.ex-editorial .ed-price { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--navy); white-space: nowrap; }
.ex-editorial .ed-price small { font-family: var(--sans); font-size: 12.5px; font-weight: 500; color: var(--muted); }
.ex-editorial p { margin-top: var(--s2); color: var(--muted); }
.ex-editorial .ed-hours { display: flex; gap: 8px; align-items: center; margin-top: var(--s3); font-size: var(--fs-small); color: var(--muted); }
.ex-editorial .ed-hours .i { width: 16px; height: 16px; }
.ex-editorial.is-off .ed-hours { color: var(--danger); }

/* ---------- Distributeur ---------- */
.deliver { display: flex; gap: var(--s3); align-items: flex-start; margin-top: var(--s4); padding: var(--s3) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.deliver .i { margin-top: 2px; color: var(--champagne-ink); }
.deliver strong { display: block; color: var(--navy); }
.deliver span span { font-size: var(--fs-small); color: var(--muted); }
.shop-bar { display: grid; gap: var(--s3); margin-top: var(--s5); }
.shop-bar .seg { display: grid; grid-template-columns: 1fr 1fr; }
.shop-bar .seg button { justify-content: center; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: #ece8e0; }
.seg button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--muted); transition: background var(--t-state), color var(--t-state), box-shadow var(--t-state);
}
.seg button .i { width: 16px; height: 16px; }
.seg button[aria-selected="true"], .seg button.active { background: var(--paper); color: var(--navy); box-shadow: 0 1px 2px rgba(20, 38, 64, .12); }
.counter { display: flex; align-items: center; gap: 8px; font-size: var(--fs-small); font-weight: 600; color: var(--muted); white-space: nowrap; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 7px; height: 7px; border-radius: 50%; border: 1.3px solid var(--line-strong); transition: background var(--t-state), border-color var(--t-state); }
.pips i.on { background: var(--navy); border-color: var(--navy); }
.counter.full { color: var(--navy); }
.stage-hint { margin-top: -10px; text-align: center; font-size: 12.5px; color: var(--muted); }
.state-box { display: flex; gap: var(--s3); margin-top: var(--s5); padding: var(--s5); border-radius: var(--r-m); background: var(--paper); border: 1px solid var(--line); }
.state-box .i { margin-top: 2px; color: var(--champagne-ink); }
.state-box strong { display: block; color: var(--navy); font-size: var(--fs-item); }
.state-box p { margin-top: 4px; color: var(--muted); font-size: 14.5px; }

.filters { display: flex; gap: var(--s5); margin-top: var(--s5); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button { position: relative; min-height: 44px; font-weight: 600; font-size: 14.5px; color: var(--muted); white-space: nowrap; }
.filters button::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--navy); transform: scaleX(0); transition: transform var(--t-state) var(--ease); }
.filters button[aria-selected="true"] { color: var(--navy); }
.filters button[aria-selected="true"]::after { transform: scaleX(1); }
.catalog { list-style: none; margin: 0; padding: 0; }
.catalog li { display: grid; grid-template-columns: 60px 1fr auto; align-items: center; column-gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.thumb { width: 60px; height: 76px; border-radius: var(--r-s); overflow: hidden; background: #1a1b1e; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-name { font-weight: 600; line-height: 1.3; }
.cat-meta { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.cat-price { display: block; margin-top: 4px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.add-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 44px; height: 44px; padding: 0 12px;
  border-radius: var(--r-s); border: 1px solid var(--navy); color: var(--navy); font-weight: 700; font-size: 14px;
  transition: background var(--t-press), color var(--t-press), transform var(--t-press);
}
.add-btn .i { width: 18px; height: 18px; }
.add-btn:active { transform: scale(.94); }
.add-btn:disabled { border-color: var(--line-strong); color: #a6a49f; cursor: not-allowed; }
.catalog .stepper { height: 44px; }
.catalog .soldout { font-size: var(--fs-small); color: var(--muted); }
.limit-note { margin-top: var(--s3); font-size: var(--fs-small); color: var(--muted); }

/* Récapitulatif flottant */
.cart-bar {
  position: fixed; z-index: 25; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 10px);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s3);
  width: calc(min(480px, 100vw) - var(--gutter) * 2); min-height: 54px; padding: 0 var(--s4);
  border-radius: var(--r-m); background: var(--navy); color: #fff; box-shadow: var(--shadow-float);
  transform: translateX(-50%); animation: barIn var(--t-sheet) var(--ease);
}
@keyframes barIn { from { opacity: 0; transform: translate(-50%, 12px); } }
.cart-bar.bump { animation: bump 320ms var(--ease); }
@keyframes bump { 40% { transform: translateX(-50%) scale(1.03); } }
.cb-count { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 6px; background: rgba(255, 255, 255, .14); font-weight: 700; font-size: 14px; }
.cb-total { font-weight: 700; font-variant-numeric: tabular-nums; text-align: left; }
.cb-cta { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--champagne-light); }
.cb-cta .i { width: 16px; height: 16px; }

/* ---------- Petit-déjeuner ---------- */
.bf-hero { margin: 0 calc(var(--gutter) * -1); padding: var(--s6) var(--gutter) var(--s6); background: var(--paper); border-bottom: 1px solid var(--line); }
.bf-hero .display { margin-top: var(--s2); color: var(--navy); }
.bf-hero .hero-text { color: var(--muted); }
.bf-prices { display: grid; grid-template-columns: 1fr 1fr; margin-top: var(--s6); }
.bf-prices div { display: grid; padding-right: var(--s4); }
.bf-prices div + div { padding-left: var(--s4); border-left: 1px solid var(--line-strong); }
.bf-prices strong { font-family: var(--serif); font-size: 38px; font-weight: 600; line-height: 1; color: var(--navy); }
.bf-prices span { margin-top: 6px; font-size: var(--fs-small); color: var(--muted); }
.facts { margin: var(--s6) 0 0; border-top: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; gap: var(--s4); padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; color: var(--navy); text-align: right; font-variant-numeric: tabular-nums; }
.days { display: flex; gap: var(--s2); margin: var(--s2) calc(var(--gutter) * -1) 0; padding: 2px var(--gutter) 4px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.days::-webkit-scrollbar { display: none; }
.day {
  flex: 0 0 64px; display: grid; justify-items: center; gap: 0; padding: 10px 0; scroll-snap-align: start;
  border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--paper);
  transition: background var(--t-state), color var(--t-state), border-color var(--t-state);
}
.day small { font-size: 12px; color: var(--muted); text-transform: capitalize; }
.day strong { font-size: 20px; font-weight: 700; line-height: 1.3; }
.day span { font-size: 11.5px; color: var(--muted); text-transform: capitalize; }
.day.other { flex-basis: 84px; align-content: center; font-size: 13px; font-weight: 600; color: var(--navy); }
.day[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.day[aria-pressed="true"] small, .day[aria-pressed="true"] span { color: #cfd5df; }
#bfDate:not([hidden]) { margin-top: var(--s3); }

/* ---------- Formulaires ---------- */
.form-block { margin-top: var(--s8); }
.form-block > .section-title { margin-bottom: var(--s2); }
.field { display: block; margin: var(--s5) 0 0; padding: 0; border: 0; min-width: 0; }
.field legend, .field-label { display: block; padding: 0; margin-bottom: var(--s2); font-size: 14px; font-weight: 600; color: var(--ink); }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 64px; margin-top: var(--s2); border-bottom: 1px solid var(--line); }
.field-row .field-label { margin: 0; font-size: 15px; font-weight: 500; }
.input {
  display: block; width: 100%; min-height: 52px; padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-m);
  background: var(--paper); font-size: 16px; line-height: 1.4; outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color var(--t-state), box-shadow var(--t-state);
}
textarea.input { resize: vertical; min-height: 92px; }
.input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(20, 38, 64, .1); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input::placeholder { color: #8f8d87; }
.field-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.field-2 .field { margin-top: var(--s5); }
.stepper { display: inline-grid; grid-template-columns: 44px 44px 44px; align-items: center; height: 46px; border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--paper); }
.stepper button { display: grid; place-items: center; height: 100%; color: var(--navy); transition: background var(--t-press); border-radius: var(--r-m); }
.stepper button:active { background: rgba(20, 38, 64, .07); }
.stepper button:disabled { color: #bdbab3; cursor: not-allowed; }
.stepper button .i { width: 18px; height: 18px; }
.stepper output { text-align: center; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.stepper output.tick { animation: tick var(--t-state) var(--ease); }
@keyframes tick { 40% { transform: scale(1.18); } }
.opts { display: grid; gap: var(--s2); }
.opt { display: flex; justify-content: space-between; align-items: center; min-height: 52px; padding: 0 var(--s4); border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--paper); text-align: left; font-weight: 500; transition: border-color var(--t-state), box-shadow var(--t-state); }
.opt strong { color: var(--navy); }
.opt[aria-pressed="true"] { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.topics { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.topic { min-height: 52px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--paper); text-align: left; font-size: 14.5px; font-weight: 500; line-height: 1.3; transition: border-color var(--t-state), background var(--t-state), color var(--t-state); }
.topic[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.total-line { display: flex; justify-content: space-between; align-items: baseline; margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line-strong); }
.total-line span { color: var(--muted); }
.total-line strong { font-family: var(--serif); font-size: 28px; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }
.total-line strong.small { font-family: var(--sans); font-size: 15px; }
.form-error { display: flex; gap: 8px; margin-top: var(--s4); padding: 12px 14px; border-radius: var(--r-m); background: #f8ece8; color: #7d2614; font-size: 14px; font-weight: 500; }
.field-hint { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.field-err { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--danger); }

/* Appartement */
.apt-slot { margin-top: var(--s5); }
.apt-line { display: flex; align-items: center; gap: var(--s3); min-height: 52px; padding: 0 0 0 var(--s4); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); }
.apt-line .i { color: var(--champagne-ink); }
.apt-line span { flex: 1; font-size: 14.5px; color: var(--muted); }
.apt-line strong { color: var(--navy); font-size: 16px; }
.apt-line button { min-height: 50px; padding: 0 var(--s4); font-weight: 600; font-size: 14px; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.apt-input { font-size: 20px; font-weight: 700; letter-spacing: .06em; }

/* Boutons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; margin-top: var(--s5);
  padding: 0 var(--s5); border-radius: var(--r-m); background: var(--navy); color: #fff; font-size: 16px; font-weight: 700;
  transition: background var(--t-press), transform var(--t-press);
}
.btn:active { background: var(--navy-press); transform: scale(.985); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--navy); border: 1px solid var(--line-strong); }
.btn.ghost:active { background: rgba(20, 38, 64, .05); }
.btn + .btn { margin-top: var(--s2); }
.btn .spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.call-line { margin-top: var(--s5); text-align: center; font-size: 14px; color: var(--muted); }
.call-line a { font-weight: 700; text-decoration: none; }

/* ---------- Barre de navigation ---------- */
.tabbar {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  max-width: 480px; margin: 0 auto; height: calc(var(--tab-h) + var(--safe-b)); padding: 0 6px var(--safe-b);
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
}
@supports (backdrop-filter: blur(10px)) { .tabbar { background: rgba(255, 255, 255, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); } }
.tabbar a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: var(--tab-h); font-size: 11.5px; font-weight: 600; color: #6e6d68; text-decoration: none; transition: color var(--t-state);
}
.tabbar a .i { width: 22px; height: 22px; transition: transform var(--t-press) var(--ease); }
.tabbar a:active .i { transform: scale(.9); }
.tabbar a.active { color: var(--navy); }
.tabbar a.active:not(.tab-center)::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 0 0 2px 2px; background: var(--champagne); }
.tab-center { justify-content: flex-end !important; padding-bottom: 8px; }
.tab-key {
  position: relative; display: grid; place-items: center; width: 52px; height: 44px; margin-top: -18px; margin-bottom: 2px;
  border-radius: 14px; background: var(--navy); color: #fff; box-shadow: 0 4px 12px rgba(20, 38, 64, .25);
  transition: transform var(--t-press) var(--ease), background var(--t-state);
}
.tab-center:active .tab-key { transform: scale(.94); }
.tab-center .i { width: 22px; height: 22px; }
.tab-center.active .tab-key { background: var(--navy-press); outline: 1px solid var(--champagne); outline-offset: 3px; }
.tab-badge { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--champagne); color: var(--navy); font-size: 11px; font-weight: 800; border: 2px solid #fff; }
.tab-badge.pop { animation: tick 260ms var(--ease); }
body.keyboard .tabbar, body.keyboard .cart-bar { display: none; }

/* ---------- Panneau du bas ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(13, 20, 32, .42); opacity: 0; transition: opacity var(--t-sheet) var(--ease); }
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-width: 480px; max-height: 92dvh; margin: 0 auto;
  display: flex; flex-direction: column; background: var(--ivory); border-radius: 18px 18px 0 0; box-shadow: var(--shadow-sheet);
  transform: translateY(100%); transition: transform var(--t-sheet) var(--ease);
}
@supports not (height: 1dvh) { .sheet { max-height: 92vh; } }
.sheet.open { transform: translateY(0); }
.sheet::before { content: ''; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line-strong); z-index: 2; }
.sheet-close { position: absolute; z-index: 3; top: 12px; right: 12px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); color: var(--ink); }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 30px var(--gutter) calc(var(--safe-b) + 22px); }
.sheet-title { padding-right: 48px; font-family: var(--serif); font-size: 27px; font-weight: 600; line-height: 1.15; color: var(--navy); }
.sheet-sub { margin-top: 6px; color: var(--muted); }
.sheet-photo { margin: -30px calc(var(--gutter) * -1) var(--s5); aspect-ratio: 16 / 8; overflow: hidden; border-radius: 18px 18px 0 0; }
.sheet-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: var(--s3); font-size: 14px; color: var(--muted); }
.sheet-meta strong { color: var(--navy); }
.cond { display: flex; gap: 10px; margin-top: var(--s4); font-size: 13.5px; color: var(--muted); }
.cond .i { width: 17px; height: 17px; margin-top: 2px; color: var(--champagne-ink); }

/* Fiche produit */
.prod-head { display: grid; grid-template-columns: 112px 1fr; gap: var(--s5); align-items: center; padding-right: 40px; }
.prod-img { width: 112px; height: 150px; border-radius: var(--r-m); overflow: hidden; background: #1a1b1e; }
.prod-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prod-head .sheet-title { padding-right: 0; font-size: 25px; }
.prod-price { margin-top: var(--s2); font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--navy); }
.prod-slot { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--champagne-ink); }

/* Panier */
.cart-items { list-style: none; margin: var(--s4) 0 0; padding: 0; border-top: 1px solid var(--line); }
.cart-items li { display: grid; grid-template-columns: 44px 1fr auto; gap: var(--s3); align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-items .thumb { width: 44px; height: 56px; }
.cart-items strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.cart-items small { display: block; color: var(--muted); font-size: 12.5px; }
.cart-items .row-end { display: grid; justify-items: end; gap: 4px; }
.cart-items .line-total { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.cart-items .stepper { height: 40px; grid-template-columns: 40px 30px 40px; }
.link-btn { min-height: 32px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.summary { margin: var(--s4) 0 0; border-top: 1px solid var(--line); }
.summary div { display: flex; justify-content: space-between; gap: var(--s4); padding: 11px 0; border-bottom: 1px solid var(--line); }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; text-align: right; color: var(--navy); }

/* Confirmation */
.done { padding-top: var(--s3); text-align: center; }
.done-mark { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto var(--s5); border-radius: 50%; border: 1.5px solid var(--ok); color: var(--ok); }
.done-mark .i { width: 30px; height: 30px; stroke-width: 2; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 420ms 120ms var(--ease) forwards; }
.done.demo .done-mark { border-color: var(--champagne); color: var(--champagne-ink); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done .sheet-title { padding: 0 24px; }
.done p { margin: var(--s3) auto 0; max-width: 34ch; color: var(--muted); }
.done .summary { text-align: left; margin-top: var(--s5); }
.done .ref { margin-top: var(--s4); font-size: var(--fs-small); color: var(--muted); }
.done .ref strong { color: var(--ink); letter-spacing: .04em; }
.done .note { text-align: left; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 16px); max-width: calc(100vw - 40px);
  padding: 11px 16px; border-radius: var(--r-m); background: var(--ink); color: #fff; font-size: 14px; font-weight: 500;
  opacity: 0; transform: translate(-50%, 8px); pointer-events: none; transition: opacity var(--t-state), transform var(--t-state) var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.has-cartbar .toast { bottom: calc(var(--tab-h) + var(--safe-b) + 76px); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Petits écrans ---------- */
@media (max-width: 359px) {
  :root { --gutter: 16px; --fs-section: 21px; }
  .codes { grid-template-columns: 1fr 1fr; }
  .codes .is-static { grid-column: 1 / -1; padding-left: 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .16); }
  .seg button { padding: 0 10px; }
  .topics { grid-template-columns: 1fr; }
  .duo { grid-template-columns: 1fr; }
  .duo > * + * { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .done-mark .i { stroke-dashoffset: 0; }
}

/* Chiffres alignés pour les prix en Cormorant (chiffres elzéviriens par défaut) */
.total-line strong, .price-duo strong, .bf-prices strong, .prod-price, .ed-price { font-variant-numeric: lining-nums tabular-nums; font-feature-settings: 'lnum' 1; }
.sheet-sub.counter { display: flex; }
.cart-items + .total-line { border-top: 0; }

#sheetTitle:focus, #sheetTitle:focus-visible { outline: none; }
.days { scroll-padding-inline: var(--gutter); }
.done.demo .done-mark .i { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }

/* ---------- Petites cases photo ---------- */
.sq { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: var(--r-s); overflow: hidden; background: var(--paper); border: 1px solid var(--line); color: var(--navy); }
.sq img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sq .i { width: 20px; height: 20px; margin: 0 !important; color: var(--navy); }
.sq-s { width: 32px; height: 32px; border-radius: 6px; }
.sq-m { width: 52px; height: 52px; }
.sq-l { width: 76px; height: 76px; border-radius: var(--r-m); }
.lines li.has-sq, .line-btn { grid-template-columns: 44px 1fr auto; }
.lines li.wrap { display: block; padding: 0; min-height: 0; }
.line-btn { display: grid; align-items: center; column-gap: 14px; width: 100%; min-height: 68px; padding: 12px 0; text-align: left; text-decoration: none; color: inherit; transition: background var(--t-press); }
.line-btn:active { background: rgba(20, 38, 64, .035); }
.l-label small { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.l-label small.l-hint { color: var(--champagne-ink); font-weight: 600; }
.l-val .l-chev { width: 15px; height: 15px; margin-left: 4px; vertical-align: -2px; color: var(--muted); }
.ex-row { grid-template-columns: 52px 1fr auto 16px; }
.acc summary { grid-template-columns: 44px 1fr 20px; }
.acc-body { padding-left: 0; }
.g-h { display: flex; align-items: center; gap: 10px; }
.door-link { display: grid; grid-template-columns: 52px 1fr 16px; align-items: center; gap: 12px; width: 100%; margin: 4px 0 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); text-align: left; }
.door-link strong { display: block; font-size: 14.5px; color: var(--navy); }
.door-link small { display: block; font-size: 12.5px; color: var(--muted); }
.door-link > .i { width: 16px; height: 16px; color: var(--muted); }
.feature-bf { overflow: hidden; }
.fb-photo { display: block; margin: calc(var(--s6) * -1) calc(var(--s5) * -1) var(--s5); aspect-ratio: 16 / 9; overflow: hidden; background: var(--line); }
.fb-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.duo .sq { width: 48px; height: 48px; margin-bottom: var(--s2); }
.mini-title { margin-top: var(--s8); padding-bottom: var(--s2); font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--navy); border-bottom: 1px solid var(--line-strong); }
.ed-photo { display: block; aspect-ratio: 16 / 9; margin-bottom: var(--s4); border-radius: var(--r-m); overflow: hidden; background: var(--line); }
.ed-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ex-head { display: grid; grid-template-columns: 76px 1fr; gap: var(--s4); align-items: center; padding-right: 44px; }
.ex-head .sheet-title { padding-right: 0; }
.sheet-photo.tall { aspect-ratio: 4 / 3; }
.code-inline.big { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; margin-top: var(--s4); padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: var(--paper); font-size: 16px; font-weight: 700; letter-spacing: .06em; color: var(--navy); }
.code-inline.big .i { width: 16px; height: 16px; }
.hero .hero-photo { margin-top: calc(var(--s4) * -1); }
.bf-hero .hero-photo { margin-top: calc(var(--s6) * -1); }
.deliver { align-items: center; }
.lines .line-btn .l-val { white-space: nowrap; }
@media (max-width: 379px) {
  .ex-row { grid-template-columns: 44px 1fr 16px; grid-template-areas: "sq txt chev" "sq price chev"; row-gap: 4px; }
  .ex-row > .sq { grid-area: sq; width: 44px; height: 44px; align-self: start; }
  .ex-row > .ex-txt { grid-area: txt; }
  .ex-row > .ex-price { grid-area: price; justify-self: start; text-align: left; max-width: none; white-space: nowrap; }
  .ex-row > .i { grid-area: chev; }
  .lines li.has-sq, .line-btn { grid-template-columns: 40px 1fr auto; column-gap: 12px; }
  .lines .sq { width: 40px; height: 40px; }
}

/* Choix de langue : 7 langues sur une grille */
.seg.lang-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; width: 100%; }
.seg.lang-grid button { justify-content: center; }
