/* Panier Malin — « L'étiquette » : vert sapin, moutarde, tomate. Les prix sont des sceaux, le total est un « Total net ». */
:root {
  --sapin: #12382b; --sapin-2: #1b4a39; --sapin-3: #2a6450; --sapin-tint: #e2ece5; --sapin-tint-2: #d1e0d6;
  --ground: #eef2ec; --surface: #fff; --line: #d3dcd2; --line-2: #b4c2b6;
  --ink: #13201a; --ink-2: #48584f; --ink-3: #64736a;
  --on-sapin: #f3f7f2; --on-sapin-2: #b9d2c4;
  --moutarde: #f2b90c; --moutarde-ink: #2a2200; --moutarde-soft: #fff4cc; --moutarde-deep: #7d5c00;
  --tomate: #c2351e; --tomate-soft: #fbe6e0;
  --bleu: #24557f; --bleu-soft: #e1ecf5;
  --r-card: 14px; --r-ctl: 10px;
  --shadow: 0 1px 2px rgba(18, 56, 43, .06), 0 8px 20px -10px rgba(18, 56, 43, .22);
  --font: "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --nav-h: 64px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px }
body { margin: 0; background: var(--ground); color: var(--ink); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; caret-color: var(--sapin) }
::selection { background: var(--moutarde); color: var(--moutarde-ink) }
h1, h2, h3, h4, p { margin: 0 }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; color: var(--sapin); text-wrap: balance }
h2 { font-size: 1.2rem; line-height: 1.25; letter-spacing: -.01em; font-weight: 800; color: var(--sapin) }
h3 { font-size: 1.05rem; line-height: 1.3; font-weight: 700 }
a { color: var(--sapin-2); text-underline-offset: 3px; text-decoration-thickness: 1px }
a:hover { color: var(--sapin) }
button, input, select, textarea { font: inherit; color: inherit }
button { cursor: pointer }
[hidden] { display: none !important }
svg.ic, .ic svg { width: 20px; height: 20px; flex: none }
:focus-visible { outline: 2px solid var(--sapin); outline-offset: 2px; border-radius: 6px }
.shell :focus-visible, .pickbar :focus-visible { outline-color: var(--moutarde) }
.num, .seal, .p, b.amt { font-variant-numeric: tabular-nums }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%) }

/* ---------- Coquille : barre du haut, total net, navigation ---------- */
.shell { display: contents }
.top { position: sticky; top: 0; z-index: 30; background: var(--sapin); color: var(--on-sapin); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)) }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; white-space: nowrap }
.brand svg { width: 30px; height: 30px; flex: none }
.region { display: flex; align-items: center; gap: 6px; min-width: 0; background: var(--sapin-2); border: 1px solid var(--sapin-3); border-radius: 999px; padding: 0 4px 0 10px; height: 40px }
.region svg { width: 16px; height: 16px; color: var(--moutarde); flex: none }
.region select { appearance: none; background: transparent; border: 0; color: var(--on-sapin); font-weight: 600; font-size: .9rem; height: 38px; padding: 0 22px 0 2px; min-width: 0; max-width: 42vw; text-overflow: ellipsis; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23f2b90c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 6px center; background-size: 11px }
.region select option { color: var(--ink); background: #fff }
.region.attention { border-color: var(--moutarde); box-shadow: 0 0 0 3px rgba(242, 185, 12, .3) }

.netbar { background: var(--sapin); color: var(--on-sapin); padding: 4px 16px 16px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px 16px }
.net-main { display: grid; gap: 0 }
.net-label { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--on-sapin-2) }
.net-amt { font-size: clamp(2.1rem, 1.6rem + 3vw, 2.7rem); line-height: 1.05; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums }
.net-save { justify-self: end; display: grid; justify-items: center; background: var(--moutarde); color: var(--moutarde-ink); border-radius: 12px; padding: 6px 12px 7px; line-height: 1.1; transform: rotate(-2deg) }
.net-save b { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums }
.net-save span { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase }
.net-facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .85rem; color: var(--on-sapin-2); border-top: 1px solid var(--sapin-3); padding-top: 8px; margin-top: 4px }
.net-facts b { color: var(--on-sapin); font-variant-numeric: tabular-nums }
.netbar.loading .net-amt, .netbar.loading .net-save b { opacity: .45 }

.nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr) }
.tab { position: relative; border: 0; background: none; display: grid; justify-items: center; align-content: center; gap: 2px; color: var(--ink-3); font-size: .72rem; font-weight: 600; padding: 4px 2px; min-width: 0 }
.tab svg { width: 24px; height: 24px }
.tab::before { content: ""; position: absolute; top: -1px; left: 22%; right: 22%; height: 4px; border-radius: 0 0 4px 4px; background: var(--moutarde); transform: scaleX(0); transition: transform .35s var(--ease) }
.tab[aria-selected="true"] { color: var(--sapin); font-weight: 800 }
.tab[aria-selected="true"]::before { transform: none }
.tab .n { position: absolute; top: 6px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--sapin); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums }
.tab .n:empty { display: none }

main { padding: 20px 16px calc(var(--nav-h) + 96px + env(safe-area-inset-bottom)); max-width: 1120px; margin: 0 auto }
.view { display: grid; gap: 16px }
.view, .panel, .week, .list, .prefs-in, .pref-group, .meal .body, .meal .head { grid-template-columns: minmax(0, 1fr) }
.view.enter { animation: view-in .4s var(--ease) }
@keyframes view-in { from { opacity: .4; transform: translateY(8px) } }
.view-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px }

/* ---------- Commandes ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--surface); color: var(--sapin); font-weight: 700; font-size: .95rem; text-decoration: none; transition: background .15s, border-color .15s, transform .15s var(--ease) }
.btn:hover { border-color: var(--sapin); background: var(--sapin-tint) }
.btn:active { transform: scale(.97) }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none }
.btn svg { width: 18px; height: 18px; flex: none }
.btn.primary { background: var(--sapin); border-color: var(--sapin); color: #fff }
.btn.primary:hover { background: var(--sapin-2) }
.btn.accent { background: var(--moutarde); border-color: var(--moutarde); color: var(--moutarde-ink) }
.btn.accent:hover { background: #ffc81f }
.btn.big { min-height: 52px; padding: 0 22px; font-size: 1.02rem }
.btn.link { min-height: 44px; border: 0; background: none; padding: 0 6px; text-decoration: underline; text-underline-offset: 3px; font-weight: 600 }
.btn.link:hover { background: none; color: var(--sapin-3) }
.btn.danger { color: var(--tomate); border-color: #e3b4aa }
.btn.danger:hover { background: var(--tomate-soft); border-color: var(--tomate) }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 0; transition: background .15s, color .15s, border-color .15s }
.icon-btn:hover { border-color: var(--sapin); color: var(--sapin); background: var(--sapin-tint) }
.icon-btn svg { width: 20px; height: 20px }
.icon-btn[aria-pressed="true"] { background: var(--moutarde); border-color: var(--moutarde); color: var(--moutarde-ink) }
.icon-btn[aria-pressed="true"] svg { fill: currentColor }
.icon-btn.spin svg { animation: spin .8s linear infinite }
@keyframes spin { to { transform: rotate(-360deg) } }

.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px }
.row.spread { justify-content: space-between }
.center { display: flex; justify-content: center }
.hint { color: var(--ink-2); font-size: .92rem; max-width: 70ch }
.hint.small { font-size: .84rem }
.status { font-size: .92rem; color: var(--ink-2); min-height: 0 }
.status:empty { display: none }
.status.ok { color: var(--sapin-2); font-weight: 600 }
.status.err { color: var(--tomate); font-weight: 600 }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; display: grid; gap: 14px }
.lab { display: block; font-size: .8rem; font-weight: 700; color: var(--ink-2); margin-bottom: 6px }
.lab small { font-weight: 500; color: var(--ink-3) }
input[type="text"], input[type="number"], input[type="search"], select, textarea { width: 100%; min-height: 46px; padding: 0 12px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink) }
textarea { padding: 10px 12px; min-height: 120px; resize: vertical; line-height: 1.45 }
input::placeholder, textarea::placeholder { color: var(--ink-3) }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--sapin); outline-offset: 0; border-color: var(--sapin); border-radius: var(--r-ctl) }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2312382b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px }
.search { position: relative; flex: 1 1 220px; min-width: 0 }
.search svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none }
.search input { padding-left: 40px; border-radius: 999px }
.search input:focus-visible { border-radius: 999px }

.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--sapin-tint); border-radius: 12px; padding: 4px; gap: 4px }
.seg button { border: 0; background: none; min-height: 40px; padding: 0 14px; border-radius: 9px; font-weight: 700; font-size: .92rem; color: var(--sapin-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--sapin); box-shadow: 0 1px 2px rgba(18, 56, 43, .18) }
.seg .n { font-size: .75rem; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums }
.seg .n:empty { display: none }

.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 6px; margin: 0 -16px; scrollbar-width: none }
.chip-row::-webkit-scrollbar { display: none }
.chips { display: flex; flex-wrap: wrap; gap: 8px }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; font-size: .9rem; white-space: nowrap; transition: background .15s, border-color .15s, color .15s }
.chip:hover { border-color: var(--sapin) }
.chip svg { width: 17px; height: 17px; color: var(--ink-3) }
.chip .c { font-size: .76rem; color: var(--ink-3); font-variant-numeric: tabular-nums }
.chip[aria-pressed="true"] { background: var(--sapin); border-color: var(--sapin); color: #fff }
.chip[aria-pressed="true"] .c, .chip[aria-pressed="true"] svg { color: var(--on-sapin-2) }
.chip.nope { background: var(--tomate-soft); border-color: #e3b4aa; color: #7c1f10 }
.chip.wish { background: var(--moutarde-soft); border-color: #e6cf7a; color: var(--moutarde-ink) }
.chip.wish.in { background: var(--moutarde); border-color: var(--moutarde) }
.chip.sugg { border-style: dashed; color: var(--ink-2) }
.chip.x svg { width: 14px; height: 14px; color: currentColor; opacity: .7 }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--surface); overflow: hidden }
.stepper button { width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; color: var(--sapin) }
.stepper button:hover { background: var(--sapin-tint) }
.stepper button:disabled { color: var(--line-2); background: none; cursor: not-allowed }
.stepper button svg { width: 18px; height: 18px }
.stepper span, .stepper output { min-width: 86px; text-align: center; font-weight: 700; font-size: .92rem; font-variant-numeric: tabular-nums; padding: 0 4px }
.stepper .bump { animation: bump .35s var(--ease) }
@keyframes bump { 40% { transform: scale(1.15) } }

/* ---------- Rabais ---------- */
.flyer-note { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px }
.flyer-note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--sapin-3) }
.flyer-note b { color: var(--ink) }
.flyer-note.expired { background: var(--tomate-soft); border-color: #e3b4aa; color: #6d1c0e }
.add-form { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.add-form .wide { grid-column: 1 / -1 }
.pick-hint { font-size: .88rem; color: var(--ink-2) }
.pick-hint b { color: var(--ink) }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: baseline }
.sw-pick { background: var(--sapin) } .sw-list { background: var(--bleu) }

.deals { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; align-items: start }
.deal { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; display: grid; cursor: pointer; transition: border-color .15s, box-shadow .25s var(--ease), transform .25s var(--ease) }
.deal:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-2px) }
.deal .band { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 12px; background: var(--sapin-tint); color: var(--sapin); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; transition: background .2s, color .2s }
.deal .band svg { width: 18px; height: 18px; opacity: .75 }
.deal .mid { padding: 10px 12px 2px; display: grid; gap: 6px; align-content: start; min-height: 74px }
.deal .name { font-weight: 600; font-size: .95rem; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden }
.deal .foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding: 8px 12px 12px }
.deal .prices { display: grid; gap: 2px; justify-items: start }
.seal { display: inline-flex; align-items: flex-start; background: var(--moutarde); color: var(--moutarde-ink); border-radius: 10px; padding: 3px 9px 4px; font-weight: 800; font-size: 1.55rem; line-height: 1.1; letter-spacing: -.03em }
.seal .cts { font-size: .52em; margin-top: .22em; letter-spacing: 0 }
.seal .cur { font-size: .52em; margin-top: .22em; margin-left: 2px }
.seal small { align-self: flex-end; font-size: .46em; font-weight: 700; margin-left: 4px; margin-bottom: .3em; letter-spacing: 0 }
.was { color: var(--ink-3); font-size: .8rem; text-decoration: line-through; font-variant-numeric: tabular-nums }
.stamp { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; letter-spacing: -.02em; color: var(--tomate); border: 2px solid currentColor; outline: 1px solid currentColor; outline-offset: 2px; transform: rotate(-8deg); margin: 0 3px 3px 0; font-variant-numeric: tabular-nums }
.stamp.hot { background: var(--tomate); color: #fff; border-color: var(--tomate); outline-color: var(--tomate) }
.stamp.mild { color: var(--ink-2) }
.used { justify-self: start; display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--sapin-tint); color: var(--sapin) }
.used svg { width: 13px; height: 13px }
.used.lst { background: var(--bleu-soft); color: var(--bleu) }
.used.promo { background: var(--moutarde-soft); color: var(--moutarde-deep); font-weight: 600 }
.deal.picked { border-color: var(--sapin); box-shadow: 0 0 0 1px var(--sapin) }
.deal.picked .band { background: var(--sapin); color: #fff }
.deal.listed { border-color: var(--bleu); box-shadow: 0 0 0 1px var(--bleu) }
.deal.listed .band { background: var(--bleu); color: #fff }
.deal.picked .used, .deal.listed .used:not(.promo) { animation: stamp-in .45s var(--ease) }
@keyframes stamp-in { from { transform: scale(1.5) rotate(-6deg); opacity: 0 } }
.deal .acts { display: none; gap: 6px; padding: 0 10px 10px }
.deal.open { box-shadow: var(--shadow); border-color: var(--sapin) }
.deal.open .acts { display: grid }
.acts button { min-height: 44px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--surface); font-weight: 700; font-size: .86rem; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px }
.acts button svg { width: 16px; height: 16px }
.acts .a-menu { background: var(--sapin); border-color: var(--sapin); color: #fff }
.acts .a-list { background: var(--bleu); border-color: var(--bleu); color: #fff }
.acts .a-none { color: var(--ink-2); font-weight: 600 }
.acts .a-del { color: var(--tomate); border-color: transparent; min-height: 36px }
.skeleton { border-radius: var(--r-card); background: linear-gradient(100deg, var(--sapin-tint) 30%, #f1f6f2 50%, var(--sapin-tint) 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; min-height: 190px }
@keyframes shimmer { to { background-position: -200% 0 } }
.empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 12px; text-align: center; padding: 36px 16px; color: var(--ink-2); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-card) }
.empty svg { width: 36px; height: 36px; color: var(--sapin-3) }

.pickbar { position: fixed; z-index: 35; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom)); background: var(--sapin); color: var(--on-sapin); border-radius: 16px; padding: 10px 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; box-shadow: 0 12px 30px -8px rgba(18, 56, 43, .55); animation: bar-in .4s var(--ease) }
@keyframes bar-in { from { transform: translateY(120%) } }
.pickbar .count { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--on-sapin-2); min-width: 0 }
.pickbar .count b { display: grid; place-items: center; min-width: 34px; height: 34px; border-radius: 50%; background: var(--moutarde); color: var(--moutarde-ink); font-size: 1rem; font-variant-numeric: tabular-nums }
.pickbar .btn { min-height: 44px }
.pickbar .btn.link { color: var(--on-sapin-2) }
.pickbar .btn.ghost { background: transparent; border-color: var(--sapin-3); color: var(--on-sapin) }

