/* =====================================================================
   GUSTO KREYOL — styles de la version B (« nouvelle direction »)
   Règles : CLAUDE_DESIGN.md. Toutes les valeurs viennent de tokens.css.
   Mobile d'abord (375 px), puis 640 · 768 · 1024 px.
   Idée directrice : le ticket de retrait. C'est le seul élément qui
   tranche ; le reste est neutre, aligné et calme.
   ===================================================================== */

/* =========================== Base =========================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--space-24); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  background: var(--bg);
  color: var(--text);
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: var(--fw-display); margin: 0; color: var(--text); }
h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); letter-spacing: var(--tr-h1); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
p { margin: 0 0 var(--space-4); }
a { color: var(--primary); text-underline-offset: var(--underline-offset); text-decoration-thickness: var(--bw); }
a:hover { text-decoration-thickness: var(--bw-strong); }
img, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
strong, b { font-weight: var(--fw-bold); }
.num, .price, .tot, time { font-variant-numeric: tabular-nums; }

:focus-visible { outline: var(--bw-strong) solid var(--focus); outline-offset: var(--bw-strong); }
.on-dark :focus-visible, .kitchen :focus-visible { outline-color: var(--focus-on-dark); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--space-3); top: calc(-1 * var(--space-24)); z-index: 100;
  background: var(--primary); color: var(--on-primary); font-weight: var(--fw-bold);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); text-decoration: none;
}
.skip:focus { top: var(--space-3); }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: calc(640px + 2 * var(--gutter)); }
.wrap-full { max-width: none; }
@media (min-width: 640px) { :root { --gutter: var(--space-6); } }

/* Utilitaires d'espacement (remplacent les styles en ligne) */
.after { margin-top: var(--space-4); margin-bottom: 0; }
.center { text-align: center; }

/* =========================== Boutons ===========================
   Primaire plein · secondaire contour · tertiaire texte.
   États : survol, focus, appui, désactivé, chargement. */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--control); padding: var(--space-3) var(--space-6);
  border: var(--bw-strong) solid var(--primary); border-radius: var(--radius-md);
  background: var(--primary); color: var(--on-primary);
  font-weight: var(--fw-bold); font-size: var(--fs-body); line-height: var(--lh-ui);
  text-decoration: none; text-align: center;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn:active { transform: translateY(1px); }
.btn-dark { /* alias historique du bouton principal */ }
.btn-ghost { background: var(--surface); color: var(--primary); border-color: var(--primary); }
.btn-ghost:hover { background: var(--brand-50); border-color: var(--primary); }
.btn-block { width: 100%; }
.btn-sm { min-height: var(--tap); padding: var(--space-2) var(--space-4); font-size: var(--fs-sm); }
.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--surface-sunken); color: var(--gray-700); border-color: var(--surface-sunken);
  cursor: not-allowed; transform: none;
}
/* Chargement : le libellé reste lu par les lecteurs d'écran (aria-busy) */
.btn.is-loading { color: transparent; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 1.25em; height: 1.25em; border-radius: var(--radius-full);
  border: var(--bw-strong) solid var(--on-primary); border-right-color: transparent;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }

.link-btn {
  background: none; border: 0; padding: var(--space-2) var(--space-1); min-height: var(--tap);
  font-weight: var(--fw-bold); color: var(--primary); text-decoration: underline; text-underline-offset: var(--underline-offset);
}
.link-btn:hover { text-decoration-thickness: var(--bw-strong); }

/* =========================== En-tête ===========================
   Conventions respectées : marque à gauche (lien vers l'accueil),
   panier à droite, toujours visible. */
.site-head {
  position: sticky; top: 0; z-index: 30;
  background: var(--surface); border-bottom: var(--bw) solid var(--border);
}
.site-head .wrap { display: flex; align-items: center; gap: var(--space-3); min-height: var(--space-16); }
.brand {
  font-family: var(--font-display); font-weight: var(--fw-display); font-size: var(--fs-h3); line-height: 1;
  color: var(--text); text-decoration: none; margin-right: auto; padding: var(--space-2) 0;
}
.site-nav { display: none; gap: var(--space-1); }
@media (min-width: 768px) { .site-nav { display: flex; } }
.site-nav a {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md); color: var(--gray-700); font-weight: var(--fw-semibold); text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.site-nav a:hover { background: var(--brand-50); color: var(--primary); }
.cart-btn {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--tap);
  padding: var(--space-2) var(--space-4); border: var(--bw-strong) solid var(--primary); border-radius: var(--radius-md);
  background: var(--surface); color: var(--primary); font-weight: var(--fw-bold); text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-out);
}
.cart-btn:hover { background: var(--brand-50); }
.cart-btn .count {
  min-width: var(--space-6); padding: 0 var(--space-2); border-radius: var(--radius-full);
  background: var(--brand-500); color: var(--text); text-align: center; font-size: var(--fs-sm);
}

.page-head { background: var(--surface); border-bottom: var(--bw) solid var(--border); }
.page-head .wrap { display: flex; align-items: center; gap: var(--space-2); min-height: var(--space-16); }
.page-head .cart-btn { margin-left: auto; }
.back {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--tap);
  padding: var(--space-2) var(--space-3) var(--space-2) 0; font-weight: var(--fw-bold); color: var(--primary); text-decoration: none;
}
.back:hover { text-decoration: underline; }
.page-head .step { margin-left: auto; color: var(--text-muted); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }

