/* 5étoiles — menu en ligne (modèle commun à tous les commerces)
   Même identité que les pages d'avis : charbon, craie, jaune soleil, DM Sans. */
:root {
  --ink: #222222;
  --ink-2: #2E2E2E;
  --ink-3: #3A3A38;
  --text: #2A2300;
  --paper: #F5F4F0;
  --sun: #FFE15E;
  --muted: rgba(245, 244, 240, .62);
  --faint: rgba(245, 244, 240, .12);
  --line-p: rgba(42, 35, 0, .14);
  --ease-out: cubic-bezier(.32, .72, 0, 1);
  --f-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gut: max(20px, env(safe-area-inset-left, 0px));
  --gut-r: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html:has(dialog[open]) { overflow: hidden; }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--f-body); font-size: 17px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 20; background: var(--ink); }
button { font: inherit; color: inherit; }
a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
p, h1, h2, h3, ul { margin: 0; }
ul { padding: 0; list-style: none; }

.page { max-width: 560px; margin: 0 auto; }

/* ---------- En-tête ---------- */
.m-haut { display: grid; gap: 18px; padding: calc(env(safe-area-inset-top, 0px) + 36px) var(--gut-r) 22px var(--gut); }
.pastille { display: inline-flex; align-items: center; gap: 10px; justify-self: start; max-width: 100%; border: 1px solid rgba(245,244,240,.18); border-radius: 999px; padding: 6px 14px 6px 6px; font-size: .82rem; font-weight: 600; color: var(--muted); }
.pastille b { flex: none; display: grid; place-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--sun); color: var(--text); font-size: .68rem; font-weight: 800; letter-spacing: .08em; }
h1 { font-size: clamp(2.6rem, 12.5vw, 3.8rem); line-height: .92; letter-spacing: -.055em; font-weight: 700; text-wrap: balance; }
h1 em { display: block; font-style: normal; color: var(--sun); }
h1 em:empty { display: none; }

/* ---------- Navigation collante (catégories + filtres) ---------- */
.m-nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; padding: 10px 0 12px; background: rgba(34,34,34,.78); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); border-bottom: 1px solid transparent; transition: border-color .2s; }
.m-nav.colle { border-bottom-color: var(--faint); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .m-nav { background: var(--ink); } }
.m-cats, .m-filtres { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-inline: var(--gut) var(--gut-r); scroll-padding-inline: var(--gut); }
.m-cats::-webkit-scrollbar, .m-filtres::-webkit-scrollbar { display: none; }
.m-filtres { margin-top: 8px; }
.m-filtres:empty { display: none; }
.cat, .filtre { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 600; font-size: .92rem; white-space: nowrap; transition: background .2s, color .2s; }
.cat { background: var(--ink-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--ink-3); }
.cat[aria-current="true"] { background: var(--paper); color: var(--text); box-shadow: none; }
.filtre { min-height: 34px; padding: 0 12px; font-size: .84rem; background: none; color: var(--muted); box-shadow: inset 0 0 0 1px var(--faint); }
.filtre[aria-pressed="true"] { background: var(--sun); color: var(--text); box-shadow: none; }

/* ---------- Sections ---------- */
main { padding: 0 var(--gut-r) 8px var(--gut); }
.sect { padding-top: 30px; scroll-margin-top: 120px; }
.sect-tete { display: grid; gap: 4px; padding-bottom: 6px; }
.sect h2 { font-size: 1.55rem; letter-spacing: -.035em; line-height: 1.1; }
.sect-note { font-size: .88rem; color: var(--muted); }