/* ---------- Menu ---------- */
.setup-row { display: flex; flex-wrap: wrap; gap: 16px 28px }
.picked-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .86rem }
.picked-chips:empty { display: none }
.picked-chips .lbl { color: var(--ink-2); font-weight: 600 }
.picked-chips button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; border: 1px solid var(--sapin); background: var(--sapin-tint); color: var(--sapin); border-radius: 999px; padding: 0 10px; font-weight: 600; font-size: .84rem }
.picked-chips button svg { width: 14px; height: 14px }
details.prefs { border: 1px solid var(--line); border-radius: 12px; background: #f8faf7 }
details.prefs > summary, details.how > summary, .meal details > summary, .rec details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--sapin) }
summary::-webkit-details-marker { display: none }
details > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: auto; transition: transform .25s var(--ease) }
details[open] > summary::after { transform: rotate(225deg) translate(-2px, -1px) }
details.prefs > summary { padding: 14px; min-height: 48px }
.prefs .n { background: var(--sapin); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: .75rem; padding: 0 6px }
.prefs .n:empty { display: none }
.prefs-in { display: grid; gap: 20px; padding: 2px 14px 16px }
.pref-group { display: grid; gap: 8px }
.pref-group > h3 { font-size: .95rem }
.pref-group > h3 small { font-weight: 500; color: var(--ink-2); font-size: .84rem; margin-left: 6px }
.caution { display: flex; gap: 10px; font-size: .84rem; color: #5c4400; background: var(--moutarde-soft); border-radius: 10px; padding: 10px 12px }
.caution svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--moutarde-deep) }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap }
.inline-form input { flex: 1 1 200px; max-width: 360px }

