/* ==========================================================================
   On mange quoi ? — feuille de style
   Principes : gros textes, grosses zones tactiles (≥ 48 px), peu de choses par écran, contrastes forts.
   ========================================================================== */
:root {
  --bg: #fffaf2; --card: #ffffff; --ink: #1f2a24; --muted: #5a6a61; --line: #ece3d4;
  --accent: #1f7a4d; --accent-ink: #ffffff; --accent-soft: #e3f3ea;            /* vert basilic : l'action principale */
  --green: #1f7a4d; --green-soft: #e3f3ea;
  --warm: #f28c28; --warm-soft: #fff0d9; --warm-ink: #8a4a00;                   /* orange chaleureux : mises en avant */
  --gold: #f2a33a; --gold-soft: #fff0d9; --red: #c0392b; --red-soft: #fdeae7;
  --radius: 22px; --radius-sm: 16px;
  --shadow: 0 2px 8px rgba(40, 50, 40, .05), 0 10px 28px rgba(40, 50, 40, .07);
  --shadow-lg: 0 20px 50px rgba(30, 40, 30, .22);
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: var(--font); --sans: var(--font);
}
:root[data-theme="dark"] {
  --bg: #101814; --card: #18231d; --ink: #eaf3ed; --muted: #a3b5aa; --line: #2a3a31;
  --accent: #52c78d; --accent-ink: #082015; --accent-soft: #1d3a2b; --green: #6fd6a0; --green-soft: #1d3a2b;
  --warm: #ffb45e; --warm-soft: #3a2a12; --warm-ink: #ffc680; --gold: #ffb45e; --gold-soft: #3a2a12; --red: #ff8a7a; --red-soft: #3d1d19;
  --shadow: 0 2px 8px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .35); --shadow-lg: 0 20px 50px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html { font-size: 106.25%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }     /* 17 px : confortable sans zoom */
