/* La page « Courses » : le design « Ticket » (charte : docs/specs/2026-12-01-design-ticket.md).
   Un outil calme : du blanc, des listes, des filets d'un pixel, des montants alignés. Pas de carte, pas d'ombre (sauf sous un panneau ouvert), pas d'aplat de couleur.
   Police du système, aucun fichier à charger, aucun style en ligne. Clair par défaut ; le thème est posé sur <html> par theme.js avant le premier affichage. */

/* ───────────────────────── 1. Les couleurs, les tailles ───────────────────────── */

:root {
  --bg: #FFFFFF;
  --surface-2: #FAFAF8; /* la seule surface secondaire : le menu et le ticket */
  --hover: #F1F1EE; /* survol, ligne active du menu, champ */
  --thumb-bg: #F4F4F1;
  --line: #ECECE8;
  --row-line: #F1F1EE; /* le filet entre deux lignes d'une liste : plus léger que celui d'un titre */
  --line-strong: #D9D8D3;
  --text: #1B1B1A;
  --muted: #6E6C66;
  --subtle: #74726C; /* la charte donne #8F8D87 : trop clair pour 4,5 pour 1, assombri d'un cran */
  --ink: #1B1B1A; /* le bouton plein et les messages : encre sur papier */
  --on-ink: #FFFFFF;
  --good: #2C6E4F; /* une offre, un état positif : du texte seulement */
  --over: #AC4E26; /* un dépassement, un manque, une alerte : du texte, ou un filet à gauche (la charte donne #B4532A, assombri d'un cran pour 4,5 pour 1 sur le survol) */
  --ph-text: #6E6C66;
  --backdrop: rgba(27, 27, 26, 0.3);
  --shadow: 0 8px 32px rgba(27, 27, 26, 0.14);
  --thumb: 48px; /* la taille des vignettes de la liste : 48 (ou 36) ; le rayon suit (un sixième) */
  --side-w: 196px;
  --ticket-w: 312px;
  --content-w: 840px;
  --gutter: 36px;
  --tabbar-h: calc(56px + env(safe-area-inset-bottom));
  --ring: 2px solid var(--text);
}
:root[data-theme="dark"] {
  --bg: #1A1A1C;
  --surface-2: #1F1F22;
  --hover: #252528;
  --thumb-bg: #F2F1EE;
  --line: #2A2A2E;
  --row-line: #252528;
  --line-strong: #3A3A3F;
  --text: #E8E6E1;
  --muted: #98958E;
  --subtle: #8A8780;
  --ink: #E8E6E1;
  --on-ink: #1A1A1C;
  --good: #8DB89E;
  --over: #D9916E;
  --backdrop: rgba(0, 0, 0, 0.55);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ───────────────────────── 2. Base : texte, boutons, champs, focus ───────────────────────── */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-variant-numeric: tabular-nums; /* tout montant et toute quantité : des chiffres de même largeur */
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, a { font: inherit; color: inherit; }
a { color: var(--text); }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1 { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.note { font-size: 13px; line-height: 1.45; color: var(--muted); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.empty { padding: 24px 0; color: var(--muted); }
.empty-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 0; }
.card-title { font-size: 14px; font-weight: 500; }
.card-text { font-size: 14px; line-height: 1.45; color: var(--muted); }
.card-kicker { font-size: 13px; color: var(--muted); }
.card { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; }
.icon { flex: none; }

/* Le focus au clavier se voit partout : un contour neutre de 2 px. */
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: var(--ring); outline-offset: 2px; border-radius: 6px; }
main:focus { outline: none; }

/* Boutons : un seul bouton plein par écran (l'action principale, neutre). Tous les autres sont du texte, sans fond ni contour. */
.btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; touch-action: manipulation; white-space: nowrap; }
.btn-primary { height: 44px; padding: 0 20px; background: var(--ink); color: var(--on-ink); font-weight: 600; }
.btn-small { height: 32px; padding: 0 8px; font-size: 13px; }
.btn-quiet, .btn-muted, .btn-link { color: var(--muted); }
.btn-link { color: var(--text); }
.btn:disabled { color: var(--subtle); cursor: not-allowed; }
.btn-primary:disabled { background: var(--hover); color: var(--muted); }
@media (hover: hover) {
  .btn:hover:not(:disabled) { background: var(--hover); color: var(--text); }
  .btn-primary:hover:not(:disabled) { background: var(--ink); color: var(--on-ink); opacity: 0.88; }
}
.icon-btn { appearance: none; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); text-decoration: none; cursor: pointer; }
@media (hover: hover) { .icon-btn:hover { background: var(--hover); color: var(--text); } }

/* Champs : les seuls contours avec les panneaux. */
.field { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 14px; }
.field::placeholder { color: var(--subtle); }
.field:focus-visible { outline: var(--ring); outline-offset: 0; }

/* − n + : discret, de petits signes gris autour du nombre. */
.stepper { display: inline-flex; align-items: center; }
.step-btn { appearance: none; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--subtle); font-size: 16px; line-height: 1; cursor: pointer; touch-action: manipulation; }
@media (hover: hover) { .step-btn:hover:not(:disabled) { background: var(--hover); color: var(--text); } }
.step-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.stepper-value { min-width: 20px; text-align: center; font-size: 14px; }
.stepper-count, .stepper-parts { min-width: 0; padding: 0 4px; white-space: nowrap; }

/* ───────────────────────── 3. Photos et vignettes ───────────────────────── */

.photo { flex: none; display: block; object-fit: cover; background: var(--thumb-bg); border-radius: 6px; }
.ph { display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--ph-text); }
.photo-thumb { width: var(--thumb); height: var(--thumb); border-radius: calc(var(--thumb) / 6); font-size: calc(var(--thumb) * 0.4); }
.photo-row, .photo-small, .photo-pill { width: 36px; height: 36px; border-radius: 6px; font-size: 15px; }
.photo-hero { width: min(100%, 240px); aspect-ratio: 1; height: auto; border-radius: 12px; object-fit: contain; }
.photo-hero.ph { font-size: 72px; }
.meal-photo { position: relative; flex: none; overflow: hidden; display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--ph-text); background: var(--thumb-bg); border-radius: 8px; }
.meal-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.meal-photo.has-img .meal-img { opacity: 1; }
.meal-photo.has-img .meal-initial { opacity: 0; }
.meal-photo-card, .meal-photo-row { width: 72px; height: 72px; font-size: 26px; }
.meal-photo-mini { width: 36px; height: 36px; border-radius: 6px; font-size: 15px; }
.meal-photo-fiche { width: 72px; height: 72px; border-radius: 8px; font-size: 26px; }
.meal-photo-link { display: block; text-decoration: none; flex: none; }
.meal-photo.is-pending .meal-initial { opacity: 0.5; }