.recap { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; font-size: .92rem; color: var(--ink-2) }
.recap:empty { display: none }
.recap b { color: var(--ink); font-variant-numeric: tabular-nums }
.recap .lead { font-size: 1.05rem; color: var(--ink) }
.recap .save { background: var(--moutarde); color: var(--moutarde-ink); border-radius: 8px; padding: 2px 10px; font-weight: 600 }
.recap .save b { color: inherit }

.week { display: grid; gap: 12px }
.meal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); display: grid; grid-template-columns: 76px minmax(0, 1fr); overflow: hidden }
.meal .side { background: var(--sapin-tint); color: var(--sapin); display: grid; align-content: start; justify-items: center; gap: 8px; padding: 14px 6px }
.meal .day { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase }
.meal .side svg { width: 30px; height: 30px }
.meal .body { padding: 14px; display: grid; gap: 10px; min-width: 0 }
.meal .head { display: grid; gap: 10px }
.meal h3 { text-wrap: balance }
.meal .time { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--ink-2); font-size: .88rem; margin-top: 4px }
.meal .time .t { display: inline-flex; align-items: center; gap: 4px }
.meal .time svg { width: 15px; height: 15px }
.day-pick { width: auto; max-width: 100%; text-overflow: ellipsis; min-height: 36px; padding: 0 30px 0 10px; font-size: .86rem; font-weight: 600; border-radius: 8px; background-position: right 10px center }
.meal .tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px }
.wish-tag { display: inline-flex; align-items: center; margin-left: 8px; font-size: .74rem; font-weight: 700; background: var(--moutarde); color: var(--moutarde-ink); border-radius: 6px; padding: 2px 8px; vertical-align: middle }
.sale-chips { display: flex; flex-wrap: wrap; gap: 6px }
.sale-chips span { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; background: var(--moutarde-soft); color: var(--moutarde-ink); border-radius: 8px; padding: 4px 8px; max-width: 100% }
.sale-chips em { font-style: normal; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.sale-chips small { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--moutarde-deep); white-space: nowrap }
.sale-chips .pickd { background: var(--sapin-tint); color: var(--sapin) }
.sale-chips .pickd small { color: var(--sapin-3) }
.nope-warn { font-size: .86rem; color: #7c1f10; background: var(--tomate-soft); border-radius: 8px; padding: 8px 10px }
.macros { display: grid; gap: 6px }
.mrow { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .82rem; color: var(--ink-2); align-items: center }
.mrow b { color: var(--ink); font-variant-numeric: tabular-nums }
.mrow .kcal b { font-size: 1rem }
.mrow .per { color: var(--ink-3) }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px }
.dot.p, .mbar .p { background: var(--tomate) } .dot.g, .mbar .g { background: var(--moutarde) } .dot.l, .mbar .l { background: var(--bleu) }
.mbar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--sapin-tint); gap: 2px }
.mbar i { display: block }
.meal details > summary, .rec details > summary { min-height: 44px; font-size: .92rem }
.meal details .inner, .rec details .inner { display: grid; gap: 10px; padding-bottom: 4px; font-size: .94rem }
.inner ul, .inner ol { margin: 0; padding-left: 20px; display: grid; gap: 4px }
.inner ul { list-style: none; padding-left: 0 }
.inner ul li { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--sapin-tint) }
.inner ul li .q { color: var(--ink-2); font-variant-numeric: tabular-nums }
.inner mark { background: var(--moutarde-soft); color: inherit; padding: 0 4px; border-radius: 4px; font-weight: 600 }
.inner ol li { padding-left: 4px }
.inner ol li::marker { font-weight: 800; color: var(--sapin-3) }
.meal.free { grid-template-columns: 76px minmax(0, 1fr); background: transparent; border-style: dashed }
.meal.free .side { background: transparent; color: var(--ink-3) }
.meal.free .body { align-items: center; color: var(--ink-2); font-size: .92rem; grid-auto-flow: row }
.meal.swapping { opacity: .6 }
.tip { display: flex; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: .92rem; color: var(--ink-2) }
.tip svg { width: 20px; height: 20px; flex: none; color: var(--moutarde-deep) }
.next { display: flex; justify-content: flex-end }

