/* Courses de la semaine v4 · design system « univers discount » (maquettes v4 / v4d).
   Jaune des étiquettes et rouge des prix identiques en clair et en sombre. Pas de liseré à gauche. */

:root {
  --bg: #F2F4F7; --card: #FFFFFF; --tint: #E8F0FD; --head: #0A3D91; --action: #1F5FD1; --action-text: #1F5FD1;
  --text: #0E1B33; --muted: #4A5568; --link: #0A3D91; --line: #EEF1F5; --dots: #C3CCD8; --head-sub: #C9D8F5;
  --nav: #0A3D91; --nav-text: #DCE6FA; --shadow: 0 2px 8px rgba(10,61,145,0.08); --shadow-sm: 0 1px 4px rgba(10,61,145,0.06);
  --nav-shadow: 0 8px 24px rgba(10,61,145,0.35); --dash: #0A3D91; --off: #C3CCD8; --red-tint: #FDE8E7; --red-text: #A61B15;
  --yellow: #FFD500; --red: #D7261E; --on-yellow: #0E1B33;
  /* Vert « gain » : une remise est ce que tu gagnes (5,4:1 sur blanc) */
  --gain: #1B7F3B;
  /* Rouge des petits textes posés sur le jaune (.sq48 en prix, .sq-price) : 5,30:1 sur #FFD500, au lieu de 3,53 */
  --red-on-yellow: #A61B15;
  /* Rouge clair pour le texte rouge posé directement sur une surface sombre (décision du 06/11) ;
     --red-ink = rouge de texte hors étiquette : #D7261E en clair, --red-on-dark en sombre */
  --red-on-dark: #FF8A82; --red-ink: var(--red);
  /* Focus : anneau foncé en clair (avec un liseré blanc côté élément), jaune en sombre et sur le bleu */
  --focus: #0E1B33; --focus-gap: #FFFFFF;
  /* Fond des photos produits : celui des cartes, comme les maquettes v4d. Les photos Lidl ont un fond blanc opaque :
     en sombre, on les arrondit pour qu'elles se lisent comme des vignettes (voir plus bas) */
  --photo-bg: var(--card);
  --cond: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  color-scheme: light;   /* toujours en clair (7/11/2026, demande d'Enguerran : pas de mode sombre) */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.35 Barlow, system-ui, sans-serif;
  font-variant-numeric: tabular-nums; -webkit-tap-highlight-color: transparent; min-height: 100vh;
}
a { color: var(--link); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--focus-gap); border-radius: 6px; }
/* Sur le bleu de l'en-tête (et de « Ta semaine », de l'accueil de première fois), l'anneau reste jaune */
.hero :focus-visible, .week :focus-visible, .w-head :focus-visible, .w-foot :focus-visible { outline-color: var(--yellow); box-shadow: 0 0 0 5px var(--head); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--yellow); color: #0A3D91; padding: 12px; font-weight: 800; z-index: 99; border-radius: 8px; }
.skip:focus { top: 8px; }

