/* Waweat — styles de l'app et du panneau. Couleurs, rayons et espacements : uniquement via tokens.css. */

@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--creme); color: var(--cacao); font: 400 16px/24px var(--font-sans); }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* Titles get the focus on each screen so screen readers start there; they are not controls, so no ring. */
[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--cacao-muted); }

/* Mise en page : une colonne de 480 px max, zones sûres, barre d'actions fixe en bas. */
.page {
  max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-6);
  padding: calc(var(--space-6) + env(safe-area-inset-top)) calc(var(--space-4) + env(safe-area-inset-right))
    calc(var(--space-8) + env(safe-area-inset-bottom)) calc(var(--space-4) + env(safe-area-inset-left));
}
.page:focus { outline: none; }
.page.with-actions { padding-bottom: calc(190px + env(safe-area-inset-bottom)); }
.page.with-tabs { padding-bottom: calc(64px + var(--space-8) + env(safe-area-inset-bottom)); }
.lead { font: 400 18px/26px var(--font-sans); }
.stack { display: flex; flex-direction: column; gap: var(--space-2); }
.top { display: flex; align-items: center; gap: var(--space-2); }
.top .title { flex: 1; }
.title { font: 600 28px/32px var(--font-display); }

.actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--creme);
  padding: var(--space-3) calc(var(--space-4) + env(safe-area-inset-right)) calc(var(--space-4) + env(safe-area-inset-bottom)) calc(var(--space-4) + env(safe-area-inset-left));
}
.actions-inner { max-width: 448px; margin: 0 auto; display: grid; gap: var(--space-2); }

/* Icônes */
.icon { width: 24px; height: 24px; fill: currentColor; flex: none; }

/* Boutons : verbe d'abord, 52 px, un seul principal par écran. */
.btn {
  min-height: 52px; width: 100%; padding: var(--space-2) var(--space-6); border-radius: var(--radius-md); border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); font: 600 16px/20px var(--font-sans); text-align: center;
}
.btn-primary { background: var(--tomate-strong); color: var(--on-tomate); }
.btn-secondary { background: transparent; color: var(--cacao); border: 1.5px solid var(--cacao-muted); }
.btn-quiet { background: transparent; color: var(--tomate-strong); width: auto; min-height: 44px; padding: 0 var(--space-3); }
.btn-quiet.left { align-self: flex-start; margin-left: calc(-1 * var(--space-3)); }
.icon-btn {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; cursor: pointer;
  border-radius: var(--radius-full); border: 1.5px solid var(--cacao-muted); background: transparent; color: var(--cacao);
}
.icon-btn.ghost { border-color: transparent; color: var(--cacao-muted); }

/* Puces : choix rapides */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chips.three { display: grid; grid-template-columns: repeat(3, minmax(56px, max-content)); }
.chip {
  min-height: 44px; min-width: 44px; padding: 0 var(--space-4); border-radius: var(--radius-full); cursor: pointer;
  border: 1.5px solid var(--cacao-muted); background: transparent; color: var(--cacao); font: 600 16px/20px var(--font-sans);
}
.chip.small { padding: 0 var(--space-3); }
.chip[aria-pressed="true"] { background: var(--cacao); border-color: var(--cacao); color: var(--creme); }
.question { font: 500 13px/18px var(--font-sans); color: var(--cacao-muted); padding: 0; margin-bottom: var(--space-2); }
.plain { border: 0; padding: 0; margin: 0; min-width: 0; }