/* ---------- Liste ---------- */
.total-box { background: var(--sapin); border-color: var(--sapin); color: var(--on-sapin) }
.total-main { display: grid; gap: 10px }
.total-main > span { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--on-sapin-2) }
.total-main b { font-size: 2.3rem; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums }
.total-main small { color: var(--on-sapin-2); font-size: .88rem }
.save-line { justify-self: start; margin-top: 6px; font-style: normal; font-weight: 700; font-size: .88rem; background: var(--moutarde); color: var(--moutarde-ink); border-radius: 8px; padding: 3px 10px }
.total-stores { display: flex; flex-wrap: wrap; gap: 6px }
.total-stores span { font-size: .84rem; background: var(--sapin-2); border-radius: 8px; padding: 4px 10px; color: var(--on-sapin-2) }
.total-stores b { color: var(--on-sapin); font-variant-numeric: tabular-nums; margin-left: 4px }
.total-box details.how > summary { color: var(--on-sapin); font-size: .88rem; font-weight: 600; min-height: 36px }
.total-box .hint { color: var(--on-sapin-2); margin-top: 6px }
.add-list { gap: 8px }
.suggest { display: grid; gap: 4px }
.suggest:empty { display: none }
.sug { display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; gap: 10px; text-align: left; min-height: 52px; padding: 6px 8px; border-radius: 10px; border: 1px solid transparent; background: none }
.sug:hover, .sug:focus-visible, .sug.first { background: var(--sapin-tint) }
.sug .e { display: grid; place-items: center; color: var(--sapin-3) }
.sug .e svg { width: 22px; height: 22px }
.sug small { display: block; color: var(--ink-2); font-size: .82rem }
.sug .on-sale { color: var(--moutarde-deep); font-weight: 700 }
.sug .plus { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--sapin); color: #fff }
.sug .plus svg { width: 16px; height: 16px }
.list-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px }
.list-tools select { width: auto; flex: 0 1 220px }
.progress-row { flex: 1 1 220px; display: grid; gap: 6px; font-size: .86rem; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums }
.progress { height: 8px; border-radius: 4px; background: var(--sapin-tint-2); overflow: hidden }
.progress i { display: block; height: 100%; width: 0; background: var(--sapin); border-radius: 4px; transition: width .5s var(--ease) }
.progress-row.full { color: var(--sapin) }
.progress-row.full .progress i { background: var(--moutarde) }
.list { display: grid; gap: 14px }
.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden }
.group > h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 11px 14px; background: var(--sapin); color: #fff; font-size: 1rem }
.group > h3 span:last-child { font-size: .88rem; font-weight: 600; color: var(--on-sapin-2); font-variant-numeric: tabular-nums }
.group.pantry > h3 { background: var(--sapin-tint); color: var(--sapin) }
.group.pantry > h3 span:last-child { color: var(--ink-2) }
.aisle { display: flex; align-items: center; gap: 8px; padding: 10px 14px 6px; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--sapin-3) }
.aisle svg { width: 16px; height: 16px }
.item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 14px; border-top: 1px solid var(--sapin-tint); cursor: pointer }
.aisle + .item { border-top: 0 }
.item input[type="checkbox"] { appearance: none; width: 26px; height: 26px; margin: 1px 0 0; border: 2px solid var(--line-2); border-radius: 8px; background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: background .15s, border-color .15s }
.item input[type="checkbox"]::after { content: ""; width: 12px; height: 7px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .25s var(--ease) }
.item input:checked { background: var(--sapin); border-color: var(--sapin) }
.item input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1) }
.item .txt { display: grid; gap: 3px; min-width: 0 }
.item .t { font-weight: 600 }
.item .q { font-size: .86rem; color: var(--ink-2) }
.item .q b { color: var(--ink) }
.item .dl { display: inline-flex; align-items: center; gap: 5px; color: var(--moutarde-deep); font-weight: 600 }
.item .dl svg { width: 14px; height: 14px; flex: none }
.item .xtag { font-size: .7rem; font-weight: 700; background: var(--bleu-soft); color: var(--bleu); border-radius: 5px; padding: 1px 6px; margin-left: 4px }
.item .meta { display: grid; gap: 6px; justify-items: start; margin-top: 2px }
.store-pick { width: auto; max-width: 100%; min-height: 36px; font-size: .84rem; padding: 0 30px 0 10px; border-radius: 8px; background-position: right 10px center }
.item .p { text-align: right; font-weight: 700; white-space: nowrap; display: grid; justify-items: end; gap: 2px }
.item .p small { font-weight: 500; font-size: .74rem; color: var(--ink-3); white-space: normal; max-width: 130px }
.item .p.est { color: var(--ink-2) }
.item .rm { min-height: 32px; font-size: .8rem; color: var(--ink-2); padding: 0 }
.item.done .t, .item.done .q { text-decoration: line-through; color: var(--ink-3) }
.item.done .q b { color: var(--ink-3) }
.item.done { background: #f7faf6 }
.removed-box { display: grid; gap: 8px; padding: 14px; border: 1px dashed var(--line-2); border-radius: var(--r-card) }
.removed-box .lab { margin: 0 }

/* ---------- Recettes ---------- */
.rec-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: start }
.rec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px 14px; display: grid; gap: 8px }
.rec .r-top { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start }
.rec .k { width: 40px; height: 40px; border-radius: 10px; background: var(--sapin-tint); color: var(--sapin); display: grid; place-items: center }
.rec .k svg { width: 24px; height: 24px }
.rec h3 { font-size: 1rem; text-wrap: balance }
.rec .facts { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--ink-2); font-size: .82rem; margin-top: 2px; font-variant-numeric: tabular-nums }
.rec .tags { display: flex; flex-wrap: wrap; gap: 4px }
.tagd { font-size: .7rem; font-weight: 700; border-radius: 5px; padding: 2px 7px; background: var(--sapin-tint); color: var(--sapin-2) }
.tagd.sale { background: var(--moutarde); color: var(--moutarde-ink) }
.tagd.in { background: var(--sapin); color: #fff }
.rec .r-acts { display: flex; gap: 8px; align-items: center }
.rec .r-acts .btn { flex: 1; min-height: 44px }
.meal.saved-card .tools select { min-height: 44px }
.in-menu { color: var(--sapin); font-weight: 700 }

/* ---------- Plus ---------- */
.links { gap: 0; padding: 4px 16px }
.links a, .links button { display: flex; align-items: center; gap: 12px; min-height: 54px; border: 0; border-bottom: 1px solid var(--sapin-tint); background: none; text-decoration: none; color: var(--ink); font-weight: 600; text-align: left; padding: 0; width: 100% }
.links > :last-child { border-bottom: 0 }
.links svg { width: 20px; height: 20px; color: var(--sapin-3); flex: none }
.links .go { margin-left: auto; width: 16px; height: 16px; color: var(--ink-3) }
.notices { gap: 12px }
.notices p { font-size: .92rem; color: var(--ink-2); max-width: 72ch }
.notices p b { color: var(--ink) }
.about { font-size: .84rem; color: var(--ink-3) }

/* ---------- Fenêtres ---------- */
dialog { border: 0; border-radius: 20px; padding: 0; width: min(92vw, 460px); color: var(--ink); background: var(--surface); box-shadow: 0 30px 80px -20px rgba(18, 56, 43, .6) }
dialog::backdrop { background: rgba(18, 56, 43, .62) }
dialog[open] { animation: dlg-in .4s var(--ease) }
@keyframes dlg-in { from { opacity: 0; transform: translateY(16px) scale(.98) } }
.dlg-head { background: var(--sapin); color: var(--on-sapin); padding: 22px 22px 18px; display: grid; gap: 6px }
.dlg-head h2 { color: inherit; font-size: 1.45rem; letter-spacing: -.02em }
.dlg-head p { color: var(--on-sapin-2); font-size: .95rem }
.dlg-body { padding: 18px 22px 22px; display: grid; gap: 14px }
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: s }
.steps li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; font-size: .95rem }
.steps li::before { counter-increment: s; content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--moutarde); color: var(--moutarde-ink); font-weight: 800; display: grid; place-items: center; font-size: .9rem }
.legal-line { font-size: .82rem; color: var(--ink-2) }