/* =========================== Accueil : accroche =========================== */
.hero { padding: var(--space-8) 0 var(--space-12); }
.hero .wrap { display: grid; gap: var(--space-8); align-items: center; }
@media (min-width: 1024px) {
  .hero { padding: var(--space-24) 0; }
  .hero .wrap { grid-template-columns: 1.3fr 1fr; gap: var(--space-16); }
}
.hero h1 { max-width: 14ch; }  /* taille h1 : l'heure du ticket est le seul point focal */
.hero .lead { font-size: var(--fs-lg); color: var(--gray-700); max-width: var(--measure); margin: var(--space-4) 0 0; }

/* ---------- Le ticket de retrait : élément signature ----------
   Souche de ticket : encoches rondes de chaque côté d'une ligne pointillée.
   Le seul élément de la page qui porte une ombre marquée. */
.stub {
  --behind: var(--bg);  /* couleur derrière le ticket, pour les encoches */
  position: relative; background: var(--surface); color: var(--text);
  border-radius: var(--radius-lg); padding: var(--space-6);
  box-shadow: var(--shadow-lg);
}
.stub-k { font-weight: var(--fw-semibold); color: var(--text-muted); margin: 0; }
.stub-time {
  font-family: var(--font-display); font-weight: var(--fw-display);
  font-size: var(--fs-focal); line-height: 1; letter-spacing: var(--tr-display);
  color: var(--primary); margin: var(--space-1) 0 var(--space-2);
}
.stub-meta { margin: 0; color: var(--text-muted); }
.stub-hours { margin: 0 0 var(--space-4); color: var(--gray-700); font-size: var(--fs-sm); }
.stub-cut {
  position: relative; height: 0; margin: var(--space-6) calc(-1 * var(--space-6));
  border-top: var(--bw-strong) dashed var(--border);
}
.stub-cut::before, .stub-cut::after {
  content: ""; position: absolute; top: calc(-1 * var(--space-3) - var(--bw));
  width: var(--space-6); height: var(--space-6); border-radius: var(--radius-full);
  background: var(--behind);
}
.stub-cut::before { left: calc(-1 * var(--space-3)); }
.stub-cut::after { right: calc(-1 * var(--space-3)); }
.stub-off .stub-time { color: var(--danger); }

/* ---------- Offre de la semaine : une ligne, l'or en simple repère ---------- */
.promo-strip { background: var(--surface); border-block: var(--bw) solid var(--border); padding: var(--space-4) 0; }
.promo-strip .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-6); }
.promo-txt { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-3); }
.promo-tag {
  display: inline-block; padding: 0 var(--space-2); border-radius: var(--radius-sm);
  background: var(--gold-500); color: var(--text); font-size: var(--fs-sm); font-weight: var(--fw-bold);
}
.promo-txt s { color: var(--text-muted); }

/* =========================== Sections =========================== */
section.block { padding: var(--space-12) 0; }
@media (min-width: 1024px) { section.block { padding: var(--space-24) 0; } }
section.block > .wrap > h2 { margin-bottom: var(--space-2); }
.sub { color: var(--text-muted); font-size: var(--fs-lg); max-width: var(--measure); margin: 0 0 var(--space-8); }
.sub-tight { margin-bottom: var(--space-4); font-size: var(--fs-body); }
.tinted { background: var(--surface-sunken); }

/* ---------- Nos Box : tableau de menu ---------- */
.board {
  list-style: none; margin: 0; padding: 0;
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden;
}
@media (min-width: 1024px) { .board { display: grid; grid-template-columns: 1fr 1fr; } }
.box-row {
  position: relative; display: grid; grid-template-columns: var(--space-16) 1fr; gap: var(--space-4);
  padding: var(--space-4) var(--space-4) var(--space-6) calc(var(--box-bar) + var(--space-4));
  border-bottom: var(--bw) solid var(--border);
}
.box-row::before {  /* la couleur de la Box, sur toute la hauteur */
  content: ""; position: absolute; inset: 0 auto 0 0; width: var(--box-bar); background: var(--box-color);
}
.box-row:last-child { border-bottom: 0; }
@media (min-width: 640px) {
  .box-row { grid-template-columns: var(--space-24) 1fr; gap: var(--space-6); padding: var(--space-6) var(--space-6) var(--space-6) calc(var(--box-bar) + var(--space-6)); }
}
@media (min-width: 1024px) {
  .box-row:nth-child(odd) { border-right: var(--bw) solid var(--border); }
  .box-row:nth-last-child(2):nth-child(odd) { border-bottom: var(--bw) solid var(--border); }
  .box-row:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
}
.box-main { min-width: 0; }
.box-main h3 {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-2);
  font-size: var(--fs-h2); line-height: var(--lh-h2);
}
.box-main .dots { display: none; }
@media (min-width: 640px) {
  .box-main h3 { flex-wrap: nowrap; }
  .box-main .nm { flex: none; }
  .box-main .dots { display: block; flex: 1; min-width: var(--space-3); border-bottom: var(--bw-strong) dotted var(--border-strong); transform: translateY(calc(-1 * var(--space-2))); }
  .box-main .price { flex: none; }
}
.box-main .price { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: var(--fw-display); color: var(--primary); }
.box-main p { margin: var(--space-2) 0 var(--space-4); color: var(--text-muted); }
.box-main p strong { color: var(--text); font-weight: var(--fw-semibold); }
[data-box="1"] { --box-color: var(--box-1); }
[data-box="2"] { --box-color: var(--box-2); }
[data-box="3"] { --box-color: var(--box-3); }
[data-box="4"] { --box-color: var(--box-4); }
[data-box="5"] { --box-color: var(--box-5); }
.price { font-weight: var(--fw-bold); font-size: var(--fs-lg); }