/* Attentes : des repères gris, sans mouvement. */
.skel { display: block; border-radius: 8px; background: var(--hover); }
.skel-title { height: 24px; width: 50%; }
.skel-line { height: 14px; width: 100%; }
.skel-line.short { width: 55%; }
.skel-card { height: 64px; width: 100%; }
.skel-photo { height: 72px; width: 72px; grid-row: 1 / span 2; }
.boot { margin: auto; padding: 24px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.boot-text { color: var(--muted); }
.boot-skeleton { width: min(560px, 100%); align-items: stretch; text-align: left; margin: 64px auto; gap: 14px; }
.boot-skeleton .boot-text { text-align: center; }
.indeterminate { height: 2px; background: var(--line); overflow: hidden; position: relative; }
.indeterminate-bar { position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: var(--ink); }
@keyframes slide { from { left: -40%; } to { left: 100%; } }
@media (prefers-reduced-motion: no-preference) { .indeterminate-bar { animation: slide 1.2s ease-in-out infinite; } }
@media (prefers-reduced-motion: reduce) { .indeterminate-bar { left: 0; width: 100%; opacity: 0.5; } }

/* Offres, états, avis : du texte à la taille de légende, jamais une pastille. */
.chips { display: flex; flex-wrap: wrap; gap: 0 12px; }
.chip { font-size: 12px; color: var(--muted); }
.chip-warn { color: var(--over); }
.chip-fav { color: var(--muted); }
.chip-fav .icon { width: 11px; height: 11px; vertical-align: -1px; margin-right: 3px; }
.vote-up { color: var(--good); }
.vote-other { color: var(--muted); }

/* ───────────────────────── 4. La page : mise en page, menu, en-têtes, bandeaux ───────────────────────── */

.page { max-width: 640px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--bg); }
.page.page-wide { max-width: none; }
.view { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.head { padding: 24px 16px 0; display: flex; flex-direction: column; gap: 8px; }
.head-titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.head-sub { font-size: 14px; color: var(--muted); }
.head-over { margin-left: 12px; color: var(--over); }
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.head-kicker { font-size: 13px; color: var(--muted); }
.head-steps { display: flex; gap: 16px; font-size: 12px; color: var(--subtle); }
.head-step.is-on { color: var(--text); font-weight: 500; }
.back-link { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; min-height: 32px; font-size: 13px; color: var(--muted); text-decoration: none; }
.head-back { gap: 4px; }

.banners:not(:empty) { padding: 16px 16px 0; display: flex; flex-direction: column; gap: 12px; }
.banner { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 0 0 0 12px; border-left: 2px solid var(--line-strong); font-size: 14px; line-height: 1.45; }
.banner-warn, .banner-error { display: block; border-left-color: var(--over); }
.banner-error { display: flex; color: var(--over); }
.banner strong { font-weight: 500; }
.banner ul { margin-top: 4px; }
.banner-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.banner-intro .btn { margin-left: -8px; }
.intro-body { min-width: 0; }
.intro-body strong { display: block; margin-bottom: 2px; }
.intro-body ul { margin: 4px 0 0; padding-left: 16px; list-style: disc; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.alert-list { margin-top: 4px; display: flex; flex-direction: column; gap: 8px; }
.alert-term { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.alert-term-text { flex: 1 1 200px; min-width: 0; }

.body { flex: 1; padding: 20px 16px 48px; display: flex; flex-direction: column; gap: 16px; }
.body.has-foot { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }

/* Le menu : sur la surface secondaire, rien d'autre. */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; flex: 1; }
.shell.has-ticket { grid-template-columns: var(--side-w) minmax(0, 1fr) var(--ticket-w); }
.main { min-width: 0; display: flex; flex-direction: column; }
.main > .head, .main > .body, .main > .banners { width: min(100%, calc(var(--content-w) + 2 * var(--gutter))); margin-inline: auto; padding-inline: var(--gutter); }
.main > .head { padding-top: 32px; }
.main > .banners:not(:empty) { padding-top: 20px; }
.main > .body { padding-top: 20px; padding-bottom: 64px; }
.main > .body.has-foot { padding-bottom: 140px; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; background: var(--surface-2); padding: 24px 12px 20px; display: flex; flex-direction: column; gap: 2px; }
:root[data-theme="dark"] .sidebar { border-right: 1px solid var(--line); }
.brand { display: block; padding: 0 10px 12px; font-size: 16px; font-weight: 600; text-decoration: none; color: var(--text); border-radius: 6px; }
.side-search { appearance: none; display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; margin-bottom: 14px; padding: 0 8px 0 10px; border: 0; border-radius: 8px; background: var(--hover); color: var(--muted); font-size: 13px; text-align: left; cursor: pointer; }
.side-search .icon { width: 14px; height: 14px; }
.side-search-text { flex: 1; min-width: 0; }
.kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; background: var(--bg); color: var(--muted); font-size: 12px; line-height: 1; }
.side-main { display: flex; flex-direction: column; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 14px; }
.side-link.is-on { background: var(--hover); color: var(--text); }
.side-label { flex: 1; min-width: 0; }
.side-badge { flex: none; font-size: 12px; color: var(--muted); }
.side-order { margin: 0 0 4px; }
.side-steps { display: flex; flex-direction: column; }
.side-step { display: flex; align-items: baseline; gap: 8px; padding: 5px 10px 5px 24px; border-radius: 8px; color: var(--subtle); font-size: 13px; text-decoration: none; }
.side-step.is-done { color: var(--text); }
.side-step.is-current { background: var(--hover); color: var(--text); font-weight: 500; }
.side-step.is-skipped { color: var(--subtle); }
.side-note { flex: none; margin-left: auto; font-size: 12px; color: var(--subtle); }
.side-more { margin-top: auto; display: flex; flex-direction: column; }
@media (hover: hover) {
  .side-link:hover, .side-step:hover, .side-search:hover { background: var(--hover); color: var(--text); }
  .side-step:hover { color: var(--text); }
}

/* Sur téléphone : les quatre rubriques en barre fixe, en bas. */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 6; height: var(--tabbar-h); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4, 1fr); background: var(--bg); border-top: 1px solid var(--line); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: 11px; }
.tab.is-on { color: var(--text); font-weight: 500; }
.tab .icon { width: 18px; height: 18px; }
.tab .side-badge { position: absolute; top: 6px; left: calc(50% + 8px); font-size: 11px; }
.tab:focus-visible { outline-offset: -3px; }
.has-tabbar .body { padding-bottom: calc(var(--tabbar-h) + 16px); }
.has-tabbar .body.has-foot { padding-bottom: calc(var(--tabbar-h) + 120px); }
.has-tabbar .foot { bottom: var(--tabbar-h); }
.has-tabbar .foot-in { padding-bottom: 12px; }

@media (min-width: 768px) {
  .tabbar { display: none; }
  .back-link.only-phone { display: none; }
  .head-steps { display: none; }
}

