/* Mes repas — charte « Vert & Blanc » (brief du 19 nov. 2026).
   Fond beige froid lumineux, cartes blanches à bordure ultra-fine, un seul vert pour agir et rassurer,
   textes taupe, ambre doux pour toute alerte (jamais de rouge). Une seule famille : Inter (Inter Display pour les titres),
   servie par l'appli (hors connexion, sans Google). Chiffres à largeur fixe partout.
   Contraste AA : le texte vert est en #226A49 (le #2B825B ne fait que 4,2:1 sur le vert doux), le texte ambre en #94600F ;
   #2B825B et #D98A2B restent pour les boutons, la jauge et les icônes.
   Mouvement : 180 / 240 / 320 ms, courbe (.22, 1, .36, 1), appui à 97 %. */
@font-face { font-family: "Inter"; src: url("/fonts/inter-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-500.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-700.woff") format("woff"); font-weight: 700 800; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("/fonts/inter-display-700.woff") format("woff"); font-weight: 600 800; font-display: swap; }
:root {
  --bg: #F7F6F2; --surface: #FFFFFF; --surface-2: #F1EFEA; --surface-3: #E4E1DA; --line: #EAE7E1;
  --ink: #24211E; --ink-2: #6E6963; --ink-3: #6E6963;
  --brand: #2B825B; --brand-press: #226A49; --on-brand: #FFFFFF; --brand-ink: #226A49; --brand-tint: #EAF4EF; --brand-rgb: 43, 130, 91;
  --warn: #D98A2B; --warn-ink: #94600F; --warn-tint: #FDF4E7; --warn-rgb: 217, 138, 43;
  /* alias : une seule couleur pour « c'est bon », le plaisir et l'action ; aucune alerte rouge */
  --ok: var(--brand); --ok-ink: var(--brand-ink); --ok-tint: var(--brand-tint); --ok-rgb: var(--brand-rgb);
  --acc: var(--brand); --acc-ink: var(--brand-ink); --acc-tint: var(--brand-tint); --acc-rgb: var(--brand-rgb);
  --bad: var(--warn); --bad-ink: var(--warn-ink); --bad-tint: var(--warn-tint);
  --sh-1: 0 0 0 1px var(--line), 0 1px 2px rgba(36, 33, 30, .04), 0 8px 22px rgba(36, 33, 30, .06);
  --sh-2: 0 0 0 1px var(--line), 0 2px 6px rgba(36, 33, 30, .05), 0 16px 40px rgba(36, 33, 30, .11);
  --sh-nav: 0 -1px 0 var(--line);
  --glass: rgba(255, 255, 255, .92); --nav-bg: #FFFFFF; --nav-ink: #4A453F;
  --photo-chip: rgba(255, 255, 255, .92); --photo-chip-ink: #24211E;
  /* effet verre posé sur une photo (accueil, cartes de Choisir, fiche recette) et rail des onglets */
  --glass-band: rgba(255, 255, 255, .84); --glass-bar: rgba(255, 255, 255, .7); --seg: #EEEBE5;
  --sh-photo: 0 2px 6px rgba(36, 33, 30, .06), 0 18px 40px rgba(36, 33, 30, .16);
  --sh-tile: 0 0 0 1px var(--line), 0 6px 16px rgba(36, 33, 30, .06);
  --sh-card: 0 0 0 1px var(--line), 0 1px 2px rgba(36, 33, 30, .04), 0 10px 26px rgba(36, 33, 30, .08);
  --display: "Inter Display", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.3, .64, 1);      /* ressort doux : un très léger rebond */
  --t-fast: 180ms; --t: 240ms; --t-slow: 320ms;
  --r-card: 20px; --r-md: 16px; --r-sm: 12px; --r-pill: 9999px;
  --nav-h: 78px;                          /* barre flottante (66 px) + 12 px d'écart avec le bas */
  color-scheme: only light;   /* « only » : le navigateur ne doit pas assombrir l'appli tout seul */
}
/* Thème sombre (réglage du profil, facultatif) : mêmes rôles, mêmes verts. */
:root[data-theme="dark"] {
  --bg: #161514; --surface: #1F1E1C; --surface-2: #2A2826; --surface-3: #3A3734; --line: #34312E;
  --ink: #F2F1EE; --ink-2: #B5B1AB; --ink-3: #B5B1AB;
  --brand: #2B825B; --brand-press: #226A49; --on-brand: #FFFFFF; --brand-ink: #7CC9A2; --brand-tint: #1C2E25; --brand-rgb: 43, 130, 91;
  --warn: #D98A2B; --warn-ink: #F0B66A; --warn-tint: #2E2416;
  --sh-1: 0 0 0 1px var(--line); --sh-2: 0 0 0 1px var(--line), 0 18px 44px rgba(0, 0, 0, .45); --sh-nav: 0 -1px 0 var(--line);
  --glass: rgba(31, 30, 28, .9); --nav-bg: #1F1E1C; --photo-chip: rgba(31, 30, 28, .88); --photo-chip-ink: #F2F1EE;
  --nav-ink: #B5B1AB;
  --glass-band: rgba(26, 23, 20, .7); --glass-bar: rgba(31, 30, 28, .72); --seg: #2A2826;
  --sh-photo: 0 0 0 1px var(--line), 0 18px 40px rgba(0, 0, 0, .45);
  --sh-tile: 0 0 0 1px var(--line); --sh-card: 0 0 0 1px var(--line);
  color-scheme: dark;
}
/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: var(--sans); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; text-size-adjust: 100%; }
body { overscroll-behavior-y: none; }
@media (min-width: 560px) { html { background: var(--surface-2); } body { background: var(--surface-2); } }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-user-select: none; user-select: none; }
button:disabled { cursor: default; }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul { margin: 0; }
a { color: var(--brand-ink); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative; background: var(--bg); }
@media (min-width: 560px) { #app { box-shadow: 0 0 0 1px rgba(30, 26, 22, .04), 0 30px 80px rgba(30, 26, 22, .12); } }

.screen { min-height: 100dvh; display: flex; flex-direction: column; position: relative;
  padding: calc(14px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom)); }
.screen.with-nav { padding-bottom: calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); }
.eyebrow { font-size: 14px; line-height: 19px; font-weight: 600; color: var(--ink-2); }
.display { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 38px; letter-spacing: -.02em; }
.title { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 34px; letter-spacing: -.015em; }
.h2 { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 26px; letter-spacing: -.01em; }
.sub { margin-top: 6px; font-size: 15px; line-height: 22px; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.small { font-size: 13px; line-height: 18px; }
.fine { font-size: 12px; line-height: 17px; color: var(--ink-3); }
.section-title { margin: 28px 0 12px; font-size: 15px; line-height: 20px; font-weight: 600; }
.page-head { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.page-head .title { flex: 1; }
.spacer { flex: 1; }

/* ---------- boutons ---------- */
/* Un seul bouton vert plein par écran (.btn-primary) ; le reste est blanc bordé, ou un simple lien vert. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 24px;
  border: 0; border-radius: var(--r-pill); font-weight: 600; font-size: 16px; text-decoration: none;
  transition: transform var(--t-fast) var(--ease), background-color var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease), opacity var(--t) ease; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; transform: none; }
.btn.block { width: 100%; }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 6px 16px rgba(var(--brand-rgb), .2); }
.btn-primary:active { background: var(--brand-press); }
@media (hover: hover) { .btn-primary:hover { background: var(--brand-press); } .btn-soft:hover { background: var(--surface-2); } }
.btn-primary:disabled { box-shadow: none; }
.btn-soft { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(36, 33, 30, .04); }
.btn-soft:active { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--brand-ink); height: 44px; padding: 0 12px; }
.btn-acc { background: var(--brand-tint); color: var(--brand-ink); }
.btn-danger { background: var(--warn-tint); color: var(--warn-ink); }
.btn.sm { height: 40px; padding: 0 16px; font-size: 14px; }
.link { border: 0; background: none; padding: 10px 2px; font-weight: 600; font-size: 14px; color: var(--brand-ink); text-decoration: none; }
.icon-btn { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--r-pill); background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); text-decoration: none;
  transition: transform var(--t-fast) var(--ease), background-color var(--t) var(--ease); }
.icon-btn:active { transform: scale(.97); background: var(--surface-2); }
.icon-btn.flat { background: transparent; box-shadow: none; }
.icon-btn svg, .round svg, .btn svg { pointer-events: none; flex: none; }

/* pastilles */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600; white-space: nowrap; flex: none; }
.pill.sm { height: 20px; padding: 0 8px; font-size: 11px; font-weight: 700; }
.pill.brand { background: var(--brand-tint); color: var(--brand-ink); }
.pill.ok { background: var(--ok-tint); color: var(--ok-ink); }
.pill.acc { background: var(--acc-tint); color: var(--acc-ink); }
.pill.warn { background: var(--warn-tint); color: var(--warn-ink); }
.pill.bad { background: var(--bad-tint); color: var(--bad-ink); }
.pill.calm { background: var(--surface-2); color: var(--ink-2); }
.pill.glass { background: var(--photo-chip); color: var(--photo-chip-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* puces de choix (réglages) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* puce : blanche bordée, passe en vert doux quand elle est choisie (fond d'état sélectionné) */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); border: 0;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; font-weight: 500; color: var(--ink);
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t-fast) var(--ease); }
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"] { background: var(--brand-tint); color: var(--brand-ink); box-shadow: inset 0 0 0 1.5px var(--brand); }
.chip:disabled { opacity: .4; }

/* cartes de surface */
.card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-1); }
.card.pad { padding: 18px; }
.notice { padding: 14px 16px; border-radius: var(--r-md); font-size: 14px; line-height: 20px; }
.notice.ok { background: var(--ok-tint); color: var(--ok-ink); }
.notice.warn { background: var(--warn-tint); color: var(--warn-ink); }
.notice.bad { background: var(--bad-tint); color: var(--bad-ink); }
.notice.calm { background: var(--surface-2); color: var(--ink-2); }

/* ---------- photos & vignettes ---------- */
.photo { position: relative; overflow: hidden; background: var(--surface-2); }
.photo > img { width: 100%; height: 100%; object-fit: cover; }
.plate { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--ph-bg, #EBD9C4); }
.plate::before { content: ""; position: absolute; width: 74%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--ph-food, #D9B48F) 0 52%, #FBF8F3 53% 70%, #F1ECE4 71% 100%);
  box-shadow: 0 10px 30px rgba(30, 26, 22, .18); }
.plate span { position: relative; font-family: var(--display); font-weight: 700; font-size: clamp(14px, 9cqw, 40px);
  color: rgba(30, 26, 22, .55); letter-spacing: .02em; }
.photo, .thumb { container-type: inline-size; }
.thumb { display: block; position: relative; width: 48px; height: 48px; flex: none; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); }
.thumb > img { width: 100%; height: 100%; object-fit: cover; }
.thumb .plate span { font-size: 15px; }
.thumb .plate::before { width: 86%; box-shadow: none; }

/* ---------- barre de navigation ---------- */
/* Pilule flottante en verre transparent, reflet blanc sur le bord ; l'onglet actif est une pastille verte pleine. */
.nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
  width: calc(100% - 28px); max-width: 452px; height: 66px; padding: 6px; border-radius: var(--r-pill);
  display: flex; align-items: stretch; gap: 2px; background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(16px) saturate(1.9); backdrop-filter: blur(16px) saturate(1.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 0 0 1px rgba(255, 255, 255, .55), 0 0 0 .5px rgba(36, 33, 30, .14), 0 12px 32px rgba(36, 33, 30, .16); }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0;
  border-radius: var(--r-pill); text-decoration: none; color: var(--nav-ink); font-size: 11px; line-height: 13px; font-weight: 600; position: relative;
  transition: color var(--t) var(--ease), background-color var(--t) var(--ease), transform var(--t-fast) var(--ease); }