/* Emplacement photo : pas de fausse photo, le nom sur fond neutre */
.photo-slot {
  display: grid; place-items: center; text-align: center; aspect-ratio: 1;
  background: var(--surface-sunken); border: var(--bw-strong) dashed var(--border-strong); border-radius: var(--radius-md);
  color: var(--text-muted); font-size: var(--fs-sm); font-weight: var(--fw-semibold); line-height: var(--lh-ui); padding: var(--space-1);
}
.photo-slot.wide { aspect-ratio: 16 / 9; border-radius: var(--radius-lg); }
.photo-inline { aspect-ratio: auto; min-height: var(--control); }

/* ---------- À la carte : onglets + lignes ---------- */
.tabs { display: flex; gap: var(--space-2); overflow-x: auto; padding: var(--space-1) var(--space-1) var(--space-2); margin: 0 calc(-1 * var(--space-1)) var(--space-4); scrollbar-width: thin; }
.tab {
  flex: none; min-height: var(--tap); padding: var(--space-2) var(--space-4);
  border: var(--bw) solid var(--border-strong); border-radius: var(--radius-full);
  background: var(--surface); color: var(--gray-700); font-weight: var(--fw-semibold); white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.tab:hover { background: var(--brand-50); color: var(--primary); }
.tab[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.tabpanel { max-width: calc(var(--measure) + var(--space-24)); }
.tabpanel[hidden] { display: none; }
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-3);
  padding: var(--space-3) 0; border-bottom: var(--bw) solid var(--border);
}
.row .name { font-weight: var(--fw-semibold); }
.row .meta { display: block; color: var(--text-muted); font-size: var(--fs-sm); font-weight: var(--fw-regular); }
.row .right { display: flex; align-items: center; gap: var(--space-3); flex: none; }
.plus {
  width: var(--tap); height: var(--tap); border-radius: var(--radius-full); border: 0;
  background: var(--brand-600); color: var(--on-primary); font-size: var(--fs-h3); font-weight: var(--fw-bold); line-height: 1;
  transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.plus:hover { background: var(--primary); }
.plus:active { transform: scale(.94); }
.plus[disabled] { background: var(--surface-sunken); color: var(--gray-700); cursor: not-allowed; transform: none; }
.out { color: var(--danger); font-weight: var(--fw-bold); font-size: var(--fs-sm); }
.is-out .name { color: var(--text-muted); }
.legal { font-size: var(--fs-sm); color: var(--text-muted); margin: var(--space-4) 0 0; max-width: var(--measure); }

/* ---------- Passeport Kréyol ---------- */
.loy { display: grid; gap: var(--space-4); }
@media (min-width: 768px) { .loy { grid-template-columns: 1fr 1fr; gap: var(--space-6); } }
.loy-single { grid-template-columns: 1fr !important; }
.pts { padding: 0; }
.pts .label { font-weight: var(--fw-semibold); color: var(--text-muted); margin: 0; }
.pts .big {  /* solde : taille de titre de section, pas un « grand chiffre » */
  display: block; font-family: var(--font-display); font-weight: var(--fw-display);
  font-size: var(--fs-h2); line-height: var(--lh-h2); color: var(--text); margin: 0 0 var(--space-3);
}
.bar { height: var(--space-2); border-radius: var(--radius-full); background: var(--border); margin: 0 0 var(--space-3); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--gold-500); border-radius: var(--radius-full); }
.pts .next { margin: 0; font-weight: var(--fw-semibold); max-width: var(--measure); }
.tiers { list-style: none; margin: 0; padding: 0; border-bottom: var(--bw) solid var(--border); }
.tier {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) 0; border-top: var(--bw) solid var(--border);
}
.tier .need { flex: none; min-width: 4.5em; font-weight: var(--fw-bold); padding: 0 var(--space-2); border-radius: var(--radius-sm); text-align: center; }
.tier .state { margin-left: auto; white-space: nowrap; text-align: right; font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--text-muted); }
/* Seul le palier débloqué reçoit l'or */
.tier.ok .need { background: var(--gold-500); color: var(--text); }
.tier.ok .state { color: var(--text); }
.tiers-title { font-size: var(--fs-h3); margin-bottom: var(--space-3); }
.tiers + .live-note { margin-top: var(--space-3); }

