@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

/* =========================================================================
   MealPrep — système de design
   Mobile d'abord · clair / sombre automatique · animations sobres
   ========================================================================= */

:root {
  /* Couleurs */
  --bg: #f6f4ef;
  --bg-2: #efece4;
  --card: #ffffff;
  --ink: #18221c;
  --ink-2: #3c4842;
  --muted: #7a847e;
  --line: #e9e5dc;
  --brand: #1f8a4c;
  --brand-2: #2bb673;
  --brand-ink: #ffffff;
  --brand-soft: #e2f3e8;
  --sun: #f4a62a;
  --tomato: #e8553e;
  --sky: #4a90d9;
  --plum: #8e5bb5;
  --danger: #d64532;
  --warn: #d48a12;
  --grad: linear-gradient(135deg, #2bb673 0%, #1f8a4c 55%, #17703c 100%);
  --grad-warm: linear-gradient(135deg, #ffb547 0%, #f07f3c 100%);

  /* Formes */
  --r-sm: 12px;
  --r: 20px;
  --r-lg: 28px;
  --shadow-1: 0 1px 2px rgba(24, 34, 28, .05), 0 2px 8px rgba(24, 34, 28, .05);
  --shadow-2: 0 2px 6px rgba(24, 34, 28, .06), 0 12px 32px rgba(24, 34, 28, .10);
  --shadow-brand: 0 10px 28px rgba(31, 138, 76, .35);

  /* Mouvement */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  --nav-h: 74px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1311;
    --bg-2: #161b18;
    --card: #1a201d;
    --ink: #eef2ef;
    --ink-2: #c9d1cc;
    --muted: #8d9892;
    --line: #29312d;
    --brand: #3cc47c;
    --brand-2: #5fd896;
    --brand-ink: #07140c;
    --brand-soft: #173325;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-2: 0 10px 30px rgba(0, 0, 0, .45);
    --shadow-brand: 0 10px 28px rgba(0, 0, 0, .5);
    --grad: linear-gradient(135deg, #2f9e5c 0%, #1b6f40 60%, #145632 100%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}
a { color: var(--brand); text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden]:not(.sheet):not(.toast):not(.suggest) { display: none !important; }
::selection { background: var(--brand-soft); }

.i { width: 1.35em; height: 1.35em; fill: currentColor; flex: none; vertical-align: middle; }

/* ------------------------------------------------------------- animations */

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-1.2deg); } 75% { transform: rotate(1.2deg); } }

.view > div > * { animation: rise .45s var(--ease) both; }
.view > div > *:nth-child(2) { animation-delay: .03s; }
.view > div > *:nth-child(3) { animation-delay: .06s; }
.view > div > *:nth-child(4) { animation-delay: .09s; }
.view > div > *:nth-child(5) { animation-delay: .12s; }
.view > div > *:nth-child(n+6) { animation-delay: .15s; }
.stagger > * { animation: rise .4s var(--ease) both; animation-delay: calc(min(var(--i, 0), 12) * 35ms); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------- mise en page */

.view { overflow-x: clip;
  max-width: 720px;
  margin: 0 auto;
  padding: calc(16px + var(--safe-t)) 18px calc(var(--nav-h) + 40px + var(--safe-b));
  min-height: 100vh;
}
.splash { display: grid; place-items: center; min-height: 70vh; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}

.top { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 18px; }
.top .titles { flex: 1; min-width: 0; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.top h1 { font-size: 2rem; line-height: 1.1; margin: 2px 0 0; letter-spacing: -.025em; font-weight: 800; }
.top .sub { color: var(--muted); font-size: .92rem; margin-top: 2px; }
.back { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-weight: 600; margin: 0 0 6px -4px; padding: 6px 4px; }

.card {
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow-1);
  padding: 16px;
  margin-bottom: 14px;
}
.card h2, .h2 { font-size: 1.15rem; margin: 0 0 12px; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 26px 4px 10px;
}

/* États vides : grande pastille dégradée */
.empty { text-align: center; color: var(--muted); padding: 30px 18px 10px; }
.empty .bubble {
  width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 32px;
  display: grid; place-items: center; color: #fff; background: var(--grad);
  box-shadow: var(--shadow-brand); transform: rotate(-6deg);
}
.empty .bubble .i { width: 48px; height: 48px; }
.empty .bubble.warm { background: var(--grad-warm); box-shadow: 0 10px 28px rgba(240, 127, 60, .35); }
.empty h3 { color: var(--ink); margin: 0 0 6px; font-size: 1.2rem; }
.empty p { margin: 0 auto 16px; max-width: 34ch; }

/* Squelettes */
.shimmer {
  background: linear-gradient(90deg, var(--bg-2) 0%, var(--line) 50%, var(--bg-2) 100%);
  background-size: 200% 100%; animation: shimmer 1.2s linear infinite;
}
.line { height: 12px; border-radius: 6px; margin: 6px 0; }
.line.short { width: 55%; }
.rcard.sk .ph { aspect-ratio: 4 / 3; }

/* ------------------------------------------------------------- boutons */

.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 16px; padding: 12px 18px; min-height: 48px;
  background: var(--brand-soft); color: var(--brand); font-weight: 700; cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .2s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-brand); }
.btn.warm { background: var(--grad-warm); color: #fff; box-shadow: 0 10px 24px rgba(240, 127, 60, .3); }
.btn.ghost { background: transparent; }
.btn.light { background: rgba(255, 255, 255, .2); color: #fff; backdrop-filter: blur(8px); }
.btn.danger { background: transparent; color: var(--danger); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn .spinner { width: 18px; height: 18px; border-width: 2px; border-color: rgba(255,255,255,.4); border-top-color: #fff; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 14px; background: var(--card); color: var(--ink-2); cursor: pointer; flex: none;
  box-shadow: var(--shadow-1); transition: transform .15s var(--ease);
}
.icon-btn.flat { background: transparent; box-shadow: none; color: var(--muted); }
.icon-btn:active { transform: scale(.92); }
.icon-btn:disabled { opacity: .3; }

.fab {
  position: fixed; right: max(18px, calc(50% - 342px)); bottom: calc(var(--nav-h) + 22px + var(--safe-b));
  height: 58px; padding: 0 22px 0 18px; border-radius: 20px; border: 0; gap: 6px;
  background: var(--grad); color: #fff; box-shadow: var(--shadow-brand); font-weight: 800;
  display: flex; align-items: center; cursor: pointer; z-index: 5;
  animation: pop .5s var(--spring) .2s both; transition: transform .15s var(--ease);
}
.fab:active { transform: scale(.94); }
.fab .i { width: 26px; height: 26px; }

/* ------------------------------------------------------------- champs */

label.field { display: block; }
label.field > span, .field-label { display: block; font-size: .82rem; font-weight: 700; color: var(--muted); margin: 0 0 6px 4px; }
.input, textarea.input, select.input {
  width: 100%; border: 1.5px solid transparent; background: var(--card);
  border-radius: 16px; padding: 12px 14px; min-height: 50px; outline: none;
  box-shadow: var(--shadow-1); transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--muted); opacity: .8; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
textarea.input { resize: vertical; line-height: 1.55; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.addbar { display: flex; gap: 8px; margin-bottom: 16px; }
.addbar .input { flex: 1; }
.addbar .btn { width: 50px; padding: 0; border-radius: 16px; }
.search { position: relative; margin-bottom: 14px; }
.search > .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); z-index: 1; }
.search .input { padding-left: 44px; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { appearance: none; width: 46px; height: 28px; border-radius: 14px; background: var(--line); position: relative; transition: .2s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s var(--spring); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(18px); }

.stepper { display: inline-flex; align-items: center; background: var(--bg-2); border-radius: 999px; padding: 2px; }
.stepper button { width: 32px; height: 32px; border: 0; background: var(--card); border-radius: 50%; cursor: pointer; color: var(--ink); font-weight: 800; box-shadow: var(--shadow-1); transition: transform .12s; }
.stepper button:active { transform: scale(.85); }
.stepper b { min-width: 2.4ch; text-align: center; font-variant-numeric: tabular-nums; }
.stepper b.bump { animation: pop .3s var(--spring); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-1);
  font-size: .85rem; font-weight: 600; color: var(--ink-2); border: 0; cursor: pointer; white-space: nowrap; flex: none;
}
.chip .i { width: 1.15em; height: 1.15em; color: var(--brand); }
.chip.on { background: var(--ink); color: var(--bg); }
.chip.on .i { color: inherit; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -18px 14px; padding: 2px 18px 6px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }

.seg { display: flex; background: var(--bg-2); border-radius: 16px; padding: 4px; margin-bottom: 16px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 12px; cursor: pointer; color: var(--muted); font-weight: 700; transition: .2s; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-1); }

/* ------------------------------------------------- pastille d'ingrédient */

.ico {
  --c: #8a8a8a;
  width: 42px; height: 42px; border-radius: 14px; flex: none;
  display: grid; place-items: center;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, var(--card));
}
.ico .i { width: 25px; height: 25px; }
.ico.sm { width: 32px; height: 32px; border-radius: 10px; }
.ico.sm .i { width: 19px; height: 19px; }
.ico.lg { width: 54px; height: 54px; border-radius: 18px; }
.ico.lg .i { width: 32px; height: 32px; }
.ico.unknown { --c: var(--warn); }
.ico.solid { background: var(--c); color: #fff; }

/* ------------------------------------------------------------- navigation */

.nav {
  position: fixed; left: 50%; bottom: calc(12px + var(--safe-b)); z-index: 10;
  transform: translateX(-50%);
  width: min(440px, calc(100% - 24px)); height: 62px;
  display: flex; padding: 6px;
  background: color-mix(in srgb, var(--card) 86%, transparent);
  backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-radius: 24px; box-shadow: var(--shadow-2);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.nav-pill {
  position: absolute; top: 6px; bottom: 6px; left: 6px;
  width: calc((100% - 12px) / 4); border-radius: 18px;
  background: var(--brand-soft);
  transform: translateX(calc(var(--tab, 0) * 100%));
  transition: transform .45s var(--spring);
}
.nav a {
  position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  color: var(--muted); font-size: .7rem; font-weight: 700; transition: color .25s;
}
.nav a .i { width: 24px; height: 24px; transition: transform .35s var(--spring); }
.nav a.on { color: var(--brand); }
.nav a.on .i { transform: translateY(-1px) scale(1.12); }
.badge {
  position: absolute; top: 2px; left: calc(50% + 5px);
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--tomato); color: #fff; font-size: .68rem; line-height: 19px; text-align: center; font-weight: 800;
  box-shadow: 0 0 0 2px var(--card);
}
.badge.bump { animation: pop .35s var(--spring); }

/* ------------------------------------------------------------- feuille */

.sheet { position: fixed; inset: 0; z-index: 30; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(10, 16, 12, .42); backdrop-filter: blur(3px); animation: fade .2s; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 720px;
  max-height: 90vh; overflow: auto; overscroll-behavior: contain; background: var(--bg);
  border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 6px 18px calc(22px + var(--safe-b));
  animation: up .35s var(--ease); transition: transform .3s var(--ease);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .15);
}
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 6px auto 14px; cursor: grab; padding: 8px 0; background-clip: content-box; box-sizing: content-box; }
.sheet h2 { font-size: 1.35rem; margin: 0 0 14px; letter-spacing: -.015em; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 26px + var(--safe-b)); transform: translateX(-50%);
  z-index: 40; width: max-content; max-width: min(460px, calc(100% - 32px));
  display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 16px; font-size: .92rem; font-weight: 600;
  box-shadow: var(--shadow-2); animation: rise .3s var(--spring);
}
.toast .i { color: var(--brand-2); }
.offline {
  position: sticky; top: 0; z-index: 20; text-align: center; font-size: .82rem; font-weight: 700;
  background: var(--warn); color: #fff; padding: calc(6px + var(--safe-t)) 10px 6px;
}

/* ------------------------------------------------------------- listes */

.list { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; }
.item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 64px;
  cursor: pointer; user-select: none; -webkit-user-select: none; background: var(--card);
}
.item + .item, [data-swipe] + [data-swipe] .item { box-shadow: inset 0 1px 0 var(--line); }
.item .label { font-weight: 650; line-height: 1.25; }
.item div.label, .item .grow > .label { display: inline-block; max-width: 100%; }
.item .meta { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.item .qty { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-2); }
.item:active { background: color-mix(in srgb, var(--card) 92%, var(--ink)); }

