/*
 * Borne du comptoir — feuille de style.
 *
 * Reprise de la maquette validée en septembre 2026 : marine du logo pour le
 * texte, papier presque blanc, orange réservé aux actions, vert aux
 * confirmations. Toutes les actions sont ancrées sous le pouce ; la carte
 * défile au-dessus.
 *
 * Aucun style en ligne : la CSP n'accepte que ce fichier.
 */

:root {
  /* Couleurs et polices du restaurant servi, posées au démarrage : les
     valeurs se lisent dans src/restaurant/theme.ts, avec leurs contrastes.
     La CSP de la borne refuse tout style en ligne, d'où la substitution.
     Les `--…-rvb` sont les mêmes couleurs en composantes séparées, pour les
     voiles et les ombres : `rgba(var(--encre-rvb), .08)`. Elles sont calculées
     depuis la couleur, jamais recopiées — un voile ne peut donc pas rester à
     la teinte d'un autre restaurant. */
  --encre: #1a1414;
  --encre-2: #5b4f4f;
  --encre-3: #6e6060;
  --encre-fond: #2a1c1c;
  --sur-sombre: #e8ded8;
  --sur-sombre-2: #c4b2ac;
  --papier: #ffffff;
  --voile: #ece7e0;
  --voile-2: #f7f5f2;
  --braise: #ea171c;
  --braise-fonce: #c8121a;
  --basilic: #b80f16;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --corps: 'Bricolage Grotesque', system-ui, sans-serif;
  --choisi-fond: var(--papier);
  --choisi-bord: var(--braise);
  --choisi-halo: 0 0 0 3px rgba(234, 23, 28, .12);
  --choisi-encre: var(--encre);
  --choisi-detail: var(--encre-2);
  --choisi-ouvert: var(--basilic);
  --choisi-ferme: var(--braise-fonce);
  --aplat: #8a0e12;
  --aplat-survol: #6f0b0f;
  --aplat-ombre: rgba(138, 14, 18, .45);
  --vign-ratio: var(--ratio-photo);
  --vign-rubrique: 88px;
  --vign-plat: 96px;
  --encre-rvb: 26, 20, 20;
  --papier-rvb: 255, 255, 255;
  --braise-rvb: 234, 23, 28;
  --basilic-rvb: 184, 15, 22;
  --fond-page: var(--voile-2);
  --fond-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='72'%3E%3Cpath d='M0 1H96M0 37H96M1 0V36M49 36V72' stroke='%23e6e1da' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  --colonne-fond: var(--voile-2);
  --colonne-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='72'%3E%3Cpath d='M0 1H96M0 37H96M1 0V36M49 36V72' stroke='%23e6e1da' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  --tuile-fond: var(--papier);
  --tuile-rayon: 26px;
  --tuile-marge: 0 12px;
  --tuile-ombre: 0 1px 0 rgba(0, 0, 0, .05), 0 10px 30px rgba(40, 10, 10, .08);
  --surface: var(--papier);
  --totaux-cotes: 12px;
  --totaux-pad: 16px;
  --sous-retour: normal;
  --collant-affiche: inline-flex;
  --collant-fond: #f8c84f;
  --collant-encre: var(--encre);
  --collant-inclinaison: 6deg;
  --prix-sous-nom: none;
  --damier: repeating-conic-gradient(var(--braise) 0 25%, var(--papier) 0 50%);
  --damier-bande: 8px;
  --titre-largeur: 75%;
  --titre-casse: uppercase;
  --titre-graisse: 800;
  --titre-lettrage: -.005em;
  --titre-interligne: .98;
  --bouton-rayon: 999px;
  --bouton-largeur: 75%;
  --bouton-casse: uppercase;
  --bouton-graisse: 800;
  --bouton-lettrage: .04em;
  --prix-fond: var(--braise);
  --prix-encre: #fff;
  --prix-rayon: 999px;
  --prix-marge: 5px 10px;
  /* Le rapport des photos de plats du restaurant servi : 4/3, 16/9. Substitué
     au démarrage depuis les formats des fichiers (src/menu/formats-photo.ts),
     pour qu'un cadre ne rogne jamais une photo livrée. */
  --ratio-photo: 16 / 9;
  /* Le cadre de l'écran de veille : carré là où la maquette l'a voulu, le
     rapport des photos ailleurs. */
  --ratio-veille: 16 / 9;
  color-scheme: light;
}

* { box-sizing: border-box }
html, body { margin: 0; height: 100% }
body {
  /* La couleur du restaurant, et son motif par-dessus : le mur de briques
     d'Il Magico, rien chez qui n'en a pas (`fond` de theme.ts). */
  background: var(--fond-page) var(--fond-motif);
  color: var(--encre);
  font-family: var(--corps);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0 }
img { display: block }
[hidden] { display: none !important }

/* ---------- Cadre : plein écran sur téléphone, colonne sur ordinateur ---------- */
.app {
  position: relative;
  height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  /* Papier plein chez Special Thaï, crème à briques chez Il Magico, dont les
     listes se posent dessus en tuiles (`fond` et `tuile` de theme.ts). */
  background: var(--colonne-fond) var(--colonne-motif);
  overflow: hidden;
}
@media (min-width: 600px) {
  .app { box-shadow: 0 0 0 1px rgba(var(--encre-rvb), .06), 0 30px 80px -30px rgba(var(--encre-rvb), .35) }
}