/* =========================== Pied de page =========================== */
.site-foot { background: var(--inverse-bg); color: var(--inverse-text); padding: var(--space-12) 0 var(--space-32); font-size: var(--fs-sm); }
@media (min-width: 768px) { .site-foot { padding-bottom: var(--space-12); } }
.site-foot .wrap { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-foot h2 { font-family: var(--font-body); font-size: var(--fs-body); font-weight: var(--fw-bold); line-height: var(--lh-ui); color: var(--inverse-text); margin: 0 0 var(--space-2); }
.site-foot p { margin: 0; color: var(--gray-300-on-dark); }
.site-foot a { color: var(--inverse-text); }
.site-foot .fine { grid-column: 1 / -1; border-top: var(--bw) solid var(--gray-700); padding-top: var(--space-4); }
.legal-links { list-style: none; margin: 0; padding-left: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); }

/* =========================== Barres d'action =========================== */
/* Panier fixe en bas sur mobile : à portée de pouce */
.cartbar {
  position: fixed; inset: auto 0 0 0; z-index: 25;
  padding: var(--space-3) var(--gutter) calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  background: var(--surface); box-shadow: var(--shadow-up);
}
.cartbar .btn { width: 100%; justify-content: space-between; }
@media (min-width: 768px) { .cartbar { display: none; } }

/* Un seul bouton principal en bas des pages du parcours */
.actionbar {
  position: sticky; bottom: 0; z-index: 20; background: var(--surface); box-shadow: var(--shadow-up);
  padding: var(--space-3) 0 calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
}
.actionbar .wrap { display: grid; gap: var(--space-2); max-width: calc(640px + 2 * var(--gutter)); }
.actionbar .tot, .actionbar-tot { display: flex; justify-content: space-between; font-weight: var(--fw-bold); font-size: var(--fs-lg); }
.actionbar .live-note { margin: 0; }
.actionbar-span { grid-column: 1 / -1; margin: 0 calc(-1 * var(--gutter)); }