/* Cartes, listes, badges */
.card { background: var(--surface-raised); box-shadow: var(--shadow-card); border-radius: var(--radius-lg); padding: var(--space-4); }
.list { background: var(--surface-raised); box-shadow: var(--shadow-card); border-radius: var(--radius-lg); overflow: hidden; }
/* Each row draws its top line, the first one hidden under the list's edge: rows hidden by the search leave no stray line. */
.row {
  display: flex; align-items: center; gap: var(--space-3); min-height: 64px; padding: var(--space-2) var(--space-3);
  border-top: 1px solid var(--line); margin-top: -1px;
}
.edit + .edit { border-top: 1px solid var(--line); }
.row-main {
  flex: 1; min-width: 0; min-height: 44px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 2px;
  padding: 0; border: 0; background: none; text-align: left; cursor: pointer; border-radius: var(--radius-sm);
}
.row-name { font: 600 16px/20px var(--font-sans); overflow-wrap: anywhere; }
.row-qty { font: 500 13px/18px var(--font-sans); color: var(--cacao-muted); }
.row.editing > .icon-btn { display: none; }
.qty-edit { display: flex; align-items: center; gap: var(--space-2); }
.section { font: 600 20px/26px var(--font-display); }
.group { display: flex; flex-direction: column; gap: var(--space-2); }
.badge { align-self: flex-start; border-radius: var(--radius-sm); padding: var(--space-1) var(--space-3); font: 500 13px/18px var(--font-sans); background: var(--creme-deep); color: var(--cacao-muted); }

/* Champs */
.field { display: flex; flex-direction: column; gap: var(--space-1); }
.field > span { font: 600 16px/20px var(--font-sans); }
.input {
  min-height: 48px; width: 100%; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  background: var(--creme-deep); border: 1.5px solid var(--cacao-muted); color: var(--cacao);
}
.input.qty { width: 80px; flex: none; }
.input::placeholder { color: var(--cacao-muted); }
.check { width: 24px; height: 24px; accent-color: var(--cacao); flex: none; margin: 0; }
.check-wrap { width: 44px; height: 44px; display: grid; place-items: center; flex: none; cursor: pointer; margin-left: calc(-1 * var(--space-2)); }