/* Les raccourcis du clavier : invisibles jusqu'au focus. */
.skips { position: absolute; top: 0; left: 0; z-index: 60; }
.skip-link { appearance: none; position: absolute; top: -200px; left: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.skip-link:focus-visible { top: 8px; }
#skip-action:focus-visible { left: 188px; }

/* ───────────────────────── 5. Le ticket (à partir de 1100 px) et la barre du bas (en dessous) ───────────────────────── */

.ticket { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; background: var(--surface-2); padding: 32px 28px 28px; display: flex; flex-direction: column; gap: 10px; }
:root[data-theme="dark"] .ticket { border-left: 1px solid var(--line); }
.ticket-title { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
.ticket-rows { display: flex; flex-direction: column; gap: 10px; }
.ticket-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--text); }
.ticket-row-label { min-width: 0; }
.ticket-amount { flex: none; text-align: right; }
.ticket-sep { border-top: 1px dashed var(--line-strong); margin: 6px 0; }
.ticket-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ticket-total-label { color: var(--muted); }
.ticket-total-amount { font-size: 26px; line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
.ticket-total-amount.is-over { color: var(--text); }
.ticket-soft { font-size: 12px; line-height: 1.4; color: var(--muted); }
.ticket-btn { appearance: none; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; padding: 0; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; border-radius: 6px; }
.ticket-btn:hover .ticket-row-label { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.ticket-gap.is-over, .ticket-gap.is-over .ticket-row-label { color: var(--over); }
.ticket-good { color: var(--good); }
.ticket-gain { appearance: none; align-self: flex-start; padding: 0; border: 0; background: transparent; color: var(--over); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; border-radius: 4px; }
.ticket-alert { font-size: 13px; line-height: 1.4; color: var(--over); }
.ticket-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 16px; }
.ticket-foot .btn-primary { width: 100%; white-space: normal; line-height: 1.2; }
.ticket-note { font-size: 12px; text-align: center; color: var(--subtle); }

.foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--bg); border-top: 1px solid var(--line); }
.foot-in > .grow { flex: none; }
.foot-in { max-width: calc(var(--content-w) + 2 * var(--gutter)); margin: 0 auto; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.shell .foot { left: var(--side-w); }
.shell .foot-in { padding-inline: var(--gutter); }
.ob-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ob-fig { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 16px; font-size: 13px; color: var(--muted); }
.ob-total { font-size: 18px; line-height: 1.3; font-weight: 600; color: var(--text); }
.ob-unit { color: var(--muted); margin-left: -10px; }
.ob-gap { color: var(--muted); }
.ob-gap.is-over { color: var(--over); }
.ob-link { appearance: none; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; border-radius: 4px; }
.ob-gain { appearance: none; align-self: flex-start; padding: 0; border: 0; background: transparent; color: var(--over); font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; border-radius: 4px; }
.ob-soft, .ob-made { font-size: 12px; line-height: 1.3; color: var(--muted); }
.ob-right { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ob-act { display: flex; align-items: center; gap: 8px; }
.ob-act .btn-primary { flex: 1; font-size: 14px; }
.ob-back { flex: none; min-height: 44px; display: inline-flex; align-items: center; padding: 0 8px; font-size: 14px; color: var(--muted); text-decoration: none; border-radius: 8px; }
.ob-alert { font-size: 13px; line-height: 1.35; color: var(--over); }
.ob-note { font-size: 12px; color: var(--subtle); }
@media (min-width: 768px) {
  .orderbar .foot-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 24px; }
  .ob-right { align-items: flex-end; }
  .ob-act .btn-primary { flex: none; min-width: 220px; }
  .ob-alert, .ob-note { text-align: right; max-width: 420px; }
}

/* Les confirmations : encre sur papier inversé, en bas, petites. */
.toasts { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; width: max-content; max-width: min(520px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 14px; border-radius: 8px; background: var(--ink); color: var(--on-ink); font-size: 13px; line-height: 1.35; }
.toast-text { flex: 1; min-width: 0; padding: 6px 8px 6px 0; overflow-wrap: break-word; }
.toast-undo { appearance: none; flex: none; min-height: 36px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--on-ink); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.toast-close { appearance: none; flex: none; width: 32px; height: 36px; border: 0; background: transparent; color: inherit; opacity: 0.7; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.toast-close .icon { width: 12px; height: 12px; }
.toast-undo:focus-visible, .toast-close:focus-visible { outline: 2px solid var(--on-ink); outline-offset: 0; }
@media (hover: hover) { .toast-close:hover { opacity: 1; } }
.toasts.in-foot { position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: auto; }
.toasts.over-layer { bottom: auto !important; top: calc(12px + env(safe-area-inset-top)); }
.toast-on .main > .body.has-foot { padding-bottom: 200px; }
.toast-on .view:has(.orderbar) .body.has-foot { padding-bottom: calc(220px + env(safe-area-inset-bottom)); }
.has-tabbar .toasts { bottom: calc(var(--tabbar-h) + 16px); }
.has-tabbar:has(#view > .foot) .toasts { bottom: calc(var(--tabbar-h) + 100px); }

/* ───────────────────────── 6. L'accueil (Commandes) ───────────────────────── */

.order-card { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 8px; }
.order-card .card-title { font-size: 18px; font-weight: 600; }
.order-facts { display: flex; flex-wrap: wrap; gap: 0 16px; font-size: 14px; color: var(--text); }
.order-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 12px; }
.cook-next { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; }
.cook-next .card-title { font-size: 13px; font-weight: 500; color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.cook-next-list { display: flex; flex-direction: column; }
.cook-next-list li { border-bottom: 1px solid var(--row-line); }
.co-meal-title { display: flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 500; text-decoration: none; }
.tools-link { display: inline-flex; align-items: center; min-height: 36px; font-size: 13px; color: var(--muted); text-decoration: none; }
.history { display: flex; flex-direction: column; gap: 8px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.section-title { flex: none; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.section-count { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 12px; font-size: 13px; color: var(--muted); }
.order-list { display: flex; flex-direction: column; }
.order-row { display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--row-line); color: var(--text); text-decoration: none; }
.order-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.order-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; }
.order-day { font-size: 14px; font-weight: 500; }
.order-wait { font-size: 13px; color: var(--muted); }
.order-line { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 13px; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }
.order-total { flex: none; min-width: 76px; text-align: right; font-size: 14px; }
.order-go { flex: none; color: var(--subtle); display: flex; }
.order-go .icon { width: 14px; height: 14px; }
.history > .btn { align-self: flex-start; }
.body > .btn, .body > .fold { align-self: flex-start; }
.body > .btn-quiet { margin-left: -12px; }

/* ───────────────────────── 7. Les repas ───────────────────────── */

.meals { display: flex; flex-direction: column; }
.meal { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto 112px; grid-template-areas: "photo text people cost" ". links links links" ". buy buy buy"; column-gap: 16px; row-gap: 2px; align-items: center; padding: 14px 0 8px; border-bottom: 1px solid var(--row-line); }
.meal > .meal-photo-link { grid-area: photo; align-self: start; }
.meal-text { grid-area: text; display: flex; flex-direction: column; gap: 2px; min-width: 0; align-self: start; }
.meal-title { font-size: 14px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.meal-link { color: inherit; text-decoration: none; }
@media (hover: hover) { .meal-link:hover { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; } }
.meal-meta { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 13px; color: var(--muted); }
.meal-people { grid-area: people; align-self: start; }
.meal-cost { grid-area: cost; justify-self: end; align-self: start; padding-top: 6px; text-align: right; font-size: 14px; }
.meal-links { grid-area: links; display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; margin-left: -8px; }
.meal-buy { grid-area: buy; display: flex; flex-direction: column; gap: 2px; padding: 0 0 6px; font-size: 13px; color: var(--muted); }
.meal-buy-line { font-size: 13px; line-height: 1.4; }
.meal-buy-line strong { font-weight: 500; color: var(--text); }
.meal-warn { grid-column: 1 / -1; padding-left: 12px; border-left: 2px solid var(--over); font-size: 13px; color: var(--over); }
.meal-skeleton { grid-template-areas: none; grid-template-columns: 72px 1fr; min-height: 96px; }
.meal-tools { display: flex; flex-wrap: wrap; gap: 0 4px; margin: 4px 0 0 -8px; }
.meal-note { color: var(--muted); }
.propose { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.propose .btn-primary { min-width: 220px; }
.ask { display: flex; flex-direction: column; gap: 16px; max-width: 520px; padding: 8px 0; }
.ask .card-title { font-size: 18px; font-weight: 600; }
.ask-count { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
.ask-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.leftovers-form { display: flex; flex-direction: column; gap: 8px; }
.sheet-sub { font-size: 13px; line-height: 1.45; color: var(--muted); }
.classic-list { display: flex; flex-direction: column; }
.classic-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 0; border-bottom: 1px solid var(--row-line); }
.classic-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.classic-state { flex: none; font-size: 13px; color: var(--muted); }
.rc-sub { margin: 12px 0 0; font-size: 13px; font-weight: 500; color: var(--muted); }

/* ───────────────────────── 8. La liste ───────────────────────── */

.list-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.list-filter { flex: 0 1 220px; height: 36px; }
.filters { display: flex; flex-wrap: wrap; gap: 0 20px; }
.filter { appearance: none; padding: 8px 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.filter[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--text); }
@media (hover: hover) { .filter:hover { color: var(--text); } }
.shortcuts { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; font-size: 12px; color: var(--muted); }
.shortcuts::before { content: "Aller à"; margin-right: 6px; }
.shortcut { appearance: none; display: inline-flex; gap: 6px; padding: 4px 6px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font-size: 12px; cursor: pointer; }
.shortcut-count { color: var(--muted); }
@media (hover: hover) { .shortcut:hover { background: var(--hover); } }
.list-groups { display: flex; flex-direction: column; gap: 8px; }
.list-group { scroll-margin-top: 16px; }
.group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.group-title { font-size: 13px; font-weight: 500; color: var(--muted); }
.group-sum { font-size: 13px; color: var(--muted); }
.lines { display: flex; flex-direction: column; }
.line { display: grid; grid-template-columns: var(--thumb) minmax(0, 1fr) auto 76px 68px; column-gap: 14px; align-items: center; min-height: 64px; padding: 8px 0; border-bottom: 1px solid var(--row-line); }
.line-thumb { appearance: none; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: calc(var(--thumb) / 6); line-height: 0; }
.line-name { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.line-title { appearance: none; padding: 0; border: 0; background: transparent; text-align: left; font-size: 14px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; cursor: pointer; }
@media (hover: hover) { .line-title:hover { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; } }
.line-sub { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 12px; line-height: 1.35; color: var(--subtle); overflow-wrap: anywhere; }
.line-offer { appearance: none; padding: 0; border: 0; background: transparent; text-align: left; font-size: 12px; line-height: 1.35; color: var(--good); cursor: pointer; }
span.line-offer { cursor: default; }
@media (hover: hover) { button.line-offer:hover { text-decoration: underline; text-underline-offset: 3px; } }
.line-qty { justify-self: end; }
.line-price { text-align: right; font-size: 14px; }
.line-act { appearance: none; padding: 6px 0 6px 8px; border: 0; background: transparent; color: var(--subtle); font-size: 13px; text-align: right; cursor: pointer; border-radius: 6px; }
@media (hover: hover) { .line-act:hover { color: var(--text); } }
.line.is-off .photo { opacity: 0.3; }
.line.is-off .line-title, .line.is-off .line-price { color: var(--subtle); text-decoration: line-through; text-decoration-thickness: 1px; }
.line.is-off .line-sub { text-decoration: none; }
.fold { display: flex; flex-direction: column; gap: 2px; }
.fold > .btn { align-self: flex-start; margin-left: -12px; color: var(--muted); }
.fold-list { padding: 4px 0 8px 4px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.fold-links { display: flex; flex-wrap: wrap; gap: 0 4px; margin-top: 8px; }

/* Une liste de produits en lignes (offres du carnet, favoris à rappeler) */
.promo-list { display: flex; flex-direction: column; }
.promo-line { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--row-line); }
.promo-line.on { background: transparent; }
.promo-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.promo-detail { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.promo-side { flex: none; display: flex; align-items: center; gap: 12px; }
.promo-save { font-size: 14px; white-space: nowrap; color: var(--good); }
.promo-done { font-size: 12px; color: var(--good); }
.promo-open { appearance: none; position: static; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 1px; align-items: flex-start; }
.promo-open::after { content: ""; position: absolute; inset: 0; }
.promo-open:focus-visible { outline: none; }
.promo-open:focus-visible::after { outline: var(--ring); outline-offset: 2px; border-radius: 6px; }
.promo-cmp { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: var(--muted); }
.promo-cmp .icon { width: 11px; height: 11px; }
.promo-side .btn { position: relative; z-index: 2; }
.promos-note { font-size: 13px; color: var(--muted); }
.result-name { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.result-meta { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 12px; color: var(--muted); }
.result-price { flex: none; font-size: 14px; }
.alt-gap { font-size: 12px; color: var(--muted); white-space: nowrap; }
.alt-gap.less { color: var(--good); }
.alt-gap.more { color: var(--over); }

/* ───────────────────────── 9. L'envoi ───────────────────────── */

.checks { display: flex; flex-direction: column; gap: 12px; }
.check { display: flex; flex-direction: column; gap: 8px; }
.check-head { display: flex; align-items: baseline; gap: 8px; }
.check-mark { flex: none; display: inline-flex; color: var(--muted); }
.check-mark .icon { width: 14px; height: 14px; vertical-align: -2px; }
.check-text { font-size: 14px; line-height: 1.4; }
.check.is-warn { padding-left: 12px; border-left: 2px solid var(--over); }
.check.is-warn .check-text { color: var(--over); font-weight: 500; }
.check-meal { display: flex; flex-direction: column; }
.check-meal-title { font-size: 13px; font-weight: 500; color: var(--muted); padding-top: 4px; }
.check-rows { display: flex; flex-direction: column; }
.check-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 4px 0; min-height: 40px; border-bottom: 1px solid var(--row-line); }
.check-row-text { flex: 1 1 200px; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.check-row-actions { display: flex; gap: 0; flex: none; }
.over-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 12px; padding-left: 12px; border-left: 2px solid var(--over); color: var(--over); }
.over-text { font-size: 14px; font-weight: 500; }
.over-link { appearance: none; padding: 0; border: 0; background: transparent; min-height: 32px; display: inline-flex; align-items: center; font-size: 13px; color: var(--over); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; border-radius: 4px; }
.delivery { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; }
.delivery-title { font-size: 13px; font-weight: 500; color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.delivery-line { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.delivery-text { display: flex; align-items: baseline; gap: 16px; font-size: 14px; }
.delivery-label { font-size: 13px; color: var(--muted); }
.slots { display: flex; flex-direction: column; }
.slot { appearance: none; display: grid; grid-template-columns: minmax(0, 1.4fr) 110px minmax(0, 1fr); align-items: center; gap: 16px; min-height: 44px; padding: 8px 12px; margin: 0 -12px; border: 0; border-radius: 8px; background: transparent; color: var(--text); text-align: left; cursor: pointer; touch-action: manipulation; }
@media (hover: hover) { .slot:hover:not(:disabled) { background: var(--hover); } }
.slot.on { background: var(--hover); }
.slot:disabled { color: var(--subtle); cursor: not-allowed; }
.slot-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.slot-mark { flex: none; display: inline-flex; width: 14px; height: 14px; }
.slot-line .icon { width: 14px; height: 14px; color: var(--text); }
.slot-day { font-size: 14px; font-weight: 500; }
.slot-hours { font-size: 14px; }
.slot-hint { text-align: right; font-size: 12px; color: var(--muted); }
.delivery > .btn { align-self: flex-start; margin-left: -12px; color: var(--muted); }
.warn-box { display: flex; flex-direction: column; gap: 4px; padding-left: 12px; border-left: 2px solid var(--over); font-size: 14px; line-height: 1.4; }
.warn-title { font-size: 13px; font-weight: 500; color: var(--over); }

/* ───────────────────────── 10. Le résultat ───────────────────────── */

.watch { display: flex; flex-direction: column; gap: 4px; padding-left: 12px; border-left: 2px solid var(--over); }
.watch-title { font-size: 13px; font-weight: 500; color: var(--over); }
.watch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 0; border-bottom: 1px solid var(--row-line); }
.watch-row:last-child { border-bottom: 0; }
.watch-text { flex: 1 1 220px; min-width: 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.watch-text strong { font-weight: 500; }
.watch-sep { display: none; }
.watch-acts { flex: none; display: flex; align-items: center; margin-left: auto; }
.result-notes { display: flex; flex-direction: column; }
.result-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; min-height: 40px; padding: 4px 0; border-bottom: 1px solid var(--row-line); font-size: 14px; }
.result-note-text { flex: 1 1 220px; color: var(--muted); }
.result-gap { color: var(--muted); }
.pay-card { display: flex; flex-direction: column; gap: 8px; padding: 8px 0; }
.pay-title { font-size: 18px; font-weight: 600; line-height: 1.25; }
.pay-steps { padding-left: 20px; list-style: decimal; display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.45; }
.pay-steps li::marker { color: var(--muted); }
.pay-card .card-text { color: var(--text); }
.pay-card.pay-missing { padding-left: 12px; border-left: 2px solid var(--over); }
.pay-card.pay-missing .card-title { color: var(--over); }
.pay-card.pay-pending .card-text { font-weight: 500; }
.result-actions-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; margin-left: -12px; }
.pret-cart { display: flex; flex-direction: column; gap: 8px; }
.cart-list { display: flex; flex-direction: column; }
.cart-line { grid-template-columns: var(--thumb) minmax(0, 1fr) 76px auto; }
.cart-ctl { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 0 4px; }
.line-warn { font-size: 12px; color: var(--over); }
.cart-ask { grid-column: 1 / -1; justify-content: flex-start; padding: 4px 0 4px 12px; border-left: 2px solid var(--over); }
.cart-ask-text { flex: 1 1 100%; font-size: 13px; line-height: 1.4; }

/* ───────────────────────── 11. Les panneaux : fond blanc, rayon 12, ombre douce, en-tête et pied fixes, contenu en lignes ───────────────────────── */

.overlay { position: relative; z-index: 20; }
.sheet-wrap, .drawer-wrap, .search-wrap { position: fixed; inset: 0; z-index: 30; }
.sheet-backdrop, .drawer-backdrop, .search-backdrop { position: absolute; inset: 0; background: var(--backdrop); }

/* Le petit panneau (budget, pistes, restes, carnet, avis, produits écartés) : en bas sur téléphone, au centre sinon. */
.sheet-wrap { z-index: 20; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); margin: 0 auto; background: var(--bg); border-radius: 12px 12px 0 0; padding: 20px 20px calc(8px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; overflow: hidden; box-shadow: var(--shadow); }
.sheet > * { flex: none; }
.sheet > .sheet-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sheet-title { font-size: 16px; font-weight: 600; }
.sheet-head { display: flex; flex-direction: column; gap: 4px; }
.sheet-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sheet-col { display: flex; flex-direction: column; gap: 12px; }
.sheet-list { display: flex; flex-direction: column; max-height: 50vh; overflow-y: auto; }
.sheet > .btn { align-self: flex-end; margin: 0 -8px 0 0; border-top: 0; }
.sheet::after { content: none; }
.gain-line { display: flex; flex-wrap: wrap; gap: 0 16px; font-size: 14px; font-weight: 500; }
.gain-state { font-size: 13px; color: var(--muted); }
.tips-list { display: flex; flex-direction: column; }
.tip { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--row-line); }
.tip-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tip-title { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.tip-detail { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 12px; color: var(--muted); }
.tip-detail strong { font-weight: 500; color: var(--text); white-space: nowrap; }
.tip-act { flex: none; display: flex; align-items: center; gap: 4px; margin-left: auto; }
.tip.is-done .photo-pill { opacity: 0.4; }
.tip.is-done .tip-title { color: var(--subtle); text-decoration: line-through; text-decoration-thickness: 1px; }
.budget-quick { display: flex; flex-direction: column; gap: 12px; }
.euro-box { height: 40px; min-width: 92px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--bg); display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 14px; cursor: text; }
.euro-box:focus-within { outline: var(--ring); outline-offset: 0; }
.euro-input { appearance: none; width: 64px; border: 0; background: transparent; color: var(--text); font: inherit; text-align: right; padding: 0; outline: none; }
.euro-unit { color: var(--muted); }
.budget-quick .euro-box { flex: 1; }
.field-error { font-size: 13px; color: var(--over); }
.field-error:empty { display: none; }
.form-error { font-size: 13px; color: var(--over); padding-left: 12px; border-left: 2px solid var(--over); }

/* Le grand panneau latéral : fiche d'un produit, d'un repas, comparaison, remplacement. */
.drawer-wrap { display: flex; justify-content: flex-end; }
.drawer { position: relative; width: 100%; height: 100%; background: var(--bg); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; box-shadow: var(--shadow); overflow: hidden; }
.sheet, .search-panel { border: 1px solid var(--line); }
.drawer-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 8px 8px 20px; border-bottom: 1px solid var(--line); }
.drawer-kicker { font-size: 13px; font-weight: 500; color: var(--muted); }
.drawer-back { appearance: none; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 10px 0 6px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer; }
.drawer-scroll { overflow-y: auto; overscroll-behavior: contain; }
.drawer .head { padding: 20px 20px 0; }
.drawer .body { padding: 16px 20px 28px; }
.drawer .foot { position: static; border-top: 1px solid var(--line); }
.drawer .foot-in { max-width: none; padding-inline: 20px; }

/* La recherche : une fenêtre au-dessus de la page. */
.search-panel { position: fixed; inset: 0; z-index: 30; background: var(--bg); display: flex; flex-direction: column; max-width: 640px; margin: 0 auto; box-shadow: var(--shadow); }
.search-wrap .search-panel { z-index: 1; }
.search-top { padding: 12px 20px 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.search-bar { display: flex; align-items: center; gap: 8px; }
.search-title { font-size: 16px; font-weight: 600; flex: 1; }
.kbd-esc { display: none; }
.search-form { display: flex; gap: 8px; align-items: center; }
.search-body { flex: 1; overflow-y: auto; padding: 4px 20px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.results { display: flex; flex-direction: column; }
.result { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--row-line); }
.result > .result-error, .result > .result-done { flex: 1 1 100%; }
.result-main { appearance: none; display: flex; flex: 1 1 240px; gap: 12px; align-items: center; min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; border-radius: 6px; }
.result-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.result-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.result-done { font-size: 13px; color: var(--good); }
.result-error { font-size: 13px; color: var(--over); padding-left: 12px; border-left: 2px solid var(--over); }

/* Dans votre cuisine (lot 18, réglages) : des cases à cocher en ligne. */
.utensils { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.utensil { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.utensil-box { width: 18px; height: 18px; margin: 0; accent-color: var(--text); }

/* Trois idées quand on change un repas (lot 18) : des lignes, un appui remplace. */
.ideas { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.idea-row { border-bottom: 1px solid var(--row-line); }
.idea { appearance: none; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 0; border: 0; border-radius: 8px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.idea:hover:not(:disabled) { background: var(--hover); }
.idea:disabled { opacity: .6; cursor: default; }
.idea-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.idea-title { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.idea-meta { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 13px; color: var(--muted); }
.idea-more { padding-top: 8px; }

/* Coller une liste (lot 18) : le second onglet de la recherche, des lignes comme les résultats. */
.search-top .filters { margin: 0; }
.paste-text { width: 100%; min-height: 160px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; line-height: 1.45; resize: vertical; }
.paste-text::placeholder { color: var(--subtle); }
.paste-text:focus-visible { outline: var(--ring); outline-offset: 0; }
.paste-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 4px; }
.paste-list { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.paste-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--row-line); }
.paste-line.is-off .paste-main { opacity: .6; }
.paste-check { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--text); }
.paste-main { display: flex; flex: 1 1 220px; gap: 12px; align-items: center; min-width: 0; }
.paste-others { flex: 1 1 100%; display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0 0 0 30px; }
.paste-option { appearance: none; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.paste-option:hover, .paste-option.is-on { background: var(--hover); }
.paste-said { display: flex; flex-direction: column; gap: 2px; padding-top: 8px; }

/* La fiche d'un produit */
.pf { display: flex; flex-direction: column; padding-bottom: 24px; }
.pf-hero { position: relative; display: flex; justify-content: center; padding: 20px; }
.pf-promo { position: absolute; top: 12px; left: 20px; display: inline-flex; align-items: center; gap: 4px; max-width: calc(100% - 40px); font-size: 12px; color: var(--good); }
.pf-promo .icon { width: 12px; height: 12px; }
.pf-head { padding: 16px 20px 4px; display: flex; flex-direction: column; gap: 2px; }
.pf-name { font-size: 18px; line-height: 1.25; font-weight: 600; overflow-wrap: anywhere; }
.pf-unit { font-size: 13px; color: var(--muted); }
.pf-price { margin-top: 8px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; }
.pf-price-big { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }
.pf-price-unit { font-size: 13px; color: var(--muted); }
.pf-notice { margin: 12px 20px 0; padding-left: 12px; border-left: 2px solid var(--line-strong); font-size: 13px; line-height: 1.45; color: var(--muted); }
.pf-allergy { margin: 12px 20px 0; padding-left: 12px; border-left: 2px solid var(--over); font-size: 14px; line-height: 1.4; font-weight: 500; color: var(--over); }
.pf-block { margin: 12px 20px 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.pf-block-flat { margin: 8px 0 0; padding: 0; border: 0; }
.pf-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; }
.pf-row-text { flex: 1 1 160px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pf-strong { font-size: 14px; font-weight: 500; }
.pf-soft { font-size: 13px; line-height: 1.45; color: var(--muted); }
.pf-compared { font-size: 12px; color: var(--muted); }
.pf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.pf-actions .btn-primary { flex: 1 1 160px; }
.pf-sec { margin: 20px 20px 0; display: flex; flex-direction: column; gap: 8px; }
.pf-sec-title { font-size: 13px; font-weight: 500; color: var(--muted); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.pf-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); }
.pf-facts dt, .pf-facts dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--row-line); }
.pf-facts dt { padding-right: 20px; font-size: 13px; color: var(--muted); }
.pf-facts dd { text-align: right; font-size: 14px; overflow-wrap: anywhere; }
.pf-text { font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.pf-allergens { display: flex; flex-direction: column; gap: 4px; }
.pf-al { font-size: 14px; line-height: 1.45; }
.pf-al-contains { padding-left: 12px; border-left: 2px solid var(--over); color: var(--over); font-weight: 500; }
.pf-al-may { color: var(--muted); }
.pf-al-none, .pf-al-unknown { color: var(--muted); }
.pf-skeleton { margin: 16px 20px 0; display: flex; flex-direction: column; gap: 10px; }
.pf-replaced { display: flex; flex-direction: column; gap: 6px; }
.pf .result-error, .pf .result-done { margin: 12px 20px 0; }
.pf-row .stepper { flex: none; }
.pf > .pf-soft, .pf > .alt-list, .pf > .alt-ask, .pf > .btn { margin-left: 20px; margin-right: 20px; }
.pf > .pf-soft { margin-top: 12px; }
.pf > .btn { align-self: flex-start; margin-top: 8px; margin-left: 12px; }
.alt-list { display: flex; flex-direction: column; margin-top: 8px; }
.alt-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--row-line); }
.alt-pick { appearance: none; flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 8px; margin: 0 -8px; border: 0; border-radius: 8px; background: transparent; color: var(--text); text-align: left; cursor: pointer; touch-action: manipulation; }
.alt-pick.on { background: var(--hover); }
.alt-pick:disabled { color: var(--subtle); cursor: not-allowed; }
.alt-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.alt-row-direct { flex-direction: column; align-items: stretch; gap: 0; }
.alt-info { cursor: default; }
.alt-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 4px; padding-bottom: 6px; }
.alt-ask { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-left: 12px; border-left: 2px solid var(--line-strong); }
.drawer-alternatives .pf > .result-error { margin: 12px 20px 0; }

/* Comparer deux produits */
.cmp { padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 20px; }
.cmp-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.cmp-col { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cmp-label { font-size: 13px; color: var(--muted); }
.cmp-photo { display: flex; justify-content: center; padding: 4px 0 12px; }
.cmp-col .photo-hero { width: min(100%, 140px); }
.cmp-name { font-size: 15px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.cmp-unit { font-size: 13px; color: var(--muted); }
.cmp-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.cmp-price-big { font-size: 20px; font-weight: 600; }
.cmp-price-unit { font-size: 13px; color: var(--muted); }
.cmp-promo { display: inline-flex; align-items: center; gap: 4px; color: var(--good); font-size: 12px; }
.cmp-promo .icon { width: 11px; height: 11px; }
.cmp-bought { font-size: 13px; color: var(--muted); }
.cmp-col .pf-allergy, .cmp-col .pf-notice { margin: 4px 0 0; }
.cmp-skeleton { margin: 6px 0 0; }
.cmp-sec { display: flex; flex-direction: column; gap: 6px; }
.cmp-sec-title { font-size: 13px; font-weight: 500; color: var(--muted); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.cmp-sec-diff .cmp-sec-title { color: var(--text); }
.cmp-diff { display: flex; flex-direction: column; gap: 6px; }
.cmp-diff-item { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.cmp-diff-item.warn { padding-left: 12px; border-left: 2px solid var(--over); color: var(--over); font-weight: 500; }
.cmp-none { color: var(--muted); }
/* Valeurs nutritionnelles : des lignes, des filets d'un pixel, le libellé à gauche, les valeurs à droite en chiffres de même largeur. Aucune couleur. */
.fact-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.ft-caption { caption-side: top; text-align: left; font-size: 13px; color: var(--muted); padding-bottom: 4px; }
.fact-table th, .fact-table td { padding: 8px 0; border-bottom: 1px solid var(--row-line); vertical-align: baseline; }
.fact-table thead th, .fact-table thead td { font-size: 12px; font-weight: 400; color: var(--muted); border-bottom: 1px solid var(--line); }
.ft-label { text-align: left; font-weight: 400; font-size: 13px; color: var(--muted); padding-right: 12px; overflow-wrap: anywhere; }
.ft-val { text-align: right; white-space: nowrap; padding-left: 12px; }
th.ft-val { white-space: normal; max-width: 40vw; }
.ft-none { color: var(--muted); }
.cmp-nut-note { font-size: 13px; }
.cmp-nut-cols { gap: 16px; }
.pf-fold { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.pf-fold-state { font-size: 13px; color: var(--muted); }
.pf-nutrition .fact-table { margin-top: 4px; }
.cmp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 12px 20px; }
.cmp-actions .btn-primary { flex: 1 1 160px; }
.cmp-swapped { padding: 10px 20px 0; font-size: 13px; color: var(--good); }
.cmp-error { padding: 10px 20px 0; }
.drawer-recipe .head { padding-top: 20px; }

/* Les jauges (Budget) : fines, neutres. */
.gauge { height: 4px; border-radius: 2px; overflow: hidden; background: var(--hover); }
.gauge-svg { display: block; width: 100%; height: 4px; }
.gauge-fill { fill: var(--muted); }
.gauge-over { fill: var(--over); }
/* ───────────────────────── 12. Les largeurs ───────────────────────── */

/* En dessous de 640 px : la liste et les repas passent sur deux lignes, la quantité et le prix sous le nom. */
@media (max-width: 899px) {
  .line { grid-template-columns: var(--thumb) minmax(0, 1fr) auto; grid-template-areas: "thumb name act" "thumb qty price"; row-gap: 2px; column-gap: 12px; padding: 10px 0; }
  .line > .line-thumb { grid-area: thumb; align-self: start; }
  .line > .line-name { grid-area: name; }
  .line > .line-qty { grid-area: qty; justify-self: start; margin-left: -8px; }
  .line > .line-price { grid-area: price; }
  .line > .line-act { grid-area: act; align-self: start; }
  .cart-line { grid-template-columns: var(--thumb) minmax(0, 1fr) auto; grid-template-areas: "thumb name price" "thumb ctl ctl"; }
  .cart-line > .cart-ctl { grid-area: ctl; justify-content: flex-start; margin-left: -8px; }
  .cart-line > .cart-ask { grid-column: 1 / -1; }
  .cart-line > .line-price { grid-area: price; }
  .meal { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "photo text text" "people people cost" "links links links" "buy buy buy"; row-gap: 4px; column-gap: 12px; }
  .meal-photo-card, .meal-photo-row { width: 56px; height: 56px; font-size: 22px; }
  .meal-people { justify-self: start; margin-left: -8px; }
}
@media (max-width: 639px) {
  .list-filter { flex: 1 1 100%; }
  .field { font-size: 16px; }
  .ask-actions .btn-primary { flex: 1 1 100%; }
  .head-row { flex-wrap: wrap; }
}
@media (max-width: 767px) {
  .ob-made { display: none; } /* de quoi le total est fait : dans les sous-totaux de la liste ; la place du bas de l'écran est pour le total et le bouton */
  .ob-unit { display: none; }
  .ob-fig { gap: 0 12px; }
  .foot-in { gap: 6px; }
}

/* Sheet au centre dès le grand écran ; panneaux latéraux flottants (rayon 12, à 12 px du bord). */
@media (min-width: 768px) {
  .sheet-wrap { align-items: center; justify-content: center; }
  .sheet { border-radius: 12px; max-width: 460px; padding-bottom: 12px; }
  .drawer-wrap { padding: 12px; }
  .drawer { width: min(520px, 100%); border-radius: 12px; border: 1px solid var(--line); }
  .drawer-recipe { width: min(640px, 100%); }
  .drawer-compare { width: min(880px, 100%); }
  .cmp-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
  .cmp-col + .cmp-col { padding-left: 24px; border-left: 1px solid var(--line); }
  .cmp-nut-cols { gap: 0 24px; }
  .cmp-nut-one + .cmp-nut-one { padding-left: 24px; border-left: 1px solid var(--line); }
  .search-wrap .search-panel { position: absolute; inset: 7vh auto auto 50%; transform: translateX(-50%); width: min(640px, calc(100% - 48px)); max-width: none; max-height: 84vh; margin: 0; border-radius: 12px; overflow: hidden; }
  .kbd-esc { display: inline-flex; }
  .field { font-size: 14px; }
}
@keyframes panel-in { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheet-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .drawer { animation: sheet-in 0.16s ease-out; }
  .sheet { animation: sheet-in 0.16s ease-out; }
  @media (min-width: 768px) { .drawer { animation: panel-in 0.16s ease-out; } }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Sur un téléphone, le panneau latéral prend tout l'écran. */
@media (max-width: 767px) {
  .drawer-wrap { padding: 0; }
  .drawer { border-radius: 0; }
  .drawer .head { padding-top: 16px; }
  .search-panel { border-radius: 0; }
}

/* ───────────────────────── 13. Les rubriques : Produits, Recettes, fiche d'un repas, cuisine, Budget, Réglages, commandes passées ─────────────────────────
   Les mêmes lignes et les mêmes filets que la liste : une vignette, un nom et sa précision, un montant ou un geste à droite. */

.is-good { color: var(--good); }
.is-over { color: var(--over); }

/* Une liste en lignes. */
.items { display: flex; flex-direction: column; }
.item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 14px; align-items: center; min-height: 64px; padding: 8px 0; border-bottom: 1px solid var(--row-line); }
.item-small { min-height: 52px; column-gap: 12px; }
.item-big { align-items: start; column-gap: 16px; padding: 14px 0; }
.item-qty { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.item.is-open { margin-inline: -12px; padding-inline: 12px; border-radius: 8px; border-bottom-color: transparent; background: var(--hover); }
.item-thumb { appearance: none; padding: 0; border: 0; background: transparent; cursor: pointer; line-height: 0; border-radius: calc(var(--thumb) / 6); }
.item-main { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.item-title, .item-name { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.item-title { appearance: none; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.item-title a { text-decoration: none; }
@media (hover: hover) { .item-title:hover, .item-title a:hover { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; } }
.item-sub { display: flex; flex-wrap: wrap; gap: 0 10px; margin: 0; font-size: 12px; line-height: 1.35; color: var(--subtle); overflow-wrap: anywhere; }
.item-amount { text-align: right; font-size: 14px; min-width: 64px; }
.item-qty-col { min-width: 32px; text-align: right; font-size: 13px; color: var(--muted); }
.item-side { flex: none; display: flex; align-items: center; gap: 8px; }
.item-warn { margin: 2px 0; padding-left: 10px; border-left: 2px solid var(--over); font-size: 12px; line-height: 1.4; color: var(--over); }
.item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; margin: 2px 0 0 -10px; }
.item-actions .btn { height: 32px; padding: 0 10px; font-size: 13px; }
.item.is-cooked .item-title { color: var(--subtle); }
.rc-details { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; font-size: 14px; line-height: 1.5; }
.rc-sub { margin: 8px 0 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.rc-ings, .rc-steps { display: flex; flex-direction: column; gap: 2px; padding-left: 18px; }
.rc-ings { list-style: disc; }
.rc-steps { list-style: decimal; }
.rc-steps li::marker, .rc-ings li::marker { color: var(--subtle); }
.state-text { padding: 0 10px 0 0; font-size: 13px; color: var(--good); }
.item-big > .meal-photo-link, .item-big > .meal-photo { margin-top: 2px; }

/* Produits : « Tout comparer » et sa phrase ; les filtres et la recherche sont ceux de la liste. */
.compare-line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.compare-line .btn { margin-left: -12px; }
.compare-line .note { flex: 0 1 auto; }
.review { border-bottom: 1px solid var(--row-line); }
.review > .item { border-bottom: 0; }
/* Une proposition : sa phrase (le fait, puis le gain en vert sombre), puis deux gestes sans fond alignés à droite. Pas de carte, pas de filet coloré. */
.offer { margin: 0 0 12px calc(var(--thumb) + 14px); display: flex; flex-direction: column; gap: 2px; }
.offer-fact, .offer-gain, .offer-note { margin: 0; font-size: 13px; line-height: 1.45; }
.offer-gain { color: var(--good); }
.offer-note { color: var(--muted); }
.offer-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0 2px; }
.offer-ask { font-size: 13px; color: var(--muted); margin-right: 6px; }
.offer-others { display: flex; flex-direction: column; margin: 0 0 12px calc(var(--thumb) + 14px); }
.offer-others > .offer { margin: 0; padding-top: 10px; border-top: 1px solid var(--row-line); }
.offer-others > .offer + .offer { margin-top: 10px; }
.review > .btn-quiet { margin: -8px 0 8px calc(var(--thumb) + 6px); height: 32px; font-size: 13px; }
.legend-toggle { appearance: none; padding: 0; border: 0; background: transparent; font: inherit; cursor: pointer; text-align: left; }
.legend-toggle::after { content: " ▸"; }
.legend-toggle[aria-expanded="true"]::after { content: " ▾"; }
@media (hover: hover) { .legend-toggle:hover { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; } }
.compare-note { margin: 4px 0 0; }
.promos-sub { font-size: 13px; color: var(--muted); }
.promos { display: flex; flex-direction: column; gap: 8px; }

/* Les avis, le cœur, la réservation. */
.opinions { font-size: 13px; line-height: 24px; color: var(--muted); }
.opinion { appearance: none; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 13px; line-height: 24px; cursor: pointer; touch-action: manipulation; }
@media (hover: hover) { .opinion:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; } }
.opinion:disabled { cursor: not-allowed; }
.opinion.vote-up { color: var(--good); }
.opinion-link { font-size: 13px; color: var(--muted); }
.heart { appearance: none; flex: none; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--subtle); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; touch-action: manipulation; }
.heart .icon { width: 18px; height: 18px; stroke-width: 1.6; }
.heart.on { color: var(--text); }
@media (hover: hover) { .heart:hover:not(:disabled) { background: var(--hover); color: var(--text); } }
.heart:disabled { opacity: 0.4; cursor: not-allowed; }

/* La fiche d'un repas. */
.fiche-head { gap: 12px; }
.fiche-id { display: flex; gap: 16px; align-items: center; }
.fiche-id h1 { overflow-wrap: anywhere; }
.fiche-parts-text { font-size: 14px; font-weight: 500; }
.meal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.meal-actions { display: flex; align-items: center; gap: 0 2px; }
.fiche-sec { display: flex; flex-direction: column; }
.fiche-sec .section-head { margin-bottom: 2px; }
.fiche-sec .note { padding: 8px 0 0; }
.rc-fiche-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--row-line); }
.rc-fiche-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; }
.rc-fiche-actions > .btn:first-child { margin-left: -12px; }
.rc-fiche-row > .btn { margin-right: -12px; }
.rated-down { padding: 8px 0 0 12px; border-left: 2px solid var(--line-strong); font-size: 13px; color: var(--muted); }
.meal-leftovers { font-size: 13px; color: var(--muted); }
.ing-list { display: flex; flex-direction: column; }
.ing-list > li { border-bottom: 1px solid var(--row-line); }
.ing, .ing-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 0; color: var(--text); }
.ing-btn { appearance: none; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; touch-action: manipulation; }
.ing-btn:disabled { cursor: not-allowed; }
.ing-qty { flex: none; width: 76px; font-size: 13px; color: var(--muted); }
.ing-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ing-name { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.ing-sub { font-size: 12px; color: var(--subtle); }
.ing.is-off .ing-name, .ing-btn.is-off .ing-name { color: var(--muted); font-weight: 400; }
.ing-item { display: flex; align-items: center; gap: 8px; }
.ing-item .ing-btn { flex: 1; min-width: 0; }
.ing-box, .opt-box { flex: none; width: 18px; height: 18px; border: 1px solid var(--subtle); border-radius: 4px; background: var(--bg); color: var(--on-ink); display: flex; align-items: center; justify-content: center; }
.ing-box.on, .opt.on .opt-box { background: var(--ink); border-color: var(--ink); }
.ing-box .icon, .opt-box .icon { width: 12px; height: 12px; }
.step-list { display: flex; flex-direction: column; }
.step-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--row-line); }
.step-num { flex: none; width: 24px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.step-text { font-size: 14px; line-height: 1.55; }
.info-btn { appearance: none; flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.info-btn .icon { width: 16px; height: 16px; }

/* Le mode cuisine : du grand texte calme sur le fond de la page, une étape à la fois. */
body.cooking .page { max-width: 880px; }
.cook-head { padding: 16px 20px 0; display: flex; flex-direction: column; gap: 12px; }
.cook-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cook-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-size: 14px; color: var(--muted); text-decoration: none; }
.cook-awake { font-size: 12px; color: var(--subtle); }
.cook-progress { display: flex; gap: 4px; }
.cook-seg { flex: 1; height: 3px; border-radius: 2px; background: var(--line); }
.cook-seg.on { background: var(--ink); }
.cook-line { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 13px; color: var(--muted); }
[data-screen="cuisine"] { padding: 28px 20px 0; gap: 24px; }
.body[data-screen="cuisine"].has-foot { padding-bottom: 120px; }
.cook-text { max-width: 28ch; font-size: 30px; line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.cook-timer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cook-timer-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cook-timer-label { font-size: 13px; color: var(--muted); }
.cook-timer-label.is-done { font-size: 14px; font-weight: 600; color: var(--text); }
.cook-timer-time { font-size: 40px; line-height: 1.1; font-weight: 600; letter-spacing: -0.01em; }
.cook-soft { font-size: 13px; line-height: 1.45; color: var(--muted); }
.cook-for { display: flex; flex-direction: column; }
.cook-chips { display: flex; flex-direction: column; }
.cook-chip { padding: 10px 0; border-bottom: 1px solid var(--row-line); font-size: 14px; }
.cook-remind { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding-left: 12px; border-left: 2px solid var(--line-strong); font-size: 13px; color: var(--muted); text-decoration: none; }
.cook-remind strong { font-weight: 600; color: var(--text); }
.cook-remind-time { font-size: 18px; }
.cook-remind.is-done { border-left-color: var(--over); color: var(--text); }
.cook-ask { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.cook-ask-title { font-size: 18px; font-weight: 600; }
.cook-ask-row { display: flex; align-items: center; gap: 12px; }
.cook-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--bg); border-top: 1px solid var(--line); }
.cook-foot-in { max-width: 880px; margin: 0 auto; padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); display: flex; gap: 8px; }
.cook-foot-in .btn-primary { flex: 1; }
@media (min-width: 768px) {
  .cook-head { padding: 24px 20px 0; }
  .cook-text { font-size: 40px; line-height: 1.25; }
  .cook-timer-time { font-size: 56px; }
  .cook-foot-in .btn-primary { flex: none; min-width: 240px; margin-left: auto; }
}

/* Budget : les chiffres sur une ligne, sans cadres ; des barres fines ; des lignes. */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px 28px; padding: 4px 0 8px; }
@media (min-width: 900px) { .figures { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px 24px; } }
.figure { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.figure-label { font-size: 13px; color: var(--muted); }
.figure-value { font-size: 26px; line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
.figure-sub { font-size: 12px; line-height: 1.4; color: var(--subtle); }
.figure-sub.is-soft { font-size: 13px; color: var(--muted); }
.figure-link { font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.bd-block { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.bd-bar { display: flex; flex-direction: column; gap: 6px; }
.bd-bar-head { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; gap: 12px; font-size: 14px; }
.bd-bar-amount, .bd-bar-share { text-align: right; }
.bd-bar-share { color: var(--muted); }
.bd-open { align-self: flex-start; margin-left: -12px; }
.bd-older { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.bd-older > .btn { margin-left: -12px; }

/* Réglages et profils : des groupes séparés par des filets, le libellé à gauche, le réglage à droite. */
.set { display: flex; flex-direction: column; margin-bottom: 20px; }
.pair { appearance: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; width: 100%; min-height: 52px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--row-line); background: transparent; color: var(--text); text-align: left; text-decoration: none; }
.pair-text { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pair-name { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; text-decoration: none; }
.pair-hint { font-size: 12px; line-height: 1.4; color: var(--muted); }
.pair-facts { display: flex; flex-wrap: wrap; gap: 0 10px; }
.pair-val { font-size: 13px; color: var(--muted); }
.pair-go { display: flex; color: var(--subtle); }
.pair-go .icon { width: 14px; height: 14px; }
a.pair, button.pair { cursor: pointer; flex-wrap: nowrap; }
a.pair > .pair-name, button.pair > .pair-name { flex: 1; }
@media (hover: hover) { a.pair:hover .pair-val, button.pair:hover .pair-val, a.pair:hover .pair-go, button.pair:hover .pair-go { color: var(--text); } }
.pair-person { justify-content: flex-start; gap: 12px; }
.pair-person .pair-text { flex: 1; }
.person-photo { flex: none; width: 36px; height: 36px; border-radius: 6px; background: var(--thumb-bg); color: var(--ph-text); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; }
.person-photo.big { width: var(--thumb); height: var(--thumb); border-radius: 8px; font-size: 19px; }
.set-add { align-self: flex-start; margin: 4px 0 0 -12px; }
.set .field-error { padding-top: 6px; }
.profile-head { gap: 12px; }
.profile-id { display: flex; align-items: center; gap: 12px; }
.name-field { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 18px; font-weight: 600; }
.name-field:focus-visible { outline: var(--ring); outline-offset: 0; }
.prof { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 24px; }
.opt { appearance: none; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--text); font-size: 14px; text-align: left; cursor: pointer; touch-action: manipulation; }
.opt-more { grid-column: 1 / -1; justify-self: start; margin-left: -12px; }
.taste-list { display: flex; flex-direction: column; }
.taste-add-btn { align-self: flex-start; margin: 4px 0 0 -12px; }
.taste-add { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; }
.taste-form { display: flex; gap: 8px; align-items: center; }
.nav-row { display: flex; align-items: center; gap: 8px; }
.nav-row .grow { flex: 1; }
@media (min-width: 768px) { .nav-row .btn-primary { flex: none; min-width: 220px; margin-left: auto; } }
.foot-ask { font-size: 14px; font-weight: 500; }

/* Commandes passées : le détail d'une commande. */
.co-block { display: flex; flex-direction: column; gap: 10px; }
.co-block > .btn { align-self: flex-start; margin-left: -12px; }
.co-meal-title { display: flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 500; text-decoration: none; }