/* =========================== Tiroir et fenêtres =========================== */
dialog { border: 0; padding: 0; color: var(--text); background: var(--bg); }
dialog::backdrop { background: var(--scrim); }
.drawer {
  margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(440px, 100%);
  display: none; flex-direction: column; box-shadow: var(--shadow-lg);
}
.drawer[open], .modal[open] { display: flex; }
.modal { width: min(480px, calc(100% - 2 * var(--space-4))); border-radius: var(--radius-lg); flex-direction: column; max-height: 90dvh; box-shadow: var(--shadow-lg); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-6); background: var(--surface); border-bottom: var(--bw) solid var(--border); }
.dlg-head h2 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
.dlg-body { padding: var(--space-2) var(--space-6) var(--space-4); overflow-y: auto; flex: 1; }
.dlg-foot { padding: var(--space-4) var(--space-6) calc(var(--space-4) + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: var(--bw) solid var(--border); display: grid; gap: var(--space-2); }
.close {
  min-height: var(--tap); padding: var(--space-2) var(--space-4); border: 0; border-radius: var(--radius-md);
  background: var(--surface-sunken); font-weight: var(--fw-bold);
  transition: background-color var(--dur-fast) var(--ease-out);
}
.close:hover { background: var(--border); }

/* =========================== Panier =========================== */
.page-pad { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.cart-item { padding: var(--space-4) 0; border-bottom: var(--bw) solid var(--border); }
.cart-item .top { display: flex; justify-content: space-between; gap: var(--space-3); font-weight: var(--fw-bold); }
.cart-item .tag { display: inline-block; width: var(--space-3); height: var(--space-3); border-radius: var(--radius-sm); background: var(--box-color); margin-right: var(--space-2); }
.cart-item .det { color: var(--text-muted); font-size: var(--fs-sm); margin: var(--space-1) 0 var(--space-2); }
.cart-item .controls { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.qty { display: inline-flex; align-items: center; gap: var(--space-2); }
.qty button {
  width: var(--tap); height: var(--tap); border-radius: var(--radius-full); border: var(--bw-strong) solid var(--border-strong);
  background: var(--surface); font-weight: var(--fw-bold); font-size: var(--fs-lg); line-height: 1;
  transition: background-color var(--dur-fast) var(--ease-out);
}
.qty button:hover { background: var(--brand-50); }
.qty output { min-width: 2ch; text-align: center; font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.qty-label { font-weight: var(--fw-bold); margin: 0 0 var(--space-2); }
.sum { list-style: none; padding: 0; margin: 0; }
.sum li { display: flex; justify-content: space-between; padding: var(--space-1) 0; color: var(--text-muted); }
.sum li.total { color: var(--text); font-weight: var(--fw-bold); font-size: var(--fs-lg); border-top: var(--bw) solid var(--border); margin-top: var(--space-2); padding-top: var(--space-3); }
.empty { margin-top: var(--space-6); }
.add-more { margin: var(--space-4) 0 0; font-weight: var(--fw-semibold); }
.add-more + .live-note { margin-top: var(--space-3); }

/* =========================== Compositeur de Box =========================== */
.composer { display: grid; gap: var(--space-6); padding: var(--space-6) 0 var(--space-8); }
@media (min-width: 1024px) {
  .composer { grid-template-columns: 1.3fr 1fr; align-items: start; gap: var(--space-12); }
  .recap { position: sticky; top: var(--space-24); }
}
.box-intro { display: grid; gap: var(--space-4); }
.box-intro .title { border-left: var(--box-bar) solid var(--box-color); padding-left: var(--space-4); }
.box-intro h1 { font-size: var(--fs-h1); }
.box-intro .base { color: var(--text-muted); margin: var(--space-1) 0 0; }
.box-intro > .hint { margin: 0; }
fieldset.step { border: 0; margin: 0; padding: 0 0 var(--space-6); border-bottom: var(--bw) solid var(--border); }
fieldset.step legend {
  font-family: var(--font-display); font-weight: var(--fw-display); font-size: var(--fs-h3); line-height: var(--lh-h3);
  padding: 0; margin-bottom: var(--space-1);
}
.step-plain { border-bottom: 0 !important; padding-bottom: 0 !important; }
.hint { color: var(--text-muted); font-size: var(--fs-sm); margin: 0 0 var(--space-3); }
.pills { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill > span {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--tap);
  padding: var(--space-2) var(--space-4); border: var(--bw-strong) solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--surface); font-weight: var(--fw-semibold); cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.pill:hover > input:not(:disabled):not(:checked) + span { background: var(--brand-50); }
.pill > input:checked + span { border-color: var(--brand-600); background: var(--brand-50); box-shadow: inset 0 0 0 var(--bw) var(--brand-600); }
.pill input:checked + span::before { content: "✓"; font-weight: var(--fw-bold); color: var(--brand-600); }
.pill input:focus-visible + span { outline: var(--bw-strong) solid var(--focus); outline-offset: var(--bw-strong); }
.pill input:disabled + span { color: var(--text-muted); background: var(--surface-sunken); border-style: dashed; cursor: not-allowed; }
.pill .sup { color: var(--text-muted); font-weight: var(--fw-bold); }

details.allergens { margin-top: var(--space-3); }
details.allergens summary {
  display: inline-flex; align-items: center; min-height: var(--tap); cursor: pointer;
  font-weight: var(--fw-bold); color: var(--primary); text-decoration: underline; text-underline-offset: var(--underline-offset);
}
details.allergens .panel { background: var(--surface-sunken); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); font-size: var(--fs-sm); }
details.allergens .panel p { margin: 0 0 var(--space-2); }
.todo { color: var(--danger); font-weight: var(--fw-bold); }

.recap {
  background: var(--surface); border-top: var(--box-bar) solid var(--box-color); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: var(--space-6);
}
.recap-plain { border-top: 0; }
.recap h2 { font-size: var(--fs-h3); line-height: var(--lh-h3); margin-bottom: var(--space-3); }
.recap dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-4); }
.recap dt { color: var(--text-muted); }
.recap dd { margin: 0; font-weight: var(--fw-semibold); text-align: right; }
.recap .line { display: flex; justify-content: space-between; margin: var(--space-3) 0 0; padding-top: var(--space-3); border-top: var(--bw) solid var(--border); font-weight: var(--fw-bold); }

/* =========================== Retrait et paiement =========================== */
.form { display: grid; gap: var(--space-8); padding: var(--space-6) var(--gutter) var(--space-8); max-width: calc(640px + 2 * var(--gutter)); }
.form h2 { font-size: var(--fs-h3); line-height: var(--lh-h3); margin-bottom: var(--space-1); }
.form section > * + * { margin-top: var(--space-4); }
.form section > h2 + .live-note { margin-top: 0; }
.field { display: grid; gap: var(--space-2); }
.field label, .field-label { font-weight: var(--fw-bold); }
.field .opt, .check .opt { color: var(--text-muted); font-weight: var(--fw-regular); }
.field input, .field select, .field textarea {
  min-height: var(--control); padding: var(--space-2) var(--space-4); border: var(--bw-strong) solid var(--border-strong);
  border-radius: var(--radius-md); background: var(--surface); font-size: var(--fs-body);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.field input:hover, .field select:hover { border-color: var(--gray-700); }
.field input:focus-visible, .field select:focus-visible { border-color: var(--primary); outline-offset: var(--bw); }
.field .help { color: var(--text-muted); font-size: var(--fs-sm); margin: 0; }
.field .error { color: var(--danger); font-weight: var(--fw-bold); font-size: var(--fs-sm); margin: 0; }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.grid-2 { display: grid; gap: var(--space-4); }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: var(--space-3); align-items: flex-start; min-height: var(--tap); padding: var(--space-2) 0; }
.check input { width: var(--space-6); height: var(--space-6); margin: 0; flex: none; accent-color: var(--brand-600); }
/* Seule l’heure est barrée ; « Complet » reste lisible (le texte barré d’un
   conteneur flex se propage à tous ses enfants, d’où le span dédié). */
.slot-full .slot-time { text-decoration: line-through; text-decoration-thickness: var(--bw-strong); }
.pay-list { display: grid; gap: var(--space-2); margin-top: var(--space-3); }
.pay-opt > span { width: 100%; justify-content: flex-start; }
.secure { color: var(--text-muted); font-size: var(--fs-sm); margin: var(--space-3) 0 0; }

/* =========================== Confirmation et suivi =========================== */
.done { padding: var(--space-8) 0 var(--space-12); display: grid; gap: var(--space-6); max-width: 560px; }
.done .done-title { font-size: var(--fs-h1); }  /* le numéro de commande est le point focal */
.done .ticket { --behind: var(--bg); }
.done .order-num {
  font-family: var(--font-display); font-weight: var(--fw-display);
  font-size: calc(var(--fs-focal) * 1.2); line-height: 1; letter-spacing: var(--tr-display);
  color: var(--primary); margin: 0;
}
.done .when { font-size: var(--fs-lg); font-weight: var(--fw-bold); margin: 0 0 var(--space-1); }
.track-title { font-size: var(--fs-h3); line-height: var(--lh-h3); margin-bottom: var(--space-2); }
.track { list-style: none; margin: 0; padding: 0; display: grid; }
.track li { display: grid; grid-template-columns: var(--space-8) 1fr; gap: var(--space-3); align-items: start; padding: var(--space-2) 0; position: relative; }
.track li::before {
  content: ""; width: var(--space-6); height: var(--space-6); margin: 0 var(--space-1); border-radius: var(--radius-full);
  border: var(--bw-strong) solid var(--border-strong); background: var(--surface);
}
.track li:not(:last-child)::after {
  content: ""; position: absolute; left: calc(var(--space-4) - var(--bw)); top: calc(var(--space-8) + var(--space-1)); bottom: calc(-1 * var(--space-2));
  width: var(--bw-strong); background: var(--border);
}
.track li.done-step::before { background: var(--brand-600); border-color: var(--brand-600); }
.track li.done-step::after { background: var(--brand-600); }
.track li.current::before { border-color: var(--brand-600); background: var(--gold-500); }
.track .st { font-weight: var(--fw-bold); }
.track .st small { display: block; color: var(--text-muted); font-weight: var(--fw-regular); font-size: var(--fs-sm); }
.track li.current .st { color: var(--primary); }
.ready-banner {
  display: none; background: var(--success); color: var(--on-primary); border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-6); font-weight: var(--fw-bold); font-size: var(--fs-lg);
}
.is-ready .ready-banner { display: block; animation: pop var(--dur-layout) var(--ease-out); }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.earned {
  background: var(--gold-100); border-left: var(--box-bar) solid var(--gold-500); border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-6);
}
.earned p { margin: 0; }
.earned strong { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: var(--fw-display); line-height: var(--lh-h2); }
.earned .earned-link { margin-top: var(--space-2); }
.live-note { color: var(--text-muted); font-size: var(--fs-sm); margin: 0; }
.map-link { margin: 0; }

