/* Mes Courses — charte « mes courses. » (encre, papier, sable ; orange réservé aux promos, vert aux économies).
   Polices hébergées ici : Schibsted Grotesk (interface et prix), Newsreader italique (une phrase de ton par écran). */
@import url("/static/fonts/fonts.css");

:root {
  --bg: #F4F2EC;          /* sable : fond, photos */
  --surface: #FFFFFF;     /* papier : cartes */
  --surface-2: #F4F2EC;
  --text: #121417;        /* encre */
  --muted: #5B5F66;
  --faint: #8A8D93;
  --border: #E3E0D8;      /* trait */
  --primary: #121417;     /* action principale : noir plein */
  --primary-ink: #FFFFFF;
  --primary-soft: #ECEAE3;
  --promo: #E8501A;       /* prix : promos seulement */
  --promo-ink: #C2410C;   /* prix en promo, lisible sur blanc */
  --promo-soft: #FDE6DC;
  --promo-deep: #9A3410;
  --save: #0E6B43;        /* épargne : économies, remplir le panier */
  --save-soft: #E2F0E7;
  --save-deep: #0A4F31;
  --accent: var(--promo);
  --ok: var(--save);
  --danger: #B42318;
  --radius: 14px;
  --nav-h: 66px;
  --sans: "Schibsted Grotesk", ui-sans-serif, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.02em; }
h1 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 2.1rem; letter-spacing: -.02em; }
h2 { font-size: 1.25rem; font-weight: 800; }
h3 { font-size: 1.02rem; font-weight: 800; }
a { color: var(--save); text-underline-offset: 3px; }
a:hover { color: var(--save-deep); }
img { display: block; }
button, input, select { font: inherit; color: inherit; }
strong, b { font-weight: 800; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }
[hidden] { display: none !important; }
.i { display: block; flex: none; }
/* pas de chiffres à largeur fixe : dans cette police ils élargissent aussi la virgule des prix (« 2 , 15 € ») */

/* --- Structure --- */
.shell { min-height: 100vh; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .75rem;
  padding: .75rem 16px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: .55rem; }
.wordmark { font-weight: 900; font-size: 1.3rem; letter-spacing: -.045em; line-height: 1; white-space: nowrap; }
.wordmark .dot { color: var(--promo); }
.topbar .spacer { flex: 1; }
.save-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--save); opacity: .3; transition: opacity .3s; }
.save-dot.busy { background: var(--promo); opacity: 1; }
.save-dot.err { background: var(--danger); opacity: 1; }
main { padding: 20px 16px 28px; max-width: 1180px; margin: 0 auto; }
nav.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: flex;
  background: var(--surface); border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom); height: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
