/*
 * Design tokens of the redesign (docs/design-ecrans.md §1, decided 2026-11-23).
 * Defined now, used by the new screens as they replace the old ones one by one.
 * Prefixed --fbs- so they never clash with the variables of the current styles.
 */
:root {
  /* Design D (2026-11-30): the welcome's garnet, behind every sign-up screen and each tab's head */
  --fbs-garnet-glow: radial-gradient(120% 70% at 85% 0%, #9a3446 0%, #6b1d2a 55%, #4a1019 100%);
  --fbs-garnet-end: #4a1019;
  /* The plate drawn until a recipe has its photo (n°70): vegetables, starch, protein */
  --fbs-food-veg: #6e8b3d;
  --fbs-food-starch: #e6be73;
  --fbs-food-protein: #a9603e;
  /* Colours */
  --fbs-bg: #ffffff;
  --fbs-ink: #292a2d;
  --fbs-ink-2: #4a4b4f;
  --fbs-muted: #6b6c70; /* 5:1 on white */
  /* Actions: the brand's garnet, from the Hopplan logo board (Edgar, 2026-11-26; petrol blue,
     fir green and Swiss red before that) */
  --fbs-accent: #9a3446; /* 7.1:1 under white text, 6.2:1 on the page */
  --fbs-accent-pressed: #7d2838;
  --fbs-accent-tint: #f6dde1;
  /* Alerts — overspending, errors. Garnet and red are too close to tell apart, so an alert is
     never told by its colour: dark text on a cream pastille, marked by a small red icon. */
  --fbs-alert: #d52b1e;
  --fbs-alert-text: var(--fbs-ink);
  --fbs-alert-bg: #fff8ef; /* ink 13.6:1, the red icon 4.8:1 */
  --fbs-alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23d52b1e'/%3E%3Cpath d='M8 4v5' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='12' r='1.1' fill='%23fff'/%3E%3C/svg%3E");
  --fbs-line: #e3e3e1;
  --fbs-line-soft: #efefed;
  --fbs-photo-ground: #f3eee7;

  /* Type: Figtree, the logo's typeface (design D, 2026-11-30), self-hosted (main.tsx) */
  --fbs-font: "Figtree Variable", "Helvetica Neue", Arial, sans-serif;
  --fbs-size-screen-title: 26px;
  --fbs-size-amount: 46px;
  --fbs-size-block-title: 17px;
  --fbs-size-body: 15px;
  --fbs-size-small: 13px;
  --fbs-size-min: 12px;

  /* Shapes */
  --fbs-radius-card: 14px;
  --fbs-radius-button: 12px;
  --fbs-radius-tag: 4px;
  --fbs-tap-min: 44px;

  /* Motion: press feedback only, nothing on scroll or on repeated gestures */
  --fbs-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --fbs-press-duration: 160ms;
  --fbs-press-scale: 0.97;

  /*
   * Redesign of 2026-12-02 (roadmap n°82, docs/design-ecrans.md §1). Added beside the tokens
   * above, which the screens not yet redrawn still read; each tab moves to these in its own PR.
   */
  /* Colours by role: each one says a single thing */
  --fbs-garnet: #6b1d2a; /* act and choose; white text 11.4:1. Never an amount, never a problem */
  --fbs-garnet-edge: #3d0d16; /* the solid edge under the main button */
  --fbs-rose: #f6dde1; /* the only coloured surface: arch, chosen state, aisle badge, rules */
  --fbs-rose-edge: #e3bcc3; /* the edge under a secondary button */
  --fbs-surface: #ffffff; /* every screen's ground */
  --fbs-ink-d: #241a1c; /* everything that is read, and every amount; 16.9:1 */
  --fbs-muted-d: #5e4f52; /* secondary text; 7.7:1 on white, 6.0:1 on rose */
  --fbs-link: #9a3446; /* a link inside a text, details of the drawings */
  --fbs-amber: #ffe2a0; /* « attention », always with a triangle and a sentence; ink 13.4:1 */
  --fbs-paper: #fbf6f1; /* the till receipt, nowhere else */
  --fbs-paper-line: #cdbfc1;
  /* Type scale: nothing read under 16px, the tab names being the one exception */
  --fbs-type-screen: 38px;
  --fbs-type-dish: 30px;
  --fbs-type-block: 22px;
  --fbs-type-row: 20px;
  --fbs-type-body: 17px;
  --fbs-type-small: 16px;
  --fbs-type-tab: 14px;
  --fbs-type-giant: 104px;
  /* Shapes and targets */
  --fbs-radius-control: 18px;
  --fbs-radius-block: 28px;
  --fbs-row-min: 56px;
  /* Motion, by name. Nothing loops, nothing replays when a tab is opened again */
  --fbs-t-press: 160ms; /* a button gives under the finger */
  --fbs-t-quick: 180ms; /* tick, swap an amount, show content */
  --fbs-t-move: 260ms; /* what changes place: tab pill, dish to its sheet */
  --fbs-t-sheet-in: 380ms;
  --fbs-t-sheet-out: 240ms;
  --fbs-t-hop: 600ms; /* five endings only */
  --fbs-ease-move: cubic-bezier(0.77, 0, 0.175, 1);
  --fbs-ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
}

/* Colours of the Hopplan logo (brand model, 2026-11-26): garnet #6B1D2A, light garnet #9A3446,
   pale pink #F1C3CB. */
.hop-logo {
  display: block;
  width: 100%;
  height: auto;
}

.hop-light .hop-ink {
  fill: #6b1d2a;
}
.hop-light .hop-arch {
  stroke: #6b1d2a;
}
.hop-light .hop-plan,
.hop-light .hop-line {
  fill: #9a3446;
}

.hop-dark .hop-ink {
  fill: #ffffff;
}
.hop-dark .hop-arch {
  stroke: #ffffff;
}
.hop-dark .hop-plan,
.hop-dark .hop-line {
  fill: #f1c3cb;
}

/* At the foot of Foyer: the app signs its screens once, quietly */
.hop-signature {
  display: flex;
  justify-content: center;
  padding: 28px 0 8px;
  opacity: 0.85;
}

.hop-signature .hop-logo {
  width: 140px;
}

/* The home page of hopplan.ch (roadmap n°83; direction chosen by Edgar on 2026-12-05): a garnet
   room, shopping and budget first, one scene driven by the scroll, a demonstration in four
   questions. Depth comes from flat layers and solid edges, never from blur. Three things here are
   the site's own and not the app's (written in the design system): the cocotte as a character, the
   big rose arch, and the few small loops (wheels, blinking). Tokens: the app's
   (apps/web/src/design-tokens.css), joined in front of this file at build time, like the fonts. */

@font-face { font-family: "Figtree Variable"; font-style: normal; font-display: swap; font-weight: 300 900; src: url("/fonts/figtree-latin-wght-normal.woff2") format("woff2-variations"); }
@font-face { font-family: "Figtree Variable"; font-style: italic; font-display: swap; font-weight: 300 900; src: url("/fonts/figtree-latin-wght-italic.woff2") format("woff2-variations"); }

/* What only works with the page's script stays out of the way without it */
html:not(.hm-on) .hm-js { display: none; }
.hm {
  --garnet: var(--fbs-garnet); --garnet-edge: var(--fbs-garnet-edge); --garnet-soft: var(--fbs-link);
  --rose: var(--fbs-rose); --rose-edge: var(--fbs-rose-edge); --ink: var(--fbs-ink-d); --muted: var(--fbs-muted-d); --white: #ffffff;
  --paper: var(--fbs-paper); --paper-line: var(--fbs-paper-line);
  --sans: var(--fbs-font);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --out: var(--fbs-ease-out); --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}
html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fbs-garnet); color: var(--fbs-ink-d); font-family: var(--fbs-font); font-size: 18px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
::selection { background: var(--garnet); color: var(--white); }
:focus-visible { outline: 3px solid var(--garnet-soft); outline-offset: 3px; border-radius: 6px; }
.on-garnet :focus-visible { outline-color: var(--white); }
h1, h2, p { margin: 0; }
h1, h2 { font-style: italic; font-weight: 800; letter-spacing: -0.03em; line-height: 0.94; text-wrap: balance; }
.w { max-width: 1180px; margin-inline: auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); }
.screen { min-height: min(100svh, 900px); display: flex; flex-direction: column; justify-content: center; padding-block: clamp(56px, 9vh, 104px); box-sizing: border-box; }
.on-garnet { background: var(--garnet); color: var(--white); }
.on-garnet .soft { color: var(--rose); }
.soft { color: var(--muted); }
.lead { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.45; max-width: 27em; }
.small { font-size: 16px; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.top svg, .s-name svg { height: auto; display: block; }
.top a.logo { display: block; }

/* buttons: the solid edge under them gives way on press */
.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 18px; font: inherit; font-weight: 800; font-size: 18px; min-height: 60px; padding: 0 26px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform 160ms var(--out), box-shadow 160ms var(--out); }
.btn-garnet { background: var(--garnet); color: var(--white); box-shadow: 0 5px 0 var(--garnet-edge); }
.btn-white { background: var(--white); color: var(--garnet); box-shadow: 0 5px 0 var(--garnet-edge); }
.btn-rose { background: var(--rose); color: var(--garnet); box-shadow: 0 5px 0 var(--rose-edge); }
.on-garnet .btn-rose { box-shadow: 0 5px 0 var(--garnet-edge); }
.btn-s { min-height: 46px; font-size: 16px; padding: 0 16px; border-radius: 14px; }
@media (hover: hover) and (pointer: fine) { .btn:hover { transform: translateY(-2px); } .btn-garnet:hover, .btn-white:hover, .on-garnet .btn-rose:hover { box-shadow: 0 7px 0 var(--garnet-edge); } }
.btn:active { transform: translateY(5px); box-shadow: 0 0 0 transparent; }

