/*
 * 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 {
  --encre: #10163A;
  --encre-2: #464E77;
  --encre-3: #7C83A6;
  --papier: #FCFCFD;
  --voile: #EAECF2;
  --voile-2: #F4F5F9;
  --braise: #D9451F;
  --braise-fonce: #B93714;
  --basilic: #1B6B4C;
  --display: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --corps: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box }
html, body { margin: 0; height: 100% }
body {
  background: var(--voile);
  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;
  background: var(--papier);
  overflow: hidden;
}
@media (min-width: 600px) {
  .app { box-shadow: 0 0 0 1px rgba(16, 22, 58, .06), 0 30px 80px -30px rgba(16, 22, 58, .35) }
}

/* ---------- Barre haute ---------- */
.top {
  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;
}
.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(--voile-2) }
.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: 12px; background: var(--encre); color: #fff;
  font-family: var(--display); font-weight: 600; font-size: 15.5px;
}

/* ---------- Accueil ---------- */
.accroche { padding: 22px 18px 6px }
.accroche h1 {
  font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.12;
  margin: 0 0 6px; letter-spacing: -.02em; 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(27, 107, 76, .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(217, 69, 31, .09); color: var(--braise-fonce) }

.rappel {
  margin: 16px 12px 0; padding: 14px 16px; border-radius: 14px; width: calc(100% - 24px);
  background: var(--encre); 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: #C9CEE6; margin-top: 2px }
.rappel .chev { color: #fff }

/* ---------- Listes de rubriques ---------- */
.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) }
.vign {
  flex: 0 0 auto; width: 62px; height: 62px; 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: nowrap;
}
.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: 700; font-size: 24px; margin: 0; letter-spacing: -.02em }
.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 }
.plat .prix { display: block; margin-top: 7px; font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums }
.plat .vign { width: 80px; height: 80px }

/* ---------- Fiche plat ---------- */
.photo { width: 100%; aspect-ratio: 4 / 3; 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 { 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 { margin: 12px 0 0; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums }
.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) }
.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(--encre); border-color: var(--encre) }
.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 { outline: none; 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(--voile-2);
  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(--voile-2); 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(--encre);
  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); 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;
  border-radius: 999px; border: 1.5px solid var(--voile); font-size: 13.5px; font-weight: 600;
}
.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 }

.totaux { margin: 14px 18px 0; padding: 16px 0 4px; border-top: 1px solid var(--voile) }
.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(--voile-2); box-shadow: inset 0 -2px 0 rgba(16, 22, 58, .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(27, 107, 76, .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: 700; font-size: 23px; margin: 0 0 8px; letter-spacing: -.02em }
.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(--encre); color: #fff }
.numero .lab {
  font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: #9AA2CC; 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: #C9CEE6; 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(--papier) 62%, rgba(252, 252, 253, 0));
  display: none;
}
.socle.on { display: block }
.cta {
  width: 100%; min-height: 54px; border-radius: 14px; background: var(--braise); color: #fff;
  font-family: var(--display); font-weight: 600; font-size: 16.5px; letter-spacing: -.01em;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  box-shadow: 0 6px 18px -6px rgba(217, 69, 31, .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(--encre); box-shadow: 0 6px 18px -6px rgba(16, 22, 58, .55) }
.cta.sombre:hover { background: #1B2352 }
.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: 15px; background: var(--encre); color: #fff;
  display: flex; align-items: center; gap: 12px; padding: 0 8px 0 16px; text-align: left;
  box-shadow: 0 12px 30px -8px rgba(16, 22, 58, .55);
}
.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: 600; 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(--encre); color: #fff; padding: 11px 17px; border-radius: 11px;
  font-size: 13.8px; font-weight: 600; box-shadow: 0 12px 30px -8px rgba(16, 22, 58, .6);
  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) }

.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 }

/*
 * Écran du restaurant : une tablette de 10 pouces, en libre-service. Toute
 * l'interface est agrandie d'un bloc, touches du clavier comprises ; la
 * hauteur est ramenée d'autant pour que le bas de l'écran reste en place.
 */
@media (min-width: 700px) {
  .ecran-partage .app { zoom: 1.3; height: calc(100dvh / 1.3) }
}
@media (min-width: 1000px) {
  .ecran-partage .app { zoom: 1.45; height: calc(100dvh / 1.45) }
}

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