nav.tabs a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--faint); font-size: .72rem; font-weight: 700;
}
nav.tabs a .ico { line-height: 1; }
nav.tabs a .lbl { display: none; }
nav.tabs a .lbl-short { white-space: nowrap; }
nav.tabs a.active { color: var(--text); }
@media (max-width: 899px) { nav.tabs a.desk-only { display: none; } }
@media (min-width: 900px) {
  .shell { padding-bottom: 0; padding-left: 232px; }
  nav.tabs {
    top: 0; right: auto; width: 232px; height: 100vh; flex-direction: column; justify-content: flex-start; gap: 2px;
    border-top: 0; border-right: 1px solid var(--border); padding: 84px 16px 16px;
  }
  nav.tabs a { flex: 0 0 auto; flex-direction: row; justify-content: flex-start; gap: .75rem; padding: .7rem .9rem;
    border-radius: 12px; font-size: .97rem; color: var(--muted); }
  nav.tabs a .lbl { display: inline; }
  nav.tabs a .lbl-short { display: none; }
  nav.tabs a:hover { background: var(--bg); color: var(--text); }
  nav.tabs a.active { background: var(--text); color: #fff; }
  .topbar { padding-left: 248px; margin-left: -232px; z-index: 35; }
  .topbar .brand { position: fixed; left: 24px; top: 8px; z-index: 40; }
  main { padding: 32px 36px 40px; }
}

/* --- Composants --- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 12px; }
.grid.kpis { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .grid.kpis { grid-template-columns: repeat(4, 1fr); } }
.grid.cards { grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid.cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .grid.cards { grid-template-columns: repeat(3, 1fr); } }
.grid.charts { grid-template-columns: 1fr; }
@media (min-width: 1000px) { .grid.charts { grid-template-columns: 1fr 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px;
  padding: .55rem 1.15rem; border-radius: 999px; border: 1.5px solid var(--text); background: var(--surface);
  cursor: pointer; text-decoration: none; color: var(--text); font-weight: 700; line-height: 1.2;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--text); border-color: var(--text); color: #fff; }
.btn.primary:hover { background: #2A2E33; }
.btn.accent, .btn.save { background: var(--save); border-color: var(--save); color: #fff; }
.btn.accent:hover, .btn.save:hover { background: var(--save-deep); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--bg); }
.btn.sm { min-height: 36px; padding: .3rem .8rem; font-size: .88rem; border-width: 1px; border-color: var(--border); }
.btn.sm.primary { border-color: var(--text); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.danger { color: var(--danger); border-color: currentColor; }

input[type=text], input[type=password], input[type=search], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: 46px; padding: .55rem .9rem; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--surface);
}
input:focus, select:focus, textarea:focus { border-color: var(--text); outline: none; }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
label.field { display: block; }
label.field > span { display: block; font-size: .86rem; font-weight: 700; color: var(--muted); margin-bottom: .3rem; }
.check { display: flex; gap: .55rem; align-items: center; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--save); }

.chip {
  display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .85rem; border-radius: 999px;
  background: var(--surface); font-size: .86rem; font-weight: 700; border: 1px solid var(--border); cursor: pointer; white-space: nowrap;
}
.chip.on { background: var(--text); border-color: var(--text); color: #fff; }
.chip .x { opacity: .6; }
.badge { display: inline-flex; align-items: center; gap: .25rem; padding: .22rem .65rem; border-radius: 999px;
  font-size: .78rem; font-weight: 800; white-space: nowrap; }
.badge.l5 { background: var(--promo-ink); color: #fff; }
.badge.l4 { background: var(--promo-soft); color: var(--promo-deep); }
.badge.l3 { background: #F7EEDC; color: #7A4B00; }
.badge.l2 { background: var(--save-soft); color: var(--save-deep); }
.badge.l1 { background: var(--bg); color: var(--muted); }
.badge.l0 { background: #FEE4E2; color: #912018; }
.tag { font-size: .74rem; font-weight: 700; padding: .15rem .5rem; border-radius: 6px; background: var(--bg); color: var(--muted); }

.kpi .v { font-size: 1.9rem; font-weight: 900; letter-spacing: -.035em; line-height: 1.1; }
.kpi .l { color: var(--muted); font-size: .84rem; }

/* Carte affaire : la photo sur sable, le prix d'abord */
.deal { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: start; }
.deal .ph, .thumb { width: 92px; height: 92px; border-radius: 12px; background: var(--bg); object-fit: contain; padding: 6px; mix-blend-mode: multiply; }
.deal .name { font-weight: 800; cursor: pointer; line-height: 1.3; margin-top: .35rem; }
.deal .prices { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; margin: .3rem 0; }
.deal .now { font-size: 1.6rem; font-weight: 900; letter-spacing: -.035em; color: var(--promo-ink); }
.deal .was { text-decoration: line-through; color: var(--muted); font-size: .88rem; }
.deal .prices strong { background: var(--promo); color: #fff; font-size: .8rem; padding: .12rem .45rem; border-radius: 6px; }
.deal .reasons { margin: .35rem 0 0; padding-left: 1rem; color: var(--muted); font-size: .84rem; }
.deal .actions { display: flex; gap: .35rem; margin-top: .6rem; flex-wrap: wrap; }

.empty { text-align: center; padding: 2.6rem 1rem; }
.empty .big { display: none; }
.empty h2 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.7rem; }

.level-head { display: flex; align-items: center; gap: .6rem; margin: 1.6rem 0 .7rem; }

/* Échelle de notes */
.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; min-width: 0; }
.scale button {
  min-height: 36px; padding: 0 .2rem; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; font-size: .74rem; font-weight: 700; line-height: 1.1;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 520px) { .scale button { font-size: .66rem; padding: 0 1px; } }