/* ---------- Barre haute ---------- */
.top {
  position: relative;
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 16px 12px;
  background: var(--papier); border-bottom: 1px solid var(--voile); z-index: 5;
  min-height: 64px;
}
/* La bande de damier de la charte d'Il Magico, comme en haut de son site. Sa
   hauteur vaut 0 chez qui n'en a pas, et la bande disparaît sans autre règle. */
.top::before {
  content: ""; position: absolute; inset: 0 0 auto; height: var(--damier-bande);
  background: var(--damier) 0 0 / var(--damier-bande) var(--damier-bande);
}
.top .logo { height: 26px; width: auto }
.top .titre {
  font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -.01em;
  flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rond {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: var(--voile-2); color: var(--encre-2);
}
.rond:hover { background: var(--voile) }
.rond svg { width: 19px; height: 19px }

/* ---------- Corps défilant ---------- */
.corps { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch }
/* Assez pour les deux boutons ancrés du panier : rien ne passe dessous. */
.corps.pad { padding-bottom: 150px }
.ecran { display: none }
.ecran.on { display: block }
.espace { height: 10px }

/* ---------- Chargement et erreur ---------- */
.attente { padding: 28px 18px; display: flex; flex-direction: column; gap: 14px }
.attente-ligne { display: block; height: 62px; border-radius: 12px; background: var(--surface) }
.attente p { margin: 8px 0 0; font-size: 14px; color: var(--encre-3); text-align: center }
.erreur { padding: 70px 28px; text-align: center }
.erreur h2 { font-family: var(--display); font-size: 20px; margin: 0 0 8px; font-weight: 600 }
.erreur p { margin: 0 0 22px; font-size: 14.5px; color: var(--encre-2); line-height: 1.5 }
.bouton-simple {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px;
  padding: 0 22px; border-radius: max(var(--bouton-rayon), 12px); background: var(--aplat); color: #fff;
  font-family: var(--display); font-weight: var(--bouton-graisse); font-stretch: var(--bouton-largeur);
  text-transform: var(--bouton-casse); letter-spacing: var(--bouton-lettrage); font-size: 15.5px;
}

/* ---------- Accueil ---------- */
.accroche { padding: 22px 18px 6px }
/* Les titres de section parlent la voix du restaurant : capitales condensées
   chez Il Magico, inchangées ailleurs (`titre` de theme.ts). */
.accroche h1 {
  font-family: var(--display); font-weight: var(--titre-graisse); font-stretch: var(--titre-largeur);
  text-transform: var(--titre-casse); font-size: 26px; line-height: var(--titre-interligne);
  margin: 0 0 6px; letter-spacing: var(--titre-lettrage); text-wrap: balance;
}
.accroche p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--encre-2) }
.statut {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
  padding: 6px 11px 6px 9px; border-radius: 999px; background: rgba(var(--basilic-rvb), .09);
  color: var(--basilic); font-size: 12.5px; font-weight: 600;
}
.statut .pastille { width: 7px; height: 7px; border-radius: 50%; background: currentColor }
.statut.ferme { background: rgba(var(--braise-rvb), .09); color: var(--braise-fonce) }