/* Case à cocher animée */
.check {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); flex: none;
  display: grid; place-items: center; color: transparent; transition: background .2s, border-color .2s;
}
.check .i { width: 18px; height: 18px; transform: scale(0); transition: transform .3s var(--spring); }
.done .check { background: var(--brand); border-color: var(--brand); color: #fff; }
.done .check .i { transform: scale(1); }
.item .label, .item .qty { transition: opacity .25s; background: linear-gradient(currentColor, currentColor) no-repeat 0 55% / 0 1.5px; transition: background-size .3s var(--ease), opacity .3s; }
.done .label, .done .qty { opacity: .45; background-size: 100% 1.5px; }
.done .ico { filter: grayscale(1); opacity: .45; transition: .3s; }

/* Balayage */
[data-swipe] { position: relative; overflow: hidden; }
.swipe-bg {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 22px;
  color: #fff; font-weight: 800; background: var(--brand);
}
.swipe-bg .l { opacity: 0; transition: opacity .2s; }
.swipe-bg .r { opacity: 0; transition: opacity .2s; }
.dir-left .swipe-bg { background: var(--danger); justify-content: flex-end; }
.dir-left .swipe-bg .l { display: none; }
.swipe-right .swipe-bg .l, .swipe-left .swipe-bg .r { opacity: 1; }
.swipe-face { position: relative; will-change: transform; touch-action: pan-y; }

.group-head { display: flex; align-items: center; gap: 10px; margin: 24px 4px 10px; font-weight: 800; font-size: 1.02rem; }
.group-head .count { margin-left: auto; color: var(--muted); font-weight: 700; font-size: .82rem; background: var(--bg-2); border-radius: 999px; padding: 2px 9px; }
.group-head .count.ok { background: var(--brand-soft); color: var(--brand); }
details.fold > summary { list-style: none; cursor: pointer; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary .chev { transition: transform .3s var(--ease); margin-left: auto; }
details.fold[open] > summary .chev { transform: rotate(180deg); }
details.fold[open] > .list { animation: rise .3s var(--ease); }

/* Anneau de progression */
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255, 255, 255, .25) 0); transition: --p .6s; }
.ring > span { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: .9rem; }
@property --p { syntax: '<number>'; inherits: false; initial-value: 0; }