.nav a .ni { height: 24px; display: flex; align-items: center; justify-content: center; }
.nav a:active { transform: scale(.95); }
.nav a[aria-current="page"] { background: var(--brand); color: var(--on-brand); font-weight: 700; animation: navon var(--t-slow) var(--ease); }
@keyframes navon { from { transform: scaleX(.6); opacity: .3; } to { transform: none; opacity: 1; } }
.nav a .dot { position: absolute; top: 8px; left: calc(50% + 7px); width: 8px; height: 8px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 0 2px var(--surface); }
:root[data-theme="dark"] .nav { background: rgba(31, 30, 28, .55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), inset 0 0 0 1px rgba(255, 255, 255, .06), 0 12px 32px rgba(0, 0, 0, .45); }
.nav a[aria-current="page"] .dot { display: none; }   /* déjà sur l'onglet : pas besoin du point */

/* ---------- toast & feuilles basses ---------- */
#toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); z-index: 80;
  transform: translate(-50%, 16px); max-width: min(440px, calc(100% - 32px)); padding: 12px 18px; border-radius: var(--r-md);
  background: var(--ink); color: var(--bg); font-size: 14px; line-height: 20px; opacity: 0; pointer-events: none;
  transition: opacity var(--t) var(--ease), transform var(--t-slow) var(--ease); box-shadow: 0 10px 30px rgba(36, 33, 30, .18); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.no-nav { bottom: auto; top: calc(64px + env(safe-area-inset-top)); transform: translate(-50%, -16px); }
#toast.no-nav.show { transform: translate(-50%, 0); }

.backdrop { position: fixed; inset: 0; z-index: 60; border: 0; padding: 0; background: rgba(36, 33, 30, .28);
  opacity: 0; transition: opacity var(--t-slow) var(--ease); }
.backdrop.open { opacity: 1; }
.sheet { position: fixed; left: 50%; bottom: 0; z-index: 61; width: 100%; max-width: 480px; max-height: 92dvh;
  transform: translate(-50%, 100%); background: var(--bg); border-radius: 24px 24px 0 0; box-shadow: 0 -10px 40px rgba(36, 33, 30, .12);
  display: flex; flex-direction: column; transition: transform var(--t-slow) var(--ease), bottom var(--t-fast) var(--ease); }
.sheet.open { transform: translate(-50%, 0); }
.sheet .handle { flex: none; padding: 10px 0 6px; touch-action: none; cursor: grab; }
.sheet .handle::before { content: ""; display: block; width: 40px; height: 5px; margin: 0 auto; border-radius: var(--r-pill); background: var(--surface-3); }
.sheet-body { overflow-y: auto; padding: 6px 20px calc(24px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.sheet .sheet-title { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 28px; }
.menu-list { display: flex; flex-direction: column; margin-top: 10px; }
.menu-list button, .menu-list a { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 4px; border: 0;
  background: transparent; text-align: left; font-size: 16px; color: var(--ink); text-decoration: none; }
.menu-list button, .menu-list a { border-radius: var(--r-md); transition: background-color var(--t-fast) var(--ease); }
.menu-list button:active, .menu-list a:active { background: var(--surface-2); }
.menu-list .ico { width: 40px; height: 40px; flex: none; border-radius: var(--r-pill); display: flex; align-items: center; justify-content: center;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.menu-list .ico.brand { background: var(--brand-tint); color: var(--brand); box-shadow: none; }
.menu-list .ico.acc { background: var(--surface); color: var(--ink); }
.menu-list .lbl { flex: 1; display: flex; flex-direction: column; }
.menu-list small { font-size: 13px; color: var(--ink-2); }

.spinner { width: 28px; height: 28px; margin: 40px auto; border-radius: 50%; border: 3px solid var(--surface-3);
  border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%);
  background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- carte budget : carte blanche comme les autres, jauge verte, chiffres qui défilent ---------- */
.budget { position: relative; overflow: hidden; padding: 16px 18px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-1);
  text-decoration: none; color: inherit; display: block; }
/* petite victoire (semaine bouclée sous le budget) : la carte s'éclaire un instant en vert doux */
.budget.flare { animation: flare .9s var(--ease); }
@keyframes flare { from { background-color: var(--brand-tint); } }
.budget .row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.budget .lbl { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-2); }
.budget .amount { position: relative; margin-top: 4px; display: flex; align-items: baseline; gap: 6px; }
.budget .amount .of { font-size: 15px; color: var(--ink-2); }
.budget .amount .cur { font-family: var(--display); font-size: 22px; font-weight: 700; }
.budget .foot { position: relative; margin-top: 10px; display: flex; justify-content: space-between; gap: 12px; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.odo { display: inline-flex; overflow: hidden; height: 1.2em; line-height: 1.2em; font-family: var(--display); font-weight: 700;
  font-size: 34px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.odo .col { display: inline-block; height: 1.2em; overflow: hidden; }
.odo .col > span { display: block; transition: transform var(--t-slow) var(--ease); }
.odo .col > span > i { display: block; height: 1.2em; font-style: normal; text-align: center; }
.odo .sep { display: inline-block; }

.gauge { position: relative; height: 10px; margin-top: 12px; border-radius: var(--r-pill); background: var(--surface-2); }
.gauge .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: var(--r-pill); background: var(--brand);
  transition: width var(--t-slow) var(--ease), background-color var(--t) var(--ease); }
.gauge .ghost { position: absolute; top: 0; bottom: 0; width: 0; border-radius: 0 var(--r-pill) var(--r-pill) 0;
  background: repeating-linear-gradient(135deg, rgba(var(--brand-rgb), .45) 0 4px, rgba(var(--brand-rgb), .18) 4px 8px); }
.gauge .ghost.over { background: repeating-linear-gradient(135deg, rgba(var(--warn-rgb), .6) 0 4px, rgba(var(--warn-rgb), .25) 4px 8px); }
.gauge .target { position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 1px; background: var(--ink-2); opacity: .55; }
.gauge.tendu .fill, .gauge.a_court .fill, .gauge.depasse .fill { background: var(--warn); }

/* ---------- accueil ---------- */
.home-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 8px; }
.avatar { width: 44px; height: 44px; flex: none; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--sh-1); display: flex; align-items: center;
  justify-content: center; font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; }
.hero-card { display: block; margin-top: 22px; border-radius: 24px; overflow: hidden; background: var(--surface); box-shadow: var(--sh-1);
  text-decoration: none; color: inherit; border: 0; padding: 0; width: 100%; text-align: left;
  transition: transform var(--t-fast) var(--ease); -webkit-touch-callout: none; }
.hero-card:active { transform: scale(.985); }
.hero-card .photo { height: 230px; }
.hero-card .body { padding: 18px 20px 20px; }
.hero-card .dish { margin-top: 6px; font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 30px; }
.hero-card .meta { margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.hero-card.empty { padding: 26px 22px; }
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 16px; }
.mosaic .thumb { width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--r-sm); }
.mosaic .slot { aspect-ratio: 1; border-radius: var(--r-sm); background: var(--surface-2); }
.home-budget { margin-top: 20px; }
.suggest { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px 16px; border-radius: var(--r-card);
  background: var(--surface); box-shadow: var(--sh-1); text-decoration: none; color: inherit; border: 0; width: 100%; text-align: left; }
.suggest .ico { width: 36px; height: 36px; flex: none; border-radius: 18px; display: flex; align-items: center; justify-content: center; }
.suggest .txt { flex: 1; min-width: 0; font-size: 14px; line-height: 20px; }
.suggest .txt strong { display: block; font-size: 15px; }
.home-cta { margin-top: 18px; }
.stagger > * { animation: rise var(--t-slow) var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: 30ms; } .stagger > *:nth-child(3) { animation-delay: 60ms; }
.stagger > *:nth-child(4) { animation-delay: 90ms; } .stagger > *:nth-child(5) { animation-delay: 120ms; }
.stagger > *:nth-child(6) { animation-delay: 150ms; } .stagger > *:nth-child(n+7) { animation-delay: 180ms; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.04); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }

/* coche qui se dessine (semaine prête, plat cuisiné, liste terminée) */
.okmark { width: 84px; height: 84px; margin: 12px auto 18px; border-radius: 50%; background: var(--brand-tint); color: var(--brand);
  display: flex; align-items: center; justify-content: center; animation: pop var(--t-slow) var(--ease) both; }
.okmark svg { width: 60px; height: 60px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.okmark circle { stroke-width: 2.5; stroke-dasharray: 151; stroke-dashoffset: 151; transform: rotate(-90deg); transform-origin: 50% 50%;
  animation: draw var(--t-slow) var(--ease) 120ms forwards; }
.okmark path { stroke-width: 3.5; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw var(--t) var(--ease) 380ms forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.okmark.sm { width: 64px; height: 64px; margin: 0 auto 14px; }
.okmark.sm svg { width: 46px; height: 46px; }

/* ---------- bienvenue & réglages ---------- */
.welcome { justify-content: space-between; }
.welcome .plates { position: relative; height: 300px; margin: 18px -20px 8px; }
.welcome .plates .p { position: absolute; width: 190px; height: 190px; border-radius: 50%; overflow: hidden; box-shadow: var(--sh-2); animation: float 7s ease-in-out infinite; }
.welcome .plates .p img { width: 100%; height: 100%; object-fit: cover; }
.welcome .plates .p0 { left: 14px; top: 34px; }
.welcome .plates .p1 { right: 6px; top: 0; width: 160px; height: 160px; animation-delay: -2.4s; }
.welcome .plates .p2 { right: 40px; bottom: 0; width: 140px; height: 140px; animation-delay: -4.6s; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(2deg); } }
.welcome .promise { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.welcome .promise div { display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--ink-2); }
.welcome .promise svg { color: var(--ok); }

.ob-head { display: flex; align-items: center; gap: 14px; min-height: 48px; }
.progress { flex: 1; display: flex; gap: 6px; }
.progress span { flex: 1; height: 4px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; position: relative; }
.progress span::after { content: ""; position: absolute; inset: 0; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform var(--t-slow) var(--ease); }
.progress span.on::after { transform: scaleX(1); }
.ob-title { margin-top: 22px; }
.ob-body { flex: 1; margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.ob-foot { position: sticky; bottom: 0; padding-top: 16px; background: linear-gradient(to top, var(--bg) 70%, transparent); }
.stores { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* enseignes : blocs carrés, logo centré ; fond toujours blanc (les logos sont faits pour) */
.store { position: relative; aspect-ratio: 1 / 1; padding: 16px; border: 0; border-radius: var(--r-card); background: #fff; box-shadow: var(--sh-1);
  display: flex; align-items: center; justify-content: center; color: #24211E; transition: transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease); }
.store img { display: block; width: 84%; height: 60%; object-fit: contain; pointer-events: none; user-select: none; }
.store.square img { width: 72%; height: 72%; }
.store strong { font-size: 18px; }
.store[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--brand), 0 8px 22px rgba(var(--brand-rgb), .14); }
.store .tick { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: var(--r-pill); background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; transform: scale(0); }
.store[aria-pressed="true"] .tick { transform: scale(1); animation: tickpop var(--t) var(--spring); }
@keyframes tickpop { from { transform: scale(0); } to { transform: scale(1); } }
.store:active { transform: scale(.97); }
.field { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--sh-1); }
.field strong { display: block; font-size: 16px; }
.field small { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 44px; height: 44px; border-radius: var(--r-pill); border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 22px; line-height: 1;
  transition: transform var(--t-fast) var(--ease), background-color var(--t) var(--ease); }
.stepper button:active { transform: scale(.97); background: var(--brand-tint); }
.stepper button:disabled { opacity: .35; }
.stepper output { min-width: 32px; text-align: center; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.text-in { width: 100%; height: 52px; padding: 0 16px; border: 0; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 16px;
  transition: box-shadow var(--t) var(--ease); }
.text-in:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brand); }
.text-in::placeholder { color: var(--ink-3); }
.days { display: flex; flex-direction: column; gap: 8px; }
.day-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 16px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--sh-1); }
.day-row strong { font-size: 15px; }
.day-row .chips { flex-wrap: nowrap; }
.day-row .chip { min-height: 40px; padding: 0 14px; }
.budget-big { text-align: center; padding: 18px 0 6px; }
.budget-big .odo { font-size: 60px; letter-spacing: -.02em; }
.budget-big .eur { font-family: var(--display); font-weight: 700; font-size: 40px; margin-left: 6px; }
.budget-big p { margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.range-row { display: flex; align-items: center; gap: 12px; }
input[type="range"] { flex: 1; -webkit-appearance: none; appearance: none; height: 44px; background: transparent; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--brand) var(--p, 50%), var(--surface-3) var(--p, 50%)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--surface-3); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--brand); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 2px 8px rgba(36, 33, 30, .18); }
input[type="range"]::-moz-range-thumb { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 2px 8px rgba(36, 33, 30, .18); }
.group h2 { font-size: 16px; font-weight: 600; }
.group .hint { margin: 4px 0 10px; font-size: 13px; color: var(--ink-2); }
.ex-add { display: flex; gap: 8px; margin-top: 10px; width: 100%; }
.ex-add .text-in { height: 44px; }