.rappel {
  margin: 16px 12px 0; padding: 14px 16px; border-radius: 14px; width: calc(100% - 24px);
  background: var(--aplat); color: #fff; display: flex; align-items: center; gap: 12px; text-align: left;
}
.rappel .txt { flex: 1; min-width: 0 }
.rappel .nom { display: block; font-family: var(--display); font-weight: 600; font-size: 15.5px }
.rappel .sous { display: block; font-size: 12.8px; color: var(--sur-sombre); margin-top: 2px }
.rappel .chev { color: #fff }

/* ---------- Listes de rubriques ---------- */
/* Les listes se posent en tuile blanche chez Il Magico, comme les sections de
   la carte de son site ; ailleurs le fond vaut `none` et rien ne change. */
.rubriques, .plats, .fiche, .groupe, .lignes, .confirm {
  background: var(--tuile-fond); border-radius: var(--tuile-rayon);
  margin: var(--tuile-marge); box-shadow: var(--tuile-ombre);
}
.rubriques { display: flex; flex-direction: column; padding: 18px 12px 8px }
.rub {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 10px 6px; border-radius: 12px;
}
.rub:hover, .rub:focus-visible { background: var(--voile-2) }
/* La hauteur suit le rapport du restaurant (`vignette` de theme.ts) : carré
   là où la maquette l'a voulu, au format des photos chez Il Magico, où un
   carré en couperait près de la moitié de la largeur. */
.vign {
  flex: 0 0 auto; width: var(--vign-rubrique); height: auto; aspect-ratio: var(--vign-ratio);
  border-radius: 11px; object-fit: cover; background: var(--voile);
}
.vign.vide { display: grid; place-items: center; color: var(--encre-3); background: var(--voile-2) }
.vign.vide svg { width: 22px; height: 22px }
.rub .txt { display: block; flex: 1; min-width: 0 }
.rub .nom { display: block; font-family: var(--display); font-weight: 600; font-size: 16.5px; letter-spacing: -.01em }
.rub .sous {
  display: block; font-size: 13px; color: var(--encre-2); margin-top: 2px; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: var(--sous-retour);
}
.rub .des {
  display: block; font-size: 12.5px; color: var(--encre-3); margin-top: 4px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.chev { flex: 0 0 auto; color: var(--encre-3) }
.chev svg { width: 17px; height: 17px; display: block }

/* ---------- Liste de plats ---------- */
.entete { padding: 20px 18px 4px }
.entete h1 {
  font-family: var(--display); font-weight: var(--titre-graisse); font-stretch: var(--titre-largeur);
  text-transform: var(--titre-casse); font-size: 24px; margin: 0;
  line-height: var(--titre-interligne); letter-spacing: var(--titre-lettrage);
}
.entete p { margin: 5px 0 0; font-size: 13.5px; color: var(--encre-2); line-height: 1.45 }
.plats { display: flex; flex-direction: column; padding: 14px 12px 8px }
.plat {
  display: flex; gap: 14px; width: 100%; text-align: left; align-items: flex-start;
  padding: 12px 6px; border-radius: 12px; border-bottom: 1px solid var(--voile);
}
.plat:last-child { border-bottom: 0 }
.plat:hover, .plat:focus-visible { background: var(--voile-2) }
.plat .txt { display: block; flex: 1; min-width: 0 }
.plat .nom { display: block; font-family: var(--display); font-weight: 600; font-size: 16px; line-height: 1.25; letter-spacing: -.01em }
.plat .des { display: block; font-size: 12.8px; color: var(--encre-2); line-height: 1.42; margin-top: 4px }
/* Pilule rouge chez Il Magico, texte nu ailleurs (`prix` de theme.ts). */
.plat .prix {
  display: inline-block; margin-top: 7px; padding: var(--prix-marge);
  border-radius: var(--prix-rayon); background: var(--prix-fond); color: var(--prix-encre);
  font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums;
}
.plat .vign { width: var(--vign-plat) }
.plat.epuise { cursor: default; opacity: .5 }
.plat.epuise:hover { background: none }
.plat.epuise .prix { font-weight: 600; color: var(--encre-2) }
.plat.epuise .vign { filter: grayscale(1) }
.offre.epuisee { opacity: .5 }
.offre.epuisee .offre-img { filter: grayscale(1) }
.offre.epuisee .prix { color: var(--encre-2) }
.opt.epuisee { cursor: default; opacity: .5 }
.opt.epuisee .nom { text-decoration: line-through }
.fiche .allerg { margin: 8px 0 0; font-size: 14px; color: var(--encre); line-height: 1.42 }

/* ---------- Fiche plat ---------- */
.photo { width: 100%; aspect-ratio: var(--ratio-photo); object-fit: cover; background: var(--voile) }
.photo-vide { width: 100%; aspect-ratio: 16 / 7; background: var(--voile-2); display: grid; place-items: center; color: var(--encre-3) }
.photo-vide svg { width: 30px; height: 30px }
.fiche { position: relative; padding: 20px 18px 8px }
.fiche h1 {
  font-family: var(--display); font-weight: 700; font-size: 25px; margin: 0;
  letter-spacing: -.025em; line-height: 1.12; text-wrap: balance;
}
.fiche .des { margin: 9px 0 0; font-size: 14px; line-height: 1.55; color: var(--encre-2) }
.fiche .base {
  display: var(--prix-sous-nom); margin: 12px 0 0; font-weight: 700; font-size: 17px;
  font-variant-numeric: tabular-nums;
}
/* L'autocollant de prix d'Il Magico, collé sur la photo et incliné. Ailleurs
   il n'est pas dessiné du tout (`autocollant` de theme.ts). */
.collant {
  display: var(--collant-affiche); position: absolute; right: 16px; bottom: calc(100% + 14px);
  margin: 0; padding: 11px 17px; border-radius: 999px;
  background: var(--collant-fond); color: var(--collant-encre);
  font-family: var(--display); font-weight: 800; font-stretch: 75%; text-transform: uppercase;
  font-size: 25px; line-height: 1; letter-spacing: .02em;
  rotate: var(--collant-inclinaison); box-shadow: 0 8px 20px rgba(0, 0, 0, .16);
}
.groupe { padding: 6px 18px 0 }
.groupe h2 {
  font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: .11em;
  text-transform: uppercase; color: var(--encre-3); margin: 22px 0 2px;
}
.groupe .regle {
  font-size: 11.5px; font-weight: 600; color: var(--encre-3);
  letter-spacing: .02em; text-transform: none; margin-left: 8px;
}
.groupe .regle.oblig { color: var(--braise-fonce) }
.opts { display: flex; flex-direction: column; margin-top: 8px }
.opts.note-zone { padding-top: 10px }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 13px 2px; border-bottom: 1px solid var(--voile);
}
.opt:last-child { border-bottom: 0 }
.coche {
  flex: 0 0 auto; width: 21px; height: 21px; border-radius: 50%;
  border: 1.5px solid var(--voile); display: grid; place-items: center;
}
.opt[role="checkbox"] .coche { border-radius: 6px }
.opt[aria-checked="true"] .coche { background: var(--aplat); border-color: var(--aplat) }
.coche svg { width: 11px; height: 11px; color: #fff; opacity: 0 }
.opt[aria-checked="true"] .coche svg { opacity: 1 }
.opt .nom { flex: 1; font-size: 15px; font-weight: 500 }
.opt .sup { font-size: 14px; font-weight: 600; color: var(--encre-2); font-variant-numeric: tabular-nums }
.champ {
  width: 100%; padding: 13px 14px; border-radius: 11px; border: 1.5px solid var(--voile);
  background: var(--voile-2); font: inherit; font-size: 16px; color: var(--encre);
}
.champ:focus { border-color: var(--encre-3); background: #fff }

.qte { display: flex; align-items: center; gap: 2px; margin: 24px 18px 0; justify-content: center }
.qte button {
  width: 46px; height: 46px; border-radius: 50%; background: var(--surface);
  display: grid; place-items: center; color: var(--encre);
}
.qte button:hover { background: var(--voile) }
.qte button:disabled { color: var(--encre-3); cursor: not-allowed }
.qte svg { width: 17px; height: 17px }
.qte .n {
  min-width: 64px; text-align: center; font-family: var(--display);
  font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums;
}
/* Posé sur la carte qui défile : un fond plein, sinon le texte se mêle aux options. */
.indice {
  width: max-content; max-width: 100%; margin: 0 auto 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); text-align: center; font-size: 12.8px; font-weight: 600; color: var(--encre-2);
}

/* ---------- Commande ---------- */
.lignes { display: flex; flex-direction: column; padding: 8px 18px }
.ligne { display: flex; gap: 13px; padding: 16px 0; border-bottom: 1px solid var(--voile); align-items: flex-start }
.ligne:last-child { border-bottom: 0 }
.ligne .q {
  flex: 0 0 auto; min-width: 27px; height: 27px; padding: 0 6px; border-radius: 7px; background: var(--aplat);
  color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center;
  font-variant-numeric: tabular-nums; margin-top: 1px;
}
.ligne .txt { display: block; flex: 1; min-width: 0 }
.ligne .nom { display: block; font-family: var(--display); font-weight: 600; font-size: 15.5px; line-height: 1.25 }
.ligne .opt-l { display: block; font-size: 12.5px; color: var(--encre-2); margin-top: 3px; line-height: 1.4 }
.ligne .retirer { display: block; font-size: 12.5px; color: var(--braise-fonce); font-weight: 600; margin-top: 7px; padding: 2px 0 }
.ligne .retirer:hover { text-decoration: underline }
.ligne .p { font-weight: 600; font-size: 14.5px; font-variant-numeric: tabular-nums; margin-top: 1px }

.enplus { margin: 10px 18px 0; padding: 14px 0 0; border-top: 1px solid var(--voile) }
.enplus h2 { font-family: var(--display); font-size: 15px; font-weight: 600; margin: 0 0 10px }
.pastilles { display: flex; flex-wrap: wrap; gap: 8px }
.pastille-plus {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px 0 6px;
  border-radius: 999px; border: 1.5px solid var(--voile); font-size: 13.5px; font-weight: 600;
}
.pastille-plus:not(:has(.pastille-img)) { padding-left: 14px }
.pastille-img { width: 28px; height: 28px; border-radius: 999px; object-fit: cover; background: var(--voile) }
.pastille-plus:hover { border-color: var(--encre-3); background: var(--voile-2) }
.pastille-plus .sup { color: var(--encre-2); font-weight: 500; font-variant-numeric: tabular-nums }

/* ---------- Pour accompagner ? ---------- */
/* Une rangée par suggestion, qui défile sous le doigt : l'écran tient sans
   défiler vers le bas, et la carte suivante qui dépasse invite à glisser. */
.propositions { padding: 4px 0 8px }
.proposition { margin-top: 20px }
.proposition h2 { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.015em; margin: 0 18px 10px }
.offres {
  list-style: none; margin: 0; padding: 2px 18px 12px;
  display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scroll-padding-left: 18px; scrollbar-width: none;
}
.offres::-webkit-scrollbar { display: none }
.offre {
  flex: 0 0 136px; scroll-snap-align: start; display: flex;
  border-radius: 14px; border: 1.5px solid var(--voile); background: #fff; overflow: hidden;
}
.offre.choisie { border-color: var(--basilic); background: rgba(var(--basilic-rvb), .05) }
.offre-corps {
  display: flex; flex-direction: column; width: 100%; min-height: 128px; text-align: left;
  padding: 12px 12px 11px; touch-action: manipulation;
}
button.offre-corps:hover { background: var(--voile-2) }
/* Même cadrage que les photos de la carte : une photo recadrée pour le cadre
   d'à côté couperait ce que l'autre montre — une canette y perdrait son pied. */
.offre-img {
  width: calc(100% + 24px); max-width: none; aspect-ratio: var(--ratio-photo); height: auto;
  margin: -12px -12px 10px; object-fit: cover; background: var(--voile);
}
.offre .nom {
  font-family: var(--display); font-weight: 600; font-size: 15px; line-height: 1.25; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.offre .precision { font-size: 12.5px; color: var(--encre-2); margin-top: 3px; line-height: 1.3 }
.offre .pied { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 6px }
.offre .prix { font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums }
.offre .choisir {
  flex: 0 0 auto; padding: 5px 11px; border-radius: 999px; background: var(--voile-2);
  color: var(--encre); font-size: 12.5px; font-weight: 700;
}
/* Dans une liste, les articles se rangent en grille : une boisson cachée sur
   le côté d'une rangée qui défile ne se vend pas. */
.offres.grille {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px; overflow: visible;
}
.offres.grille .offre { flex: initial }
.rond-plus {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; background: var(--braise); color: #fff;
  display: grid; place-items: center; box-shadow: 0 4px 10px -4px rgba(var(--braise-rvb), .6);
}
.rond-plus svg { width: 15px; height: 15px }
.pas { display: flex; align-items: center; justify-content: space-between; margin-top: 10px }
.pas-b {
  width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1.5px solid rgba(var(--basilic-rvb), .35);
  color: var(--basilic); display: grid; place-items: center; touch-action: manipulation;
}
.pas-b:hover { background: rgba(var(--basilic-rvb), .08) }
.pas-b:disabled { color: var(--encre-3); border-color: var(--voile); cursor: not-allowed }
.pas-b svg { width: 14px; height: 14px }
.pas-n { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--basilic); font-variant-numeric: tabular-nums }

/* Le bloc des totaux prend lui aussi la tuile, mais garde sa marge propre. */
.totaux {
  margin: 14px var(--totaux-cotes) 0; padding: 16px var(--totaux-pad) 4px;
  border-top: 1px solid var(--voile);
  background: var(--tuile-fond); border-radius: var(--tuile-rayon); box-shadow: var(--tuile-ombre);
}
.tl { display: flex; justify-content: space-between; font-size: 14px; color: var(--encre-2); padding: 4px 0 }
.tl.grand {
  font-family: var(--display); font-size: 21px; font-weight: 700; color: var(--encre);
  padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--voile);
}
.tl span:last-child { font-variant-numeric: tabular-nums }

.prenom-zone { margin: 20px 18px 0 }
.prenom-zone label { display: block; font-family: var(--display); font-size: 15.5px; font-weight: 600; margin: 0 0 8px }
.prenom-zone .aide { margin: 7px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--encre-3) }
/* Le prénom manque : le champ le dit, sans message qui masque la commande. */
.champ.a-remplir { border-color: var(--braise); background: #fff }
.champ.grand { font-family: var(--display); font-weight: 600; font-size: 21px; padding: 15px 16px }

/* ---------- Clavier de l'écran du restaurant ---------- */
.affichage-prenom {
  margin: 18px 18px 0; min-height: 66px; padding: 12px 18px; border-radius: 14px;
  border: 1.5px solid var(--voile); background: #fff; display: flex; align-items: center;
  font-family: var(--display); font-weight: 700; font-size: 28px; letter-spacing: -.01em;
}
.affichage-prenom.vide::before {
  content: 'Touchez les lettres ci-dessous';
  font-family: var(--corps); font-weight: 500; font-size: 16px; letter-spacing: 0; color: var(--encre-3);
}
.affichage-prenom.vide .curseur { display: none }
.affichage-prenom.a-remplir { border-color: var(--braise) }
.curseur { width: 2px; height: 30px; margin-left: 3px; background: var(--braise); animation: clignote 1s steps(1) infinite }
@keyframes clignote { 50% { opacity: 0 } }
.clavier { margin: 18px 10px 0; display: flex; flex-direction: column; gap: 8px }
.rangee { display: flex; justify-content: center; gap: 6px }
.touche {
  flex: 1 1 0; max-width: 52px; height: 52px; border-radius: 10px;
  background: var(--surface); box-shadow: inset 0 -2px 0 rgba(var(--encre-rvb), .08);
  font-family: var(--display); font-weight: 600; font-size: 20px; color: var(--encre);
  display: grid; place-items: center; touch-action: manipulation; user-select: none;
}
.touche:active { background: var(--voile); transform: translateY(1px) }
.touche.espace { flex: 3 1 0; max-width: none; font-size: 15px; color: var(--encre-2) }
.touche.effacer { flex: 1.5 1 0; max-width: none; color: var(--encre-2) }
.touche.effacer svg { width: 26px; height: 26px }
.invisible { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }

.avis {
  margin: 20px 18px 8px; padding: 14px 15px; border-radius: 12px; background: var(--voile-2);
  display: flex; gap: 11px; align-items: flex-start;
}
.avis svg { flex: 0 0 auto; width: 17px; height: 17px; color: var(--encre-2); margin-top: 1px }
.avis p { margin: 0; font-size: 12.8px; line-height: 1.5; color: var(--encre-2) }
.avis b { color: var(--encre); font-weight: 600 }

.vide-panier { padding: 70px 30px; text-align: center }
.vide-panier h1 { font-family: var(--display); font-size: 19px; margin: 0 0 8px; font-weight: 600 }
.vide-panier p { margin: 0; font-size: 14px; color: var(--encre-2); line-height: 1.5 }

/* ---------- Confirmation ---------- */
.confirm { padding: 38px 22px 30px; text-align: center }
.sceau {
  width: 54px; height: 54px; border-radius: 50%; background: rgba(var(--basilic-rvb), .1);
  color: var(--basilic); display: grid; place-items: center; margin: 0 auto 20px;
}
.sceau svg { width: 27px; height: 27px }
.confirm h1 {
  font-family: var(--display); font-weight: var(--titre-graisse); font-stretch: var(--titre-largeur);
  text-transform: var(--titre-casse); font-size: 23px; margin: 0 0 8px;
  line-height: var(--titre-interligne); letter-spacing: var(--titre-lettrage);
}
.confirm .sous { margin: 0; font-size: 14.5px; color: var(--encre-2); line-height: 1.5 }
.numero { margin: 26px 0; padding: 26px 12px 22px; border-radius: 18px; background: var(--aplat); color: #fff }
.numero .lab {
  font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--sur-sombre-2); margin: 0 0 4px;
}
.numero .n {
  font-family: var(--display); font-weight: 700; font-size: 76px; line-height: 1;
  letter-spacing: -.04em; font-variant-numeric: tabular-nums; margin: 0;
}
.numero .montant {
  margin: 14px 0 0; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .15);
  font-size: 14.5px; color: var(--sur-sombre); font-variant-numeric: tabular-nums;
}
.numero .montant b { color: #fff; font-weight: 700 }
.etapes { text-align: left; display: flex; flex-direction: column; gap: 2px; margin-top: 4px }
.etape { display: flex; gap: 13px; padding: 11px 2px; align-items: flex-start }
.etape .n {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--voile-2);
  color: var(--encre-2); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; margin-top: 1px;
}
.etape p { margin: 0; font-size: 13.8px; line-height: 1.5; color: var(--encre-2) }
.retour-auto { margin: 18px 0 0; font-size: 12.5px; color: var(--encre-3) }
.etape b { color: var(--encre); font-weight: 600 }