/* Écran de vérification et de confirmation */
.edit { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3) var(--space-4); }
.edit-head, .edit-qty { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.edit-head .input:not(.qty) { flex: 1; min-width: 0; }
.edit.off .input, .edit.off .row-name { color: var(--cacao-muted); text-decoration: line-through; }
.grow { flex: 1; min-width: 0; }
.unit { font: 500 13px/18px var(--font-sans); color: var(--cacao-muted); }

/* Fichiers : l'appareil photo ou la photothèque, derrière un bouton */
.file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
label.btn, label.icon-btn { position: relative; }
label.btn:focus-within, label.icon-btn:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.small { font: 500 13px/18px var(--font-sans); }
.btn.small { font: 500 14px/20px var(--font-sans); text-align: left; justify-content: flex-start; text-decoration: underline; text-underline-offset: 3px; }

/* Le ticket d'abord : son badge */
.badge.best { display: inline-flex; align-items: center; gap: var(--space-1); background: var(--basilic-soft); color: var(--cacao); font-weight: 600; }
.badge .icon { width: 16px; height: 16px; color: var(--basilic); }
/* Étapes illustrées de l'aide, zones de l'inventaire */
.how { display: flex; flex-direction: column; gap: var(--space-4); }
.how li { display: flex; gap: var(--space-3); align-items: center; }
.zones .zone { display: flex; align-items: center; gap: var(--space-3); min-height: 64px; padding: var(--space-2) var(--space-3) var(--space-2) var(--space-4); }
.zones .zone + .zone { border-top: 1px solid var(--line); }
.zone .grow { display: flex; flex-direction: column; gap: 2px; }
.zone.done .disc { background: var(--basilic); color: var(--creme); }
.disc-num { font: 600 16px/20px var(--font-sans); }

/* Rappel d'inventaire sur l'accueil */
.reminder { display: flex; flex-direction: column; gap: var(--space-3); border-left: 4px solid var(--moutarde); }
.reminder-head { display: flex; align-items: center; gap: var(--space-2); }

/* États : vide, chargement, messages */
.empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); text-align: center; padding: var(--space-4) var(--space-4) 0; }
.notice, .alert { display: flex; gap: var(--space-2); align-items: flex-start; border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); }
.notice { background: var(--moutarde-soft); color: var(--moutarde-ink); }
.alert { background: var(--alerte-soft); color: var(--alerte); }
.ok { color: var(--basilic); }
.toast {
  position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); top: calc(var(--space-4) + env(safe-area-inset-top));
  width: max-content; max-width: min(448px, calc(100% - 2 * var(--space-4))); display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); border-radius: var(--radius-md); box-shadow: var(--shadow-card);
  background: var(--cacao); color: var(--creme); font: 600 16px/20px var(--font-sans);
}
.toast button { min-height: 44px; padding: 0 var(--space-3); border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

/* Compte */
.divider { display: flex; align-items: center; gap: var(--space-3); color: var(--cacao-muted); font: 500 13px/18px var(--font-sans); }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.input.code { font: 600 24px/32px var(--font-sans); letter-spacing: 0.25em; }
.status { display: flex; align-items: center; gap: var(--space-2); }
.btn-danger { background: transparent; color: var(--alerte); border: 1.5px solid var(--alerte); }
.btn-quiet.danger { color: var(--alerte); }

/* Photos en attente d'analyse : 4 au plus, en grille. */
.thumbs { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
.thumb { position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius-md); overflow: hidden; background: var(--creme-deep); box-shadow: var(--shadow-card); }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb .icon-btn { position: absolute; top: var(--space-2); right: var(--space-2); background: var(--surface-raised); border-color: transparent; }

/* Photos analysées : chaque aliment reconnu est encadré en vert clair ; celui qu'on modifie s'éclaire, et sa photo
   vient sous les yeux. Positions posées par app.js. */
.shots { display: flex; gap: var(--space-2); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; }
.shots:has(> :only-child) { justify-content: center; }
.shot { position: relative; flex: none; margin: 0; border-radius: var(--radius-md); overflow: hidden; scroll-snap-align: start; box-shadow: var(--shadow-card); }
.shot img { display: block; width: auto; height: auto; max-width: 100%; max-height: 40vh; }
.shots:not(:has(> :only-child)) .shot img { max-width: 80vw; }
.mark {
  position: absolute; border: 2px solid var(--basilic); border-radius: var(--radius-sm); pointer-events: none;
  background: color-mix(in srgb, var(--basilic) 18%, transparent); transition: background 0.2s, border-width 0.2s;
}
.mark.active { border-width: 4px; background: color-mix(in srgb, var(--basilic) 38%, transparent); }

/* Recette */
.meta { display: flex; flex-wrap: wrap; gap: var(--space-4); color: var(--cacao-muted); }
.meta span { display: inline-flex; align-items: center; gap: var(--space-1); }
.ingredients li { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--line); }
.ingredients .icon { width: 20px; height: 20px; color: var(--basilic); }
.ingredients .gone .icon { visibility: hidden; }
.ingredients .amount { min-width: 80px; font-weight: 600; }
.steps { counter-reset: step; display: flex; flex-direction: column; gap: var(--space-4); }
.steps li { counter-increment: step; display: flex; gap: var(--space-3); font: 500 22px/32px var(--font-sans); }
.steps li::before {
  content: counter(step); flex: none; width: 32px; height: 32px; border-radius: var(--radius-full); display: grid; place-items: center;
  background: var(--moutarde); color: var(--on-moutarde); font: 600 16px/20px var(--font-sans);
}
.steps.preview { gap: var(--space-3); }
.steps.preview li { font: 400 16px/24px var(--font-sans); }
.steps.preview li::before { width: 28px; height: 28px; font-size: 14px; }

/* La marque : logo horizontal en tête de Cuisiner, logo empilé sur l'accès et la connexion. Le nom suit --cacao
   (cacao le jour, creme le soir) ; le symbole garde ses couleurs. Zone de protection : la marge de la page. */
.brand { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 44px; }
.lockup { width: 139px; height: 28px; color: var(--cacao); }
.welcome { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); text-align: center; padding: var(--space-4) 0 var(--space-2); }
.stacked { width: 120px; height: 84px; color: var(--cacao); }
.promise { font: 600 20px/26px var(--font-display); max-width: 18em; }
h1.promise { font-size: 24px; line-height: 30px; }