/* =========================== Fermeture momentanée =========================== */
.closed-banner { background: var(--danger); color: var(--on-primary); padding: var(--space-4) 0; }
.closed-banner h2 { font-family: var(--font-body); font-size: var(--fs-lg); font-weight: var(--fw-bold); line-height: var(--lh-ui); color: inherit; margin: 0 0 var(--space-1); }
.closed-banner p { margin: 0; max-width: var(--measure); }
.closed-banner .reopen { margin-top: var(--space-2); font-weight: var(--fw-bold); }

/* =========================== Page Passeport =========================== */
.how { border-top: var(--bw) solid var(--border); padding-top: var(--space-6); }
.how h2 { font-size: var(--fs-h3); line-height: var(--lh-h3); margin-bottom: var(--space-3); }
.how ol { margin: 0; padding-left: var(--space-6); display: grid; gap: var(--space-2); max-width: var(--measure); }

/* =========================== Mouvement =========================== */
/* Un seul moment orchestré : le ticket se pose, comme tendu au comptoir.
   Sans animation (ou avec « réduire les animations »), il est simplement là. */
.stub { animation: stub-in var(--dur-layout) var(--ease-out) 120ms both; }
@keyframes stub-in {
  from { opacity: 0; transform: translateY(var(--space-6)) rotate(-2deg); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .btn.is-loading::after { border-right-color: var(--on-primary); opacity: .6; }
}

/* =========================== Message annoncé =========================== */
.toast {
  position: fixed; left: 50%; bottom: var(--space-24); transform: translateX(-50%); z-index: 60;
  background: var(--inverse-bg); color: var(--inverse-text); padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full); font-weight: var(--fw-bold); box-shadow: var(--shadow-lg);
  max-width: calc(100% - 2 * var(--space-4)); text-align: center;
}
.toast:empty { display: none; }