/* ---------- Actions ancrées sous le pouce ---------- */
.socle {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 12px 14px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--colonne-fond) 62%, transparent);
  display: none;
}
.socle.on { display: block }
.cta {
  width: 100%; min-height: 54px; border-radius: max(var(--bouton-rayon), 14px); background: var(--braise); color: #fff;
  font-family: var(--display); font-weight: var(--bouton-graisse); font-stretch: var(--bouton-largeur);
  text-transform: var(--bouton-casse); font-size: 16.5px; letter-spacing: calc(-.01em + var(--bouton-lettrage));
  display: flex; align-items: center; justify-content: center; gap: 12px;
  box-shadow: 0 6px 18px -6px rgba(var(--braise-rvb), .6);
}
.cta:hover { background: var(--braise-fonce) }
.cta:disabled { background: var(--voile); color: var(--encre-3); box-shadow: none; cursor: not-allowed }
.cta .sep { opacity: .45 }
.cta .m { font-variant-numeric: tabular-nums }
.cta.sombre { background: var(--aplat); box-shadow: 0 6px 18px -6px var(--aplat-ombre) }
.cta.sombre:hover { background: var(--aplat-survol) }
.cta.sombre:disabled { background: var(--voile); color: var(--encre-3); box-shadow: none }
.cta.creux { background: none; color: var(--encre-2); box-shadow: none; min-height: 46px; font-size: 15px }
.cta.creux:hover { background: var(--voile-2) }