.scale button.on { background: var(--text); border-color: var(--text); color: #fff; }
.scale button.on.r0 { background: #912018; border-color: #912018; color: #fff; }
.scale button.inherit { border-style: dashed; border-color: var(--text); }

.rate-item { display: grid; grid-template-columns: 60px 1fr; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.rate-item:last-child { border-bottom: 0; }
.rate-item img { width: 60px; height: 60px; object-fit: contain; border-radius: 10px; background: var(--bg); padding: 4px; mix-blend-mode: multiply; }
.rate-item .t { font-weight: 800; margin-bottom: 4px; }
.prod-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.prod-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.prod-tile img { width: 100%; height: 120px; object-fit: contain; background: var(--bg); border-radius: 10px; padding: 8px; cursor: pointer; mix-blend-mode: multiply; }
.prod-tile .t { font-size: .86rem; font-weight: 800; min-height: 2.5em; line-height: 1.25; }
.prod-tile .scale { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.prod-tile .scale button { font-size: .64rem; min-height: 32px; }

.steps { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .2rem; }
.progress { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress > div { height: 100%; background: var(--save); width: 0; transition: width .3s; }

/* Paire d'entraînement */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pair .side { text-align: center; }
.pair .side img { width: 100%; height: 140px; object-fit: contain; background: var(--bg); border-radius: 12px; padding: 10px; mix-blend-mode: multiply; }

/* Tableau */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .6rem .55rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; white-space: nowrap; user-select: none; }
td.num, th.num { text-align: right; white-space: nowrap; }
td.num { font-weight: 700; }
tr.click { cursor: pointer; }
td.name { min-width: 200px; font-weight: 700; }
@media (max-width: 700px) { .hide-sm { display: none; } }
tr.click:hover td { background: var(--bg); }

.chart { width: 100%; height: 300px; }
.chart.tall { height: 380px; }

/* Liste de courses */
.list-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.list-item img { width: 52px; height: 52px; object-fit: contain; background: var(--bg); border-radius: 12px; padding: 4px; mix-blend-mode: multiply; }
.list-item .t { font-weight: 800; }
.list-item.checked .t { text-decoration: line-through; color: var(--faint); }
.list-item.checked img { opacity: .5; }
.qty { display: inline-flex; align-items: center; gap: .35rem; font-weight: 800; }
.qty button { width: 34px; height: 34px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 800; }
.qty button:hover { border-color: var(--text); }

/* Fenêtre modale */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(18, 20, 23, .5); display: flex; align-items: flex-end; justify-content: center; }
.modal .sheet { background: var(--surface); width: 100%; max-width: 760px; max-height: 92vh; overflow: auto;
  border-radius: 22px 22px 0 0; padding: 22px 18px 30px; }
.modal .sheet h2 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.8rem; }
@media (min-width: 760px) { .modal { align-items: center; } .modal .sheet { border-radius: 22px; padding: 26px 28px 30px; } }
.modal .close { float: right; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 16px); z-index: 60;
  background: var(--text); color: #fff; padding: .7rem 1.1rem; border-radius: 12px; font-weight: 600; max-width: 90vw; }

/* Écrans de connexion */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth .card { width: 100%; max-width: 440px; padding: 28px; }
.auth-brand { margin-bottom: 1rem; }
.auth-brand .wordmark { font-size: 1.6rem; }
.qr { width: 220px; height: 220px; background: #fff; padding: 8px; border-radius: 12px; margin: .6rem auto; }
.secret { font-family: ui-monospace, monospace; word-break: break-all; background: var(--bg); padding: .45rem .65rem; border-radius: 8px; }
.notice { background: var(--bg); border-radius: 12px; padding: .8rem 1rem; font-size: .9rem; }
.notice.warn { background: var(--promo-soft); color: var(--promo-deep); }
.err { color: var(--danger); font-size: .92rem; font-weight: 600; }

.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.filters select, .filters input:not([type=checkbox]) { width: auto; min-width: 140px; flex: 1 1 140px; }
.filters .check { flex: none; }
.sticky-filters { background: var(--bg); padding: 8px 0; }
@media (min-width: 900px) { .sticky-filters { position: sticky; top: 61px; z-index: 10; } }

@media print {
  nav.tabs, .topbar, .no-print { display: none !important; }
  .shell { padding: 0; }
  body { background: #fff; }
  .card { border: 0; }
}

/* ============ Écrans selon les maquettes ============ */
.btn.big { min-height: 54px; padding: .7rem 1.6rem; font-size: 1.02rem; font-weight: 800; }
.page-head h1 { margin-bottom: .25rem; }
.page-head p { margin: 0; }
@media (max-width: 600px) { h1 { font-size: 1.85rem; } }

/* Filtres en pastilles, sur une ligne qui défile au téléphone */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips .chip { flex: none; min-height: 38px; }
.chips-sep { flex: none; width: 1px; background: var(--border); margin: 4px 2px; }

/* Grille des promos */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1300px) { .tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.tile { position: relative; background: var(--surface); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.tile-ph { position: relative; display: block; width: 100%; aspect-ratio: 1 / .82; border: 0; padding: 14px; background: #fff; cursor: pointer; }
.tile-ph img { width: 100%; height: 100%; object-fit: contain; }
.promo-badge { position: absolute; top: 10px; left: 10px; background: var(--promo); color: #fff; font-weight: 800; font-size: .8rem;
  padding: .2rem .5rem; border-radius: 6px; line-height: 1.3; }
.tile-level { position: absolute; bottom: 8px; left: 10px; font-size: .7rem; font-weight: 800; padding: .15rem .5rem; border-radius: 999px; }
.tile-level.l5 { background: var(--promo-ink); color: #fff; }
.tile-level.l4 { background: var(--promo-soft); color: var(--promo-deep); }
.tile-body { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.tile-brand { font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-name { font-size: .92rem; font-weight: 800; line-height: 1.25; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.tile-price { display: flex; align-items: baseline; gap: .45rem; margin-top: auto; padding-top: 6px; padding-right: 44px; flex-wrap: wrap; }
.tile-price .now { font-size: 1.45rem; font-weight: 900; letter-spacing: -.035em; color: var(--promo-ink); }
.tile-price .was { font-size: .8rem; color: var(--muted); text-decoration: line-through; }
.tile-store { font-size: .72rem; color: var(--faint); padding-right: 44px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-add { position: absolute; right: 10px; bottom: 12px; width: 40px; height: 40px; border-radius: 999px; border: 1.5px solid var(--text);
  background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--text); }
.tile-add:hover { background: var(--text); color: #fff; }

/* Liste : en-tête sombre, total en grand */
.list-hero { background: var(--text); color: #fff; border-radius: 20px; padding: 20px 22px 18px; }
.hero-meta { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; color: #C9CBCF; }
.hero-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: .35rem 0 .3rem; }
.hero-total .v { font-size: 3rem; font-weight: 900; letter-spacing: -.045em; line-height: 1; }
.save-pill { background: var(--save-soft); color: var(--save-deep); font-weight: 800; font-size: .88rem; padding: .35rem .7rem; border-radius: 999px; white-space: nowrap; }
.hero-line { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.12rem; color: #E6E7EA; }
.list-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
.list-group { margin-top: 6px; }
.group-label { font-family: var(--sans); font-style: normal; font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 10px 2px 8px; }
.group-label span { text-transform: none; letter-spacing: 0; font-weight: 500; margin-left: .3rem; }
.list-card { background: var(--surface); border-radius: 16px; padding: 2px 16px; }
.list-card:empty { display: none; }
.li { display: grid; grid-template-columns: auto 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); }
.li:last-child { border-bottom: 0; }
.li:not(:has(.li-check)) { grid-template-columns: 52px minmax(0, 1fr) auto; }
.li-check { position: relative; width: 26px; height: 26px; cursor: pointer; }
.li-check input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.li-check span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--text); color: transparent; }
.li-check input:checked + span { background: var(--save); border-color: var(--save); color: #fff; }
.li-check input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
.li-ph { width: 52px; height: 52px; object-fit: contain; background: var(--bg); border-radius: 12px; padding: 4px; mix-blend-mode: multiply; cursor: pointer; }
.li-ph-empty { display: grid; place-items: center; color: var(--faint); mix-blend-mode: normal; cursor: default; }
.li-name { font-weight: 800; line-height: 1.25; cursor: pointer; }
.li-qty { color: var(--muted); font-weight: 600; }
.li-sub { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.li-sub.promo { color: var(--promo-ink); font-weight: 700; }
.li-why { font-size: .78rem; color: var(--faint); margin-top: 2px; }
.li-gain { font-size: .8rem; color: var(--save); font-weight: 600; margin-top: 2px; }
.li-edit { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.li-edit .btn.sm { min-height: 34px; }
.li-alts { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.li-alts .btn { justify-content: flex-start; text-align: left; }
.li-price { font-weight: 800; white-space: nowrap; align-self: start; padding-top: 2px; }
.li-actions { display: flex; align-items: center; gap: 6px; }
.li-actions .li-price { align-self: center; padding: 0 4px 0 0; }
.li.checked .li-name { text-decoration: line-through; color: var(--faint); }
.li.checked .li-ph { opacity: .45; }
.li.checked .li-price, .li.checked .li-sub { color: var(--faint); }
.list-bar { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 10px); z-index: 15; display: flex; gap: 10px; padding-top: 6px; }
.list-bar .btn { flex: 1; }
@media (min-width: 900px) { .list-bar { bottom: 16px; } .list-bar .btn { flex: 0 1 360px; } }

/* Fiche produit */
.pm-hero { position: relative; background: var(--bg); border-radius: 18px; height: 250px; display: grid; place-items: center; margin-bottom: 16px; }
.pm-hero img { width: 210px; height: 210px; object-fit: contain; mix-blend-mode: multiply; }
.pm-level { position: absolute; left: 14px; bottom: 14px; }
.pm-meta { font-size: .86rem; color: var(--muted); }
.modal .sheet h2.pm-name { font-family: var(--sans); font-style: normal; font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em; margin: .15rem 0 .3rem; }
.pm-price { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.pm-price .now { font-size: 2.6rem; font-weight: 900; letter-spacing: -.045em; line-height: 1.05; }
.pm-price .now.promo { color: var(--promo-ink); }
.pm-price .was { color: var(--muted); text-decoration: line-through; }
.pm-promo { background: var(--promo); color: #fff; font-size: .88rem; padding: .55rem .8rem; border-radius: 10px; margin: .5rem 0; }
.pm-head { display: flex; flex-direction: column; gap: 4px; }
.pm-h { margin-top: 1.1rem; }
.pm-serif { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.45rem; margin: 1.2rem 0 .5rem; letter-spacing: -.01em; }
.formats { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.format { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0;
  border-bottom: 1px solid var(--border); background: var(--surface); text-align: left; cursor: pointer; }
.format:last-child { border-bottom: 0; }
.format > span { display: flex; flex-direction: column; gap: 1px; }
.format .small { color: var(--muted); }
.format-u { text-align: right; align-items: flex-end; white-space: nowrap; }
.format.best { background: var(--save-soft); }
.format.best strong, .format.best .small { color: var(--save-deep); }
.format.cur { cursor: default; }
.pm-more { margin-top: 1.2rem; border-top: 1px solid var(--border); padding-top: .9rem; }
.pm-more summary { cursor: pointer; font-weight: 700; }
.pm-bar { position: sticky; bottom: -30px; background: var(--surface); padding: 14px 0 6px; margin-top: 1rem; }
.pm-bar .btn { width: 100%; }

/* Mode magasin : grosses lignes tactiles, reste à prendre, caddie replié */
.hero-progress { height: 8px; background: rgba(255, 255, 255, .18); border-radius: 999px; overflow: hidden; margin: .55rem 0 .6rem; }
.hero-progress > div { height: 100%; background: #6FD39A; border-radius: 999px; transition: width .3s; }
.shop .li { padding: 15px 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.shop .li:active { background: var(--bg); }
.shop .li-name { font-size: 1.08rem; }
.shop .li-check, .shop .li-check span { width: 32px; height: 32px; border-radius: 10px; }
.shop .li-ph { width: 60px; height: 60px; cursor: pointer; }
.shop .li { grid-template-columns: auto 60px minmax(0, 1fr) auto; }
.shop .li-price { font-size: 1.05rem; }
.in-cart summary { cursor: pointer; list-style: none; }
.in-cart summary::-webkit-details-marker { display: none; }
.in-cart summary::after { content: " ▾"; }
.in-cart[open] summary::after { content: " ▴"; }

.li-over { color: var(--promo-deep); font-weight: 600; }
.hero-check { margin: .45rem 0 0; font-size: .82rem; color: #C9CBCF; }
.li-swap { font-size: .8rem; color: var(--save-deep); background: var(--save-soft); border-radius: 8px; padding: .3rem .55rem; margin-top: 5px; }
.pm-reasons { margin: 0; padding: 0 0 0 1.1rem; display: flex; flex-direction: column; gap: .35rem; font-size: .92rem; }
.pm-reasons li::marker { color: var(--promo); }

/* Bilan d'une liste (liste comparée à tes tickets) */
.bl-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left;
  cursor: pointer; font: inherit; color: inherit; }
.bl-banner > .small { color: var(--save); font-weight: 700; white-space: nowrap; }
.bl-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.bl-tiles > div { background: var(--surface-2); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.bl-tiles .v { font-size: 1.5rem; font-weight: 900; }
.bl-tiles > div > span:last-child { font-size: .8rem; color: var(--muted); }
.bl-list { list-style: none; padding: 0; margin: 4px 0 12px; }
.bl-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.bl-list li > span:first-child { min-width: 0; }
.bl-num { white-space: nowrap; }
.bl-good { color: var(--save); font-weight: 700; }
.bl-bad { color: var(--promo-ink); font-weight: 700; }

/* Assistant de démarrage et choix du Drive */
.wiz { max-width: 640px; }
.wiz-dots { display: flex; gap: 6px; }
.wiz-dot { width: 28px; height: 4px; border-radius: 2px; background: var(--border); }
.wiz-dot.on { background: var(--text); }
.wiz-dot.done { background: var(--save); }
.wiz-steps { padding-left: 1.2rem; display: grid; gap: .6rem; }
.wiz-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; }
.drive-pick { text-align: left; justify-content: flex-start; width: 100%; }
.tag.on { background: var(--save-soft); color: var(--save-deep); }

/* Suivi des prix */
.px-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.px-h h3 { margin: 0; }
.px-note { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--promo); border-radius: var(--radius); padding: 12px 16px; font-size: .9rem; color: var(--muted); }
.px-note strong { color: var(--text); }
.grid.px-kpis { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .grid.px-kpis { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .grid.px-kpis { grid-template-columns: repeat(5, 1fr); } }
.px-kpis .kpi .s { color: var(--muted); font-size: .78rem; margin-top: 2px; font-variant-numeric: tabular-nums; }
.px-kpis .kpi:first-child { grid-column: 1 / -1; }
@media (min-width: 700px) { .px-kpis .kpi:first-child { grid-column: auto; } }
.px-up { color: var(--danger); }
.px-down { color: var(--save); }
.px-promo { color: var(--promo-ink); }
.px-var { font-weight: 800; font-variant-numeric: tabular-nums; }
.px-tbl td, .px-tbl th { vertical-align: middle; }
.px-tbl td.num, .px-tbl th.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.px-tbl svg { display: block; }

/* « Que veux-tu ajouter ? » : grandes cibles pour tout le monde (doigts, vue) */
.ask { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.ask-bar { display: flex; gap: 8px; align-items: stretch; }
.ask-bar input { flex: 1; min-width: 0; font-size: 1.1rem; min-height: 52px; padding: 0 14px; border-radius: 12px; }
.ask-mic { flex: none; width: 56px; min-height: 52px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.ask-mic.on { background: var(--promo); border-color: var(--promo); color: #fff; animation: ask-pulse 1.2s ease-in-out infinite; }
@keyframes ask-pulse { 50% { box-shadow: 0 0 0 8px var(--promo-soft); } }
.ask-go { flex: none; min-height: 52px; font-size: 1rem; }
@media (max-width: 480px) { .ask-go { display: none; } }
.ask-say { margin: 10px 2px 0; font-size: 1rem; color: var(--muted); min-height: 1.2em; }
.ask-say:empty { display: none; }
.ask-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.ask-grid:empty { display: none; }
.ask-card { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 10px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.ask-card img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--bg); border-radius: 8px; }
.ask-name { font-weight: 800; font-size: 1rem; line-height: 1.2; }
.ask-sub { font-size: .82rem; color: var(--muted); line-height: 1.25; }
.ask-price { font-weight: 900; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.ask-price s { font-weight: 500; font-size: .85rem; color: var(--muted); }
.ask-promo { align-self: flex-start; font-size: .78rem; font-weight: 800; color: var(--promo-deep); background: var(--promo-soft); border-radius: 6px; padding: 2px 6px; }
.ask-mine { align-self: flex-start; font-size: .78rem; font-weight: 700; color: var(--save-deep); background: var(--save-soft); border-radius: 6px; padding: 2px 6px; }
.ask-cta { margin-top: auto; text-align: center; font-weight: 800; padding: 10px 6px; border-radius: 10px; background: var(--text); color: #fff; }
.ask-card.added { border-color: var(--save); }
.ask-card.added .ask-cta { background: var(--save); }
.ask-wait { text-align: center; padding: 28px 18px; }
.li-del { min-height: 44px; padding: 0 14px; font-weight: 800; color: var(--danger); border-color: var(--border); background: var(--surface); }
.conf-yes { min-height: 44px; padding: 0 16px; font-weight: 800; background: var(--save); border-color: var(--save); color: #fff; }
