@font-face { font-family: "Geist"; src: url("polices/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("polices/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("polices/BricolageGrotesque-Variable.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }


:root {
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r-petit: 8px; --r: 12px; --r-m: 18px; --r-l: 24px; --r-pill: 999px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --display: "Bricolage", "Geist", ui-sans-serif, system-ui, sans-serif;
  --t-xs: 12px; --t-s: 14px; --t-m: 15px; --t-l: 17px; --t-xl: 22px; --t-2xl: 30px;
  --hit: 44px; --btn: 52px; --nav-h: 60px; --bande-h: 52px;
  --vite: .18s; --dur: .3s; --ease: cubic-bezier(.2, .9, .2, 1); --rebond: cubic-bezier(.3, 1.6, .5, 1);

  /* Terracotta : crème chaud, encre brune, terracotta pour signaler. L'encre agit (boutons), le terracotta signale. */
  --bg: #FBF6EE; --surface: #FFFFFF; --carte: #FFFFFF; --ink: #2A1E15; --text2: #4A3A2D; --mute: #7A6656;
  --hair: rgba(42, 30, 21, .08); --g1: #F4EADB; --g2: #EDE0CC; --g3: #E2CFB4; --bord: #9A846D;
  --lift: 0 1px 2px rgba(110, 62, 30, .08); --float: 0 2px 4px rgba(110, 62, 30, .06), 0 14px 32px -14px rgba(110, 62, 30, .28);
  --vif: #C9572E; --vif-survol: #B04A25; --vif-plein: #B04A25; --sur-vif: #FFFFFF; --vif-doux: #F9E7DA; --vif-encre: #A8401C;
  --accent: var(--ink); --on-accent: #FBF6EE; --accent-fort: #3D2D20; --autre: #9A5B2E; --on-autre: #FFFFFF;
  --alerte: #8A3B12; --on-alerte: #FFFFFF;
  --teinte: var(--vif-doux); --teinte-2: #F2D1BC; --menthe: #F6E8D7;
  --btn-fond: #2A1E15; --btn-texte: #FBF6EE; --btn-survol: #3D2D20;
  /* Choisi : terracotta plein (texte blanc à 5,5:1) */
  --choisi: var(--vif-plein); --choisi-texte: var(--sur-vif); --choisi-coche: var(--sur-vif); --trait-option: transparent; --cadre: #E2CFB4; --seg-on: #FFFFFF;
  --photo-fond: #F4EADB; --photo-filtre: none; --feuille: #FBF6EE; --bar: rgba(251, 246, 238, .92);
  --toast-fond: #2A1E15; --toast-texte: #FBF6EE; --toast-action: #F2A27C;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15130F; --surface: #24201B; --carte: #24201B; --ink: #F3EEE6; --text2: #D6CDC0; --mute: #A69B8C;
    --hair: rgba(255, 240, 220, .08); --g1: #1E1B17; --g2: #2A2620; --g3: #3E382F; --bord: #776D60;
    --lift: 0 0 0 1px rgba(255, 240, 220, .05); --float: 0 0 0 1px rgba(255, 240, 220, .07), 0 16px 36px -12px rgba(0, 0, 0, .7);
    --vif: #F2A27C; --vif-survol: #F5B391; --vif-plein: #F2A27C; --sur-vif: #2A1208; --vif-doux: #3A251B; --vif-encre: #F5B696;
    --accent: var(--ink); --on-accent: #15130F; --accent-fort: #FFFFFF; --autre: #E0A878; --on-autre: #20140A;
    --alerte: #F0A070; --on-alerte: #24120A;
    --teinte: var(--vif-doux); --teinte-2: #4A2E20; --menthe: #1F1914;
    --btn-fond: #F3EEE6; --btn-texte: #15130F; --btn-survol: #FFFFFF;
    --choisi: var(--vif-plein); --choisi-texte: var(--sur-vif); --choisi-coche: var(--sur-vif); --trait-option: #6B5E4E; --cadre: #0B0A08; --seg-on: #3E382F;
    --photo-fond: #1E1B17; --photo-filtre: brightness(.82) saturate(.95); --feuille: #24201B; --bar: rgba(21, 19, 15, .92);
    --toast-fond: #3E382F; --toast-texte: #F3EEE6; --toast-action: #F2A27C;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15130F; --surface: #24201B; --carte: #24201B; --ink: #F3EEE6; --text2: #D6CDC0; --mute: #A69B8C;
  --hair: rgba(255, 240, 220, .08); --g1: #1E1B17; --g2: #2A2620; --g3: #3E382F; --bord: #776D60;
  --lift: 0 0 0 1px rgba(255, 240, 220, .05); --float: 0 0 0 1px rgba(255, 240, 220, .07), 0 16px 36px -12px rgba(0, 0, 0, .7);
  --vif: #F2A27C; --vif-survol: #F5B391; --vif-plein: #F2A27C; --sur-vif: #2A1208; --vif-doux: #3A251B; --vif-encre: #F5B696;
  --accent: var(--ink); --on-accent: #15130F; --accent-fort: #FFFFFF; --autre: #E0A878; --on-autre: #20140A;
  --alerte: #F0A070; --on-alerte: #24120A;
  --teinte: var(--vif-doux); --teinte-2: #4A2E20; --menthe: #1F1914;
  --btn-fond: #F3EEE6; --btn-texte: #15130F; --btn-survol: #FFFFFF;
  --choisi: var(--vif-plein); --choisi-texte: var(--sur-vif); --choisi-coche: var(--sur-vif); --trait-option: #6B5E4E; --cadre: #0B0A08; --seg-on: #3E382F;
  --photo-fond: #1E1B17; --photo-filtre: brightness(.82) saturate(.95); --feuille: #24201B; --bar: rgba(21, 19, 15, .92);
  --toast-fond: #3E382F; --toast-texte: #F3EEE6; --toast-action: #F2A27C;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .4; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.mot { white-space: nowrap; }
output { font-variant-numeric: tabular-nums; }

.device { position: relative; width: 100%; height: 100%; overflow: clip; background: var(--bg); }
/* Sur ordinateur : une colonne centrée, sans cadre de téléphone */
@media (min-width: 560px) {
  body { background: var(--g1); }
  .device { max-width: 480px; margin: 0 auto; box-shadow: 0 0 0 1px var(--hair); }
}


/* Pages */
.screen { position: absolute; inset: 0 0 calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)) 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; padding-top: env(safe-area-inset-top, 0px); }
.screen::-webkit-scrollbar, .body::-webkit-scrollbar { display: none; }
.screen > .gutter { padding-bottom: 96px; }
.navbar.dessous { display: none; }
.device:has(.navbar .bande) .screen, .device:has(.navbar .bande) .courses { bottom: calc(var(--nav-h) + var(--bande-h) + env(safe-area-inset-bottom, 0px)); }
.screen.bascule > .gutter { animation: bascule .22s var(--ease); }

.subpage { position: absolute; inset: 0; z-index: 20; background: var(--bg); display: none; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); }
.subpage.on { display: flex; }
.subpage.entre { animation: entre .28s var(--ease); box-shadow: -12px 0 32px -16px rgba(0, 0, 0, .3); }
.subpage .body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; padding-bottom: var(--s6); }
.question { padding-bottom: var(--s2); font-size: var(--t-m); font-weight: 600; text-align: center; }
.subpage .pied { flex: none; padding-top: var(--s3); padding-bottom: calc(var(--s3) + env(safe-area-inset-bottom, 0px)); background: var(--bg); box-shadow: 0 -1px 0 var(--hair); }
.app-bar { flex: none; display: grid; grid-template-columns: var(--hit) minmax(0, 1fr); align-items: center; gap: var(--s3); padding-block: var(--s2); min-height: 60px; }
.app-bar b { font-size: var(--t-m); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titre-long b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: var(--t-s); line-height: 1.3; }

/* En-tête des deux onglets : même titre, même icône Foyer au même endroit */
.head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding-top: var(--s3); min-height: 60px; }
.head h1 { font-size: var(--t-2xl); line-height: 1.15; font-weight: 600; letter-spacing: -.02em; }
.point { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--g1); }

/* Boutons : un principal (52 px, couleur de marque), un secondaire, un carré de 44 px */
.btn-primaire, .btn-secondaire { display: flex; align-items: center; justify-content: center; gap: var(--s2); width: 100%; height: var(--btn); padding: 0 var(--s4); border-radius: var(--r); font-size: var(--t-m); font-weight: 600; text-align: center; transition: transform var(--vite) var(--ease), background var(--vite); }
.btn-primaire { background: var(--btn-fond); color: var(--btn-texte); }
.btn-secondaire { background: var(--g1); color: var(--ink); }
.btn-primaire:active, .btn-secondaire:active { transform: scale(.97); }
.btn-secondaire:active { background: var(--g2); }
.carre { position: relative; flex: none; display: grid; place-items: center; width: var(--hit); height: var(--hit); border-radius: var(--r); background: var(--g1); color: var(--ink); transition: background var(--vite), transform var(--vite), color var(--vite); }
.carre:active { background: var(--g2); transform: scale(.94); }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.duo.seul { grid-template-columns: 1fr; }
.acheter { flex: none; display: inline-flex; align-items: center; gap: var(--s1); height: var(--hit); padding: 0 var(--s3) 0 var(--s2); border-radius: var(--r); background: var(--g1); font-size: var(--t-xs); font-weight: 600; white-space: nowrap; transition: background var(--vite), transform var(--vite); }
.acheter .ic { width: 16px; height: 16px; }
.acheter:active { background: var(--g2); transform: scale(.96); }
.puce { display: inline-flex; align-items: center; gap: var(--s2); height: var(--hit); padding: 0 var(--s4); border-radius: var(--r); background: var(--g1); font-size: var(--t-s); font-weight: 500; transition: background var(--vite), color var(--vite); }
.puce .ic { width: 16px; height: 16px; }
.puce, .puce[aria-pressed="true"] { font-weight: 600; }
/* Interrupteur : un choix oui ou non qui se lit comme tel ; toute la ligne se touche */
.ligne-choix { width: 100%; text-align: left; }
.ligne-choix .case { width: 28px; height: 28px; margin-right: 8px; }
.ligne-choix[aria-checked="true"] .case { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
/* Choix à cocher (régimes, appareils) : la coche a une place fixe, le mot reste centré, coché ou non */
.choix-coche { position: relative; justify-content: center; padding: 0 32px; text-align: center; }
.appareil.choix-coche { padding: 0 8px 0 32px; white-space: nowrap; }
.choix-coche > .ic:first-child { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; visibility: hidden; color: var(--accent); }
.choix-coche[aria-pressed="true"] > .ic:first-child { visibility: visible; }
.regimes .puce { min-width: 140px; }
.puce[aria-pressed="true"], .choix button[aria-pressed="true"], .choix-btn[aria-pressed="true"], .appareil[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--teinte-2); color: var(--ink); font-weight: 600; }
.puces { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* Champ de recherche, le même sur Manger et Courses */
.champ-recherche { display: grid; grid-template-columns: 20px minmax(0, 1fr) var(--hit); align-items: center; gap: var(--s3); min-height: var(--btn); margin-top: var(--s3); padding: 0 var(--s1) 0 var(--s4); border-radius: var(--r); background: var(--g1); color: var(--mute); cursor: text; transition: box-shadow var(--vite); }
.champ-recherche:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent); }
.champ-recherche input { width: 100%; min-width: 0; height: 48px; border: 0; background: none; color: var(--ink); font-size: var(--t-m); }
.champ-recherche input:focus { outline: none; }
.champ-recherche input::placeholder { color: var(--mute); opacity: 1; }
.champ-recherche input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.effacer { display: grid; place-items: center; width: var(--hit); height: var(--hit); border-radius: var(--r); color: var(--text2); }
.effacer[hidden] { display: none; }
.outils { display: grid; grid-template-columns: minmax(0, 1fr) var(--hit); gap: var(--s2); align-items: center; }
.outils .champ-recherche { margin-top: var(--s3); }
.outils .carre { margin-top: var(--s3); }
.mes[aria-pressed="true"] { background: var(--teinte-2) !important; color: var(--accent) !important; }
.mes[aria-pressed="true"] .ic { fill: currentColor; }

/* Vignettes produit : une taille par contexte, un seul style */
.vignette { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: var(--r); background: var(--photo-fond); overflow: hidden; color: var(--accent); }
.vignette img { width: 100%; height: 100%; object-fit: cover; filter: var(--photo-filtre); }
.vignette.picto { background: var(--teinte); }
.vignette .ic { width: 22px; height: 22px; }
/* Tuile écrite : sans photo juste ni icône exacte, le nom seul, à la taille de la case ; un mot ne se coupe jamais. */
/* Sans photo juste : pas de case, une place vide qui garde les noms alignés */
.vignette.vide { background: none; }

/* Manger : des lignes, cinq plats par écran au moins */
.fil-section { margin-top: var(--s4); }
.fil-titre { margin-bottom: var(--s1); font-size: var(--t-s); font-weight: 600; color: var(--text2); }
.rien { margin-top: var(--s4); font-size: var(--t-m); color: var(--text2); }
.ligne-plat { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s2); animation: monte .26s var(--ease) backwards; animation-delay: calc(var(--k, 0) * 30ms); }
.ligne-plat + .ligne-plat { border-top: 1px solid var(--hair); }
.plat-lien { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: var(--s3); min-height: 88px; padding-block: 8px; }
.plat-photo { display: block; width: 72px; height: 72px; border-radius: var(--r); object-fit: cover; background: var(--g2); animation: apparait .26s var(--ease) backwards; animation-delay: calc(var(--k, 0) * 30ms); }
.plat-vide { background: none !important; }
.plat-texte { display: grid; gap: 4px; min-width: 0; }
.plat-texte b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--t-m); font-weight: 500; line-height: 1.25; }
.plat-texte small { display: block; font-size: var(--t-s); line-height: 1.35; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plat-texte .plat-manque { white-space: normal; overflow: visible; line-height: 1.3; color: var(--text2); }
.nom-entier { white-space: nowrap; font-weight: 600; }
.nom-entier.long { white-space: normal; }
.plat-manque.dans { display: flex; align-items: flex-start; gap: 4px; color: var(--accent); }
.plat-manque.dans .ic { width: 15px; height: 15px; margin-top: 4px; }
.annuler-ligne { flex: none; height: var(--hit); padding: 0 var(--s3); border-radius: var(--r); background: var(--teinte-2); color: var(--accent); font-size: var(--t-s); font-weight: 700; }
.dans-carre { background: var(--teinte); color: var(--accent); }
.ligne-plat.calme, .ligne-plat.calme .plat-photo, .screen.calme .ligne-plat, .screen.calme .plat-photo, .screen.calme > .gutter { animation: none; }
.acheter-carre { color: var(--accent); }
.acheter-carre .plus-coin { position: absolute; right: 5px; top: 5px; display: grid; place-items: center; width: 14px; height: 14px; border-radius: var(--r); background: var(--accent); color: var(--on-accent); }
.acheter-carre .plus-coin .ic { width: 10px; height: 10px; }
.accent { color: var(--accent); font-weight: 600; }
@media (hover: hover) { .plat-lien:hover b { text-decoration: underline; text-underline-offset: 3px; } }

/* « Tu cuisines » : une ligne, tous les minuteurs */
.encours { display: grid; grid-template-columns: minmax(0, 1fr) var(--hit); align-items: center; gap: var(--s2); margin-top: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s2); border-radius: var(--r-l); background: var(--teinte); }
.encours-lien { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: var(--s3); min-width: 0; }
.encours-photo { width: 48px; height: 48px; border-radius: var(--r); object-fit: cover; }
.encours-texte { display: grid; min-width: 0; }
.encours-k { font-size: var(--t-xs); font-weight: 600; color: var(--accent); }
.encours b { font-size: var(--t-m); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.encours .carre { background: var(--bg); }
/* Bande des minuteurs : une hauteur fixe, au-dessus des onglets ou du bouton de la fiche */
.bande { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s1); height: var(--bande-h); padding: 4px; border-radius: var(--r); background: var(--teinte); }
.bande-lien { display: grid; align-content: center; gap: 4px; height: var(--hit); padding: 0 var(--s3) 0 var(--s2); min-width: 0; }
.bande-pret { display: flex; align-items: center; gap: 4px; color: var(--accent) !important; font-weight: 700; }
.bande-pret .ic { width: 13px; height: 13px; }
.bande-plat { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--mute); }
.bande-nom { display: flex; align-items: center; gap: var(--s2); min-width: 0; font-size: var(--t-s); font-weight: 600; color: var(--ink); }
.bande-nom > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bande-nom .ic { width: 16px; height: 16px; flex: none; color: var(--accent); }
.bande-lien output { font-size: var(--t-m); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.bande-plus { min-width: var(--hit); height: var(--hit); padding: 0 var(--s2); border-radius: var(--r); background: var(--bg); color: var(--accent); font-size: var(--t-s); font-weight: 700; text-align: center; }
.bande-plus[aria-expanded="true"] { background: var(--teinte-2); }
.bande.fin { grid-template-columns: minmax(0, 1fr) auto auto; background: var(--teinte); }
.bande.fin .bande-nom { overflow: hidden; white-space: nowrap; }


/* Alerte légère : OK en texte, de l'air */
.bande-ok { min-width: var(--hit); height: var(--hit); padding: 0 var(--s3); border-radius: var(--r); background: none; color: var(--accent); font-weight: 700; }
.encours .bande { grid-column: 1 / -1; margin-top: 4px; background: var(--bg); }
.encours.alerte { position: sticky; top: 8px; z-index: 6; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .45); }
.encours .bande.fin { background: var(--teinte-2); }
.bande-liste { position: absolute; left: 0; right: 0; bottom: calc(100% + var(--s2)); display: grid; padding: var(--s2) var(--s3); border-radius: var(--r); background: var(--feuille); box-shadow: 0 0 0 1px var(--hair), 0 12px 28px -12px rgba(0, 0, 0, .4); animation: monte var(--dur) var(--ease); }
.bande-liste > b { padding: var(--s1) 0; font-size: var(--t-s); font-weight: 600; color: var(--text2); }
.bande-ligne { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: var(--s2); min-height: var(--hit); font-size: var(--t-s); }
.bande-ligne + .bande-ligne { border-top: 1px solid var(--hair); }
.bande-ligne .ic { width: 18px; height: 18px; color: var(--accent); }
.bande-ligne span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bande-ligne output, .bande-ligne b { font-weight: 700; }
.bande-ligne.fin b, .bande-ligne.fin .ic { color: var(--alerte); }
.pied .bande { margin-bottom: var(--s2); }

/* Minuteur global : petit, au même endroit sur tous les écrans */
.veille-zone { position: absolute; z-index: 38; left: var(--s4); right: var(--s4); pointer-events: none; }
.veille-zone > * { pointer-events: auto; }