/* =========================== Bandeau de démonstration =========================== */
.demo-bar { border-top: var(--bw-strong) dashed var(--border-strong); background: var(--surface-sunken); padding: var(--space-3) 0; font-size: var(--fs-sm); }
.demo-bar .wrap { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.demo-bar strong { margin-right: var(--space-1); }
.demo-bar button {
  min-height: var(--tap); padding: var(--space-2) var(--space-4); border: var(--bw-strong) solid var(--border-strong);
  border-radius: var(--radius-full); background: var(--surface); font-weight: var(--fw-bold);
}
.demo-bar button:hover { background: var(--brand-50); }
.demo-bar button[disabled] { opacity: .6; cursor: not-allowed; }

/* =====================================================================
   ESPACE PRO (tablette en paysage)
   ===================================================================== */
.pro-head { background: var(--inverse-bg); color: var(--inverse-text); }
.pro-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); min-height: var(--space-16); max-width: none; }
.pro-head h1 { font-size: var(--fs-h3); line-height: var(--lh-h3); color: inherit; margin-right: auto; }
.who-acct { font-weight: var(--fw-semibold); }
.conn { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: var(--fw-bold); }
.conn::before { content: ""; width: var(--space-3); height: var(--space-3); border-radius: var(--radius-full); background: var(--brand-500); }
.conn small { font-weight: var(--fw-regular); color: var(--gray-300-on-dark); }
.conn.lost { background: var(--danger); color: var(--on-primary); padding: var(--space-2) var(--space-4); border-radius: var(--radius-full); }
.conn.lost small { color: inherit; }
.conn.lost::before { background: var(--on-primary); }
.new-alert { background: var(--gold-500); color: var(--text); font-weight: var(--fw-bold); padding: var(--space-2) var(--space-4); border-radius: var(--radius-full); }
.new-alert[hidden] { display: none; }
.pro-tabs { display: flex; gap: var(--space-2); padding: var(--space-4) 0 var(--space-1); flex-wrap: wrap; }
.pro-tabs a {
  min-height: var(--tap); display: inline-flex; align-items: center; padding: var(--space-2) var(--space-4); border-radius: var(--radius-full);
  background: var(--surface-sunken); color: var(--text); text-decoration: none; font-weight: var(--fw-bold);
}
.pro-tabs a:hover { background: var(--border); }
.pro-tabs a[aria-current="page"] { background: var(--primary); color: var(--on-primary); }
.pro-main { max-width: none; padding-bottom: var(--space-6); }