html[data-size="large"] { font-size: 125%; }                                                /* « Grand texte » */
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.55 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font); font-weight: 800; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 6vw, 2.2rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); font-weight: 700; }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.hidden { display: none !important; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 1rem; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .65rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
:focus-visible { outline: 3px solid var(--warm); outline-offset: 2px; }

/* ---------- En-tête et navigation ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: .9rem; height: 3.6rem; }
.brand { font-weight: 800; font-size: 1.25rem; display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.brand b { color: var(--accent); }
.tabs { display: flex; gap: .25rem; margin-left: auto; }
.tab { border: 0; background: none; padding: .55rem .9rem; border-radius: 14px; font-weight: 700; color: var(--muted); display: flex; gap: .45rem; align-items: center; min-height: 2.8rem; }
.tab .ic { font-size: 1.2rem; }
.tab.on { background: var(--accent-soft); color: var(--accent); }
.budget-pill { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; font-size: .72rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: .35rem .7rem; cursor: pointer; white-space: nowrap; flex: none; }
.budget-pill b { font-size: .98rem; color: var(--ink); }
.budget-pill.low b { color: var(--red); }
main { padding: 1.3rem 0 7.5rem; }
@media (max-width: 760px) {
  .tabs { position: fixed; bottom: 0; left: 0; right: 0; margin: 0; background: var(--card); border-top: 1px solid var(--line); padding: .35rem .4rem calc(.35rem + env(safe-area-inset-bottom)); gap: .15rem; z-index: 30; box-shadow: 0 -8px 24px rgba(0, 0, 0, .07); }
  .tab { flex: 1; flex-direction: column; gap: .05rem; font-size: .74rem; padding: .35rem .1rem; border-radius: 14px; min-height: 3.6rem; justify-content: center; }
  .tab .ic { font-size: 1.55rem; line-height: 1.1; }
  .brand { font-size: 1.15rem; }
  .budget-pill { margin-left: auto; }
}
@media (min-width: 761px) { .budget-pill { order: 3; } }

/* ---------- Boutons, puces, champs ---------- */
.btn { border: 2px solid var(--line); background: var(--card); padding: .65rem 1.15rem; min-height: 3.1rem; border-radius: var(--radius-sm); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; text-decoration: none; color: var(--ink); transition: transform .08s, box-shadow .15s; }
.btn:hover { box-shadow: var(--shadow); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
.btn.green { background: var(--green); color: var(--accent-ink); border-color: var(--green); }
.btn.soft { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.btn.warm { background: var(--warm); color: #2a1500; border-color: var(--warm); box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.lg { min-height: 3.6rem; padding: .85rem 1.5rem; font-size: 1.12rem; border-radius: 18px; }
.btn.sm { min-height: 2.5rem; padding: .35rem .85rem; font-size: .92rem; border-radius: 13px; }
.btn.block { width: 100%; }
.btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.chip { border: 2px solid var(--line); background: var(--card); padding: .45rem .95rem; min-height: 2.75rem; border-radius: 999px; font-size: .96rem; font-weight: 700; display: inline-flex; gap: .4rem; align-items: center; }
button.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.ban.on { background: var(--red); border-color: var(--red); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: .55rem; }
.pill { display: inline-flex; gap: .3rem; align-items: center; font-size: .85rem; font-weight: 800; padding: .25rem .7rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.pill.green { background: var(--green-soft); color: var(--accent); }
.pill.gold { background: var(--warm-soft); color: var(--warm-ink); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.15rem; }
.card.flat { box-shadow: none; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label, .lbl { font-weight: 800; font-size: .98rem; }
input[type=text], input[type=number], input[type=password], select, textarea { font: inherit; color: var(--ink); background: var(--card); border: 2px solid var(--line); border-radius: var(--radius-sm); padding: .7rem .9rem; min-height: 3.1rem; width: 100%; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--warm); outline-offset: 1px; border-color: var(--accent); }
input[type=range] { width: 100%; accent-color: var(--accent); min-height: 2.4rem; }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; background: var(--card); }
.stepper button { border: 0; background: none; width: 3rem; height: 3rem; font-size: 1.5rem; font-weight: 800; border-radius: 50%; color: var(--accent); }
.stepper b { min-width: 3.4rem; text-align: center; font-size: 1.1rem; }
.progress { height: .7rem; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .4s; }
.progress.warn > i { background: var(--warm); }
.progress.bad > i { background: var(--red); }
.seg { display: inline-flex; background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: .2rem; gap: .15rem; }
.seg button { border: 0; background: none; padding: .55rem 1rem; min-height: 2.7rem; border-radius: 12px; font-weight: 800; color: var(--muted); }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.linkbtn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; font: inherit; font-weight: 800; cursor: pointer; }

/* ---------- Photos ---------- */
.ph { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--accent-soft), var(--warm-soft)); display: grid; place-items: center; }
.ph .ph-e { font-size: 3rem; opacity: .75; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Accueil ---------- */
.hello { margin-bottom: 1rem; }
.hello p { color: var(--muted); font-size: 1.08rem; }
.moodrow { display: flex; gap: .55rem; overflow-x: auto; padding: .2rem .1rem .5rem; margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; scrollbar-width: none; }
.moodrow::-webkit-scrollbar { display: none; }
.moodrow .chip { flex: none; }
.more { margin-top: .5rem; }
.more summary { cursor: pointer; font-weight: 800; color: var(--accent); min-height: 2.6rem; display: flex; align-items: center; }
.hero { display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden; padding: 0; margin-top: .9rem; border-radius: 26px; }
.hero .ph { min-height: 22rem; }
.hero .body { padding: 1.4rem; display: flex; flex-direction: column; gap: .9rem; }
.hero h2 { font-size: clamp(1.5rem, 4.5vw, 2rem); }
.why { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.why li { font-size: .98rem; color: var(--muted); display: flex; gap: .5rem; }
.why li::before { content: '✓'; color: var(--accent); font-weight: 800; }
.hero .actions { margin-top: auto; display: grid; gap: .7rem; }
.react { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.react .btn { flex-direction: column; gap: .1rem; padding: .55rem .2rem; min-height: 4rem; font-size: .9rem; line-height: 1.15; }
.react .btn .e { font-size: 1.5rem; line-height: 1; }
.meta { display: flex; gap: .45rem; flex-wrap: wrap; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } .hero .ph { min-height: 15rem; } .hero .body { padding: 1.1rem; } }
.section-t { margin: 1.8rem 0 .8rem; display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: .9rem; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-align: left; padding: 0; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s; }
.tile:hover { transform: translateY(-3px); }
.tile .ph { aspect-ratio: 4/3; }
.tile .tb { padding: .75rem .85rem .9rem; display: grid; gap: .3rem; }
.tile .tt { font-weight: 800; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.tile .tm { font-size: .85rem; color: var(--muted); display: flex; gap: .7rem; font-weight: 600; }
.promo { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center; margin-top: 1.4rem; padding: 1rem 1.1rem; border-radius: var(--radius); background: linear-gradient(120deg, #2e1560, #5a2a9a); color: #fff; box-shadow: var(--shadow); cursor: pointer; text-align: left; border: 0; width: 100%; }
.promo .pe { font-size: 2.2rem; }
.promo b { display: block; font-size: 1.1rem; }
.promo span { font-size: .92rem; color: rgba(255, 255, 255, .85); }
.promo .go { background: #ffd86b; color: #2a1500; border-radius: 12px; padding: .5rem .9rem; font-weight: 800; white-space: nowrap; }
.tips { background: var(--warm-soft); border: 2px solid var(--warm); border-radius: var(--radius); padding: 1.1rem; margin-bottom: 1.1rem; position: relative; }
.tips h2 { margin-bottom: .6rem; }
.tips ol { margin: 0 0 .8rem; padding-left: 1.4rem; display: grid; gap: .35rem; color: var(--ink); font-weight: 600; }

/* ---------- Fiche recette (fenêtre) ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(15, 20, 15, .6); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { background: var(--bg); width: 100%; max-width: 780px; max-height: 94vh; overflow-y: auto; border-radius: 28px 28px 0 0; box-shadow: var(--shadow-lg); animation: up .25s; position: relative; }
@media (min-width: 761px) { .backdrop { align-items: center; padding: 1.5rem; } .sheet { border-radius: 28px; } }
.sheet .ph { aspect-ratio: 16/9; max-height: 20rem; width: 100%; }
.sheet .in { padding: 1.3rem 1.3rem 1.8rem; display: grid; gap: 1.2rem; }
.sheet .close { position: absolute; top: .8rem; right: .8rem; width: 3rem; height: 3rem; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; font-size: 1.3rem; z-index: 2; }
.ing-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .1rem 1.4rem; }
.ing-list li { display: flex; gap: .65rem; padding: .55rem 0; border-bottom: 1px dashed var(--line); align-items: baseline; }
.ing-list .q { margin-left: auto; font-weight: 800; white-space: nowrap; }
.ing-list li.pantry { color: var(--muted); }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 1rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.4rem 1fr; gap: .75rem; }
.steps li::before { content: counter(s); width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; display: grid; place-items: center; }
.steps li p { padding-top: .25rem; font-size: 1.06rem; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

/* ---------- Semaine ---------- */
.week { display: grid; gap: 1.2rem; }
.day { display: grid; gap: .6rem; }
.day h3 { display: flex; align-items: baseline; gap: .5rem; font-size: 1.2rem; }
.slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: .8rem; }
.slot { display: grid; grid-template-columns: 6.2rem 1fr; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-height: 7rem; box-shadow: var(--shadow); }
.slot > [data-a="open"] { display: flex; cursor: pointer; }
.slot > [data-a="open"] .ph { flex: 1; width: 6.2rem; }
.slot .sb { padding: .7rem .8rem; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.slot .st { font-weight: 800; line-height: 1.25; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.slot .sa { margin-top: auto; display: flex; gap: .35rem; flex-wrap: wrap; }
.slot .sa button { border: 2px solid var(--line); background: var(--bg); border-radius: 12px; padding: .2rem .6rem; font-size: .86rem; font-weight: 800; min-height: 2.4rem; }
.slot .sa button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.slot.done { opacity: .65; }
.slot.empty { grid-template-columns: 1fr; place-items: center; border-style: dashed; border-width: 2px; background: transparent; padding: 1rem; text-align: center; box-shadow: none; }
.slot .lab { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* ---------- Courses ---------- */
.shop-head { display: grid; grid-template-columns: 1fr auto; gap: .9rem; align-items: center; }
.aisle h3 { margin: 1.5rem 0 .6rem; font-size: .95rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 800; }
.line { display: grid; grid-template-columns: 2rem 1fr auto; gap: .8rem; padding: .85rem .95rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); align-items: center; margin-bottom: .55rem; }
.line.chk { opacity: .55; }
.line.chk .nm { text-decoration: line-through; }
.line input[type=checkbox] { width: 1.7rem; height: 1.7rem; accent-color: var(--accent); }
.line .nm { font-weight: 800; font-size: 1.05rem; }
.line .pr { font-size: .88rem; color: var(--muted); }
.line .tot { text-align: right; font-weight: 800; white-space: nowrap; font-size: 1.05rem; }
.line .tiers { display: flex; gap: .35rem; margin-top: .45rem; flex-wrap: wrap; align-items: center; }
.line .tiers button { border: 2px solid var(--line); background: var(--bg); border-radius: 999px; font-size: .82rem; font-weight: 700; padding: .2rem .7rem; min-height: 2.2rem; color: var(--muted); }
.line .tiers button.on { background: var(--green-soft); border-color: var(--accent); color: var(--accent); }
.line .lk { font-size: .85rem; }
.line details summary { cursor: pointer; font-size: .88rem; font-weight: 800; color: var(--accent); margin-top: .3rem; min-height: 2rem; display: flex; align-items: center; }

/* ---------- Profil ---------- */
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1rem; align-items: start; }
.bar { display: grid; grid-template-columns: 7rem 1fr 2.4rem; gap: .6rem; align-items: center; font-size: .94rem; font-weight: 600; }
.bar .track { height: .7rem; border-radius: 999px; background: var(--line); position: relative; overflow: hidden; }
.bar .track i { position: absolute; top: 0; bottom: 0; border-radius: 999px; }
.bar .track i.pos { background: var(--green); left: 50%; }
.bar .track i.neg { background: var(--red); right: 50%; }
.bar .track::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--card); }
.expense { display: flex; justify-content: space-between; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.menu-list { display: grid; gap: .6rem; }
.menu-item { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center; padding: .9rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); text-align: left; width: 100%; font-weight: 800; min-height: 4rem; }
.menu-item .e { font-size: 1.7rem; }
.menu-item small { display: block; font-weight: 600; color: var(--muted); }

/* ---------- Assistant de démarrage ---------- */
.onb { min-height: 100vh; display: flex; flex-direction: column; }
.onb .wrap { max-width: 620px; width: 100%; flex: 1; display: flex; flex-direction: column; padding-top: 1.4rem; padding-bottom: 1.4rem; gap: 1.2rem; }
.dots { display: flex; gap: .4rem; }
.dots i { flex: 1; height: .45rem; border-radius: 999px; background: var(--line); }
.dots i.on { background: var(--accent); }
.step-label { font-weight: 800; color: var(--accent); font-size: .95rem; }
.onb .foot { margin-top: auto; display: flex; gap: .7rem; justify-content: space-between; padding-top: .8rem; position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding-bottom: .4rem; }
.big-num { font-weight: 800; font-size: 3rem; line-height: 1.1; color: var(--accent); }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.4rem, 1fr)); gap: .65rem; }
.store { border: 2px solid var(--line); background: var(--card); border-radius: var(--radius-sm); padding: .9rem .5rem; display: grid; gap: .25rem; place-items: center; font-weight: 800; min-height: 5rem; }
.store .e { font-size: 1.7rem; }
.store.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.tier-grid .store { padding: .8rem .4rem; font-size: .98rem; text-align: center; }
.calib { overflow: hidden; padding: 0; }
.calib .ph { aspect-ratio: 4/3; }
.calib .cb { padding: 1.1rem; display: grid; gap: .8rem; }
.calib .two-b { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.avoid-box { max-height: 15rem; overflow: auto; padding: .15rem; }

#toast { position: fixed; left: 50%; bottom: 6rem; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: .85rem 1.3rem; border-radius: 16px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 80; max-width: 92vw; text-align: center; box-shadow: var(--shadow-lg); }
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.empty-state { text-align: center; padding: 2.4rem 1rem; display: grid; gap: .8rem; justify-items: center; }
.empty-state .big { font-size: 3.4rem; }
@media print { .top, .tabs, .btn, #toast { display: none !important; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Créateur de recettes ---------- */
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: .8rem; }
.ing-row { display: grid; grid-template-columns: 1fr 5.5rem 4.6rem auto; gap: .5rem; align-items: center; }
.ing-row .unit { font-size: .88rem; color: var(--muted); font-weight: 700; }
.step-row { display: grid; grid-template-columns: 2.2rem 1fr auto; gap: .5rem; align-items: start; }
.step-row b { width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin-top: .5rem; }
.thumb { width: 5.4rem; height: 4.2rem; object-fit: cover; border-radius: 14px; border: 2px solid var(--line); }
.ph-empty { display: grid; place-items: center; font-size: 1.7rem; background: var(--accent-soft); }
.tile-wrap { display: flex; flex-direction: column; }
.tile-wrap > .tile { flex: 1; }
@media (max-width: 760px) { .ing-row { grid-template-columns: 1fr 4.8rem auto; } .ing-row .unit { display: none; } .slots { grid-template-columns: 1fr; } }

/* ---------- Classement ---------- */
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.rank li { display: grid; grid-template-columns: 2.2rem 1fr auto; gap: .65rem; align-items: center; padding: .4rem 0; border-bottom: 1px dashed var(--line); }
.rank .rk { font-size: 1.4rem; text-align: center; font-weight: 800; }
.rank .rk-main { display: flex; gap: .65rem; align-items: center; text-align: left; background: none; border: 0; padding: 0; min-width: 0; }
.rank .rk-ph { width: 3.4rem; height: 3.4rem; border-radius: 14px; flex: none; }
.rank .rk-score { text-align: right; font-weight: 800; white-space: nowrap; }
.scroll-x { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.scroll-x button { white-space: nowrap; }

/* ---------- Cheat meal : scène, roue, bouton, carte du gagnant ---------- */
.stage { position: relative; margin: 1.1rem 0; padding: 1.9rem .75rem 1.4rem; border-radius: 30px; overflow: hidden; isolation: isolate; display: grid; justify-items: center; gap: 1rem;
  background: radial-gradient(120% 90% at 50% 32%, #3d1f6b 0%, #1b0e35 55%, #0a0617 100%); box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.stage::before { content: ''; position: absolute; inset: -70%; z-index: -1; animation: beams 26s linear infinite;
  background: conic-gradient(from 0deg at 50% 46%, transparent 0deg, rgba(255, 216, 107, .17) 14deg, transparent 30deg, rgba(120, 170, 255, .15) 76deg, transparent 94deg, rgba(255, 90, 180, .15) 150deg, transparent 170deg, rgba(255, 216, 107, .14) 232deg, transparent 252deg, rgba(120, 255, 200, .12) 300deg, transparent 322deg); }
.stage::after { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .7; pointer-events: none;
  background-image: radial-gradient(1.6px 1.6px at 12% 22%, #fff 50%, transparent 52%), radial-gradient(1.4px 1.4px at 82% 14%, #ffe9a8 50%, transparent 52%), radial-gradient(1.8px 1.8px at 90% 62%, #fff 50%, transparent 52%), radial-gradient(1.4px 1.4px at 8% 74%, #cfe0ff 50%, transparent 52%), radial-gradient(1.6px 1.6px at 48% 8%, #fff 50%, transparent 52%), radial-gradient(1.4px 1.4px at 66% 90%, #ffe9a8 50%, transparent 52%); animation: twinkle 3.2s ease-in-out infinite alternate; }
@keyframes beams { to { transform: rotate(360deg); } }
@keyframes twinkle { from { opacity: .35; } to { opacity: .9; } }
.stage .wheel-wrap { width: min(31rem, 96%); margin: 0 auto; position: relative; }
.stage .wheel-wrap canvas { width: 100%; height: auto; display: block; background: transparent; }
.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.sound-btn { position: absolute; top: .75rem; right: .75rem; z-index: 4; width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.2rem; backdrop-filter: blur(6px); }
.spin-btn { position: relative; border: 0; cursor: pointer; padding: 1.05rem 3rem; min-height: 3.6rem; border-radius: 999px; font: 800 1.2rem/1 var(--font); letter-spacing: .12em; color: #2a0f00;
  background: linear-gradient(180deg, #ffe58a, #ffb21f 55%, #ff8a00); box-shadow: 0 6px 0 #b35a00, 0 14px 34px rgba(255, 160, 0, .55), inset 0 2px 0 rgba(255, 255, 255, .7); animation: pulse 1.8s ease-in-out infinite; transition: transform .08s, box-shadow .08s; }
.spin-btn:hover { filter: brightness(1.06); }
.spin-btn:active { transform: translateY(5px); box-shadow: 0 1px 0 #b35a00, 0 6px 16px rgba(255, 160, 0, .5), inset 0 2px 0 rgba(255, 255, 255, .7); animation: none; }
.spin-btn[disabled] { animation: none; filter: grayscale(.45) brightness(.8); cursor: default; }
@keyframes pulse { 50% { transform: scale(1.05); box-shadow: 0 6px 0 #b35a00, 0 18px 46px rgba(255, 160, 0, .85), inset 0 2px 0 rgba(255, 255, 255, .7); } }
.stage-note { color: rgba(255, 255, 255, .78); font-size: .92rem; text-align: center; padding: 0 .6rem; }
.stage-note.warn { color: #ffd86b; font-weight: 700; }
.cheat-res { position: relative; overflow: hidden; text-align: center; margin-top: 1.1rem; padding: 1.7rem 1.1rem 1.4rem; border-radius: 28px; display: grid; gap: .5rem; justify-items: center; color: #fff;
  background: linear-gradient(160deg, #2e1560, #170a30); box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 216, 107, .4), 0 0 44px rgba(255, 160, 0, .28); animation: popin .7s cubic-bezier(.34, 1.56, .64, 1) both; }
.cr-emoji { font-size: 4.2rem; line-height: 1; animation: bob 1.6s ease-in-out .7s infinite; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.cr-kicker { text-transform: uppercase; letter-spacing: .3em; font-size: .78rem; color: #ffd86b; animation: rise .5s .25s both; }
.cr-name { font-size: clamp(2rem, 7vw, 3.1rem); background: linear-gradient(90deg, #fff, #ffd86b, #fff); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: rise .5s .35s both, shine 3s linear infinite; }
.cr-sub { color: rgba(255, 255, 255, .8); animation: rise .5s .45s both; }
.cr-warn { color: #ffd86b; font-size: .95rem; max-width: 34rem; animation: rise .5s .5s both; }
.cr-ok { color: #8bf0b0; font-weight: 800; font-size: .95rem; animation: rise .5s .5s both; }
.cr-actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; animation: rise .5s .55s both; }
.cheat-res .btn:not(.primary) { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .25); }
.cheat-res .btn.primary { background: #ffd86b; color: #2a1500; border-color: #ffd86b; }
.cheat-res .btn.ghost { background: none; border-color: transparent; color: rgba(255, 255, 255, .8); }
.cheat-res .muted { color: rgba(255, 255, 255, .62); }
@keyframes popin { from { opacity: 0; transform: scale(.7) translateY(30px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes bob { 50% { transform: translateY(-9px) rotate(-5deg); } }
@keyframes shine { to { background-position: 200% center; } }
@media (max-width: 760px) { .stage { padding: 1.6rem .4rem 1.1rem; border-radius: 24px; } .spin-btn { padding: 1rem 2.4rem; } }

/* Zones tactiles confortables dans la liste de courses */
.line details summary { min-height: 2.9rem; padding: .2rem 0; }
.line .tiers button { min-height: 2.9rem; padding: .3rem .9rem; }
.line .tiers .lk { display: inline-flex; align-items: center; min-height: 2.9rem; font-size: .95rem; }
.line details[open] summary { margin-bottom: .2rem; }
details.aisle > summary { min-height: 3rem; display: flex; align-items: center; cursor: pointer; font-weight: 800; }

/* ---------- Icônes (traits fins) ---------- */
svg.i { width: 1.2em; height: 1.2em; vertical-align: -0.22em; flex: none; }
svg.i-heart-fill { color: var(--red); }
i.dot { display: inline-block; width: .75em; height: .75em; border-radius: 50%; vertical-align: -0.05em; flex: none; }
.tab .ic svg { width: 1.6rem; height: 1.6rem; stroke-width: 1.9; }
.tab.on .ic svg { stroke-width: 2.3; }
.ph .ph-e { opacity: .55; color: var(--accent); }
.ph .ph-e svg { width: 3rem; height: 3rem; stroke-width: 1.5; }
.empty-state .big { color: var(--accent); }
.empty-state .big svg { width: 3.6rem; height: 3.6rem; stroke-width: 1.5; }
.react .e svg { width: 1.6rem; height: 1.6rem; }
.promo .pe { display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 16px; background: rgba(255, 255, 255, .16); }
.promo .pe svg { width: 1.9rem; height: 1.9rem; }
.menu-item .e svg, .store .e svg { width: 1.7rem; height: 1.7rem; }
.hello h1 svg { display: none; }
.cr-mono { width: 4.4rem; height: 4.4rem; border-radius: 50%; display: grid; place-items: center; font-size: 2.2rem; font-weight: 800; color: #2a1654; background: linear-gradient(160deg, #fff7cf, #f0c14b); box-shadow: 0 8px 22px rgba(0, 0, 0, .4), inset 0 -3px 0 rgba(0, 0, 0, .12); animation: bob 1.6s ease-in-out .7s infinite; }
.sound-btn svg { width: 1.3rem; height: 1.3rem; }
.sheet .close svg { width: 1.3rem; height: 1.3rem; }
.chip svg.i, .btn svg.i, .pill svg.i { width: 1.1em; height: 1.1em; }
.stepper button { line-height: 1; }
.store .e i.dot { width: 1.3rem; height: 1.3rem; }
.logo-tile { width: 4rem; height: 4rem; border-radius: 20px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 0 rgba(0, 0, 0, .12); }
.logo-tile svg { width: 2.2rem; height: 2.2rem; stroke-width: 2; }
.brand svg { width: 1.5rem; height: 1.5rem; color: var(--accent); }