/* ---------- choisir (swipe) ---------- */
.choose { padding-bottom: calc(14px + env(safe-area-inset-bottom)); height: 100dvh; overflow: hidden; }
.ch-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; }
.ch-top .count { min-width: 44px; text-align: right; font-family: var(--display); font-size: 17px; font-weight: 700; color: var(--ink); }
.ch-top .count small { font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ch-top .count.bump { animation: bump var(--t) var(--ease); }
@keyframes bump { 50% { transform: scale(1.15); color: var(--brand-ink); } }
/* le plateau de la semaine : un rond par repas, qui se remplit avec la photo du plat choisi */
.tray { flex: 1; min-width: 0; display: flex; justify-content: center; align-items: center; gap: 4px; --s: 26px; }
.tray .slot { position: relative; width: var(--s); height: var(--s); flex: none; border-radius: 50%; overflow: hidden;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--surface-3), 0 2px 6px rgba(36, 33, 30, .06); }
.tray .slot.on { background: var(--brand); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line); }
.tray .slot img { width: 100%; height: 100%; object-fit: cover; }
.tray .slot.pop { animation: pop var(--t) var(--ease); }
.tray.small .slot img { display: none; }
.fly { position: fixed; z-index: 85; border-radius: 50%; overflow: hidden; pointer-events: none; box-shadow: 0 8px 20px rgba(36, 33, 30, .2);
  background: var(--brand); border: 2px solid #fff; }
.fly img { width: 100%; height: 100%; object-fit: cover; }
.choose .budget { margin-top: 8px; padding: 14px 16px; border-radius: 22px; }
.choose .budget .odo { font-size: 30px; }
.ch-msg { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.ch-msg .link { white-space: nowrap; flex: none; }
.deck { position: relative; flex: 1; margin-top: 4px; min-height: 300px; }
/* La carte = la photo du plat en entier ; nom, prix et repères dans un bandeau effet verre en bas (comme à l'accueil). */
.scard { position: absolute; left: 0; right: 0; top: var(--card-top, 6px); height: var(--card-h, 460px); border-radius: 28px; -webkit-user-select: none; user-select: none;
  background: var(--surface-2); box-shadow: 0 8px 20px rgba(36, 33, 30, .08); touch-action: none; will-change: transform; transform-origin: 50% 115%; }
.scard.top { z-index: 3; cursor: grab; box-shadow: var(--sh-photo); }
.scard.dragging { cursor: grabbing; }
.scard.b1 { z-index: 2; transform: translateY(12px) scale(.95); transform-origin: 50% 100%; }
.scard.b2 { z-index: 1; transform: translateY(24px) scale(.9); transform-origin: 50% 100%; background: var(--surface-3); }
.scard .photo { position: absolute; inset: 0; border-radius: inherit; }
.scard .photo > img { pointer-events: none; -webkit-user-drag: none; }
.scard .tint { position: absolute; inset: 0; pointer-events: none; }
.scard .ph-tl { position: absolute; left: 14px; top: 14px; right: 66px; display: flex; flex-wrap: wrap; gap: 8px; pointer-events: none; }
.scard .ph-tl .pill { height: 32px; padding: 0 12px; gap: 5px; font-size: 14px; font-weight: 600; }
.scard .ph-tl .pill.strong { font-weight: 700; }
.scard .heart { position: absolute; right: 12px; top: 12px; }
.sc-foot { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.scard .ph-bl { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 4px; pointer-events: none; }
.scard .ph-bl .pill { height: 28px; font-size: 13px; }
.scard .ph-bl svg { width: 13px; height: 13px; color: var(--brand); }
.scard .ph-bl small { font-size: 11px; color: var(--ink-2); }
.sc-band { align-self: stretch; display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; border-radius: 20px;
  background: var(--glass-band); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 4px 14px rgba(36, 33, 30, .10); }
.sc-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.heart { width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r-pill); background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(36, 33, 30, .14);
  transition: transform var(--t-fast) var(--ease), color var(--t) var(--ease); }
.heart:active { transform: scale(.94); }
.heart[aria-pressed="true"] { color: #E5484D; }   /* coup de cœur : rouge, la seule exception au « jamais de rouge » */
.heart[aria-pressed="true"] svg { fill: currentColor; }
.heart.pulse svg { animation: pop var(--t-slow) var(--spring); }
/* pendant le glissé : une pastille blanche « Ajouter » (vert) ou « Passer » (taupe) apparaît sur la photo */
.stamp { position: absolute; top: 64px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px 8px 12px; border-radius: var(--r-pill);
  background: #fff; font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 24px; white-space: nowrap; opacity: 0; pointer-events: none;
  box-shadow: 0 6px 18px rgba(36, 33, 30, .18); }
.stamp svg { width: 20px; height: 20px; }
.stamp.add { left: 16px; color: #226A49; transform: rotate(-6deg); }
.stamp.pass { right: 16px; color: #6E6963; transform: rotate(6deg); }
.macros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.macro { min-height: 46px; padding: 6px 2px; border-radius: 12px; background: var(--surface-2); text-align: center; }
.macro .v { font-size: 15px; line-height: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.macro .v small { font-size: 11px; font-weight: 500; margin-left: 1px; }
.macro .l { font-size: 11px; line-height: 14px; color: var(--ink-2); }
.macro.hl { background: var(--ok-tint); color: var(--ok-ink); box-shadow: inset 0 0 0 1.5px var(--ok); }
.macro.hl .l { color: var(--ok-ink); }
/* tuiles blanches des repères (fiche recette, feuille de Choisir) */
.macros.tiles { margin-top: 14px; gap: 8px; }
.macros.tiles .macro { min-height: 0; padding: 10px 2px; border-radius: 18px; background: var(--surface); box-shadow: var(--sh-tile); }
.macros.tiles .macro .v { font-size: 17px; line-height: 21px; font-weight: 800; }
.macros.tiles .macro .v small { font-size: 12px; font-weight: 600; }
.macros.tiles .macro .l { margin-top: 1px; font-size: 12px; line-height: 15px; }
.macros.tiles .macro.hl { background: var(--ok-tint); box-shadow: inset 0 0 0 1.5px var(--ok), 0 6px 16px rgba(36, 33, 30, .06); }
.scard .dish { margin: 0; min-width: 0; font-family: var(--display); font-weight: 800; font-size: 21px; line-height: 24px; letter-spacing: -.015em; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scard .price { flex: none; margin: 0; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.scard .price b { font-family: var(--display); font-weight: 800; font-size: 20px; line-height: 22px; color: var(--brand-ink); white-space: nowrap; }
.scard .price small { font-size: 12px; line-height: 15px; color: var(--ink-2); }
.scard .meta { margin: 0; font-size: 14px; line-height: 18px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard .meta b { color: var(--ink); font-weight: 700; }
.scard .meta b.hl { color: var(--brand-ink); font-weight: 600; }
:root[data-theme="dark"] .sc-band { box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); }
.ch-actions { flex: none; display: flex; align-items: center; justify-content: center; gap: 18px; padding-top: 12px; position: relative; z-index: 6; }
.round { width: 64px; height: 64px; padding: 0; border: 0; border-radius: var(--r-pill); display: flex; align-items: center; justify-content: center;
  transition: transform var(--t-fast) var(--ease), opacity var(--t) var(--ease), background-color var(--t) var(--ease); }
.round:active { transform: scale(.97); }
.round:disabled { opacity: .4; }
.round.pass { background: var(--surface); color: var(--ink-2); box-shadow: 0 0 0 1px rgba(36, 33, 30, .05), 0 8px 22px rgba(36, 33, 30, .12); }
.round.pass:active { background: var(--surface-2); }
.round.add { width: 76px; height: 76px; background: var(--brand); color: #fff; box-shadow: 0 10px 24px rgba(var(--brand-rgb), .35), inset 0 1px 0 rgba(255, 255, 255, .25); }
.round.add svg { width: 32px; height: 32px; }
.round.add:active { background: var(--brand-press); }
/* petits boutons ronds effet verre : annuler, voir la recette */
.round.mini { width: 48px; height: 48px; background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: var(--ink-2);
  box-shadow: 0 0 0 1px rgba(36, 33, 30, .06), 0 6px 16px rgba(36, 33, 30, .10); }
:root[data-theme="dark"] .round.mini { background: rgba(31, 30, 28, .9); box-shadow: 0 0 0 1px var(--line); }
:root[data-theme="dark"] .round.pass { box-shadow: 0 0 0 1px var(--line); }
.round.mini:disabled { opacity: .35; }
.round.mini.armed { color: var(--ink); animation: pop var(--t) var(--ease); }
.deck-empty { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 24px;
  border-radius: 24px; background: var(--surface); box-shadow: var(--sh-1); text-align: center; animation: rise var(--t-slow) var(--ease) both; }
.deck-empty h2 { font-family: var(--display); font-weight: 700; font-size: 22px; }
.deck-empty p { color: var(--ink-2); font-size: 15px; line-height: 22px; }

/* écran « semaine prête » : une coche qui se dessine, puis les repas arrivent un à un */
.ready { position: fixed; inset: 0; z-index: 70; display: flex; justify-content: center; background: var(--bg); opacity: 0; transition: opacity var(--t-slow) var(--ease); }
.ready.open { opacity: 1; }
.ready .inner { width: 100%; max-width: 480px; display: flex; flex-direction: column; overflow-y: auto;
  padding: calc(28px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom)); }
.ready .inner > * { flex-shrink: 0; }
.ready .rows { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.ready .rows > * { animation: rise var(--t-slow) var(--ease) both; }

/* ---------- semaine ---------- */
.wk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 6px; }
.note-btn { height: 36px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: var(--brand-tint); color: var(--brand-ink); font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px; flex: none; transition: transform var(--t-fast) var(--ease); }
.note-btn:active { transform: scale(.97); }
.note-btn svg { color: var(--brand); }
.week .budget { margin-top: 16px; }
.wk-status { margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; line-height: 18px; color: var(--ink-2); text-align: center; }
.wk-status.ok { color: var(--ok-ink); font-weight: 600; }
.meals { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.meal { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 10px 8px 6px; border-radius: var(--r-md); background: var(--surface);
  box-shadow: var(--sh-1); border: 0; width: 100%; text-align: left; color: inherit; transition: transform var(--t-fast) var(--ease), opacity var(--t) var(--ease); }
.meal:active { transform: scale(.985); }
.meal .when { width: 52px; flex: none; text-align: center; font-size: 12px; line-height: 15px; font-weight: 600; color: var(--ink-2); }
.meal .when.today { color: var(--ok-ink); }
.meal .mt { flex: 1; min-width: 0; }
.meal .mtitle { display: flex; align-items: center; gap: 6px; font-size: 15px; line-height: 20px; font-weight: 600; }
.meal .mtitle > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.meal .mmeta { font-size: 12.5px; line-height: 17px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meal.cooked { opacity: .62; }
.meal .done-ic { width: 26px; height: 26px; flex: none; border-radius: 13px; background: var(--ok); color: #fff; display: flex; align-items: center; justify-content: center; }
.meal .more { color: var(--ink-3); flex: none; }
.upgrade { margin-top: 14px; padding: 16px 18px; border-radius: var(--r-card); background: var(--ok-tint); color: var(--ok-ink); }
.upgrade h2 { font-family: var(--display); font-size: 19px; font-weight: 700; }
.upgrade p, .upgrade li { color: var(--ink); }
.upgrade p, .upgrade li { font-size: 14px; line-height: 20px; margin-top: 6px; }
.upgrade ul { padding-left: 18px; }
.cta-bar { margin-top: 20px; position: relative; }

/* invités */
.guests-big { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.guests-big strong { display: block; font-size: 16px; }
.guests-big small { display: block; font-size: 13px; color: var(--ink-2); }
.impact { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); }
.impact .line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; }
.impact .line + .line { margin-top: 6px; }

/* ---------- courses ---------- */
.list-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 6px; }
.list-actions { display: flex; align-items: flex-start; gap: 10px; }
.list-actions .tool { min-width: 48px; }
.tool { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: transparent; padding: 0; font-size: 11px; font-weight: 600; color: var(--ink); }
.tool .ic { width: 44px; height: 44px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--sh-1); display: flex; align-items: center; justify-content: center;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), transform var(--t-fast) var(--ease); }
.tool:active .ic { transform: scale(.97); }
.tool[aria-pressed="true"] .ic { background: var(--brand-tint); color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
.tool[aria-pressed="true"] { color: var(--brand-ink); }
.list-total { margin-top: 16px; }
.list-total .left { font-family: var(--display); font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -.01em; }
.list-total .left .odo { font-size: 30px; }
.list-total .bar { height: 8px; margin-top: 12px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.list-total .bar span { display: block; height: 100%; background: var(--brand); border-radius: var(--r-pill); transition: width var(--t-slow) var(--ease); }
.aisle { margin-top: 22px; }
.aisle h2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--display); font-size: 17px; line-height: 22px; font-weight: 700; color: var(--ink); }
.aisle h2 .pill { font-family: var(--sans); }
.aisle .items { margin-top: 10px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-1); overflow: hidden; }
.item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 14px 16px; transition: opacity var(--t) var(--ease); position: relative; }
.item + .item { box-shadow: inset 0 1px 0 var(--line); }
/* case à cocher : cercle bordé ; cochée, elle se remplit en vert et la coche se dessine */
.item .check { width: 28px; height: 28px; flex: none; margin-top: -3px; padding: 0; border: 0; border-radius: var(--r-pill); background: var(--surface); color: transparent;
  box-shadow: inset 0 0 0 1.5px var(--ink-2); display: flex; align-items: center; justify-content: center;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t-fast) var(--ease); }
.item .check:active { transform: scale(.94); }
.item .check[aria-pressed="true"] { background: var(--brand); color: #fff; box-shadow: none; }
.item.checking .check { animation: pop var(--t) var(--ease); }
.item.checking .check svg path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw var(--t) var(--ease) 60ms forwards; }
.item .it-main { flex: 1; min-width: 0; }
.item .it-label { display: block; font-size: 15px; line-height: 21px; font-weight: 500; transition: color var(--t) var(--ease); }
/* rayage progressif : un trait qui traverse le nom de gauche à droite (sur chaque ligne) */
.item .it-label .st { background: linear-gradient(currentColor, currentColor) no-repeat 0 55% / 0 1.5px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size var(--t-slow) var(--ease); }
.item.checking .it-label, .item.done .it-label { color: var(--ink-2); }
.item.checking .it-label .st, .item.done .it-label .st { background-size: 100% 1.5px; }
.item .it-meta { display: block; margin-top: 2px; font-size: 12.5px; line-height: 17px; color: var(--ink-2); }
.item .it-avoid { display: block; margin-top: 4px; font-size: 12.5px; color: var(--warn-ink); }
.it-target { display: block; font-size: 13px; line-height: 18px; color: var(--ink-2); margin-top: 5px; }
.it-target b { display: inline-block; margin-left: 2px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--brand-tint); color: var(--brand-ink); font-weight: 700; }
.store-mode .it-target { font-size: 16px; line-height: 22px; }
.item .have { margin-top: 6px; border: 0; background: none; padding: 4px 0; font-size: 13px; font-weight: 600; color: var(--brand-ink); }
.item .it-price { flex: none; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.item.done { opacity: .75; }
.list.store-mode .item { padding: 16px 16px; }
.list.store-mode .item .it-label { font-size: 18px; line-height: 24px; }
.list.store-mode .item .check { width: 36px; height: 36px; }
.list.store-mode .it-meta .for, .list.store-mode .have { display: none; }
.done-bar { margin-top: 24px; }

/* ---------- fiche recette ---------- */
/* La photo en grand, le nom et le prix posés dessus dans un bandeau effet verre ; en bas, une barre flottante effet verre. */
.recipe-page { padding: 0 0 calc(110px + env(safe-area-inset-bottom)); }
.r-hero { position: relative; height: 58vh; height: clamp(360px, 58svh, 520px); background: var(--surface-2); }
.r-hero .photo { position: absolute; inset: 0; }
.r-top { position: absolute; left: 16px; right: 16px; top: calc(16px + env(safe-area-inset-top)); display: flex; justify-content: space-between; z-index: 2; }
.r-top .icon-btn, .r-top .heart { background: var(--glass-band); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 1px 3px rgba(36, 33, 30, .14); }
.r-band { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1; padding: 11px 16px 12px; border-radius: 22px;
  background: var(--glass-band); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 4px 14px rgba(36, 33, 30, .10); }
:root[data-theme="dark"] .r-band { box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); }
.r-band .eyebrow { font-size: 13px; line-height: 18px; }
.eyebrow .nw { white-space: nowrap; }
.eyebrow .nw svg { width: 13px; height: 13px; margin-right: 4px; vertical-align: -2px; }
.r-band h1 { margin-top: 1px; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 30px; letter-spacing: -.02em; }
.r-band .r-price, .r-band .r-meta { margin-top: 3px; font-size: 14px; line-height: 18px; color: var(--ink-2); }
.r-price { font-variant-numeric: tabular-nums; }
.r-price strong { color: var(--brand-ink); font-weight: 800; }
.r-sheet { position: relative; padding: 16px 16px 0; background: var(--bg); }
.r-body .macros.tiles:first-child { margin-top: 0; }
.r-body .section-title { margin: 24px 4px 10px; font-size: 17px; line-height: 22px; font-weight: 800; }
.r-body > .section-title:first-child { margin-top: 6px; }
.r-body .steps { padding: 0 4px; }
/* dans la feuille de « Choisir » : le nom et le prix sous la photo */
.r-body.compact .eyebrow { margin-top: 16px; }
.r-body.compact h1 { margin-top: 4px; font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 30px; letter-spacing: -.015em; }
.r-body.compact .r-price { margin-top: 6px; font-size: 15px; line-height: 21px; }
.ings { border-radius: 22px; background: var(--surface); box-shadow: var(--sh-card); overflow: hidden; }
.ing { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; font-size: 15px; line-height: 20px; }
.ing + .ing { background: linear-gradient(var(--line), var(--line)) right top / calc(100% - 16px) 1px no-repeat; }
.ing > span { min-width: 0; }
.ing b { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.ing .pantry { margin-left: 6px; }
.steps { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: s; }
.steps li { display: flex; gap: 12px; font-size: 16px; line-height: 24px; }
.steps li::before { counter-increment: s; content: counter(s); width: 28px; height: 28px; flex: none; border-radius: var(--r-pill); background: var(--brand-tint); color: var(--brand-ink);
  font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.r-foot { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 20;
  width: calc(100% - 28px); max-width: 452px; padding: 6px; border-radius: var(--r-pill); display: flex; gap: 6px;
  background: var(--glass-bar); -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 12px 32px rgba(36, 33, 30, .14), 0 0 0 1px rgba(36, 33, 30, .05); }
:root[data-theme="dark"] .r-foot { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px rgba(255, 255, 255, .06), 0 12px 32px rgba(0, 0, 0, .45); }
.r-foot .btn { flex: 1; height: 54px; padding: 0 18px; font-size: 17px; font-weight: 700; }
.r-foot .btn-primary { box-shadow: 0 6px 14px rgba(var(--brand-rgb), .28); }
.r-foot .btn svg { width: 20px; height: 20px; }
.equip { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- mode cuisine ---------- */
.cook { height: 100dvh; overflow: hidden; }
.cook-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; }
.cook-top .ttl { flex: 1; min-width: 0; text-align: center; font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.segs { display: flex; gap: 6px; margin-top: 14px; }
.segs span { flex: 1; height: 4px; border-radius: var(--r-pill); background: var(--surface-3); transition: background-color var(--t) var(--ease); }
.segs span.on { background: var(--brand); }
.awake { margin-top: 10px; font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.step-zone { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 10px 2px; touch-action: pan-y; }
.step-zone .eyebrow { color: var(--brand-ink); }
.step-text { margin-top: 14px; font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 38px; letter-spacing: -.01em; }
.step-text.in-r { animation: slideR var(--t-slow) var(--ease) both; } .step-text.in-l { animation: slideL var(--t-slow) var(--ease) both; }
@keyframes slideR { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: none; } }
@keyframes slideL { from { opacity: 0; transform: translateX(-32px); } to { opacity: 1; transform: none; } }
.timers { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.timer-btn { height: 48px; padding: 0 18px; border: 0; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--sh-1); font-weight: 600; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px; transition: background-color var(--t) var(--ease), color var(--t) var(--ease), transform var(--t-fast) var(--ease); }
.timer-btn:active { transform: scale(.97); }
.timer-btn.running { background: var(--brand-tint); color: var(--brand-ink); box-shadow: none; }
.timer-btn.ring { background: var(--warn-tint); color: var(--warn-ink); box-shadow: inset 0 0 0 1.5px var(--warn); animation: ring 0.9s ease-in-out infinite; }
@keyframes ring { 50% { transform: scale(1.06); } }
.cook-nav { display: flex; gap: 10px; }
.cook-nav .btn { flex: 1; }
.cook-done { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; gap: 10px; }
.cook-done .okmark { margin: 0 auto 10px; }
.link-card { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-1);
  text-decoration: none; color: var(--ink); text-align: left; border: 0; width: 100%; transition: transform var(--t-fast) var(--ease); }
.link-card:active { transform: scale(.985); }
.link-card .ico { width: 40px; height: 40px; flex: none; border-radius: var(--r-pill); display: flex; align-items: center; justify-content: center; background: var(--surface-2); }
.link-card .ico.brand { background: var(--brand-tint); color: var(--brand); }
.link-card .ico.acc { background: var(--surface-2); color: var(--ink); }
.link-card .t { flex: 1; min-width: 0; }
.link-card .t strong { display: block; font-size: 15px; line-height: 20px; }
.link-card .t small { display: block; font-size: 13px; line-height: 18px; color: var(--ink-2); }

/* ---------- placard ---------- */
.pantry-total { margin-top: 16px; padding: 16px 18px; border-radius: var(--r-card); background: var(--brand-tint); color: var(--brand-ink); }
.pantry-total strong { display: block; font-family: var(--display); font-size: 26px; line-height: 32px; font-variant-numeric: tabular-nums; }
.p-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.p-item + .p-item { box-shadow: inset 0 1px 0 var(--line); }
.p-item .t { flex: 1; min-width: 0; }
.p-item .t strong { display: block; font-size: 15px; line-height: 21px; font-weight: 500; }
.p-item .t small { display: block; font-size: 12.5px; line-height: 17px; color: var(--ink-2); }
.p-item .acts { display: flex; gap: 6px; flex: none; }
.p-item.gone { opacity: .45; }
.p-item.gone strong { text-decoration: line-through; }

/* ---------- recettes ---------- */
/* Onglets en rail : une pastille blanche glisse sur le rail beige (Recettes, Mon placard). */
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin: 16px 0 0; padding: 4px;
  border-radius: var(--r-pill); background: var(--seg); }
.tabs button { min-width: 0; height: 40px; padding: 0 8px; border: 0; border-radius: var(--r-pill); background: transparent;
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  font-size: 15px; font-weight: 600; color: var(--ink-2);
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t-fast) var(--ease); }
.tabs button:active { transform: scale(.97); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(36, 33, 30, .06), 0 4px 12px rgba(36, 33, 30, .08); }
:root[data-theme="dark"] .tabs button[aria-selected="true"] { background: var(--surface-3); box-shadow: none; }
.search-in { margin-top: 14px; }
.search-in .text-in { width: 100%; }
.rc-count { margin-top: 14px; font-size: 14px; line-height: 19px; color: var(--ink-2); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; margin-top: 12px; }
.rcard { position: relative; border: 0; padding: 0; background: transparent; text-align: left; color: inherit; text-decoration: none; display: block; }
.rcard .rc-link { display: block; color: inherit; text-decoration: none; transition: transform var(--t-fast) var(--ease); }
.rcard .rc-link:active { transform: scale(.98); }
.rcard .photo { aspect-ratio: 1.15; border-radius: 22px; box-shadow: 0 2px 6px rgba(36, 33, 30, .06), 0 12px 26px rgba(36, 33, 30, .12); }
:root[data-theme="dark"] .rcard .photo { box-shadow: 0 0 0 1px var(--line); }
.rcard .rc-time { position: absolute; left: 8px; bottom: 8px; height: 25px; padding: 0 9px; gap: 4px; font-size: 12px; font-weight: 700; }
.rcard .rc-time svg { width: 12px; height: 12px; }
.rcard .heart { position: absolute; right: 8px; top: 8px; width: 36px; height: 36px; background: var(--glass-band);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 1px 3px rgba(36, 33, 30, .12); }
.rcard .heart svg { width: 18px; height: 18px; }
.rcard .nm { margin-top: 9px; font-weight: 700; font-size: 15px; line-height: 19px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rcard .mt { margin-top: 3px; font-size: 13px; line-height: 17px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rcard .mt b { color: var(--ink); font-weight: 700; }
.empty-state { margin-top: 40px; text-align: center; padding: 0 16px; }
.empty-state .ill { width: 88px; height: 88px; margin: 0 auto 16px; border-radius: 50%; background: var(--surface); box-shadow: var(--sh-1); color: var(--ink-2); display: flex; align-items: center; justify-content: center; }
.empty-state .okmark { margin: 0 auto 16px; }
.empty-state h2 { font-family: var(--display); font-weight: 700; font-size: 21px; }
.empty-state p { margin-top: 6px; color: var(--ink-2); font-size: 15px; line-height: 22px; }

/* ---------- historique ---------- */
.savings { margin-top: 16px; padding: 20px; border-radius: var(--r-card); background: var(--ok-tint); color: var(--ok-ink); position: relative; overflow: hidden; }
.savings .big { margin-top: 4px; font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 46px; font-variant-numeric: tabular-nums; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; margin-top: 14px; padding: 0 4px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.bars .b .v { width: 100%; max-width: 34px; border-radius: 8px 8px 4px 4px; background: rgba(var(--brand-rgb), .35); transform-origin: bottom; animation: grow var(--t-slow) var(--ease) both; }
.bars .b.now .v { background: var(--brand); }
.bars .b small { font-size: 11px; color: var(--ink-2); white-space: nowrap; }
@keyframes grow { from { transform: scaleY(0); } }
.wk-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.wk-item + .wk-item { box-shadow: inset 0 1px 0 var(--line); }
.wk-item .t { flex: 1; }
.wk-item .t strong { display: block; font-size: 15px; }
.wk-item .t small { display: block; font-size: 13px; color: var(--ink-2); }
.wk-item .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.wk-item .v small { display: block; font-weight: 500; font-size: 12px; color: var(--ok-ink); }

/* ---------- profil ---------- */
.prof-head { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.prof-head .avatar { width: 64px; height: 64px; font-size: 26px; }
.settings { margin-top: 10px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-1); overflow: hidden; }
.settings a, .settings button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 16px; border: 0; background: transparent;
  text-align: left; text-decoration: none; color: var(--ink); font-size: 15px; transition: background-color var(--t-fast) var(--ease); }
.settings a:active, .settings button:active { background: var(--surface-2); }
.settings > * + * { box-shadow: inset 0 1px 0 var(--line); }
.settings .t { flex: 1; min-width: 0; }
.settings .t small { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settings .chev { color: var(--ink-3); flex: none; }
.seg { display: flex; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); }
.seg button { flex: 1; height: 36px; border: 0; border-radius: var(--r-pill); background: transparent; font-size: 14px; font-weight: 500; color: var(--ink-2); min-height: 0; padding: 0; justify-content: center;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); font-weight: 600; }

/* ---------- partage ---------- */
.share-text { margin-top: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); font-size: 13px; line-height: 19px;
  white-space: pre-line; max-height: 38dvh; overflow-y: auto; font-variant-numeric: tabular-nums; }
.share-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.share-btns .btn { padding: 0 8px; height: 48px; font-size: 14px; }

/* transitions de page (View Transitions) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--t); animation-timing-function: var(--ease); }
::view-transition-new(root) { animation-name: vt-in; }
::view-transition-old(root) { animation-name: vt-out; }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes vt-out { to { opacity: 0; } }
::view-transition-group(hero) { animation-duration: var(--t-slow); animation-timing-function: var(--ease); }
::view-transition-old(hero), ::view-transition-new(hero) { height: 100%; object-fit: cover; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* paramètre « Réduire les animations » */
html.calm *, html.calm *::before, html.calm *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }

/* ===== Réglages : période de plusieurs semaines ===== */
.chip.sm { min-height: 36px; padding: 0 13px; font-size: 14px; }
.icon-btn.sm { width: 38px; height: 38px; }
.icon-btn:disabled { opacity: .3; }
.icon-btn.flip svg { transform: rotate(180deg); }
.stepper output { white-space: nowrap; }
.stepper output small { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.group h2 small.hint { display: inline; font-family: var(--sans); font-size: 13px; font-weight: 500; }
.chips.presets { flex-wrap: nowrap; gap: 6px; }
.chips.presets .chip { padding: 0 11px; font-size: 13.5px; white-space: nowrap; }
.ob-foot .btn-soft svg { margin-left: 4px; }
.wk-pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; }
.wk-pager .wk-date { font-family: var(--display); font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wk-pager .t { flex: 1; text-align: center; }
.wk-pager strong { display: block; font-family: var(--display); font-size: 21px; font-weight: 600; }
.wk-pager strong span { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--ink-2); }
.wk-pager small { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.wk-dots { display: flex; justify-content: center; gap: 6px; margin-top: -4px; }
.wk-dots span { width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--surface-3); transition: width var(--t) var(--ease), background-color var(--t) var(--ease); }
.wk-dots span.seen { background: rgba(var(--brand-rgb), .4); }
.wk-dots span.on { width: 18px; background: var(--brand); }
.day-row .dnum { font-weight: 500; color: var(--ink-2); }
.day-row strong small { display: inline; margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
/* jours hors période : même carte blanche que les autres, contenu grisé */
.day-row.off { position: relative; }
.day-row.off > * { opacity: .38; }
.day-row.off .chip { background: var(--surface-2); color: var(--ink-2); }
.ob-foot .btn-soft { box-shadow: var(--sh-1); }
.bchips { gap: 10px; }
.chip.bchip { flex-direction: column; justify-content: center; gap: 0; min-height: 56px; padding: 6px 18px; line-height: 1.15; font-weight: 700; }
.chip.bchip small { font-size: 12px; font-weight: 600; opacity: .75; }
.notice.tight { background: var(--warn-tint); color: var(--warn-ink); }
.spinner.sm { display: inline-block; width: 14px; height: 14px; margin: 0 6px -2px 0; border-width: 2px; }

/* ===== Accueil : prochain repas, calendrier ===== */
.meal-hero { padding: 0; }
.meal-hero .hero-hit { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.meal-hero .hero-hit:active { transform: none; }
.meal-hero .photo { position: relative; }
.meal-hero .ph-tl { position: absolute; left: 14px; top: 14px; }
.meal-hero .ph-br { position: absolute; right: 14px; bottom: 14px; }
.meal-hero .ph-br svg { width: 13px; height: 13px; color: var(--brand); }
.meal-hero .body { padding-bottom: 12px; }
.hero-macros { padding: 0 20px; }
.hero-macros .macros { margin-top: 0; }
.hero-actions { display: flex; gap: 10px; padding: 16px 20px 20px; }
.hero-actions .btn { flex: 1; }
.hero-actions .btn-primary { flex: 1.4; }
.hero-actions .btn svg { width: 20px; height: 20px; margin-right: 6px; }
.courses-card { margin-top: 16px; }
.home .suggest { margin-top: 16px; }

.cal { margin-top: 20px; padding: 14px 14px 12px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-1); }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-title { font-family: var(--display); font-size: 20px; font-weight: 600; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow { margin-top: 8px; }
.cal-dow span { text-align: center; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; color: var(--ink-3); padding-bottom: 6px; }
.cal-grid { row-gap: 2px; }
.cal-day { position: relative; height: 46px; border: 0; padding: 4px 0 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; font-weight: 600;
  font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: center; gap: 3px; border-radius: 12px; cursor: default; }
.cal-day.in { background: rgba(var(--brand-rgb), .07); border-radius: 0; }
.cal-day.in.start, .cal-day.in:nth-child(7n+1) { border-top-left-radius: 12px; border-bottom-left-radius: 12px; }
.cal-day.in.end, .cal-day.in:nth-child(7n) { border-top-right-radius: 12px; border-bottom-right-radius: 12px; }
.cal-day.has { cursor: pointer; }
.cal-day.other .n { opacity: .35; }
.cal-day.past { color: var(--ink-3); }
.cal-day.past .n { opacity: .55; }
.cal-day.past .dot { opacity: .45; }
.cal-day.past.has:not(.other) { color: var(--ink); }   /* jour passé avec des plats : bien lisible, on peut l'ouvrir */
.cal-day.past.has:not(.other) .n, .cal-day.past.has .dot { opacity: 1; }
.cal-day.today .n { width: 30px; height: 30px; margin-top: -3px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--brand); color: var(--brand-ink); }
.cal-day .dots { display: flex; gap: 3px; height: 6px; }
/* repères du calendrier : soir = vert, midi = vert clair, cuisiné = taupe, prévu sans plat = cercle vide */
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.dot.midi { background: rgba(var(--brand-rgb), .45); }
.dot.soir { background: var(--brand); }
.dot.planned { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.dot.done { background: var(--ink-2); }
.cal-legend { display: flex; justify-content: center; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--ink-2); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }

.day-meals { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.dm { display: block; padding: 14px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-1); color: inherit; text-decoration: none; }
.dm .dm-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.dm .dm-row .thumb { width: 56px; height: 56px; }
.dm .dm-body { flex: 1; min-width: 0; }
.dm .dm-body strong { display: block; font-size: 16px; line-height: 21px; }
.dm .dm-body small { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.dm .macros { margin-top: 12px; }
.dm.planned { display: flex; align-items: center; gap: 12px; }
.when-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 700;
  background: var(--surface-2); color: var(--ink-2); }
.when-tag.midi { background: var(--brand-tint); color: var(--brand-ink); }

/* ===== Semaine : jour par jour ===== */
.days-list { margin-top: 18px; display: flex; flex-direction: column; gap: 20px; }
.wk-sep { margin: 6px 0 -8px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.wd { display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 12px; }
.wd-title { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; margin-bottom: 2px; font-family: var(--display); font-size: 20px; font-weight: 700; line-height: 26px;
  box-shadow: inset 0 -1px 0 var(--line); }
.wd.past .wd-title { color: var(--ink-2); }
.wd.past .wd-title .dn { text-decoration: line-through; text-decoration-thickness: 2px; }
.wd.past .meal { opacity: .5; filter: grayscale(.6); }
.wd.today .wd-title { color: var(--brand-ink); box-shadow: inset 0 -2px 0 var(--brand); }
.days-list .meal { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; padding: 8px 10px 8px 8px; }
.days-list .meal .mwhen { font-size: 12.5px; line-height: 15px; font-weight: 700; color: var(--ink-2); }
.days-list .meal .mwhen.midi { color: var(--brand-ink); }
.days-list .meal .thumb-btn { border: 0; padding: 0; background: none; border-radius: var(--r-sm); }
.days-list .meal .thumb { width: 56px; height: 56px; }
.wd-title .pill { font-family: var(--sans); font-size: 11px; }
.days-list .meal .mt { min-width: 0; border: 0; background: none; padding: 0; text-align: left; color: inherit; font: inherit; display: flex; flex-direction: column; gap: 2px; }
.days-list .meal .mside { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.more-btn { width: 32px; height: 26px; border: 0; padding: 0; background: none; color: var(--ink-3); display: flex; align-items: center; justify-content: center; }
.rate-chip { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 8px; border: 0; border-radius: var(--r-pill); background: var(--surface-2);
  color: var(--ink-2); font: inherit; font-size: 12px; font-weight: 600; white-space: nowrap; }
.rate-chip svg { width: 12px; height: 12px; color: var(--ink-3); }
.rate-chip.on { background: var(--acc-tint); color: var(--acc-ink); }
.rate-chip.on svg { color: var(--acc); }
.rate-chip span { font-weight: 800; }

/* ===== Notes sur 10 : barre à faire glisser, dégradé ambre → vert (jamais de rouge) ===== */
.rate-slider { margin-top: 18px; }
.rate-val { display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.rate-val strong { display: inline-block; font-family: var(--display); font-size: 44px; line-height: 50px; font-weight: 700; color: var(--ink-c);
  font-variant-numeric: tabular-nums; transition: color .15s; }
.rate-val span { font-size: 18px; font-weight: 600; color: var(--ink-2); }
.rate-val em { margin-left: 10px; font-family: var(--display); font-style: normal; font-size: 19px; font-weight: 700; color: var(--ink-c); transition: color .15s; }
input[type="range"].rate-range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 48px; margin: 6px 0 0; background: transparent; touch-action: pan-y; cursor: pointer; }
input[type="range"].rate-range:focus { outline: none; }
input[type="range"].rate-range::-webkit-slider-runnable-track { height: 14px; border-radius: 7px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12);
  background: linear-gradient(90deg, #D98A2B 0%, #A3A64B 50%, #2B825B 100%); }
input[type="range"].rate-range::-moz-range-track { height: 14px; border-radius: 7px; background: linear-gradient(90deg, #D98A2B 0%, #A3A64B 50%, #2B825B 100%); }
input[type="range"].rate-range::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; margin-top: -10px; border-radius: 50%; background: #fff;
  border: 0; box-shadow: 0 0 0 5px var(--c), 0 4px 12px rgba(36, 33, 30, .2); transition: transform var(--t-fast) var(--spring); }
input[type="range"].rate-range::-moz-range-thumb { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 5px var(--c), 0 4px 12px rgba(36, 33, 30, .2); }
input[type="range"].rate-range:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type="range"].rate-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px var(--c), 0 0 0 9px rgba(var(--brand-rgb), .35); }
input[type="range"].rate-range::-moz-range-progress { background: transparent; }
.rate-scale { display: flex; justify-content: space-between; padding: 0 11px; margin-top: -2px; font-size: 12px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rate-scale span { width: 12px; text-align: center; }
.rate-ok { margin-top: 18px; }
.rate-msg { margin-top: 10px; text-align: center; }
.rate-box { margin-top: 18px; padding: 16px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-1); text-align: left; }
.rate-box > strong { font-size: 16px; }
@media (prefers-reduced-motion: reduce) { .wd-title, .cal-grid { animation: none !important; } }
.stepper output small { display: inline; }
.mwhen .freeze { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-2); font-weight: 600; }
.mwhen .freeze svg, .notice svg { width: 12px; height: 12px; vertical-align: -1px; }
.day-row.off .chip:disabled { opacity: 1; }
.notice strong { white-space: nowrap; }

/* ===== Plusieurs listes de repas : barre de listes, création, gestion ===== */
button.suggest { width: 100%; border: 0; text-align: left; font: inherit; color: inherit; background: var(--surface); box-shadow: var(--sh-1); }
.plan-bar { display: flex; gap: 8px; margin: 16px -20px 0; padding: 2px 20px 4px; overflow-x: auto; scrollbar-width: none; scroll-padding: 0 20px; }
.plan-bar::-webkit-scrollbar { display: none; }
.plan-chip { flex: none; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-height: 52px; max-width: 200px;
  padding: 7px 16px; border: 0; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-align: left;
  transition: background-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t-fast) var(--ease); }
.plan-chip:active { transform: scale(.97); }
.plan-chip strong { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-chip small { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.plan-chip strong svg { width: 16px; height: 16px; }
.plan-chip[aria-pressed="true"] { background: var(--brand-tint); box-shadow: inset 0 0 0 1.5px var(--brand); }
.plan-chip[aria-pressed="true"] strong { color: var(--brand-ink); }
.merge-box { margin-top: 14px; padding: 14px 16px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-1); }
.merge-box .seg { margin-top: 10px; }
.it-from { display: block; margin-top: 3px; font-size: 12.5px; line-height: 17px; color: var(--brand-ink); font-weight: 600; }
.merge-box .seg button { padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Cartes « Mes listes » (accueil) : une carte par liste, l'une sous l'autre */
.plan-cards { display: flex; flex-direction: column; gap: 12px; }
.plan-cards .section-title { margin: 22px 0 0; display: flex; align-items: baseline; gap: 8px; }
.plan-cards .section-title small { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.plan-card { position: relative; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-1); }
.pc-open { display: flex; flex-direction: column; align-items: stretch; gap: 6px; width: 100%; padding: 16px 18px 14px; border: 0; border-radius: inherit;
  background: none; color: inherit; font: inherit; text-align: left; transition: transform var(--t-fast) var(--ease); }
.pc-open:active { transform: scale(.985); }
.pc-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-right: 44px; }
.pc-name { font-family: var(--display); font-size: 21px; line-height: 26px; font-weight: 700; overflow-wrap: anywhere; }
.pc-meta { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.pc-thumbs { display: flex; gap: 6px; margin: 4px 0 2px; }
.pc-thumbs .thumb { width: 48px; height: 48px; border-radius: 12px; }
.pc-more-n { width: 48px; height: 48px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 12px;
  background: var(--surface-2); color: var(--ink-2); font-size: 14px; font-weight: 600; }
.pc-line { font-size: 15px; line-height: 21px; }
.pc-line strong { color: var(--brand-ink); font-weight: 600; }
.pc-cta { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 15px; font-weight: 600; color: var(--brand-ink); }
.pc-cta svg { width: 16px; height: 16px; }
.pc-menu { position: absolute; top: 10px; right: 10px; background: transparent; box-shadow: none; color: var(--ink-2); }
.plan-card.add { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px; border: 0; background: transparent; color: inherit; font: inherit;
  text-align: left; box-shadow: inset 0 0 0 1.5px var(--surface-3); transition: background-color var(--t) var(--ease), transform var(--t-fast) var(--ease); }
.plan-card.add:active { transform: scale(.985); background: var(--surface-2); }
.plan-card.add .ico { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 22px;
  background: var(--brand-tint); color: var(--brand-ink); }
.plan-card.add strong { display: block; font-size: 16px; color: var(--brand-ink); }
.plan-card.add span:last-child { font-size: 14px; line-height: 20px; color: var(--ink-2); }
/* Options d'une liste */
.pm-acts { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.pm-acts .suggest { margin-top: 0; }
.pm-acts .suggest .ico { background: var(--surface-2); color: var(--ink); }
.pm-acts .suggest.danger .ico { background: var(--warn-tint); color: var(--warn-ink); }
.pm-acts .suggest.danger strong { color: var(--warn-ink); }
/* bouton ⋯ de la liste, en haut à droite de l'écran Semaine */
.wk-head { position: relative; }
.wk-head .eyebrow { padding-right: 40px; }
.wk-opts { position: absolute; top: -12px; right: -12px; background: transparent; box-shadow: none; color: var(--ink-2); }
.lists-hint { margin-top: 6px; }
.lists-hint svg { width: 18px; height: 18px; vertical-align: -4px; }

/* ===== Paramètres ===== */
.settings-page .section-title { margin-top: 26px; }
.set-note { margin-top: 8px; }
.settings .set-field { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 16px; cursor: text; }
.settings .set-field .text-in { width: 46%; height: 44px; padding: 0 12px; text-align: right; box-shadow: none; background: var(--surface-2); font-size: 16px; }
.settings .set-static { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 16px; }
.settings .sw { position: relative; width: 50px; height: 30px; flex: none; border-radius: 15px; background: var(--surface-3);
  transition: background-color var(--t) var(--ease); }
.settings .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 12px; background: #fff;
  box-shadow: 0 1px 3px rgba(36, 33, 30, .25); transition: transform var(--t) var(--spring); }
.settings [aria-checked="true"] .sw { background: var(--brand); }
.settings [aria-checked="true"] .sw::after { transform: translateX(20px); }
.lang-list { margin-top: 14px; }
.lang-list button:disabled { opacity: 1; color: var(--ink-2); cursor: default; }
.lang-list .tick { color: var(--brand-ink); display: flex; }
.lang-list .tick svg { width: 20px; height: 20px; }
.hist-group .section-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 24px; }
.hist-group .section-title small { font-size: 13px; font-weight: 500; color: var(--ink-2); }

/* ---------- mes économies : carte de l'accueil (semaine, mois, année) ---------- */
.sv-card { margin-top: 18px; padding: 14px 18px 18px; border-radius: var(--r-card); background: var(--ok-tint); color: var(--ok-ink); }
.sv-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sv-title { font-size: 15px; line-height: 20px; font-weight: 700; }
.sv-more { display: inline-flex; align-items: center; gap: 2px; min-height: 36px; margin-right: -4px; font-size: 14px; font-weight: 600; color: var(--ok-ink); text-decoration: none; }
.sv-more svg { width: 16px; height: 16px; }
.sv-card .seg, .sv-seg-page { margin-top: 8px; }
.sv-card .seg { background: rgba(255, 255, 255, .62); }
.sv-card .seg button { height: 34px; color: var(--ok-ink); }
.sv-card .seg button[aria-pressed="true"] { color: var(--ink); }
:root[data-theme="dark"] .sv-card .seg { background: rgba(0, 0, 0, .28); }
.sv-head { margin-top: 14px; font-size: 13px; line-height: 18px; font-weight: 600; }
.sv-big { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.sv-big .odo { font-size: 40px; }
.sv-big .cur { font-family: var(--display); font-weight: 700; font-size: 26px; }
.sv-line { margin-top: 4px; font-size: 14px; line-height: 20px; }
.sv-ask { display: block; margin-top: 8px; border: 0; background: none; padding: 6px 0; text-align: left; font-size: 14px; font-weight: 600; color: var(--ok-ink);
  text-decoration: underline; text-underline-offset: 3px; }

/* ---------- mes économies : page ---------- */
.history .sv-seg-page { margin-top: 14px; }
.sv-hero { margin-top: 14px; }
.sv-hero .big .odo { font-size: 40px; }
.sv-rate { margin-top: 12px; padding-top: 12px; box-shadow: inset 0 1px 0 rgba(var(--brand-rgb), .2); font-size: 14px; line-height: 20px; }
.sv-ref { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 10px; }
.sv-ref .link { flex: none; padding: 4px 0; font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
.sv-bars.year { gap: 4px; padding: 0; }
.bars .b.none .v { background: var(--surface-3); }
.bars .b.future { opacity: .45; }
.sv-list .sv-month { padding: 14px 16px 2px; font-size: 12px; line-height: 16px; font-weight: 700; color: var(--ink-2); }
.sv-list .wk-item .v small { color: var(--ink-2); }
.sv-list .wk-item .v small.good { color: var(--ok-ink); }

/* ---------- mode magasin : choisir l'enseigne de la liste ---------- */
.st-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.st-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 12px 10px 10px; border: 0; border-radius: var(--r-md);
  background: var(--surface); box-shadow: var(--sh-1); text-align: left; color: var(--ink); font: inherit;
  animation: rise var(--t-slow) var(--ease) both; transition: transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease), opacity var(--t) ease; }
.st-row:active { transform: scale(.985); }
.st-row:disabled { opacity: .45; }
.st-row.current, .st-row.working { background: var(--brand-tint); box-shadow: inset 0 0 0 1.5px var(--brand); }
.st-row.skel { pointer-events: none; }
.st-logo { width: 40px; height: 40px; flex: none; border-radius: 10px; object-fit: contain; padding: 4px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.st-main { flex: 1; min-width: 0; }
.st-main strong { display: block; font-size: 16px; line-height: 21px; }
.st-main small { display: block; margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.st-main .good { color: var(--ok-ink); font-weight: 600; }
.st-price { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.st-tick { width: 18px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--brand); }
.st-tick .spinner.sm { margin: 0; }
.habit-in { display: flex; align-items: center; gap: 6px; flex: none; font-weight: 600; }
.habit-in .text-in { width: 88px; height: 44px; text-align: right; }
.sv-card + .lists-hint, .sv-row + .lists-hint { margin-top: 16px; }

/* Accueil : économies en une ligne sobre */
.sv-row { display: flex; align-items: center; gap: 12px; min-height: 56px; margin-top: 18px; padding: 10px 14px; box-sizing: border-box; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--sh-1); color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.sv-row:active { background: var(--surface-2); }
.sv-ico { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--ok-tint); color: var(--ok-ink); display: flex; align-items: center; justify-content: center; }
.sv-ico svg { width: 18px; height: 18px; }
.sv-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sv-top1 { font-size: 15px; line-height: 20px; font-weight: 600; }
.sv-top1 .amt { color: var(--ok-ink); }
.sv-sub { font-size: 13px; line-height: 18px; color: var(--ink-2); }
.sv-chev { flex: none; display: flex; color: var(--ink-2); }
.sv-chev svg { width: 18px; height: 18px; }
.hist-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.hist-top .rc-count { margin-top: 0; }
.hist-clear { flex: none; min-height: 40px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: var(--warn-tint); color: var(--warn-ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.sv-amt { flex: none; font-family: var(--display); font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -.025em; color: var(--ok-ink); white-space: nowrap; }
.sv-row.has-amt { gap: 10px; padding-left: 12px; padding-right: 14px; }
.sv-row.has-amt .sv-chev { display: none; }   /* toute la ligne s'ouvre : la flèche laisse sa place au texte */
.sv-amt.long { font-size: 25px; letter-spacing: -.03em; }
.sv-amt.long.xl { font-size: 23px; }   /* 10 € et plus : le texte à droite garde sa place */
.sv-row.has-amt .sv-txt { overflow: hidden; }
.sv-row.has-amt .sv-top1, .sv-row.has-amt .sv-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-row.has-amt .sv-top1 { font-size: 14px; line-height: 20px; }

/* Page « Mes économies » : sans l'appli / avec l'appli */
.cmp { margin-top: 16px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
/* « Depuis le début » : le total de toutes les listes, la seule chose en vert plein de la page */
.life { margin-top: 12px; margin-bottom: 18px; padding: 20px 20px 18px; border-radius: var(--r-card); background: var(--brand); color: #fff; }
.life-k { font-size: 15px; line-height: 20px; font-weight: 600; opacity: .9; }
.life-v { margin-top: 4px; display: flex; align-items: baseline; gap: 6px; font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 50px;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.life-p { margin-top: 4px; font-size: 15px; line-height: 21px; opacity: .92; }
.life-goal { margin-top: 16px; }
.life-track { height: 8px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .24); overflow: hidden; }
.life-fill { height: 100%; border-radius: var(--r-pill); background: #fff; transform-origin: left; animation: cmpGrow .9s cubic-bezier(.2, .8, .2, 1) .15s both; }
.life-goal small { display: block; margin-top: 8px; font-size: 13px; line-height: 18px; font-weight: 600; opacity: .9; }
.life.calm { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.life.calm .life-k { color: var(--ok-ink); opacity: 1; }
.life.calm .life-h { margin-top: 4px; font-family: var(--display); font-weight: 700; font-size: 21px; line-height: 27px; }
.life.calm .life-p { color: var(--ink-2); opacity: 1; }
.life.calm .life-v { color: var(--ink-2); }
.life.calm .btn { margin-top: 16px; }
.cmp-title { font-size: 17px; line-height: 24px; font-weight: 600; }
.cmp-row { display: flex; flex-direction: column; gap: 6px; }
.cmp-lbl { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; line-height: 20px; color: var(--ink-2); }
.cmp-lbl .strong { color: var(--ink); font-weight: 600; }
.cmp-row:first-of-type .cmp-lbl { color: var(--warn-ink); }
.cmp-lbl b { font-weight: 600; }
.cmp-row:last-of-type .cmp-lbl b { color: var(--ink); font-weight: 700; }
.cmp-track { height: 14px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.cmp-fill { height: 100%; border-radius: var(--r-pill); transform-origin: left; animation: cmpGrow .7s cubic-bezier(.2, .8, .2, 1) both; }
.cmp-fill.ref { background: var(--warn); }
.cmp-fill.app { background: var(--ok); animation-delay: .12s; }
@keyframes cmpGrow { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .cmp-fill { animation: none; } }
.cmp-res { display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: var(--r-md); background: var(--ok-tint); color: var(--ok-ink); font-size: 15px; line-height: 20px; }
.cmp-res strong { font-family: var(--display); font-size: 32px; line-height: 38px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 6px; }
.cmp-res.calm { background: var(--surface-2); color: var(--ink-2); }
.cmp-res.calm strong { font-size: 28px; line-height: 34px; color: var(--ink); }
.cmp-rate { margin-top: 14px; font-size: 15px; line-height: 22px; color: var(--ink-2); }
.cmp-rate b { color: var(--ok-ink); font-weight: 700; }
.wk-cards { display: flex; flex-direction: column; gap: 10px; }
.wk-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.wk-ico { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); display: flex; align-items: center; justify-content: center; }
.wk-ico.good { background: var(--ok-tint); color: var(--ok-ink); }
.wk-ico svg { width: 18px; height: 18px; }
.wk-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wk-t strong { font-size: 16px; line-height: 22px; font-weight: 600; }
.wk-t small { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.wk-pill { flex: none; padding: 5px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font-size: 14px; font-weight: 600; white-space: nowrap; }
.wk-pill.good { background: var(--ok-tint); color: var(--ok-ink); font-weight: 700; }
.history .sv-ref { display: block; margin-top: 18px; }
.history .sv-ref .link { display: inline; padding: 0; }
.wk-t .nw { white-space: nowrap; }
.cmp-lbl:has(.strong) b { color: var(--ink); font-weight: 700; }
.cmp-lbl small { display: block; font-size: 13px; line-height: 18px; font-weight: 500; opacity: .85; }
.cmp-lbl b { white-space: nowrap; }

/* Accueil, version « la photo d'abord » : grande photo, bandeau effet verre, la suite de la semaine en photos */
.meal-hero.a-hero { position: relative; margin-top: 18px; border-radius: 28px; background: var(--surface-2);
  box-shadow: 0 2px 6px rgba(36, 33, 30, .06), 0 14px 32px rgba(36, 33, 30, .12); }
.a-hero .photo { height: 360px; }
.a-hero .ph-chips { position: absolute; left: 14px; top: 14px; display: flex; gap: 8px; pointer-events: none; }
.a-hero .ph-chips .pill, .a-hero .ph-tr { height: 32px; padding: 0 12px; gap: 5px; font-size: 14px; font-weight: 700; }
.a-hero .ph-tr { position: absolute; right: 14px; top: 14px; pointer-events: none; }
.a-hero .ph-tr svg { width: 13px; height: 13px; color: var(--brand); }
.hero-glass { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px;
  padding: 10px 10px 10px 14px; border-radius: 20px; background: rgba(255, 255, 255, .84); cursor: pointer;
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 4px 14px rgba(36, 33, 30, .10); }
.hero-glass .dish { margin: 0; font-family: var(--display); font-weight: 800; font-size: 19px; line-height: 24px; letter-spacing: -.01em; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-glass .hero-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-glass .meta { margin: 0; font-size: 14px; line-height: 19px; color: var(--ink-2); }
.hero-glass .meta b { color: var(--ink); font-weight: 700; }
.hero-glass .meta .sep { display: inline-block; width: 10px; }
.hero-glass .btn { flex: none; height: 44px; padding: 0 18px; font-size: 15px; font-weight: 700; }
.hero-glass .btn svg { width: 18px; height: 18px; }
:root[data-theme="dark"] .hero-glass { background: rgba(26, 23, 20, .7); }
.a-hero + .sv-row { margin-top: 12px; }
.upnext { margin-top: 22px; }
.up-head { display: flex; align-items: baseline; justify-content: space-between; }
.up-head h2 { margin: 0; font-size: 17px; line-height: 22px; font-weight: 800; }
.up-head a { padding: 8px 0; font-size: 14px; font-weight: 600; color: var(--brand-ink); text-decoration: none; }
.up-row { display: flex; gap: 10px; margin: 4px -20px 0; padding: 2px 20px 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 20px; scrollbar-width: none; }
.up-row::-webkit-scrollbar { display: none; }
.up-card { flex: none; width: 116px; scroll-snap-align: start; color: inherit; text-decoration: none; transition: transform var(--t-fast) var(--ease); }
.up-card:active { transform: scale(.97); }
.up-ph.thumb { width: 116px; height: 88px; border-radius: 18px; box-shadow: 0 6px 16px rgba(36, 33, 30, .12); }
.up-when { display: block; margin-top: 7px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink-2); }
.up-t { display: block; font-size: 14px; line-height: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== Paramètres, comme une vraie application : carte profil, lignes avec icône, séparateurs décalés ===== */
.prof-card { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 14px; padding: 16px; border: 0; border-radius: var(--r-card);
  background: var(--surface); box-shadow: var(--sh-1); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
.prof-card:active { transform: scale(.985); background: var(--surface-2); }
.prof-card .avatar { width: 56px; height: 56px; font-size: 24px; font-weight: 700; background: var(--brand-tint); color: var(--brand-ink); box-shadow: none; }
.prof-card .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.prof-card .t strong { font-family: var(--display); font-size: 19px; line-height: 24px; font-weight: 700; }
.prof-card .t small { margin-top: 2px; font-size: 14px; line-height: 19px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof-card .chev { flex: none; display: flex; color: var(--ink-3); }
.s-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--ink); }
.settings.brand .s-ic { background: var(--brand-tint); color: var(--brand-ink); }
.s-ic.warn { background: var(--warn-tint); color: var(--warn-ink); }
.settings-page .settings > * + * { box-shadow: none; position: relative; }
.settings-page .settings > * + *::before { content: ""; position: absolute; top: 0; left: 62px; right: 0; height: 1px; background: var(--line); pointer-events: none; }
.settings-page .seg { margin-top: 10px; }
.set-foot { margin: 28px 0 0; text-align: center; }
/* « i » à côté du titre de Mes économies */
.page-head .title.eco-title { flex: none; }
.icon-btn.info-i { width: 34px; height: 34px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-2); }
.icon-btn.info-i svg { width: 18px; height: 18px; }
.how-list b { color: var(--ink); font-weight: 700; white-space: nowrap; }
.how-list { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: how; display: flex; flex-direction: column; gap: 14px; }
.how-list li { counter-increment: how; position: relative; min-height: 30px; padding-left: 44px; font-size: 15px; line-height: 21px; color: var(--ink-2); }
.how-list li::before { content: counter(how); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand-tint); color: var(--brand-ink); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.how-list strong { display: block; color: var(--ink); font-size: 16px; line-height: 22px; }

/* ===== Recherche avec suggestions (placard, liste de courses) ===== */
.ac { position: relative; }
.ac-field { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; border-radius: var(--r-md); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); cursor: text; }
.ac-field:focus-within { box-shadow: inset 0 0 0 2px var(--brand); }
.ac-field svg { flex: none; }
.ac-in { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); outline: none; }
.ac-in::placeholder { color: var(--ink-3); }
.ac-in::-webkit-search-cancel-button { display: none; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; margin: 0; padding: 6px; list-style: none; max-height: 320px; overflow-y: auto;
  border-radius: var(--r-md); background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 16px 40px rgba(36, 33, 30, .16); }
.ac-list button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; padding: 8px 12px; border: 0;
  border-radius: 12px; background: transparent; color: var(--ink); font: inherit; font-size: 15px; text-align: left; }
.ac-list button:active, .ac-list button:hover { background: var(--surface-2); }
.ac-t { display: flex; flex-direction: column; min-width: 0; font-weight: 600; }
.ac-t small, .ac-list button > small { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.ac-p { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.ac-free .ac-t { color: var(--brand-ink); }
.ac-msg { padding: 12px; font-size: 14px; color: var(--ink-2); }

/* « Quelle quantité ? » */
.dose { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.dose .text-in { flex: 1; min-width: 0; font-size: 20px; font-weight: 600; text-align: right; }
.dose .seg { flex: none; min-width: 150px; }
.dose-u { flex: none; font-size: 16px; font-weight: 600; color: var(--ink-2); }

/* ===== Mon placard ===== */
.stock-add { margin-top: 14px; }
.stock-list { margin-top: 12px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-1); overflow: hidden; }
.stock-row { display: flex; align-items: center; }
.stock-row + .stock-row { box-shadow: inset 0 1px 0 var(--line); }
.stock-edit { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 8px 4px 8px 16px;
  border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; }
.stock-edit:active { background: var(--surface-2); }
.stock-edit .t { min-width: 0; font-size: 15px; line-height: 20px; }
.stock-edit .t strong { font-weight: 600; }
.stock-edit .q { flex: none; padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stock-del { flex: none; width: 44px; height: 44px; margin-right: 4px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--ink-3); }
.stock-del:active { background: var(--surface-2); }
.stock-home { margin-top: 26px; }
.stock-sub { margin: 2px 0 12px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.stock-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.stock-chip { display: inline-flex; align-items: baseline; gap: 6px; min-height: 36px; padding: 7px 12px; border-radius: var(--r-pill); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; }
.stock-chip small { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.stock-chip.more { color: var(--brand-ink); }
.stock-cta { margin-top: 14px; }
.tocook-link { display: block; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--brand-ink); text-decoration: none; }

/* dans la liste de courses : rappel coloré du placard, articles ajoutés */
.it-stock { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 3px 10px 3px 8px; border-radius: var(--r-pill);
  background: var(--warn-tint); color: var(--warn-ink); font-size: 12.5px; line-height: 17px; font-weight: 600; }
.it-stock svg { width: 15px; height: 15px; flex: none; }
.store-mode .it-stock { font-size: 15px; line-height: 21px; }
.item .it-mine { color: var(--brand-ink); font-weight: 600; }
.x-acts { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.x-acts .have { margin-top: 0; }
.x-step { display: inline-flex; align-items: center; gap: 2px; border-radius: var(--r-pill); background: var(--surface-2); }
.x-step button { width: 32px; height: 30px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink); font-size: 17px; font-weight: 600; }
.x-step button:disabled { opacity: .35; }
.x-step output { min-width: 18px; text-align: center; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.list-add { margin-top: 14px; }

/* ===== Cuisiner avec ce que j'ai ===== */
.cookwith-card { display: flex; align-items: center; gap: 14px; margin: 10px 0 14px; padding: 14px 14px 14px 16px; border-radius: var(--r-card);
  background: var(--brand-tint); color: var(--ink); text-decoration: none; }
.cookwith-card .ic { flex: none; width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--brand); color: #fff; }
.cookwith-card .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cookwith-card .t strong { font-size: 16px; line-height: 21px; }
.cookwith-card .t small { margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--brand-ink); }
.cookwith-card .chev { flex: none; color: var(--brand-ink); display: flex; }
.cookwith-card:active { transform: scale(.985); }
.restes .section-title:first-of-type { margin-top: 22px; }
.restes-foot { position: sticky; bottom: 0; margin-top: auto; padding-top: 18px; padding-bottom: 4px; background: linear-gradient(to top, var(--bg) 78%, rgba(247, 246, 242, 0)); }
:root[data-theme="dark"] .restes-foot { background: linear-gradient(to top, var(--bg) 78%, rgba(22, 21, 20, 0)); }
.tocook { border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-1); overflow: hidden; }
.tc-row { padding: 12px 12px 12px 14px; }
.tc-row + .tc-row { box-shadow: inset 0 1px 0 var(--line); }
.tc-main { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.tc-main .thumb { width: 52px; height: 52px; }
.tc-main .t { min-width: 0; display: flex; flex-direction: column; }
.tc-main .t strong { font-size: 15px; line-height: 20px; }
.tc-main .t small { font-size: 13px; color: var(--ink-2); }
.tc-acts { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.restes-deck .ch-title { flex: 1; margin: 0; text-align: center; font-family: var(--display); font-size: 17px; font-weight: 700; }
.restes-deck .ch-top .fini { flex: none; min-width: 64px; }
.pantry-page .tabs { margin-top: 10px; }
.tabs .tab-n { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; margin-left: 8px; padding: 0 6px;
  border-radius: var(--r-pill); background: var(--brand); color: var(--on-brand); font-size: 12px; font-weight: 700; }
.pantry-empty { margin-top: 28px; }
.pantry-empty .btn { margin-top: 16px; }
.restes-deck .ch-top .fini.on { background: var(--brand); color: var(--on-brand); }
.restes-deck .sc-band { gap: 2px; }
.restes-deck .scard .dish { margin-bottom: 2px; }
.restes-deck .scard .meta { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.restes-deck .scard .meta.opt { font-size: 13px; color: var(--ink-3); -webkit-line-clamp: 1; }
.restes-deck .deck-empty .btn { margin-top: 4px; }
/* idées sans photo : le plat dessiné vu de dessus, aux couleurs de ses ingrédients */
.art { position: absolute; inset: 0; }
.art svg { display: block; width: 100%; height: 100%; }
.idea-page .r-meta { margin-top: 6px; }
.idea-more { margin-top: 12px; padding: 12px 16px; border-radius: var(--r-md); background: var(--surface-2); font-size: 14px; line-height: 20px; color: var(--ink-2); }
.idea-more strong { display: block; margin-bottom: 2px; color: var(--ink); font-weight: 600; }

/* ===== Pages légales ===== */
.legal-date { margin-top: 6px; }
.legal { margin-top: 8px; }
.legal h2 { margin: 24px 0 8px; font-size: 17px; line-height: 23px; font-weight: 700; }
.legal p, .legal li { font-size: 15px; line-height: 23px; color: var(--ink-2); }
.legal p + p, .legal ul + p { margin-top: 10px; }
.legal ul { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal .lead { margin-top: 14px; padding: 14px 16px; border-radius: var(--r-md); background: var(--brand-tint); color: var(--brand-ink); font-weight: 600; }
.legal .uid code { display: inline-block; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); font-size: 14px; color: var(--ink); user-select: all; }
.legal a { color: var(--brand-ink); font-weight: 600; }
.legal .todo { padding: 1px 6px; border-radius: 6px; background: var(--warn-tint); color: var(--warn-ink); font-weight: 600; }
.legal-links { display: flex; flex-direction: column; gap: 4px; margin-top: 28px; padding-top: 16px; box-shadow: inset 0 1px 0 var(--line); }
.legal-links a { padding: 10px 0; font-size: 15px; font-weight: 600; color: var(--brand-ink); text-decoration: none; }