/* Message : un seul style */
.toast { position: absolute; z-index: 37; left: var(--s4); right: var(--s4); pointer-events: none; }
.toast-carte { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); min-height: var(--btn); padding: 0 var(--s1) 0 var(--s4); border-radius: var(--r); background: var(--toast-fond); color: var(--toast-texte); box-shadow: 0 0 0 1px var(--hair); font-size: var(--t-s); line-height: 1.35; box-shadow: 0 10px 28px -12px rgba(0, 0, 0, .45); pointer-events: auto; animation: monte var(--dur) var(--ease); }
.toast-carte > span { padding-block: var(--s2); }
.toast-carte button { flex: none; height: var(--hit); padding: 0 var(--s3); border-radius: var(--r); font-weight: 700; color: var(--toast-action); }
.toast-carte > span, .toast-carte > a { display: inline-flex; align-items: center; gap: var(--s2); min-height: var(--hit); }
.toast-carte .ic { width: 18px; height: 18px; flex: none; }
/* Le texte du message est un seul bloc : les mots insécables ne prennent pas l'écart des éléments flex. */
.toast-carte .toast-texte { display: block; min-width: 0; }
.toast-carte.alerte .ic { color: var(--toast-action); }

/* Onglets : deux, toujours la même forme ; la bande des minuteurs se pose au-dessus */
.navbar { position: absolute; z-index: 10; left: 0; right: 0; bottom: 0; display: grid; gap: var(--s2); padding: var(--s2) max(16px, env(safe-area-inset-right, 0px)) calc(var(--s2) + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: var(--bg); box-shadow: 0 -1px 0 var(--hair); }
.onglets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s1); height: calc(var(--nav-h) - var(--s2) * 2); }
.nav-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; border-radius: var(--r); color: var(--mute); font-size: var(--t-xs); font-weight: 500; transition: background var(--vite), color var(--vite), transform var(--vite); }
.nav-item[aria-current="page"] { background: var(--g1); color: var(--ink); font-weight: 600; }
.nav-item:active { transform: scale(.97); }
.compte { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 20px; height: 20px; padding: 0 4px; border-radius: var(--r); background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; }

/* Recette */
.hero-photo { display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: var(--r-l); object-fit: cover; background: var(--g2); }
.hero-photo.sans-photo { display: grid; place-items: center; background: linear-gradient(135deg, var(--teinte-2), var(--teinte)); }
.hero-photo.sans-photo .ic { width: 72px; height: 72px; }
.titre-ligne { display: grid; grid-template-columns: minmax(0, 1fr) var(--hit); gap: var(--s3); align-items: start; margin-top: var(--s4); }
.titre-ligne.sans-hero { margin-top: var(--s2); }
.titre { font-size: var(--t-xl); line-height: 1.2; font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
.coeur[aria-pressed="true"] { background: var(--teinte-2); color: var(--accent); }
.coeur[aria-pressed="true"] .ic { fill: currentColor; }
.coeur:active { transform: scale(.88); }
.infos-recette { display: flex; align-items: center; gap: 8px; margin-top: var(--s2); white-space: nowrap; overflow: hidden; font-size: var(--t-s); color: var(--text2); }
.infos-recette .ic { width: 16px; height: 16px; color: var(--accent); }
.infos-recette .sep { color: var(--mute); }
.pour-qui { display: block; margin-top: 4px; font-size: var(--t-s); font-weight: 500; color: var(--mute); }
.pastille { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 var(--s3) 0 var(--s2); border-radius: var(--r); background: var(--g1); font-size: var(--t-xs); font-weight: 500; color: var(--text2); }
.pastille .ic { width: 16px; height: 16px; color: var(--accent); }
.section { margin-top: var(--s5); }
.section > h2, .section-tete h2 { font-size: var(--t-l); font-weight: 600; }
.section-tete { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); min-height: var(--hit); }
.sous-titre { margin-top: var(--s4); font-size: var(--t-s); font-weight: 600; color: var(--text2); }
.ings { margin-top: var(--s1); }
.ing { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s2); }
.ing + .ing { border-top: 1px solid var(--hair); }
.ing-nom { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 56px; padding-block: 8px; text-align: left; }
.ing-nom b { display: block; font-size: var(--t-m); font-weight: 500; line-height: 1.3; }
.ing-nom small { display: block; margin-top: 4px; font-size: var(--t-s); color: var(--mute); }
.ing.manque .ing-nom b { font-weight: 600; }
.ing.vient .ing-nom { animation: monte var(--dur) var(--ease); }
.etiquette { display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-xs); font-weight: 600; color: var(--text2); white-space: nowrap; }
.etiquette .ic { width: 14px; height: 14px; }
.conseil { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--s3); margin-top: var(--s2); padding: var(--s4); border-radius: var(--r); background: var(--g1); font-size: var(--t-m); line-height: 1.45; color: var(--text2); }
.conseil b { display: block; color: var(--ink); font-weight: 600; }
.conseil .ic { color: var(--accent); margin-top: 4px; }
.conseil.ici { margin-top: var(--s4); background: var(--teinte); animation: monte var(--dur) var(--ease); }
.apercu { list-style: none; margin: var(--s2) 0 0; padding: 0; counter-reset: pas; }
.apercu li { display: grid; grid-template-columns: 28px minmax(0, 1fr); padding-block: var(--s3); font-size: var(--t-m); line-height: 1.45; color: var(--text2); counter-increment: pas; }
.apercu li + li { border-top: 1px solid var(--hair); }
.apercu li::before { content: counter(pas); font-size: var(--t-s); font-weight: 600; color: var(--accent); padding-top: 4px; }
.lien-bas { display: flex; align-items: center; justify-content: center; gap: var(--s2); min-height: var(--hit); margin-top: var(--s3); font-size: var(--t-s); color: var(--mute); text-decoration: underline; text-underline-offset: 3px; }
.lien-bas .ic { width: 16px; height: 16px; }

/* Cuisine */
.cuisine .app-bar { padding-bottom: 4px; }
.pas { display: flex; gap: var(--s1); }
.pas button { flex: 1; display: grid; align-items: center; height: var(--hit); }
.pas i { display: block; height: 4px; border-radius: 2px; background: var(--g2); overflow: hidden; }
.pas i::after { content: ""; display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--dur) var(--ease); }
.pas .ok i::after, .pas .ici i::after { transform: none; }
.pas.avance .ici i::after { animation: remplit var(--dur) var(--ease); }
/* Minuteurs en cuisine : une ligne compacte chacun, empilées, tous lisibles d'un coup */
.pile-minuteurs { flex: none; display: grid; padding-bottom: var(--s2); }
.mini-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px; height: 40px; padding-right: 4px; border-radius: var(--r); background: var(--g1); }
.mini-ligne + .mini-ligne, .mini-bloc + .mini-ligne, .mini-ligne + .mini-bloc { margin-top: 4px; }
.mini-bloc { display: grid; gap: 4px; padding: 8px 8px 8px 12px; border-radius: var(--r); background: var(--choisi); color: var(--choisi-texte); }
.mini-bloc-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-s); font-weight: 600; }
.mini-bloc-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--s2); }
.gros-temps { font-size: 30px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mini-bloc .btn-secondaire { width: auto; height: var(--hit); padding: 0 var(--s3); background: var(--bg); color: var(--ink); font-size: var(--t-s); }
.mini-ligne.ici { box-shadow: inset 0 0 0 1.5px var(--accent); }
.mini-ligne.oeil, .mini-ligne.fin { background: var(--teinte-2); }
.mini-ligne.fin { animation: pop var(--dur) var(--rebond); }
.mini-btn { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s2); height: 40px; padding: 0 8px 0 8px; font-size: 13px; font-weight: 600; text-align: left; min-width: 0; }
/* Feuille des minuteurs : une ligne par minuteur, le nom puis le temps à droite */
.liste-minuteurs { gap: 0; }
.ligne-minuteur { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s2); }
.ligne-minuteur + .ligne-minuteur { border-top: 1px solid var(--hair); }
.ligne-minuteur > button:first-child { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: var(--s3); min-height: 52px; font-size: var(--t-m); text-align: left; }
.ligne-minuteur .ic { width: 18px; height: 18px; color: var(--accent); }
.ligne-minuteur span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-minuteur output, .ligne-minuteur b { font-weight: 700; font-variant-numeric: tabular-nums; }
.ligne-minuteur.fin b { color: var(--accent); }
.gestes-minuteur { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-top: var(--s5); }
.mini-action { height: 32px; padding: 0 8px; border-radius: var(--r); background: var(--bg); color: var(--accent); font-size: var(--t-xs); font-weight: 700; white-space: nowrap; }
.mini-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-btn .ic { width: 16px; height: 16px; }
.mini-btn span { font-weight: 500; color: var(--text2); }
.mini-ligne.fin b { color: var(--accent); }
.cuisine .body { display: flex; flex-direction: column; }
.etape { padding-block: var(--s4) var(--s5); }
.etape.de-droite { animation: de-droite var(--dur) var(--ease); }
.etape.de-gauche { animation: de-gauche var(--dur) var(--ease); }
.etape-num { font-size: var(--t-s); font-weight: 600; color: var(--accent); }
.gros { margin-top: var(--s2); font-size: 28px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; text-wrap: pretty; hyphens: manual; }
.pendant { font-weight: 700; color: var(--accent); }
.ensuite { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--hair); font-size: var(--t-l); line-height: 1.4; color: var(--mute); }
.ensuite-k { display: block; margin-bottom: var(--s1); font-size: var(--t-s); font-weight: 600; }
.lancer { margin-top: var(--s5); }
.minuteur { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: var(--s5); padding: var(--s3) var(--s3) var(--s3) var(--s4); border-radius: var(--r); background: var(--g1); }
.minuteur-temps { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.minuteur-nom { font-size: var(--t-s); font-weight: 600; color: var(--text2); }
.minuteur output { font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.minuteur-actions { display: flex; gap: var(--s2); }
.minuteur button { height: var(--hit); min-width: 64px; padding: 0 var(--s3); border-radius: var(--r); background: var(--bg); font-weight: 600; white-space: nowrap; }
.minuteur b { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-m); font-weight: 600; }
.minuteur .signal { font-size: var(--t-m); }
.minuteur.oeil { background: var(--teinte-2); animation: pop var(--dur) var(--rebond); }
.minuteur.pret { background: var(--teinte-2); animation: pop var(--dur) var(--rebond); }
.minuteur.pret .ic { color: var(--accent); }
.minuteur.pret button { background: var(--btn-fond); color: var(--btn-texte); }
.duo-cuisine { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s2); }
.duo-cuisine.seul { grid-template-columns: 1fr; }
.precedent { width: auto; padding: 0 var(--s4) 0 var(--s3); gap: var(--s1); }
.pied .question { padding-bottom: var(--s2); font-size: var(--t-s); font-weight: 600; text-align: center; color: var(--text2); }

/* Sors */
.sors { padding-block: var(--s3); }
.sors .gros { margin-top: 0; }
.sors-liste { display: grid; gap: var(--s1); margin-top: var(--s3); }
.sors-tuile { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: var(--s3); min-height: 52px; padding: 8px var(--s2); border-radius: var(--r); background: var(--g1); text-align: left; animation: monte var(--dur) var(--ease) backwards; }
.sors-tuile .vignette { width: 40px; height: 40px; }
.sors-tuile .vignette .ic { width: 20px; height: 20px; }
.sors-tuile b { display: block; font-size: var(--t-m); font-weight: 600; line-height: 1.25; }
.sors-tuile small { display: block; margin-top: 4px; font-size: var(--t-xs); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sors-tuile.barre { opacity: .55; }
.sors-tuile.barre b { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.autre-plat { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); width: 100%; min-height: var(--hit); margin-top: var(--s4); padding: var(--s2) var(--s3); border-radius: var(--r); background: var(--teinte); font-size: var(--t-s); text-align: left; }
.autre-plat .ic { color: var(--accent); }
.sors .sous-titre { margin-top: var(--s5); }
.ustensiles { margin-top: var(--s5); font-size: var(--t-s); line-height: 1.45; color: var(--text2); }
.ustensiles b { font-weight: 600; color: var(--ink); }

/* Courses */
.bloc { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: var(--hit); margin-top: var(--s4); font-size: var(--t-l); font-weight: 600; letter-spacing: -.01em; }
.bloc-btn { margin-top: var(--s6); }
.bloc-btn .ic { color: var(--mute); transition: transform var(--dur) var(--ease); }
.bloc-btn[aria-expanded="true"] .ic { transform: rotate(180deg); }
.groupe { margin-top: var(--s3); }
.groupe > h3 { font-size: var(--t-xs); font-weight: 500; color: var(--mute); padding-block: var(--s1); }
.ligne-course { display: grid; grid-template-columns: var(--hit) minmax(0, 1fr); align-items: center; gap: var(--s1); }
.ligne-course + .ligne-course, .ligne-prod.jai + .ligne-prod.jai { border-top: 1px solid var(--hair); }
.ligne-prod { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 52px; padding-block: 8px; text-align: left; }
.ligne-prod .vignette { width: 40px; height: 40px; }
.ligne-prod .vignette .ic { width: 20px; height: 20px; }
.ligne-nom { min-width: 0; }
.ligne-nom b { display: block; font-size: var(--t-m); font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.ligne-nom small { display: block; font-size: var(--t-xs); color: var(--mute); }
.coche-btn { display: grid; place-items: center; width: var(--hit); height: var(--hit); }
.case { display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r); border: 2px solid var(--bord); color: transparent; transition: background var(--vite), border-color var(--vite), color var(--vite); }
.case .ic { width: 16px; height: 16px; stroke-width: 2; }
.coche-btn:active .case { background: var(--teinte); border-color: var(--accent); }
.ligne-course.part .case { background: var(--accent); border-color: var(--accent); color: var(--on-accent); animation: pop .2s var(--rebond); }
.ligne-course.part .case .ic path { stroke-dasharray: 24; animation: trace .2s var(--ease) backwards; }
.ligne-course.part { animation: part .34s var(--ease) .12s forwards; }
.ligne-course.vient { animation: monte var(--dur) var(--ease); }
.bas-liste { margin-top: var(--s5); }
.bas-liste .ic { width: 18px; height: 18px; }
.vide { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s2); padding: var(--s4); border-radius: var(--r); background: var(--g1); color: var(--text2); font-size: var(--t-m); }
.vide .ic { color: var(--accent); }
.par { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: var(--s2); border-radius: var(--r); background: var(--autre); color: var(--on-autre); font-size: 11px; font-weight: 600; vertical-align: 2px; }
.toast-carte .par { margin: 0 var(--s2) 0 0; }
.cale { pointer-events: none; }