/* La rondelle de la marque : une icône de rayon sur creme-deep. */
.disc {
  flex: none; width: 56px; height: 56px; border-radius: var(--radius-full); display: grid; place-items: center;
  background: var(--creme-deep); color: var(--cacao);
}
.disc.md { width: 40px; height: 40px; }
.disc.sm { width: 32px; height: 32px; }
.disc.sm .icon { width: 20px; height: 20px; }

/* Composition de rondelles (tomate, moutarde, basilic) pour les états vides et l'attente du repas. */
.plate { position: relative; flex: none; width: 136px; height: 112px; }
.plate span { position: absolute; border-radius: var(--radius-full); }
.plate span:nth-child(1) { left: 0; bottom: 0; width: 96px; height: 96px; background: var(--tomate); }
.plate span:nth-child(2) { right: 0; top: 0; width: 64px; height: 64px; background: var(--moutarde); }
.plate span:nth-child(3) { right: 12px; bottom: 0; width: 36px; height: 36px; background: var(--basilic); }
.plate.huge { width: 204px; height: 168px; animation: breathe 1.6s ease-in-out infinite alternate; }
.plate.huge span:nth-child(1) { width: 144px; height: 144px; }
.plate.huge span:nth-child(2) { width: 96px; height: 96px; }
.plate.huge span:nth-child(3) { width: 54px; height: 54px; right: 18px; }
@keyframes breathe { to { transform: scale(1.05); } }

/* Barre d'onglets : Cuisiner, Ajouter (rond, cacao, jamais tomate), Garde-manger. */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface-raised); border-top: 1px solid var(--line);
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.tabbar-inner { max-width: 480px; margin: 0 auto; height: 64px; display: grid; grid-template-columns: 1fr 88px 1fr; align-items: center; }
.tab {
  height: 100%; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; background: none; color: var(--cacao-muted); font: 500 13px/18px var(--font-sans); cursor: pointer;
}
.tab[aria-current="page"] { color: var(--cacao); font-weight: 600; }
.tab-add {
  justify-self: center; width: 56px; height: 56px; margin-top: -24px; border: 0; border-radius: var(--radius-full); cursor: pointer;
  display: grid; place-items: center; background: var(--cacao); color: var(--creme); box-shadow: var(--shadow-card);
}

/* Feuilles : un <dialog> qui monte du bas. */
.sheet {
  top: auto; bottom: 0; margin: 0 auto; width: 100%; max-width: 480px; max-height: 92dvh; padding: 0; border: 0; overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--surface-raised); color: var(--cacao); box-shadow: var(--shadow-card);
}
.sheet[open] { animation: rise 0.25s ease-out; }
@keyframes rise { from { transform: translateY(100%); } }
/* Le voile reprend le fond sombre de chaque thème. Navigateur ancien : pas de voile, la feuille reste modale. */
.sheet::backdrop { background: color-mix(in srgb, var(--cacao) 45%, transparent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="jour"]) .sheet::backdrop { background: color-mix(in srgb, var(--creme) 70%, transparent); }
}
[data-theme="soir"] .sheet::backdrop { background: color-mix(in srgb, var(--creme) 70%, transparent); }
.sheet-body {
  display: flex; flex-direction: column; gap: var(--space-4); max-height: 92dvh; overflow-y: auto;
  padding: var(--space-2) calc(var(--space-4) + env(safe-area-inset-right)) calc(var(--space-6) + env(safe-area-inset-bottom)) calc(var(--space-4) + env(safe-area-inset-left));
}
.grip { align-self: center; width: 40px; height: 4px; border-radius: var(--radius-full); background: var(--cacao-muted); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-right: calc(-1 * var(--space-2)); }
.options { display: flex; flex-direction: column; gap: var(--space-3); }
.option {
  position: relative; width: 100%; min-height: 80px; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised); color: var(--cacao);
  text-align: left; cursor: pointer; font: inherit;
}
.options li:first-child .option { border: 2px solid var(--basilic); }
label.option:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.option-text { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); }
.option-text strong { font: 600 16px/20px var(--font-sans); }