/* ---------- Grand écran : la barre devient un rail ---------- */
@media (min-width: 980px) {
  body { padding-left: 264px }
  .shell { display: flex; flex-direction: column; position: fixed; z-index: 30; left: 0; top: 0; bottom: 0; width: 264px; background: var(--sapin); padding: 22px 16px 18px; gap: 22px; overflow-y: auto }
  .top { position: static; flex-direction: column; align-items: stretch; padding: 0; gap: 16px }
  .brand { font-size: 1.3rem }
  .region { height: 44px }
  .region select { max-width: none; flex: 1; height: 42px }
  .nav { position: static; order: 2; height: auto; background: none; border: 0; display: grid; grid-template-columns: 1fr; gap: 4px; padding: 0 }
  .tab { grid-template-columns: 24px 1fr auto; justify-items: start; align-items: center; gap: 12px; padding: 0 12px; min-height: 48px; border-radius: 10px; color: var(--on-sapin-2); font-size: .98rem }
  .tab:hover { background: var(--sapin-2); color: var(--on-sapin) }
  .tab::before { top: 10px; bottom: 10px; left: 0; right: auto; width: 4px; height: auto; border-radius: 0 4px 4px 0; transform: scaleY(0) }
  .tab[aria-selected="true"] { background: var(--sapin-2); color: #fff }
  .tab .n { position: static; background: var(--sapin-3) }
  .netbar { order: 3; margin-top: auto; padding: 14px; background: var(--sapin-2); border-radius: 14px; grid-template-columns: 1fr }
  .net-save { justify-self: start; margin-top: 6px }
  main { padding: 32px 32px 120px }
  .pickbar { left: calc(264px + 32px); right: 32px; bottom: 20px; max-width: 760px }
  .deals { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px }
  .week { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start }
  .meal .head { grid-template-columns: 1fr }
  .chip-row { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0 }
}
@media (max-width: 979px) {
  #k-dates { display: none }
  .netbar { padding-bottom: 12px }
  .meal .tools .stepper { flex: 1 1 100%; justify-content: space-between }
  .meal .tools .icon-btn { flex: 1 }
}
@media (max-width: 380px) {
  .deals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px }
  .seal { font-size: 1.3rem }
  .stamp { width: 40px; height: 40px; font-size: .72rem }
  .meal, .meal.free { grid-template-columns: 58px minmax(0, 1fr) }
  .item .p small { max-width: 96px }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important }
}