/* sign-up */
.note { margin-top: 14px; font-size: 16px; }

.b { max-width: min(520px, 86%); box-sizing: border-box; padding: 15px 22px; font-size: clamp(18px, 1.7vw, 23px); line-height: 1.35; border-radius: 28px; transform-origin: 0 100%; }
.b.l { align-self: flex-start; background: var(--rose); border-bottom-left-radius: 8px; }
.b.r { align-self: flex-end; background: var(--white); border: 2px solid var(--ink); border-bottom-right-radius: 8px; transform-origin: 100% 100%; }
.b.h { align-self: flex-start; background: var(--garnet); color: var(--white); border-bottom-left-radius: 8px; font-weight: 600; }
@keyframes pop { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.week { margin-top: clamp(32px, 5vh, 64px); display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 24px 14px; }
@media (max-width: 860px) { .week { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 520px) { .week { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.week .arch { background: var(--rose); border-radius: 200px 200px 22px 22px; aspect-ratio: 1 / 1.1; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 16%; box-sizing: border-box; }
.week .arch.go { animation: hop 600ms var(--out) both; }
@keyframes hop { 0% { transform: none; } 35% { transform: translateY(-26px); } 70% { transform: translateY(4px); } 100% { transform: none; } }
.week .arch svg { width: 70%; }
.week .day { margin-top: 12px; font-size: 16px; font-weight: 700; color: var(--rose); }
.week .name { font-style: italic; font-weight: 800; font-size: 20px; line-height: 1.12; margin-top: 2px; }
.week .price { margin-top: 4px; font-size: 16px; color: var(--rose); font-variant-numeric: tabular-nums; }
.vessel .soft { stroke: var(--garnet-soft); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.vessel .line { fill: none; stroke: var(--garnet); stroke-width: 6; stroke-linecap: round; }
.vessel .body { fill: var(--garnet); stroke: var(--garnet); stroke-width: 4; stroke-linejoin: round; }
/* ===== 0. La scène: one stage, driven by the scroll. Without script or with reduced motion, the five scenes simply follow one another. ===== */
.stage { display: grid; gap: 28px; padding-block: 32px; }
.stage .tell { display: none; }
.sc { padding-block: 28px; }
.sc .cap { margin-bottom: 20px; }
.sc .cap b { display: block; font-style: italic; font-weight: 800; font-size: clamp(56px, 9vw, 120px); line-height: 0.85; letter-spacing: -0.04em; }
.sc .cap span { display: block; margin-top: 12px; font-size: clamp(20px, 2vw, 28px); line-height: 1.25; font-weight: 600; max-width: 16em; }
.scrub .sc .cap { display: none; }
.scrub .wrap { height: 560vh; }
.scrub .stage { position: sticky; top: 0; height: 100svh; box-sizing: border-box; padding-block: 76px 24px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: clamp(24px, 5vw, 80px); }
.scrub .stage .tell { display: block; }
.tell .lab { font-style: italic; font-weight: 800; white-space: nowrap; font-size: clamp(60px, 8.4vw, 128px); line-height: 0.82; letter-spacing: -0.04em; }
.tell .say { margin-top: clamp(12px, 2vh, 24px); font-size: clamp(21px, 2.3vw, 34px); line-height: 1.2; font-weight: 600; max-width: 14em; min-height: 2.4em; }
.tell .lab.swap, .tell .say.swap { animation: swap 320ms var(--out); }
@keyframes swap { from { transform: translateY(0.25em); opacity: 0; } to { transform: none; opacity: 1; } }
.rail { display: flex; gap: 8px; margin-top: clamp(16px, 3vh, 32px); }
.rail i { width: 28px; height: 6px; border-radius: 3px; background: var(--rose); transition: background 200ms var(--out); }
.rail i.on { background: var(--garnet); }
.scrub .scenes { position: relative; height: 100%; min-height: 0; }
.scrub .sc { position: absolute; inset: 0; padding: 0; display: flex; flex-direction: column; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(24px) scale(0.97); transition: opacity 260ms var(--out), transform 380ms var(--out), visibility 0s 260ms; }
.scrub .sc.now { opacity: 1; visibility: visible; transform: none; transition: opacity 260ms var(--out), transform 380ms var(--out); }
@media (max-width: 760px) {
  .scrub .stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); align-items: start; gap: 14px; padding-block: 70px 76px; }
  .tell .say { min-height: 2.5em; }
  .rail { margin-top: 10px; }
}
.s-thread { display: flex; flex-direction: column; gap: 10px; }
.scrub .s-thread .b, .scrub .s-week .arch, .scrub .s-dish { opacity: 0; transform: scale(0.88); transition: opacity 200ms var(--out), transform 260ms var(--out); }
.scrub .s-thread .b.on, .scrub .s-week .arch.on, .scrub .s-dish.on { opacity: 1; transform: none; }
.s-dish { background: var(--garnet); color: var(--white); border-radius: 32px; padding: 12px 12px 24px; max-width: 460px; transform-origin: 50% 100%; }
.s-dish .arch { background: var(--rose); border-radius: 220px 220px 22px 22px; height: clamp(150px, 26vh, 240px); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 26px; box-sizing: border-box; }
.s-dish .arch svg { width: 52%; max-height: 70%; }
.s-dish .dish { margin: 18px 14px 0; font-style: italic; font-weight: 800; font-size: clamp(28px, 3vw, 40px); line-height: 1.02; }
.s-dish .meta { margin: 8px 14px 0; font-size: 18px; }
.s-week { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 520px; }
.s-week .arch { background: var(--rose); border-radius: 120px 120px 16px 16px; aspect-ratio: 1 / 1.05; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 12%; box-sizing: border-box; gap: 6px; font-weight: 800; font-size: 15px; }
.s-week .arch svg { width: 68%; }
.s-week .tot { grid-column: span 1; display: flex; align-items: center; justify-content: center; font-style: italic; font-weight: 800; font-size: clamp(22px, 2.4vw, 30px); line-height: 1; text-align: center; }
.s-list { border: 2px solid var(--rose); border-radius: 28px; padding: 22px 24px; max-width: 460px; box-sizing: border-box; }
.s-list .left { font-style: italic; font-weight: 800; font-size: clamp(40px, 5vw, 60px); line-height: 1; }
.s-list ul { list-style: none; margin: 14px 0 0; padding: 0; }
.s-list li { display: flex; align-items: center; gap: 14px; min-height: 52px; border-top: 2px solid var(--rose); font-variant-numeric: tabular-nums; transition: color 200ms var(--out); }
.s-list li::before { content: ""; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--garnet); box-sizing: border-box; flex: none; transition: background 200ms var(--out), transform 200ms var(--out); }
.s-list li span { flex: 1; }
.s-list li.ok { color: var(--muted); }
.s-list li.ok span { text-decoration: line-through; }
.s-list li.ok::before { background: var(--garnet); transform: scale(1.12); }
.s-ticket { background: var(--paper); font-family: var(--mono); font-size: 15px; line-height: 1.8; padding: 30px 26px 46px; max-width: 400px; box-sizing: border-box; -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 100%; mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 100%; }
.s-ticket p { display: flex; justify-content: space-between; gap: 12px; }
.s-ticket .c { justify-content: center; }
.s-ticket hr { border: 0; border-top: 2px dashed var(--paper-line); margin: 12px 0; }
.print { overflow: hidden; }
.sc-end h1 { font-size: clamp(46px, 7vw, 100px); max-width: 11em; }

/* Scène, depth: a garnet room, flat arches layered behind that drift with the scroll, and one big rose arch as the stage. Depth comes from layers and solid edges, never from blur. */
.hm .room { background: var(--garnet); color: var(--white); position: relative; }
.hm .tell .say { color: var(--rose); }
.hm .rail i { background: var(--garnet-soft); }
.hm .rail i.on { background: var(--white); }
.deco { display: none; }
.scrub .stage { overflow: hidden; }
.scrub .deco { display: block; position: absolute; border-radius: 50% 50% 0 0 / 60% 60% 0 0; pointer-events: none; will-change: transform; }
.scrub .deco.a { width: 120vmax; height: 90vmax; left: -34vmax; bottom: -52vmax; background: #5c1723; }
.scrub .deco.b { width: 70vmax; height: 64vmax; right: -22vmax; bottom: -30vmax; background: #7a2434; }
.scrub .deco.c { width: 26vmax; height: 30vmax; left: 4vmax; top: -18vmax; background: #7a2434; border-radius: 0 0 50% 50% / 0 0 60% 60%; }
.scrub .tell, .scrub .scenes { position: relative; z-index: 1; }
.scrub .scenes { background: var(--rose); color: var(--ink); border-radius: 260px 260px 40px 40px; box-shadow: 0 16px 0 var(--garnet-edge); height: min(100%, 720px); align-self: center; }
.scrub .sc { inset: 150px 40px 36px; align-items: center; }
.scrub .sc > * { width: 100%; box-sizing: border-box; flex: none; }
.hm .s-thread .b.l { background: var(--white); box-shadow: 0 5px 0 var(--rose-edge); }
.hm .s-thread .b.r { box-shadow: 0 5px 0 var(--ink); }
.hm .s-dish { box-shadow: 0 10px 0 var(--garnet-edge); }
.hm .s-dish .arch { background: var(--white); }
.hm .s-week .arch { background: var(--white); box-shadow: 0 5px 0 var(--rose-edge); }
.hm .s-list { background: var(--white); border-color: var(--white); box-shadow: 0 8px 0 var(--rose-edge); }
.hm .s-list .soft { color: var(--muted); }
.hm .print { filter: drop-shadow(0 8px 0 var(--rose-edge)); padding-bottom: 10px; }
@media (max-width: 760px) {
  .scrub .scenes { border-radius: 130px 130px 30px 30px; height: 100%; box-shadow: 0 10px 0 var(--garnet-edge); }
  .scrub .sc { inset: 74px 18px 22px; }
  .hm .s-dish .arch { height: clamp(110px, 18vh, 180px); }
  .hm .b { font-size: 17px; padding: 12px 16px; }
  .hm .s-list li { min-height: 44px; }
}

/* The cocotte: the one character of the site. It hops in, blinks, lifts its lid, and reacts to each step of the scroll. */
.mascot { display: block; overflow: visible; }
.mascot .belly { fill: var(--rose); } .mascot .cap { fill: var(--white); }
.mascot .knob, .mascot .handles { fill: none; stroke: var(--white); stroke-width: 6; stroke-linecap: round; }
.mascot .eye { fill: var(--garnet); transform-box: fill-box; transform-origin: center; animation: blink 4.2s infinite; }
.mascot .smile { fill: none; stroke: var(--garnet); stroke-width: 2.6; stroke-linecap: round; }
.mascot .lid { transform-box: fill-box; transform-origin: 20% 100%; animation: lid 3.4s infinite var(--spring); }
.mascot .steam path { fill: none; stroke: var(--rose); stroke-width: 4; stroke-linecap: round; opacity: 0; animation: steam 3.4s infinite ease-out; }
.mascot .steam path:nth-child(2) { animation-delay: 0.25s; } .mascot .steam path:nth-child(3) { animation-delay: 0.5s; }
.mascot .pot { transform-box: fill-box; transform-origin: 50% 100%; }
.mascot.in .pot { animation: land 900ms var(--spring) both; }
.mascot.hop .pot { animation: jump 620ms var(--spring); }
@keyframes blink { 0%, 93%, 100% { transform: none; } 96% { transform: scaleY(0.1); } }
@keyframes lid { 0%, 62%, 100% { transform: none; } 72% { transform: translateY(-7px) rotate(-7deg); } 84% { transform: translateY(1px); } }
@keyframes steam { 0%, 60% { opacity: 0; transform: translateY(8px); } 74% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
@keyframes land { 0% { transform: translateY(-140%) scale(0.9, 1.1); } 55% { transform: translateY(0) scale(1.12, 0.84); } 78% { transform: translateY(-6%) scale(0.97, 1.04); } 100% { transform: none; } }
@keyframes jump { 0% { transform: none; } 20% { transform: scale(1.1, 0.86); } 50% { transform: translateY(-34%) scale(0.95, 1.06); } 80% { transform: scale(1.06, 0.93); } 100% { transform: none; } }
.s-hero { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; align-content: center; gap: 24px clamp(32px, 6vw, 96px); padding-top: 96px; }
.s-hero .txt { flex: 1 1 440px; min-width: 0; }
.s-hero h1 { font-size: clamp(50px, 7.6vw, 112px); }
.s-hero .lead { margin-top: 22px; }
.s-hero .acts { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px; }
.s-hero .acts .btn { flex: 0 1 auto; }
.s-hero .mascot { flex: 0 1 420px; width: min(420px, 56vw); margin-inline: auto; }
.btn-line { background: transparent; color: var(--white); box-shadow: inset 0 0 0 2px var(--white), 0 5px 0 var(--garnet-edge); }
.scrub .tell .mascot { width: clamp(84px, 11vw, 150px); margin-top: clamp(10px, 3vh, 36px); }
.tell .mascot { display: none; } .scrub .tell .mascot { display: block; }
@media (max-width: 760px) { .scrub .tell { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: end; } .scrub .tell .lab, .scrub .tell .say, .scrub .tell .rail { grid-column: 1; } .scrub .tell .mascot { grid-column: 2; grid-row: 1 / span 3; width: 84px; margin: 0; } }
.scrub .sc { transition: opacity 240ms var(--out), transform 520ms var(--spring), visibility 0s 240ms; transform: translateY(40px) scale(calc(0.9 * var(--fit, 1))); }
.scrub .sc.now { transition: opacity 240ms var(--out), transform 520ms var(--spring); transform: scale(var(--fit, 1)); }
.scrub .s-thread .b, .scrub .s-week .arch, .scrub .s-dish { transition: opacity 180ms var(--out), transform 420ms var(--spring); transform: scale(0.6); }
.s-end { text-align: center; align-items: center; }
.s-end h1 { margin-inline: auto; }
.s-end .lead { margin-inline: auto; }
.s-row { display: flex; justify-content: center; align-items: flex-end; gap: clamp(6px, 1.6vw, 18px); margin-bottom: clamp(20px, 4vh, 44px); width: 100%; }
.s-row .arch { --a: clamp(38px, 11vw, 110px); flex: none; width: var(--a); height: calc(var(--a) * 1.1); background: var(--rose); border-radius: 80px 80px 14px 14px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: calc(var(--a) * 0.14); box-sizing: border-box; box-shadow: 0 6px 0 var(--garnet-edge); }
.s-row .arch svg { width: 72%; height: auto; aspect-ratio: 120 / 70; flex: none; }
.s-row .arch:nth-child(4) { --a: clamp(50px, 14vw, 150px); }
.s-row.go .arch { animation: jump 700ms var(--spring) both; transform-origin: 50% 100%; }
@media (prefers-reduced-motion: reduce) { .mascot *, .mascot .pot, .s-row.go .arch { animation: none !important; } }

/* The demo: four questions, then a first week. Nothing leaves the page. */
.s-demo { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; align-content: center; gap: 28px clamp(32px, 6vw, 88px); }
.s-demo .q { flex: 1 1 380px; min-width: 0; }
.s-demo .q .mascot { width: clamp(96px, 12vw, 160px); }
.s-demo .q .step { margin-top: 18px; font-weight: 700; }
.s-demo .q h2 { margin-top: 8px; font-size: clamp(40px, 5.6vw, 80px); }
.s-demo .q h2.swap { animation: swap 320ms var(--out); }
.d-card { flex: 1 1 400px; min-width: 0; max-width: 560px; background: var(--white); color: var(--ink); border-radius: 32px; padding: clamp(20px, 3vw, 32px); box-sizing: border-box; box-shadow: 0 14px 0 var(--garnet-edge); }
.d-card :focus-visible { outline-color: var(--garnet-soft); }
.d-panel { min-height: 216px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.d-panel.in { animation: pop 300ms var(--spring); transform-origin: 50% 100%; }
.d-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; border-bottom: 2px solid var(--rose); }
.d-row:last-of-type { border-bottom: 0; }
.d-row > span { font-size: 22px; font-weight: 700; }
.d-step { display: flex; align-items: center; gap: 14px; }
.d-step b { min-width: 1.4em; text-align: center; font-style: italic; font-weight: 800; font-size: 34px; font-variant-numeric: tabular-nums; }
.d-step .btn { min-height: 52px; width: 52px; padding: 0; font-size: 28px; border-radius: 16px; box-shadow: 0 4px 0 var(--rose-edge); }
.d-step .btn:disabled { opacity: 0.4; cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip { border: 0; font: inherit; font-weight: 800; font-size: 20px; min-height: 60px; padding: 0 22px; border-radius: 18px; background: var(--rose); color: var(--garnet); box-shadow: 0 5px 0 var(--rose-edge); cursor: pointer; transition: transform 160ms var(--out), box-shadow 160ms var(--out), background 160ms var(--out); }
.chip[aria-pressed="true"] { background: var(--garnet); color: var(--white); box-shadow: 0 5px 0 var(--garnet-edge); }
.chip:active { transform: translateY(5px); box-shadow: 0 0 0 transparent; }
.d-hint { font-size: 16px; color: var(--muted); }
.d-nav { margin-top: 20px; display: flex; gap: 12px; }
.d-nav .btn { flex: 1 1 auto; }
.d-nav .back { flex: 0 0 auto; }
.s-result h2 { font-size: clamp(46px, 7vw, 100px); }
.s-result .swapb { margin-top: 6px; border: 0; background: none; color: var(--white); font: inherit; font-size: 16px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; padding: 10px 0; cursor: pointer; }
.s-result .sum { font-size: clamp(26px, 3.4vw, 46px); line-height: 1.08; max-width: 22em; }

/* The name stays in sight: a header that follows the scroll, and the logo written large at the start and at the end. */
.s-top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; }
.hm .top { padding-block: 14px; }
.hm .top svg { width: clamp(150px, 15vw, 196px); }
.s-name svg { display: block; width: clamp(240px, 34vw, 460px); height: auto; margin-left: -1%; }
.s-name { margin-bottom: clamp(18px, 3vh, 36px); }
.s-name.end { margin: clamp(40px, 7vh, 80px) auto 0; }
.s-name.end svg { margin-inline: auto; width: clamp(260px, 44vw, 620px); }
.s-hero { padding-top: 24px; }
.s-hero h1 { font-size: clamp(44px, 6.2vw, 92px); }
.scrub .stage { padding-top: 88px; }

/* Budget first: a meter that fills as the basket does, in the scroll scene and under the demo list. */
.meter { margin-top: clamp(12px, 2.4vh, 26px); max-width: 420px; opacity: 0; transition: opacity 260ms var(--out); }
.meter.on { opacity: 1; }
.meter .bar { position: relative; height: 18px; border-radius: 9px; background: var(--garnet-edge); overflow: hidden; }
.meter .bar i { position: absolute; inset: 0; background: var(--white); transform-origin: 0 50%; transform: scaleX(0); transition: transform 420ms var(--out); border-radius: 9px; }
.meter p { margin-top: 8px; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tell .meter { display: none; } .scrub .tell .meter { display: block; }
@media (max-width: 760px) { .scrub .tell .meter { grid-column: 1 / -1; margin-top: 8px; } .meter p { font-size: 16px; margin-top: 4px; } .meter .bar { height: 12px; } .scrub .stage { padding-top: 84px; } }
.rules { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.rules span { border: 2px solid var(--rose); color: var(--rose); border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 16px; }
.d-two { margin-top: clamp(24px, 4vh, 40px); display: flex; flex-wrap: wrap; gap: 32px clamp(32px, 5vw, 72px); align-items: flex-start; }
.d-list { flex: 1 1 420px; min-width: 0; max-width: 560px; background: var(--white); color: var(--ink); border-radius: 32px; padding: clamp(20px, 3vw, 30px); box-sizing: border-box; box-shadow: 0 14px 0 var(--garnet-edge); }
.d-list :focus-visible { outline-color: var(--garnet-soft); }
.d-count b { font-style: italic; font-weight: 800; font-size: clamp(40px, 5vw, 60px); line-height: 1; }
.d-count span { color: var(--muted); font-size: 16px; }
.d-list h3 { margin: 18px 0 4px; font-size: 16px; font-weight: 800; }
.d-item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 50px; border: 0; border-top: 2px solid var(--rose); background: none; font: inherit; color: inherit; text-align: left; padding: 0; cursor: pointer; font-variant-numeric: tabular-nums; }
.d-item::before { content: ""; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--garnet); box-sizing: border-box; flex: none; transition: background 200ms var(--out), transform 260ms var(--spring); }
.d-item span { flex: 1; }
.d-item[aria-pressed="true"] { color: var(--muted); }
.d-item[aria-pressed="true"] span { text-decoration: line-through; }
.d-item[aria-pressed="true"]::before { background: var(--garnet); transform: scale(1.15); }
.d-list .meter { max-width: none; margin-top: 20px; }
.d-list .meter .bar { background: var(--rose); }
.d-list .meter .bar i { background: var(--garnet); }
.d-list .sum2 { font-size: 20px; }
.d-days { flex: 1 1 380px; min-width: 0; }
.d-days .d-h { font-weight: 800; font-size: 18px; color: var(--rose); }
.d-days .week { margin-top: 14px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 18px 12px; }
.d-days .week .name { font-size: 17px; }

/* The trolley rolls in, the week's shopping drops into it, then it keeps rolling: wheels turn, speed lines pass (the logo's own), products rattle. */
.trolley { display: block; overflow: visible; flex: 0 1 460px; width: min(460px, 70vw); margin-inline: auto; }
.trolley .wire { fill: none; stroke: var(--white); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.trolley .wire.thin { stroke-width: 3.5; stroke: var(--rose); }
.trolley .wheel { transform-box: fill-box; transform-origin: center; animation: spin 900ms linear infinite; }
.trolley .wheel circle { fill: var(--rose); } .trolley .wheel path { stroke: var(--garnet); stroke-width: 3; stroke-linecap: round; fill: none; }
.trolley .ride { transform-box: fill-box; transform-origin: 50% 100%; animation: roll 900ms var(--out) both, bob 700ms ease-in-out 900ms infinite; }
.trolley .item { transform-box: fill-box; transform-origin: 50% 100%; opacity: 0; animation: drop 620ms var(--spring) both, rattle 700ms ease-in-out infinite; }
.trolley .i1 { animation-delay: 800ms, 1500ms; } .trolley .i2 { animation-delay: 980ms, 1750ms; } .trolley .i3 { animation-delay: 1160ms, 1900ms; } .trolley .i4 { animation-delay: 1340ms, 2050ms; } .trolley .i5 { animation-delay: 1520ms, 2200ms; }
.trolley .speed rect { fill: var(--rose); opacity: 0; animation: speed 800ms linear 1200ms infinite; }
.trolley .speed rect:nth-child(2) { animation-delay: 1450ms; fill: var(--white); } .trolley .speed rect:nth-child(3) { animation-delay: 1700ms; }
@keyframes roll { from { transform: translateX(-80vw) rotate(-5deg); } 70% { transform: translateX(2%) rotate(1.5deg); } to { transform: none; } }
@keyframes bob { 0%, 100% { transform: none; } 50% { transform: translateY(-2.5px) rotate(-0.6deg); } }
@keyframes drop { 0% { opacity: 0; transform: translateY(-150px) rotate(-14deg); } 30% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes rattle { 0%, 100% { opacity: 1; transform: none; } 50% { opacity: 1; transform: translateY(-3px) rotate(1.6deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes speed { 0% { opacity: 0; transform: translateX(26px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateX(-34px); } }
@media (prefers-reduced-motion: reduce) { .trolley .ride, .trolley .wheel, .trolley .speed rect { animation: none !important; } .trolley .item { animation: none !important; opacity: 1; } .incart.bump { animation: none !important; } }
.incart { float: right; display: flex; align-items: center; gap: 8px; background: var(--rose); color: var(--garnet); border-radius: 999px; padding: 8px 14px 8px 12px; font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.incart.bump { animation: jump 520ms var(--spring); transform-origin: 50% 100%; }
.minicart { width: 30px; height: auto; display: block; fill: none; stroke: var(--garnet); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.minicart circle { fill: var(--garnet); stroke: none; }

.foot { padding-block: 28px 120px; display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between; font-size: 16px; }
.foot a { color: inherit; font-weight: 700; text-underline-offset: 3px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* The vessels: the app's own shapes (src/home/vessels.ts) */
.vessel { display: block; }
.vessel .soft { fill: none; }
.vessel .soft.full { fill: var(--garnet-soft); }
.s-end h2 { font-size: clamp(48px, 7.4vw, 108px); max-width: 10em; margin-inline: auto; }
.s-end .lead { margin-top: 22px; }
.s-end .btn { margin-top: 26px; }
.s-result .soon { margin-top: clamp(28px, 4vh, 48px); font-style: italic; font-weight: 800; font-size: clamp(28px, 3.2vw, 44px); line-height: 1.02; letter-spacing: -0.02em; max-width: 16em; }
.s-ticket .strong { font-weight: 700; }
.s-ticket .name { font-weight: 700; letter-spacing: 0.14em; }
.hm .foot { padding-block: 28px 40px; }
.hs-skip { position: absolute; left: 12px; top: -80px; z-index: 50; background: var(--fbs-surface); color: var(--fbs-garnet); font-weight: 800; padding: 12px 16px; border-radius: 12px; }
.hs-skip:focus { top: 12px; }
.v { display: contents; }
.hm .foot a { color: inherit; }

/* « Garde ma place » (Infomaniak's form, src/pages/Home.tsx): its structure, the site's look */
.join { display: flex; flex-wrap: wrap; gap: 10px; max-width: 540px; margin-top: 26px; }
.join label { flex: 1 1 100%; font-weight: 700; font-size: 16px; }
.join .inf-input { flex: 1 1 220px; min-width: 0; }
.join .inf-input input { width: 100%; min-height: 60px; border: 2px solid var(--white); border-radius: 18px; padding: 0 20px; font: inherit; color: var(--ink); background: var(--white); }
.join .inf-input input::placeholder { color: #7a6a6d; }
.join .inf-input.inf-error input { border-color: var(--rose); box-shadow: 0 0 0 3px var(--garnet-soft); }
.join .inf-message { display: block; margin-top: 6px; font-size: 16px; font-weight: 700; color: var(--rose); }
.join .inf-submit { flex: 0 0 auto; }
.join .inf-submit input { min-height: 60px; font-size: 18px; }
.join .inf-submit input.disabled { opacity: 0.5; }
.join altcha-widget { flex: 1 1 100%; color: var(--ink); }
.join .inf-rgpd { flex: 1 1 100%; max-width: 34em; margin: 4px 0 0; }
.join .inf-rgpd a { color: inherit; font-weight: 700; text-underline-offset: 3px; }
.join .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.s-end .join { margin-inline: auto; justify-content: center; text-align: left; }
.s-result .keep { margin-top: clamp(28px, 4vh, 48px); display: flex; flex-wrap: wrap; gap: 18px clamp(28px, 5vw, 72px); align-items: flex-start; }
.s-result .keep .soon { margin-top: 0; flex: 1 1 320px; min-width: 0; }
.s-result .keep .join { margin-top: 0; flex: 1 1 380px; min-width: 0; }

/* ===== Phones (Edgar, 2026-12-05: « les éléments s'adaptent pas très bien »). Checked on 320, 360 and 390 px wide screens (apps/site/scripts/check-phone.mjs). ===== */
#demo, #d-result, #place, #comment { scroll-margin-top: 64px; }
#d-result h2 { scroll-margin-top: 72px; }
@media (max-width: 760px) {
  /* The header's logo steps aside while the big one is in sight (client.ts), so the name is never written twice on the same screen */
  .hm .top .logo { transition: opacity 200ms var(--out); }
  .hm .s-top.solo .top .logo { opacity: 0; pointer-events: none; }
  .hm .top { padding-block: 10px; }
  .hm .top svg { width: 132px; }
  /* Hero: name, promise, the trolley, then the two buttons, all on the first screen; the longer sentence follows */
  .s-hero { padding-block: 8px 40px; min-height: 0; gap: 0; flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .s-hero .txt { display: contents; }
  .s-hero .s-name { order: 1; margin-bottom: 14px; }
  .s-hero .s-name svg { width: min(230px, 62vw); }
  .s-hero h1 { order: 2; font-size: clamp(36px, 10.4vw, 52px); }
  .s-hero .trolley { order: 3; align-self: center; width: auto; height: min(30svh, 230px); max-width: 82vw; flex: none; margin: 10px auto 4px; }
  .s-hero .acts { order: 4; margin-top: 14px; flex-direction: column; gap: 12px; }
  .s-hero .acts .btn { width: 100%; box-sizing: border-box; justify-content: center; text-align: center; }
  .s-hero .lead { order: 5; margin-top: 22px; font-size: 17px; }
  /* The scene: smaller words above a taller arch (its picture is drawn smaller if it still does not fit, client.ts), the week's total in one line */
  .scrub .stage { padding-block: 64px 20px; gap: 10px; }
  .scrub .scenes { border-radius: 96px 96px 26px 26px; }
  .scrub .sc { inset: 52px 14px 16px; }
  .scrub .tell .mascot { width: 64px; }
  .hm .b { font-size: 15px; padding: 10px 14px; border-radius: 22px; }
  .s-thread { gap: 8px; }
  .tell .lab { font-size: clamp(40px, 12vw, 60px); }
  .tell .say { font-size: 16px; min-height: 2.5em; margin-top: 8px; }
  .s-week { gap: 8px; }
  .s-week .arch { font-size: 13px; }
  .s-week .tot { grid-column: 1 / -1; font-size: 22px; padding-top: 4px; }
  .hm .s-dish .dish { font-size: 24px; }
  .hm .s-dish .meta { font-size: 16px; }
  .s-list { padding: 14px 16px; font-size: 15px; }
  .s-list .left { font-size: 32px; }
  .s-list ul { margin-top: 8px; }
  .hm .s-list li { min-height: 38px; gap: 10px; }
  .s-list li::before { width: 18px; height: 18px; }
  .s-list .incart { font-size: 16px; padding: 5px 10px 5px 8px; }
  .s-list .incart .minicart { width: 22px; }
  .s-ticket { font-size: 13px; padding: 20px 18px 34px; }
  /* The demo: the cocotte beside the step, so the question and its answers share one screen */
  .s-demo { min-height: 0; padding-block: 40px 56px; gap: 18px; }
  .s-demo .q { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; }
  .s-demo .q .mascot { width: 64px; grid-row: 1; }
  .s-demo .q .step { margin-top: 0; grid-row: 1; grid-column: 2; }
  .s-demo .q h2 { grid-column: 1 / -1; margin-top: 12px; font-size: clamp(30px, 8.6vw, 40px); }
  .d-panel { min-height: 0; }
  .d-row { min-height: 60px; }
  .d-row > span { font-size: 19px; }
  .chip { font-size: 18px; min-height: 52px; padding: 0 18px; }
  /* The result: the week as a list of seven lines, not seven tall arches */
  .s-result { padding-block: 40px 56px; }
  .s-result h2 { font-size: clamp(36px, 10.4vw, 52px); }
  .d-days .week { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .d-days .week > div { display: grid; grid-template-columns: 68px minmax(0, 1fr); column-gap: 14px; align-items: start; padding-bottom: 10px; border-bottom: 2px solid var(--garnet-edge); }
  .d-days .week > div > .arch { grid-row: 1 / span 4; width: 68px; border-radius: 40px 40px 12px 12px; }
  .d-days .week > div > :not(.arch) { grid-column: 2; }
  .d-days .week .day { margin-top: 2px; font-size: 14px; }
  .d-days .week .name { font-size: 18px; }
  .d-days .week .price { font-size: 15px; }
  .d-days .week .swapb { margin-top: 0; padding: 6px 0; font-size: 15px; justify-self: start; }
  .d-list .incart { font-size: 18px; padding: 6px 12px 6px 10px; }
  .s-result .soon { font-size: 28px; }
  /* The end: the row of dishes keeps to the screen, the form fills its width */
  .s-end { min-height: 0; padding-block: 48px 40px; }
  .s-end h2 { font-size: clamp(38px, 11vw, 56px); }
  .join .inf-submit { flex: 1 1 100%; }
  .join .inf-submit input { width: 100%; }
  .s-name.end svg { width: min(300px, 76vw); }
}