/* Cuisiner : la question, le garde-manger d'un coup d'œil, le dernier plat, le compteur. */
.hero { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6) var(--space-4) var(--space-4); }
.hero .btn-primary { margin-top: var(--space-2); }
.prefs-line {
  align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; gap: var(--space-2); padding: 0 var(--space-4);
  border: 0; border-radius: var(--radius-full); background: var(--creme-deep); color: var(--cacao); font: 600 16px/20px var(--font-sans); cursor: pointer;
}
.prefs-line .icon { width: 20px; height: 20px; color: var(--cacao-muted); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.section-head .btn-quiet { margin-right: calc(-1 * var(--space-3)); }
.discs {
  display: flex; gap: var(--space-3); overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(-1 * var(--space-4)); padding: var(--space-1) var(--space-4) var(--space-2);
}
.discs::-webkit-scrollbar { display: none; }
.disc-btn {
  min-width: 56px; display: flex; flex-direction: column; align-items: center; gap: var(--space-1); padding: 0;
  border: 0; border-radius: var(--radius-sm); background: none; color: var(--cacao); font: 600 16px/20px var(--font-sans); cursor: pointer;
}
.dish-row { width: 100%; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border: 0; color: var(--cacao); text-align: left; font: inherit; cursor: pointer; }
.dish-row .grow { display: flex; flex-direction: column; gap: 2px; }
.dish-row > .icon { color: var(--cacao-muted); }
.dish-thumb { flex: none; width: 64px; height: 64px; border-radius: var(--radius-md); object-fit: cover; background: var(--creme-deep); }
.dish-thumb.typo { display: grid; place-items: center; background: var(--tomate); }
.dish-thumb.typo span { width: 26px; height: 26px; border-radius: var(--radius-full); background: var(--moutarde); }
.counter { display: flex; align-items: center; gap: var(--space-3); font: 600 16px/22px var(--font-sans); }
.counter .disc { width: 44px; height: 44px; background: var(--basilic-soft); color: var(--basilic); }

/* Garde-manger : recherche locale, rayons avec leur rondelle. */
.search { position: relative; display: block; }
.search .icon { position: absolute; left: var(--space-3); top: 50%; transform: translateY(-50%); color: var(--cacao-muted); pointer-events: none; }
.search .input { padding-left: 44px; -webkit-appearance: none; appearance: none; }
.cat-title { display: flex; align-items: center; gap: var(--space-2); }

/* L'analyse : la photo assombrie, une ligne qui la balaie, une phrase qui avance. */
.page.scan-page { padding: 0; gap: 0; min-height: 100dvh; }
.scan { position: relative; height: 62dvh; overflow: hidden; display: grid; place-items: center; background: var(--creme-deep); }
.scan.cooking { background: var(--creme); }
.scan-img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.7); }
.scan-line { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--moutarde); animation: sweep 2.4s ease-in-out infinite alternate; }
@keyframes sweep { to { top: calc(100% - 3px); } }
.scan-panel {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-4); text-align: center;
  padding: var(--space-6) calc(var(--space-4) + env(safe-area-inset-right)) calc(var(--space-6) + env(safe-area-inset-bottom)) calc(var(--space-4) + env(safe-area-inset-left));
}