/* Ajouter : sur place, sous le champ */
.suggestions { margin-top: var(--s2); }
.s-groupe { margin-top: var(--s3); }
.s-groupe h3, .souvent h3 { font-size: var(--t-xs); font-weight: 500; color: var(--mute); padding-block: var(--s1); }
.s-row { display: grid; grid-template-columns: minmax(0, 1fr) var(--hit); align-items: center; gap: var(--s3); width: 100%; min-height: 56px; padding-block: 8px; text-align: left; }
.s-row + .s-row { border-top: 1px solid var(--hair); }
.s-row .vignette { width: 40px; height: 40px; }
.s-row .vignette .ic { width: 20px; height: 20px; }
.s-nom b { display: block; font-size: var(--t-m); font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.s-nom small { display: block; font-size: var(--t-xs); color: var(--accent); font-weight: 600; }
.s-row .plus { background: var(--teinte-2); color: var(--accent); }
.s-row .plus.fait { background: var(--g1); color: var(--mute); }
.s-row.creer { margin-bottom: var(--s2); border-bottom: 1px solid var(--hair); }
.s-row.creer .s-nom small { color: var(--mute); font-weight: 500; }
mark { background: none; color: inherit; font-weight: 700; }
.souvent { margin-top: var(--s3); }
.puces-souvent { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* Barre des rayons : collante, suit le défilement */
.rayons { position: sticky; top: 0; z-index: 5; display: flex; gap: var(--s1); margin: var(--s3) calc(var(--s4) * -1) 0; padding: var(--s2) var(--s4); overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; scroll-padding-inline: var(--s4); background: var(--bg); box-shadow: 0 1px 0 var(--hair); }
.rayons::-webkit-scrollbar { display: none; }
.rayons button { flex: none; height: var(--hit); padding: 0 var(--s3); border-radius: var(--r); font-size: var(--t-s); font-weight: 500; color: var(--mute); white-space: nowrap; transition: background var(--vite), color var(--vite); }
.rayons button[aria-current] { background: var(--choisi); color: var(--choisi-texte); font-weight: 600; }
.barre-rayons { grid-template-columns: var(--hit) minmax(0, 1fr); gap: var(--s2); box-shadow: 0 1px 0 var(--hair); }
.barre-rayons .rayons { position: static; margin: 0 calc(var(--s4) * -1) 0 0; padding: 0 var(--s4) 0 0; box-shadow: none; background: none; }

/* Premier lancement */
.premiere .body { padding-top: var(--s3); }
.premier { padding-top: var(--s5); }
.premier .titre { font-size: var(--t-2xl); }
.qui-bloc { margin-top: var(--s5); }
.qui-bloc .puces { margin-top: var(--s2); }
.petit-titre { display: block; font-size: var(--t-s); font-weight: 600; color: var(--text2); }
.compteur + .options { margin-top: var(--s4); }
.petit-titre + .options { margin-top: var(--s2); }
.compteur { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); min-height: 56px; border-bottom: 1px solid var(--hair); font-size: var(--t-m); }
.pas-a-pas { display: inline-flex; align-items: center; gap: var(--s2); }
.pas-a-pas output { min-width: 24px; font-size: var(--t-l); font-weight: 600; text-align: center; }
.pied-etapes { display: grid; justify-items: center; gap: var(--s2); }
.points { display: inline-flex; gap: 8px; }
.points i { width: 8px; height: 8px; border-radius: 50%; background: var(--g3); }
.points i.on { background: var(--accent); }
.recompense { font-size: var(--t-m); font-weight: 600; white-space: nowrap; }
.score { display: inline-block; }
.premiere .titre { margin-top: var(--s2); }
.rayon-section { margin-top: var(--s5); }
.rayon-section:first-of-type { margin-top: var(--s4); }
.rayon-titre { padding-bottom: var(--s2); font-size: var(--t-m); font-weight: 600; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
/* Pilules : les produits en texte, à toucher ; elles passent à la ligne, sans colonnes ni dernière rangée seule */
.pilules { display: flex; flex-wrap: wrap; gap: var(--s2); }
/* Titres de rayon : une icône du rayon, puis son nom */
.icone-rayon { display: inline-grid; place-items: center; width: 20px; flex: none; color: var(--accent); }
.icone-rayon .ic { width: 18px; height: 18px; }
.rayon-titre, .groupe > h3, .s-groupe h3, .bloc-jai h3 { display: flex; align-items: center; gap: var(--s2); }
.groupe > h3 .icone-rayon .ic, .s-groupe h3 .icone-rayon .ic, .bloc-jai h3 .icone-rayon .ic { width: 15px; height: 15px; }
.rayons button { display: inline-flex; align-items: center; gap: 8px; }
.rayons button .ic { width: 16px; height: 16px; }
/* J'ai : un bloc par rayon, les produits à la suite, séparés par des points ; chaque mot se touche */
.bloc-jai { margin-top: var(--s3); padding: var(--s2) 0 var(--s3); border-bottom: 1px solid var(--hair); }
.bloc-jai h3 { font-size: var(--t-xs); font-weight: 600; color: var(--mute); padding-bottom: 4px; }
.bloc-jai .pilules { margin-top: var(--s2); }
/* Pilule neutre : un produit à toucher, sans état (J'ai, mode « Modifier ») */
.pilule-neutre { display: inline-flex; align-items: center; gap: 8px; min-height: var(--hit); padding: 0 12px; border-radius: var(--r); background: var(--g1); font-size: var(--t-m); font-weight: 500; color: var(--ink); transition: transform var(--vite) var(--ease); }
.pilule-neutre:active { transform: scale(.97); }
/* Quantité à droite, en chiffres alignés */
.qte { flex: none; margin-left: auto; font-size: var(--t-s); color: var(--text2); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.ing-texte { display: grid; min-width: 0; }
.ing-texte b { font-size: var(--t-m); font-weight: 500; line-height: 1.3; }
.ing-texte small { font-size: var(--t-xs); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Sors : une liste à cocher */
.sors-liste { display: grid; gap: 4px; margin-top: var(--s3); }
.sors-ligne, .option.sors-ligne { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: var(--s3); width: 100%; min-height: 52px; padding: 8px 12px; border-radius: var(--r); text-align: left; }
.option.sors-ligne { color: var(--ink); }
.option.sors-ligne[aria-pressed="true"] { padding-left: 12px; }
/* La case est toujours là, vide ou cochée : le texte ne bouge jamais */
.case-ligne { display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r); box-shadow: inset 0 0 0 1.5px var(--trait-option); background: var(--bg); }
.sors-ligne .coche { position: static; width: 16px; margin: 0; transform: none; }
.option.sors-ligne[aria-pressed="true"] .case-ligne { background: var(--choisi-coche); box-shadow: none; }
.option.sors-ligne[aria-pressed="true"] .coche { color: var(--bg); margin: 0; }
.sors-ligne.barre { box-shadow: inset 0 0 0 1px var(--hair); opacity: .6; }
.sors-ligne.barre b { text-decoration: line-through; }
/* Le seul style « choisi » de l'app : une pilule remplie (--choisi), la coche et le texte en --choisi-texte.
   Pas choisi : transparent avec un contour. La pilule garde sa largeur : la coche se pose dans la marge intérieure,
   gardée des deux côtés, le mot reste centré ; cocher ne refait jamais les rangées. */
.options { display: flex; flex-wrap: wrap; gap: var(--s2); }
.option { display: inline-flex; align-items: center; gap: 0; min-height: var(--hit); max-width: 100%; position: relative; justify-content: center; padding: 0 24px; border-radius: var(--r); background: transparent; box-shadow: inset 0 0 0 1px var(--trait-option); font-size: var(--t-m); font-weight: 500; line-height: 1.25; color: var(--text2); text-align: center; transition: background var(--vite), box-shadow var(--vite), color var(--vite), transform var(--vite) var(--ease); -webkit-touch-callout: none; user-select: none; }
.option .coche { position: absolute; left: 8px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--choisi-coche); opacity: 0; transform: scale(.6); transition: opacity var(--vite), transform var(--vite) var(--rebond); }
.option[aria-pressed="true"] { background: var(--choisi); box-shadow: none; color: var(--choisi-texte); }
.option[aria-pressed="true"] .coche { opacity: 1; transform: none; }
.option.vient[aria-pressed="true"] .coche path { stroke-dasharray: 24; animation: trace .3s var(--ease); }
.option:active { transform: scale(.97); }
.tuile { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow: visible; padding: 8px 8px var(--s2); border-radius: var(--r); background: var(--g1); text-align: left; transition: transform var(--vite) var(--ease), opacity var(--vite), background var(--vite); -webkit-touch-callout: none; user-select: none; }
.tuile:active { transform: scale(.97); }
.tuile-visuel { position: relative; display: block; }
.tuile .vignette { width: 100%; height: auto; aspect-ratio: 1; }
.tuile .vignette .ic { width: 36px; height: 36px; }
.tuile .case { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; background: var(--bg); border-color: var(--bord); }
.tuile.on .case { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tuile.vient .case { animation: pop var(--dur) var(--rebond); }
.tuile-nom { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; padding: 0 4px; font-size: var(--t-xs); font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.tuile:not(.on) { background: transparent; box-shadow: inset 0 0 0 1px var(--hair); }
.tuile:not(.on) .vignette { opacity: .45; filter: grayscale(1); }
.tuile:not(.on) .tuile-nom { color: var(--mute); font-weight: 500; }

/* Feuilles */
.voile { position: absolute; inset: 0; z-index: 30; background: rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; transition: opacity var(--dur); }
.voile.on { opacity: 1; pointer-events: auto; }
.feuille { position: absolute; z-index: 33; left: 0; right: 0; bottom: 0; max-height: 88%; display: flex; flex-direction: column; border-radius: var(--r-l) var(--r-l) 0 0; background: var(--feuille); box-shadow: 0 -1px 0 var(--hair), inset 0 1px 0 rgba(255, 255, 255, .08); transform: translateY(100%); visibility: hidden; transition: transform var(--dur) var(--ease), visibility 0s var(--dur); padding-bottom: env(safe-area-inset-bottom, 0px); }
.feuille.on { transform: none; visibility: visible; transition: transform var(--dur) var(--ease); }
.feuille.tiree { transition: none; }
.grab { flex: none; width: 100%; height: 24px; touch-action: none; cursor: grab; }
.grab::after { content: ""; display: block; width: 40px; height: 5px; margin: 8px auto 0; border-radius: var(--r); background: var(--g3); }
.feuille-tete { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: 0 var(--s4) var(--s2); touch-action: none; }
.feuille-tete b { font-size: var(--t-l); font-weight: 600; }
.feuille-corps { display: grid; gap: var(--s4); min-height: 0; overflow-y: auto; padding: var(--s2) var(--s4) var(--s5); }
.feuille-corps .qui-bloc { margin-top: 0; }
.produit-tete { display: grid; grid-template-columns: minmax(0, 1fr) var(--hit); align-items: center; gap: var(--s3); touch-action: none; }
.nom-champ { display: grid; grid-template-columns: minmax(0, 1fr) 18px; align-items: center; gap: var(--s2); min-width: 0; border-bottom: 1.5px solid var(--hair); cursor: text; }
.nom-champ:focus-within { border-bottom-color: var(--accent); }
.nom-champ input { min-width: 0; height: var(--hit); padding: 0; border: 0; background: none; font-size: var(--t-l); font-weight: 600; color: var(--ink); text-overflow: ellipsis; }
.nom-champ input:focus { outline: none; }
.nom-champ .ic { width: 16px; height: 16px; color: var(--mute); }
.etats { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--s2); }
.etats .option { justify-content: center; padding: 0 8px; white-space: nowrap; }
.choix-btn { display: grid; justify-items: center; align-content: center; gap: var(--s1); min-height: 64px; padding: var(--s2); border-radius: var(--r); background: var(--g1); font-size: var(--t-s); font-weight: 500; transition: background var(--vite), transform var(--vite) var(--ease); }
.choix-btn .ic { color: var(--mute); }
.choix-btn[aria-pressed="true"] .ic, .appareil[aria-pressed="true"] .ic { color: var(--accent); }
.choix-btn:active { transform: scale(.96); }
.champ-rayon { display: grid; gap: var(--s2); }
.choix { display: flex; flex-wrap: wrap; gap: var(--s2); }
.choix button { height: var(--hit); padding: 0 var(--s3); border-radius: var(--r); background: var(--g1); font-size: var(--t-s); font-weight: 500; white-space: nowrap; }
.rayons-choix { display: flex; gap: var(--s2); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--s4) * -1); padding-inline: var(--s4); -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 24px), transparent); }
.rayons-choix::-webkit-scrollbar { display: none; }
.rayons-choix button { flex: none; }
.appareils { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); margin-top: var(--s2); }
.appareil { display: flex; align-items: center; gap: var(--s2); min-height: var(--hit); border-radius: var(--r); background: var(--g1); font-size: var(--t-s); font-weight: 500; }
.appareil.vient { animation: pop var(--dur) var(--rebond); }
.list-tile { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto 18px; gap: var(--s3); align-items: center; width: 100%; min-height: var(--btn); padding: 0 var(--s3); border-radius: var(--r); background: var(--g1); font-size: var(--t-m); font-weight: 500; }
.list-tile .ic { color: var(--mute); }
.list-tile .val { font-size: var(--t-s); font-weight: 400; color: var(--mute); white-space: nowrap; }
.seg { display: flex; gap: var(--s2); margin-top: var(--s2); }
.seg button { flex: 1 1 0; height: var(--hit); border-radius: var(--r); background: var(--g1); font-size: var(--t-s); font-weight: 500; color: var(--text2); text-align: center; }
.seg button[aria-pressed="true"] { color: var(--ink); }
.feuille-corps.lien { justify-items: stretch; text-align: left; }
.phrase { font-size: var(--t-m); line-height: 1.45; color: var(--text2); }
.statut { display: flex; align-items: center; gap: var(--s2); min-height: var(--hit); padding: 0 var(--s3); border-radius: var(--r); background: var(--teinte); font-size: var(--t-s); font-weight: 600; color: var(--ink); animation: monte var(--dur) var(--ease); }
.statut .ic { width: 18px; height: 18px; color: var(--accent); }
.question-corps { gap: var(--s5); padding-top: var(--s3); }
.question-texte { font-size: var(--t-l); line-height: 1.4; text-wrap: pretty; }
.question-texte b { font-weight: 600; }
.relie { display: grid; justify-items: center; gap: var(--s2); padding: var(--s5) var(--s3); border-radius: var(--r); background: var(--teinte); text-align: center; }
.relie b { font-size: var(--t-l); font-weight: 600; }
.relie span:last-child { font-size: var(--t-s); color: var(--text2); }
.sceau-lien { display: flex; align-items: center; gap: var(--s1); color: var(--accent); }
.sceau-lien .ic { width: 28px; height: 28px; }
.sceau-lien .ic:nth-child(2) { width: 18px; height: 18px; }

/* Fin du repas */
.fin-repas { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; background: var(--bg); opacity: 0; pointer-events: none; transition: opacity .25s; }
.fin-repas.on { opacity: 1; pointer-events: auto; }
.fin-carte { display: grid; justify-items: center; gap: var(--s3); }
.fin-sceau { display: grid; place-items: center; width: 88px; height: 88px; border-radius: var(--r-l); background: var(--accent); color: var(--on-accent); }
.fin-sceau .ic { width: 44px; height: 44px; }
.fin-repas.on .fin-sceau { animation: pop .4s var(--rebond); }
.fin-repas.on .fin-sceau .ic path { stroke-dasharray: 24; animation: trace .45s var(--ease) .1s backwards; }
.fin-carte b { font-size: var(--t-xl); font-weight: 600; }

.vol { position: fixed; z-index: 50; left: 0; top: 0; width: 18px; height: 18px; margin: -8px 0 0 -8px; border-radius: var(--r); background: var(--accent); pointer-events: none; }
.vol.vignette-vol { width: 48px; height: 48px; margin: -24px 0 0 -24px; background: none; overflow: hidden; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .4); }

@keyframes entre { from { transform: translateX(100%); } }
@keyframes monte { from { transform: translateY(8px); opacity: 0; } }
@keyframes de-droite { from { transform: translateX(32px); opacity: 0; } }
@keyframes de-gauche { from { transform: translateX(-32px); opacity: 0; } }
@keyframes pop { from { transform: scale(.6); } }
@keyframes trace { from { stroke-dashoffset: 24; } }
@keyframes remplit { from { transform: scaleX(0); } }
@keyframes apparait { from { opacity: 0; } }
@keyframes bascule { from { opacity: 0; transform: translateY(6px); } }
@keyframes part { to { opacity: 0; transform: translateX(24px); } }

@media (hover: hover) {
  .carre:hover, .btn-secondaire:hover, .acheter:hover, .puce:hover, .choix button:hover, .choix-btn:hover, .appareil:hover, .list-tile:hover, .mini-btn:hover { background: var(--g2); }
  .btn-primaire:hover { background: var(--btn-survol); }
  .rayons button:hover { color: var(--ink); }
  .nav-item:hover { color: var(--ink); }
  .s-row:hover, .ligne-prod:hover, .ing-nom:hover { background: color-mix(in srgb, var(--g1) 60%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition-duration: 0s !important; transition-delay: 0s !important; }
}

/* Effet : de petits moments, sous 300 ms, rien si le mouvement est réduit */
.pilule.vient { animation: pop-doux .22s var(--rebond); }
@keyframes pop-doux { 50% { transform: scale(1.06); } }
.onglets { position: relative; }
.onglets .nav-item { z-index: 1; }
.onglets .nav-item[aria-current="page"] { background: transparent; }
.repere-onglet { position: absolute; top: 0; bottom: 0; left: 0; width: calc((100% - var(--s1) * 2) / 3); border-radius: var(--r); background: var(--g1); transform: translateX(calc(var(--a) * (100% + var(--s1)))); }
.repere-onglet.glisse { animation: glisse-onglet .25s var(--ease); }
@keyframes glisse-onglet { from { transform: translateX(calc(var(--de) * (100% + var(--s1)))); } }
.hero-cadre { overflow: hidden; border-radius: var(--r-l); }
.hero-cadre .hero-photo { border-radius: 0; transform-origin: center top; transform: scale(1.08); will-change: transform; }
.fin-photo { width: 220px; height: 150px; border-radius: var(--r-l); object-fit: cover; box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .45); }
.fin-repas.on .fin-photo { animation: fin-photo .28s var(--ease) both; }
@keyframes fin-photo { from { opacity: 0; transform: scale(.9); } }
.fin-repas.on .fin-carte > b { animation: monte .28s var(--ease) .08s both; }
/* Sors : « Il me manque un produit », un vrai bouton texte, et sa petite feuille */
.lien-manque { display: inline-flex; align-items: center; min-height: var(--hit); margin-top: var(--s3); font-size: var(--t-m); font-weight: 600; color: var(--accent); }
.ligne-manque { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s3); width: 100%; min-height: 52px; text-align: left; font-size: var(--t-m); }
.ligne-manque + .ligne-manque { border-top: 1px solid var(--hair); }
.ligne-manque b { font-weight: 500; }
.liste-manque { gap: 0; }
@media (prefers-reduced-motion: reduce) { .hero-cadre .hero-photo { transform: none; } }


/* ===== v9 : peau ElMoslim. Fond blanc, encre, coins généreux, mono pour les chiffres. Le fonctionnement ne change pas. ===== */

.gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.ic { stroke-width: 1.75; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

/* En-tête : grand titre, boutons ronds */
.head { padding-top: var(--s4); min-height: 64px; }
.head h1 { font-size: var(--t-2xl); line-height: 1.1; letter-spacing: -.035em; }
.carre { border-radius: var(--r-pill); background: var(--g1); }
.point { top: 8px; right: 8px; background: var(--ink); box-shadow: 0 0 0 2px var(--g1); }

/* Recherche : un champ doux, grand rayon */
.champ-recherche { min-height: var(--btn); margin-top: var(--s4); border-radius: var(--r-m); background: var(--g1); }
.champ-recherche:focus-within { box-shadow: inset 0 0 0 2px var(--ink); }
.outils .champ-recherche, .outils .carre { margin-top: var(--s4); }
.mes[aria-pressed="true"] { background: var(--ink) !important; color: var(--bg) !important; }

/* Boutons */
.btn-primaire, .btn-secondaire { border-radius: var(--r-m); font-weight: 600; letter-spacing: -.005em; }
.btn-primaire { background: var(--btn-fond); color: var(--btn-texte); }
.acheter { border-radius: var(--r-pill); }

/* Titres de section : discrets, avec le compte en mono */
.fil-section { margin-top: var(--s6); }
.fil-section:first-of-type { margin-top: var(--s5); }
.fil-titre { display: flex; align-items: baseline; gap: var(--s2); margin-bottom: var(--s2); font-size: var(--t-s); font-weight: 600; letter-spacing: -.005em; color: var(--mute); }

/* Plats : grande photo, titre net, temps en mono, pas de traits */
.ligne-plat { gap: var(--s3); }
.ligne-plat + .ligne-plat { border-top: 0; }
.plat-lien { grid-template-columns: 88px minmax(0, 1fr); gap: var(--s4); min-height: 104px; padding-block: var(--s2); }
.plat-photo { width: 88px; height: 88px; border-radius: var(--r-m); }
.plat-texte { gap: 4px; }
.plat-texte b { font-size: 16px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.plat-texte small { font-size: 13px; color: var(--mute); }
.plat-texte small:not(.plat-manque) { font-family: var(--mono); font-size: var(--t-xs); letter-spacing: .01em; }
.plat-texte .plat-manque { font-family: var(--sans); font-size: 13px; color: var(--mute); }
.plat-texte .plat-manque .nom-entier { font-weight: 500; color: var(--ink); }
.plat-manque.dans { color: var(--ink); font-weight: 500; }
.acheter-carre { width: 40px; height: 40px; color: var(--ink); background: var(--g1); }
.acheter-carre .ic { width: 18px; height: 18px; }
.acheter-carre .plus-coin { right: 2px; top: 2px; border-radius: var(--r-pill); background: var(--ink); color: var(--bg); box-shadow: 0 0 0 2px var(--bg); }
.dans-carre { background: var(--ink); color: var(--bg); }
.annuler-ligne { border-radius: var(--r-pill); background: var(--g1); color: var(--ink); font-weight: 600; }
@media (hover: hover) { .plat-lien:hover b { text-decoration: none; } .plat-lien:hover .plat-photo { filter: brightness(.94); } }

/* Vignettes produit */
.vignette { border-radius: var(--r); background: var(--photo-fond); color: var(--ink); }
.vignette.picto { background: var(--g1); }

/* Tu cuisines : la carte encre, comme « maintenant » chez ElMoslim */
.encours { margin-top: var(--s4); padding: var(--s3); border-radius: var(--r-l); background: var(--ink); color: var(--bg); }
.encours-photo { border-radius: var(--r); }
.encours-k { font-family: var(--mono); font-size: var(--t-xs); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in srgb, var(--bg) 70%, transparent); }
.encours b { color: var(--bg); }
.encours .carre { background: color-mix(in srgb, var(--bg) 14%, transparent); color: var(--bg); }
.encours .bande { background: color-mix(in srgb, var(--bg) 10%, transparent); }
.encours .bande-nom, .encours .bande-lien output { color: var(--bg); }
.bande { border-radius: var(--r-m); background: var(--g1); }
.bande-plat { font-size: var(--t-xs); }
.bande-lien output, .gros-temps, .minuteur output, .ligne-minuteur output, .bande-ligne output { font-family: var(--mono); font-weight: 500; letter-spacing: -.02em; }
.bande-plus, .bande-ok { border-radius: var(--r-pill); color: var(--ink); background: var(--bg); }
.bande-pret { color: var(--ink) !important; }
.bande-nom .ic, .bande-ligne .ic, .ligne-minuteur .ic { color: var(--ink); }
.bande-liste { border-radius: var(--r-m); background: var(--feuille); }

/* Message */
.toast-carte { border-radius: var(--r-m); }
.toast-carte button { border-radius: var(--r-pill); text-decoration: underline; text-underline-offset: 3px; }

/* Onglets du bas : pleine largeur, flou, trait fin, l'actif en encre */
.navbar { padding: var(--s1) max(var(--s2), env(safe-area-inset-right, 0px)) calc(var(--s1) + env(safe-area-inset-bottom, 0px)) max(var(--s2), env(safe-area-inset-left, 0px)); background: var(--bar); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 -1px 0 var(--hair); }
.onglets { height: calc(var(--nav-h) - var(--s1) * 2); }
.nav-item { gap: 4px; border-radius: var(--r); font-size: var(--t-xs); font-weight: 500; }
.nav-item .ic { width: 22px; height: 22px; }
.nav-item[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav-item[aria-current="page"] .ic { stroke-width: 2.2; }
.repere-onglet { display: none; }
.compte { top: 2px; border-radius: var(--r-pill); background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 11px; font-weight: 500; box-shadow: 0 0 0 2px var(--bg); }

/* Fiche recette : grande photo, titre fort, ingrédients en carte */
.subpage .pied { box-shadow: 0 -1px 0 var(--hair); }
.app-bar { min-height: 60px; }
.hero-cadre { border-radius: var(--r-l); }
.titre { font-size: 26px; line-height: 1.15; letter-spacing: -.03em; }
.premier .titre { font-size: var(--t-2xl); }
.coeur { border-radius: var(--r-pill); }
.coeur[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.infos-recette { gap: var(--s2); margin-top: var(--s2); font-family: var(--mono); font-size: var(--t-xs); letter-spacing: .01em; color: var(--mute); }
.infos-recette .ic { width: 14px; height: 14px; color: var(--mute); }
.pastille { border-radius: var(--r-pill); }
.pastille .ic { color: var(--ink); }
.section { margin-top: var(--s6); }
.section > h2, .section-tete h2 { font-size: var(--t-xl); letter-spacing: -.02em; }
.pour-qui { font-size: 13px; }
.sous-titre { margin-top: var(--s5); font-size: var(--t-s); color: var(--mute); }
.ings { margin-top: var(--s3); padding: var(--s1) var(--s4); border-radius: var(--r-l); background: var(--g1); }
.ing-nom { min-height: 52px; }
.ing-nom b, .ing-texte b { font-size: var(--t-m); font-weight: 500; }
.qte { font-family: var(--mono); font-size: var(--t-xs); color: var(--mute); }
.etiquette { color: var(--mute); }
.conseil { border-radius: var(--r-m); background: var(--g1); }
.conseil .ic { color: var(--ink); }
.conseil.ici { background: var(--g1); }
.apercu { margin-top: var(--s3); }
.apercu li { grid-template-columns: 36px minmax(0, 1fr); padding-block: var(--s3); color: var(--ink); line-height: 1.5; }
.apercu li + li { border-top: 0; }
.apercu li::before { display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r-pill); background: var(--g1); font-family: var(--mono); font-size: var(--t-xs); font-weight: 500; color: var(--ink); padding-top: 0; }

/* Cuisine : progression encre, étape en grand, liste à cocher en cartes */
.pas i { height: 3px; background: var(--g2); }
.pas i::after { background: var(--ink); }
.etape-num { font-family: var(--mono); font-size: var(--t-xs); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.gros { font-size: 28px; line-height: 1.2; letter-spacing: -.03em; }
.pendant { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.ensuite { border-top-color: var(--hair); font-size: var(--t-m); }
.ensuite-k { font-family: var(--mono); font-size: var(--t-xs); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.minuteur { border-radius: var(--r-l); background: var(--g1); padding: var(--s4); }
.minuteur output { font-size: 36px; }
.minuteur button { border-radius: var(--r-pill); }
.minuteur.oeil, .minuteur.pret { background: var(--ink); color: var(--bg); }
.minuteur.pret .ic { color: var(--bg); }
.minuteur.pret button, .minuteur.oeil button { background: var(--bg); color: var(--ink); }
.mini-ligne { border-radius: var(--r); }
.mini-ligne.ici { box-shadow: inset 0 0 0 1.5px var(--ink); }
.mini-ligne.oeil, .mini-ligne.fin { background: var(--g2); }
.mini-ligne.fin b, .ligne-minuteur.fin b { color: var(--ink); }
.mini-bloc { border-radius: var(--r-m); }
.mini-action { border-radius: var(--r-pill); color: var(--ink); }
.sors-liste { gap: var(--s2); }
.sors-ligne, .option.sors-ligne { min-height: 56px; padding: var(--s2) var(--s4); border-radius: var(--r-m); background: var(--g1); box-shadow: none; color: var(--ink); justify-content: start; }
.option.sors-ligne[aria-pressed="true"] { background: var(--g1); color: var(--ink); padding-left: var(--s4); }
.case-ligne { border-radius: var(--r-pill); background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--bord); }
.option.sors-ligne[aria-pressed="true"] .case-ligne { background: var(--ink); box-shadow: none; }
.option.sors-ligne[aria-pressed="true"] .coche { color: var(--bg); }
.sors-ligne.barre { background: transparent; box-shadow: inset 0 0 0 1px var(--hair); opacity: .55; }
.lien-manque { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.autre-plat { border-radius: var(--r-m); background: var(--g1); }
.autre-plat .ic { color: var(--ink); }

/* Choix : pilules pleines, l'option choisie passe en encre */
.option { border-radius: var(--r-pill); background: var(--g1); box-shadow: none; color: var(--ink); font-size: var(--t-m); }
.option .coche { color: var(--choisi-coche); }
.option[aria-pressed="true"] { background: var(--choisi); color: var(--choisi-texte); }
.puce, .choix button, .choix-btn, .appareil, .seg button, .list-tile { border-radius: var(--r-pill); }
.choix-btn, .list-tile { border-radius: var(--r-m); }
.puce[aria-pressed="true"], .choix button[aria-pressed="true"], .choix-btn[aria-pressed="true"], .appareil[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.choix-btn[aria-pressed="true"] .ic, .appareil[aria-pressed="true"] .ic, .choix-coche > .ic:first-child { color: currentColor; }
.ligne-choix[aria-checked="true"] .case { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pilule-neutre { border-radius: var(--r-pill); }
.compteur { border-bottom-color: var(--hair); }
.pas-a-pas output { font-family: var(--mono); font-weight: 500; }
.petit-titre, .rayon-titre { letter-spacing: -.005em; }
.icone-rayon { color: var(--ink); }
.points i.on { background: var(--ink); width: 20px; border-radius: var(--r-pill); }
.points i { transition: width var(--dur) var(--ease); }

/* Barre des rayons : onglets en pilules */
.rayons { background: var(--bg); box-shadow: 0 1px 0 var(--hair); }
.rayons button { border-radius: var(--r-pill); }
.rayons button[aria-current] { background: var(--ink); color: var(--bg); }

/* Courses */
.bloc { margin-top: var(--s5); font-size: var(--t-xl); letter-spacing: -.02em; }
.bloc-btn { margin-top: var(--s6); }
.groupe { margin-top: var(--s4); }
.groupe > h3, .s-groupe h3, .souvent h3, .bloc-jai h3 { font-size: 13px; font-weight: 600; color: var(--mute); }
.ligne-course + .ligne-course, .ligne-prod.jai + .ligne-prod.jai, .s-row + .s-row { border-top-color: var(--hair); }
.ligne-prod .vignette, .s-row .vignette { width: 44px; height: 44px; border-radius: var(--r); }
.case { border-radius: var(--r-pill); border-width: 1.5px; }
.coche-btn:active .case { background: var(--g1); border-color: var(--ink); }
.ligne-course.part .case { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.vide { border-radius: var(--r-l); padding: var(--s5) var(--s4); }
.vide .ic { color: var(--ink); }
.s-nom small { color: var(--mute); }
.s-row .plus { border-radius: var(--r-pill); background: var(--ink); color: var(--bg); }
.s-row .plus.fait { background: var(--g1); color: var(--mute); }
.statut, .relie { border-radius: var(--r-m); background: var(--g1); }
.statut .ic, .sceau-lien { color: var(--ink); }
.par { border-radius: var(--r-pill); }

/* Tuiles produits */
.tuile { border-radius: var(--r-m); padding: 8px 8px var(--s2); }
.tuile .vignette { border-radius: var(--r); }
.tuile .case { border-radius: var(--r-pill); }
.tuile.on .case { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* Feuilles du bas : surface claire, grand rayon */
.feuille { border-radius: var(--r-l) var(--r-l) 0 0; background: var(--feuille); }
.grab::after { width: 36px; height: 4px; border-radius: var(--r-pill); }
.feuille-tete b { font-size: var(--t-xl); letter-spacing: -.02em; }
.nom-champ:focus-within { border-bottom-color: var(--ink); }
.voile { background: rgba(42, 30, 21, .4); }

/* Fin du repas */
.fin-sceau { border-radius: var(--r-pill); background: var(--ink); color: var(--bg); }
.fin-carte b { letter-spacing: -.02em; }
.vol { border-radius: var(--r-pill); background: var(--ink); }

@media (hover: hover) {
  .carre:hover, .btn-secondaire:hover, .acheter:hover, .puce:hover, .choix button:hover, .choix-btn:hover, .appareil:hover, .list-tile:hover, .mini-btn:hover, .option:not([aria-pressed="true"]):hover { background: var(--g2); }
  .s-row:hover, .ligne-prod:hover, .ing-nom:hover { background: transparent; }
  .sors-ligne:hover { background: var(--g2); }
}

/* ===== v9.1 : de la vie. Une couleur paprika, des gris chauds, les plats prêts en grandes photos. ===== */

/* Titres de section : présents, en encre */
.fil-titre { margin-bottom: var(--s3); font-size: 19px; font-weight: 650; letter-spacing: -.02em; color: var(--ink); }

/* À la une : les plats prêts en grandes cartes photo qui défilent de côté */
.fil-section.une .plats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.fil-section.une .ligne-plat { position: relative; display: block; min-width: 0; }
.fil-section.une .ligne-plat:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.fil-section.une .ligne-plat:first-child:nth-last-child(odd) .plat-photo { aspect-ratio: 16 / 10; }
.fil-section.une .ligne-plat:first-child:nth-last-child(odd) .plat-texte b { font-size: 21px; }
.fil-section.une .plat-lien { position: relative; display: block; min-height: 0; padding: 0; border-radius: var(--r-l); overflow: hidden; }
.fil-section.une .plat-photo { width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 0; }
.fil-section.une .plat-lien::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(to bottom, transparent, rgba(12, 9, 6, .78)); pointer-events: none; }
.fil-section.une .plat-texte { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; gap: 8px; padding: var(--s3); color: #FFFFFF; }
.fil-section.une .plat-texte b { font-size: 16px; line-height: 1.2; letter-spacing: -.025em; color: #FFFFFF; -webkit-line-clamp: 3; }
.fil-section.une .plat-texte small:not(.plat-manque) { order: -1; justify-self: start; padding: 4px 8px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #FFFFFF; font-weight: 500; }
.fil-section.une .plat-texte .plat-manque { color: rgba(255, 255, 255, .85); }
.fil-section.une .plat-texte .plat-manque .nom-entier { color: #FFFFFF; }
.fil-section.une .acheter-carre, .fil-section.une .dans-carre { position: absolute; z-index: 2; top: var(--s3); right: var(--s3); background: rgba(255, 255, 255, .92); color: #1A1612; }
.fil-section.une .plat-photo.plat-vide { background: var(--g2) !important; }

/* Lignes de plats : le panier en couleur douce */
.acheter-carre { background: var(--vif-doux); color: var(--vif-encre); }
.acheter-carre .plus-coin { background: var(--vif); color: var(--sur-vif); }
.dans-carre { background: var(--vif); color: var(--sur-vif); }
.plat-manque.dans { color: var(--vif-encre); }
.annuler-ligne { background: var(--vif-doux); color: var(--vif-encre); }
.mes[aria-pressed="true"] { background: var(--vif) !important; color: var(--sur-vif) !important; }
.point { background: var(--vif); }

/* Tu cuisines : la carte en couleur, on la voit tout de suite */
.encours { background: var(--vif); color: var(--sur-vif); }
.encours b, .encours .bande-nom, .encours .bande-lien output { color: var(--sur-vif); }
.encours-k { color: color-mix(in srgb, var(--sur-vif) 78%, transparent); }
.encours .carre { background: color-mix(in srgb, var(--sur-vif) 18%, transparent); color: var(--sur-vif); }
.bande { background: var(--vif-doux); }
.bande-pret, .bande-nom .ic, .bande-ligne .ic, .ligne-minuteur .ic { color: var(--vif-encre) !important; }

/* Onglets : l'actif en couleur, sur une pastille douce */
.nav-item[aria-current="page"] { color: var(--vif-encre); }
.nav-item[aria-current="page"] .ic { color: var(--vif); }
.compte { background: var(--vif); color: var(--sur-vif); }

/* Fiche recette */
.infos-recette .ic { color: var(--vif); }
.coeur[aria-pressed="true"] { background: var(--vif-doux); color: var(--vif); }
.apercu li::before { background: var(--vif-doux); color: var(--vif-encre); font-weight: 600; }
.conseil .ic, .pastille .ic, .icone-rayon { color: var(--vif); }

/* Cuisine */
.pas i::after { background: var(--vif); }
.etape-num { color: var(--vif-encre); }
.pendant { text-decoration-color: var(--vif); }
.minuteur.oeil, .minuteur.pret { background: var(--vif); color: var(--sur-vif); }
.minuteur.pret .ic { color: var(--sur-vif); }
.minuteur.pret button, .minuteur.oeil button { background: var(--sur-vif); color: var(--vif); }
.mini-ligne.ici { box-shadow: inset 0 0 0 1.5px var(--vif); }
.mini-ligne.oeil, .mini-ligne.fin { background: var(--vif-doux); }
.option.sors-ligne[aria-pressed="true"] .case-ligne { background: var(--vif); }
.option.sors-ligne[aria-pressed="true"] .coche { color: var(--sur-vif); }
.lien-manque { color: var(--vif-encre); text-decoration-color: var(--vif); }

/* Choix, rayons, cases, points : la couleur dit « choisi » */
.puce[aria-pressed="true"], .choix button[aria-pressed="true"], .choix-btn[aria-pressed="true"], .appareil[aria-pressed="true"], .seg button[aria-pressed="true"], .rayons button[aria-current] { background: var(--vif); color: var(--sur-vif); }
.ligne-choix[aria-checked="true"] .case, .ligne-course.part .case, .tuile.on .case { background: var(--vif); border-color: var(--vif); color: var(--sur-vif); }
.coche-btn:active .case { background: var(--vif-doux); border-color: var(--vif); }
.points i.on { background: var(--vif); }
.s-row .plus { background: var(--vif-doux); color: var(--vif-encre); }
.vide .ic, .statut .ic, .sceau-lien, .autre-plat .ic { color: var(--vif); }
.fin-sceau, .vol { background: var(--vif); color: var(--sur-vif); }
.champ-recherche:focus-within { box-shadow: inset 0 0 0 2px var(--vif); }
button:focus-visible, a:focus-visible { outline-color: var(--vif); }

@media (hover: hover) {
  .btn-primaire:hover { background: var(--vif-survol); }
  .fil-section.une .plat-lien:hover .plat-photo { filter: brightness(1.04); }
}

/* ===== v9.3 : façon Arggon. Plateaux gris et cartes blanches en relief, coins carrés adoucis, encre et orange vif, titres en Bricolage. ===== */

/* Titres : Bricolage, comme Arggon */
.head h1, .titre, .fil-titre, .bloc, .section > h2, .section-tete h2, .feuille-tete b, .fin-carte b, .bravo h1 { font-family: var(--display); font-weight: 800; letter-spacing: -.035em; }
.head h1 { font-size: 32px; }
.titre { font-size: 28px; line-height: 1.1; }
.fil-titre { font-size: 20px; }
.bloc { font-size: 22px; }
.section > h2, .section-tete h2 { font-size: 22px; }
.head-actions { display: flex; gap: var(--s2); }

/* Coins : carrés adoucis partout, plus de pilules rondes */
.carre, .acheter, .acheter-carre, .dans-carre, .coeur, .option, .puce, .pilule-neutre, .choix button, .appareil, .seg button, .rayons button, .bande-plus, .bande-ok, .annuler-ligne, .mini-action, .minuteur button, .toast-carte button, .s-row .plus, .nav-item, .effacer, .encours .carre, .champ-recherche { border-radius: var(--r); }
.case, .case-ligne { border-radius: 7px; }
.tuile .case { border-radius: 7px; }
.points i.on { border-radius: 4px; }
.fil-section.une .plat-texte small:not(.plat-manque) { border-radius: var(--r-petit); }
.compte { border-radius: 10px; }
.fin-sceau { border-radius: var(--r-l); }
.apercu li::before { border-radius: var(--r-petit); }

/* Relief : un plateau gris, des cartes blanches dedans */
.fil-section:not(.une) .plats { display: grid; gap: 8px; padding: 8px; border-radius: var(--r-l); background: var(--g1); }
.fil-section:not(.une) .ligne-plat { padding: 8px 8px 8px 8px; border-radius: var(--r-m); background: var(--carte); box-shadow: var(--lift); }
.fil-section:not(.une) .plat-lien { grid-template-columns: 76px minmax(0, 1fr); gap: var(--s3); min-height: 0; padding-block: 0; }
.fil-section:not(.une) .plat-photo { width: 76px; height: 76px; border-radius: var(--r); }
.fil-section.une .plat-lien { box-shadow: var(--float); }
.acheter-carre { background: var(--g1); color: var(--ink); }
.acheter-carre .plus-coin { background: var(--vif); color: var(--sur-vif); border-radius: 6px; box-shadow: 0 0 0 2px var(--carte); }
.dans-carre { background: var(--vif); color: var(--sur-vif); }
.plat-manque.dans { color: var(--vif-encre); }

.ings { padding: 8px; background: var(--g1); display: grid; gap: 4px; }
.ing { padding: 0 var(--s3); border-radius: var(--r); background: var(--carte); box-shadow: var(--lift); }
.ing + .ing { border-top: 0; }
.ing-nom { min-height: 50px; }

.sors-liste { gap: 8px; padding: 8px; border-radius: var(--r-l); background: var(--g1); }
.sors-ligne, .option.sors-ligne, .option.sors-ligne[aria-pressed="true"] { background: var(--carte); box-shadow: var(--lift); border-radius: var(--r); }
.sors-ligne.barre { background: transparent; box-shadow: none; }
.option.sors-ligne[aria-pressed="true"] .case-ligne { background: var(--ink); }
.option.sors-ligne[aria-pressed="true"] .coche { color: var(--vif); }

.plateau { display: grid; gap: 4px; padding: 8px; border-radius: var(--r-l); background: var(--g1); }
.plateau .ligne-course { padding-right: var(--s3); border-radius: var(--r); background: var(--carte); box-shadow: var(--lift); }
.plateau .ligne-course + .ligne-course { border-top: 0; }
.groupe > h3 { padding: 0 4px var(--s2); }
.bloc-n { display: inline-grid; place-items: center; min-width: 26px; height: 26px; margin-left: var(--s2); padding: 0 8px; border-radius: var(--r-petit); background: var(--g1); font-family: var(--mono); font-size: var(--t-xs); font-weight: 500; letter-spacing: 0; color: var(--text2); vertical-align: 4px; }
.bloc { justify-content: flex-start; }
.bloc-maison { margin-top: var(--s7); }
.aide { margin-top: 4px; font-size: 13px; color: var(--mute); }
.bloc-jai { margin-top: var(--s4); padding: 0; border-bottom: 0; }
.pilule-neutre { min-height: 40px; padding: 0 var(--s3); background: var(--carte); box-shadow: var(--lift); font-size: var(--t-s); }
.bloc-jai .pilules { gap: 8px; padding: 8px; border-radius: var(--r-m); background: var(--g1); }
.souvent { margin-top: var(--s5); }
.souvent h3 { font-size: 13px; font-weight: 600; color: var(--mute); }
.puces-souvent { gap: 8px; margin-top: var(--s2); }
.puce { height: 40px; padding: 0 var(--s3) 0 var(--s2); background: var(--g1); font-size: var(--t-s); }
.puce .ic { color: var(--vif); }
.vide { border-radius: var(--r-l); background: var(--g1); }

/* Encre et orange : l'orange signale, l'encre agit */
.encours { background: var(--vif); color: var(--sur-vif); }
.encours b, .encours .bande-nom, .encours .bande-lien output { color: var(--sur-vif); }
.encours-k { color: color-mix(in srgb, var(--sur-vif) 72%, transparent); }
.encours .carre { background: color-mix(in srgb, #FFFFFF 35%, transparent); color: var(--sur-vif); }
.bande { background: var(--vif-doux); }
.nav-item[aria-current="page"] { color: var(--ink); }
.nav-item[aria-current="page"] .ic { color: var(--vif); }
.compte { background: var(--vif); color: var(--sur-vif); }
.point { background: var(--vif); }
.mes[aria-pressed="true"] { background: var(--vif-doux) !important; color: var(--vif-encre) !important; }
.coeur[aria-pressed="true"] { background: var(--vif-doux); color: var(--vif); }
.infos-recette .ic, .conseil .ic, .pastille .ic, .icone-rayon, .vide .ic, .statut .ic, .sceau-lien, .autre-plat .ic { color: var(--vif); }
.apercu li::before { background: var(--vif-doux); color: var(--vif-encre); }
.pas i::after { background: var(--vif); }
.etape-num, .lien-manque { color: var(--vif-encre); }
.lien-manque, .pendant { text-decoration-color: var(--vif); }
.minuteur.oeil, .minuteur.pret { background: var(--vif); color: var(--sur-vif); }
.minuteur.pret .ic { color: var(--sur-vif); }
.minuteur.pret button, .minuteur.oeil button { background: var(--carte); color: var(--ink); }
.puce[aria-pressed="true"], .choix button[aria-pressed="true"], .choix-btn[aria-pressed="true"], .appareil[aria-pressed="true"], .seg button[aria-pressed="true"], .rayons button[aria-current] { background: var(--ink); color: var(--bg); }
.option { background: var(--g1); }
.option[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.option .coche { color: var(--vif); }
.ligne-choix[aria-checked="true"] .case, .ligne-course.part .case, .tuile.on .case { background: var(--ink); border-color: var(--ink); color: var(--vif); }
.coche-btn:active .case { background: var(--vif-doux); border-color: var(--vif); }
.points i.on { background: var(--ink); }
.s-row .plus { background: var(--ink); color: var(--bg); }
.fin-sceau, .vol { background: var(--vif); color: var(--sur-vif); }
.champ-recherche:focus-within { box-shadow: inset 0 0 0 2px var(--ink); }
button:focus-visible, a:focus-visible { outline-color: var(--vif); }
.feuille { background: var(--feuille); }

@media (hover: hover) {
  .btn-primaire:hover { background: var(--btn-survol); }
  .fil-section:not(.une) .ligne-plat:hover { box-shadow: var(--float); }
  .pilule-neutre:hover { box-shadow: var(--float); }
}
/* Courses : le champ d'ajout reste en haut au défilement, la barre des rayons se cale dessous */
.champ-recherche:has([data-champ="ajout"]) { position: sticky; top: var(--s2); z-index: 7; box-shadow: 0 0 0 var(--s2) var(--bg), 0 calc(var(--s2) * -1) 0 var(--s2) var(--bg); }
.champ-recherche:has([data-champ="ajout"]):focus-within { box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 var(--s2) var(--bg), 0 calc(var(--s2) * -1) 0 var(--s2) var(--bg); }
#courses-corps .rayons { top: 68px; }
/* Coins emboîtés : plateau = carte + écart (12 + 6 = 18 ; 18 + 6 = 24), jamais le même dedans et dehors */
.plateau, .ings, .sors-liste { border-radius: 18px; }
.plateau .ligne-course, .ing, .sors-ligne, .option.sors-ligne, .option.sors-ligne[aria-pressed="true"] { border-radius: 12px; }
.fil-section:not(.une) .plats { border-radius: 24px; }
.fil-section:not(.une) .ligne-plat { border-radius: 18px; }
.bloc-jai .pilules { border-radius: 18px; }
.bloc-jai .pilule-neutre { border-radius: 12px; }
/* Une carte posée sur un plateau ne porte pas de liseré : l'ombre seule la détache */
.plateau .ligne-course, .ing, .sors-ligne, .option.sors-ligne, .fil-section:not(.une) .ligne-plat, .bloc-jai .pilule-neutre { box-shadow: 0 1px 2px rgba(17, 17, 16, .07); }
:root[data-theme="dark"] .plateau .ligne-course, :root[data-theme="dark"] .ing, :root[data-theme="dark"] .sors-ligne, :root[data-theme="dark"] .fil-section:not(.une) .ligne-plat, :root[data-theme="dark"] .bloc-jai .pilule-neutre { box-shadow: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .plateau .ligne-course, :root:not([data-theme="light"]) .ing, :root:not([data-theme="light"]) .sors-ligne, :root:not([data-theme="light"]) .fil-section:not(.une) .ligne-plat, :root:not([data-theme="light"]) .bloc-jai .pilule-neutre { box-shadow: none; } }

/* v9.4 : listes plus denses, toujours aérées. Plateau = carte + écart (16 + 4 = 20 ; 10 + 4 = 14). */
.fil-section { margin-top: var(--s5); }
.fil-titre { margin-bottom: var(--s2); font-size: 18px; }
.fil-section.une .plat-photo { aspect-ratio: 1; }
.fil-section:not(.une) .plats { gap: 4px; padding: 4px; border-radius: 20px; }
.fil-section:not(.une) .ligne-plat { gap: var(--s2); padding: 8px 8px 8px 8px; border-radius: 16px; }
.fil-section:not(.une) .plat-lien { grid-template-columns: 60px minmax(0, 1fr); gap: var(--s3); }
.fil-section:not(.une) .plat-photo { width: 60px; height: 60px; border-radius: 10px; }
.fil-section:not(.une) .plat-texte { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s2); row-gap: 4px; }
.fil-section:not(.une) .plat-texte b { flex-basis: 100%; font-size: 15px; }
.fil-section:not(.une) .plat-texte small { flex: none; line-height: 1.3; }
.fil-section:not(.une) .plat-texte .plat-manque { flex: 1 1 auto; min-width: 0; }
.fil-section:not(.une) .acheter-carre, .fil-section:not(.une) .dans-carre { width: 36px; height: 36px; border-radius: 10px; }
.fil-section:not(.une) .acheter-carre .ic { width: 17px; height: 17px; }

.plateau { gap: 4px; padding: 4px; border-radius: 16px; }
.plateau .ligne-course { padding-right: var(--s3); border-radius: 12px; }
.plateau .ligne-prod { min-height: 46px; padding-block: 4px; }
.plateau .coche-btn { width: 40px; height: 40px; }
.plateau .case { width: 22px; height: 22px; border-radius: 6px; }
.ligne-nom b { font-size: 15px; line-height: 1.25; }
.ligne-nom small { line-height: 1.3; }
.groupe { margin-top: var(--s3); }
.groupe > h3 { padding-bottom: 8px; }
.bloc { margin-top: var(--s4); }
.bloc-maison { margin-top: var(--s6); }
.bloc-jai { margin-top: var(--s3); }
.bloc-jai .pilules { gap: 4px; padding: 4px; border-radius: 14px; }
.bloc-jai .pilule-neutre { min-height: 36px; border-radius: 10px; }

/* Courses : le plateau porte son titre de rayon. Plateau = carte + écart (12 + 4 = 16). */
.groupe { margin-top: var(--s2); padding: 4px; border-radius: 16px; background: var(--g1); }
.groupe > h3 { padding: 8px 8px 8px; }
.plateau { padding: 0; border-radius: 0; background: none; }
.ligne-prod .ligne-nom { flex: 1; }
.ligne-nom small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bloc-jai { margin-top: var(--s2); padding: 4px; border-radius: 14px; background: var(--g1); }
.bloc-jai h3 { padding: 8px 8px 4px; }
.bloc-jai .pilules { margin-top: 0; padding: 0; background: none; }
.bloc + .aide + .bloc-jai, .bloc + .groupe { margin-top: var(--s3); }
.icone-rayon:empty { display: none; }

/* Essentiels : un repère orange, le même partout */
.pilule-neutre.essentiel { padding-left: 8px; }
.pilule-neutre.essentiel::before, .repere-ess { content: ""; display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 2px; background: var(--vif); }
.repere-ess { margin: 0 4px 4px 4px; vertical-align: middle; }
.essentiel-ligne { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s3); }
.essentiel-ligne .option { padding: 0 var(--s4) 0 32px; }

/* ===== v9.6 : un voile chaud en haut de page, le motif culinaire. ===== */

/* Le voile (--menthe) : il part du haut et se fond dans la page en défilant */
.screen { background: linear-gradient(180deg, var(--menthe) 0, var(--bg) 280px) no-repeat; background-attachment: local; }
.head h1 { color: var(--vif-encre); }
.screen:has([data-champ="ajout"]) { background: var(--bg); }

/* L'encre agit, le terracotta signale */
.puce[aria-pressed="true"], .choix button[aria-pressed="true"], .choix-btn[aria-pressed="true"], .appareil[aria-pressed="true"], .seg button[aria-pressed="true"], .rayons button[aria-current], .option[aria-pressed="true"] { background: var(--choisi); color: var(--choisi-texte); }
.option .coche, .option[aria-pressed="true"] .coche { color: currentColor; }
.ligne-choix[aria-checked="true"] .case, .ligne-course.part .case, .tuile.on .case, .option.sors-ligne[aria-pressed="true"] .case-ligne { background: var(--vif); border-color: var(--vif); color: var(--sur-vif); }
.option.sors-ligne[aria-pressed="true"] .coche { color: var(--sur-vif); }
.points i.on, .s-row .plus { background: var(--btn-fond); color: var(--btn-texte); }
.compte { background: var(--vif); color: var(--sur-vif); font-family: var(--sans); font-weight: 650; box-shadow: 0 0 0 2px var(--bg); }
.nav-item[aria-current="page"] { color: var(--vif-encre); }
.nav-item[aria-current="page"] .ic { color: var(--vif); }
.encours { background: var(--vif-encre); color: var(--sur-vif); }
.encours b, .encours .bande-nom, .encours .bande-lien output { color: var(--sur-vif); }
.encours-k { color: color-mix(in srgb, var(--sur-vif) 78%, transparent); }
.encours .carre { background: color-mix(in srgb, var(--sur-vif) 16%, transparent); color: var(--sur-vif); }
.minuteur.oeil, .minuteur.pret { background: var(--vif-encre); color: var(--sur-vif); }
.minuteur.pret .ic { color: var(--sur-vif); }
.fil-section.une .acheter-carre, .fil-section.une .dans-carre { color: var(--vif-encre); }
.acheter-carre { background: var(--vif-doux); color: var(--vif-encre); }
.acheter-carre .plus-coin { background: var(--vif); color: var(--sur-vif); }
.dans-carre { background: var(--vif); color: var(--sur-vif); }
.fin-sceau, .vol { background: var(--vif); color: var(--sur-vif); }
.carre { background: var(--g1); color: var(--vif-encre); }
.head .carre { background: var(--carte); box-shadow: var(--lift); }
.champ-recherche { background: var(--carte); box-shadow: var(--lift); }
.champ-recherche:focus-within { box-shadow: inset 0 0 0 2px var(--vif); }
.champ-recherche:has([data-champ="ajout"]) { box-shadow: var(--lift), 0 0 0 var(--s2) var(--bg), 0 calc(var(--s2) * -1) 0 var(--s2) var(--bg); }
.mes[aria-pressed="true"] { background: var(--vif-doux) !important; color: var(--vif-encre) !important; }
.pilule-neutre.essentiel::before, .repere-ess { background: var(--vif); border-radius: 50%; }
button:focus-visible, a:focus-visible { outline-color: var(--vif); }
@media (hover: hover) { .btn-primaire:hover { background: var(--btn-survol); } }

/* Motif culinaire (dessiné pour l'app) : en haut de Manger seulement, très léger, fondu vers le bas */
.screen:not(:has([data-champ="ajout"]))::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 320px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' width='200' height='200'%3E%0A%3Cg fill='none' stroke='%23C9572E' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%0A%3Cg transform='translate(100 0) rotate(15)'%3E%3Ccircle r='14'/%3E%3Ccircle r='11'/%3E%3Cpath d='M0-9V9M-7.8-4.5L7.8 4.5M-7.8 4.5L7.8-4.5'/%3E%3C/g%3E%0A%3Cg transform='translate(100 200) rotate(15)'%3E%3Ccircle r='14'/%3E%3Ccircle r='11'/%3E%3Cpath d='M0-9V9M-7.8-4.5L7.8 4.5M-7.8 4.5L7.8-4.5'/%3E%3C/g%3E%0A%3Cg transform='translate(0 100) rotate(-15)'%3E%3Cellipse rx='7' ry='9.5'/%3E%3Cpath d='M0-9.5q1-6 6-9M6-18.5c6-5 13-4 17-1c-5 4-12 4-17 1zM-3-3q-1 3 0 6'/%3E%3C/g%3E%0A%3Cg transform='translate(200 100) rotate(-15)'%3E%3Cellipse rx='7' ry='9.5'/%3E%3Cpath d='M0-9.5q1-6 6-9M6-18.5c6-5 13-4 17-1c-5 4-12 4-17 1zM-3-3q-1 3 0 6'/%3E%3C/g%3E%0A%3Cpath transform='translate(40 44) rotate(-20)' d='M0 18Q2 4 0-6M0 8C-9 8-13 2-14-5C-6-5-1-1 0 8ZM0 8C9 8 13 2 14-5C6-5 1-1 0 8ZM0-2C-6-3-9-7-9-12C-4-11-1-8 0-2ZM0-2C6-3 9-7 9-12C4-11 1-8 0-2ZM0-6C-4-11-3-17 0-21C3-17 4-11 0-6Z'/%3E%0A%3Cpath transform='translate(160 44) rotate(12)' d='M0-14C-1-8-12-4-12 5C-12 12-5 14 0 14C5 14 12 12 12 5C12-4 1-8 0-14ZM-3 13C-6 6-4-2 0-8M3 13C6 6 4-2 0-8M0-14q1-3-1-5'/%3E%0A%3Cpath transform='translate(106 80) rotate(30)' d='M0 24V-10M0-10c-3-3-3-8 0-11c3 3 3 8 0 11M0-3c-5-1-7-5-6-9c4 1 6 4 6 9M0-3c5-1 7-5 6-9c-4 1-6 4-6 9M0 4c-5-1-7-5-6-9c4 1 6 4 6 9M0 4c5-1 7-5 6-9c-4 1-6 4-6 9M0 11c-5-1-7-5-6-9c4 1 6 4 6 9M0 11c5-1 7-5 6-9c-4 1-6 4-6 9'/%3E%0A%3Cg transform='translate(54 100) rotate(40)'%3E%3Cellipse cy='-12' rx='6' ry='8.5'/%3E%3Cpath d='M-1.5-3.6L-1 20a1 1 0 0 0 2 0L1.5-3.6'/%3E%3C/g%3E%0A%3Cg transform='translate(100 138) rotate(-10)'%3E%3Ccircle cy='3' r='10'/%3E%3Cpath d='M0-7l-5-3M0-7l5-3M0-7l-2 5M0-7l3 4.5M0-7q0-6 3-9'/%3E%3C/g%3E%0A%3Cpath transform='translate(44 160) rotate(-8)' d='M-12-8C-4-10 8-4 14 10C4 6-6 2-13-3C-15-5-14-8-12-8ZM-12.5-6.5q-5-1-7-6'/%3E%0A%3Cpath transform='translate(154 150) rotate(-32)' d='M-1.5 4V20a1.5 1.5 0 0 0 3 0V4M0 4C-9-2-9-18 0-20C9-18 9-2 0 4M0 4C-4-2-4-16 0-20C4-16 4-2 0 4'/%3E%0A%3Ccircle cx='146' cy='94' r='2.5'/%3E%3Ccircle cx='154' cy='99' r='2.5'/%3E%3Ccircle cx='147' cy='103' r='2.5'/%3E%0A%3Ccircle cx='22' cy='128' r='2.5'/%3E%3Ccircle cx='62' cy='10' r='2.5'/%3E%3Ccircle cx='140' cy='12' r='2.5'/%3E%3Ccircle cx='182' cy='180' r='2.5'/%3E%0A%3C/g%3E%0A%3C/svg%3E"); background-size: 200px 200px; opacity: .13; -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent); mask-image: linear-gradient(180deg, #000 30%, transparent); pointer-events: none; }
.screen > .gutter { position: relative; z-index: 1; }
:root[data-theme="dark"] .screen:not(:has([data-champ="ajout"]))::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' width='200' height='200'%3E%0A%3Cg fill='none' stroke='%23F2A27C' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%0A%3Cg transform='translate(100 0) rotate(15)'%3E%3Ccircle r='14'/%3E%3Ccircle r='11'/%3E%3Cpath d='M0-9V9M-7.8-4.5L7.8 4.5M-7.8 4.5L7.8-4.5'/%3E%3C/g%3E%0A%3Cg transform='translate(100 200) rotate(15)'%3E%3Ccircle r='14'/%3E%3Ccircle r='11'/%3E%3Cpath d='M0-9V9M-7.8-4.5L7.8 4.5M-7.8 4.5L7.8-4.5'/%3E%3C/g%3E%0A%3Cg transform='translate(0 100) rotate(-15)'%3E%3Cellipse rx='7' ry='9.5'/%3E%3Cpath d='M0-9.5q1-6 6-9M6-18.5c6-5 13-4 17-1c-5 4-12 4-17 1zM-3-3q-1 3 0 6'/%3E%3C/g%3E%0A%3Cg transform='translate(200 100) rotate(-15)'%3E%3Cellipse rx='7' ry='9.5'/%3E%3Cpath d='M0-9.5q1-6 6-9M6-18.5c6-5 13-4 17-1c-5 4-12 4-17 1zM-3-3q-1 3 0 6'/%3E%3C/g%3E%0A%3Cpath transform='translate(40 44) rotate(-20)' d='M0 18Q2 4 0-6M0 8C-9 8-13 2-14-5C-6-5-1-1 0 8ZM0 8C9 8 13 2 14-5C6-5 1-1 0 8ZM0-2C-6-3-9-7-9-12C-4-11-1-8 0-2ZM0-2C6-3 9-7 9-12C4-11 1-8 0-2ZM0-6C-4-11-3-17 0-21C3-17 4-11 0-6Z'/%3E%0A%3Cpath transform='translate(160 44) rotate(12)' d='M0-14C-1-8-12-4-12 5C-12 12-5 14 0 14C5 14 12 12 12 5C12-4 1-8 0-14ZM-3 13C-6 6-4-2 0-8M3 13C6 6 4-2 0-8M0-14q1-3-1-5'/%3E%0A%3Cpath transform='translate(106 80) rotate(30)' d='M0 24V-10M0-10c-3-3-3-8 0-11c3 3 3 8 0 11M0-3c-5-1-7-5-6-9c4 1 6 4 6 9M0-3c5-1 7-5 6-9c-4 1-6 4-6 9M0 4c-5-1-7-5-6-9c4 1 6 4 6 9M0 4c5-1 7-5 6-9c-4 1-6 4-6 9M0 11c-5-1-7-5-6-9c4 1 6 4 6 9M0 11c5-1 7-5 6-9c-4 1-6 4-6 9'/%3E%0A%3Cg transform='translate(54 100) rotate(40)'%3E%3Cellipse cy='-12' rx='6' ry='8.5'/%3E%3Cpath d='M-1.5-3.6L-1 20a1 1 0 0 0 2 0L1.5-3.6'/%3E%3C/g%3E%0A%3Cg transform='translate(100 138) rotate(-10)'%3E%3Ccircle cy='3' r='10'/%3E%3Cpath d='M0-7l-5-3M0-7l5-3M0-7l-2 5M0-7l3 4.5M0-7q0-6 3-9'/%3E%3C/g%3E%0A%3Cpath transform='translate(44 160) rotate(-8)' d='M-12-8C-4-10 8-4 14 10C4 6-6 2-13-3C-15-5-14-8-12-8ZM-12.5-6.5q-5-1-7-6'/%3E%0A%3Cpath transform='translate(154 150) rotate(-32)' d='M-1.5 4V20a1.5 1.5 0 0 0 3 0V4M0 4C-9-2-9-18 0-20C9-18 9-2 0 4M0 4C-4-2-4-16 0-20C4-16 4-2 0 4'/%3E%0A%3Ccircle cx='146' cy='94' r='2.5'/%3E%3Ccircle cx='154' cy='99' r='2.5'/%3E%3Ccircle cx='147' cy='103' r='2.5'/%3E%0A%3Ccircle cx='22' cy='128' r='2.5'/%3E%3Ccircle cx='62' cy='10' r='2.5'/%3E%3Ccircle cx='140' cy='12' r='2.5'/%3E%3Ccircle cx='182' cy='180' r='2.5'/%3E%0A%3C/g%3E%0A%3C/svg%3E"); opacity: .10; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .screen:not(:has([data-champ="ajout"]))::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' width='200' height='200'%3E%0A%3Cg fill='none' stroke='%23F2A27C' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%0A%3Cg transform='translate(100 0) rotate(15)'%3E%3Ccircle r='14'/%3E%3Ccircle r='11'/%3E%3Cpath d='M0-9V9M-7.8-4.5L7.8 4.5M-7.8 4.5L7.8-4.5'/%3E%3C/g%3E%0A%3Cg transform='translate(100 200) rotate(15)'%3E%3Ccircle r='14'/%3E%3Ccircle r='11'/%3E%3Cpath d='M0-9V9M-7.8-4.5L7.8 4.5M-7.8 4.5L7.8-4.5'/%3E%3C/g%3E%0A%3Cg transform='translate(0 100) rotate(-15)'%3E%3Cellipse rx='7' ry='9.5'/%3E%3Cpath d='M0-9.5q1-6 6-9M6-18.5c6-5 13-4 17-1c-5 4-12 4-17 1zM-3-3q-1 3 0 6'/%3E%3C/g%3E%0A%3Cg transform='translate(200 100) rotate(-15)'%3E%3Cellipse rx='7' ry='9.5'/%3E%3Cpath d='M0-9.5q1-6 6-9M6-18.5c6-5 13-4 17-1c-5 4-12 4-17 1zM-3-3q-1 3 0 6'/%3E%3C/g%3E%0A%3Cpath transform='translate(40 44) rotate(-20)' d='M0 18Q2 4 0-6M0 8C-9 8-13 2-14-5C-6-5-1-1 0 8ZM0 8C9 8 13 2 14-5C6-5 1-1 0 8ZM0-2C-6-3-9-7-9-12C-4-11-1-8 0-2ZM0-2C6-3 9-7 9-12C4-11 1-8 0-2ZM0-6C-4-11-3-17 0-21C3-17 4-11 0-6Z'/%3E%0A%3Cpath transform='translate(160 44) rotate(12)' d='M0-14C-1-8-12-4-12 5C-12 12-5 14 0 14C5 14 12 12 12 5C12-4 1-8 0-14ZM-3 13C-6 6-4-2 0-8M3 13C6 6 4-2 0-8M0-14q1-3-1-5'/%3E%0A%3Cpath transform='translate(106 80) rotate(30)' d='M0 24V-10M0-10c-3-3-3-8 0-11c3 3 3 8 0 11M0-3c-5-1-7-5-6-9c4 1 6 4 6 9M0-3c5-1 7-5 6-9c-4 1-6 4-6 9M0 4c-5-1-7-5-6-9c4 1 6 4 6 9M0 4c5-1 7-5 6-9c-4 1-6 4-6 9M0 11c-5-1-7-5-6-9c4 1 6 4 6 9M0 11c5-1 7-5 6-9c-4 1-6 4-6 9'/%3E%0A%3Cg transform='translate(54 100) rotate(40)'%3E%3Cellipse cy='-12' rx='6' ry='8.5'/%3E%3Cpath d='M-1.5-3.6L-1 20a1 1 0 0 0 2 0L1.5-3.6'/%3E%3C/g%3E%0A%3Cg transform='translate(100 138) rotate(-10)'%3E%3Ccircle cy='3' r='10'/%3E%3Cpath d='M0-7l-5-3M0-7l5-3M0-7l-2 5M0-7l3 4.5M0-7q0-6 3-9'/%3E%3C/g%3E%0A%3Cpath transform='translate(44 160) rotate(-8)' d='M-12-8C-4-10 8-4 14 10C4 6-6 2-13-3C-15-5-14-8-12-8ZM-12.5-6.5q-5-1-7-6'/%3E%0A%3Cpath transform='translate(154 150) rotate(-32)' d='M-1.5 4V20a1.5 1.5 0 0 0 3 0V4M0 4C-9-2-9-18 0-20C9-18 9-2 0 4M0 4C-4-2-4-16 0-20C4-16 4-2 0 4'/%3E%0A%3Ccircle cx='146' cy='94' r='2.5'/%3E%3Ccircle cx='154' cy='99' r='2.5'/%3E%3Ccircle cx='147' cy='103' r='2.5'/%3E%0A%3Ccircle cx='22' cy='128' r='2.5'/%3E%3Ccircle cx='62' cy='10' r='2.5'/%3E%3Ccircle cx='140' cy='12' r='2.5'/%3E%3Ccircle cx='182' cy='180' r='2.5'/%3E%0A%3C/g%3E%0A%3C/svg%3E"); opacity: .10; } }


/* Courses en deux vues ; À la maison : reviennent tout seuls, ou pour une fois */
.vues-courses { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: var(--s4); padding: 4px; border-radius: 16px; background: var(--g1); }
.vues-courses button { display: flex; align-items: center; justify-content: center; gap: var(--s2); height: 40px; border-radius: 12px; font-size: var(--t-s); font-weight: 600; color: var(--mute); }
.vues-courses button[aria-selected="true"] { background: var(--carte); color: var(--ink); box-shadow: var(--lift); }
.vues-courses .bloc-n { margin-left: 0; height: 22px; min-width: 22px; padding: 0 8px; background: var(--vif); color: var(--sur-vif); vertical-align: 0; }
.vues-courses + .rayons, .vues-courses + .groupe, .vues-courses + .vide { margin-top: var(--s3); }
.vues-courses + .bloc { margin-top: var(--s5); }
.grille-maison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.ligne-maison { display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: center; min-height: 44px; padding-right: 4px; border-radius: 12px; background: var(--carte); box-shadow: 0 1px 2px rgba(110, 62, 30, .07); }
.ligne-maison.vient { animation: pop-doux .22s var(--rebond); }
.maison-nom { min-width: 0; height: 100%; padding: 0 var(--s3); font-size: var(--t-s); font-weight: 500; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boucle { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--g3); }
.boucle .ic { width: 17px; height: 17px; stroke-width: 2; }
.boucle[aria-pressed="true"] { background: var(--vif-doux); color: var(--vif); }
.revenu { display: inline-flex !important; align-items: center; gap: 4px; color: var(--vif-encre) !important; font-weight: 500; }
.revenu .ic { width: 12px; height: 12px; stroke-width: 2.2; }
.jamais { margin-top: var(--s6); }
.jamais h3 { padding: 0 4px var(--s2); font-size: 13px; font-weight: 600; color: var(--mute); }
.jamais .plateau { padding: 4px; border-radius: 16px; background: var(--g1); }
.ligne-jamais { display: grid; grid-template-columns: minmax(0, 1fr) 40px; align-items: center; gap: var(--s2); min-height: 52px; padding: 4px 8px 4px var(--s3); border-radius: 12px; background: var(--carte); box-shadow: 0 1px 2px rgba(110, 62, 30, .07); }
.ligne-jamais b { display: block; font-size: 15px; font-weight: 500; }
.ligne-jamais small { display: block; font-size: 13px; color: var(--vif-encre); }
.ligne-jamais .plus { width: 40px; height: 40px; background: var(--vif-doux); color: var(--vif-encre); }
@media (hover: hover) { .maison-nom:hover { color: var(--vif-encre); } .boucle:hover { background: var(--g1); } }

/* App : aucune bordure ni trait d'un seul côté. Les surfaces se détachent par leur fond ou une ombre douce. */
.subpage .pied, .barre-rayons, .navbar { box-shadow: none; }
.feuille { box-shadow: 0 -10px 28px -14px rgba(110, 62, 30, .28); }
.compteur { border-bottom: 0; }

/* Pied de l'accueil : les pages légales */
.pied-legal { display: flex; justify-content: center; gap: var(--s2); margin-top: var(--s6); font-size: 13px; color: var(--mute); }
.pied-legal a { display: inline-flex; align-items: center; min-height: var(--hit); padding: 0 var(--s1); color: var(--mute); text-decoration: underline; text-underline-offset: 3px; }
.pied-legal span { display: inline-flex; align-items: center; }
.option-longue { height: auto; min-height: var(--hit); padding-block: var(--s2); white-space: normal; text-align: left; line-height: 1.3; }
.qui-bloc > .aide { margin-top: var(--s2); }

/* Grossesse : une ligne de « À table », avec un interrupteur, comme les compteurs au-dessus */
.ligne-interrupteur { width: 100%; text-align: left; cursor: pointer; }
.interrupteur { position: relative; flex: none; width: 48px; height: 28px; border-radius: 999px; background: var(--g3); transition: background .2s var(--ease); }
.interrupteur i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s var(--ease); }
.ligne-interrupteur[aria-checked="true"] .interrupteur { background: var(--vif); }
.ligne-interrupteur[aria-checked="true"] .interrupteur i { transform: translateX(20px); }
.ligne-interrupteur:focus-visible { outline: 2px solid var(--vif); outline-offset: -2px; border-radius: 12px; }

/* Accueil du premier lancement : mosaïque de plats, « Symppa », Commencer. */
.subpage.bienvenue { padding-top: 0; background: var(--bg); color: var(--ink); }
.subpage.bienvenue.entre { animation: none; box-shadow: none; }
.bienvenue .body { position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.bienvenue button:focus-visible { outline: 2px solid var(--vif); outline-offset: 2px; }
.bv { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.bv-mosaique { position: absolute; inset: -40px -24px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; transform: rotate(-6deg) scale(1.12); transition: filter 1s var(--ease), opacity 1s; }
.bv-col { display: grid; gap: 8px; align-content: start; animation: bv-monte 60s linear infinite; }
.bv-col:nth-child(2) { animation-name: bv-descend; animation-duration: 70s; margin-top: -120px; }
.bv-col:nth-child(3) { animation-duration: 80s; margin-top: -32px; }
.bv-col img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 18px; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .45); }
@keyframes bv-monte { to { transform: translateY(-50%); } }
@keyframes bv-descend { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.bv.gris .bv-mosaique { filter: grayscale(1) blur(3px); opacity: .45; }
.bv-voile { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--bg) 70%, transparent) 52%, var(--bg) 68%); }
.bv-texte { position: relative; margin-top: auto; padding: 0 24px calc(32px + env(safe-area-inset-bottom, 0px)); }
.bv-texte h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 76px; line-height: .9; letter-spacing: -.05em; color: var(--ink); }
.bv-point { color: var(--vif); }
.bv-anim { margin-top: 16px; }
.bv-anim p { margin: 0; line-height: 1.3; text-wrap: balance; }
.bv-sr { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); }
.bv-anim .bv-l1 { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; color: var(--text2); }
.bv-ess { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.bv-ess span { padding: 8px 8px; border-radius: 8px; background: var(--g1); font-size: 15px; font-weight: 600; color: var(--text2); opacity: 0; transform: translateY(6px) scale(.9); transition: opacity .3s, transform .4s cubic-bezier(.3, 1.5, .5, 1); }
.bv-anim.v1 .bv-ess span { opacity: 1; transform: none; }
.bv-anim .bv-l2 { margin-top: 12px; font-family: var(--display); font-weight: 800; font-size: 30px; letter-spacing: -.03em; line-height: 1.08; color: var(--ink); opacity: 0; transform: translateY(10px); transition: opacity .45s, transform .45s var(--ease); }
.bv-anim.v2 .bv-l2 { opacity: 1; transform: none; }
.bv-mot { display: inline-block; font-style: normal; color: var(--vif); }
.bv-go { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 64px; margin-top: 24px; padding: 8px 8px 8px 24px; border-radius: 18px; background: var(--ink); color: var(--bg); font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.01em; box-shadow: 0 14px 30px -16px rgba(42, 30, 21, .6); transition: transform .15s var(--ease); }
.bv-go:active { transform: scale(.97); }
.bv-fl { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--vif); color: var(--sur-vif); transition: transform .2s var(--ease); }
.bv-fl svg { width: 20px; height: 20px; }
@media (hover: hover) { .bv-go:hover .bv-fl { transform: translateX(3px); } }
.bienvenue.entre .bv-mosaique { animation: bv-arrive .7s var(--ease) both; }
.bienvenue.entre .bv-texte > * { animation: bv-leve .5s var(--ease) both; }
.bienvenue.entre .bv-texte > :nth-child(2) { animation-delay: .08s; }
.bienvenue.entre .bv-texte > :nth-child(3) { animation-delay: .16s; }
@keyframes bv-arrive { from { opacity: 0; transform: rotate(-6deg) scale(1.2); } }
@keyframes bv-leve { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { .bv-col { animation: none !important; } .bienvenue.entre .bv-mosaique, .bienvenue.entre .bv-texte > * { animation: none; } }

/* Terracotta : un texte posé sur le terracotta prend le ton plein (blanc à 5,5:1 en clair). */
.compte, .vues-courses .bloc-n { background: var(--vif-plein); color: var(--sur-vif); }
.ligne-interrupteur[aria-checked="true"] .interrupteur i { background: var(--sur-vif); }

/* Clair ou sombre : une icône discrète en haut à droite de chaque écran. */
.bascule-theme { flex: none; display: grid; place-items: center; width: var(--hit); height: var(--hit); border-radius: var(--r); color: var(--text2); transition: background var(--vite), transform var(--vite); }
.bascule-theme .ic { width: 20px; height: 20px; }
.bascule-theme:active { background: var(--g2); transform: scale(.94); }
.bascule-theme:focus-visible { outline: 2px solid var(--vif); outline-offset: -2px; }
@media (hover: hover) { .bascule-theme:hover { background: var(--g1); color: var(--ink); } }
.app-bar:has(> .bascule-theme) { grid-template-columns: var(--hit) minmax(0, 1fr) var(--hit); }
.barre-rayons:has(> .bascule-theme) .rayons { margin-right: 0; padding-right: 0; }
.coin-theme { position: absolute; z-index: 3; top: calc(env(safe-area-inset-top, 0px) + var(--s3)); right: max(20px, env(safe-area-inset-right, 0px)); }
.bienvenue .coin-theme .bascule-theme { background: var(--bar); color: var(--ink); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.premiere .titre { padding-right: calc(var(--hit) + var(--s2)); }

/* Premier lancement : « Ta cuisine » et « Tes essentiels ». Images en couleur, toujours ; le choix se voit au fond, à l'anneau et à la coche. */
.depart-ecran .body { padding-top: 0; }
.depart .points { margin-top: var(--s2); }
.depart .titre { margin-top: var(--s4); padding-right: 0; font-size: 32px; line-height: 1.05; }
.depart-sous { margin-top: var(--s2); font-size: var(--t-m); line-height: 1.4; color: var(--mute); }
.depart .vis { display: block; object-fit: contain; }

.grille-cuisine { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); margin-top: var(--s5); }
.tuile-cuisine { position: relative; display: grid; justify-items: center; align-content: start; gap: var(--s2); min-width: 0; padding: var(--s3) var(--s1); border-radius: var(--r-m); background: var(--g1); transition: background var(--vite), box-shadow var(--vite), transform var(--vite) var(--ease); }
.tuile-cuisine .vis { width: 56px; height: 56px; }
.tuile-cuisine .tc-nom { font-size: 13px; font-weight: 500; line-height: 1.2; color: var(--text2); text-align: center; }
/* Choisi : carte blanche, ombre douce et coche ; pas de cadre (trop brut). */
.tuile-cuisine[aria-pressed="true"] { background: var(--carte); box-shadow: var(--lift), 0 8px 16px -12px rgba(42, 30, 21, .35); }
.tuile-cuisine[aria-pressed="true"] .tc-nom { color: var(--ink); font-weight: 600; }
.tuile-cuisine:active { transform: scale(.96); }
.tc-ok { position: absolute; top: var(--s2); right: var(--s2); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 10px; background: var(--vif-plein); color: var(--sur-vif); opacity: 0; transform: scale(.6); transition: opacity var(--vite), transform .25s var(--rebond); }
.tc-ok .coche { position: static; width: 14px; height: 14px; margin: 0; opacity: 1; transform: none; color: var(--sur-vif); stroke-width: 3; }
.tuile-cuisine[aria-pressed="true"] .tc-ok { opacity: 1; transform: none; }
.tuile-cuisine.vient .vis { animation: pop-image .26s var(--rebond); }
.tuile-cuisine:focus-visible { outline: 2px solid var(--vif); outline-offset: 2px; }

.liste-ess { display: grid; gap: var(--s2); }
/* Même titre de rayon que la liste « À acheter » de Courses */
.rayon-ess { margin-top: var(--s5); }
.rayon-ess + .rayon-ess { margin-top: var(--s4); }
.rayon-ess-titre { display: flex; align-items: center; height: 32px; padding: 0 var(--s2); font-size: var(--t-s); font-weight: 600; color: var(--text2); }
/* Pas d'image : une tuile neutre de la même taille, coins arrondis, pictogramme ou initiale */
.tuile-neutre { display: grid; place-items: center; border-radius: var(--r); background: var(--g2); color: var(--text2); }
.tuile-neutre .ic { width: 22px; height: 22px; stroke-width: 1.75; }
.tuile-lettre { font-family: var(--display); font-size: 20px; font-weight: 600; line-height: 1; }
.ligne-ess { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s3); border-radius: var(--r-m); background: var(--g1); transition: background var(--vite); }
.ligne-ess .vis { width: 44px; height: 44px; justify-self: center; }
.ligne-ess[data-etat="jai"], .ligne-ess[data-etat="acheter"] { background: var(--carte); }
.le-nom { min-width: 0; }
.le-nom b { display: block; font-size: var(--t-m); font-weight: 600; line-height: 1.25; color: var(--ink); }
.le-nom small { display: block; margin-top: 0; font-size: 13px; font-weight: 600; color: var(--vif-encre); }
.seg-ess { display: flex; gap: var(--s1); padding: var(--s1); border-radius: 10px; background: var(--bg); }
.seg-ess button { height: var(--hit); padding: 0 var(--s2); border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--mute); white-space: nowrap; transition: background var(--vite), color var(--vite), transform var(--vite) var(--ease); }
.seg-ess button:active { transform: scale(.94); }
.seg-ess button[data-valeur="jai"][aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg-ess button[data-valeur="acheter"][aria-pressed="true"] { background: var(--vif-plein); color: var(--sur-vif); }
.seg-ess button:focus-visible { outline: 2px solid var(--vif); outline-offset: -2px; }
.ligne-ess.vient .seg-ess [aria-pressed="true"] { animation: pop-doux .22s var(--rebond); }

.depart-ecran .pied { padding-top: var(--s2); }
.apres-courses { margin-bottom: var(--s2); font-size: var(--t-s); line-height: 1.3; color: var(--text2); text-align: center; }
.apres-courses b { color: var(--vif-encre); }
.btn-go { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); width: 100%; height: 64px; padding: var(--s2) var(--s2) var(--s2) var(--s5); border-radius: var(--r-m); background: var(--ink); color: var(--bg); font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.01em; text-align: left; box-shadow: 0 14px 30px -16px rgba(42, 30, 21, .6); transition: transform .15s var(--ease); }
.btn-go:active { transform: scale(.97); }
.btn-go b { font-weight: 800; font-variant-numeric: tabular-nums; }
.btn-go:focus-visible { outline: 2px solid var(--vif); outline-offset: 2px; }
.go-fl { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; background: var(--vif-plein); color: var(--sur-vif); transition: transform .2s var(--ease); }
.go-fl .ic { stroke-width: 2.2; }
@media (hover: hover) { .btn-go:hover .go-fl { transform: translateX(4px); } }
@keyframes pop-image { from { transform: scale(.85); } }
@media (prefers-reduced-motion: reduce) { .tuile-cuisine.vient .vis, .ligne-ess.vient .seg-ess [aria-pressed="true"] { animation: none; } }

/* Tes essentiels, 35 lignes : tuile neutre centrée ; sous 400 px, les deux boutons passent sous le nom, sur toute sa largeur */
.depart .vis.tuile-neutre { display: grid; }
.ligne-ess .vis { align-self: center; }
@media (max-width: 399px) {
  .ligne-ess { grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "vis nom" "vis seg"; row-gap: var(--s2); padding: var(--s2); }
  .ligne-ess .vis { grid-area: vis; }
  .ligne-ess .le-nom { grid-area: nom; padding-top: var(--s1); }
  .ligne-ess .seg-ess { grid-area: seg; display: grid; grid-template-columns: 1fr 1fr; }
  .ligne-ess .seg-ess button { text-align: center; }
}

/* Plat sans photo : une carte chaude de la palette, les détourés de ses produits, le nom en Bricolage. Listes, recherche et fiche. */
:root { --pc-0: #F9E7DA; --pc-1: #F2D9C2; --pc-2: #EFE3CF; --pc-3: #F5DDD0; --pc-0b: #F2D1BC; --pc-1b: #EBC9A9; --pc-2b: #E4D2B5; --pc-3b: #EECBB8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --pc-0: #3A251B; --pc-1: #3B2C1C; --pc-2: #2F2A21; --pc-3: #3A2420; --pc-0b: #4A2E20; --pc-1b: #4A3622; --pc-2b: #3E372B; --pc-3b: #4A2D27; } }
:root[data-theme="dark"] { --pc-0: #3A251B; --pc-1: #3B2C1C; --pc-2: #2F2A21; --pc-3: #3A2420; --pc-0b: #4A2E20; --pc-1b: #4A3622; --pc-2b: #3E372B; --pc-3b: #4A2D27; }
.plat-carte { display: flex !important; align-items: center; justify-content: center; overflow: hidden; }
.plat-carte.teinte-0 { background: linear-gradient(150deg, var(--pc-0), var(--pc-0b)) !important; }
.plat-carte.teinte-1 { background: linear-gradient(150deg, var(--pc-1), var(--pc-1b)) !important; }
.plat-carte.teinte-2 { background: linear-gradient(150deg, var(--pc-2), var(--pc-2b)) !important; }
.plat-carte.teinte-3 { background: linear-gradient(150deg, var(--pc-3), var(--pc-3b)) !important; }
.pc-decoupes { display: flex; align-items: center; justify-content: center; color: var(--text2); }
.pc-decoupes img { display: block; width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(60, 30, 10, .18)); }
.pc-decoupes i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r); background: rgba(255, 255, 255, .55); }
:root[data-theme="dark"] .pc-decoupes i { background: rgba(255, 240, 220, .08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pc-decoupes i { background: rgba(255, 240, 220, .08); } }
.pc-decoupes i .ic { width: 24px; height: 24px; stroke-width: 1.75; }
.pc-lettre { font-family: var(--display); font-size: 28px; font-weight: 800; color: var(--text2); }
/* Vignette de liste : un seul détouré */
.plat-photo.plat-carte .pc-decoupes > :not(:first-child) { display: none; }
/* Grande carte de « Tout est là » : les détourés en haut, le nom en encre et en Bricolage en bas, sans voile sombre */
.fil-section.une .plat-photo.plat-carte { align-items: flex-start; padding-top: 12%; }
.fil-section.une .plat-photo.plat-carte .pc-decoupes > :not(:first-child) { display: grid; }
.fil-section.une .plat-carte .pc-decoupes img, .fil-section.une .plat-carte .pc-decoupes i { width: 48px; height: 48px; }
.fil-section.une .plat-carte .pc-decoupes > * + * { margin-left: -8px; }
.fil-section.une .ligne-plat.sans-photo .plat-lien::after { display: none; }
.fil-section.une .ligne-plat.sans-photo .plat-texte { color: var(--ink); }
.fil-section.une .ligne-plat.sans-photo .plat-texte b { font-family: var(--display); font-weight: 700; color: var(--ink); }
.fil-section.une .ligne-plat.sans-photo .plat-texte small:not(.plat-manque) { background: var(--carte); color: var(--ink); -webkit-backdrop-filter: none; backdrop-filter: none; }
.fil-section.une .ligne-plat.sans-photo .plat-texte .plat-manque, .fil-section.une .ligne-plat.sans-photo .plat-texte .plat-manque .nom-entier { color: var(--ink); }
/* Haut de la fiche : la même carte, plus basse qu'une photo, détourés plus grands */
.hero-cadre.sans-photo .hero-photo { aspect-ratio: 16 / 8; transform: none !important; border-radius: var(--r-l); }
.hero-cadre.sans-photo .pc-decoupes img, .hero-cadre.sans-photo .pc-decoupes i { width: 80px; height: 80px; }
.hero-cadre.sans-photo .pc-decoupes i .ic { width: 36px; height: 36px; }
.hero-cadre.sans-photo .pc-decoupes > * + * { margin-left: -12px; }

/* Audit d'usage (outils/audit-usage.cjs) : rien de coupé, cibles de 44 px, contraste 4,5:1, coins emboîtés */
/* Noms de plats et de produits en entier : jamais de « … » */
.plat-texte b, .fil-section.une .plat-texte b, .titre-long b { display: block; -webkit-line-clamp: none; overflow: visible; }
.ing-texte small { white-space: normal; overflow: visible; text-overflow: clip; }
.infos-recette { flex-wrap: wrap; row-gap: var(--s1); white-space: normal; overflow: visible; }
.infos-recette > span { min-width: 0; }
/* Produit qui manque, avant de cuisiner : barré mais lisible */
.sors-ligne.barre { opacity: 1; }
.sors-ligne.barre b { color: var(--text2); }
.sors-ligne.barre small, .sors-ligne.barre .qte { color: var(--text2); }
/* Cibles de 44 px : le panier des lignes de plat, les traits des étapes */
.fil-section:not(.une) .acheter-carre, .fil-section:not(.une) .dans-carre { width: var(--hit); height: var(--hit); border-radius: var(--r); }
.pas > span { flex: 1; display: grid; align-items: center; height: var(--s5); }
.ing.manque { padding-block: var(--s1); }
/* Le bouton « À acheter » d'une ligne d'ingrédient : son coin suit celui de la ligne */
.ing .acheter { border-radius: var(--r-petit); }
/* L'interrupteur : rectangle aux coins emboîtés, pas de pilule */
.interrupteur { border-radius: var(--r-petit); }
.interrupteur i { top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 4px; }
.ligne-interrupteur[aria-checked="true"] .interrupteur i { transform: translateX(20px); }
/* Le nom du produit : un champ plein, pas un trait dessous */
.nom-champ { border-bottom: 0; padding: 0 var(--s3); border-radius: var(--r); background: var(--g1); }
.nom-champ:focus-within { box-shadow: inset 0 0 0 2px var(--ink); }
/* Accueil : le point et le mot qui change, en terracotta foncé lisible */
.bv-point, .bv-mot { color: var(--vif-encre) !important; }
/* Carte sans photo de « Tout est là » : le fond remplit la carte, les détourés en haut, le texte dessous dans le flux ; la carte grandit si le nom est long */
.fil-section.une .ligne-plat.sans-photo .plat-photo.plat-carte { position: absolute; inset: 0; width: auto; height: auto; aspect-ratio: auto; padding-top: var(--s4); }
.fil-section.une .ligne-plat.sans-photo .plat-texte { position: relative; padding-top: 72px; }
/* Ligne d'ingrédient étroite : le nom garde sa place, la quantité passe à la ligne s'il le faut */
.ing-nom .ing-texte { flex: 1 1 0; min-width: 0; }
.ing-nom .qte, .sors-ligne .qte { flex: 0 1 auto; max-width: 50%; white-space: normal; overflow-wrap: anywhere; }
.champ-recherche input { padding: 0; }
/* Coins emboîtés : rayon intérieur = rayon extérieur moins la marge */
.fil-section:not(.une) .plat-photo { border-radius: var(--r-petit); }
.ing { border-radius: 10px; }
.ing.manque .acheter { align-self: stretch; height: auto; min-height: var(--hit); border-radius: 6px; }
.sors-liste > .option.ligne, .sors-liste > .sors-ligne { border-radius: 10px; }
.ligne-ess .vis.tuile-neutre { border-radius: 10px; }
/* Cartes de « Tout est là » : l'image remplit la carte, le texte reste dans le flux ; un nom long agrandit la carte au lieu de déborder */
.fil-section.une .plat-lien { display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 1; min-height: auto; }
.fil-section.une .ligne-plat:first-child:nth-last-child(odd) .plat-lien { aspect-ratio: 16 / 10; }
.fil-section.une .plat-photo, .fil-section.une .ligne-plat:first-child:nth-last-child(odd) .plat-photo { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
.fil-section.une .plat-texte { position: relative; left: auto; right: auto; bottom: auto; }
.fil-section.une .ligne-plat.sans-photo .plat-photo.plat-carte { width: 100%; height: 100%; }
.ing-texte b, .ing-nom b { hyphens: auto; overflow-wrap: break-word; }
/* La carte grandit avec son texte : pas de découpe sur la carte (elle empêcherait de grandir), la découpe est sur l'image et le voile */
.fil-section.une .plat-lien { overflow: visible; }
.fil-section.une .plat-photo, .fil-section.une .ligne-plat:first-child:nth-last-child(odd) .plat-photo { border-radius: var(--r-l); }
.fil-section.une .plat-lien::after { border-radius: 0 0 var(--r-l) var(--r-l); }
.fil-section.une .ligne-plat { display: flex; flex-direction: column; }
.fil-section.une .plat-lien { flex: 1 0 auto; min-width: 0; }
/* La forme carrée est portée par la carte (elle grandit avec son texte), le lien la remplit */
.fil-section.une .ligne-plat { aspect-ratio: 1; }
.fil-section.une .ligne-plat:first-child:nth-last-child(odd) { aspect-ratio: 16 / 10; }
.fil-section.une .plat-lien, .fil-section.une .ligne-plat:first-child:nth-last-child(odd) .plat-lien { aspect-ratio: auto; }
.fil-section.une .ligne-plat { width: 100%; min-width: 0; }
.fil-section.une .plat-texte b { overflow-wrap: anywhere; }
.fil-section.une .plat-texte .mot { white-space: normal; }
/* Forme minimale par une cale (carré, ou 16/10 pour la grande) dans la même case que le texte : la carte grandit en hauteur seulement */
.fil-section.une .ligne-plat, .fil-section.une .ligne-plat:first-child:nth-last-child(odd) { display: block; aspect-ratio: auto; }
.fil-section.une .plat-lien { display: grid; grid-template: auto / minmax(0, 1fr); height: 100%; }
.fil-section.une .plat-lien::before { content: ""; grid-area: 1 / 1; width: 100%; aspect-ratio: 1; }
.fil-section.une .ligne-plat:first-child:nth-last-child(odd) .plat-lien::before { aspect-ratio: 16 / 10; }
.fil-section.une .plat-texte { grid-area: 1 / 1; align-self: end; }
.allergenes { margin-top: var(--s2); font-size: var(--t-m); line-height: 1.45; color: var(--text2); }
.allergenes-marque { margin-top: var(--s2); line-height: 1.45; color: var(--text2); }
.ligne-ess { padding: var(--s2); }
@media (min-width: 400px) { .ligne-ess { grid-template-columns: 44px minmax(0, 1fr) auto; } }
/* Partage du foyer : relier un téléphone, inviter (QR code, lien, code), l'état de la synchronisation. */
.partage { min-width: 0; }
.partage > p { margin: 0 0 var(--s3); }
.partage .duo + .partage-saisie, .partage .duo + .partage-erreur { margin-top: var(--s3); }
.partage-saisie { display: flex; gap: var(--s2); }
.partage-saisie input { flex: 1; width: 100%; min-width: 0; border: 0; height: var(--btn); padding: 0 var(--s3); border-radius: var(--r); background: var(--g1); color: var(--ink); font: 600 var(--t-l) var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.partage-saisie input::placeholder { color: var(--mute); }
.partage-saisie input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.partage-saisie .btn-primaire { flex: none; width: auto; }
.partage-etat { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s1) var(--s3); }
.synchro { font-size: var(--t-s); color: var(--mute); }
.invitation { display: grid; justify-items: center; gap: var(--s3); margin: 0 0 var(--s3); text-align: center; }
.invitation p { margin: 0; }
.invitation-qr { width: min(220px, 100%); padding: var(--s2); border-radius: var(--r); background: #fff; }
.invitation-qr .qr { display: block; width: 100%; height: auto; }
.invitation-code b { display: block; margin-top: var(--s1); font-size: var(--t-xl); letter-spacing: .08em; white-space: nowrap; }
.partage-erreur { margin: 0 0 var(--s3); color: var(--alerte); font-size: var(--t-s); }
.partage-lien { min-height: var(--hit); padding: 0 var(--s2); margin-left: calc(-1 * var(--s2)); color: var(--text2); font-size: var(--t-s); text-decoration: underline; text-underline-offset: 3px; }
.partage-quitter p { margin: 0 0 var(--s3); }
#courses .synchro-courses { margin: 0; font-size: var(--t-xs); color: var(--mute); align-self: center; }
.appareils { display: grid; gap: var(--s1); margin: 0 0 var(--s3); padding: 0; list-style: none; }
.appareil { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s3); min-height: var(--hit); }
.appareil > span { display: grid; min-width: 0; }
.appareil small { color: var(--mute); font-size: var(--t-s); }
.appareil .duo { flex-basis: 100%; }
.invitation .partage-lien { margin-left: 0; }

/* « Voir plus de plats » : Manger montre peu de plats d'un coup, ce bouton en ajoute 20. */
.voir-plus { display: flex; align-items: center; justify-content: center; gap: var(--s2); width: 100%; min-height: var(--hit); margin-top: var(--s4); padding: var(--s2) var(--s4); border-radius: var(--r-m); background: var(--g1); color: var(--ink); font-size: var(--t-m); font-weight: 600; transition: background var(--vite), transform var(--vite); }
.voir-plus:active { background: var(--g2); transform: scale(.98); }
.voir-plus small { font-size: var(--t-s); font-weight: 500; color: var(--text2); }
/* Dans une ligne de liste, la carte sans photo est petite (coins de 8 px) : le pictogramme s'y pose sans pastille. */
.fil-section:not(.une) .plat-carte .pc-decoupes i, :root[data-theme="dark"] .fil-section:not(.une) .plat-carte .pc-decoupes i { border-radius: 0; background: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fil-section:not(.une) .plat-carte .pc-decoupes i { background: none; } }

/* Test utilisateur du 16/11 : carte sans photo, le signe de la cuisson et le pays du plat, jamais un produit cru à sa place */
.pc-decoupes { flex-direction: column; gap: var(--s1); }
.pc-origine { font-size: var(--t-xs); font-weight: 600; line-height: 1.2; color: var(--text2); text-align: center; }
.fil-section:not(.une) .pc-origine { display: none; }
.hero-cadre.sans-photo .pc-origine { font-size: var(--t-m); }
/* Pastilles sous la recherche : une rangée qui défile au doigt si elle ne tient pas */
.pastilles { display: flex; gap: var(--s2); margin: var(--s3) calc(-1 * max(16px, env(safe-area-inset-left, 0px))) 0; padding: 0 max(16px, env(safe-area-inset-left, 0px)); overflow-x: auto; scrollbar-width: none; }
.pastilles::-webkit-scrollbar { display: none; }
.pastilles .option { flex: none; padding: 0 var(--s4); white-space: nowrap; }
.pastilles .option[aria-pressed="true"] { padding-left: var(--s6, 32px); }
.regime-actif { margin: var(--s3) 0 0; font-size: var(--t-s); line-height: 1.4; color: var(--text2); }
.lien-regime { min-height: var(--hit); padding: 0 var(--s2); color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
/* « Sors : » : la quantité tient sur une ligne, jamais coupée lettre par lettre ; « Il manque » passe sous le nom */
.ing-nom .qte, .sors-ligne .qte, .ligne-manque .qte { white-space: normal; overflow-wrap: normal; word-break: normal; hyphens: none; max-width: none; flex: 0 1 auto; }
.sors-ligne .il-manque { color: var(--alerte); font-weight: 600; }
.sors-ligne.barre .il-manque { color: var(--alerte); }
.etapes-pour { margin: 0 0 var(--s3); }
/* Tes essentiels, plus léger : une ligne d'une seule hauteur (image, nom, deux boutons), « Voir les N autres » par rayon */
.ligne-ess, .ligne-ess:is([data-etat]) { grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: none; row-gap: 0; column-gap: var(--s2); padding: var(--s1) var(--s1) var(--s1) var(--s2); }
.ligne-ess .vis { grid-area: auto; width: 40px; height: 40px; }
.ligne-ess .vis-produit { object-fit: contain; border-radius: 10px; background: var(--photo-blanc); padding: 4px; }
.ligne-ess .le-nom { grid-area: auto; padding-top: 0; }
.ligne-ess .le-nom b { font-size: var(--t-s); overflow-wrap: break-word; hyphens: auto; }
.ligne-ess .le-nom small { font-size: var(--t-xs); }
.ligne-ess .seg-ess { grid-area: auto; display: flex; }
.ligne-ess .seg-ess button { padding: 0 var(--s2); }
.ess-plus { display: flex; align-items: center; justify-content: center; gap: var(--s1); width: 100%; min-height: var(--hit); margin-top: var(--s2); border-radius: var(--r); background: transparent; box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink); font-size: var(--t-s); font-weight: 600; }
.ess-plus .ic { width: 16px; height: 16px; }
.liste-ess + .ess-plus { margin-top: var(--s2); }
.bv-mosaique { transition: filter .5s var(--ease), opacity .5s; }
/* Minuteur fini sur l'écran d'étape : un bloc plein couleur d'alerte, aussi visible que le minuteur en cours */
.mini-ligne.fin, :root[data-theme="dark"] .mini-ligne.fin { height: auto; min-height: 56px; padding: var(--s1) var(--s1) var(--s1) 0; background: var(--vif-plein); color: var(--sur-vif); }
.mini-ligne.fin .mini-btn, .mini-ligne.fin .mini-btn span { color: var(--sur-vif); font-weight: 600; }
.mini-ligne.fin b, :root[data-theme="dark"] .mini-ligne.fin b { color: var(--sur-vif); font-size: var(--t-l); }
.mini-ligne.fin .mini-action { min-width: var(--hit); height: var(--hit); background: var(--bg); color: var(--ink); font-weight: 700; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mini-ligne.fin { background: var(--vif-plein); } :root:not([data-theme="light"]) .mini-ligne.fin b { color: var(--sur-vif); } }
.mini-ligne.fin { border-radius: 16px; } .mini-ligne.fin .mini-btn { height: 48px; } .mini-ligne.fin .mini-action { border-radius: 12px; }
/* Tes essentiels : boutons de 44 px de large au moins, coins emboîtés (ligne 18, marge 4 : 14 ; puis 10) */
.ligne-ess .seg-ess { border-radius: 14px; }
.ligne-ess .seg-ess button { min-width: var(--hit); border-radius: 10px; }
/* Ingrédient : le nom ne se coupe pas par césure ; sur un petit écran, une quantité longue passe sous le nom */
.ing-texte b, .ing-nom b { hyphens: manual; -webkit-hyphens: manual; overflow-wrap: break-word; }
@media (max-width: 400px) {
  .ing-nom.q-longue { flex-wrap: wrap; row-gap: var(--s1); }
  .ing-nom.q-longue .ing-texte { flex: 1 1 100%; }
  .ing-nom.q-longue .qte { margin-left: 0; text-align: left; }
  .sors-ligne.q-longue, .option.sors-ligne.q-longue { grid-template-columns: 24px minmax(0, 1fr); row-gap: var(--s1); }
  .sors-ligne.q-longue .qte { grid-column: 2; margin-left: 0; text-align: left; }
}
@media (max-width: 400px) { .sors-ligne.q-longue .case-ligne { grid-row: 1 / span 2; } }
/* Bandeau de régime : une ligne serrée, « Changer » dans la même ligne */
.regime-actif { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--s2); row-gap: 0; line-height: 1.35; }
.regime-actif .lien-regime { min-height: var(--hit); padding: 0; }
.hors-regime { margin: 0 0 var(--s3); color: var(--alerte); font-weight: 600; }
.conseil-pret { display: grid; gap: var(--s3); padding: var(--s4); border-radius: var(--r-m); background: var(--g1); }
.conseil-pret p { margin: 0; line-height: 1.4; }
.conseil-tablee { margin: 0 0 var(--s3); padding: var(--s3); border-radius: var(--r); background: var(--vif-doux); color: var(--ink); font-size: var(--t-s); line-height: 1.4; }
/* Fiche sans photo : un bandeau bas, pas un tiers de l'écran */
.hero-cadre.sans-photo .hero-photo { aspect-ratio: 16 / 5; }
.hero-cadre.sans-photo .pc-decoupes i, .hero-cadre.sans-photo .pc-decoupes img { width: 56px; height: 56px; }
.hero-cadre.sans-photo .pc-decoupes i .ic { width: 28px; height: 28px; }
.bande-plus .ic { width: 16px; height: 16px; margin-right: 2px; }
.bande-plus { display: inline-flex; align-items: center; justify-content: center; gap: 2px; }
.aide-qui { margin: var(--s1) 0 var(--s2); }
/* Bandeau bas de la fiche sans photo : le pictogramme posé sans pastille (pas de coin à emboîter près du bord) */
.hero-cadre.sans-photo .pc-decoupes i, :root[data-theme="dark"] .hero-cadre.sans-photo .pc-decoupes i { background: none; border-radius: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero-cadre.sans-photo .pc-decoupes i { background: none; } }
.resume-ess { margin: 0 0 var(--s2); font-size: var(--t-s); color: var(--text2); text-align: center; }
.resume-ess b { color: var(--ink); }
/* Parts sur la fiche : − N + pour ce plat seulement */
.parts-fiche { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin: 0 0 var(--s3); }
.parts-fiche .pour-qui { flex: 1 1 auto; font-size: var(--t-s); color: var(--text2); }
.parts-fiche .pas-a-pas { display: inline-flex; align-items: center; gap: var(--s2); }
.parts-fiche output { min-width: 24px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
/* Fiche produit : la coche d'un état choisi ne touche pas le mot */
.etats .option[aria-pressed="true"] { padding-left: var(--s6); }
/* Coins emboîtés (audit) : le bloc des deux boutons prend toute la hauteur de la ligne ; la tuile sans photo de « Ta cuisine » sans fond */
.ligne-ess .seg-ess { align-self: stretch; align-items: center; }
.tuile-cuisine .vis.tuile-neutre { background: none; border-radius: 0; }
.ligne-ess .seg-ess { align-items: stretch; }
.ligne-ess .seg-ess button { height: auto; min-height: var(--hit); }

/* Chez moi : tes appareils, tes essentiels, ce que tu as pris pour une fois. Grilles régulières, image et nom ; un seul geste. */
.cm { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); padding-top: var(--s2); }
.cm-bloc { min-width: 0; }
.cm-tete { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: var(--hit); }
.cm-tete h2 { margin: 0; font-family: var(--display); font-size: var(--t-xl); font-weight: 800; letter-spacing: -.02em; }
.cm-tete h2 span { margin-left: 6px; font-family: var(--sans); font-size: var(--t-s); font-weight: 500; color: var(--mute); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.lien-cm { height: var(--hit); padding: 0 var(--s2); border-radius: var(--r-petit); color: var(--vif-encre); font-weight: 600; }
.cm-def { margin: calc(-1 * var(--s1)) var(--s1) var(--s2); font-size: var(--t-s); line-height: 20px; color: var(--text2); }
.cm .aide { margin: 0 var(--s1) var(--s2); }
.cm-appareils { display: flex; gap: var(--s2); padding: 2px 2px var(--s1); overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.cm-appareils::-webkit-scrollbar { display: none; }
.cm-appareils .cm-app { flex: none; width: 84px; }
.cm-app { display: grid; justify-items: center; gap: var(--s1); padding: var(--s2) var(--s1); border-radius: var(--r); background: var(--carte); box-shadow: var(--lift); font-size: var(--t-xs); font-weight: 600; line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
.cm-app .vis { width: 40px; height: 40px; object-fit: contain; }
.cm-app .vis.tuile-neutre { display: grid; }
.cm-filtre { display: inline-flex; align-items: center; gap: var(--s2); height: 40px; margin: 0 0 var(--s1); padding: 0 var(--s3); background: var(--vif-doux); border-radius: var(--r-petit); color: var(--vif-encre); font-size: var(--t-m); font-weight: 700; }
.cm-filtre .ic { width: 16px; height: 16px; }
.cm-filtre[aria-pressed="true"] { background: var(--vif-plein); color: var(--sur-vif); }
.cm-filtre span { margin-left: var(--s1); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.cm-rayon { margin: var(--s4) var(--s1) var(--s2); font-size: var(--t-s); font-weight: 600; color: var(--text2); }
.cm-rayon:first-of-type { margin-top: var(--s2); }
.rayon-ess-titre span { margin-left: auto; font-weight: 500; color: var(--mute); font-variant-numeric: tabular-nums; }
.cm-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.cm-case { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: var(--s2); min-height: 56px; padding: var(--s2); border-radius: var(--r); background: var(--carte); box-shadow: var(--lift); text-align: left; transition: background var(--vite), transform var(--vite) var(--ease); }
.cm-case:active { transform: scale(.96); }
.cm-img { position: relative; display: block; width: 40px; height: 40px; }
.cm-img .vis { display: block; width: 40px; height: 40px; object-fit: contain; border-radius: var(--r-petit); }
.cm-img .vis-produit { padding: 2px; background: var(--photo-blanc, #fff); }
.cm-img .vis.tuile-neutre { display: grid; }
.cm-img i { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--vif-plein); color: var(--sur-vif); box-shadow: 0 0 0 2px var(--vif-doux); }
.cm-img i .ic, .cm-img i svg { width: 12px; height: 12px; }
.cm-nom { display: grid; min-width: 0; font-size: 13px; font-weight: 600; line-height: 16px; overflow-wrap: anywhere; color: var(--ink); }
.cm-nom small { font-size: var(--t-xs); font-weight: 700; color: var(--vif-encre); }
.cm-case[aria-pressed="true"] { background: var(--vif-doux); box-shadow: none; }
.cm-case[aria-pressed="true"] .cm-nom { color: var(--vif-encre); }
.cm-case.absent { background: transparent; box-shadow: inset 0 0 0 1.5px var(--g3); }
.cm-case.absent .vis { opacity: .5; filter: grayscale(1); }
.cm-case.absent .cm-nom small { color: var(--mute); }
.cm-case.choix { background: var(--g1); box-shadow: none; }
.cm-case.choix .vis { opacity: .75; }
.cm-case.choix[aria-pressed="true"] { background: var(--carte); box-shadow: var(--lift), 0 8px 16px -12px rgba(42, 30, 21, .35); }
.cm-case.choix[aria-pressed="true"] .vis { opacity: 1; }
.cm-case.choix[aria-pressed="true"] .cm-nom { color: var(--ink); }
.cm-case.choix .cm-img i { background: var(--vif-plein); color: var(--sur-vif); box-shadow: 0 0 0 2px var(--carte); }
.cm-case.vient .cm-img { animation: pop-image .26s var(--rebond); }
.cm-case:focus-visible, .cm-filtre:focus-visible, .lien-cm:focus-visible { outline: 2px solid var(--vif); outline-offset: -2px; }
@media (hover: hover) { .cm-case:hover { filter: brightness(.97); } .lien-cm:hover, .cm-filtre:hover { background: var(--g1); } }
.tc-gain { font-size: var(--t-xs); font-weight: 700; color: var(--vif-encre); }
@media (prefers-reduced-motion: reduce) { .cm-case.vient .cm-img { animation: none; } }
/* Mise à jour de l'app, dans Foyer */
.maj { display: grid; gap: var(--s2); }
.maj-ligne { display: flex; justify-content: space-between; gap: var(--s3); font-size: var(--t-s); color: var(--text2); }
.maj-ligne b { color: var(--ink); font-variant-numeric: tabular-nums; }
.manger.cherche > .head, .manger.cherche > .propose, .manger.cherche > .pied-legal { display: none; }
.manger.tape:not(.filtres-vus) .pastilles { display: none; }
.device.clavier .navbar { display: none; }
.device.clavier:has(.navbar) :is(.screen, .courses) { bottom: 0; }
.manger.cherche .outils .champ-recherche, .manger.cherche .outils .carre { margin-top: var(--s2); }
.manger.tape #fil .fil-section { margin-top: var(--s3); }
.manger.tape #fil .plats { gap: 0; padding: 0; background: none; border-radius: 0; }
.manger.tape #fil .ligne-plat { gap: var(--s2); padding: 4px 0; background: none; border-radius: 0; box-shadow: none; animation: none; }
.manger.tape #fil .ligne-plat + .ligne-plat { border-top: 1px solid var(--hair); }
.manger.tape #fil .plat-lien { grid-template-columns: 44px minmax(0, 1fr); gap: var(--s3); min-height: 0; padding-block: 0; }
.manger.tape #fil .plat-photo { width: 44px; height: 44px; border-radius: var(--r); animation: none; }
.manger.tape #fil .plat-texte { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; row-gap: 2px; }
.manger.tape #fil .plat-texte b { flex-basis: 100%; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; line-height: 1.3; }
.manger.tape #fil .plat-texte b .mot { display: inline; white-space: normal; }
.manger.tape #fil .plat-manque .nom-entier { display: inline; white-space: nowrap; }
.manger.tape #fil .plat-texte small { flex: none; font-size: 12px; }
.manger.tape #fil .plat-texte .plat-manque { flex: 1 1 0; min-width: 0; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; line-height: 1.35; }
.manger.tape #fil .plat-texte .plat-manque::before { content: "· "; color: var(--mute); }
.manger.tape #fil .plat-manque.dans .ic { display: none; }
.manger.tape #fil .acheter-carre, .manger.tape #fil .dans-carre { width: 40px; height: 40px; }

/* Cuisine : les quantités de l'étape, sous son texte. */
.etape-ings { display: grid; gap: 2px; margin: var(--s4) 0 0; padding: var(--s2) var(--s3); list-style: none; border-radius: var(--r); background: var(--g1); }
.etape-ings li { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); padding-block: var(--s1); font-size: var(--t-l); line-height: 1.3; }
.etape-ings b { flex: none; max-width: 55%; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.ess-cherche { margin: var(--s2) 0 var(--s1); }
/* Ta cuisine ouverte depuis un appareil : l'appareil lui-même s'anime (grossit, se balance, halo terracotta), puis plus rien */
.cm-app { cursor: pointer; }
.cm-app:focus-visible { outline: 2px solid var(--vif); outline-offset: -2px; }
@media (hover: hover) { .cm-app:hover { background: var(--g1); } }
.tuile-cuisine.repere .vis { animation: repere .9s var(--rebond) .25s 2; }
@keyframes repere {
  0% { transform: none; filter: drop-shadow(0 0 0 color-mix(in srgb, var(--vif) 0%, transparent)); }
  30% { transform: scale(1.2) rotate(-6deg); filter: drop-shadow(0 0 6px var(--vif)) drop-shadow(0 0 16px color-mix(in srgb, var(--vif) 60%, transparent)); }
  55% { transform: scale(1.1) rotate(5deg); }
  100% { transform: none; filter: drop-shadow(0 0 0 color-mix(in srgb, var(--vif) 0%, transparent)); }
}
@media (prefers-reduced-motion: reduce) { .tuile-cuisine.repere .vis { animation: none; } }