/* Bandeau dégradé (résumés) */
.hero-card {
  position: relative; overflow: hidden;
  background: var(--grad); color: #fff; border-radius: var(--r-lg);
  padding: 18px; margin-bottom: 18px; box-shadow: var(--shadow-brand);
}
.hero-card::after {
  content: ""; position: absolute; right: -40px; top: -60px; width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 70%);
}
.hero-card .big { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.hero-card .lbl { opacity: .85; font-size: .88rem; font-weight: 600; }
.hero-card .stats { display: flex; gap: 22px; margin: 10px 0 14px; position: relative; z-index: 1; }
.hero-card .btn { position: relative; z-index: 1; }

/* ------------------------------------------------------------- recettes */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; }
.rcard {
  background: var(--card); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; color: inherit; position: relative;
  transition: transform .2s var(--ease), box-shadow .2s;
}
.rcard:active { transform: scale(.97); }
.rcard .ph { aspect-ratio: 4 / 3; background: var(--grad); display: grid; place-items: center; color: rgba(255,255,255,.85); overflow: hidden; }
.rcard .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .45s var(--ease); }
.rcard:hover .ph img { transform: scale(1.05); }
.rcard .ph .i { width: 44px; height: 44px; }
.rcard .body { padding: 10px 12px 12px; }
.rcard .title { font-weight: 750; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rcard .meta { font-size: .78rem; color: var(--muted); margin-top: 6px; display: flex; gap: 10px; font-weight: 600; }
.rcard .meta .i { width: 1.1em; height: 1.1em; }
.rcard .star { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.35); color: #ffc93c; backdrop-filter: blur(6px); }
.rcard .star .i { width: 18px; height: 18px; }
.rcard .planned { position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 999px; font-size: .7rem; font-weight: 800; background: rgba(255,255,255,.92); color: var(--brand); }

/* Fiche recette */
.hero { position: relative; margin: calc(-16px - var(--safe-t)) -18px 0; height: 46vh; min-height: 260px; max-height: 420px; overflow: hidden; background: var(--grad); }
.hero img { width: 100%; height: 100%; object-fit: cover; transform-origin: center top; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, transparent 30%, transparent 45%, rgba(0,0,0,.72) 100%); }
.hero .bar { position: absolute; top: calc(12px + var(--safe-t)); left: 12px; right: 12px; display: flex; justify-content: space-between; z-index: 2; }
.hero .bar .icon-btn { background: rgba(255,255,255,.92); color: #18221c; }
.hero .title { position: absolute; left: 18px; right: 18px; bottom: 34px; z-index: 2; color: #fff; }
.hero .title h1 { font-size: 1.75rem; line-height: 1.12; margin: 0 0 8px; letter-spacing: -.02em; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.hero .title .chips .chip { background: rgba(255,255,255,.2); color: #fff; box-shadow: none; backdrop-filter: blur(8px); }
.hero .title .chips .chip .i { color: #fff; }
.sheet-top { position: relative; margin: -22px -18px 0; padding: 18px 18px 0; background: var(--bg); border-radius: var(--r-lg) var(--r-lg) 0 0; z-index: 3; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 16px; }
.actions .wide { grid-column: 1 / -1; }

.ing { display: flex; align-items: center; gap: 12px; padding: 9px 0; cursor: pointer; transition: opacity .25s; }
.ing + .ing { border-top: 1px solid var(--line); }
.ing .q { font-weight: 800; min-width: 78px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.ing.got { opacity: .4; }
.ing.got .name { text-decoration: line-through; }
.ing-head { font-weight: 800; margin: 16px 0 4px; color: var(--brand); font-size: .9rem; letter-spacing: .02em; }
.steps { counter-reset: s; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: s; position: relative; padding: 2px 0 18px 46px; cursor: pointer; transition: opacity .3s; line-height: 1.55; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 11px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-weight: 800; font-size: .88rem; transition: .25s;
}
.steps li.done { opacity: .4; }
.steps li.done::before { content: "✓"; background: var(--brand); color: #fff; }
.steps li.sec { padding-left: 0; counter-increment: none; font-weight: 800; color: var(--brand); cursor: default; }
.steps li.sec::before { display: none; }
.serv-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }

/* Aperçu de l'éditeur */
.preview { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.pv { display: flex; align-items: center; gap: 10px; font-size: .9rem; padding: 5px 0; animation: rise .25s var(--ease) both; }
.pv .q { font-weight: 800; min-width: 70px; }
.pv .unk { color: var(--warn); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; background: color-mix(in srgb, var(--warn) 14%, transparent); padding: 2px 8px; border-radius: 999px; }
.savebar { position: sticky; bottom: calc(var(--nav-h) + 22px + var(--safe-b)); z-index: 4; margin-top: 18px; }

/* ------------------------------------------------------------- menu */

.weekbar { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; }
.weekbar b { font-size: 1.02rem; }
.days { display: flex; flex-direction: column; gap: 12px; }
.day {
  background: var(--card); border-radius: var(--r); box-shadow: var(--shadow-1);
  padding: 12px; transition: box-shadow .2s, transform .2s, background .2s;
}
.day-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.day-head .dot { width: 40px; height: 44px; border-radius: 13px; background: var(--bg-2); display: grid; place-items: center; line-height: 1; flex: none; }
.day-head .dot b { font-size: 1.05rem; }
.day-head .dot small { font-size: .62rem; font-weight: 800; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; }
.day-head .d { font-weight: 800; }
.day-head .n { color: var(--muted); font-size: .82rem; }
.day.today { box-shadow: 0 0 0 2px var(--brand), var(--shadow-2); }
.day.today .dot { background: var(--grad); color: #fff; }
.day.today .dot small { color: rgba(255,255,255,.85); }
.day.past { opacity: .62; }
.day.loose-empty { background: transparent; box-shadow: none; border: 1.5px dashed var(--line); padding: 8px 12px; }
.day.loose-empty .day-head { margin: 0; }
.day.loose-empty .dot { width: 34px; height: 34px; background: transparent; }
.day.loose-empty .add-meal { display: none; }
.day .meals { display: flex; flex-direction: column; gap: 8px; min-height: 2px; }
.meal {
  display: flex; align-items: center; gap: 12px; background: var(--bg); border-radius: 16px; padding: 8px 8px 8px 6px;
  transition: opacity .2s, transform .2s;
}
.meal .grip { width: 22px; align-self: stretch; display: grid; place-items: center; color: var(--muted); cursor: grab; touch-action: none; opacity: .6; border: 0; background: none; padding: 0; }
.meal .th { width: 58px; height: 58px; border-radius: 14px; overflow: hidden; background: var(--grad); flex: none; display: grid; place-items: center; color: rgba(255,255,255,.85); }
.meal .th img { width: 100%; height: 100%; object-fit: cover; }
.meal .t { font-weight: 700; line-height: 1.25; color: inherit; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meal.cooked .t { text-decoration: line-through; opacity: .55; }
.meal .ok { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; }
.meal .ok .i { width: 15px; height: 15px; }
.add-meal {
  width: 100%; border: 1.5px dashed var(--line); background: transparent; color: var(--muted); font-weight: 700;
  border-radius: 14px; padding: 10px; margin-top: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: .2s;
}
.add-meal:active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }

/* Glisser-déposer */
.drag-ghost {
  position: fixed; z-index: 100; pointer-events: none; margin: 0;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .25); border-radius: 16px; background: var(--card);
  transition: none; animation: none !important;
}
.drag-source { opacity: .25; transform: scale(.97); }
.sort-source { opacity: 0; }
body.dragging { user-select: none; -webkit-user-select: none; cursor: grabbing; }
body.dragging .day { animation: none; }
body.dragging .day .add-meal { display: none; }
.day.drop-over { background: var(--brand-soft); box-shadow: 0 0 0 2px var(--brand), var(--shadow-2); transform: scale(1.015); }
.trash-zone {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 30px + var(--safe-b)); z-index: 50;
  transform: translate(-50%, calc(100% + 160px)); opacity: 0; visibility: hidden;
  transition: transform .35s var(--spring), background .2s, opacity .2s, visibility .35s;
  display: flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 20px;
  background: var(--card); color: var(--danger); font-weight: 800; box-shadow: var(--shadow-2);
}
body.dragging .trash-zone { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.trash-zone.drop-over { background: var(--danger); color: #fff; transform: translate(-50%, 0) scale(1.08); }

/* ------------------------------------------------------------- connexion */

.login { max-width: 400px; margin: 4vh auto 0; }
.login-hero {
  position: relative; overflow: hidden; text-align: center; color: #fff;
  background: var(--grad); border-radius: var(--r-lg); padding: 34px 20px 28px; margin-bottom: 22px; box-shadow: var(--shadow-brand);
}
.login-hero .logo { width: 88px; height: 88px; border-radius: 26px; margin: 0 auto 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: pop .6s var(--spring) both; }
.login-hero h1 { margin: 0 0 4px; font-size: 2rem; letter-spacing: -.02em; }
.login-hero p { margin: 0; opacity: .9; }
.login-hero .floaters { position: absolute; inset: 0; pointer-events: none; }
.login-hero .floaters .i { position: absolute; width: 34px; height: 34px; color: rgba(255,255,255,.18); animation: wiggle 4s ease-in-out infinite; }
.err { color: var(--danger); font-size: .9rem; font-weight: 600; min-height: 1.2em; }

/* Sélecteur d'icônes */
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; max-height: 250px; overflow: auto; padding: 2px; }
.icon-grid button { aspect-ratio: 1; border: 0; background: var(--card); border-radius: 14px; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-1); transition: transform .15s; }
.icon-grid button.on { background: var(--brand); color: #fff; transform: scale(1.06); }

/* Liste triable */
.orderlist .item { cursor: default; min-height: 56px; }
.orderlist .grip { touch-action: none; cursor: grab; color: var(--muted); border: 0; background: none; padding: 8px; }

.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 200; }

@media (min-width: 720px) {
  .view { padding-top: 32px; }
  .hero { margin-top: -32px; border-radius: 0 0 var(--r-lg) var(--r-lg); }
}

/* Choix du jour en pastilles */
.daypick { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.daypick button {
  border: 0; background: var(--card); border-radius: 16px; padding: 10px 4px; cursor: pointer; box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.1; transition: transform .15s var(--spring);
}
.daypick button small { font-size: .66rem; font-weight: 800; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.daypick button b { font-size: 1.3rem; }
.daypick button.today { background: var(--grad); color: #fff; }
.daypick button.today small { color: rgba(255, 255, 255, .85); }
.daypick button:active { transform: scale(.92); }

/* Vignette du sélecteur de recettes */
.pick-th { width: 48px; height: 48px; border-radius: 14px; overflow: hidden; flex: none; background: var(--grad); color: rgba(255,255,255,.85); display: grid; place-items: center; }
.pick-th img { width: 100%; height: 100%; object-fit: cover; }

/* =========================================================================
   Nouveautés : stock intelligent, photos, minuteurs, mode magasin…
   ========================================================================= */

/* Pastilles « Tout y est / Manque 2 / Anti-gaspi » */
.badge-r { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.badge-r .i { width: 14px; height: 14px; }
.badge-r.ok { background: var(--brand-soft); color: var(--brand); }
.badge-r.near { background: color-mix(in srgb, var(--sun) 18%, transparent); color: #a86c0b; }
.badge-r.gaspi { background: color-mix(in srgb, #7cb342 20%, transparent); color: #4d7d1d; }
.rcard .miss { font-size: .74rem; color: var(--muted); margin-top: 4px; }

/* Fiche : icône d'ingrédient = bouton de correction */
.ico-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 12px; transition: transform .15s; }
.ico-btn:active { transform: scale(.9); }
.unk-dot { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--warn); color: #fff; font-size: .7rem; font-weight: 900; margin-left: 4px; }
.hero .bar label.icon-btn { cursor: pointer; }

/* Minuteurs */
.timer-chip { display: inline-flex; align-items: center; gap: 3px; border: 0; cursor: pointer; font: inherit; font-weight: 800;
  background: var(--brand-soft); color: var(--brand); padding: 1px 8px 1px 6px; border-radius: 999px; margin: 0 1px; }
.timer-chip .i { width: 15px; height: 15px; }
.timers { position: fixed; left: 50%; transform: translateX(-50%); top: calc(10px + var(--safe-t)); z-index: 45; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100% - 24px)); }
.timer { position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 18px;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow-2); animation: rise .3s var(--spring); }
.timer::before { content: ""; position: absolute; inset: 0; width: calc(var(--p) * 1%); background: rgba(255,255,255,.08); transition: width 1s linear; }
.timer b { font-size: 1.15rem; font-variant-numeric: tabular-nums; display: block; }
.timer small { opacity: .7; font-size: .75rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer button { border: 0; background: rgba(255,255,255,.12); color: inherit; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.timer.done { background: var(--tomato); color: #fff; animation: wiggle .4s ease-in-out infinite; }

/* Photo dans l'éditeur */
.photo-pick { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: var(--grad); }
.photo-pick img { width: 100%; height: 100%; object-fit: cover; }
.photo-pick .ph-empty { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.7); }
.photo-pick .ph-empty .i { width: 56px; height: 56px; }
.photo-actions { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 8px; }
.photo-actions .btn { min-height: 40px; padding: 8px 14px; background: rgba(0,0,0,.45); }
.photo-pick.busy::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.photo-pick.busy::before { content: ""; position: absolute; z-index: 1; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .8s linear infinite; }

/* Menu : idées du soir, créneau */
.ideas-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -18px 16px; padding: 2px 18px 6px; scrollbar-width: none; }
.ideas-row::-webkit-scrollbar { display: none; }
.idea { flex: none; width: 150px; border: 0; padding: 0; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; text-align: left; cursor: pointer; transition: transform .15s; color: inherit; }
.idea:active { transform: scale(.96); }
.idea-ph { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--grad); color: rgba(255,255,255,.85); overflow: hidden; }
.idea-ph img { width: 100%; height: 100%; object-fit: cover; }
.idea-t { display: block; padding: 8px 10px 0; font-weight: 750; font-size: .88rem; line-height: 1.2; }
.idea .badge-r { margin: 6px 10px 10px; }
.slot { display: inline-block; font-size: .64rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; padding: 1px 7px; border-radius: 999px; margin-bottom: 2px; }
.slot.midi { background: color-mix(in srgb, var(--sun) 20%, transparent); color: #a86c0b; }
.slot.soir { background: color-mix(in srgb, var(--plum) 16%, transparent); color: var(--plum); }

/* Liste : conditionnement, fréquents */
.qty .pack { display: flex; align-items: center; justify-content: flex-end; gap: 3px; font-size: .7rem; font-weight: 700; color: var(--muted); margin-top: 1px; }
.qty .pack .i { width: 12px; height: 12px; }
.item .qty { text-align: right; }
.staples { margin-top: -6px; }
.staples .chip { font-size: .8rem; padding: 6px 11px; }
.staples .chip.on { opacity: .5; }
.toast-act { border: 0; background: var(--brand-2); color: #06140b; font-weight: 800; border-radius: 10px; padding: 6px 12px; cursor: pointer; margin-left: 6px; }

/* Mode magasin */
.store-exit { display: none; }
body.store .nav, body.store [data-hero], body.store .addbar, body.store .staples, body.store .top .sub, body.store .top .icon-btn { display: none !important; }
body.store .view { padding-bottom: 110px; }
body.store .item { min-height: 76px; }
body.store .item .label { font-size: 1.22rem; }
body.store .item .qty { font-size: 1.15rem; }
body.store .check { width: 36px; height: 36px; }
body.store .group-head { position: sticky; top: 0; z-index: 3; background: var(--bg); margin: 0 -18px; padding: 14px 22px 10px; }
body.store .store-exit {
  display: flex; align-items: center; gap: 8px; position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(18px + var(--safe-b)); z-index: 20; border: 0; border-radius: 999px; padding: 14px 22px;
  background: var(--ink); color: var(--bg); font-weight: 800; box-shadow: var(--shadow-2); cursor: pointer;
}

/* Stock : à consommer vite */
.soon-card { background: linear-gradient(135deg, #8bc34a, #4d7d1d); color: #fff; border-radius: var(--r-lg); padding: 16px; margin-bottom: 16px; box-shadow: 0 10px 26px rgba(77,125,29,.3); }
.soon-card .row { align-items: flex-start; margin-bottom: 12px; }
.soon-card > .row > .i { width: 28px; height: 28px; }
.exp { display: flex; width: fit-content; align-items: center; gap: 3px; font-size: .72rem; font-weight: 700; color: var(--muted); margin-top: 2px; }
.exp .i { width: 12px; height: 12px; }
.exp.soon { color: #a86c0b; }
.exp.late { color: var(--danger); }

/* Tirer pour rafraîchir */
.ptr { position: fixed; top: calc(var(--safe-t) + 6px); left: 50%; transform: translate(-50%, -60px); z-index: 25; width: 42px; height: 42px; border-radius: 50%;
  background: var(--card); box-shadow: var(--shadow-2); display: grid; place-items: center; transition: transform .25s var(--ease); pointer-events: none; }
.ptr .spinner { width: 22px; height: 22px; border-width: 2.5px; animation-play-state: paused; }
.ptr.ready .spinner { border-top-color: var(--brand); }
.ptr.loading { transform: translate(-50%, 16px) !important; }
.ptr.loading .spinner { animation-play-state: running; }

/* Présentation */
.onboard .dots { display: flex; justify-content: center; gap: 6px; margin: -4px 0 18px; }
.onboard .dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--line); transition: width .3s var(--ease), background .3s; }
.onboard .dots i.on { width: 22px; background: var(--brand); }

/* Transitions entre écrans (View Transitions API) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; animation-timing-function: var(--ease); }
::view-transition-group(rimg) { animation-duration: .38s; animation-timing-function: var(--ease); }

/* Clavier : focus toujours visible */
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 10px; }
.input:focus-visible { outline: none; }

/* Grand écran (tablette, ordinateur) */
@media (min-width: 960px) {
  .view { max-width: 1120px; padding-left: 32px; padding-right: 32px; }
  .days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
  .days > .day:first-child { grid-column: 1 / -1; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
  .sheet-panel { max-width: 560px; border-radius: var(--r-lg); bottom: 50%; transform: translateY(50%); }
  .hero { max-height: 460px; border-radius: 0 0 var(--r-lg) var(--r-lg); }
  .sheet-top { max-width: 760px; margin-left: auto; margin-right: auto; }
}

/* =========================================================================
   Sources, stock en bocaux, mode cuisine, voix
   ========================================================================= */

/* --- Ajouter : coller un lien ou un texte -------------------------------- */
.paste { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow-1); padding: 12px; margin-bottom: 16px; }
.paste textarea.input { box-shadow: none; background: var(--bg); min-height: 52px; resize: none; transition: height .2s var(--ease), border-color .2s; }
.paste-hint { display: flex; gap: 6px; align-items: flex-start; font-size: .8rem; color: var(--muted); margin: 8px 4px 10px; line-height: 1.35; }
.paste-hint .i { width: 16px; height: 16px; margin-top: 1px; }
.paste-hint.ok { color: var(--brand); font-weight: 700; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; color: inherit;
  background: var(--card); border: 0; border-radius: var(--r); box-shadow: var(--shadow-1); padding: 12px; cursor: pointer;
  transition: transform .15s var(--ease);
}
.tile:active { transform: scale(.96); }
.tile .ico { margin-bottom: 6px; }
.tile b { font-size: .9rem; line-height: 1.2; }
.tile span:last-child { font-size: .72rem; color: var(--muted); line-height: 1.25; }

/* --- Chercher sur les sites --------------------------------------------- */
.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-bottom: 14px; }
.site {
  --c: #888; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px;
  background: var(--card); border-radius: 18px; box-shadow: var(--shadow-1); color: var(--ink); text-align: center;
  transition: transform .15s var(--spring), box-shadow .2s;
}
.site:active { transform: scale(.93); }
.site-logo {
  width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center;
  background: var(--c); color: #fff; font-weight: 900; font-size: .95rem; letter-spacing: -.02em;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 35%, transparent);
}
.site-logo .i { width: 26px; height: 26px; }
.site-name { font-size: .74rem; font-weight: 700; line-height: 1.15; }
.back-card {
  position: sticky; bottom: 0; z-index: 2; background: var(--card); border-radius: var(--r); padding: 12px;
  box-shadow: 0 -6px 30px rgba(0, 0, 0, .12), 0 0 0 2px var(--brand); display: flex; flex-direction: column; gap: 10px;
}
.back-card .input { flex: 1; min-height: 46px; }
.back-card .btn { min-height: 46px; padding: 0 14px; }
.back-card.pulse { animation: lift .6s var(--spring); }
@keyframes lift { 0% { transform: translateY(30px); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* --- Depuis partout (réglages) ------------------------------------------- */
.how + .how { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.how-h { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.how p { margin: 6px 0; font-size: .9rem; }
.how-steps { margin: 8px 0 10px; padding-left: 22px; font-size: .88rem; }
.how-steps li { margin: 4px 0; }
.how-steps li::marker { color: var(--brand); font-weight: 900; }
.copyrow { display: flex; gap: 8px; align-items: center; background: var(--bg); border-radius: 14px; padding: 6px 6px 6px 12px; }
.copyrow code { flex: 1; min-width: 0; font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.copyrow .btn { min-height: 40px; padding: 0 12px; }
.linkish { border: 0; background: none; padding: 0; color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.btn.bm { margin: 8px 0; cursor: grab; }
.icon-btn.spin .i { animation: spin .9s linear infinite; }

/* --- Boîte « À trier » ----------------------------------------------------- */
.inbox { margin: 0 -18px 18px; padding: 14px 18px 4px; background: linear-gradient(180deg, color-mix(in srgb, var(--sky) 10%, transparent), transparent); }
.inbox-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.inbox-h > .i { color: var(--sky); }
.inbox-h .count { background: var(--sky); color: #fff; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 1px 8px; }
.ib-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; }
.ib-actions button { border: 0; border-radius: 12px; height: 38px; cursor: pointer; display: grid; place-items: center; transition: transform .15s var(--spring); }
.ib-actions button:active { transform: scale(.88); }
.ib-no { background: var(--bg-2); color: var(--muted); }
.ib-yes { background: var(--brand); color: #fff; }
.triage { display: flex; align-items: center; gap: 10px; background: color-mix(in srgb, var(--sky) 12%, var(--card)); border-radius: var(--r); padding: 12px; margin-bottom: 14px; }
.triage > .i { color: var(--sky); width: 26px; height: 26px; }
.triage .btn { min-height: 40px; padding: 0 12px; }
.tag { display: inline-flex; align-items: center; font-size: .64rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; border-radius: 999px; padding: 1px 7px; background: color-mix(in srgb, var(--tomato) 14%, transparent); color: var(--tomato); }

/* --- Fiche : cuisiner, nutrition ----------------------------------------- */
.cook-cta { margin-bottom: 10px; min-height: 54px; font-size: 1.02rem; }
.cook-cta .i { width: 24px; height: 24px; }
.nutri .kcal { color: var(--muted); font-weight: 700; }
.nutri .kcal b { font-size: 1.7rem; color: var(--ink); letter-spacing: -.02em; }
.macro-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--bg-2); gap: 2px; }
.macro-bar i { width: var(--w); transition: width .8s var(--ease); }
.macro-bar .p, .dot.p { background: #e8553e; }
.macro-bar .c, .dot.c { background: #f4a62a; }
.macro-bar .f, .dot.f { background: #4a90d9; }
.dot.fi { background: #7cb342; }
.macros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.macros > div { display: flex; flex-direction: column; align-items: flex-start; }
.macros b { font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.macros small { font-size: .7rem; color: var(--muted); font-weight: 700; }
.dot { width: 9px; height: 9px; border-radius: 50%; margin-bottom: 4px; }

/* --- Mode cuisine ---------------------------------------------------------- */
body.cook-mode .nav, body.cook-mode .offline { display: none !important; }
body.cook-mode .view { padding: 0; max-width: none; }
.cook { position: fixed; inset: 0; z-index: 15; display: flex; flex-direction: column; background: var(--bg); }
.cook-top { display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-t)) 14px 8px; }
.icon-btn.glass { background: var(--card); }
.icon-btn.on { background: var(--brand); color: #fff; }
.icon-btn.live { animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 55%, transparent); } 50% { box-shadow: 0 0 0 10px transparent; } }
.cook-progress { flex: 1; display: flex; gap: 4px; }
.cook-progress i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); transition: background .3s, transform .3s var(--spring); }
.cook-progress i.on { background: var(--brand-2); }
.cook-progress i.now { background: var(--brand); transform: scaleY(1.4); }
.cook-heard { min-height: 0; text-align: center; font-size: .8rem; font-weight: 700; color: var(--brand); padding: 0 16px; opacity: 0; transition: opacity .3s; }
.cook-heard.live { opacity: 1; min-height: 20px; }
.cook-heard.flash { animation: pop .35s var(--spring); }
.cook-viewport { flex: 1; overflow: hidden; position: relative; }
.cook-track { display: flex; height: 100%; transition: transform .45s var(--ease); will-change: transform; }
.cook-slide { flex: 0 0 100%; height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 18px 22px 30px; touch-action: pan-y; }
.cook-slide > * { max-width: 680px; margin-left: auto; margin-right: auto; }
.cook-kicker { font-size: .8rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.cook-text { font-size: clamp(1.35rem, 5.4vw, 2rem); line-height: 1.45; font-weight: 650; letter-spacing: -.01em; margin: 6px auto 20px; }
.cook-text .timer-chip { font-size: .8em; padding: 2px 10px 2px 8px; }
.cook-ings { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cook-ing { display: inline-flex; align-items: center; gap: 8px; background: var(--card); box-shadow: var(--shadow-1); border-radius: 16px; padding: 6px 12px 6px 6px; font-size: 1rem; animation: rise .4s var(--spring) both; }
.cook-ing:nth-child(2) { animation-delay: .05s; }
.cook-ing:nth-child(3) { animation-delay: .1s; }
.cook-ing:nth-child(n+4) { animation-delay: .15s; }
.cook-ing b { font-variant-numeric: tabular-nums; }
.cook-timer { min-height: 54px; font-size: 1.05rem; }
.cook-hero { height: 30vh; max-height: 260px; border-radius: var(--r-lg); overflow: hidden; background: var(--grad); display: grid; place-items: center; margin-bottom: 18px; }
.cook-hero img { width: 100%; height: 100%; object-fit: cover; }
.cook-hero-ic .i { width: 70px; height: 70px; color: rgba(255, 255, 255, .85); }
.cook-slide.first h1 { font-size: 1.7rem; line-height: 1.15; margin: 0 auto 10px; letter-spacing: -.02em; }
.cook-serv { margin-bottom: 6px; }
.cook-checklist { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.cook-check {
  display: flex; align-items: center; gap: 12px; text-align: left; border: 0; background: var(--card); color: inherit; font: inherit;
  border-radius: 16px; padding: 8px 12px 8px 8px; box-shadow: var(--shadow-1); cursor: pointer; transition: opacity .25s, transform .15s;
}
.cook-check:active { transform: scale(.98); }
.cook-check b { min-width: 74px; font-variant-numeric: tabular-nums; }
.cook-check.on { opacity: .5; }
.cook-check.on .check { background: var(--brand); border-color: var(--brand); color: #fff; }
.cook-check.on .check .i { transform: scale(1); }
.cook-slide.last { display: flex; flex-direction: column; justify-content: center; }
.cook-nav { display: flex; gap: 10px; padding: 10px 14px calc(12px + var(--safe-b)); background: linear-gradient(transparent, var(--bg) 30%); }
.cook-nav .btn { min-height: 58px; font-size: 1.05rem; }
.cook-nav [data-prev] { width: 64px; padding: 0; }
.cook-nav [data-prev]:disabled { opacity: .35; }

/* « Il en reste ? » */
.lo-pic { width: 84px; height: 84px; border-radius: 26px; overflow: hidden; margin: 0 auto 12px; background: var(--grad-warm); display: grid; place-items: center; color: #fff; box-shadow: 0 10px 26px rgba(240, 127, 60, .3); }
.lo-pic img { width: 100%; height: 100%; object-fit: cover; }
.lo-pic .i { width: 42px; height: 42px; }
.big-stepper { display: flex; align-items: center; justify-content: center; gap: 26px; margin: 4px 0 18px; }
.big-stepper button { width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--card); box-shadow: var(--shadow-1); font-size: 1.6rem; font-weight: 800; color: var(--ink); cursor: pointer; transition: transform .12s var(--spring); }
.big-stepper button:active { transform: scale(.88); }
.big-stepper > div { text-align: center; min-width: 90px; }
.big-stepper b { display: block; font-size: 3rem; line-height: 1; font-weight: 900; font-variant-numeric: tabular-nums; }
.big-stepper small { color: var(--muted); font-weight: 700; }
.seg button .i { width: 1.15em; height: 1.15em; vertical-align: -3px; }

/* --- Micro ------------------------------------------------------------------ */
.btn.mic { position: relative; width: 50px; padding: 0; border-radius: 16px; overflow: visible; }
.btn.mic .ripple { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.btn.mic.on { background: var(--tomato); color: #fff; }
.btn.mic.on .ripple { animation: ripple 1.2s ease-out infinite; }
@keyframes ripple { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tomato) 60%, transparent); } to { box-shadow: 0 0 0 16px transparent; } }
form.listening .input { border-color: var(--tomato); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tomato) 18%, transparent); font-style: italic; }

/* --- Stock : emplacements ---------------------------------------------------- */
.places { --n: 4; --i: 0; position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); background: var(--bg-2); border-radius: 18px; padding: 4px; margin-bottom: 14px; }
.places-pill {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n)); border-radius: 14px;
  background: var(--card); box-shadow: var(--shadow-1); transform: translateX(calc(var(--i) * 100%)); transition: transform .45s var(--spring);
}
.places button {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; border: 0; background: none; cursor: pointer;
  padding: 7px 2px 6px; font: inherit; font-size: .74rem; font-weight: 800; color: var(--muted); transition: color .25s;
}
.places button .i { width: 22px; height: 22px; transition: transform .35s var(--spring); }
.places button.on { color: var(--ink); }
.places button.on .i { transform: scale(1.12); color: var(--brand); }
.places button b { position: absolute; top: 2px; left: calc(50% + 9px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: .64rem; line-height: 18px; background: var(--card); color: var(--muted); box-shadow: var(--shadow-1); }
.places button.on b { background: var(--brand); color: #fff; }

/* --- Stock : l'icône se vide comme un bocal ------------------------------------ */
@property --fill { syntax: '<number>'; inherits: true; initial-value: 1; }
.ico.gauge { position: relative; overflow: hidden; background: color-mix(in srgb, var(--c) 4%, var(--card)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 14%, transparent); transition: --fill .7s var(--spring); }
.ico.gauge::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--fill) * 100%);
  background: color-mix(in srgb, var(--c) 24%, var(--card));
}
.ico.gauge::after {
  /* La surface du liquide, qui ondule doucement (invisible quand c'est plein). */
  content: ""; position: absolute; left: -20%; right: -20%; height: 7px; bottom: calc(var(--fill) * 100% - 3.5px);
  border-radius: 50%; background: color-mix(in srgb, var(--c) 30%, var(--card)); opacity: calc(min(1, (1 - var(--fill)) * 40));
  animation: slosh 3.2s ease-in-out infinite;
}
@keyframes slosh { 0%, 100% { transform: translateX(-6%) rotate(-2deg); } 50% { transform: translateX(6%) rotate(2deg); } }
.ico.gauge .i { position: relative; z-index: 1; }
.ico.gauge .ghost { opacity: .18; }
.ico.gauge .full { position: absolute; z-index: 2; clip-path: inset(calc((1 - var(--fill)) * 100%) 0 0 0); }
.ico.photo { overflow: hidden; background: var(--grad-warm); color: #fff; }
.ico.photo img { width: 100%; height: 100%; object-fit: cover; }
.stock-item .sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 2px; font-size: .78rem; color: var(--muted); }
.stock-item .sub .q { font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.stock-item .sub .exp { margin: 0; }
.stock-item .where { display: inline-flex; vertical-align: -2px; margin-left: 6px; color: var(--sky); }
.stock-item .where .i { width: 15px; height: 15px; }
.exp.cold { color: var(--sky); }
.use-btn {
  width: 40px; height: 40px; flex: none; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--bg-2); color: var(--ink-2); transition: transform .15s var(--spring), background .2s;
}
.use-btn:active { transform: scale(.85); background: var(--brand-soft); color: var(--brand); }
.use-btn.pop { animation: pop .35s var(--spring); }

/* --- Stock : fiche d'un produit ----------------------------------------------- */
.qty-card { padding: 16px; }
.qty-big b { font-size: 2rem; font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums; display: inline-block; }
.pieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 10px; margin-bottom: 12px; }
.piece {
  --c: var(--brand); aspect-ratio: 1; border: 0; border-radius: 16px; cursor: pointer; display: grid; place-items: center;
  background: var(--bg-2); color: color-mix(in srgb, var(--muted) 45%, transparent);
  transition: background .3s, color .3s, transform .2s var(--spring); transition-delay: var(--d);
}
.piece .i { width: 30px; height: 30px; transition: transform .3s var(--spring); transform: scale(.82); }
.piece.on { background: color-mix(in srgb, var(--c) 16%, var(--card)); color: var(--c); box-shadow: var(--shadow-1); }
.piece.on .i { transform: scale(1); }
.jar-wrap { display: flex; gap: 18px; align-items: center; }
.jar {
  --fill: 1; position: relative; flex: none; width: 96px; height: 150px; border-radius: 22px 22px 30px 30px; overflow: hidden; cursor: ns-resize;
  background: var(--bg-2); box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--c) 30%, var(--card)); touch-action: none; transition: --fill .45s var(--spring);
}
.jar.drag { transition: none; }
.jar-liquid {
  position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--fill) * 100%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 55%, var(--card)), color-mix(in srgb, var(--c) 80%, #000 5%));
}
.jar-liquid::before {
  content: ""; position: absolute; left: -25%; right: -25%; top: -6px; height: 12px; border-radius: 50%;
  background: color-mix(in srgb, var(--c) 40%, var(--card)); animation: slosh 2.6s ease-in-out infinite;
}
.jar-ic { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; transform: translate(-50%, -50%); color: #fff; mix-blend-mode: soft-light; opacity: .9; }
.jar-marks { position: absolute; inset: 0; pointer-events: none; }
.jar-marks i { position: absolute; right: 0; width: 14px; height: 2px; background: color-mix(in srgb, var(--ink) 25%, transparent); border-radius: 1px; }
.jar-marks i:nth-child(1) { top: 25%; }
.jar-marks i:nth-child(2) { top: 50%; width: 20px; }
.jar-marks i:nth-child(3) { top: 75%; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.quick .chip { padding: 6px 12px; }
.place-seg { margin-bottom: 10px; }
.move-part { margin: -2px 0 14px; animation: rise .3s var(--ease); }
.small-seg { margin: 0; }
.small-seg button { font-size: .82rem; padding: 8px; }

/* Menu : repas « reste » */
.slot.reste { background: color-mix(in srgb, var(--tomato) 14%, transparent); color: var(--tomato); display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; }
.slot.reste .i { width: 12px; height: 12px; }

/* Fiche ingrédient : aliment Ciqual */
.ciq { background: var(--card); border-radius: 16px; box-shadow: var(--shadow-1); padding: 10px; }
.ciq .list { box-shadow: none; max-height: 240px; overflow: auto; background: var(--bg); }
.ciq .item { min-height: 52px; }

@media (prefers-color-scheme: dark) {
  .ib-no { background: var(--line); }
  .jar-ic { mix-blend-mode: normal; opacity: .55; }
}
@media (min-width: 960px) {
  .cook-slide { padding: 30px 40px; }
}

/* Retouches : notifications au-dessus des feuilles, étapes centrées */
.toast > span { flex: 1 1 auto; min-width: 0; }
body:has(#sheet:not([hidden])) .toast, body.cook-mode .toast { bottom: auto; top: calc(14px + var(--safe-t)); }
.cook-slide.step { display: flex; flex-direction: column; }
.cook-body { position: relative; margin: auto 0; width: 100%; padding-bottom: 20px; }
.cook-num {
  position: absolute; right: -6px; top: -54px; z-index: -1; font-size: 9rem; font-weight: 900; line-height: 1; letter-spacing: -.06em;
  color: color-mix(in srgb, var(--brand) 9%, transparent); pointer-events: none; user-select: none;
}
.pick-th.warm { background: var(--grad-warm); }
.step-l { min-width: 4.5ch !important; font-size: .85rem; }

/* =========================================================================
   Gestes : appui long, menu d'actions, aperçu, balayages, sélection
   ========================================================================= */

/* Pas de menu du navigateur (lien, image) sur ce qu'on maintient au doigt. */
.rcard, .meal, .item, .nav a, .ing, .group-head, .deck-card, .add-meal, .stepper button, .use-btn {
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
.rcard img, .meal img, .deck-card img, .item img { -webkit-user-drag: none; }
.pressing { transform: scale(.975); transition: transform .45s var(--ease); }
.nav a.pressing { transform: scale(.92); }

/* Cibles tactiles : + et − gardent leur dessin, mais se touchent sur 46 px. */
.stepper button { position: relative; touch-action: manipulation; }
.stepper button::before { content: ''; position: absolute; inset: -7px; }

/* Menu d'actions */
.ctx { position: fixed; inset: 0; z-index: 60; touch-action: none; }
.ctx-back {
  position: absolute; inset: 0; background: rgba(10, 16, 12, .36);
  backdrop-filter: blur(6px) saturate(1.1); -webkit-backdrop-filter: blur(6px) saturate(1.1); animation: fade .2s;
}
.ctx-lift {
  position: fixed; margin: 0; z-index: 1; background: var(--card); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28); transform: scale(1.03); animation: ctxlift .3s var(--spring) backwards; transition: translate .35s var(--spring);
}
/* Onglet soulevé : sa copie quitte la barre, elle en reprend la mise en page. */
a.ctx-lift[data-tab] {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 18px; background: var(--brand-soft); color: var(--brand); font-size: .7rem; font-weight: 700;
}
a.ctx-lift[data-tab] .i { width: 24px; height: 24px; }
.ctx-source { visibility: hidden; }
@keyframes ctxlift { from { transform: scale(.97); } to { transform: scale(1.03); } }
.ctx-menu {
  position: fixed; z-index: 2; min-width: 250px; max-width: min(340px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow: auto;
  background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-radius: 20px; box-shadow: var(--shadow-2), 0 0 0 1px color-mix(in srgb, var(--line) 70%, transparent);
  animation: ctxin .28s var(--spring) backwards;
}
@keyframes ctxin { from { opacity: 0; transform: scale(.85); } }
.ctx-acts { display: flex; flex-direction: column; padding: 6px; }
.ctx-acts button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 12px; border: 0; border-radius: 13px;
  background: none; color: var(--ink); font: inherit; font-weight: 650; text-align: left; cursor: pointer; transition: background .15s;
}
.ctx-acts button > .i { width: 22px; height: 22px; flex: none; color: var(--ink-2); }
.ctx-acts button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-acts button small { color: var(--muted); font-size: .74rem; font-weight: 650; white-space: nowrap; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.ctx-acts button:active, .ctx-acts button:focus-visible { background: var(--bg-2); outline: none; }
.ctx-acts button.danger, .ctx-acts button.danger > .i { color: var(--danger); }
.ctx-acts button.on > .i { color: var(--brand); }
.ctx-acts hr { border: 0; height: 1px; background: var(--line); margin: 4px 10px; }
.ctx-title { padding: 14px 16px 4px; font-weight: 800; line-height: 1.25; }
.ctx-title .small { margin-top: 2px; font-weight: 600; }
.ctx-seg { margin: 8px 8px 2px; }
.ctx-seg button { white-space: nowrap; padding-left: 6px; padding-right: 6px; font-size: .9rem; }
.ctx-th { width: 36px; height: 36px; border-radius: 11px; overflow: hidden; flex: none; display: grid; place-items: center; background: var(--grad); }
.ctx-th.warm { background: var(--grad-warm); }
.ctx-th img { width: 100%; height: 100%; object-fit: cover; }
.ctx-th .i { width: 18px; height: 18px; color: #fff; }
.ctx.out { pointer-events: none; }
.ctx.out .ctx-back { opacity: 0; transition: opacity .18s; }
.ctx.out .ctx-menu, .ctx.out .ctx-lift { opacity: 0; transition: opacity .16s; }

/* Aperçu d'une recette (appui long sur une carte) */
.ctx.peek .ctx-menu {
  left: 50%; top: 50%; width: min(370px, calc(100vw - 28px)); max-width: none; transform: translate(-50%, -50%);
  animation: peekin .34s var(--spring) backwards;
}
@keyframes peekin { from { opacity: 0; transform: translate(-50%, -46%) scale(.9); } to { opacity: 1; transform: translate(-50%, -50%); } }
.peek-ph { position: relative; aspect-ratio: 16 / 10; overflow: hidden; display: grid; place-items: center; background: var(--grad); color: rgba(255, 255, 255, .85); }
.peek-ph img { width: 100%; height: 100%; object-fit: cover; animation: fade .4s; }
.peek-ph > .i { width: 56px; height: 56px; }
.peek-ph .star { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .35); color: #ffc93c; backdrop-filter: blur(6px); }
.peek-ph .star .i { width: 18px; height: 18px; }
.peek-b { padding: 12px 16px 2px; }
.peek-t { font-weight: 800; font-size: 1.15rem; line-height: 1.2; letter-spacing: -.01em; }
.peek-b .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 8px; font-size: .8rem; font-weight: 650; color: var(--muted); }
.peek-b .meta .i { width: 1.1em; height: 1.1em; vertical-align: -2px; }
.peek-b .miss { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.peek-days { margin-top: 10px; padding: 10px 10px 4px; border-top: 1px solid var(--line); }
.peek-days .lbl { display: flex; align-items: center; gap: 6px; margin: 0 4px 8px; font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.peek-days .lbl .i { width: 15px; height: 15px; }
.daypick.mini { grid-template-columns: repeat(7, 1fr); gap: 5px; }
.daypick.mini button { padding: 7px 0; border-radius: 13px; background: var(--bg); box-shadow: none; }
.daypick.mini button.today { background: var(--grad); }
.daypick.mini button b { font-size: 1.05rem; }
.daypick.mini button small { font-size: .58rem; }

/* Menu : un repas se balaye (cuisiné / retirer) */
.meal-sw { border-radius: 16px; }
.meal-sw .swipe-bg { border-radius: 16px; padding: 0 18px; font-size: .9rem; }
.hero-card a.hero-cook { display: flex; align-items: center; gap: 8px; color: inherit; }
.hero-card a.hero-cook .i { width: 24px; height: 24px; flex: none; opacity: .85; }

/* Courses et stock : couleurs des balayages */
.swipe-bg.have, .swipe-bg.cold { background: var(--sky); }
.qty.editable { min-width: 26px; min-height: 22px; padding: 2px 0; border-bottom: 1.5px dashed color-mix(in srgb, var(--muted) 45%, transparent); cursor: text; }
.qty-in {
  width: 92px; padding: 6px 8px; border: 0; border-radius: 10px; background: var(--bg-2); color: var(--ink);
  font: inherit; font-weight: 800; text-align: right; outline: 2px solid var(--brand);
}
.aisles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.aisle {
  display: flex; align-items: center; gap: 10px; padding: 10px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--card); box-shadow: var(--shadow-1); color: var(--ink); font: inherit; font-weight: 700; font-size: .88rem; text-align: left;
}
.aisle.on { box-shadow: 0 0 0 2px var(--brand), var(--shadow-1); }
.aisle:active { transform: scale(.96); }

/* « À trier » : une pile de cartes */
.deck { position: relative; height: 132px; margin: 0 0 16px; }
.deck-card {
  position: absolute; inset: 0; display: flex; overflow: hidden; touch-action: pan-y; cursor: grab;
  background: var(--card); border-radius: var(--r); box-shadow: var(--shadow-2); transform-origin: 50% 130%;
  translate: 0 calc(var(--k) * 10px); scale: calc(1 - var(--k) * .05); opacity: calc(1 - var(--k) * .3);
  transition: translate .4s var(--spring), scale .4s var(--spring), opacity .3s;
}
.deck-card[aria-hidden] { pointer-events: none; }
.deck.advance .deck-card[aria-hidden] { translate: 0 calc((var(--k) - 1) * 10px); scale: calc(1 - (var(--k) - 1) * .05); opacity: 1; }
.deck-card.dragging { transition: none; cursor: grabbing; }
.deck-card .ph { width: 132px; flex: none; display: grid; place-items: center; overflow: hidden; background: var(--grad); color: rgba(255, 255, 255, .85); }
.deck-card .ph img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.deck-b { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 12px 12px 10px; }
.deck-b .t { font-weight: 800; line-height: 1.2; color: inherit; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deck-b .o { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck-b .o .i { width: 13px; height: 13px; flex: none; }
.deck-b .ib-actions { margin-top: auto; padding: 0; }
.stamp {
  position: absolute; top: 12px; z-index: 3; display: flex; align-items: center; gap: 4px; padding: 4px 10px; pointer-events: none;
  border: 2px solid; border-radius: 10px; background: color-mix(in srgb, var(--card) 88%, transparent); font-weight: 900; font-size: .8rem;
}
.stamp .i { width: 16px; height: 16px; }
.stamp.keep { left: 12px; color: var(--brand); opacity: var(--keep, 0); transform: rotate(-8deg); }
.stamp.drop { right: 12px; color: var(--danger); opacity: var(--drop, 0); transform: rotate(8deg); }

/* Stock : régler le niveau au doigt */
.ico.gauge.leveling { transform: scale(1.2); transition: transform .25s var(--spring), --fill .12s; box-shadow: 0 0 0 3px var(--brand-soft), inset 0 0 0 1.5px color-mix(in srgb, var(--c) 30%, transparent); }
.level-pop {
  position: fixed; z-index: 70; display: flex; align-items: center; gap: 14px; padding: 12px 18px 12px 12px; pointer-events: none;
  background: var(--card); border-radius: 24px; box-shadow: 0 18px 50px rgba(0, 0, 0, .25); animation: ctxin .25s var(--spring) backwards;
}
.level-pop .jar { width: 64px; height: 100px; border-radius: 16px 16px 22px 22px; transition: --fill .12s; }
.level-pop .jar-ic { width: 30px; height: 30px; }
.level-pop.out { opacity: 0; transform: scale(.9); transition: .18s; }
.level-txt b { display: block; font-size: 1.35rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.level-txt small { color: var(--muted); font-weight: 650; }

/* Stock : sélection multiple */
.stock-item .pick { display: grid; place-items: center; flex: none; color: var(--muted); animation: pop .3s var(--spring); }
.stock-item .pick .i { width: 26px; height: 26px; }
.stock-item.picked { background: color-mix(in srgb, var(--brand-soft) 75%, var(--card)); }
.stock-item.picked .pick { color: var(--brand); }
.selbar {
  position: fixed; left: 50%; bottom: calc(12px + var(--safe-b)); z-index: 12; transform: translateX(-50%);
  width: min(440px, calc(100% - 24px)); min-height: 62px; display: flex; align-items: center; gap: 2px; padding: 6px 8px;
  background: var(--ink); color: var(--bg); border-radius: 24px; box-shadow: var(--shadow-2); animation: rise .3s var(--spring);
}
.selbar[hidden] { display: none; }
.selbar .icon-btn { color: inherit; background: transparent; }
.selbar b { padding-left: 4px; }
.sel-act {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 60px; padding: 6px 8px; border: 0; border-radius: 14px;
  background: none; color: inherit; font: inherit; font-size: .68rem; font-weight: 700; cursor: pointer;
}
.sel-act .i { width: 22px; height: 22px; }
.sel-act.danger { color: #ff8a7a; }
.sel-act:active { background: rgba(255, 255, 255, .12); }

/* =========================================================================
   Chercher, aperçu, Découvrir
   ========================================================================= */

/* Recettes : les deux portes d'entrée */
.find-row { display: grid; grid-template-columns: 1.15fr 1fr; gap: 10px; margin: 0 0 16px; }
.disc-card {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r); color: #fff;
  background: var(--grad); box-shadow: var(--shadow-brand); transition: transform .15s var(--spring);
}
.disc-card > .i { width: 26px; height: 26px; flex: none; }
.disc-card b { display: block; font-size: 1rem; }
.disc-card .small { opacity: .85; }
.disc-card.alt { background: var(--card); color: var(--ink); box-shadow: var(--shadow-1); }
.disc-card.alt > .i { color: var(--sky); }
.disc-card.alt .small { color: var(--muted); opacity: 1; }
.disc-card:active { transform: scale(.97); }
.disc-card > .i:last-child:not(:first-child) { width: 20px; height: 20px; opacity: .7; }
.web-find { margin-top: 16px; }
.tiles:has(> :nth-child(4)) { grid-template-columns: repeat(2, 1fr); }

/* Résultats */
.searching { display: flex; align-items: center; gap: 6px; margin: 4px 2px 12px; }
.wgrid { margin-bottom: 14px; }
.wcard {
  position: relative; display: block; padding: 0; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--card); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; transition: transform .15s var(--spring);
}
.wcard:active { transform: scale(.97); }
.wcard .ph { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; background: var(--grad); color: rgba(255, 255, 255, .85); }
.wcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.wcard .ph > .i { width: 40px; height: 40px; }
.wcard .body { padding: 10px 12px 12px; }
.wcard .title { font-weight: 750; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wcard .meta, .wp-meta, .dc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; font-size: .78rem; font-weight: 650; color: var(--muted); }
.wcard .meta .i, .wp-meta .i, .dc-meta .i { width: 1.1em; height: 1.1em; vertical-align: -2px; }
.wc-star { color: var(--ink-2); }
.wc-star .i { color: #f2b01e; }
.wc-star small { color: var(--muted); font-weight: 600; }
.wc-site {
  position: absolute; left: 8px; bottom: 8px; padding: 3px 9px; border-radius: 999px; font-size: .68rem; font-weight: 800;
  background: rgba(255, 255, 255, .94); color: var(--c, var(--ink));
}
.s-marmiton { --c: #d9432f; }
.s-750g { --c: #b5174f; }
.s-cuisineaz { --c: #1f8a5e; }
.wc-kept {
  position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: .68rem; font-weight: 800;
}
.wc-kept .i { width: 13px; height: 13px; }

/* Dans ton carnet (en tête des résultats) */
.mine-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -18px 6px; padding: 2px 18px 8px; scrollbar-width: none; }
.mine-row::-webkit-scrollbar { display: none; }
.mine { flex: none; width: 128px; color: inherit; background: var(--card); border-radius: 16px; box-shadow: var(--shadow-1); overflow: hidden; }
.mine .ph { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--grad); color: rgba(255, 255, 255, .85); overflow: hidden; }
.mine .ph img { width: 100%; height: 100%; object-fit: cover; }
.mine .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 6px 9px 0; font-weight: 750; font-size: .82rem; line-height: 1.2; }
.mine small { display: block; padding: 2px 9px 8px; color: var(--brand); font-weight: 700; font-size: .7rem; }

/* Aperçu d'une recette trouvée */
.wp-ph { position: relative; margin: 0 -18px 12px; aspect-ratio: 16 / 9; overflow: hidden; display: grid; place-items: center; background: var(--grad); color: rgba(255, 255, 255, .85); }
.wp-ph img { width: 100%; height: 100%; object-fit: cover; animation: fade .35s; }
.wp-ph > .i { width: 54px; height: 54px; }
.wp-ph .wc-site { left: 18px; bottom: 12px; font-size: .74rem; }
.sheet h2.wp-t { margin: 0 0 4px; }
.wp-meta { margin: 0 0 12px; }
.wp-loading { display: flex; align-items: center; gap: 10px; padding: 24px 4px; }
.wp-cover { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: var(--bg-2); margin-bottom: 4px; }
.wp-cover > .i { width: 24px; height: 24px; flex: none; color: var(--muted); }
.wp-cover.some { background: color-mix(in srgb, var(--sun) 14%, var(--card)); }
.wp-cover.some > .i { color: #a86c0b; }
.wp-cover.all { background: var(--brand-soft); }
.wp-cover.all > .i, .wp-cover.all b { color: var(--brand); }
.wp-cover .small { color: var(--ink-2); margin-top: 2px; }
.wp-cover .small .i { width: 14px; height: 14px; vertical-align: -2px; color: #4d7d1d; }
.wp-ings { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: 16px; box-shadow: var(--shadow-1); }
.wp-ings li { padding: 10px 14px; line-height: 1.3; }
.wp-ings li + li { box-shadow: inset 0 1px 0 var(--line); }
.wp-steps { margin: 0; padding-left: 22px; }
.wp-steps li { margin-bottom: 10px; line-height: 1.45; }
.wp-bar {
  position: sticky; bottom: calc(-22px - var(--safe-b)); z-index: 2; display: flex; gap: 8px; margin: 18px -18px calc(-22px - var(--safe-b));
  padding: 12px 18px calc(14px + var(--safe-b)); background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 -1px 0 var(--line);
}
.btn.icon-only { padding-left: 14px; padding-right: 14px; }

/* Découvrir : la pile */
.disc { padding-top: 4px; }
.deck.big { height: min(60vh, 520px); margin: 4px 0 34px; }
.dcard { flex-direction: column; border-radius: 26px; box-shadow: var(--shadow-2); }
.dcard.sk { background: var(--card); }
.dc-ph { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; background: var(--grad); color: rgba(255, 255, 255, .85); }
.dc-ph img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.dc-ph > .i { width: 64px; height: 64px; }
.dc-reason {
  position: absolute; top: 14px; left: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; max-width: calc(100% - 28px);
  padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: #18221c; font-size: .78rem; font-weight: 800;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dc-reason .i { width: 16px; height: 16px; color: #1f8a4c; flex: none; }
.dc-reason.inline { position: static; margin: 0 0 8px; box-shadow: none; background: var(--brand-soft); color: var(--brand); }
.dc-b { padding: 14px 16px 16px; }
.dc-t { font-weight: 800; font-size: 1.2rem; line-height: 1.2; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dc-site { color: var(--ink-2); }
.dc-cover { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; padding: 4px 10px; border-radius: 999px; font-size: .76rem; font-weight: 800; background: var(--bg-2); color: var(--ink-2); }
.dc-cover .i { width: 15px; height: 15px; }
.dc-cover.all { background: var(--brand-soft); color: var(--brand); }
.dcard .stamp { top: 64px; font-size: 1rem; padding: 6px 14px; }
.disc-actions { display: flex; justify-content: center; align-items: center; gap: 16px; margin-bottom: 10px; }
.dact {
  display: grid; place-items: center; width: 64px; height: 64px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--card); box-shadow: var(--shadow-2); color: var(--ink-2); transition: transform .15s var(--spring);
}
.dact .i { width: 30px; height: 30px; }
.dact.sm { width: 48px; height: 48px; }
.dact.sm .i { width: 22px; height: 22px; }
.dact.no { color: var(--danger); }
.dact.yes { background: var(--grad); color: #fff; box-shadow: var(--shadow-brand); }
.dact:active { transform: scale(.88); }
.disc-wait { display: flex; align-items: center; justify-content: center; gap: 8px; }
.spinner.sm { width: 18px; height: 18px; border-width: 2px; margin: 0; }

/* Menu : la tuile « D'autres idées » */
.idea.more .idea-ph { background: var(--grad-warm); }
.idea.more .idea-ph .i { width: 36px; height: 36px; color: #fff; }
.idea.more { color: inherit; }

/* Réglages de Découvrir */
.set-list { margin-bottom: 16px; }
.set-list .item b { display: block; }
.set-list .item .meta { white-space: normal; }
.sheet .chips + label.field, .sheet .chips + .field-label { margin-top: 18px; }
.sheet [data-seg] button { white-space: nowrap; padding-left: 4px; padding-right: 4px; font-size: .88rem; }

/* =========================================================================
   Finitions : typographie, photos, en-tête compact, couleurs, mouvements
   ========================================================================= */

/* Typographie : titres équilibrés, coupures françaises, chiffres alignés */
:root { interpolate-size: allow-keywords; }
h1, h2, h3, .title, .dc-t, .wp-t, .label, .idea-t, .mine .t, .ctx-title { text-wrap: balance; }
p, .small, .meta, .wp-steps li, .steps li { text-wrap: pretty; }
p, .wp-steps li, .steps li, .wp-ings li { hyphens: auto; -webkit-hyphens: auto; }
.qty, .badge, .count, .big, .ring, .timer, .stepper, .big-stepper, [data-roll], .wc-star, .dc-cover, .wc-cover, .cook-time, .nutri { font-variant-numeric: tabular-nums; }

/* Photos : posées sur leur couleur dominante, elles apparaissent en fondu */
img[data-img] { transition: opacity .45s var(--ease); }
img[data-img]:not(.in) { opacity: 0; }

/* En-tête compact au défilement (le titre s'efface, une barre fine prend le relais) */
.mini-top { position: sticky; top: 0; height: 0; z-index: 8; pointer-events: none; }
.mini-top > div {
  position: absolute; left: calc(50% - 50vw); width: 100vw; top: 0; padding: calc(var(--safe-t) + 12px) 60px 12px;
  text-align: center; font-weight: 800; font-size: 1rem; letter-spacing: -.01em; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px);
  box-shadow: 0 1px 0 var(--line); opacity: 0; translate: 0 -100%;
}
@supports (animation-timeline: scroll()) {
  .mini-top > div { animation: mini-in linear both; animation-timeline: scroll(root); animation-range: 64px 112px; }
  .top .titles { animation: title-out linear both; animation-timeline: scroll(root); animation-range: 0 120px; transform-origin: left bottom; }
}
@keyframes mini-in { to { opacity: 1; translate: 0 0; } }
@keyframes title-out { to { opacity: .15; scale: .94; } }
body.cook-mode .mini-top { display: none; }

/* Feuilles et message bref : ils repartent en douceur (plus de disparition sèche) */
.sheet { transition: display .3s allow-discrete; }
.sheet[hidden] { display: none; pointer-events: none; }
.sheet-backdrop { transition: opacity .3s; }
.sheet[hidden] .sheet-backdrop { opacity: 0; }
.sheet[hidden] .sheet-panel { transform: translateY(105%); transition: transform .28s cubic-bezier(.4, 0, 1, 1); }
@media (min-width: 960px) {
  .sheet[hidden] .sheet-panel { transform: translateY(58%) scale(.97); opacity: 0; transition: transform .25s, opacity .2s; }
}
.toast { transform: none; translate: -50% 0; transition: opacity .2s, translate .25s var(--ease), display .25s allow-discrete; }
.toast[hidden] { display: none; opacity: 0; translate: -50% 12px; }

/* Photo d'une carte qui glisse jusqu'en haut de l'aperçu */
.vt-sheet .sheet-panel, .vt-sheet .sheet-backdrop { animation: none; }
::view-transition-group(wimg) { animation-duration: .42s; animation-timing-function: var(--ease); }
::view-transition-old(wimg), ::view-transition-new(wimg) { height: 100%; width: 100%; object-fit: cover; overflow: clip; }

/* Recette gardée : la vignette s'envole vers l'onglet Recettes */
.fly-ghost { position: fixed; z-index: 60; margin: 0; pointer-events: none; overflow: hidden; border-radius: 16px; box-shadow: var(--shadow-2); }
.fly-ghost img { width: 100%; height: 100%; object-fit: cover; opacity: 1; }
.fly-ghost .wc-site, .fly-ghost [data-badges] { display: none; }
.nav a.caught .i { animation: caught .5s var(--spring); }
@keyframes caught { 40% { transform: translateY(-4px) scale(1.3); } }

/* États vides : des ingrédients flottent autour de la pastille */
.bubble-wrap { position: relative; width: 168px; height: 124px; margin: 0 auto 8px; display: grid; place-items: center; }
.empty .bubble-wrap .bubble { margin: 0; animation: bob 6s ease-in-out infinite; }
.bubble-wrap .d { position: absolute; display: grid; place-items: center; width: 34px; height: 34px; opacity: .6; animation: floaty 5.5s ease-in-out infinite; }
.bubble-wrap .d .i { width: 100%; height: 100%; }
.bubble-wrap .d0 { left: 0; top: 8px; rotate: -14deg; color: var(--tomato); }
.bubble-wrap .d1 { right: 0; top: 0; rotate: 12deg; color: var(--sun); animation-delay: -1.4s; }
.bubble-wrap .d2 { left: 12px; bottom: -2px; width: 26px; height: 26px; rotate: 10deg; color: var(--brand-2); animation-delay: -2.8s; }
.bubble-wrap .d3 { right: 14px; bottom: 2px; width: 26px; height: 26px; rotate: -8deg; color: var(--sky); animation-delay: -4s; }
@keyframes floaty { 50% { translate: 0 -7px; } }
@keyframes bob { 50% { transform: rotate(-3deg) translateY(-3px); } }

/* Couleur de l'app (Réglages) */
.accents { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.accent {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 2px; border: 0; border-radius: 14px;
  background: transparent; cursor: pointer; font-size: .76rem; font-weight: 700; color: var(--ink-2);
}
.accent .dot {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: transparent;
  background: var(--c); box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 40%, transparent); transition: transform .25s var(--spring), box-shadow .2s;
}
.accent .dot .i { width: 22px; height: 22px; transform: scale(0); transition: transform .3s var(--spring); }
.accent.on .dot { color: #fff; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--c); }
.accent.on .dot .i { transform: scale(1); }
.accent:active .dot { transform: scale(.9); }
.accent.on { color: var(--ink); }

:root[data-accent="tomate"] {
  --brand: #d14329; --brand-2: #ef6a4e; --brand-soft: #fbe5df;
  --grad: linear-gradient(135deg, #ef6a4e 0%, #d14329 55%, #ac3520 100%); --shadow-brand: 0 10px 28px rgba(209, 67, 41, .33);
}
:root[data-accent="ocean"] {
  --brand: #1d6fbd; --brand-2: #3b92df; --brand-soft: #e0ecf9;
  --grad: linear-gradient(135deg, #3b92df 0%, #1d6fbd 55%, #165996 100%); --shadow-brand: 0 10px 28px rgba(29, 111, 189, .33);
}
:root[data-accent="prune"] {
  --brand: #8446ab; --brand-2: #a56ccc; --brand-soft: #f0e5f7;
  --grad: linear-gradient(135deg, #a56ccc 0%, #8446ab 55%, #6a378b 100%); --shadow-brand: 0 10px 28px rgba(132, 70, 171, .33);
}
:root[data-accent="miel"] {
  --brand: #a8640c; --brand-2: #e0961f; --brand-soft: #fbefd9;
  --grad: linear-gradient(135deg, #f0a93a 0%, #c27812 55%, #9c5f0d 100%); --shadow-brand: 0 10px 28px rgba(194, 120, 18, .33);
}
@media (prefers-color-scheme: dark) {
  :root[data-accent="tomate"] { --brand: #f27a60; --brand-2: #f8977f; --brand-soft: #3a1c16; --grad: linear-gradient(135deg, #cc563d 0%, #a03d29 60%, #7c2e1e 100%); }
  :root[data-accent="ocean"] { --brand: #5ea8ee; --brand-2: #82bcf3; --brand-soft: #15283c; --grad: linear-gradient(135deg, #3383cf 0%, #20619f 60%, #184b7b 100%); }
  :root[data-accent="prune"] { --brand: #bd8edb; --brand-2: #cfa8e6; --brand-soft: #2c1f37; --grad: linear-gradient(135deg, #925bb8 0%, #6f418f 60%, #573270 100%); }
  :root[data-accent="miel"] { --brand: #f1b24c; --brand-2: #f6c671; --brand-soft: #3a2b12; --grad: linear-gradient(135deg, #c98b2b 0%, #9d6b1d 60%, #7b5317 100%); }
}

/* Chercher : suggestions, « essayer plutôt », filtres, cartes complétées */
.search-form { position: relative; z-index: 15; }
.wcard [data-badges] { display: contents; }
.suggest {
  position: absolute; left: 0; right: 108px; top: calc(100% + 6px); z-index: 12; padding: 6px; border-radius: 18px;
  background: var(--card); box-shadow: var(--shadow-2); transition: opacity .18s, translate .18s var(--ease), display .18s allow-discrete;
}
@starting-style { .suggest { opacity: 0; translate: 0 -6px; } }
.suggest[hidden] { display: none; opacity: 0; translate: 0 -6px; }
.sg {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 12px; background: none;
  text-align: left; font-weight: 650; cursor: pointer; color: var(--ink);
}
.sg .i { width: 22px; height: 22px; color: var(--muted); }
.sg.on, .sg:hover { background: var(--bg-2); }
.sg span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.did-you-mean {
  display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 12px; padding: 10px 14px; border: 0; border-radius: 14px;
  background: color-mix(in srgb, var(--sun) 16%, var(--card)); color: var(--ink-2); font-weight: 650; text-align: left; cursor: pointer;
}
.did-you-mean b { color: var(--ink); }
@starting-style { .did-you-mean { opacity: 0; translate: 0 -4px; } }
.did-you-mean { transition: opacity .25s, translate .25s var(--ease); }
.chips.filters { margin-top: -8px; }
.chips.filters .chip .i { width: 1.1em; height: 1.1em; }
.wc-cover, .wc-never {
  position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .94); color: #3c4842; font-size: .7rem; font-weight: 800; box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  animation: pop .35s var(--spring);
}
.wc-cover .i, .wc-never .i { width: 13px; height: 13px; }
.wc-cover.some { color: #8a5a06; }
.wc-cover.all { background: var(--brand); color: #fff; }
.wc-never { top: auto; bottom: 8px; right: 8px; background: var(--danger); color: #fff; }
.wcard.filled .meta { animation: fade .35s; }
.wp-fold.folded li:nth-child(n+4) { display: none; }
.wp-fold { overflow: hidden; }

/* Blocs repliables (details) : ils s'ouvrent en douceur où le navigateur le permet */
details.fold::details-content { block-size: 0; overflow: clip; transition: block-size .35s var(--ease), content-visibility .35s allow-discrete; }
details.fold[open]::details-content { block-size: auto; }

/* Découvrir : cartes sur leur propre couche (le glissé ne redessine rien),
   bouton « Annuler » dans la rangée, messages en haut (rien sous le pouce) */
.deck.big .deck-card { will-change: transform; contain: layout paint; }
.dact:disabled { opacity: .35; box-shadow: var(--shadow-1); pointer-events: none; }
.disc-actions { gap: 12px; }
body:has(.disc-actions) .toast { bottom: auto; top: calc(14px + var(--safe-t)); }

/* Menu : « ce soir » en une carte, les chiffres en une ligne, jours compacts */
.tonight {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; margin-bottom: 10px; border-radius: var(--r);
  background: var(--grad); color: #fff; box-shadow: var(--shadow-brand);
}
.tonight .th { width: 58px; height: 58px; flex: none; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: rgba(255, 255, 255, .18); }
.tonight .th img { width: 100%; height: 100%; object-fit: cover; }
.tonight .th .i { width: 28px; height: 28px; }
.tonight .grow { min-width: 0; display: flex; flex-direction: column; }
.tonight .lbl { font-size: .74rem; font-weight: 700; opacity: .85; }
.tonight b { font-size: 1.08rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tonight small { opacity: .85; font-size: .78rem; }
.tonight .go { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, .2); font-weight: 800; }
.tonight .go .i { width: 24px; height: 24px; }
.tonight.none { background: var(--card); color: var(--ink); box-shadow: var(--shadow-1); padding: 8px 12px 8px 8px; }
.tonight.none .th { width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--sun) 18%, var(--card)); color: #b77908; }
.tonight.none .th .i { width: 22px; height: 22px; }
.tonight.none b { font-size: .98rem; }
.tonight.none small { color: var(--muted); opacity: 1; }
.tonight.none > .i { color: var(--muted); }
.tonight:active { transform: scale(.98); }
.week-stats { display: flex; gap: 8px; margin: 0 0 6px; overflow-x: auto; scrollbar-width: none; }
.week-stats::-webkit-scrollbar { display: none; }
.ws {
  display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 6px 10px; border-radius: 999px;
  background: var(--card); box-shadow: var(--shadow-1); font-size: .8rem; font-weight: 650; color: var(--ink-2); white-space: nowrap;
}
.ws .i { width: 17px; height: 17px; color: var(--muted); }
.ws b { color: var(--ink); font-weight: 800; }
.ws.free .i { color: var(--warn); }
.ws.go { color: var(--brand); }
.ws.go .i { color: var(--brand); }
.ws.go .i:last-child { width: 15px; height: 15px; margin-left: -2px; }
.weekbar { margin: 8px 0 10px; }
.days { gap: 10px; }
.day-head .add-meal {
  width: 38px; height: 38px; padding: 0; margin: 0; flex: none; display: grid; place-items: center; border-radius: 12px;
  border: 0; background: var(--brand-soft); color: var(--brand);
}
.day-head .add-meal .i { width: 22px; height: 22px; }
.day.free { padding-top: 8px; padding-bottom: 8px; }
.day.free .day-head { margin-bottom: 0; }
.day.free .meals { min-height: 0; }
.day.free .day-head .dot { height: 40px; }
.day.free .day-head .n { color: var(--muted); }
.day.today.free .day-head .add-meal { background: var(--grad); color: #fff; box-shadow: var(--shadow-brand); }
.past-days > summary {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r); background: var(--bg-2);
  color: var(--ink-2); font-weight: 750;
}
.past-days > summary .i { width: 20px; height: 20px; color: var(--muted); }
.past-days > summary small { color: var(--muted); font-weight: 600; margin-left: 4px; }
.past-days > .days { margin-top: 10px; }
.past-days[open] { margin-bottom: 0; }

/* Dictée d'une liste : micro ouvert, pastilles au fil de la voix */
.dict-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.dict-mic {
  position: relative; display: grid; place-items: center; flex: none; width: 64px; height: 64px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--bg-2); color: var(--muted); transition: background .2s, color .2s;
}
.dict-mic .i { width: 30px; height: 30px; }
.dict-mic .ripple { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
.dict-mic.on { background: var(--tomato); color: #fff; }
.dict-mic.on .ripple { animation: ripple 1.2s ease-out infinite; }
.dict-live { min-height: 1.5em; font-size: 1.08rem; font-weight: 700; color: var(--muted); font-style: italic; }
.dict-live.on { color: var(--ink); }

/* Stock : contenants entiers en plus du bocal */
.pack-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; box-shadow: inset 0 1px 0 var(--line); }
.pack-row .stepper b { min-width: 74px; text-align: center; }

/* Ajout d'ingrédients : jetons (ce que l'app a compris), capsule de confirmation */
.tok {
  display: inline-flex; align-items: center; gap: 8px; flex: none; max-width: 100%; padding: 4px 12px 4px 4px; border-radius: 999px;
  background: var(--card); box-shadow: var(--shadow-1); border: 1.5px solid transparent; cursor: default;
  animation-delay: var(--d, 0ms); transition: opacity .2s, border-color .2s;
}
.tok-ic {
  position: relative; display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: color-mix(in srgb, var(--c) 16%, var(--card)); color: var(--c);
}
.tok-ic > .i { width: 20px; height: 20px; }
.tok-t { display: grid; min-width: 0; line-height: 1.15; }
.tok-t b { font-weight: 800; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tok-t small { font-size: .72rem; font-weight: 650; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tok-badge {
  position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%;
  background: var(--brand); color: #fff; box-shadow: 0 0 0 2px var(--card);
}
.tok-badge .i { width: 11px; height: 11px; }
.tok.fixed { border-color: color-mix(in srgb, var(--brand) 40%, transparent); cursor: pointer; }
.tok.fixed small { color: var(--brand); }
.tok.unknown { background: transparent; box-shadow: none; border: 1.5px dashed color-mix(in srgb, var(--muted) 55%, transparent); }
.tok.unknown .tok-ic { background: var(--bg-2); color: var(--muted); }
.tok.ghost { box-shadow: none; border: 1.5px dashed color-mix(in srgb, var(--c) 45%, transparent); background: transparent; animation: tokwait 1.1s ease-in-out infinite; }
.tok.fresh { animation: tokin .45s var(--spring) both; animation-delay: var(--d, 0ms); }
.tok.fresh .tok-ic { animation: tokring .7s ease-out both; animation-delay: calc(var(--d, 0ms) + .1s); }
.tok.on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.tok-x { display: grid; place-items: center; width: 24px; height: 24px; margin: 0 -6px 0 2px; border: 0; border-radius: 50%; background: var(--bg-2); color: var(--muted); cursor: pointer; flex: none; }
.tok-x .i { width: 14px; height: 14px; }
@keyframes tokin { 0% { opacity: 0; transform: translateY(8px) scale(.5); } 60% { opacity: 1; transform: translateY(-2px) scale(1.07); } 100% { transform: none; } }
@keyframes tokring { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 60%, transparent); } to { box-shadow: 0 0 0 12px transparent; } }
@keyframes tokwait { 50% { opacity: .45; } }

/* Aperçu sous la barre d'ajout : défile de côté, ne pousse pas la liste plus que nécessaire */
.tok-strip {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -6px -16px 14px; padding: 4px 16px 6px;
  animation: fade .2s both;
}
.tok-strip::-webkit-scrollbar { display: none; }
.tok-strip .tok { max-width: 240px; }

/* Dictée : grands jetons, réglage en dessous */
.dict-toks { display: flex; flex-wrap: wrap; gap: 8px; min-height: 52px; max-height: 42vh; overflow-y: auto; padding: 4px 2px; }
.dict-toks .tok[data-tok] { cursor: pointer; }
.dict-toks .tok-ic { width: 40px; height: 40px; }
.dict-toks .tok-ic > .i { width: 24px; height: 24px; }
.dict-mic.speaking { transform: scale(1.06); }
.dict-mic.speaking .ripple { animation-duration: .6s; }
.dict-mic { transition: background .2s, color .2s, transform .2s var(--spring); }
.tok-edit { margin-top: 12px; padding: 12px; border-radius: 18px; background: var(--bg-2); animation: rise .25s var(--ease) both; }
.tok-edit > .row:first-child { justify-content: space-between; gap: 10px; }
.tok-edit .tok { box-shadow: none; min-width: 0; flex: 0 1 auto; }
.tok-edit .stepper { background: var(--card); }
.tok-edit .stepper b { min-width: 3ch; font-size: 1.05rem; }
.tok-edit-acts { margin-top: 10px; gap: 8px; flex-wrap: wrap; }
.tok-edit-acts .btn { flex: 1 1 auto; }

/* Envol des icônes vers la capsule */
.tok-fly {
  position: fixed; z-index: 60; display: grid; place-items: center; border-radius: 50%; pointer-events: none;
  background: color-mix(in srgb, var(--c) 18%, var(--card)); color: var(--c); box-shadow: var(--shadow-2);
}
.tok-fly > .i { width: 60%; height: 60%; }
.tok-fly .tok-badge { display: none; }

/* Capsule de confirmation : pile d'icônes, combien, lesquels, Voir / Annuler */
.toast.added { padding: 8px 8px 8px 10px; gap: 12px; border-radius: 22px; }
.toast.added > .cap-stack { flex: none; display: flex; padding-left: 2px; }
.cap-ic {
  position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; margin-left: -10px;
  background: var(--c); box-shadow: 0 0 0 2.5px var(--ink); animation: capin .5s var(--spring) both; animation-delay: var(--d, 0ms);
}
.cap-ic:first-child { margin-left: 0; }
.toast .cap-ic > .i { width: 20px; height: 20px; color: #fff; }
.cap-ic.unknown { background: #8a8a8a; }
.cap-ic.more { background: color-mix(in srgb, var(--bg) 22%, transparent); color: var(--bg); font-weight: 800; font-size: .8rem; }
.cap-more-one {
  position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  background: var(--brand-2); box-shadow: 0 0 0 2px var(--ink);
}
.toast .cap-more-one .i { width: 11px; height: 11px; color: #06140b; }
.toast.added > .cap-t { display: grid; line-height: 1.2; }
.cap-t b { font-weight: 800; }
.cap-t small { font-size: .78rem; font-weight: 600; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast-act.ghost { display: grid; place-items: center; padding: 6px 9px; margin-left: 0; background: transparent; color: var(--bg); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--bg) 30%, transparent); }
.toast .toast-act.ghost .i { color: var(--bg); width: 18px; height: 18px; }
@keyframes capin { 0% { opacity: 0; transform: translateY(16px) scale(.3); } 60% { opacity: 1; transform: translateY(-3px) scale(1.12); } 100% { transform: none; } }

/* Lignes qui viennent d'arriver : un éclat de la couleur de l'ingrédient */
.swipe-face.just-added { animation: rowflash 1.8s var(--ease); }
@keyframes rowflash {
  0%, 30% { background-color: color-mix(in srgb, var(--flash, var(--brand)) 16%, var(--card)); box-shadow: inset 4px 0 0 var(--flash, var(--brand)); }
}

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Fluidité : bocal plein sans vague (une animation permanente de moins par ligne) */
.ico.gauge.full::after { animation: none; display: none; }

/* Réglages : le foyer en tête, puis des lignes groupées (état actuel visible, détail en feuille) */
.set-home {
  position: relative; overflow: hidden; margin-top: 4px; padding: 16px 16px 14px; border-radius: var(--r);
  background: var(--grad); color: #fff; box-shadow: var(--shadow-brand);
}
.set-home::after { content: ""; position: absolute; right: -40px; top: -50px; width: 170px; height: 170px; border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none; }
.set-hname { display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.set-hname > .i { width: 22px; height: 22px; flex: none; opacity: .9; }
.set-hname input {
  flex: 1; min-width: 0; border: 0; border-radius: 10px; padding: 4px 6px; margin-left: -6px; background: transparent; color: inherit;
  font: inherit; font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; outline: none; transition: background .2s;
}
.set-hname input:focus { background: rgba(255, 255, 255, .16); }
.set-hname .pen { width: 16px; height: 16px; opacity: .6; flex: none; }
.set-code { display: flex; align-items: flex-end; gap: 12px; margin-top: 14px; position: relative; z-index: 1; }
.set-code .small { opacity: .8; font-weight: 600; }
.set-code .code { display: flex; gap: 4px; margin-top: 6px; }
.set-code .code span {
  display: grid; place-items: center; width: 30px; height: 38px; border-radius: 9px; background: rgba(255, 255, 255, .16);
  font-size: 1.2rem; font-weight: 800; font-variant-numeric: tabular-nums; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12);
}
.set-code .btn { flex: none; }
.set-members { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; position: relative; z-index: 1; }
.set-members .mem { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: .82rem; font-weight: 700; }
.set-members .mem i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: var(--brand); font-style: normal; font-size: .75rem; font-weight: 800; }

.set-group { overflow: hidden; }
.set-row { width: 100%; border: 0; text-align: left; font: inherit; color: inherit; min-height: 62px; }
.set-row .grow { display: grid; min-width: 0; gap: 1px; }
.set-row .label { font-weight: 700; }
.set-row .meta { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-row .chev { width: 20px; height: 20px; color: var(--muted); flex: none; transition: transform .25s var(--ease); }
.set-row:active { background: var(--bg-2); }
.set-group > * + *, .set-group > .set-fold + *, .set-group > * + .set-fold { box-shadow: inset 0 1px 0 var(--line); }
.set-select {
  flex: none; border: 0; border-radius: 10px; padding: 8px 28px 8px 12px; font: inherit; font-weight: 700; color: var(--brand);
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237a847e'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 6px center / 18px;
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
.set-fold > summary { list-style: none; }
.set-fold > summary::-webkit-details-marker { display: none; }
.set-fold[open] > summary .chev { transform: rotate(180deg); }
.set-fold[open] > summary { box-shadow: inset 0 -1px 0 var(--line); }
.set-hint { margin: 10px 16px 4px; }
.set-fold .orderlist { animation: fade .25s both; }
.set-fold .orderlist .item { background: transparent; }
.set-badge { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.set-badge .i { width: 13px; height: 13px; }
.set-badge.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.set-badge.ok { background: var(--brand-soft); color: var(--brand); }
.danger-t { color: var(--danger); }
.set-credits { margin-top: 22px; opacity: .8; }

/* Niveau du stock : --fill s'anime (démonstration du geste, une fois, sur la première jauge) */
@property --fill { syntax: '<number>'; inherits: true; initial-value: 1; }
.ico.gauge.demo { animation: leveldemo 1.8s var(--ease) .8s 2; }
@keyframes leveldemo { 40%, 60% { --fill: .3; } }

/* Stock : « Faire le point » — une barre de niveau par produit, glissée ou touchée */
.review-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--card); color: var(--brand); box-shadow: var(--shadow-1); font: inherit; font-size: .86rem; font-weight: 800;
}
.review-btn .i { width: 20px; height: 20px; }
.review-btn:active { transform: scale(.96); }
.reviewing .review-btn, .reviewing [data-add], .reviewing .tok-strip, .reviewing .soon-card { display: none; }
.reviewing [data-body] { padding-bottom: 90px; }
.lv-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px 12px; min-height: 70px; background: var(--card);
  touch-action: pan-y; user-select: none; -webkit-user-select: none; animation: fade .25s both;
}
.lv-row + .lv-row { box-shadow: inset 0 1px 0 var(--line); }
.lv-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.lv-top .label { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-val { flex: none; font-size: .84rem; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; transition: color .2s; }
.lv-row.changed .lv-val { color: var(--brand); }
.lv-row.empty .lv-val { color: var(--danger); }
.lv-row.empty .ico { filter: grayscale(1); opacity: .55; }
.lv-track {
  position: relative; height: 24px; margin-top: 8px; border-radius: 12px; overflow: hidden; cursor: ew-resize;
  background: var(--bg-2); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
}
.lv-fill {
  position: absolute; inset: 0 auto 0 0; width: calc(var(--f) * 100%); border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 45%, var(--card)), color-mix(in srgb, var(--c) 75%, var(--card)));
  transition: width .2s var(--ease);
}
/* Graduations : au quart, ou une par pièce */
.lv-track::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 calc(100% / var(--n) - 1.5px), color-mix(in srgb, var(--card) 85%, transparent) calc(100% / var(--n) - 1.5px) calc(100% / var(--n)));
}
.lv-row.dragging .lv-fill { transition: none; }
.lv-row.dragging .lv-track { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); }
.lv-row.guess .lv-fill { opacity: .4; }
.lv-row.changed { background: color-mix(in srgb, var(--brand-soft) 35%, var(--card)); }
.rv-txt { display: grid; line-height: 1.2; padding-left: 4px; }
.rv-txt small { font-size: .74rem; opacity: .7; font-weight: 600; }
.selbar .rv-done { flex: none; height: 46px; padding: 0 18px; border-radius: 16px; }

/* Fiche produit : compter sans aligner 11 icônes — cases jusqu'à 6, puis compteur ; « Une de plus », réassort */
.counter { display: flex; align-items: center; gap: 14px; }
.counter .qty-big b { font-size: 2.6rem; }
.cnt-btn {
  display: grid; place-items: center; flex: none; width: 60px; height: 60px; border: 0; border-radius: 50%; cursor: pointer;
  background: color-mix(in srgb, var(--c) 14%, var(--card)); color: var(--c); box-shadow: var(--shadow-1); transition: transform .12s;
}
.cnt-btn .i { width: 28px; height: 28px; }
.cnt-btn:active { transform: scale(.88); }
.cnt-bar { height: 8px; margin-top: 14px; border-radius: 4px; background: var(--bg-2); overflow: hidden; }
.cnt-bar i { display: block; height: 100%; border-radius: inherit; background: color-mix(in srgb, var(--c) 65%, var(--card)); transition: width .25s var(--ease); }
.chip.restock { background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.chip.restock .i { width: 18px; height: 18px; }

/* « Faire le point » : « + » au bout de chaque barre */
.lv-line { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.lv-line .lv-track { flex: 1; margin-top: 0; }
.lv-plus {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--brand-soft); color: var(--brand); transition: transform .12s;
}
.lv-plus .i { width: 20px; height: 20px; }
.lv-plus:active { transform: scale(.85); }
.qty-card .pieces { grid-template-columns: repeat(6, 1fr); gap: 8px; }
.qty-card .piece { aspect-ratio: 1; min-height: 0; }
.qty-card .quick.center { justify-content: center; flex-wrap: wrap; margin-top: 10px; }

/* « Vider » : tout en bas de la liste, discret (confirmation rouge, puis « Annuler ») */
.clear-zone { display: flex; justify-content: center; margin: 28px 0 8px; }
.btn-clear {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 0; border-radius: 12px; cursor: pointer;
  background: transparent; color: var(--muted); font: inherit; font-size: .84rem; font-weight: 700; transition: color .2s, background .2s;
}
.btn-clear .i { width: 18px; height: 18px; }
.btn-clear:hover, .btn-clear:active { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.reviewing .clear-zone { display: none; }
/* Menu : à 1 personne, « − » devient une corbeille (0 = retiré du menu) */
.stepper button.rm { color: var(--danger); display: inline-grid; place-items: center; }
.stepper button.rm .i { width: 17px; height: 17px; }

/* Passe de design : en-têtes sans surtitre décoratif, Menu à plat, petits accrocs */
.top { align-items: center; }
.top .sub:empty { display: none; }
.ring > span { display: flex; align-items: center; justify-content: center; gap: 1px; font-size: .72rem; }
.ring > span b { font-size: 1.05rem; line-height: 1; }
.qty.editable { border-bottom: 0; }

/* Menu : un repas = une ligne de la carte du jour (plus de carte dans la carte) */
.tonight { margin-bottom: 12px; }
.week-stats { margin: 0 0 14px; }
.weekbar { margin: 0 0 12px; }
.day { padding: 12px 14px; }
.day-head { margin-bottom: 4px; }
.day .meals { gap: 0; }
.day .meal { background: var(--card); border-radius: 0; padding: 10px 0 10px 0; gap: 10px; }
.day .meal-sw { border-radius: 12px; }
.day .meal-sw + .meal-sw .meal { box-shadow: inset 0 1px 0 var(--line); }
.day.drop-over .meal { background: transparent; }
.meal .grip { width: 16px; margin-left: -4px; }
.meal .th { width: 52px; height: 52px; border-radius: 13px; }
.meal-line { gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.meal-line .slot { margin: 0 0 0 2px; }

/* Découvrir : les cartes du dessous ne laissent voir que leur bord ; plus d'air avant les boutons */
.deck.big .deck-card[aria-hidden="true"] .dc-b, .deck.big .deck-card[aria-hidden="true"] .dc-reason { visibility: hidden; }
.deck.big { margin-bottom: 40px; }

/* Ta recette : l'essentiel en vue, le reste replié */
.serv-step { display: flex; align-items: center; gap: 8px; }
.serv-step .input { width: 64px; text-align: center; font-weight: 800; font-size: 1.1rem; padding-left: 4px; padding-right: 4px; -moz-appearance: textfield; }
.serv-step .input::-webkit-outer-spin-button, .serv-step .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.serv-step .icon-btn { flex: none; }
.grid3 .serv-step .input { width: 100%; }
.grid3 .serv-step .icon-btn { display: none; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.btn.mic-sm { padding: 6px 12px; min-height: 0; font-size: .82rem; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.btn.mic-sm .i { width: 16px; height: 16px; }
.more-fields { border-radius: var(--r); background: var(--card); box-shadow: var(--shadow-1); }
.more-fields > summary {
  list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; font-weight: 700;
}
.more-fields > summary::-webkit-details-marker { display: none; }
.more-fields > summary > .i:first-child { width: 22px; height: 22px; color: var(--brand); }
.more-fields > summary small { color: var(--muted); font-weight: 600; }
.more-fields > summary .chev { width: 20px; height: 20px; color: var(--muted); transition: transform .25s var(--ease); }
.more-fields[open] > summary .chev { transform: rotate(180deg); }
.more-fields > .stack { padding: 0 16px 16px; animation: fade .25s both; }
div.field > span, .field-row > span { display: block; font-size: .82rem; font-weight: 700; color: var(--muted); margin: 0 0 6px 4px; }
.field-row { margin-bottom: 6px; }
.field-row > span { margin: 0 0 0 4px; }
/* Fiche sans photo (recette saisie à la main) : un bandeau court, pas un grand aplat */
.hero.nophoto { height: auto; min-height: 0; max-height: none; padding-top: calc(168px + var(--safe-t)); }

/* Ta recette : la liste d'ingrédients se remplit comme les courses */
.ing-add { margin-bottom: 10px; }
.ing-list { overflow: hidden; }
.ing-row { min-height: 54px; gap: 10px; padding: 8px 6px 8px 12px; }
.ing-row .q { min-width: 52px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ing-row .nm { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ing-row .unk { flex: none; font-size: .7rem; font-weight: 800; color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); padding: 2px 8px; border-radius: 999px; }
.ing-row .icon-btn { flex: none; width: 36px; height: 36px; color: var(--muted); }
.ing-row.fresh { animation: tokin .45s var(--spring) both; animation-delay: var(--d, 0ms); }
.ing-row .ing-edit { flex: 1; min-width: 0; padding: 8px 10px; }
.ing-empty { display: flex; align-items: center; gap: 10px; padding: 16px; color: var(--muted); font-size: .88rem; }
.ing-empty .i { width: 24px; height: 24px; flex: none; opacity: .7; }