.flot {
  position: absolute; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 18;
  min-height: 56px; border-radius: max(var(--bouton-rayon), 15px); background: var(--aplat); color: #fff;
  display: flex; align-items: center; gap: 12px; padding: 0 8px 0 16px; text-align: left;
  box-shadow: 0 12px 30px -8px var(--aplat-ombre);
}
.flot .c {
  min-width: 25px; height: 25px; padding: 0 6px; border-radius: 7px; background: rgba(255, 255, 255, .16);
  font-size: 13px; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums;
}
.flot .l {
  flex: 1; font-family: var(--display); font-weight: var(--bouton-graisse);
  font-stretch: var(--bouton-largeur); text-transform: var(--bouton-casse);
  letter-spacing: var(--bouton-lettrage); font-size: 15.5px;
}
.flot .m { font-weight: 700; font-size: 15.5px; font-variant-numeric: tabular-nums; padding-right: 8px }
.flot .go { width: 40px; height: 40px; border-radius: 11px; background: var(--braise); display: grid; place-items: center; color: #fff }
.flot .go svg { width: 17px; height: 17px }
.flot:hover .go { background: var(--braise-fonce) }

/* ---------- Message éphémère ---------- */
.toast {
  position: absolute; left: 50%; top: 76px; transform: translate(-50%, -14px); z-index: 40;
  background: var(--aplat); color: #fff; padding: 11px 17px; border-radius: 11px;
  font-size: 13.8px; font-weight: 600; box-shadow: 0 12px 30px -8px var(--aplat-ombre);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
  width: max-content; max-width: calc(100% - 32px); text-align: center; line-height: 1.4;
}
.toast.on { opacity: 1; transform: translate(-50%, 0) }

/* La case « je ne suis pas un robot » (anti-robot.js) : vide et invisible, sauf
   quand Cloudflare demande un geste ; alors au milieu de l'écran, par-dessus tout. */
.anti-robot { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 60 }
/* Cachée sans être retirée : Cloudflare doit pouvoir y préparer le jeton suivant. */
.anti-robot.faite { visibility: hidden; pointer-events: none }

.sans-script { padding: 40px 24px; text-align: center; font-family: var(--corps) }

:focus-visible { outline: 2.5px solid var(--braise); outline-offset: 2px; border-radius: 6px }

/* ---------- Veille de l'écran du restaurant ---------- */
/* Tout l'écran pour les photos : ni barre haute, ni défilement. */
.en-veille .top { display: none }
.en-veille .corps { display: flex; flex-direction: column }
#e-veille.on { flex: 1 0 auto; display: flex }
.veille {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 28px 24px calc(28px + env(safe-area-inset-bottom)); text-align: center;
  cursor: pointer; touch-action: manipulation;
}
.veille-logo { height: 52px; width: auto }
.veille-photos {
  position: relative; width: min(100%, 420px); aspect-ratio: var(--ratio-veille); margin: 6px 0; border-radius: 26px;
  overflow: hidden; background: var(--voile-2); box-shadow: 0 24px 60px -24px rgba(var(--encre-rvb), .45);
}
.veille-photos:empty { display: none }
.veille-photo { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.2s ease }
.veille-photo.on { opacity: 1 }
.veille-photo img { width: 100%; height: 100%; object-fit: cover }
.veille-photo.on img { animation: approche 8s ease-out both }
@keyframes approche { from { transform: scale(1) } to { transform: scale(1.08) } }
.veille-photo figcaption {
  position: absolute; left: 14px; bottom: 14px; max-width: calc(100% - 28px);
  padding: 8px 14px; border-radius: 999px; background: rgba(var(--encre-rvb), .78); color: #fff;
  font-family: var(--display); font-weight: 600; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.veille h1 {
  font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1.05;
  letter-spacing: -.03em; margin: 4px 0 0;
}
.veille p { margin: 0; max-width: 32ch; font-size: 15.5px; line-height: 1.5; color: var(--encre-2) }
.veille .statut { margin-top: 0 }
.veille-cta { width: auto; min-height: 60px; padding: 18px 32px; font-size: 18px; animation: invite 2.4s ease-in-out infinite }
@keyframes invite { 0%, 100% { transform: scale(1) } 50% { transform: scale(1.04) } }

/*
 * Écran large : la tablette de 10 pouces posée au comptoir, touchée debout à
 * bout de bras, mais aussi n'importe quel écran qui a la place. Ce n'est plus
 * la colonne du téléphone agrandie au zoom — qui gênait l'agrandissement
 * d'accessibilité et laissait la moitié de l'écran vide : la carte s'y lit en
 * grille de photos, les cibles grossissent, et la commande en cours reste
 * lisible en haut, écran après écran.
 *
 * La hauteur compte autant que la largeur : un téléphone tenu en travers est
 * large mais bas, et garde la mise en page du téléphone.
 */
@media (min-width: 700px) and (min-height: 560px) {
  /* Au comptoir, l'écran entier ; ailleurs, une colonne large et centrée. */
  .app { max-width: 1040px }
  .ecran-partage .app { max-width: none; box-shadow: none }

  /* Barre haute : le retour, le logo, et la commande en cours à droite. */
  .top { gap: 18px; padding: calc(20px + env(safe-area-inset-top)) 26px 18px; min-height: 88px }
  .top .logo { height: 34px }
  .top .titre { font-size: 23px }
  .rond { width: 54px; height: 54px }
  .rond svg { width: 24px; height: 24px }

  .panier-haut {
    flex: 0 0 auto; display: flex; align-items: center; gap: 12px; min-height: 56px;
    padding: 0 18px; border-radius: max(var(--bouton-rayon), 15px); background: var(--aplat); color: #fff; text-align: left;
  }
  .panier-haut .c {
    min-width: 30px; height: 30px; padding: 0 8px; border-radius: 9px; background: rgba(255, 255, 255, .17);
    display: grid; place-items: center; font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  }
  .panier-haut .l {
    font-family: var(--display); font-weight: var(--bouton-graisse); font-stretch: var(--bouton-largeur);
    text-transform: var(--bouton-casse); letter-spacing: var(--bouton-lettrage); font-size: 17px;
  }
  .panier-haut .m { font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums }
  .panier-haut:hover { background: var(--aplat-survol) }

  /* Le texte d'un écran qu'on lit debout, à cinquante centimètres. */
  .accroche { padding: 30px 24px 10px }
  .accroche h1 { font-size: 36px }
  .accroche p { font-size: 17.5px }
  .statut { font-size: 15px; padding: 8px 14px 8px 11px; margin-top: 18px }
  .entete { padding: 28px 24px 6px }
  .entete h1 { font-size: 32px }
  .entete p { font-size: 16.5px }
  .corps.pad { padding-bottom: 190px }

  /* Rubriques et plats en cartes photo : la carte se lit d'un coup d'œil. */
  .rubriques,
  .plats {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px; padding: 22px 20px 10px;
  }
  .rub,
  .plat {
    flex-direction: column; align-items: stretch; gap: 0; padding: 0;
    border: 1.5px solid var(--voile); border-radius: 18px; overflow: hidden; background: #fff;
  }
  .rub:hover, .plat:hover { background: var(--voile-2) }
  .rub .vign,
  .plat .vign { order: -1; width: 100%; height: auto; aspect-ratio: var(--ratio-photo); border-radius: 0 }
  /* Sans photo, un bandeau plutôt qu'un grand rectangle vide. */
  .rub .vign.vide,
  .plat .vign.vide { aspect-ratio: 16 / 6 }
  .vign.vide svg { width: 30px; height: 30px }
  .rub .txt,
  .plat .txt { padding: 15px 17px 17px }
  .rub .nom,
  .plat .nom { font-size: 20px; line-height: 1.2 }
  .rub .sous { font-size: 14.5px; white-space: normal; margin-top: 4px }
  .plat .des {
    font-size: 14.5px; margin-top: 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .rub .des,
  .plat .prix { font-size: 16.5px; margin-top: 10px }
  .rub .chev { display: none }

  /* Fiche, panier, suggestions, prénom : une colonne centrée, jamais étirée. */
  #e-fiche.on,
  #e-panier.on,
  #e-suggestions.on,
  #e-prenom.on,
  #e-fin.on { max-width: 720px; margin: 0 auto }
  .photo,
  .photo-vide { aspect-ratio: var(--ratio-photo); border-radius: 18px; margin-top: 18px }
  .fiche { padding: 22px 22px 8px }
  .fiche h1 { font-size: 33px }
  .fiche .des { font-size: 16.5px }
  .fiche .base { font-size: 20px }
  .groupe { padding: 6px 22px 0 }
  .groupe h2 { font-size: 13.5px; margin-top: 26px }
  .groupe .regle { font-size: 13px }
  .opt { padding: 17px 4px }
  .opt .nom { font-size: 17.5px }
  .opt .sup { font-size: 16px }
  .coche { width: 26px; height: 26px }
  .coche svg { width: 13px; height: 13px }
  .champ { font-size: 18px; padding: 16px 18px }
  .qte button { width: 58px; height: 58px }
  .qte .n { font-size: 26px }

  .lignes { padding: 8px 22px }
  .ligne .nom { font-size: 17.5px }
  .ligne .opt-l,
  .ligne .retirer { font-size: 14px }
  .ligne .p { font-size: 16.5px }
  .pastille-plus { min-height: 48px; font-size: 15px; padding: 0 18px 0 8px }
  .pastille-plus:not(:has(.pastille-img)) { padding-left: 18px }
  .pastille-img { width: 34px; height: 34px }
  .tl.grand { font-size: 24px }
  .avis p { font-size: 14.5px }

  /* Suggestions : tout tient à l'écran, sans rangée qui défile sur le côté. */
  .offres,
  .offres.grille {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px; padding: 4px 20px 14px; overflow: visible;
  }
  .offre { flex: initial }
  .offre-corps { min-height: 124px; padding: 14px 15px 13px }
  .offre .nom { font-size: 16.5px }
  .offre .prix { font-size: 16px }
  .proposition h2 { font-size: 22px; margin: 0 20px 12px }

  /* Prénom : le clavier dessiné occupe la largeur de la tablette, à hauteur
     de main, et non collé sous le titre avec du vide en dessous. */
  .corps { display: flex; flex-direction: column }
  #e-prenom.on { display: flex; flex-direction: column; justify-content: center; flex: 1 }
  .affichage-prenom { min-height: 88px; font-size: 36px; margin: 26px 22px 0 }
  .curseur { height: 38px }
  .clavier { gap: 11px; margin: 26px 16px 0 }
  .rangee { gap: 9px }
  .touche { max-width: 74px; height: 74px; font-size: 27px; border-radius: 13px }
  .touche.espace,
  .touche.effacer { max-width: none }
  .touche.espace { font-size: 18px }
  .touche.effacer svg { width: 32px; height: 32px }

  .confirm h1 { font-size: 30px }
  .numero .n { font-size: 96px }
  .etape p { font-size: 16px }

  /* Actions : un bouton qu'on touche sans viser. */
  .socle { padding: 16px 22px calc(20px + env(safe-area-inset-bottom)) }
  .cta { min-height: 70px; font-size: 20px; border-radius: max(var(--bouton-rayon), 16px) }
  .cta.creux { min-height: 58px; font-size: 17px }
  .indice { font-size: 15px; padding: 8px 16px }
  .toast { font-size: 16px; padding: 13px 20px; top: 104px }

  /* Veille : la photo occupe l'écran. */
  .veille { gap: 20px }
  .veille-logo { height: 62px }
  .veille-photos { width: min(100%, 520px) }
  .veille-photo figcaption { font-size: 17px; padding: 9px 16px }
  .veille h1 { font-size: 50px }
  .veille p { font-size: 19px; max-width: 36ch }
  .veille-cta { min-height: 76px; font-size: 22px; padding: 0 40px }
}

/* Tablette posée en paysage, ou grand écran : une colonne de plus. */
@media (min-width: 1100px) and (min-height: 560px) {
  .rubriques,
  .plats { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 24px 28px 10px }
  .offres,
  .offres.grille { grid-template-columns: repeat(4, minmax(0, 1fr)) }
  #e-fiche.on,
  #e-panier.on,
  #e-suggestions.on,
  #e-prenom.on,
  #e-fin.on { max-width: 860px }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important }
}

/* La balise qui choisit entre vignette et photo (gabarits.js) ne compte pas
   dans la mise en page : l'image reste l'enfant direct de sa ligne. */
picture { display: contents; }
