/* Bossfor — concept de démonstration. Polices système (aucun appel externe), mobile d'abord. */
:root {
  --nuit: #16110D; --braise: #2A1E16; --creme: #FFF7EC; --papier: #FFFDF8; --encre: #1D1611; --gris: #6B5E52;
  --safran: #F4A51C; --tomate: #C8381C; --tomate-f: #A92D15; --ligne: #EADFCF; --ok: #1F7A4A;
  --r: 18px; --ombre: 0 10px 30px rgba(22, 17, 13, .12);
  --titre: "Arial Black", "Helvetica Neue", system-ui, sans-serif;
  --texte: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body { font: 16px/1.45 var(--texte); color: var(--encre); background: var(--creme); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--safran); outline-offset: 2px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.demo { background: var(--nuit); color: #CDBCA6; font-size: .72rem; text-align: center; padding: .3rem 1rem; letter-spacing: .01em; }
.demo strong { color: #E8D9C4; font-weight: 600; }

/* En-tête */
.hero { background: radial-gradient(120% 90% at 85% 0%, #5A2A12 0%, var(--braise) 45%, var(--nuit) 100%); color: var(--creme); padding: 1.1rem 1rem 1.4rem; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -40px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(244,165,28,.35), rgba(244,165,28,0) 70%); pointer-events: none; }
.hero-in { max-width: 1120px; margin: 0 auto; position: relative; z-index: 1; }
.logo { font: 900 2.1rem/1 var(--titre); letter-spacing: -.02em; text-transform: uppercase; }
.logo span { color: var(--safran); }
.hero p { color: #D9C7B1; margin-top: .3rem; font-size: .95rem; }
.badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.badge { display: inline-flex; align-items: center; gap: .4rem; background: rgba(255,247,236,.1); border: 1px solid rgba(255,247,236,.18); border-radius: 999px; padding: .35rem .75rem; font-size: .85rem; font-weight: 600; }
.badge .pt { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; }
.badge.rush .pt { background: var(--safran); }
.badge.stop .pt { background: #F87171; }

/* Catégories */
.cats { position: sticky; top: 0; z-index: 20; background: rgba(255,247,236,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ligne); }
.cats-in { max-width: 1120px; margin: 0 auto; display: flex; gap: .5rem; overflow-x: auto; padding: .7rem 1rem; scrollbar-width: none; }
.cats-in::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--ligne); background: var(--papier); border-radius: 999px; padding: .55rem 1rem .55rem .8rem; min-height: 44px; font-weight: 700; font-size: .92rem; text-decoration: none; color: var(--encre); white-space: nowrap; }
.chip[aria-current="true"] { background: var(--encre); color: var(--creme); border-color: var(--encre); }

/* Mise en page */
.page { max-width: 1120px; margin: 0 auto; padding: 0 1rem 7rem; display: grid; gap: 2rem; }
@media (min-width: 1000px) { .page { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; padding-bottom: 3rem; } }
.cat-titre { font: 900 1.45rem/1.1 var(--titre); text-transform: uppercase; letter-spacing: -.01em; margin: 1.6rem 0 .9rem; display: flex; align-items: center; gap: .6rem; }
.liste { display: grid; gap: .75rem; }
@media (min-width: 700px) { .liste { grid-template-columns: 1fr 1fr; } }

.carte-p { display: grid; grid-template-columns: 1fr 118px; gap: .9rem; align-items: stretch; width: 100%; text-align: left; background: var(--papier); border: 1px solid var(--ligne); border-radius: 20px; padding: .75rem; box-shadow: 0 1px 0 rgba(0,0,0,.02); transition: transform .15s, box-shadow .15s; position: relative; }
.carte-p:hover { transform: translateY(-2px); box-shadow: var(--ombre); }
.carte-p:active { transform: scale(.985); }
.carte-txt { display: flex; flex-direction: column; min-width: 0; padding: .15rem 0 .1rem .2rem; }
.carte-p h3 { font-size: 1.04rem; line-height: 1.2; }
.carte-p p { color: var(--gris); font-size: .85rem; margin-top: .25rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.prix { font-weight: 800; margin-top: auto; padding-top: .5rem; display: block; color: var(--tomate-f); }
.carte-p[disabled] { cursor: not-allowed; }
.carte-p.hors .visuel, .carte-p.hors .carte-txt, .vedette.hors .visuel, .vedette.hors strong { opacity: .5; filter: grayscale(.6); }
.carte-p[disabled]:hover { transform: none; box-shadow: none; }
.indispo { display: inline-block; font-size: .72rem; font-weight: 700; background: #EEE6DA; color: var(--gris); border-radius: 6px; padding: .1rem .4rem; margin-left: .3rem; }
.tag { display: inline-block; font-size: .64rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--safran); color: var(--encre); border-radius: 6px; padding: .12rem .4rem; margin-left: .4rem; vertical-align: .12em; }

/* Visuels produit : photo si présente, sinon fallback illustré (voir assets/images.js) */
.visuel { position: relative; display: block; overflow: hidden; border-radius: 15px; background: #EADFCF; }
.v-liste { width: 118px; min-height: 118px; height: 100%; }
.v-grand { width: 100%; aspect-ratio: 4 / 3; border-radius: 0; }
.v-fiche { width: 100%; aspect-ratio: 16 / 10; border-radius: 0; }
.visuel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.visuel img.ok { opacity: 1; }
.fb { position: absolute; inset: 0; display: grid; place-items: center; }
.fb::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.35), rgba(255,255,255,0) 55%), repeating-linear-gradient(45deg, rgba(255,255,255,.07) 0 10px, rgba(255,255,255,0) 10px 20px); }
.fb svg { width: 56%; height: 56%; position: relative; filter: drop-shadow(0 6px 8px rgba(22,17,13,.25)); }
.fb-sandwich { background: linear-gradient(145deg, #F7C873, #E07A2E); }
.fb-bowl { background: linear-gradient(145deg, #F5D9A6, #C8381C); }
.fb-assiette { background: linear-gradient(145deg, #E9DCC6, #8C5A33); }
.fb-enfant { background: linear-gradient(145deg, #FFE08A, #F4A51C); }
.fb-texmex { background: linear-gradient(145deg, #FFC27A, #B8461F); }
.fb-frites { background: linear-gradient(145deg, #FFE7A3, #E8A21C); }
.fb-boisson { background: linear-gradient(145deg, #CFE3E8, #2D5E6E); }
.fb-dessert { background: linear-gradient(145deg, #F3DCCB, #6E3B2A); }
.fb.t1 { filter: hue-rotate(-8deg) saturate(1.05); } .fb.t2 { filter: hue-rotate(10deg); } .fb.t3 { filter: brightness(1.06) saturate(.95); } .fb.t4 { filter: hue-rotate(-18deg) brightness(.97); }
.fb.t1 svg, .fb.t2 svg, .fb.t3 svg, .fb.t4 svg { filter: drop-shadow(0 6px 8px rgba(22,17,13,.25)); }
.plus { position: absolute; right: 1.15rem; bottom: 1.15rem; width: 36px; height: 36px; border-radius: 50%; background: var(--tomate); color: #fff; display: grid; place-items: center; font-size: 1.3rem; font-weight: 800; line-height: 1; box-shadow: 0 4px 12px rgba(169,45,21,.45); }

/* Incontournables */
.vedettes { margin-top: 1.4rem; }
.vedettes-t { font: 900 1.2rem/1.1 var(--titre); text-transform: uppercase; margin-bottom: .7rem; }
.vedettes-l { display: flex; gap: .75rem; overflow-x: auto; scroll-snap-type: x proximity; padding: .2rem 1rem 1rem; margin: 0 -1rem; scrollbar-width: none; }
.vedettes-l::-webkit-scrollbar { display: none; }
.vedette { flex: none; width: 188px; scroll-snap-align: start; text-align: left; background: var(--papier); border: 1px solid var(--ligne); border-radius: 20px; overflow: hidden; padding: 0; box-shadow: var(--ombre); transition: transform .15s; }
.vedette:active { transform: scale(.97); }
.vedette-t { display: flex; flex-direction: column; gap: .35rem; padding: .7rem .8rem .85rem; }
.vedette-t strong { font-size: .98rem; line-height: 1.15; }
.prix-pastille { align-self: flex-start; background: var(--encre); color: var(--creme); font-weight: 800; font-size: .85rem; border-radius: 999px; padding: .15rem .6rem; }
@media (min-width: 1000px) { .vedettes-l { margin: 0; padding: .2rem 0 1rem; } }

/* Toast d'ajout */
.toast { position: fixed; left: 50%; bottom: calc(5.4rem + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); opacity: 0; pointer-events: none; z-index: 40; background: var(--encre); color: var(--creme); font-weight: 700; font-size: .9rem; border-radius: 999px; padding: .6rem 1.1rem; box-shadow: 0 8px 24px rgba(0,0,0,.3); transition: opacity .2s, transform .2s; max-width: 90vw; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@keyframes rebond { 40% { transform: scale(1.04); } }
.barre.rebond { animation: rebond .35s ease-out; }
.f-visuel { position: relative; flex: none; }
.f-visuel .v-fiche { border-radius: 22px 22px 0 0; }
@media (min-width: 700px) { .f-visuel .v-fiche { aspect-ratio: 16 / 8; } }
.fermer-img { position: absolute; top: .75rem; right: .75rem; background: rgba(255,253,248,.92); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.f-tete .prix { margin-top: .4rem; padding-top: 0; font-size: 1.15rem; }
.cat-i { width: 34px; height: 34px; border-radius: 10px; background: var(--safran); display: grid; place-items: center; flex: none; }
.cat-i svg { width: 22px; height: 22px; }
.cat-n { margin-left: auto; font: 700 .78rem var(--texte); color: var(--gris); background: #EEE6DA; border-radius: 999px; padding: .1rem .55rem; text-transform: none; letter-spacing: 0; }
.chip-i { display: inline-block; width: 20px; height: 20px; vertical-align: -5px; margin-right: .4rem; }
.chip-i svg { width: 100%; height: 100%; }

/* Panier latéral (ordinateur) et barre (mobile) */
.aside { display: none; }
@media (min-width: 1000px) {
  .aside { display: block; position: sticky; top: 76px; margin-top: 1.6rem; background: var(--papier); border: 1px solid var(--ligne); border-radius: var(--r); padding: 1.1rem; box-shadow: var(--ombre); }
  .barre { display: none !important; }
}
.barre { position: fixed; left: .75rem; right: .75rem; bottom: max(.75rem, env(safe-area-inset-bottom)); z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--tomate); color: #fff; border: 0; border-radius: 16px; padding: .95rem 1.1rem; font-weight: 800; box-shadow: 0 12px 30px rgba(169,45,21,.35); }
.barre[hidden] { display: none; }
.barre .nb { background: rgba(255,255,255,.2); border-radius: 999px; min-width: 1.8rem; height: 1.8rem; display: inline-grid; place-items: center; margin-right: .5rem; }

/* Boutons */
.btn { display: inline-flex; justify-content: center; align-items: center; gap: .5rem; border: 0; border-radius: 14px; padding: .9rem 1.1rem; font-weight: 800; min-height: 48px; }
.btn-p { background: var(--tomate); color: #fff; width: 100%; }
.btn-p:hover { background: var(--tomate-f); }
.btn-p[disabled] { background: #C9B8A6; cursor: not-allowed; }
.btn-l { background: transparent; border: 1px solid var(--ligne); }
.qte { display: inline-flex; align-items: center; border: 1px solid var(--ligne); border-radius: 999px; background: var(--papier); }
.qte button { width: 40px; height: 40px; border: 0; background: none; font-size: 1.2rem; font-weight: 800; }
.qte output { min-width: 1.6rem; text-align: center; font-weight: 800; }

/* Feuilles (dialog) */
dialog.feuille { border: 0; padding: 0; width: 100%; max-width: 560px; max-height: 92dvh; margin: auto auto 0; border-radius: 22px 22px 0 0; background: var(--papier); color: var(--encre); box-shadow: 0 -10px 40px rgba(0,0,0,.25); }
@media (min-width: 700px) { dialog.feuille { margin: auto; border-radius: 22px; } }
dialog.feuille::backdrop { background: rgba(22,17,13,.55); }
dialog.feuille[open] { animation: monter .22s ease-out; display: flex; flex-direction: column; }
@keyframes monter { from { transform: translateY(30px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { dialog.feuille[open] { animation: none; } .carte-p { transition: none; } }
.f-tete { display: flex; justify-content: space-between; align-items: start; gap: 1rem; padding: 1.1rem 1.1rem .6rem; }
.f-tete h2 { font: 900 1.35rem/1.15 var(--titre); text-transform: uppercase; }
.fermer { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 0; background: #F1E8DB; font-size: 1.3rem; line-height: 1; }
.f-corps { overflow-y: auto; padding: 0 1.1rem 1rem; display: grid; gap: 1.1rem; }
.f-pied { padding: .9rem 1.1rem calc(.9rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--ligne); display: flex; gap: .75rem; align-items: center; background: var(--papier); border-radius: 0 0 22px 22px; }
.desc { color: var(--gris); }
fieldset.groupe { border: 0; padding: 0; display: grid; gap: .45rem; }
.groupe legend { font-weight: 800; display: flex; justify-content: space-between; width: 100%; margin-bottom: .45rem; }
.groupe legend small { font-weight: 600; color: var(--gris); }
.groupe .note { font-size: .78rem; color: var(--gris); }
.opt { display: flex; align-items: center; gap: .7rem; border: 1px solid var(--ligne); border-radius: 12px; padding: .7rem .8rem; min-height: 48px; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--encre); background: #FBF3E7; }
.opt:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.opt input { width: 20px; height: 20px; accent-color: var(--tomate); }
.manque { font-size: .85rem; color: var(--tomate-f); font-weight: 700; }

.ligne-p { display: grid; grid-template-columns: 1fr auto; gap: .3rem .8rem; padding: .8rem 0; border-bottom: 1px solid var(--ligne); }
.ligne-p .choix { grid-column: 1 / -1; color: var(--gris); font-size: .84rem; }
.total { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.1rem; padding-top: .6rem; }
.mini { font-size: .78rem; color: var(--gris); }
.creneaux { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.creneaux .opt { flex-direction: column; align-items: flex-start; gap: .1rem; }
.creneaux .opt input { position: absolute; opacity: 0; }
.creneaux .opt { position: relative; }
.creneaux .opt:has(input:focus-visible) { outline: 3px solid var(--safran); }
.champ { display: grid; gap: .3rem; font-weight: 700; }
.champ input { border: 1px solid #B9A994; border-radius: 12px; padding: .75rem .85rem; min-height: 48px; background: #fff; font-weight: 400; }
.pay-zone { border: 1px dashed #B9A994; border-radius: 12px; padding: .8rem; font-size: .88rem; color: var(--gris); }
.pay-sim { display: inline-block; background: var(--encre); color: var(--creme); font-size: .72rem; font-weight: 700; border-radius: 6px; padding: .1rem .45rem; margin-bottom: .35rem; }
details.donnees summary { cursor: pointer; font-size: .82rem; color: var(--gris); text-decoration: underline; }
details.donnees p { font-size: .8rem; color: var(--gris); margin-top: .35rem; }
.alerte { background: #FDE8E3; color: #7A1E0C; border-radius: 12px; padding: .8rem; font-weight: 700; }

/* Confirmation */
.conf-num { font: 900 2.6rem/1 var(--titre); color: var(--tomate); }
.suivi { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; }
.suivi li { text-align: center; font-size: .74rem; font-weight: 700; color: var(--gris); padding-top: .6rem; border-top: 5px solid var(--ligne); }
.suivi li.fait { border-color: var(--ok); color: var(--encre); }
.suivi li.actuel { border-color: var(--safran); color: var(--encre); }

/* Fidélité */
.fid { background: linear-gradient(135deg, var(--nuit), #4A2410); color: var(--creme); border-radius: 18px; padding: 1rem; display: grid; grid-template-columns: 1fr 84px; gap: .8rem; align-items: center; }
.fid h3 { font: 900 1rem/1.1 var(--titre); text-transform: uppercase; color: var(--safran); }
.tampons { display: grid; grid-template-columns: repeat(4, 26px); gap: .35rem; margin: .55rem 0 .35rem; }
.tampon { width: 26px; height: 26px; border-radius: 50%; border: 2px dashed rgba(255,247,236,.4); }
.tampon.plein { border: 0; background: var(--safran); box-shadow: inset 0 0 0 4px #FFD27A; }
.qr { width: 84px; height: 84px; background: #fff; border-radius: 8px; padding: 6px; }
.fid .mini { color: #D9C7B1; }

footer.pied { max-width: 1120px; margin: 0 auto; padding: 1rem 1rem 8rem; color: var(--gris); font-size: .8rem; display: grid; gap: .3rem; }
@media (min-width: 1000px) { footer.pied { padding-bottom: 2rem; } }

/* Fiche : l'image ne doit jamais empêcher la zone d'options de défiler */
dialog.feuille[open] { overflow: hidden; }
.f-corps { flex: 1 1 auto; min-height: 0; }
.f-tete, .f-pied { flex: none; }
.f-visuel .v-fiche { aspect-ratio: auto; height: min(30dvh, 210px); }
.page { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .page { grid-template-columns: minmax(0, 1fr) 360px; } }
main { min-width: 0; }
.vedettes-l { scroll-padding-left: 1rem; }
@media (min-width: 1000px) { .vedettes-l { scroll-padding-left: 0; } }
.carte-p h3 .tag { display: table; margin: .3rem 0 0; }

/* ===== Passe 2 : hero plus grand + fallbacks en « cadre photo temporaire » ===== */
.hero { min-height: 300px; display: flex; align-items: flex-end; padding: 1.6rem 1rem 2rem; border-radius: 0 0 28px 28px; }
.hero::after { display: none; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,17,13,.35) 0%, rgba(22,17,13,.55) 45%, rgba(22,17,13,.88) 100%), radial-gradient(90% 70% at 90% 10%, rgba(244,165,28,.28), rgba(244,165,28,0) 65%); }
.hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(1.5px) brightness(.8) saturate(1.1); transform: scale(1.03); opacity: 0; transition: opacity .5s; }
.hero-bg img.ok { opacity: 1; }
.hero-broche { position: absolute; right: -10px; top: 12px; height: 118%; opacity: .07; filter: blur(.5px); transform: rotate(8deg); }
.hero-in { width: 100%; }
.hero .logo { font-size: 2.7rem; text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.hero-sl { font-size: 1rem; max-width: 30ch; color: #EADBC6; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.hero .badge { background: rgba(22,17,13,.55); backdrop-filter: blur(6px); }
.hero-cta { display: inline-block; margin-top: 1.1rem; background: var(--safran); color: var(--encre); font-weight: 800; border-radius: 999px; padding: .65rem 1.2rem; text-decoration: none; box-shadow: 0 6px 18px rgba(244,165,28,.35); }
@media (min-width: 700px) { .hero { min-height: 360px; padding-bottom: 2.6rem; } .hero .logo { font-size: 3.4rem; } }
.cats { margin-top: -1px; box-shadow: 0 6px 16px rgba(22,17,13,.06); }

/* Fallback : cadre photo sombre et texturé, pictogramme très discret, mention « Photo à venir » */
.visuel { background: #2A1E16; }
.fb-sandwich, .fb-bowl, .fb-assiette, .fb-enfant, .fb-texmex, .fb-frites, .fb-boisson, .fb-dessert { background: linear-gradient(150deg, #3A2A1E, #20170F); }
.fb-bowl { background: linear-gradient(150deg, #3F261C, #1F1410); } .fb-boisson { background: linear-gradient(150deg, #2B3235, #171C1E); } .fb-dessert { background: linear-gradient(150deg, #3B2A25, #1E1411); }
.fb::before { background: radial-gradient(circle at 30% 20%, rgba(244,165,28,.16), rgba(244,165,28,0) 60%), repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 2px, rgba(255,255,255,0) 2px 9px); }
.fb { filter: none !important; }
.fb svg { width: 34%; height: 34%; opacity: .28; filter: grayscale(.4) !important; }
.fb-cam { position: absolute; left: .5rem; bottom: .45rem; display: flex; align-items: center; gap: .3rem; color: rgba(255,247,236,.55); font-size: .66rem; font-weight: 600; letter-spacing: .02em; }
.fb .fb-cam svg { width: 14px; height: 14px; opacity: 1; filter: none !important; }
.v-liste .fb-mot { display: none; }
.v-liste .fb-cam { left: auto; right: .45rem; bottom: .45rem; }
.v-liste .fb svg:first-child { width: 38%; height: 38%; }
.v-grand .fb-cam, .v-fiche .fb-cam { font-size: .75rem; left: .8rem; bottom: .7rem; }
.plus { right: 1.2rem; bottom: 1.2rem; }

/* ===== Passe 3 : vraies photos ===== */
.hero-bg img { filter: blur(1.2px) brightness(.85) saturate(1.1); object-position: center 40%; }
.hero-bg::after { background: linear-gradient(180deg, rgba(22,17,13,.45) 0%, rgba(22,17,13,.6) 50%, rgba(22,17,13,.9) 100%); }
.hero-broche { display: none; }
.
.hero { min-height: 340px; }
@media (min-width: 700px) { .hero { min-height: 420px; } }
.visuel img { object-position: center; }
.ph-mention { position: absolute; left: .5rem; bottom: .45rem; z-index: 1; font-size: .62rem; font-weight: 600; color: rgba(255,255,255,.9); background: rgba(22,17,13,.55); border-radius: 6px; padding: .1rem .4rem; opacity: 0; transition: opacity .3s; }
.visuel img.ok ~ .ph-mention { opacity: 1; }
.v-liste .ph-mention { display: none; }