/* ---------- Pages légales ---------- */
body.doc { padding-left: 0; background: var(--surface) }
.doc-top { background: var(--sapin); color: var(--on-sapin); padding: 14px 16px }
.doc-top a { color: var(--on-sapin); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px }
.legal { max-width: 70ch; margin: 0 auto; padding: 28px 16px 72px; display: grid; gap: 12px }
.legal h1 { margin-bottom: 4px }
.legal h2 { margin-top: 18px }
.legal p, .legal li { color: var(--ink-2) }
.legal ul { margin: 0; padding-left: 20px; display: grid; gap: 6px }
.legal .fill { background: var(--moutarde-soft); color: var(--moutarde-ink); border-radius: 4px; padding: 0 4px; font-weight: 600 }
.legal .date { font-size: .88rem; color: var(--ink-3) }

/* ---------- Impression : menu et liste sur une page lettre, lisibles en noir et blanc ---------- */
#printSheet { display: none; color: #13201a; font: 11px/1.35 var(--font); -webkit-print-color-adjust: exact; print-color-adjust: exact }
#printSheet.measuring { display: block; position: absolute; left: -9999px; top: 0 }
.ps-page { width: 756px }
.ps-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; border-bottom: 3px solid #12382b; padding-bottom: 6px; margin-bottom: 10px }
.ps-head h1 { font-size: 24px; color: #12382b }
.ps-head p { color: #48584f; font-size: 11px }
.ps-brand { font-weight: 800; color: #12382b; white-space: nowrap; font-size: 12px }
.ps-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin-bottom: 10px }
.ps-day { border: 1.2px solid #b4c2b6; border-radius: 8px; padding: 6px 7px; display: grid; gap: 3px; align-content: start }
.ps-day .d { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #12382b; display: flex; justify-content: space-between; align-items: center }
.ps-day .d i { width: 10px; height: 10px; border: 1.3px solid #64736a; border-radius: 3px }
.ps-day b { font-size: 11px; line-height: 1.25 }
.ps-day small { color: #48584f; font-size: 9.5px }
.ps-day.free { border-style: dashed; color: #64736a }
.ps-day.free b { font-weight: 600 }
.ps-recipes { columns: 2; column-gap: 10px }
.ps-rec { break-inside: avoid; display: inline-block; width: 100%; border: 1.2px solid #b4c2b6; border-radius: 8px; padding: 6px 9px 7px; margin-bottom: 8px }
.ps-rec h2 { font-size: 13px; line-height: 1.25; display: flex; gap: 6px; align-items: baseline; color: #13201a }
.ps-rec h2 .d { font-size: 8.5px; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: #12382b; border-radius: 4px; padding: 1px 6px; flex: none; align-self: center }
.ps-rec .meta { color: #48584f; font-size: 9.5px; margin: 1px 0 4px }
.ps-rec .ing { font-size: 10px; margin-bottom: 3px }
.ps-rec .lbl { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-right: 4px }
.ps-rec ol { margin: 0; padding-left: 15px; font-size: 10px }
.ps-tip { padding: 6px 10px; border: 1.2px dashed #b4c2b6; border-radius: 8px; font-size: 10px }
.ps-foot { margin-top: 8px; font-size: 8.5px; color: #64736a }
.pl-stores { columns: 2; column-gap: 14px }
.pl-store { break-inside: avoid; display: inline-block; width: 100%; border: 1.2px solid #b4c2b6; border-radius: 8px; padding: 7px 10px 8px; margin-bottom: 10px }
.pl-store h2 { font-size: 14px; display: flex; justify-content: space-between; gap: 8px; border-bottom: 2px solid #12382b; padding-bottom: 3px; margin-bottom: 2px; color: #13201a }
.pl-store h2 span:last-child { color: #48584f; font-weight: 600; font-size: 11px; align-self: flex-end }
.pl-store h3 { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #12382b; margin: 6px 0 2px }
.pl-it { display: grid; grid-template-columns: 12px 1fr auto; gap: 6px; align-items: start; font-size: 10.5px; margin: 0; padding: 2px 0 }
.pl-it .pl-box { width: 10px; height: 10px; border: 1.3px solid #64736a; border-radius: 3px; margin-top: 2px }
.pl-it small { display: block; color: #48584f; font-size: 9px }
.pl-it .pr { color: #48584f; font-variant-numeric: tabular-nums; white-space: nowrap }
@media print {
  @page { size: letter portrait; margin: 8mm }
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important }
  body > *:not(#printSheet) { display: none !important }
  #printSheet { display: block; position: static }
  .ps-page { break-inside: avoid }
}