/* --- Structure --- */
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
body.has-nav #app { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
.wrap { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.wrap.tight { padding: 14px 16px; gap: 10px; }
.wrap.home { margin-top: -10px; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.between.end { align-items: flex-end; }
.right { text-align: right; }
.center { text-align: center; }
.meta { font-size: 13px; color: var(--muted); }
.small { font-size: 13px; }
.b { font-weight: 700; }
.blue { color: var(--link); }
.red { color: var(--red-ink); }
.cond { font-family: var(--cond); }
.loading-msg { color: var(--muted); padding: 40px 0; text-align: center; }

/* --- En-tête bleu --- */
.hero {
  background: var(--head); color: #FFFFFF; padding: calc(20px + env(safe-area-inset-top)) 16px 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.hero h1 { font-family: var(--cond); font-size: 40px; font-weight: 800; line-height: 1; }
.hero h1:focus { outline: none; box-shadow: none; }
.hero .h1-md { font-size: 36px; }
.hero .y, .welcome .y { color: var(--yellow); }
.hero .sub { font-size: 14px; color: var(--head-sub); }
.hero .sub.small { font-size: 13px; }
.hero-home { padding-bottom: 24px; }
.hero-home h1 { line-height: .95; }
.hero-home .sub { font-size: 15px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.where { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; min-width: 0; }
.where svg { flex: none; }
.topbtns { display: flex; gap: 8px; flex: none; }
.iconbtn { width: 48px; height: 48px; border-radius: 12px; background: var(--action); display: grid; place-items: center; }
.backlink { align-self: flex-start; background: none; border: 0; padding: 12px 12px 12px 0; margin: -12px 0 -8px; color: var(--yellow); font-weight: 700; font-size: 15px; min-height: 48px; }
.hrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hpill { background: var(--action); border-radius: 8px; padding: 4px 10px; font-weight: 700; font-size: 14px; }
.ybadge { background: var(--yellow); color: #0A3D91; font-weight: 800; font-size: 13px; padding: 4px 8px; border-radius: 6px; }
.ytotal { font-family: var(--cond); font-size: 30px; font-weight: 800; color: var(--yellow); line-height: 1; }
.bar { height: 8px; border-radius: 4px; background: var(--action); overflow: hidden; }
.bar span { display: block; height: 8px; background: var(--yellow); transition: width .2s; }
.title-dark { font-family: var(--cond); font-size: 32px; color: var(--link); }

/* --- Filtres --- */
.fchips { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { min-height: 48px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--action); color: #FFFFFF; font-weight: 700; font-size: 14px; }
.fchip[aria-pressed="true"] { background: var(--yellow); color: #0A3D91; font-weight: 800; }

/* --- Sections et cartes --- */
.sec { display: flex; flex-direction: column; gap: 10px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sec-head h2, .h2 { font-size: 20px; font-weight: 800; color: var(--link); }
.sec-head a { font-size: 14px; font-weight: 700; padding: 12px 0; margin: -12px 0; }
.sec-sub { margin-top: -4px; }
.h3 { font-size: 17px; font-weight: 800; color: var(--link); }
.kicker { font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .06em; margin-top: 8px; }
.kicker:first-child { margin-top: 0; }
.kicker.blue { color: var(--link); }
.kicker.red { color: var(--red-ink); }
.mini { font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.mini.blue { color: var(--action-text); }
.card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); color: var(--text); text-decoration: none; position: relative; }
.card.pad { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card.dashed { border: 2px dashed var(--dash); box-shadow: none; }
.note-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.note-card.err { border: 2px solid var(--red); }
.note-card.ok b { color: var(--link); font-size: 17px; }
.name { font-size: 17px; font-weight: 700; line-height: 1.2; }
.name a { color: inherit; text-decoration: none; }
.stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.skel { border-radius: 16px; background: linear-gradient(90deg, var(--card) 0%, var(--tint) 50%, var(--card) 100%); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } .bar span { transition: none; } }

/* Images de produit */
.noimg { display: block; background: var(--tint); border-radius: 8px; }
.thumb48 { width: 48px; height: 36px; object-fit: contain; flex: none; }
.thumb60 { width: 60px; height: 45px; object-fit: contain; flex: none; }
.thumb64 { width: 64px; height: 64px; object-fit: contain; flex: none; border-radius: 10px; }
.thumb80 { width: 80px; height: 80px; object-fit: contain; flex: none; }
span.thumb48, span.thumb60 { background: var(--tint); }

/* Étiquettes prix : jaune, prix rouge (les mêmes en sombre) */
.tag { align-self: flex-start; background: var(--yellow); border-radius: 6px; padding: 0 8px; font-family: var(--cond); font-size: 26px; font-weight: 800; color: var(--red); line-height: 1.25; white-space: nowrap; flex: none; }
.tag small { font-family: Barlow, sans-serif; font-size: 12px; font-weight: 600; color: var(--on-yellow); margin-left: 2px; }
.tag-md { font-size: 24px; align-self: auto; }
.tag-sm { font-size: 20px; padding: 0 6px; }
.tag-sm small { font-size: 12px; }
.tag-lg { border-radius: 8px; padding: 4px 12px; display: flex; flex-direction: column; align-items: flex-end; font-size: 36px; line-height: 1; }
.tag-lg small { font-size: 12px; font-weight: 700; margin: 2px 0 0; }
.tag-abs { position: absolute; right: 12px; bottom: 10px; }
.price { font-family: var(--cond); font-size: 22px; font-weight: 800; color: var(--red-ink); white-space: nowrap; }
.badge { position: absolute; top: 8px; left: 8px; background: var(--head); color: var(--yellow); font-weight: 800; font-size: 12px; padding: 4px 8px; border-radius: 6px; z-index: 1; }
.badge-l { top: 12px; left: 12px; font-size: 12px; padding: 5px 9px; }
.badge-r { top: calc(22px + env(safe-area-inset-top)); left: auto; right: 16px; font-size: 12px; padding: 5px 9px; }
.sq { width: 64px; height: 64px; border-radius: 14px; background: var(--yellow); display: grid; place-items: center; font-family: var(--cond); font-weight: 800; font-size: 22px; color: var(--red); flex: none; text-align: center; line-height: 1; }
.sq48 { width: 48px; height: 48px; border-radius: 12px; font-size: 19px; }
.sq60 { width: 60px; height: 60px; border-radius: 10px; font-size: 24px; }
.sq-price { font-size: 17px; color: var(--red-on-yellow); }
.disc { position: absolute; top: -14px; left: -14px; width: 50px; height: 50px; border-radius: 50%; background: var(--red); color: #FFFFFF; display: grid; place-items: center; font-family: var(--cond); font-weight: 800; font-size: 18px; }
.disc-static { position: static; width: 58px; height: 58px; font-size: 20px; flex: none; }

/* Boutons */
.btn { min-height: 52px; border-radius: 12px; border: 0; padding: 0 16px; font-weight: 700; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; text-align: center; gap: 6px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn-primary { background: var(--action); color: #FFFFFF; font-weight: 800; }
.btn-primary.is-on { background: var(--tint); color: var(--link); }
.btn-yellow { background: var(--yellow); color: #0A3D91; font-weight: 800; }
.btn-ghost { background: var(--card); color: var(--link); border: 2px solid var(--link); }
.btn-sm { min-height: 48px; font-size: 14px; padding: 0 12px; border-radius: 10px; }
.btn-lg { min-height: 56px; font-size: 18px; border-radius: 14px; width: 100%; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btnrow .btn { flex: 1; }
.weekacts { margin: -4px 0 4px; }
.tklist { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 6px; }
.tklist label { display: flex; gap: 10px; align-items: flex-start; }
.tklist .grow { display: flex; flex-direction: column; }
.tklist input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.scanbtn { width: 100%; margin-bottom: 10px; }
.scanbox { margin-bottom: 12px; }
.scanbox video { width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; background: #000; display: block; }
.hacode { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hacode code { font-size: 12px; word-break: break-all; background: var(--tint); padding: 6px 8px; border-radius: 8px; flex: 1; min-width: 0; }
.linkbtn { background: none; border: 0; color: var(--action-text); font-weight: 700; font-size: 14px; min-height: 48px; padding: 0 4px; }
.linkbtn.light { color: #FFFFFF; font-size: 15px; font-weight: 600; }
.sqbtn { width: 48px; height: 48px; border-radius: 12px; border: 0; background: var(--action); color: #FFFFFF; font: 800 22px Barlow, sans-serif; flex: none; position: relative; z-index: 2; }
.sqbtn.on { background: var(--tint); color: var(--link); }
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 800; flex: none; border: 0; position: relative; z-index: 2; }
button.pill { min-height: 48px; }
.pill-on { background: var(--tint); color: var(--link); }
.muted-pill { background: none; color: var(--muted); font-weight: 700; }
.foot {
  position: sticky; bottom: 0; display: flex; gap: 8px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 75%, transparent); z-index: 5;
}
.foot .btn { min-height: 54px; border-radius: 14px; font-size: 16px; }
.foot .btn-primary { font-size: 17px; }

/* Bandeaux d'état */
.banner { background: var(--tint); color: var(--text); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
.banner.warn { background: var(--red-tint); color: var(--red-text); }
.banner.demo { background: var(--yellow); color: #0A3D91; }
/* Hors ligne, mise à jour, sauvegarde en attente : pastille fixe, hors du flux, qui ne décale pas la liste (v5-C2).
   Elle ne prend pas les touchers : elle ne cache aucun bouton. */
.syncpill {
  position: fixed; top: calc(4px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 15;
  max-width: calc(100% - 128px); width: max-content; text-align: center; pointer-events: none;
  background: var(--card); color: var(--text); box-shadow: var(--shadow); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700;
}
/* Bouton en cours (« Activation… ») : visible, non actionnable, toujours focusable (v5-C5) */
.btn.is-busy { opacity: .7; cursor: progress; }
.result.is-loading { opacity: .45; pointer-events: none; transition: opacity .2s; }

/* --- Accueil --- */
.hcard { padding: 12px; display: flex; gap: 12px; align-items: center; }
.hcard.dashed { padding: 11px; }
.hcard .meta { font-size: 13px; }
.carousel { display: flex; gap: 10px; overflow-x: auto; margin-right: -16px; padding: 2px 16px 6px 0; scroll-snap-type: x mandatory; }
.carousel > div { flex: none; scroll-snap-align: start; display: flex; }
.dish { width: 240px; overflow: hidden; display: flex; flex-direction: column; }
.dish-img { position: relative; height: 104px; display: flex; background: var(--photo-bg); }
.dish-img img, .dish-img .noimg { flex: 1; min-width: 0; height: 104px; object-fit: contain; border-radius: 0; }
.dish-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.dish-body .name { font-size: 16px; }
.dish-body .meta { font-size: 12px; }
.dish-body .between { margin-top: auto; padding-top: 2px; }
.dish .tag-md { font-size: 22px; }
.go { font-size: 13px; font-weight: 700; color: var(--action-text); }
.mbig { overflow: hidden; display: flex; flex-direction: column; }
.mbig-img { position: relative; height: 150px; display: grid; place-items: center; background: var(--photo-bg); }
.mbig-img img { width: 200px; height: 145px; object-fit: contain; }
.mbig-body { padding: 10px 14px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.mbig-body .name { font-size: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.msmall { border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.msmall img, .msmall .noimg { width: 100%; height: 84px; object-fit: contain; background: var(--photo-bg); border-radius: 8px; }
.msmall .name { font-size: 16px; }
.msmall .tag-md { align-self: flex-start; }
b.pos { color: var(--link); }
b.neg { color: var(--red-ink); }
.ybanner { text-decoration: none; color: var(--on-yellow); background: var(--yellow); border-radius: 18px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.ybanner .mini.blue { color: #0A3D91; }
.ybanner b { font-size: 17px; }
.ybanner span span:last-child { font-size: 13px; }
.arrow { font-family: var(--cond); font-size: 34px; font-weight: 800; color: var(--red); }
.week { background: var(--head); color: #FFFFFF; border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.week h2 { font-size: 18px; font-weight: 700; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid3 a { text-decoration: none; color: #FFFFFF; background: var(--action); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; min-height: 48px; }
.grid3 b { font-family: var(--cond); font-size: 28px; line-height: 1; color: var(--yellow); }
.grid3 span { font-size: 13px; }

/* --- Promos --- */
.pcard { border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.pc-top { display: flex; gap: 12px; align-items: center; }
.pc-top .meta { font-size: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.dchip { background: var(--tint); color: var(--link); padding: 3px 8px; border-radius: 6px; }
.dchip b.pos { color: inherit; }
.dchip-neg { background: var(--red-tint); color: var(--red-text); }
.dchip-neg b.neg { color: inherit; }
.flags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.flag { font-size: 12px; font-weight: 700; color: var(--action-text); }
.flag-on { color: var(--link); }
.flag-warn { color: var(--red-text); }
.card.rows { border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; }
.lrow { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; min-height: 56px; }
.lrow .name { font-size: 16px; }
.lrow .meta { font-size: 12px; }
.morebtn { background: none; border: 0; min-height: 48px; font-weight: 700; color: var(--action-text); }
.rows > :last-child { border-bottom: 0; }

/* --- Détail promo --- */
.d-hero { position: relative; height: calc(260px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); background: var(--photo-bg); display: grid; place-items: center; }
.d-hero > img { width: 300px; max-width: 80%; height: 225px; object-fit: contain; }
.d-hero > .noimg { width: 200px; height: 150px; }
.backbtn { position: absolute; top: calc(16px + env(safe-area-inset-top)); left: 16px; width: 48px; height: 48px; border-radius: 12px; background: var(--head); border: 0; display: grid; place-items: center; }
.tag-xl { position: absolute; right: 16px; bottom: -26px; border-radius: 10px; padding: 8px 14px 6px; display: flex; flex-direction: column; align-items: flex-end; box-shadow: 0 4px 12px rgba(0,0,0,0.12); line-height: 1; z-index: 2; }
.tag-xl s { font-family: Barlow, sans-serif; font-size: 13px; font-weight: 400; color: var(--on-yellow); }
.tag-xl .p { font-size: 52px; }
.tag-xl small { font-size: 12px; font-weight: 700; margin: 0; }
.d-main { padding-top: 18px; gap: 14px; }
.d-title { display: flex; gap: 10px; align-items: flex-start; padding-right: 120px; }
.d-title h1 { font-size: 30px; font-weight: 800; color: var(--link); line-height: 1.1; }
.d-title h1:focus { outline: none; box-shadow: none; }
.d-title .meta { font-size: 14px; }
.likebtn { width: 48px; height: 48px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); display: grid; place-items: center; flex: none; }
.vpill { align-self: flex-start; background: var(--tint); color: var(--link); font-weight: 700; font-size: 13px; padding: 5px 10px; border-radius: 6px; }
.vpill-red { background: var(--red-tint); color: var(--red-text); }
.cmp { padding: 16px; gap: 8px; }
.cmp h2 { font-size: 18px; font-weight: 800; margin-bottom: 0; }
.tline { display: flex; gap: 8px; align-items: baseline; font-size: 16px; }
.tline small { display: block; font-size: 12px; }
.dots { flex: 1; border-bottom: 2px dotted var(--dots); min-width: 12px; }
.dcol { width: 56px; text-align: right; flex: none; }
.ybox { margin-top: 6px; background: var(--yellow); color: var(--on-yellow); border-radius: 10px; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ybox .blue { color: #0A3D91; }
.big-red { font-family: var(--cond); font-size: 24px; color: var(--red); text-align: right; }
.facts { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.warn-txt { color: var(--red-text); font-weight: 700; }

/* --- Plats --- */
.plan { overflow: hidden; display: flex; min-height: 100px; }
.plan-img { width: 110px; display: grid; place-items: center; border-right: 1px solid var(--line); background: var(--photo-bg); flex: none; }
.plan-img img { width: 100px; height: 75px; object-fit: contain; }
.plan-img .noimg { width: 80px; height: 60px; }
.plan-body { flex: 1; min-width: 0; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.sugg { padding: 10px 12px; display: flex; gap: 10px; align-items: center; border-radius: 16px; }
.sugg a { text-decoration: none; color: inherit; min-height: 48px; justify-content: center; }
.sugg .name { font-size: 16px; }

/* --- Fiche plat --- */
.ysum { background: var(--yellow); color: var(--on-yellow); border-radius: 18px; padding: 14px 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ysum div { display: flex; flex-direction: column; }
.ysum .mini.blue, .ysum b.blue { color: #0A3D91; }
.ysum b { font-family: var(--cond); font-size: 30px; line-height: 1; }
.ysum .red, .tsum .y .red { color: var(--red); }  /* posé sur le jaune : rouge des étiquettes, identique en sombre */
.ysum > div > span:last-child { font-size: 12px; }  /* pas le « ≈ » dans les montants */
/* Total du menu dans Plats (v5-C3) : montants plus longs (« ≈ 12,40 € »), on ne les coupe pas */
.menu-sum b { font-size: clamp(20px, 6.5vw, 26px); white-space: nowrap; }
.uses { gap: 0; }
.uses h2 { padding-bottom: 8px; }
.use { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 2px dotted var(--dots); }
.use b { font-size: 16px; }
.use .meta { font-size: 12px; }
.amt { display: flex; flex-direction: column; align-items: flex-end; }
.amt .cond { font-size: 20px; }
.sqtiny { width: 48px; height: 36px; border-radius: 8px; background: var(--tint); display: grid; place-items: center; font-weight: 800; color: var(--action-text); flex: none; }
.upill { font-size: 12px; font-weight: 800; color: var(--muted); background: var(--tint); padding: 3px 8px; border-radius: 6px; flex: none; }
.upill.blue { color: var(--action-text); }
.uses > .meta { margin-top: 8px; font-size: 12px; }
.steps .step { display: flex; gap: 10px; }
.num { width: 28px; height: 28px; border-radius: 50%; background: var(--head); color: var(--yellow); display: grid; place-items: center; font-weight: 800; flex: none; }
.step p { font-size: 15px; }

/* --- Liste --- */
.litem { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 14px; padding: 8px 12px; min-height: 60px; box-shadow: var(--shadow-sm); cursor: pointer; }
.litem.dashed { border: 2px dashed var(--dash); padding: 6px 10px; box-shadow: none; }
.litem input { width: 28px; height: 28px; accent-color: var(--action); flex: none; margin: 0; }
.litem .meta { font-size: 13px; }
.litem.done { background: var(--tint); box-shadow: none; }
.litem.done .name { text-decoration: line-through; font-weight: 500; }
.litem.done img { opacity: .5; }
.litem.done .price { color: var(--muted); font-weight: 600; font-size: 20px; }
.placard summary, .others summary { font-weight: 700; color: var(--link); min-height: 48px; display: flex; align-items: center; cursor: pointer; }
.placard ul { margin: 0; padding-left: 20px; }
.others { display: flex; flex-direction: column; gap: 10px; }
.others[open] > :not(summary) { margin-top: 10px; }

/* --- Coupons --- */
.bigc { gap: 10px; }
.bigc-top { display: flex; gap: 12px; align-items: center; }
.connect .btn { align-self: stretch; }

/* --- Likes --- */
.lk { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 4px; border-bottom: 1px solid var(--line); }
.lk .name { font-size: 16px; }
.lk .meta { font-size: 12px; }
.hbtn { width: 48px; height: 48px; background: none; border: 0; display: grid; place-items: center; flex: none; border-radius: 12px; }
.search { display: flex; align-items: center; gap: 10px; min-height: 48px; border: 2px solid var(--action-text); border-radius: 12px; padding: 0 12px; color: var(--action-text); }
.search input { flex: 1; min-width: 0; border: 0; font-size: 16px; background: transparent; color: var(--text); min-height: 44px; }
/* Le focus du champ se montre sur tout le cadre de recherche : anneau du focus, comme partout */
.search:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--focus-gap); }
.search input:focus, .search input:focus-visible { outline: none; box-shadow: none; }
.results { display: flex; flex-direction: column; }
.resbtn { display: flex; align-items: center; gap: 10px; min-height: 48px; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; padding: 4px 0; }

/* --- Tickets : façon ticket de caisse --- */
.tsum .ts { border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.tsum .ts b { font-family: var(--cond); font-size: 34px; line-height: 1; }
.tsum .ts span:last-child { font-size: 12px; }
.tsum .y { background: var(--yellow); color: #0A3D91; }
.tsum .y span:last-child { font-weight: 600; }
.tsum .b { background: var(--action); color: #FFFFFF; }
.receipt { display: flex; flex-direction: column; }
.zig { height: 10px; }
.zig.top { background: radial-gradient(circle at 5px 0, var(--bg) 5px, var(--card) 5.5px) 0 0 / 10px 10px repeat-x; }
.zig.bottom { background: radial-gradient(circle at 5px 10px, var(--bg) 5px, var(--card) 5.5px) 0 0 / 10px 10px repeat-x; }
.paper { background: var(--card); padding: 6px 16px 14px; display: flex; flex-direction: column; gap: 6px; }
.rdate { font-size: 17px; }
.rtotal { font-family: var(--cond); font-size: 22px; }
.rlines { display: flex; flex-direction: column; gap: 6px; font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
.rl { display: flex; justify-content: space-between; gap: 12px; }
.rl span:first-child { min-width: 0; overflow-wrap: anywhere; }
.rl.first, .rl.rsum { border-top: 2px dotted var(--dots); padding-top: 6px; }
.rl.rsum.gain { color: var(--gain); font-weight: 800; }
.rl.disc-line { color: var(--gain); white-space: pre; font-size: 13px; font-weight: 700; }
.rmore { background: none; border: 0; color: var(--muted); font: inherit; min-height: 44px; padding: 0; width: 100%; text-align: left; }

/* --- Réglages --- */
.steprow { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.steprow b { font-size: 16px; }
.steprow .meta { font-size: 12px; }
.steprow.small { padding: 2px 0; }
.stp { width: 48px; height: 48px; border-radius: 12px; font: 800 20px Barlow, sans-serif; flex: none; }
.stp.minus { border: 2px solid var(--link); background: var(--card); color: var(--link); }
.stp.plus { border: 0; background: var(--action); color: #FFFFFF; }
.stp:disabled { border-color: var(--off); color: var(--off); cursor: default; }
.stp.plus:disabled { background: var(--off); color: #FFFFFF; }
.stv { width: 28px; text-align: center; font-family: var(--cond); font-size: 26px; color: var(--link); }
.petsec { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { min-height: 48px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--off); background: var(--card); color: var(--text); font-weight: 600; font-size: 15px; }
.pchip[aria-pressed="true"] { border-color: var(--action); background: var(--tint); color: var(--link); font-weight: 800; }
.tg { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--line); min-height: 56px; }
.tg:last-of-type { border-bottom: 0; }
.tg b { font-size: 16px; }
.switch { width: 60px; height: 48px; border: 0; background: none; position: relative; flex: none; padding: 0; }
.switch span { position: absolute; top: 9px; left: 4px; width: 52px; height: 30px; border-radius: 15px; background: var(--off); transition: background .15s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 12px; background: #FFFFFF; transition: left .15s; }
.switch[aria-checked="true"] span { background: var(--action); }
.switch[aria-checked="true"] span::after { left: 25px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.ppill { min-height: 44px; background: var(--tint); color: var(--link); font-weight: 700; font-size: 14px; padding: 6px 12px; border-radius: 999px; border: 0; }
.addrow { display: flex; gap: 8px; }
.addrow input { flex: 1; min-width: 0; min-height: 48px; border: 2px dashed var(--action-text); border-radius: 12px; padding: 0 12px; background: transparent; font-size: 16px; }
.storebox { display: flex; align-items: center; gap: 10px; border: 2px solid var(--action-text); border-radius: 12px; padding: 6px 12px; color: var(--action-text); }
.storebox b { color: var(--text); font-size: 16px; }
.stores { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.radio { display: flex; gap: 12px; align-items: center; min-height: 56px; padding: 6px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.radio input { width: 24px; height: 24px; accent-color: var(--action); flex: none; }
.radio span { display: flex; flex-direction: column; }

/* --- Bienvenue --- */
.v-bienvenue { background: var(--head); }
body:has(.v-bienvenue) { background: var(--head); }
.welcome { min-height: 100vh; color: #FFFFFF; display: flex; flex-direction: column; gap: 20px; padding: calc(28px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom)); }
.w-head { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
.w-head .ybadge { align-self: flex-start; padding: 4px 10px; }
.w-head h1 { font-family: var(--cond); font-size: 52px; font-weight: 800; line-height: .95; }
.w-head h1:focus { outline: none; box-shadow: none; }
.w-head p { font-size: 17px; color: var(--head-sub); }
.w-card { padding: 18px; gap: 18px; }
.wstep { display: flex; flex-direction: column; gap: 8px; }
.wstep .mini { color: var(--muted); letter-spacing: .06em; font-size: 13px; }
.w-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

/* --- Connexion au site (mot de passe) : mêmes composants que Bienvenue --- */
body.login-page { background: var(--head); }
.login-form { display: flex; flex-direction: column; gap: 20px; flex: 1; }
.field { min-height: 48px; border: 2px solid var(--action-text); border-radius: 12px; padding: 0 12px; background: var(--card); color: var(--text); font-size: 16px; width: 100%; }
.field[aria-invalid="true"] { border-color: var(--red-text); }
.field-err { color: var(--red-text); font-weight: 700; }

/* --- Barre du bas : grande barre bleue flottante --- */
#nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); width: calc(100% - 24px); max-width: 536px;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; background: var(--nav); border-radius: 24px; padding: 8px; box-shadow: var(--nav-shadow); z-index: 10;
}
#nav[hidden] { display: none; }
#nav a { position: relative; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 0 8px; border-radius: 16px; font-size: 13px; color: var(--nav-text); font-weight: 600; min-height: 56px; }
#nav a.is-on { background: var(--yellow); color: #0A3D91; font-weight: 800; }
#nav a:focus-visible { box-shadow: 0 0 0 3px #FFFFFF; outline: 3px solid var(--yellow); }
[hidden] { display: none !important; }
.count { position: absolute; top: 4px; right: 14px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #FFFFFF; font-size: 12px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }

/* Toast */
#toast {
  position: fixed; left: 50%; transform: translate(-50%, 20px); bottom: calc(110px + env(safe-area-inset-bottom)); max-width: calc(100% - 32px);
  background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 20;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

/* Économies grâce aux promos (v6) */
.gain { gap: 4px; }
.gain-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.gain-amt { font-family: var(--cond); font-size: 36px; font-weight: 800; line-height: 1; color: var(--link); }
.gain-pct { font-weight: 700; color: var(--link); }
.gain .meta b { color: var(--text); }
.hgain { color: var(--yellow); }
.week-gain { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: rgba(255,255,255,0.1); border-radius: 12px; padding: 10px 12px; color: #FFFFFF; text-decoration: none; font-weight: 600; }
.week-gain b { font-family: var(--cond); font-size: 26px; font-weight: 800; color: var(--yellow); white-space: nowrap; }
/* Fiche plat : pourquoi, étapes détaillées, astuce */
.why { font-size: 15px; color: var(--text); background: var(--tint); border-radius: 14px; padding: 12px 14px; }
.steplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.step p { line-height: 1.45; }
.tips { gap: 12px; }
.tips p { font-size: 15px; line-height: 1.45; }

/* Panier collé en haut de la Liste : prolonge l'en-tête bleu */
.cartbar { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  background: var(--head); color: #FFFFFF; border-radius: 0 0 18px 18px; padding: 4px 16px 14px; margin: -14px -16px 2px; box-shadow: var(--shadow); }
.cartbar div { display: flex; flex-direction: column; min-width: 0; }
.cartbar .mini { color: var(--head-sub); }
.cartbar b { font-family: var(--cond); font-size: 22px; font-weight: 800; line-height: 1.05; color: #FFFFFF; white-space: nowrap; }
.cartbar b.cb-gain { color: var(--yellow); }
.cartbar div > span:last-child { font-size: 12px; color: var(--head-sub); }

/* Coupons de la liste : prix en rayon à taper */
.pricebtn { white-space: nowrap; flex: none; }
.linkbtn { background: none; border: 0; padding: 4px 0 0; color: var(--link); font: inherit; font-size: 13px; font-weight: 700; text-decoration: underline; cursor: pointer; min-height: 24px; }

/* Points Lidl Plus */
.pts { color: var(--link); }
.ptsline { font-size: 14px; color: var(--head-sub); margin-top: 4px; }
.ptsline b { color: var(--yellow); }

/* Menus complets : entrée et dessert sous le plat */
.menu-day { display: flex; flex-direction: column; gap: 0; }
.menu-day:has(.sides) { background: var(--card); border-radius: 20px; padding: 0 0 8px; box-shadow: var(--shadow-sm); margin-bottom: 6px; }
.menu-day:has(.sides) .plan { margin: 0; box-shadow: none; }
.menu-day .sides { padding: 0 8px; }
.sides { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin-top: 6px; }
.side { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; min-height: 48px; border-radius: 14px; background: var(--tint); color: var(--text); text-decoration: none; }
.side .mini { color: var(--link); }
.side b { font-size: 15px; line-height: 1.25; }

/* Écran Repas : onglets Plats / Repas, repas proposés, retrait d'un choix */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--card); border-radius: 18px; padding: 6px; box-shadow: var(--shadow-sm); margin-top: 6px; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6px 4px; gap: 2px; min-height: 56px; border: 0; border-radius: 14px; background: transparent; color: var(--text); font: 800 17px Barlow, system-ui, sans-serif; }
.tab span { font-size: 12px; font-weight: 600; color: var(--muted); }
.tab[aria-selected="true"] { background: var(--yellow); color: #0A3D91; }
.tab[aria-selected="true"] span { color: #0A3D91; }
.meal { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.meal-parts { display: flex; flex-direction: column; gap: 6px; }
.meal-parts a, .meal-parts .nopart { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 12px; background: var(--tint); color: var(--text); text-decoration: none; font-weight: 700; font-size: 15px; }
.meal-parts a.main { font-size: 17px; }
.meal-parts .mini { color: var(--link); }
.meal-parts .nopart { font-weight: 500; color: var(--muted); }
.menu-day { position: relative; }
.rm { position: absolute; top: 6px; right: 6px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--tint); color: var(--text); font-size: 16px; font-weight: 800; }
.menu-day .plan-body { padding-right: 40px; }
.cout summary { font-weight: 700; cursor: pointer; min-height: 32px; }
.crow { gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }

/* Mes likes : grille de 2 colonnes avec photos */
.lgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ltile { position: relative; display: flex; flex-direction: column; gap: 4px; background: var(--card); border-radius: 18px; padding: 10px; box-shadow: var(--shadow-sm); }
.ltile .limg { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 12px; background: var(--photo-bg); overflow: hidden; margin-bottom: 4px; }
.ltile .limg img { width: 100%; height: 100%; object-fit: contain; }
.ltile .limg .noimg { width: 100%; height: 100%; }
.ltile .name { font-size: 15px; line-height: 1.25; }
.ltile .meta { font-size: 12px; flex: 1; }
.ltile .btn { margin-top: 6px; width: 100%; }
.ldeal { position: absolute; left: 6px; bottom: 6px; background: var(--yellow); color: var(--red-on-yellow); font-family: var(--cond); font-weight: 800; font-size: 18px; padding: 2px 8px; border-radius: 8px; }
.ldel { position: absolute; top: 4px; right: 4px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--card); color: var(--muted); font-weight: 800; box-shadow: var(--shadow-sm); }
.lsearch { gap: 8px; }

.recap { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--head); color: #FFFFFF; text-decoration: none; }
.recap .hgain2 { color: var(--yellow); font-family: var(--cond); font-size: 22px; margin-left: auto; }
.anchor { scroll-margin-top: 12px; }

.likeideas { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.small-tiles .ltile { padding: 8px; }
.small-tiles .limg { aspect-ratio: 16 / 9; }
.small-tiles .name { font-size: 14px; }

/* Liste par menu */
.lmenu { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.lmenu-head { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--head); color: #FFFFFF; }
.lmenu-head .mini { color: var(--head-sub); }
.lmenu-head b { font-size: 17px; line-height: 1.25; }
.litem.ref { opacity: .75; min-height: 52px; }

/* Nutrition et mise en avant */
.ntags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.ntag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--tint); color: var(--link); }
.best { outline: 3px solid var(--yellow); outline-offset: -3px; }
.sugg.best { flex-wrap: wrap; }
.bestbadge { flex-basis: 100%; align-self: flex-start; background: var(--yellow); color: #0A3D91; font-weight: 800; font-size: 13px; padding: 3px 10px; border-radius: 999px; width: fit-content; }
.fchip.small { min-height: 40px; padding: 0 12px; font-size: 13px; }
.btnrow.tight { gap: 6px; flex-wrap: nowrap; }
.nutri-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; text-align: center; }
.nutri-grid div { display: flex; flex-direction: column; background: var(--tint); border-radius: 12px; padding: 8px 4px; }
.nutri-grid b { font-family: var(--cond); font-size: 22px; font-weight: 800; color: var(--link); }
.nutri-grid span { font-size: 12px; color: var(--muted); }

/* Planifier la semaine */
.weekplan { gap: 10px; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.day { min-height: 44px; border-radius: 12px; border: 2px solid var(--line); background: transparent; color: var(--text); font: 700 14px Barlow, system-ui, sans-serif; }
.day[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: #0A3D91; }
.reuse { font-size: 13px; font-weight: 700; color: var(--link); margin-top: 2px; }

/* Repas : jours, déjeuner / dîner, 3 cases */
.daystrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dchip { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 58px; border: 0; border-radius: 14px; background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); font-family: Barlow, system-ui, sans-serif; }
.dchip span { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.dchip b { font-family: var(--cond); font-size: 22px; font-weight: 800; line-height: 1; }
.dchip i { position: absolute; top: 5px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--action); }
.dchip[aria-selected="true"] { background: var(--yellow); color: #0A3D91; }
.dchip[aria-selected="true"] span { color: #0A3D91; }
.dchip[aria-selected="true"] i { background: #0A3D91; }
.slots { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.slot { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 16px; background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); text-align: left; }
.slot .mini { color: var(--link); }
.slot.empty { border: 2px dashed var(--dots); background: transparent; box-shadow: none; min-height: 64px; font: inherit; color: var(--link); }
.slot.empty b { font-size: 16px; }
.slot .sname { font-size: 17px; font-weight: 800; color: var(--text); text-decoration: none; }
.slot.filled { position: relative; padding-right: 128px; }
.slot-acts { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); display: flex; gap: 6px; align-items: center; }
.chg { min-height: 40px; padding: 0 12px; border-radius: 12px; border: 2px solid var(--action); background: transparent; color: var(--action-text); font: 700 14px Barlow, system-ui, sans-serif; }
.rm2 { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--tint); color: var(--text); font-weight: 800; }
.picker { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 16px; background: var(--tint); }
.pick { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--card); color: var(--text); text-align: left; font: inherit; }
.pick b { font-size: 15px; }
.pick.leftover { border: 2px solid var(--action); }
.wk { padding: 4px 12px; }
.wkrow { display: grid; grid-template-columns: 70px 1fr; gap: 2px 10px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); text-align: left; font: inherit; font-size: 14px; }
.wkrow:last-child { border-bottom: 0; }
.wkrow b { grid-row: span 2; font-size: 15px; }
.wkrow .mini { color: var(--link); margin-right: 4px; }

/* Repas v3 : semaine en liste, panneau de choix */
.prep { gap: 10px; }
.prep.hero-card { outline: 3px solid var(--yellow); outline-offset: -3px; }
.opt { display: flex; align-items: center; gap: 10px; min-height: 48px; border: 0; background: none; color: var(--text); font: 600 15px Barlow, system-ui, sans-serif; text-align: left; padding: 0; }
.opt .box { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--action); color: #FFFFFF; font-weight: 800; }
.opt[aria-pressed="true"] .box { background: var(--action); }
.btn-lg { min-height: 56px; font-size: 17px; }
.weeklist { display: flex; flex-direction: column; gap: 10px; }
.dcard { background: var(--card); border-radius: 18px; box-shadow: var(--shadow-sm); padding: 10px 12px 4px; }
.dtitle { display: flex; align-items: baseline; gap: 6px; font-size: 17px; font-weight: 800; margin: 0 0 4px; }
.dtitle span { color: var(--muted); font-weight: 700; }
.dtitle em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 800; color: #0A3D91; background: var(--yellow); padding: 2px 8px; border-radius: 999px; }
.mline { display: grid; grid-template-columns: 52px 1fr 16px; align-items: center; gap: 8px; width: 100%; min-height: 56px; padding: 8px 0; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); text-align: left; font: inherit; }
.mwhen { font-size: 13px; font-weight: 800; color: var(--link); text-transform: uppercase; }
.mwhat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mwhat b { font-size: 16px; line-height: 1.25; }
.mchoose { color: var(--action-text); font-weight: 700; }
.mgo { font-size: 22px; color: var(--muted); }
.sheet-back { position: fixed; inset: 0; background: rgba(5, 12, 28, .55); z-index: 40; }
.sheet { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; z-index: 41; background: var(--bg); border-radius: 22px 22px 0 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; box-shadow: 0 -8px 30px rgba(0,0,0,.35); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.stabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: var(--card); border-radius: 14px; padding: 4px; }
.stab { min-height: 44px; border: 0; border-radius: 10px; background: none; color: var(--text); font: 800 15px Barlow, system-ui, sans-serif; }
.stab[aria-selected="true"] { background: var(--yellow); color: #0A3D91; }
.picks { display: flex; flex-direction: column; gap: 6px; }

/* --- v7 : 3 onglets, étapes de la semaine, Promos à onglets, liste par rayon --- */
#nav { grid-template-columns: repeat(3, 1fr); }
.hero .topbar h1 { margin: 0; }
.steps3 { padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.st { display: flex; align-items: center; gap: 12px; padding: 10px; min-height: 60px; border-radius: 14px; border: 0; background: transparent; color: var(--text); text-decoration: none; text-align: left; font: inherit; width: 100%; }
.st b { font-size: 16px; }
.st .meta { font-size: 13px; }
.stn { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 16px; background: var(--tint); color: var(--link); }
.st.is-done .stn { background: var(--action); color: #FFFFFF; }
.st.is-done b { color: var(--muted); }
.st.is-skip { opacity: .75; }
.st.is-cur { background: var(--tint); }
.st.is-cur .stn { background: var(--yellow); color: #0A3D91; }
.stgo { color: var(--muted); font-size: 22px; }
.stsave { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 2px 4px 4px; padding: 10px 12px; border-radius: 12px; background: var(--head); color: #FFFFFF; font-weight: 600; font-size: 14px; }
.stsave b { font-family: var(--cond); font-size: 26px; font-weight: 800; color: var(--yellow); white-space: nowrap; }
details.prep > summary { font-weight: 800; font-size: 16px; color: var(--link); cursor: pointer; min-height: 32px; display: flex; align-items: center; }
details.prep[open] { display: flex; flex-direction: column; }
.ptabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: rgba(255,255,255,0.1); border-radius: 14px; padding: 4px; margin-top: 4px; }
.ptab { min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: #FFFFFF; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.ptab[aria-selected="true"] { background: var(--yellow); color: #0A3D91; font-weight: 800; }
.pcount { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #FFFFFF; font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; }
.ptab[aria-selected="true"] .pcount { background: #0A3D91; color: #FFFFFF; }
.fchip-light { background: var(--card); color: var(--link); box-shadow: var(--shadow-sm); }
.sec-head .linkbtn { font-size: 14px; font-weight: 700; padding: 12px 0; margin: -12px 0; }
.pc-bot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pc-bot .chips { flex: 1; min-width: 0; }
.pcard, .lrow, .hcard { position: relative; }
.addbtn { position: relative; z-index: 1; flex: none; min-width: 84px; }
.onwrap { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.pickrow { display: flex; gap: 6px; align-items: stretch; }
.pickrow .pick { flex: 1; min-width: 0; }
.pickinfo { flex: none; border: 0; border-radius: 12px; background: var(--tint); color: var(--link); font-weight: 700; font-size: 13px; padding: 0 10px; min-width: 64px; }
.lgroup { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.litem > label { cursor: pointer; }
.rmx { flex: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 16px; }
.additem { margin-top: 4px; }

/* --- v7.2 : préparation de la semaine en 2 questions, offres sur une sélection --- */
.pq { display: flex; flex-direction: column; gap: 8px; }
.pq-t { font-size: 15px; font-weight: 700; }
.days-dated { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.days-dated .day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 56px; padding: 4px 0; min-width: 0; width: auto; }
.days-dated .day span { font-size: 12px; font-weight: 600; }
.days-dated .day b { font-size: 18px; font-weight: 800; line-height: 1.1; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.segb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 6px 4px; border-radius: 12px; border: 2px solid var(--off); background: transparent; color: var(--text); text-align: center; }
.segb b { font-size: 14px; }
.segb span { font-size: 11px; color: var(--muted); line-height: 1.2; }
.segb[aria-checked="true"] { border-color: var(--action); background: var(--tint); }
.segb[aria-checked="true"] b { color: var(--link); }
.pq-sum { font-size: 14px; background: var(--tint); border-radius: 12px; padding: 10px 12px; }
.pq-sum b { color: var(--link); }
.gcard { gap: 10px; }
.gprods { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.gprods li { font-size: 13px; padding: 4px 8px; border-radius: 8px; background: var(--tint); color: var(--text); }
.gprods li.is-mine { background: var(--yellow); color: #0A3D91; font-weight: 700; }

/* --- v8 : courses en 1 toucher --- */
.gen { gap: 12px; }
details.gen > summary { font-weight: 800; font-size: 16px; color: var(--link); cursor: pointer; min-height: 32px; display: flex; align-items: center; }
details.gen[open] { display: flex; flex-direction: column; }
.gen-row { display: flex; align-items: center; gap: 10px; }
.gen-row b { font-size: 16px; }
.gen-row .stv { font-family: var(--cond); font-size: 32px; min-width: 32px; text-align: center; }
.seg2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.result { gap: 12px; }
.rdays { display: flex; flex-direction: column; }
.rday { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; font: inherit; width: 100%; }
.rday:last-child { border-bottom: 0; }
.rday b { font-size: 16px; line-height: 1.25; }
.rd-date { flex: none; width: 56px; font-size: 13px; font-weight: 800; color: var(--link); text-transform: capitalize; }
.msum { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; background: var(--tint); border-radius: 14px; padding: 10px 12px; }
.msum div { display: flex; flex-direction: column; min-width: 0; }
.msum b { font-family: var(--cond); font-size: 26px; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.msum b.gain-b { color: var(--link); }
.msum div > span:last-child { font-size: 12px; color: var(--muted); }
.tipsbox { gap: 8px; }
.tiplist { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
/* Points Lidl */
.ptscard { gap: 10px; }
.ptsbig { font-family: var(--cond); font-size: 40px; font-weight: 800; line-height: 1; color: var(--link); }
.camps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.camp { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--tint); }
.camp.is-on { background: var(--yellow); color: #0A3D91; }
.camp.is-on .meta { color: #0A3D91; }
.campx { flex: none; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-family: var(--cond); font-size: 22px; font-weight: 800; background: var(--head); color: var(--yellow); }
.camp b { font-size: 15px; }
/* v9 : conseils du jour dans l'en-tête, réglages « ce que tu ne veux pas voir » */
.dtips { background: rgba(255,255,255,0.1); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.dtips .mini { color: var(--yellow); }
.dtips ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: #FFFFFF; }
.dtips b { color: #FFFFFF; }
.hidebox { gap: 10px; }
.ppill small { font-weight: 500; opacity: .8; }
.ppill.add { border: 2px dashed var(--action-text); background: transparent; }
/* v10 : mes points */
.topbar-end { justify-content: flex-end; }
.rwlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rw { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rw:last-child { border-bottom: 0; }
.rw b { font-size: 15px; }
.rw.is-mine b { color: var(--link); }
.rwpts { flex: none; display: flex; flex-direction: column; align-items: flex-end; }
.rwpts b { font-family: var(--cond); font-size: 22px; font-weight: 800; color: var(--link); line-height: 1; }
.rwpts span { font-size: 11px; color: var(--muted); }
.ptshead { font-family: var(--cond); font-size: 28px; color: var(--yellow); }
.dtips a { color: var(--yellow); }
.when { gap: 8px; }
.when-big { font-size: 20px; font-weight: 800; color: var(--link); line-height: 1.2; }
.budget { font-size: 14px; border-radius: 12px; padding: 10px 12px; background: var(--tint); }
.budget.over { background: var(--red-tint); color: var(--red-text); }
/* v12 : jours en midi / soir, à cuisiner ou reste */
.rdays { gap: 10px; }
.rdayb { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.rdayb:last-child { border-bottom: 0; }
.rd-h { font-size: 15px; font-weight: 800; color: var(--link); margin: 4px 0 2px; }
.rrow { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 0; border: 0; background: transparent; color: var(--text); text-align: left; font: inherit; width: 100%; }
.rrow b { font-size: 16px; line-height: 1.25; }
.rw-when { flex: none; width: 40px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.rtags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.rtag { font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 6px; text-transform: uppercase; letter-spacing: .03em; }
.rtag.cook { background: var(--yellow); color: #0A3D91; }
.rtag.rest { background: var(--tint); color: var(--link); }
.ctxbox { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--yellow); color: #0A3D91; }
.ctxbox.rest { background: var(--tint); color: var(--link); }
.ctxbox span { font-size: 14px; }
/* v13 : en-tête du menu, total de la liste */
.hstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.hstats > * { display: flex; flex-direction: column; gap: 0; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,0.1); color: #FFFFFF; text-decoration: none; min-width: 0; }
.hstats b { font-family: var(--cond); font-size: 24px; font-weight: 800; line-height: 1.05; color: var(--yellow); white-space: nowrap; }
.hstats span span { font-size: 12px; color: var(--head-sub); }
.hstats a span { font-size: 12px; color: var(--head-sub); }
.ltotal { display: flex; flex-direction: column; gap: 2px; }
.ltotal .mini { color: var(--head-sub); }
.ltotal b { font-family: var(--cond); font-size: 40px; font-weight: 800; line-height: 1; color: var(--yellow); }
.ltotal > span:last-child { font-size: 13px; color: var(--head-sub); }

/* v14 : gains en vert, apprentissage */
.tsum .y .gain { color: #14662F; }
.learn { gap: 8px; }
.learn ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.habits { display: flex; flex-wrap: wrap; gap: 6px; }
/* v15 : J'ai déjà / Plus en stock */
.litem .grow label { display: flex; flex-direction: column; cursor: pointer; }
.havebtn { align-self: flex-start; min-height: 32px; font-size: 13px; }
.plclist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.plclist li { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; border-bottom: 1px solid var(--line); }
.plclist li:last-child { border-bottom: 0; }
.noing { align-self: flex-start; font-size: 12px; min-height: 28px; color: var(--muted); }
.price.offert { color: var(--gain); font-family: var(--cond); font-size: 20px; }
.rwchip { display: inline-flex; align-items: center; gap: 0; }
.rwchip .rmx { width: 36px; height: 36px; }
.rw .rmx { width: 36px; height: 36px; }
.seg { grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); }
.meta.reuse { color: var(--link); font-weight: 600; }
.havelink { align-self: flex-start; font-size: 12px; min-height: 28px; margin-right: 12px; }
.use .grow { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 0; }
.use .grow > b, .use .grow > .meta { flex-basis: 100%; }
/* v20 : onglets Repas / Ingrédients */
.mtabs { background: var(--tint); grid-template-columns: 1fr 1fr; }
.mtabs .ptab { color: var(--link); }
.mtabs.pmtabs { grid-template-columns: repeat(3, 1fr); margin: 8px 0 4px; }
.mtabs .ptab[aria-selected="true"] { background: var(--yellow); color: #0A3D91; }
.ingchips { display: flex; flex-wrap: wrap; gap: 6px; }
.ingchip { display: inline-flex; align-items: center; gap: 2px; padding-left: 10px; border-radius: 999px; background: var(--tint); color: var(--text); font-size: 14px; font-weight: 600; }
.ingchip small { color: var(--muted); font-weight: 500; }
.ingchip .rmx { width: 36px; height: 36px; }
.meta.liked { color: var(--red-ink); font-weight: 700; }

/* Chez moi (stock) */
.stocklink { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; margin-top: 12px; }
.stocklink .meta { display: block; }
.stform { display: flex; flex-direction: column; gap: 6px; }
.stform label { font-weight: 700; margin-top: 6px; }
.stform input { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 16px; background: var(--card); color: inherit; }
.stform .btn { margin-top: 10px; }
.stwhere { border: 0; padding: 0; margin: 6px 0 0; }
.stwhere legend { font-weight: 700; padding: 0; margin-bottom: 6px; }
.ppill.is-on { background: var(--link); color: var(--card, #fff); }
.stlist { list-style: none; margin: 0 0 12px; padding: 4px 12px; }
.strow { display: flex; align-items: center; gap: 8px; min-height: 52px; border-bottom: 1px solid var(--line); }
.strow:last-child { border-bottom: 0; }
.strow .meta { display: block; }
.haveb { flex: none; align-self: center; border: 1.5px solid var(--link); color: var(--link); background: #fff; border-radius: 999px; padding: 6px 10px; font: inherit; font-size: 13px; font-weight: 700; line-height: 1.1; white-space: nowrap; cursor: pointer; min-height: 36px; }
.haveb:active { background: var(--tint); }
.rmx.homebtn { color: var(--link); display: inline-flex; align-items: center; justify-content: center; }
.card.stocklink { flex-direction: row; align-items: center; text-align: left; }
.stocklink .grow { display: block; flex: 1; }

/* Je passe en caisse */
.checkout { border: 2px solid var(--action-text); }
.costeps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 14px; }
.costeps > li > b { display: block; margin-bottom: 6px; }
.costeps .btn { margin-top: 6px; }
.colist { list-style: none; margin: 0 0 6px; padding: 0; }
.colist li { display: flex; align-items: center; gap: 10px; min-height: 48px; border-bottom: 1px solid var(--line); }
.colist li:last-child { border-bottom: 0; }
.colist .meta { display: block; }
.coico { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.colist .is-on .coico { background: var(--gain); color: var(--card); }
.colist .is-off .coico { background: var(--red); color: #FFFFFF; }
.offlist { margin-top: 4px; }
.offlist summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; color: var(--link); cursor: pointer; }
.gocaisse { width: 100%; margin: 6px 0 4px; }
.v-caisse .checkout { border: 0; }
.herocaisse { align-self: flex-start; margin-top: 10px; }

/* Carte Lidl Plus (QR) : toujours sur fond blanc, même en mode sombre, pour la caisse */
.lpcard { background: #FFFFFF; color: #161616; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 4px 0; box-shadow: var(--shadow); }
.lpcard svg { width: min(68vw, 260px); height: auto; display: block; }
.lpnum { font-size: 15px; letter-spacing: .06em; font-variant-numeric: tabular-nums; color: #161616; }

/* Photo d'une offre du catalogue : carré découpé dans l'image de la page */
.cropimg { display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden; background: #FFFFFF; border-radius: 8px; }
.cropimg > span { display: block; height: 100%; aspect-ratio: 1; background-repeat: no-repeat; }

/* Icône d'un produit sans photo (🥚, 🍅…) dans le même cadre qu'une vignette */
.emoimg { display: grid; place-items: center; flex: none; background: var(--tint); border-radius: 8px; font-size: 22px; line-height: 1; }
.emoimg.thumb80 { font-size: 40px; }
.emoimg.thumb60 { font-size: 28px; }

/* Visuels uniformes : chaque photo, photo du catalogue ou icône dans le même cadre blanc arrondi (clair et sombre) */
:root { --visual-bg: #FFFFFF; --visual-line: #E3E7ED; --photo-bg: #FFFFFF; }
.thumb48, .thumb60, .thumb80, span.thumb48, span.thumb60, .noimg, .cropimg, .emoimg {
  background: var(--visual-bg); border: 1px solid var(--visual-line); border-radius: 10px; box-sizing: border-box; overflow: hidden;
}
img.thumb48, img.thumb60, img.thumb80 { padding: 3px; }
.cropimg { padding: 2px; }
.cropimg > span { border-radius: 7px; }
.dish-img .noimg, .ltile .limg .noimg { border: 0; border-radius: 0; }
.credits { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }

/* Cartes carrées des promos : grande photo pour bien voir le produit (2 par ligne, 3 sur grand écran) */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (min-width: 560px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 8px 8px 10px; border-radius: 16px; min-width: 0; }
.tile-img { position: relative; }
.tile-pic, img.tile-pic, span.tile-pic { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 12px; }
img.tile-pic { padding: 6px; }
.cropimg.tile-pic { padding: 3px; }
.cropimg.tile-pic > span { width: 100%; height: 100%; border-radius: 10px; }
.emoimg.tile-pic { display: grid; place-items: center; font-size: 64px; }
.tile-deal { position: absolute; top: 6px; left: 6px; background: var(--red); color: #FFFFFF; font-family: var(--cond); font-weight: 800; font-size: 15px; line-height: 1; padding: 5px 7px; border-radius: 8px; max-width: calc(100% - 12px); }
.tile .name { font-size: 15px; line-height: 1.25; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tile-price { font-family: var(--cond); font-size: 24px; font-weight: 800; color: var(--text); line-height: 1.1; }
.tile-price .was { font-family: inherit; font-size: 15px; font-weight: 600; color: var(--muted); text-decoration: line-through; }
.tile .meta { font-size: 12px; }
.tile .dchip { align-self: flex-start; font-size: 12px; }
.tile-btn { margin-top: auto; padding-top: 6px; }
.tile-btn .addbtn, .tile-btn .pill { width: 100%; min-height: 44px; }
.morewide { width: 100%; margin-bottom: 14px; }
.tile-pic { background: var(--visual-bg); border: 1px solid var(--visual-line); box-sizing: border-box; overflow: hidden; }

/* Choix de la semaine de promos (Promos, Menu, Liste) */
.wkswitch { display: flex; gap: 8px; margin: 10px 0 4px; overflow-x: auto; scrollbar-width: none; }
.wkb { flex: 1 0 auto; min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; padding: 6px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.5); background: transparent; color: #FFFFFF; font: inherit; text-align: left; cursor: pointer; }
.wkb b { font-size: 15px; font-weight: 800; }
.wkb span { font-size: 13px; color: var(--head-sub); }
.wkb[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: #0A3D91; }
.wkb[aria-pressed="true"] span { color: #0A3D91; }
/* Liste : photos plus grandes */
.thumb72 { width: 72px; height: 72px; object-fit: contain; flex: none; background: var(--visual-bg); border: 1px solid var(--visual-line); border-radius: 10px; box-sizing: border-box; overflow: hidden; }
img.thumb72 { padding: 4px; }
.emoimg.thumb72 { font-size: 38px; }
.litem.done .thumb72 { opacity: .5; }
/* Ligne de liste : case, grande photo, nom en haut, prix en dessous (le nom garde la place sur téléphone) */
.litem.lgrid { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; align-items: center; padding: 8px 10px; }
.lgrid > input { grid-column: 1; grid-row: 1 / span 2; }
.lgrid > .thumb72, .lgrid > .noimg, .lgrid > .cropimg, .lgrid > .emoimg { grid-column: 2; grid-row: 1 / span 2; }
.lgrid > .grow { grid-column: 3; grid-row: 1; align-self: end; min-width: 0; }
.lgrid > .amt, .lgrid > .pricebtn { grid-column: 3; grid-row: 2; justify-self: start; align-self: start; }
.lgrid > .amt { flex-direction: row; align-items: baseline; flex-wrap: wrap; column-gap: 10px; }
.lgrid > .rmx, .lgrid > .haveb { grid-column: 4; grid-row: 1 / span 2; }
.lgrid:not(:has(> .amt, > .pricebtn)) > .grow { grid-row: 1 / span 2; align-self: center; }
.lgrid .name { overflow-wrap: anywhere; }
/* Réglages du menu changés : bouton pour refaire le menu et la liste */
.applybox { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--tint); }
.applybox.is-stale { background: var(--yellow); color: var(--on-yellow); }
.applybox.is-stale .meta, .applybox.is-stale p { color: var(--on-yellow); }
.note-card.applybox { margin: 0 0 12px; }

/* --- Accessibilité (audit 2026-11-07) ------------------------------------------------------------ */
.card .ptsline { color: var(--muted); }
.card .ptsline b { color: var(--link); }
html:has(.cartbar) { scroll-padding-top: 96px; }
.stretch:focus-visible { outline: none; box-shadow: none; }
.stretch:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--focus-gap); }
.stform input, .stform select { border: 2px solid var(--action-text); }
.day[aria-pressed="true"], .day[aria-checked="true"], .mtabs .ptab[aria-selected="true"] { box-shadow: inset 0 0 0 2px #0A3D91; font-weight: 800; }
::placeholder { color: var(--muted); opacity: 1; }
.skel { animation-iteration-count: 4; }
.linkbtn:not(p .linkbtn):not(.meta .linkbtn), .rmx, .rm2, .ldel, .chg, .fchip.small, .havebtn, .havelink, .noing { min-height: 44px; }
.rmx, .rm2, .ldel { min-width: 44px; }
.secnote { margin: -4px 0 8px; }

/* Tes économies cette semaine (haut du menu) */
.dtips .dtbig { margin: 0; display: flex; flex-direction: column; gap: 2px; color: #FFFFFF; }
.dtips .dtbig b { font-size: 26px; line-height: 1.1; }
.dtips .dtbig span { font-size: 13px; opacity: .9; }
.dtips .dtcoupons { font-size: 13px; opacity: .9; }
.dtips .btn { align-self: flex-start; }

/* Recette au Monsieur Cuisine : réglage à taper sous chaque étape */
.cooktabs { margin: 8px 0 4px; }
.steps .mcset { display: inline-block; margin-top: 6px; padding: 4px 10px; border-radius: 999px; background: #FFF2C2; color: #0A3D91; font-weight: 800; font-size: 14px; }
.steps .step p { display: flex; flex-direction: column; align-items: flex-start; }

/* Coupon Lidl Plus sur un ingrédient (fiche recette) */
.cpn { color: #0A3D91; font-weight: 600; white-space: nowrap; }

/* Avant de passer en caisse : points à échanger, coupons à activer, produit par produit */
.plan .plan-big { display:block; margin:4px 0 10px; font-size:1.05rem; }
.plansteps { list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.plansteps li { display:flex; gap:10px; align-items:flex-start; }
.plansteps .plico { flex:0 0 26px; height:26px; border-radius:50%; display:grid; place-items:center; font-weight:700; font-size:.9rem; background:#FFF0B3; color:#7A5A00; }
.plansteps .is-on .plico { background:#DDF5E3; color:#1B6B36; }
.plansteps .is-pts .plico { background:#E3ECFF; color:#0A3D91; }
.plansteps .is-skip { opacity:.75; }
.plansteps .is-skip .plico { background:#EEE; color:#666; }
.plansteps .grow { display:block; }
.plansteps .meta { display:block; }
.plansteps .btn { align-self:center; }

/* Quand faire tes courses : jours comparés */
.sdays { list-style:none; margin:8px 0 6px; padding:0; display:grid; gap:10px; }
.sday { display:flex; gap:10px; align-items:center; padding:8px 10px; border:1px solid #E3ECFF; border-radius:12px; }
.sday.is-cur { background:#F2F6FF; border-color:#0A3D91; }
.sday .grow { display:block; }
.sday .meta { display:block; }
.sday .pill { margin-left:6px; vertical-align:middle; }

/* Le chat */
.catlist { list-style:none; margin:6px 0; padding:0; display:grid; gap:8px; }
.catline { display:flex; gap:10px; align-items:center; padding:6px 0; border-bottom:1px solid #EEF2FA; }
.catline:last-child { border-bottom:0; }
.catline .grow { display:block; }
.catline .meta { display:block; }
.catline.is-in b { color:#0A3D91; }

/* Prévu / payé */
.gaplist { list-style:none; margin:10px 0 6px; padding:0; display:grid; gap:8px; }
.gaplist li { display:flex; gap:10px; align-items:center; padding:6px 0; border-bottom:1px solid #EEF2FA; }
.gaplist li:last-child { border-bottom:0; }
.gaplist .grow { display:block; }
.gaplist .meta { display:block; }
.hstats a { color:inherit; text-decoration:none; }

/* Liste allégée : une ligne par article, le détail au toucher */
.litem .rowmore { display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; text-align:left; background:none; border:0; padding:0; font:inherit; color:inherit; cursor:pointer; width:100%; }
.litem .rowmore.is-open { -webkit-line-clamp:unset; }
.litem .rowmore:focus-visible { outline:2px solid var(--link); outline-offset:2px; border-radius:4px; }

/* Caisse : QR plus grand */
.checkout .lpcard svg { width:min(84vw, 340px); }

/* Mode cuisine */
.cookbtn { margin:6px 0 10px; width:100%; }
.cookmode { position:fixed; inset:0; z-index:60; background:#FFFFFF; display:flex; flex-direction:column; padding:16px 18px calc(16px + env(safe-area-inset-bottom)); }
.cookmode > * { width:min(100%, 600px); margin-left:auto; margin-right:auto; }
.cook-head { display:flex; align-items:center; gap:10px; }
.cook-head .mini { flex:1; color:var(--link); }
.cook-n { font-weight:700; color:#0A3D91; }
.cook-body { flex:1; display:flex; flex-direction:column; justify-content:center; gap:22px; overflow:auto; }
.cook-txt { font-size:clamp(22px, 5.5vw, 30px); line-height:1.35; font-weight:600; margin:0; }
.cook-set { display:flex; flex-wrap:wrap; gap:10px; }
.cook-set span { background:#0A3D91; color:#fff; font-weight:800; font-size:clamp(20px, 5vw, 28px); padding:10px 16px; border-radius:14px; }
.cook-nav { display:flex; gap:10px; }
.cook-nav .btn { flex:1; min-height:56px; font-size:18px; }

/* Balayage sur une ligne de la liste */
.litem { touch-action: pan-y; transition: transform .15s; }
.litem.swiping { transition: none; }
.litem.swipe-ready { background: #E3ECFF; }
#toast.has-act { pointer-events: auto; display: flex; align-items: center; gap: 14px; }
.toast-act { background: none; border: 0; color: var(--yellow, #FFD500); font: inherit; font-weight: 800; cursor: pointer; padding: 0; }

/* Curseur Prix ↔ Variété */
.varrow { margin:12px 0 6px; }
.varrow label { display:flex; justify-content:space-between; gap:10px; align-items:baseline; margin-bottom:6px; }
.varrow label .meta { text-align:right; }
.varrow input[type=range] { width:100%; accent-color:#0A3D91; height:32px; }

/* Interrupteur (réglages) */
.togrow { display:flex; align-items:center; gap:12px; width:100%; text-align:left; background:#fff; border:1px solid #E3ECFF; border-radius:12px; padding:10px 12px; margin:10px 0; font:inherit; color:inherit; cursor:pointer; }
.togrow .grow { display:block; }
.togrow .meta { display:block; }
.tog { flex:0 0 44px; height:26px; border-radius:13px; background:#CBD5E1; position:relative; transition:background .15s; }
.tog::after { content:''; position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:#fff; transition:left .15s; box-shadow:0 1px 2px rgba(0,0,0,.2); }
.tog.on { background:#0A3D91; }
.tog.on::after { left:21px; }
.rrow.is-skip .meta u { text-decoration:underline; }

/* Aperçu avant génération : plats et aliments retenus */
.preview { margin: 8px 0 12px; }
.preview .ingchips { margin-top: 6px; }
.ingchip.is-promo { background: #FFF3B0; }

/* Liste : « Je n'aime pas » apparaît quand la ligne est dépliée */
.noing-l { display: none; font-size: 13px; margin-top: 2px; }
.litem .rowmore.is-open ~ .noing-l { display: inline-block; }

/* Préparer la semaine : promos intéressantes, non par aliment, puis le menu */
.prep .pq-t { margin: 14px 0 6px; }
.prep .ingchips { margin-top: 8px; }
.prep .btn-lg { margin-top: 14px; width: 100%; }
.ingchip .used { color: var(--link); font-weight: 600; }

/* Barre du bas : trois étapes numérotées */
#nav a { flex-direction: row; gap: 8px; padding: 10px 6px; font-size: 14px; }
.stepn { width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.18); color: #FFFFFF; display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; }
#nav a.is-on .stepn { background: #0A3D91; color: #FFD500; }
#nav a.is-done .stepn { background: #2E7D32; color: #FFFFFF; }
#nav a.is-on.is-done .stepn { background: #2E7D32; }
#nav a.is-now:not(.is-on) { box-shadow: inset 0 0 0 2px rgba(255,213,0,.7); }
@media (max-width: 380px) { #nav a { font-size: 13px; gap: 6px; } }
/* Préparer : réglages et toutes les promos, repliés */
details.mset summary, details.allpromos summary { display: flex; flex-direction: column; gap: 2px; cursor: pointer; list-style: none; }
details.mset summary::-webkit-details-marker, details.allpromos summary::-webkit-details-marker { display: none; }
details.mset summary::after, details.allpromos summary::after { content: '▾'; position: absolute; right: 18px; top: 16px; color: var(--muted); }
details.mset, details.allpromos summary { position: relative; }
details.mset[open] summary::after, details.allpromos[open] summary::after { content: '▴'; }
details.allpromos { margin-top: 12px; }
details.allpromos .psec { margin-top: 10px; }
.psec .ptabs { margin: 8px 0 12px; }
/* Ma semaine : aujourd'hui */
.rdayb.is-today { background: #FFF8D6; margin: 0 -8px; padding: 6px 8px; border-radius: 12px; }
.rdayb.is-today .rd-h { color: #0A3D91; }
.sublink { color: #FFFFFF; text-decoration: underline; }

/* --- v21 : deux écrans, Ma semaine (Menus / Ingrédients) et Au magasin --- */
#nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#nav a { flex-direction: column; gap: 4px; padding: 9px 0 8px; font-size: 13px; }
.wktabs { grid-template-columns: 1fr 1fr; margin-top: 12px; }
.irow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.irow .grow { min-width: 0; }
.irow .grow b { display: block; font-size: 15px; }
.irow .grow .meta { display: block; font-size: 13px; }
.irow.is-off .grow b { text-decoration: line-through; color: var(--muted); }
.iprice { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; text-align: right; }
.iprice b { font-size: 15px; white-space: nowrap; }
.itag { font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--line); color: var(--muted); white-space: nowrap; }
.itag.promo { background: #FFF3B0; color: #6B4E00; }
.itag.bon { background: #DDF3E2; color: #1E5E2E; }
.itag.cpn { background: var(--tint); color: var(--link); }
.itag.pts { background: #DDF3E2; color: #1E5E2E; }
.igroup { margin: 16px 0 2px; }
.exclu { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 4px; }
.echip { border: 0; border-radius: 999px; background: var(--tint); color: var(--link); font: inherit; font-weight: 700; font-size: 14px; padding: 6px 12px; min-height: 36px; }
.regenbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(100px + env(safe-area-inset-bottom)); width: calc(100% - 24px); max-width: 536px; z-index: 11; display: flex; align-items: center; gap: 8px; background: #0A3D91; color: #FFFFFF; border-radius: 16px; padding: 10px 10px 10px 14px; box-shadow: var(--nav-shadow); }
.regenbar .grow { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.regenbar .grow b { font-size: 15px; }
.regenbar .btn-ghost { color: #FFFFFF; border-color: rgba(255,255,255,.5); background: transparent; }
main.has-regen { padding-bottom: 180px; }
.qrbtn { border: 0; border-radius: 12px; background: var(--yellow); color: #0A3D91; font: inherit; font-weight: 800; font-size: 15px; padding: 10px 14px; min-height: 44px; }
details.mset summary { display: flex; flex-direction: column; gap: 2px; cursor: pointer; list-style: none; position: relative; padding-right: 24px; }
details.mset summary::-webkit-details-marker { display: none; }
details.mset summary::after { content: '▾'; position: absolute; right: 0; top: 2px; color: var(--muted); }
details.mset[open] summary::after { content: '▴'; }
.gen .gen-row, .gen .varrow, .gen .seg, .gen .pq { margin-top: 12px; }

.cklist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cklist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.cklist li:first-child { border-top: 0; }
.cklist .grow { display: flex; flex-direction: column; min-width: 0; }
.ckico { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.cklist .is-ok .ckico { background: #DDF3E2; color: #1E5E2E; }
.cklist .is-todo .ckico { background: #FFF3B0; color: #6B4E00; }

/* --- v21-3 : Profil, promos à utiliser, jour conseillé --- */
#nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.days-dated .day.is-best { border-color: #2E7D32; }
.shopday { display: flex; align-items: center; gap: 10px; background: var(--tint); border-radius: 12px; padding: 10px 12px; }
.shopday .grow { display: flex; flex-direction: column; }
.days-dated .day small { font-size: 10px; font-weight: 700; color: #1E5E2E; line-height: 1; }
.wantlist { display: flex; flex-direction: column; margin-top: 6px; }
.wrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.wrow input { width: 22px; height: 22px; flex: none; accent-color: #0A3D91; }
.wrow .grow { display: flex; flex-direction: column; min-width: 0; }
.wrow .grow b { font-size: 15px; }
.wverd { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; max-width: 42%; text-align: right; }
.wverd .mk { font-size: 12px; color: var(--muted); }
.wverd .mk.good { color: #1E5E2E; font-weight: 700; }
.wverd .mk.bad { color: var(--red); font-weight: 700; }
.wrow.is-on { background: #F3F8FF; margin: 0 -8px; padding: 10px 8px; border-radius: 10px; }
.profsec .h3 { margin: 0 0 4px; }
.ingadd { margin-top: 8px; }

.selband { display: flex; flex-direction: column; gap: 2px; background: #FFF3B0; color: #4A3700; border-radius: 12px; padding: 10px 12px; margin: 6px 0 4px; }
.selband b { font-size: 15px; }
.selband .meta { color: #5C4A10; }

.aibusy { display: flex; align-items: center; gap: 12px; background: var(--tint); border-radius: 14px; padding: 14px; margin-top: 12px; }
.aibusy > span:last-child { display: flex; flex-direction: column; }
.spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #C3CCD8; border-top-color: #0A3D91; animation: aispin 0.9s linear infinite; flex: none; }
@keyframes aispin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }

/* --- v23-20 : Profil en quatre onglets (Chez moi, Mes goûts, Bilan, Réglages) --- */
.prtabs { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 12px; }
.prtabs .ptab { font-size: 14px; padding: 0 4px; text-align: center; line-height: 1.15; }
.psub { margin: 0 0 12px; }
.consub + .consub { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.consub-t { font-size: 15px; font-weight: 800; margin: 0 0 4px; }
.hidebox summary.h3 { cursor: pointer; }

/* --- v23-22 : « Tes remises cette semaine » posé sur la page claire (Au magasin) : sa propre carte bleue --- */
main .dtips { background: #0A3D91; border-radius: 18px; padding: 16px 18px; gap: 8px; }
main .dtips ul, main .dtips li, main .dtips .meta, main .dtips .dtcoupons { color: #FFFFFF; }
main .dtips .meta, main .dtips .dtcoupons, main .dtips .dtbig span { opacity: .85; }
main .dtips a { color: var(--yellow); }

/* --- v23-25 : Ma semaine, Régénérer et Réglages dans l'en-tête --- */
.wkacts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.wkact { min-height: 44px; border: 0; border-radius: 12px; background: rgba(255,255,255,0.14); color: #FFFFFF; font-weight: 700; font-size: 15px; }
.wkact[aria-expanded="true"] { background: var(--yellow); color: #0A3D91; }
.msetpanel .between { align-items: center; margin-bottom: 4px; }
.wkact { display: flex; align-items: center; justify-content: center; gap: 8px; }

/* --- v23-27 : réglages au bout de la ligne des semaines, étiquette en contour blanc, Promos et offres en 4 onglets --- */
.wkswitch { align-items: stretch; }
.wkgroup { display: flex; gap: 8px; flex: 1; min-width: 0; }
.wkset { flex: none; width: 52px; min-height: 52px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.5); background: transparent; color: #FFFFFF; display: grid; place-items: center; cursor: pointer; }
.wkset svg { width: 22px; height: 22px; }
.wkacts { grid-template-columns: 1fr; }
.topbtns .iconbtn { background: transparent; border: 1px solid rgba(255,255,255,0.5); color: #FFFFFF; }
.topbtns .iconbtn svg { stroke: #FFFFFF; }
.mtabs.pmtabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mtabs.pmtabs .ptab { font-size: 14px; padding: 0 4px; }

/* --- v23-28 : écran de chargement pendant que Mogette travaille --- */
.aiload { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.aiload-h { display: flex; align-items: center; gap: 12px; }
.aiload-h > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.aisteps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--muted); }
.aisteps li { padding-left: 22px; position: relative; }
.aisteps li::before { content: ''; position: absolute; left: 4px; top: .45em; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.aisteps li.done { color: var(--text, inherit); }
.aisteps li.done::before { display: none; }
.aisteps li.done { padding-left: 0; }
.aisteps li.now { color: inherit; font-weight: 800; }
.aisteps li.now::before { background: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 210, 0, .35); }

/* Quantités de chaque étape : à peser sans remonter à la liste des ingrédients */
.steps .stepw { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.steps .stepw b { padding: 3px 10px; border-radius: 999px; background: var(--tint); color: var(--ink, #161616); font-size: 14px; }
.cook-w { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cook-w li { display: flex; flex-direction: column; background: #FFF2C2; color: #0A3D91; border-radius: 14px; padding: 10px 16px; }
.cook-w b { font-size: clamp(24px, 6vw, 34px); font-weight: 800; line-height: 1.1; }
.cook-w span { font-size: 16px; font-weight: 600; }