.art { display: flex; gap: 14px; width: 100%; padding: 16px 0; border: 0; border-bottom: 1px solid var(--faint); background: none; text-align: left; cursor: pointer; transition: opacity .2s; }
.sect .art:last-child { border-bottom: 0; }
.art:active { opacity: .6; }
.art-txt { flex: 1; min-width: 0; display: grid; gap: 4px; }
.art-nom { font-weight: 700; font-size: 1.04rem; line-height: 1.25; }
.art-desc { font-size: .9rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-prix { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1rem; padding-top: 1px; }
.art-prix small { display: block; text-align: right; font-weight: 500; font-size: .74rem; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badges:empty { display: none; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .01em; background: var(--faint); color: var(--paper); }
.badge.pop { background: var(--sun); color: var(--text); }
.badge.pop svg { width: 11px; height: 11px; }
.badge.neuf { background: none; color: var(--sun); box-shadow: inset 0 0 0 1px rgba(255,225,94,.5); }
.badge.epuise { background: none; color: var(--muted); box-shadow: inset 0 0 0 1px var(--faint); }
.art.indispo .art-nom, .art.indispo .art-prix { color: var(--muted); }
.art.indispo .art-prix { text-decoration: line-through; }

.m-vide { display: grid; gap: 14px; justify-items: start; padding: 40px var(--gut-r) 20px var(--gut); color: var(--muted); }
.m-vide button { border: 0; border-radius: 999px; min-height: 44px; padding: 0 18px; background: var(--paper); color: var(--text); font-weight: 700; cursor: pointer; }

/* ---------- Pied ---------- */
.m-pied { display: grid; gap: 18px; padding: 26px var(--gut-r) calc(26px + env(safe-area-inset-bottom, 0px)) var(--gut); }
.m-note { font-size: .84rem; color: var(--muted); }
.m-note:empty { display: none; }
.m-avis { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 12px 18px 12px 12px; border-radius: 22px; background: var(--sun); color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.04rem; line-height: 1.2; transition: transform .2s var(--ease-out); }
.m-avis:active { transform: scale(.97); }
.m-avis .ico { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--text); color: var(--sun); }
.m-avis .ico svg { width: 22px; height: 22px; }
.m-avis small { display: block; margin-top: 3px; font-size: .84rem; font-weight: 500; opacity: .75; }
.signature { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: .78rem; color: var(--muted); text-decoration: none; }
.signature img { height: 22px; width: auto; display: block; }

/* ---------- Fiche d'un article (dialog) ---------- */
dialog.fiche { width: min(560px, 100%); max-width: 100%; max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 24px); margin: auto auto 0; padding: 0; border: 0; border-radius: 28px 28px 0 0; background: var(--paper); color: var(--text); color-scheme: light; overflow: auto; overscroll-behavior: contain; }
dialog.fiche::backdrop { background: rgba(0,0,0,.6); }
dialog.fiche[open] { animation: glisse .4s var(--ease-out) both; }
@keyframes glisse { from { transform: translateY(100%); } to { transform: none; } }
@media (min-width: 600px) { dialog.fiche { margin: auto; border-radius: 28px; } }
.poignee { width: 40px; height: 5px; border-radius: 3px; background: var(--line-p); margin: 10px auto 0; }
.fermer { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line-p); background: var(--paper); cursor: pointer; }
.fermer svg { width: 16px; height: 16px; }
.f-contenu { display: grid; gap: 12px; padding: 22px 22px calc(28px + env(safe-area-inset-bottom, 0px)); }
.f-contenu .badge { background: rgba(42,35,0,.08); color: var(--text); }
.f-contenu .badge.pop { background: var(--sun); }
.f-contenu .badge.neuf { color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.f-contenu .badge.epuise { color: rgba(42,35,0,.6); box-shadow: inset 0 0 0 1px var(--line-p); }
.f-badges { display: flex; flex-wrap: wrap; gap: 6px; padding-right: 52px; min-height: 22px; }
.fiche h2 { font-size: 1.9rem; letter-spacing: -.04em; line-height: 1.05; padding-right: 40px; }
.f-prix { font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.f-desc { color: rgba(42,35,0,.75); }
.f-desc:empty, .f-allerg:empty, .f-formats:empty { display: none; }
.f-formats { display: grid; border-top: 1px solid var(--line-p); }
.f-formats li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-p); font-variant-numeric: tabular-nums; }
.f-formats li b { font-weight: 700; }
.f-allerg { font-size: .88rem; color: rgba(42,35,0,.72); }
.f-allerg strong { color: var(--text); }

@media (hover: hover) {
  .art:hover .art-nom { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
  .cat:hover { color: var(--paper); }
  .m-avis:hover { transform: translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