/* ---------- Tickets cuisine ---------- */
.tickets { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); list-style: none; margin: var(--space-4) 0 0; padding: 0; }
.tk {
  background: var(--surface); color: var(--text); border-left: var(--space-3) solid var(--box-color, var(--primary));
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3);
}
.tk.is-new { box-shadow: 0 0 0 var(--space-1) var(--gold-500), var(--shadow-sm); }
.tk-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.tk-num { font-family: var(--font-display); font-weight: var(--fw-display); font-size: var(--fs-display); line-height: var(--lh-display); }
.tk-who { font-weight: var(--fw-bold); font-size: var(--fs-lg); }
.tk-time { text-align: right; font-weight: var(--fw-bold); }
.tk-time small { display: block; color: var(--text-muted); font-weight: var(--fw-semibold); }
.tk-status { font-weight: var(--fw-bold); padding: var(--space-1) var(--space-3); border-radius: var(--radius-sm); align-self: flex-start; }
.s-attente { background: var(--gold-500); color: var(--text); }
.s-prep { background: var(--brand-600); color: var(--on-primary); }
.s-prete { background: var(--success); color: var(--on-primary); }
.s-fin { background: var(--surface-sunken); color: var(--gray-700); }
.tk-items { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); font-size: var(--fs-lg); }
.tk-items .box-name::before { content: ""; display: inline-block; width: var(--space-3); height: var(--space-3); border-radius: var(--radius-sm); background: var(--box-color); margin-right: var(--space-2); }
.tk-items small { display: block; color: var(--text-muted); font-size: var(--fs-sm); }
.tk-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); margin-top: auto; }
.tk-actions button {
  min-height: calc(var(--control) + var(--space-2)); border: var(--bw-strong) solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--surface); font-weight: var(--fw-bold); font-size: var(--fs-body); line-height: var(--lh-ui); padding: var(--space-2) var(--space-1);
  transition: background-color var(--dur-fast) var(--ease-out);
}
.tk-actions button:hover { background: var(--surface-sunken); }
.tk-actions button[aria-pressed="true"] { border-color: var(--text); background: var(--text); color: var(--on-primary); }
.reward { border: var(--bw-strong) solid var(--gold-500); background: var(--gold-100); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); }
.reward h3 { font-family: var(--font-body); font-size: var(--fs-body); font-weight: var(--fw-bold); line-height: var(--lh-ui); margin: 0 0 var(--space-1); }
.reward p { margin: 0 0 var(--space-3); }
.reward .acts { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.reward .reward-log { margin: var(--space-2) 0 0; }
.reward.seen { border-color: var(--border); background: var(--surface); }

/* Écran cuisine : fond anthracite (ART-BIBLE §11) */
body.kitchen { background: var(--night-800); color: var(--night-text); }
.kitchen .pro-head { background: var(--night-900); }
.kitchen .pro-tabs a { background: var(--night-700); color: var(--night-text); }
.kitchen .pro-tabs a:hover { background: var(--night-500); }
.kitchen .pro-tabs a[aria-current="page"] { background: var(--night-text); color: var(--text); }
.kitchen .tk { box-shadow: none; }
.kitchen .demo-bar { background: var(--night-900); color: var(--night-text); border-top-color: var(--night-500); }
.kitchen .demo-bar button { background: var(--night-700); color: var(--night-text); border-color: var(--night-500); }
.kitchen .demo-bar button:hover { background: var(--night-500); }

/* ---------- Gestion d'une Box ---------- */
.admin-grid { display: grid; gap: var(--space-6); padding-top: var(--space-4); align-items: start; }
@media (min-width: 1024px) { .admin-grid { grid-template-columns: 240px 1fr; } }
.admin-side { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: var(--space-2); }
.admin-side h2 { font-family: var(--font-body); font-size: var(--fs-body); font-weight: var(--fw-bold); line-height: var(--lh-ui); padding: var(--space-3) var(--space-3) var(--space-2); }
.admin-side ul { list-style: none; margin: 0; padding: 0; }
.admin-side a {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: var(--tap);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); color: var(--text); text-decoration: none; font-weight: var(--fw-bold);
  border-left: var(--space-2) solid var(--box-color);
}
.admin-side a:hover { background: var(--surface-sunken); }
.admin-side a[aria-current="page"] { background: var(--brand-50); }
.admin-side .add { border-left-color: transparent; color: var(--primary); }
.panel-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: var(--space-6); margin-bottom: var(--space-4); }
.panel-card > h2 { font-size: var(--fs-h3); line-height: var(--lh-h3); margin-bottom: var(--space-4); }
.panel-card > .preview-note { margin: calc(-1 * var(--space-2)) 0 var(--space-4); }
.admin-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.admin-top h2 { font-size: var(--fs-h1); line-height: var(--lh-h1); margin-right: auto; }
.form-row { display: grid; gap: var(--space-4); }
@media (min-width: 768px) { .form-row { grid-template-columns: 2fr 1fr 1fr; } }
.form-row .field.full { grid-column: 1 / -1; }
.switch { display: inline-flex; align-items: center; gap: var(--space-3); min-height: var(--tap); background: none; border: 0; padding: 0; font-weight: var(--fw-bold); }
.switch .track-sw { width: var(--space-12); height: var(--space-6); border-radius: var(--radius-full); background: var(--border-strong); position: relative; flex: none; transition: background-color var(--dur-fast) var(--ease-out); }
.switch .track-sw::after { content: ""; position: absolute; top: var(--space-1); left: var(--space-1); width: var(--space-4); height: var(--space-4); border-radius: var(--radius-full); background: var(--surface); transition: transform var(--dur-fast) var(--ease-in-out); }
.switch[aria-checked="true"] .track-sw { background: var(--brand-600); }
.switch[aria-checked="true"] .track-sw::after { transform: translateX(var(--space-6)); }
.steps-admin { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.step-admin { border: var(--bw) solid var(--border); border-radius: var(--radius-md); overflow-x: auto; }
.step-admin header { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); background: var(--surface-sunken); padding: var(--space-2) var(--space-4); }
.step-admin header h3 { font-family: var(--font-body); font-size: var(--fs-body); font-weight: var(--fw-bold); line-height: var(--lh-ui); margin-right: auto; }
.step-admin .rule { color: var(--text-muted); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.step-admin .icon-btn {
  min-width: var(--tap); min-height: var(--tap); border: var(--bw-strong) solid var(--border-strong); background: var(--surface);
  border-radius: var(--radius-md); font-weight: var(--fw-bold); padding: var(--space-1) var(--space-3);
}
.step-admin .icon-btn:hover { background: var(--brand-50); }
.opt-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.opt-table th, .opt-table td { text-align: left; padding: var(--space-2) var(--space-4); border-top: var(--bw) solid var(--border); vertical-align: middle; }
.opt-table th { font-size: var(--fs-sm); color: var(--text-muted); font-weight: var(--fw-bold); }
.opt-table th:nth-child(2), .opt-table th:nth-child(3) { width: 8rem; }
@media (min-width: 768px) { .opt-table th:nth-child(2), .opt-table th:nth-child(3) { width: 11rem; } }
.opt-table input[type="text"] {
  width: 100%; max-width: 7rem; min-height: var(--tap); padding: var(--space-1) var(--space-2); border: var(--bw-strong) solid var(--border-strong);
  border-radius: var(--radius-md); text-align: right; font-variant-numeric: tabular-nums;
}
.opt-table .is-out td:first-child { color: var(--text-muted); }
.opt-table tr:not(.is-out) .out { display: none; }
.step-admin footer { padding: var(--space-2) var(--space-4); border-top: var(--bw) solid var(--border); }
.preview-note { color: var(--text-muted); font-size: var(--fs-sm); margin: 0; }

/* =========================== Sommaire de la présentation =========================== */
.index-head { background: var(--inverse-bg); color: var(--inverse-text); padding: var(--space-12) 0; }
.index-head img { width: var(--space-16); height: var(--space-16); margin-bottom: var(--space-4); }
.index-head h1 { color: inherit; }
.index-head p { margin: var(--space-2) 0 0; font-size: var(--fs-lg); color: var(--gray-300-on-dark); }
.index-head a { color: var(--inverse-text); }
.index-note { color: var(--text-muted); max-width: var(--measure); margin-top: var(--space-6); }
.index-group { font-size: var(--fs-h2); margin-top: var(--space-8); }
.screens { list-style: none; margin: 0; padding: var(--space-6) 0 var(--space-12); display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.screens a {
  display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) var(--space-4); align-items: start; height: 100%;
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: var(--space-4); color: var(--text); text-decoration: none;
  transition: box-shadow var(--dur-fast) var(--ease-out);
}
.screens a:hover { box-shadow: var(--shadow-md); }
.screens .n { grid-row: span 2; font-family: var(--font-display); font-weight: var(--fw-display); font-size: var(--fs-h3); line-height: 1; color: var(--primary); min-width: 1.4em; }
.screens .t { font-weight: var(--fw-bold); }
.screens .d { color: var(--text-muted); font-size: var(--fs-sm); }