/* Le plat : une vraie photo (d'illustration, créditée) ou une carte typographique, jamais un cadre vide. */
.dish-hero {
  position: relative;
  margin: calc(-1 * (var(--space-6) + env(safe-area-inset-top))) calc(-1 * (var(--space-4) + env(safe-area-inset-right))) 0
    calc(-1 * (var(--space-4) + env(safe-area-inset-left)));
}
.dish { position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--creme-deep); }
.dish img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s; }
.dish img.loaded { opacity: 1; }
.dish .tag {
  position: absolute; right: var(--space-3); bottom: calc(24px + var(--space-3)); padding: 2px var(--space-2); border-radius: var(--radius-sm);
  background: var(--surface-raised); color: var(--cacao); font: 500 13px/18px var(--font-sans);
}
.dish.typo { display: flex; align-items: flex-end; padding: var(--space-6) var(--space-4) calc(24px + var(--space-6)); background: var(--tomate); }
.typo-title { position: relative; max-width: 80%; font: 600 28px/32px var(--font-display); color: var(--creme); }
.dish.typo .plate { position: absolute; right: -24px; top: -16px; width: 200px; height: 180px; }
.dish.typo .plate span { background: var(--moutarde); }
.dish.typo .plate span:nth-child(1) { left: auto; right: 0; bottom: auto; top: 0; width: 120px; height: 120px; }
.dish.typo .plate span:nth-child(2) { left: 24px; right: auto; top: 96px; width: 52px; height: 52px; }
.dish.typo .plate span:nth-child(3) { right: 136px; bottom: auto; top: 28px; width: 28px; height: 28px; }
.icon-btn.float {
  position: absolute; top: calc(var(--space-4) + env(safe-area-inset-top)); left: calc(var(--space-4) + env(safe-area-inset-left));
  background: var(--surface-raised); border-color: transparent; box-shadow: var(--shadow-card);
}
.recipe-card { position: relative; margin-top: calc(-24px - var(--space-6)); display: flex; flex-direction: column; gap: var(--space-3); }
.credit { font: 500 13px/18px var(--font-sans); color: var(--cacao-muted); }
.credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.pills { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pill {
  display: inline-flex; align-items: center; gap: var(--space-1); min-height: 32px; padding: 0 var(--space-3); border-radius: var(--radius-full);
  background: var(--creme-deep); color: var(--cacao); font: 600 13px/18px var(--font-sans);
}
.pill .icon { width: 18px; height: 18px; }
.pill.good { background: var(--basilic-soft); color: var(--basilic); }
.done .dish .tag { bottom: var(--space-3); }
.done .counter { justify-content: center; }
.done .display, .done .lead { text-align: center; }

/* Mode cuisine : une étape par écran, en grand. Le minuteur est la seule tache moutarde. */
.cook-top { display: flex; align-items: center; gap: var(--space-3); }
.cook-top .icon-btn { margin-left: calc(-1 * var(--space-2)); }
.progress { flex: 1; height: 6px; overflow: hidden; border-radius: var(--radius-full); background: var(--creme-deep); }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--cacao); transition: width 0.3s; }
.step-text { font: 500 22px/32px var(--font-sans); }
.timer-start { background: var(--moutarde); color: var(--on-moutarde); }
.timer {
  display: flex; align-items: center; gap: var(--space-3); min-height: 64px; padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  border-radius: var(--radius-md); background: var(--moutarde); color: var(--on-moutarde);
}
.timer strong { flex: 1; font: 600 28px/32px var(--font-sans); font-variant-numeric: tabular-nums; }
.timer .btn-quiet { color: var(--on-moutarde); text-decoration: underline; text-underline-offset: 3px; }

/* Panneau d'administration */
.admin .page { max-width: 960px; }
.admin .actions-inner { max-width: 928px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-2); }
.kpi { display: flex; flex-direction: column; gap: var(--space-1); }
.kpi strong { font: 600 24px/32px var(--font-sans); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: var(--space-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font: 600 13px/18px var(--font-sans); color: var(--cacao-muted); }
td.num, th.num { text-align: right; }
.chart { width: 100%; height: 140px; }
.chart .bar { fill: var(--tomate); }
.chart .axis { fill: var(--cacao-muted); font: 500 13px/18px var(--font-sans); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-3); }
.toggle { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; font-weight: 600; cursor: pointer; }
.task { display: flex; flex-direction: column; gap: var(--space-4); }
.inline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.inline .btn { width: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
