/* Commande client — épuré */
.rouge-t { color: var(--rouge); }
.haut { position: sticky; top: 0; z-index: 30; background: rgba(245,245,247,.72); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--sep); }
.barre { display: flex; align-items: center; gap: 12px; padding: 10px clamp(16px, 4vw, 40px); max-width: 1180px; margin: 0 auto; }
.marque { font-size: 21px; color: var(--noir); text-decoration: none; letter-spacing: -0.02em; }
.villes { display: flex; background: rgba(118,118,128,.12); border-radius: 10px; padding: 2px; margin-left: auto; }
.villes button { border: 0; background: transparent; color: var(--noir); padding: 6px 14px; border-radius: 8px; font-weight: 500; font-size: 14px; transition: background .2s, box-shadow .2s; }
.villes button.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.04); font-weight: 600; }
.compte { border: 0; background: rgba(118,118,128,.12); color: var(--noir); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.compte svg { width: 19px; height: 19px; }
.compte .pastille { position: absolute; top: -4px; right: -4px; background: var(--rouge); color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 2px 5px; }
.cats { display: flex; gap: 6px; overflow-x: auto; padding: 0 clamp(16px, 4vw, 40px) 10px; max-width: 1180px; margin: 0 auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats a { flex: none; color: #1D1D1F; background: #FFC93C; text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 16px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px; white-space: nowrap; transition: background .2s, color .2s; }
.cats a:hover { background: #FFB800; }
.cats a.on { background: var(--rouge, #E3151A); color: #fff; box-shadow: 0 2px 8px rgba(227,21,26,.3); }
.cats a:focus-visible { outline: 3px solid #0071E3; outline-offset: 2px; }

.affiche { background: var(--fond); }
.affiche-in { max-width: 1180px; margin: 0 auto; padding: clamp(32px, 7vw, 80px) clamp(16px, 4vw, 40px) clamp(16px, 3vw, 24px); animation: monte .6s var(--ressort) both; }
.affiche h1 { font-size: clamp(40px, 7.5vw, 80px); margin: 14px 0 14px; letter-spacing: -0.035em; line-height: 1.02; }
.affiche h1 span { color: var(--gris-2); }
.surtitre { display: inline-flex; align-items: center; gap: 8px; background: #fff; padding: 6px 12px; border-radius: 999px; font-weight: 500; font-size: 13px; margin: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.surtitre i { width: 8px; height: 8px; border-radius: 50%; background: #30D158; }
.surtitre.ferme i { background: #FF9F0A; }
.sous { font-size: clamp(17px, 2vw, 21px); color: var(--gris); max-width: 620px; margin: 0; line-height: 1.4; letter-spacing: -0.015em; }

.carte { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 140px; }
.rayon { scroll-margin-top: 110px; padding-top: 36px; }
.rayon h2 { font-size: clamp(24px, 3.4vw, 32px); margin: 0 0 16px; display: flex; align-items: baseline; gap: 10px; }
.rayon h2 small { font-family: var(--texte); font-size: 15px; color: var(--gris-2); font-weight: 400; letter-spacing: 0; white-space: nowrap; }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.plat { background: var(--carte); border-radius: 22px; overflow: hidden; border: 0; padding: 0; text-align: left; display: flex; flex-direction: column;
  box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: transform .35s var(--ressort), box-shadow .35s var(--ressort); animation: monte .5s var(--ressort) both; }
.plat:hover { transform: translateY(-2px); box-shadow: 0 2px 6px rgba(0,0,0,.04), 0 16px 32px rgba(0,0,0,.08); }
.plat:active { transform: scale(.985); transition-duration: .1s; }
.plat .vis { aspect-ratio: 4/3; background: #F2F2F4; position: relative; overflow: hidden; }
.plat .vis img { width: 100%; height: 100%; object-fit: cover; }
.typo, .typo-g { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; text-align: center; color: var(--gris-2); font-weight: 600; font-size: 17px;
  background: linear-gradient(160deg, #F7F7F9, #ECECEF); }
.typo-g { position: relative; aspect-ratio: 16/8; font-size: 22px; }
.plat .corps { padding: 16px 18px 18px; display: grid; gap: 6px; flex: 1; align-content: start; }
.plat h3 { font-family: var(--display); font-weight: 600; font-size: 19px; margin: 0; letter-spacing: -0.02em; line-height: 1.2; }
.plat p { margin: 0; color: var(--gris); font-size: 14px; line-height: 1.4; letter-spacing: -0.005em; }
.ligne-prix { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.prix { font-weight: 600; font-size: 16px; }
.prix small { font-weight: 400; color: var(--gris-2); font-size: 13px; }
.plus { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; background: var(--rouge); color: #fff; display: grid; place-items: center; font-size: 20px; line-height: 1; font-weight: 400; }
.plat.indispo { opacity: .45; } .plat.indispo .plus { background: var(--gris-2); }
.etiquette { display: inline-block; font-size: 12px; font-weight: 500; color: var(--gris); background: rgba(118,118,128,.1); padding: 3px 8px; border-radius: 6px; }

.panier-bouton { position: fixed; left: 0; right: 0; margin-inline: auto; width: max-content; max-width: calc(100% - 32px); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; gap: 12px;
  background: rgba(29,29,31,.86); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); color: #fff; border: 0; border-radius: 999px;
  padding: 8px 20px 8px 8px; font-weight: 600; font-size: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.2); animation: monte .45s var(--ressort) both; transition: transform .1s; }
.panier-bouton:active { transform: scale(.97); }
.pb-n { background: var(--rouge); border-radius: 999px; min-width: 34px; height: 34px; display: grid; place-items: center; font-size: 15px; }
.pb-t { font-weight: 600; font-variant-numeric: tabular-nums; opacity: .85; }

dialog.feuille { border: 0; padding: 0; width: min(540px, 100vw); max-height: min(90vh, 880px); border-radius: 28px; background: var(--carte); color: var(--noir);
  box-shadow: 0 30px 80px rgba(0,0,0,.25); overflow: hidden; }
dialog.feuille::backdrop { background: rgba(0,0,0,.32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@media (max-width: 640px) { dialog.feuille { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 28px 28px 0 0; max-height: 94vh; } }
dialog[open] { animation: feuille .5s var(--ressort) both; }
@keyframes feuille { from { opacity: 0; transform: translateY(40px) scale(.98); } to { opacity: 1; transform: none; } }
.f-in { display: flex; flex-direction: column; max-height: inherit; }
.f-haut { position: relative; }
.f-haut img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.fermer { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.8);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: var(--noir); font-size: 20px; line-height: 1; z-index: 2; display: grid; place-items: center; }
.f-corps { padding: 20px 22px; overflow: auto; display: grid; gap: 18px; }
.f-corps h3 { font-size: 28px; margin: 0; }
.choix-formule { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt { border: 0; background: rgba(118,118,128,.08); border-radius: 14px; padding: 13px 14px; text-align: left; display: grid; gap: 2px; box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .2s, background .2s; }
.opt b { font-size: 16px; font-weight: 600; } .opt span { font-size: 13px; color: var(--gris); }
.opt.on { background: #fff; box-shadow: inset 0 0 0 2px var(--noir); }
.groupe h4 { margin: 0 0 10px; font-size: 15px; font-weight: 600; display: flex; justify-content: space-between; letter-spacing: -0.01em; }
.groupe h4 em { font-style: normal; color: var(--gris-2); font-weight: 400; font-size: 13px; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce { border: 0; background: rgba(118,118,128,.1); border-radius: 999px; padding: 9px 15px; font-weight: 500; font-size: 15px; transition: background .2s, color .2s; }
.puce.on { background: var(--noir); color: #fff; }
.puce:disabled { opacity: .35; text-decoration: line-through; }
.qte { display: inline-flex; align-items: center; background: rgba(118,118,128,.1); border-radius: 999px; }
.qte button { width: 44px; height: 46px; border: 0; background: transparent; font-size: 20px; font-weight: 500; }
.qte span { min-width: 22px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.f-bas { padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--sep); display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.9); }
.f-bas .btn { flex: 1; min-height: 50px; }

/* Récapitulatif de commande */
.ticket-f .f-corps { background: transparent; }
.ticket-tete p { margin: 0; color: var(--gris); font-size: 14px; }
.ligne-t { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; font-size: 15px; padding: 12px 0; border-bottom: 1px solid var(--sep); }
.ligne-t > b { color: var(--gris); font-weight: 500; font-variant-numeric: tabular-nums; }
.ligne-t small { display: block; color: var(--gris); font-size: 13px; }
.ligne-t .mini { display: flex; gap: 6px; }
.ligne-t .mini button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(118,118,128,.12); font-weight: 600; }
.ligne-t > span:last-child, .tot span { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tot { display: flex; justify-content: space-between; font-size: 15px; padding: 4px 0; color: var(--gris); }
.tot.grand { font-family: var(--display); font-weight: 700; font-size: 24px; color: var(--noir); padding-top: 12px; margin-top: 6px; letter-spacing: -0.02em; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: rgba(118,118,128,.12); border-radius: 10px; padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; border-radius: 8px; padding: 9px; font-weight: 500; font-size: 15px; transition: background .2s, box-shadow .2s; }
.seg button.on { background: #fff; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg button:disabled { opacity: .35; }
.case { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--gris); }
.case input { width: 20px; height: 20px; accent-color: var(--rouge); margin-top: 1px; }
.note-info { font-size: 14px; background: rgba(118,118,128,.08); border-radius: 12px; padding: 12px 14px; color: var(--gris); }
.ok-grand { text-align: center; padding: 40px 24px; display: grid; gap: 14px; }
.ok-grand .display { color: var(--noir) !important; }
.pied { background: var(--fond); color: var(--gris); padding: 40px clamp(16px, 4vw, 40px) 120px; text-align: center; font-size: 13px; display: grid; gap: 8px; border-top: 1px solid var(--sep); }
.pied .display { color: var(--noir); font-size: 17px; }
.pied a { color: var(--bleu); text-decoration: none; }
.vide { text-align: center; padding: 60px 20px; color: var(--gris); }

/* Logo */
.marque { display: flex; align-items: center; }
.marque .logo { height: 48px; width: auto; display: block; }
.affiche-in { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: clamp(16px, 4vw, 56px); }
.affiche-logo { height: clamp(150px, 26vw, 300px); width: auto; animation: monte .8s var(--ressort) .1s both; }
@media (max-width: 640px) {
  .affiche-in { grid-template-columns: 1fr; }
  .affiche-logo { order: -1; height: 132px; justify-self: start; margin-bottom: -4px; }
  .marque .logo { height: 42px; }
}

/* Détection de l'adresse */
.loc { display: grid; gap: 8px; }
.loc-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 0; border-radius: 14px;
  background: rgba(0,113,227,.1); color: var(--bleu); font-weight: 600; font-size: 16px; transition: transform .1s, background .2s; }
.loc-btn:active { transform: scale(.98); }
.loc-btn:disabled { opacity: .7; }
.loc-btn:disabled svg { animation: pulse 1s ease-in-out infinite; }
.loc-btn.ok { background: rgba(36,138,61,.1); color: var(--vert); }
@keyframes pulse { 50% { opacity: .3; } }
.loc-info { margin: 0; font-size: 14px; color: var(--gris); line-height: 1.4; }
.loc-info.alerte { color: var(--ambre); }
.lien { border: 0; background: none; padding: 0; color: var(--bleu); font: inherit; font-weight: 600; text-decoration: underline; }
.zone-auto { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(118,118,128,.08); border-radius: 14px; padding: 12px 14px; }
.zone-auto span { font-weight: 600; font-size: 15px; display: grid; gap: 2px; }
.zone-auto small { font-weight: 400; color: var(--gris); font-size: 13px; }
.zone-auto b { font-variant-numeric: tabular-nums; }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .grille-2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .affiche-logo { animation: none; } .loc-btn:disabled svg { animation: none; } }
@media (max-width: 640px) { .affiche-logo { display: none; } }
dialog.feuille .champ, dialog.feuille .f-in > div > div { min-width: 0; }
dialog.feuille select { width: 100%; min-width: 0; max-width: 100%; text-overflow: ellipsis; }
.toast { bottom: calc(92px + env(safe-area-inset-bottom)); }

/* Feuilles (panier, fiche) : défilement vertical uniquement, rien ne dépasse en largeur (iPhone) */
dialog.feuille { max-width: 100%; overflow: hidden; overscroll-behavior: contain; }
dialog.feuille .f-in, dialog.feuille .defile-v, dialog.feuille .f-corps { max-width: 100%; min-width: 0; }
.defile-v, dialog.feuille .f-corps { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
dialog.feuille * { min-width: 0; }
dialog.feuille input, dialog.feuille select, dialog.feuille textarea { max-width: 100%; box-sizing: border-box; }
dialog.feuille input[type="datetime-local"], dialog.feuille input[type="date"], dialog.feuille input[type="time"] {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; text-align: left; }
dialog.feuille input::-webkit-date-and-time-value { text-align: left; }
.ligne-t > div, .tot span:first-child, .ticket-tete p, .loc-info { overflow-wrap: anywhere; }
.defile-v { flex: 1 1 auto; min-height: 0; }
.plat p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cats { position: relative; scroll-behavior: smooth; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html, .cats { scroll-behavior: auto; } }
.champ .facultatif { font-weight: 400; color: #86868b; font-size: 13px; margin-left: 4px; }

/* Messages : en haut de l'écran, sous la barre de catégories, pour ne jamais recouvrir le bouton panier */
.toast { top: calc(env(safe-area-inset-top) + 124px); bottom: auto; transform: translate(-50%, -260%); max-width: calc(100% - 32px); text-align: center; pointer-events: none; }
.toast.on { transform: translate(-50%, 0); }
/* Bouton panier : toujours visible, même vide */
.panier-bouton.est-vide { background: rgba(29,29,31,.72); }
.panier-bouton.est-vide .pb-n { background: rgba(255,255,255,.18); }
.panier-bouton.rebond { animation: rebond .45s var(--ressort); }
@keyframes rebond { 30% { transform: scale(1.08); } 60% { transform: scale(.97); } }
.panier-vide { padding: 18px 0; color: var(--gris); font-size: 16px; line-height: 1.5; }
body { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
@media (prefers-reduced-motion: reduce) { .panier-bouton.rebond { animation: none; } }
/* Retirer un ingrédient : la puce « sans » cochée est barrée de rouge */
.puce.sans.on { background: rgba(227,21,26,.1); color: var(--rouge); border-color: var(--rouge); text-decoration: line-through; text-decoration-thickness: 1.5px; }

/* En-tête : villes à gauche, logo au centre, compte à droite */
.barre { display: grid; grid-template-columns: 1fr auto 1fr; }
.barre .villes { justify-self: start; margin-left: 0; }
.barre .marque { justify-self: center; }
.barre .compte { justify-self: end; }
.villes .court { display: none; }
@media (max-width: 420px) {
  .villes .long { display: none; } .villes .court { display: inline; }
  .villes button { padding: 6px 12px; }
}

/* Loi 09-08 / CNDP */
.pied-legal { margin: 10px 0 0; font-size: 13px; } .pied-legal a { color: var(--gris); }
.cndp-note { margin: 0; padding: 0 20px 8px; font-size: 12px; color: var(--gris); line-height: 1.4; } .cndp-note a { color: var(--gris); }
.cookies { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 45; max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 16px;
  background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 6px 24px rgba(0,0,0,.12), 0 0 0 1px rgba(0,0,0,.05); animation: monte .4s var(--ressort) both; }
.cookies[hidden] { display: none; }
.cookies p { margin: 0; font-size: 13px; line-height: 1.35; color: var(--noir); flex: 1; } .cookies a { color: var(--gris); }
.ck-b { display: flex; gap: 6px; flex: none; }
.ck-b button { border: 0; min-height: 40px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 14px; background: rgba(118,118,128,.14); color: var(--noir); cursor: pointer; touch-action: manipulation; }
.ck-b button.ok { background: var(--noir); color: #fff; }
/* Le bouton panier remonte au-dessus du bandeau tant qu'il est affiché */
body.avec-cookies .panier-bouton { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 70px); }
@media (max-width: 380px) { .cookies p { font-size: 12px; } .ck-b button { padding: 0 11px; } }

/* Choix du point de livraison sur la carte */
.carte-choix { border: 0; padding: 0; width: min(560px, 100vw); max-width: 100vw; height: min(720px, 100dvh); max-height: 100dvh; border-radius: 20px; overflow: hidden; display: none; }
.carte-choix[open] { display: flex; flex-direction: column; }
.carte-choix::backdrop { background: rgba(0,0,0,.45); }
.cc-tete { padding: 14px 18px; display: grid; gap: 2px; }
.cc-tete b { font-size: 18px; } .cc-tete small { color: var(--gris); }
.cc-zone { position: relative; flex: 1; min-height: 300px; }
#cc-map { position: absolute; inset: 0; }
.cc-repere { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -30px 0 0 -15px; z-index: 500; pointer-events: none;
  background: #e3151a; border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.cc-bas { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); }
@media (max-width: 600px) { .carte-choix { border-radius: 0; height: 100dvh; } }
