/* Précommandes — feuille de style unique, mobile d'abord. */
:root {
  --bg: #f6f4f1;
  --surface: #ffffff;
  --ink: #1f1d1a;
  --muted: #6b665e;
  --line: #e4dfd7;
  --brand: #8c2f2b;
  --brand-dark: #6f2421;
  --brand-soft: #f6e9e7;
  --ok: #24724a;
  --ok-soft: #e4f3ea;
  --warn: #9a6200;
  --warn-soft: #fbf0d9;
  --info: #255d99;
  --info-soft: #e5eef8;
  --danger: #b42318;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { overflow-x: clip; margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.45; }
img { max-width: 100%; height: auto; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt { margin-top: 1rem; }
.mb { margin-bottom: 1rem; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 640px; margin: 0 auto; padding: 0 16px; }

/* Cartes */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.card h2 { margin-bottom: .75rem; }
.grid { display: grid; gap: 1rem; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.stat .value { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.stat .label { color: var(--muted); font-size: .9rem; }
@media (max-width: 719px) { .stats { grid-template-columns: repeat(3, 1fr); gap: .5rem; } .stats .stat { padding: .75rem .6rem; } .stats .value { font-size: 1.6rem; } .stats .label { font-size: .78rem; } }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .55rem 1rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: #cfc8bd; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-danger { color: var(--danger); }
.btn-sm { min-height: 36px; padding: .3rem .7rem; font-size: .9rem; border-radius: 8px; }
.btn-lg { min-height: 56px; font-size: 1.1rem; padding: .8rem 1.25rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-link { background: none; border: 0; color: var(--brand); padding: 0; min-height: auto; font-weight: 500; text-decoration: underline; cursor: pointer; font: inherit; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.inline { display: inline; }

/* Formulaires */
label { display: block; font-weight: 600; margin-bottom: .3rem; }
.field { margin-bottom: 1rem; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: .6rem .75rem; font: inherit; font-size: 16px; color: var(--ink);
  background: #fff; border: 1px solid #d3ccc1; border-radius: 10px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(140,47,43,.2); border-color: var(--brand); }
.help { color: var(--muted); font-size: .85rem; margin-top: .25rem; }
.error-text { color: var(--danger); font-size: .9rem; margin-top: .3rem; font-weight: 600; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--brand); }
.row { display: grid; gap: .75rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.row-3 { display: grid; gap: .75rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 480px) { .row-3 { grid-template-columns: 1fr 1fr; } .row-3 > :first-child { grid-column: 1 / -1; } }

/* Alertes */
.alert { padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-weight: 500; }
.alert-success { background: var(--ok-soft); color: var(--ok); }
.alert-error { background: #fdecea; color: var(--danger); }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-credentials { background: #fff8e1; color: #6d4c00; border: 1px dashed #d4a72c; font-family: ui-monospace, monospace; word-break: break-all; }

/* Badges statut */
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; background: #eee; color: #444; }
.badge-new { background: var(--info-soft); color: var(--info); }
.badge-confirmed { background: #ede7f6; color: #5b3f8c; }
.badge-preparing { background: var(--warn-soft); color: var(--warn); }
.badge-ready { background: var(--ok-soft); color: var(--ok); }
.badge-collected { background: #ececec; color: #555; }
.badge-cancelled { background: #fdecea; color: var(--danger); text-decoration: line-through; }
.badge-on { background: var(--ok-soft); color: var(--ok); }
.badge-off { background: #ececec; color: #666; }

/* ===================== Page publique ===================== */
.shop-header { background: var(--surface); border-bottom: 1px solid var(--line); padding: 1rem 0 1.1rem; text-align: center; }
.shop-header .logo { max-height: 64px; max-width: 180px; display: block; margin: 0 auto .5rem; }
.shop-name { font-size: 1rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.campaign-title { font-size: 1.55rem; margin: .35rem 0 .35rem; }
.campaign-intro { color: var(--muted); margin: 0; white-space: pre-line; }
.campaign-image { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius); margin: 1rem 0 0; display: block; }

.step-title { display: flex; align-items: center; gap: .6rem; margin: 1.5rem 0 .75rem; font-size: 1.15rem; }
.step-title .num { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .95rem; flex-shrink: 0; }

.product { display: flex; gap: .75rem; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem .9rem; margin-bottom: .6rem; transition: border-color .15s, box-shadow .15s; }
.product.selected { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.product-info { min-width: 0; flex: 1; }
.product-name { font-weight: 700; font-size: 1.02rem; }
.product-desc { color: var(--muted); font-size: .88rem; margin-top: .1rem; }
.product-price { font-weight: 700; color: var(--brand); margin-top: .2rem; }
.product-price .weight-note { font-weight: 500; color: var(--muted); font-size: .8rem; display: block; }

.stepper { display: flex; align-items: center; gap: .15rem; flex-shrink: 0; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #d3ccc1; background: #fff; font-size: 1.4rem; line-height: 1; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; touch-action: manipulation; }
.stepper button:active { transform: scale(.94); }
.stepper .plus { background: var(--brand); border-color: var(--brand); color: #fff; }
.stepper input { width: 42px; min-height: 44px; text-align: center; font-weight: 700; font-size: 1.1rem; border: 0; background: transparent; padding: 0; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.slot-day { margin-bottom: 1rem; }
.slot-day h3 { font-size: 1rem; margin-bottom: .5rem; }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.slot-option { position: relative; }
.slot-option input { position: absolute; opacity: 0; pointer-events: none; }
.slot-option span { display: flex; align-items: center; justify-content: center; min-height: 54px; padding: .5rem; border: 1px solid #d3ccc1; border-radius: 12px; background: #fff; font-weight: 700; cursor: pointer; text-align: center; }
.slot-option input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); box-shadow: 0 0 0 2px var(--brand); }
.slot-option input:focus-visible + span { outline: 3px solid rgba(140,47,43,.35); }

.cart-bar { position: sticky; bottom: 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(0,0,0,.07); padding: .7rem 0 calc(.7rem + env(safe-area-inset-bottom)); }
.cart-bar .container { display: flex; align-items: center; justify-content: space-between; gap: .75rem; max-width: 640px; }
.cart-summary { line-height: 1.2; }
.cart-summary strong { font-size: 1.2rem; display: block; }
.cart-summary .small { color: var(--muted); }

.summary-list { list-style: none; padding: 0; margin: 0; }
.summary-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.summary-list li:last-child { border-bottom: 0; }
.total-line { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.15rem; padding-top: .6rem; }

.confirm-hero { text-align: center; padding: 1.5rem 0 .5rem; }
.confirm-hero .check-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 2rem; display: inline-flex; align-items: center; justify-content: center; margin-bottom: .75rem; }
.ref { font-size: 1.6rem; font-weight: 800; letter-spacing: .03em; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }

.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state .icon { font-size: 2.6rem; margin-bottom: .5rem; }

.site-footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 2rem 16px 2.5rem; }
.site-footer a { color: var(--muted); }

/* ===================== Back-office ===================== */
.topbar { background: var(--ink); color: #fff; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar .brand { font-weight: 800; letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .brand small { font-weight: 500; opacity: .7; }
.topbar .user { font-size: .85rem; opacity: .85; white-space: nowrap; }
.nav { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.nav ul { list-style: none; margin: 0 auto; padding: 0 8px; display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; max-width: 1100px; }
.nav ul::-webkit-scrollbar { display: none; }
.nav a { display: block; padding: .85rem .75rem; font-weight: 600; font-size: .92rem; text-decoration: none; color: var(--muted); white-space: nowrap; border-bottom: 3px solid transparent; }
.nav a.active { color: var(--brand); border-bottom-color: var(--brand); }
.demo-banner { background: #1f1d1a; color: #fff; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem 1rem; padding: .5rem 16px; font-size: .9rem; text-align: center; }
.demo-banner a:not(.btn) { color: #fff; }
.demo-banner .demo-cta { font-weight: 700; padding: .45rem .9rem; box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.impersonate { background: #ffe8a3; color: #5b4300; text-align: center; padding: .45rem 16px; font-size: .9rem; font-weight: 600; }
.impersonate a { color: inherit; }
main.page { padding: 1.25rem 0 3rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin-bottom: 1rem; }
.filters > * { flex: 1 1 160px; }
.filters .btn { flex: 0 0 auto; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.chip { padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); font-size: .9rem; font-weight: 600; }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Tableau responsive : lignes en cartes sur mobile */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: .7rem .75rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #faf8f5; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #fcfbf9; }
.table tr.inactive td { opacity: .55; }
@media (max-width: 760px) {
  .table.responsive, .table.responsive tbody, .table.responsive tr, .table.responsive td { display: block; width: 100%; }
  .table.responsive thead { display: none; }
  .table.responsive { background: none; border: 0; }
  .table.responsive tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .6rem; padding: .5rem .25rem; }
  .table.responsive td { border: 0; padding: .25rem .75rem; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .table.responsive td::before { content: attr(data-label); color: var(--muted); font-size: .85rem; text-align: left; font-weight: 500; }
  .table.responsive td.td-main { font-weight: 700; font-size: 1.05rem; }
  .table.responsive td.td-main::before { content: none; }
  .table.responsive td.td-actions { justify-content: flex-start; flex-wrap: wrap; }
  .table.responsive td.td-actions::before { content: none; }
}

.list-item { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }

.status-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .5rem; }
.status-buttons .btn.current { background: var(--ink); color: #fff; border-color: var(--ink); }

.qr-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; display: inline-block; }
.qr-box svg { display: block; width: 220px; height: 220px; }
.url-box { font-family: ui-monospace, monospace; background: #faf8f5; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; word-break: break-all; }

.integration-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; border-style: dashed; box-shadow: none; }

.file-list { list-style: none; padding: 0; margin: .75rem 0 0; display: grid; gap: .5rem; }
.file-list li { display: flex; align-items: center; gap: .6rem; background: #faf8f5; border: 1px solid var(--line); border-radius: 10px; padding: .4rem .5rem; }
.file-list img, .file-list .file-icon { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; background: #fff; }
.file-list .file-name { flex: 1; min-width: 0; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5rem; }
.thumbs a { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #faf8f5; text-decoration: none; color: inherit; font-size: .8rem; }
.thumbs img { width: 100%; height: 120px; object-fit: cover; display: block; }
.thumbs span { display: block; padding: .3rem .4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Photo produit */
.product-thumb { flex-shrink: 0; width: 64px; height: 64px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #eee; cursor: zoom-in; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 380px) { .product-thumb { width: 52px; height: 52px; } }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(20,18,16,.88); display: flex; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 85vh; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.lightbox p { position: absolute; bottom: calc(20px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; color: #fff; font-weight: 600; margin: 0; padding: 0 20px; }

/* Lieux de retrait (commerces ambulants) */
.place-picker { margin-bottom: 1rem; }
.place-question { font-weight: 700; margin-bottom: .5rem; }
.place-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.place-option { min-height: 48px; padding: .55rem 1rem; border-radius: 999px; border: 1px solid #d3ccc1; background: #fff; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.place-option.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.place-single { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; margin-bottom: 1rem; }
.slot-option span { flex-direction: column; line-height: 1.2; }
.slot-place { display: block; font-weight: 500; font-size: .78rem; color: var(--muted); margin-top: .2rem; }
.slot-option input:checked + span .slot-place { color: var(--brand-dark); }

/* Préparation */
.prep-group { break-inside: avoid; }
.prep-slot-title { background: var(--ink); color: #fff; padding: .55rem .9rem; border-radius: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; margin: 1.25rem 0 .6rem; }
.prep-order { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .75rem .9rem; margin-bottom: .55rem; break-inside: avoid; }
.prep-order-head { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; font-weight: 700; margin-bottom: .35rem; }
.prep-order ul { margin: 0; padding-left: 1.1rem; }
.prep-order li { margin: .1rem 0; }
.prep-total td.qty { font-size: 1.35rem; font-weight: 800; text-align: right; width: 1%; white-space: nowrap; }
.print-only { display: none; }

/* Auth */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.auth-card { width: 100%; max-width: 400px; }

/* ===================== Impression ===================== */
@media print {
  @page { margin: 12mm; }
  body { background: #fff; font-size: 12pt; }
  .no-print, .topbar, .nav, .impersonate, .site-footer, .alert, .filters, .chips, .btn { display: none !important; }
  .print-only { display: block; }
  main.page { padding: 0; }
  .container { max-width: none; padding: 0; }
  .card, .prep-order, .table { box-shadow: none; border-color: #999; }
  .prep-slot-title { background: #fff; color: #000; border: 2px solid #000; }
  .prep-order { page-break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}

/* Marque */
.auth-logo { display: block; text-align: center; margin-bottom: 1.2rem; }
.auth-logo img { height: 34px; width: auto; }
.topbar .brand img { height: 22px; width: auto; vertical-align: middle; }
.powered a { display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; }
.powered img { border-radius: 3px; }

/* PWA */
.pwa-card { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; border-color: var(--brand); }
.pwa-card img { border-radius: 12px; flex-shrink: 0; }
.pwa-card .pwa-text { flex: 1; min-width: 200px; }
.pwa-card .pwa-text p { margin: .2rem 0 0; }
@media (display-mode: standalone) { .topbar { padding-top: env(safe-area-inset-top); } }

/* Petits écrans / grande taille de texte : rien ne doit élargir la page */
input, select, textarea { min-width: 0; max-width: 100%; }
.grid > *, .actions > * { min-width: 0; }
.btn { white-space: normal; text-align: center; }
.list-item > div:first-child { min-width: 0; }

/* ---------- Aide / guide du commerçant (grand texte, lisible, imprimable) ---------- */
.help-fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; display: inline-flex; align-items: center; gap: .4rem;
  min-height: 56px; padding: 0 1.3rem; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 700; font-size: 1.05rem; text-decoration: none;
  box-shadow: 0 4px 18px rgba(0,0,0,.28); }
.help-fab:hover { background: var(--brand-dark); }
main.page { padding-bottom: 6rem; }

.guide { font-size: 1.15rem; line-height: 1.6; }
.guide.guide-size-1 { font-size: 1.3rem; }
.guide.guide-size-2 { font-size: 1.5rem; }
.guide.guide-size-3 { font-size: 1.75rem; }
.guide h1 { font-size: 1.6em; }
.guide h2 { font-size: 1.3em; }
.guide h3 { font-size: 1.12em; margin: 0 0 .3em; }
.guide .btn { font-size: .9em; min-height: 3em; }
.guide .btn-lg { min-height: 3.2em; }
.guide-back { font-weight: 600; font-size: 1em; }
.guide-intro { background: var(--info-soft); color: #1d466f; padding: .9em 1.1em; border-radius: var(--radius); margin: 0 0 1em; }
.guide-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.2rem; }
.guide-toolbar .btn[hidden] { display: none; }

.guide-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: .9rem; margin-bottom: 1.5rem; }
.guide-tile { display: flex; flex-direction: column; gap: .25rem; padding: 1.1rem; min-height: 9.5rem; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.guide-tile:hover, .guide-tile:focus-visible { border-color: var(--brand); }
.guide-tile.primary { grid-column: 1 / -1; background: var(--brand); border-color: var(--brand); color: #fff; min-height: 0; }
.guide-tile-icon { font-size: 2.2em; line-height: 1; }
.guide-tile-title { font-weight: 700; font-size: 1.1em; }
.guide-tile-sub { font-size: .9em; color: var(--muted); }
.guide-tile.primary .guide-tile-sub { color: #f6e9e7; }

.guide-steps { list-style: none; counter-reset: step; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 1rem; }
.guide-steps > li { counter-increment: step; display: flex; gap: 1rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.guide-steps > li::before { content: counter(step); flex: none; display: flex; align-items: center; justify-content: center; width: 2.2em; height: 2.2em; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 1.2em; }
.guide-step-body { flex: 1; min-width: 0; }
.guide-step-body p { margin: 0 0 .6em; }
.guide-step-body p:last-child { margin-bottom: 0; }
.guide-tips { background: var(--warn-soft); border-radius: var(--radius); padding: 1em 1.2em; margin: 0 0 1.5rem; }
.guide-tips ul { margin: 0; padding-left: 1.2em; }
.guide-tips li { margin: .4em 0; }
.guide-faq { display: grid; gap: .7rem; margin-bottom: 1.5rem; }
.guide-q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .2em 1em; }
.guide-q summary { cursor: pointer; font-weight: 700; padding: .8em 0; }
.guide-q p { margin: 0 0 1em; }
.guide-terms { margin: 0 0 1.5rem; }
.guide-terms dt { font-weight: 700; margin-top: 1em; }
.guide-terms dd { margin: .2em 0 0; }
.guide-pager { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between; margin: 1.5rem 0; }
.guide-contact { text-align: center; }

/* Liste « Pour bien démarrer » du tableau de bord */
.start-card h2 { margin-bottom: .25rem; }
.start-list { list-style: none; margin: .8rem 0; padding: 0; display: grid; gap: .5rem; }
.start-list li a { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; min-height: 52px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; }
.start-list li.done a { color: var(--muted); background: #faf8f5; font-weight: 500; }
.start-list .tick { flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }
.start-list li.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.start-progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: .6rem; }
.start-progress > span { display: block; height: 100%; background: var(--ok); }

@media print {
  .guide-print { font-size: 11pt; line-height: 1.45; }
  .guide-print-cover { text-align: center; padding: 30mm 0 20mm; }
  .guide-print-topic { break-before: page; }
  .guide-steps > li, .guide-q { box-shadow: none; break-inside: avoid; }
  .guide-steps > li::before { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .help-fab { display: none !important; }
}

/* ---------- Catégories et menus (page de commande) ---------- */
.catalog-head { margin: 1.4rem 0 .6rem; }
.catalog-head .catalog-title { font-size: 1.15rem; margin: 0; letter-spacing: .01em; }
.catalog-head p { margin: .1rem 0 0; }
.category-head { margin: 1.1rem 0 .5rem; padding-bottom: .3rem; border-bottom: 2px solid var(--brand-soft); }
.category-head h3 { margin: 0; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); }
.category-head p { margin: .15rem 0 0; }
.menus-block { background: var(--brand-soft); border-radius: calc(var(--radius) + 4px); padding: .2rem .8rem .8rem; margin: 0 -.2rem 1rem; }
.menu-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: .7rem; box-shadow: var(--shadow); }
.menu-card-img { display: block; width: 100%; max-height: 180px; object-fit: cover; }
.menu-card-body { padding: .9rem; }
.menu-card h4 { margin: 0 0 .25rem; font-size: 1.12rem; }
.menu-card-desc { color: var(--muted); font-size: .9rem; margin-bottom: .5rem; }
.menu-formulas { list-style: none; margin: 0 0 .8rem; padding: 0; }
.menu-formulas li { display: flex; justify-content: space-between; gap: .75rem; padding: .35rem 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.menu-formulas li:last-child { border-bottom: 0; }
.menu-formulas strong { color: var(--brand); white-space: nowrap; }
.menu-lines-title { font-weight: 700; margin: .8rem 0 .4rem; }
.menu-line-card { background: var(--surface); border: 2px solid var(--brand); border-radius: var(--radius); padding: .75rem .85rem; margin-bottom: .6rem; }
.menu-line-head { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; }
.menu-line-choices { list-style: none; margin: .35rem 0 .5rem; padding: 0 0 0 .7rem; border-left: 3px solid var(--brand-soft); font-size: .92rem; }
.menu-line-choices li { margin: .1rem 0; }
.menu-line-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.menu-line-qty { min-width: 32px; text-align: center; font-weight: 700; font-size: 1.1rem; }

/* Composeur : plein écran sur téléphone, fenêtre centrée sur ordinateur */
html.sheet-open, html.sheet-open body { overflow: hidden; }
.menu-sheet { position: fixed; inset: 0; z-index: 90; background: rgba(20,18,16,.55); display: flex; align-items: flex-end; justify-content: center; }
.menu-sheet-panel { background: var(--bg); width: 100%; max-width: 560px; height: 100%; max-height: 100dvh; display: flex; flex-direction: column; }
@media (min-width: 640px) { .menu-sheet { align-items: center; padding: 24px; } .menu-sheet-panel { height: auto; max-height: min(760px, 92vh); border-radius: 18px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.3); } }
.sheet-head { display: flex; align-items: flex-start; gap: .5rem; padding: calc(.7rem + env(safe-area-inset-top)) .8rem .5rem; background: var(--surface); }
.sheet-titles { flex: 1; min-width: 0; text-align: center; }
.sheet-titles h2 { margin: .1rem 0 0; font-size: 1.25rem; }
.sheet-kicker { margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.sheet-rule { margin: .2rem 0 0; font-size: .9rem; color: var(--muted); }
.sheet-icon { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 1.15rem; cursor: pointer; color: var(--ink); }
.sheet-progress { height: 4px; background: var(--line); }
.sheet-progress span { display: block; height: 100%; background: var(--brand); transition: width .2s; }
.sheet-step { margin: .5rem 1rem 0; font-size: .8rem; color: var(--muted); text-align: center; }
.sheet-body { flex: 1; overflow-y: auto; padding: .6rem .8rem 1rem; -webkit-overflow-scrolling: touch; }
.sheet-option { display: flex; align-items: center; gap: .75rem; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: .85rem .9rem; margin-bottom: .55rem; cursor: pointer; min-height: 56px; }
.sheet-option input { width: 22px; height: 22px; flex: none; accent-color: var(--brand); margin: 0; }
.sheet-option.checked { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.sheet-option.disabled { opacity: .5; cursor: not-allowed; }
.sheet-option-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.sheet-option-price { font-weight: 700; white-space: nowrap; color: var(--muted); font-size: .92rem; }
.sheet-option-price.extra { color: var(--brand); }
.sheet-recap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem; display: flex; flex-direction: column; gap: .15rem; }
.sheet-recap ul { list-style: none; margin: .5rem 0 0; padding: 0; }
.sheet-recap li { padding: .35rem 0; border-top: 1px solid var(--line); }
.sheet-qty { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-top: .9rem; font-weight: 600; }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem .9rem calc(.7rem + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(0,0,0,.06); }
.sheet-price { display: flex; flex-direction: column; line-height: 1.15; }
.sheet-price strong { font-size: 1.3rem; }
.sheet-foot .btn { flex: 0 1 auto; }
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 95; background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: 999px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: opacity .4s; white-space: nowrap; }
.toast.out { opacity: 0; }

/* Récapitulatifs : à la carte / menus */
.recap-section { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin: .9rem 0 .2rem; }
.summary-list li.recap-section { display: block; border-bottom: 0; padding: .6rem 0 0; }
.recap-detail { display: block; color: var(--muted); font-size: .85rem; padding-left: .7rem; }
.menu-choices { display: flex; flex-direction: column; margin-top: .25rem; padding-left: .7rem; border-left: 3px solid var(--brand-soft); font-size: .92rem; }

/* Préparation : ventilation carte / menus */
.chip-sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 .2rem; }
.prep-split { color: var(--brand); font-weight: 600; }
.prep-sources { list-style: none; margin: .35rem 0 .15rem; padding: 0 0 0 .7rem; border-left: 3px solid var(--brand-soft); max-width: 420px; }
.prep-sources li { display: flex; justify-content: space-between; gap: 1rem; padding: .1rem 0; font-size: .92rem; }
.prep-section { margin: .45rem 0 .1rem; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.prep-order .prep-menu-choices { margin: .1rem 0 .25rem; padding-left: 1rem; list-style: circle; font-size: .92rem; }

/* Espace commerçant : menus et catégories */
.menu-admin-formula { border-left: 4px solid var(--brand); }
.menu-admin-group { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: .75rem; margin: .6rem 0; }
.menu-admin-group h4 { margin: 0; font-size: 1rem; }
.option-pick { display: grid; grid-template-columns: 1fr auto; gap: .4rem .75rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.option-pick:last-child { border-bottom: 0; }
.option-pick .supp { display: flex; align-items: center; gap: .3rem; font-size: .88rem; color: var(--muted); }
.option-pick .supp input { width: 5.5rem; padding: .35rem .5rem; min-height: 36px; }
.option-cat { margin: .75rem 0 .2rem; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); display: flex; justify-content: space-between; align-items: center; }
.inline-actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.support-grid { display: grid; gap: 1rem; }
@media (min-width: 720px) { .support-grid { grid-template-columns: repeat(3, 1fr); } }
.support-card { display: flex; flex-direction: column; gap: .5rem; }
.support-card .preview { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: center; padding: .8rem; min-height: 150px; }
.support-card .preview span { background: #fff; border: 1px solid #cfc8bd; box-shadow: 0 2px 8px rgba(0,0,0,.08); display: block; }
.support-card .btn { margin-top: auto; }
.headline-options { display: grid; gap: .45rem; }
.headline-options label { display: flex; gap: .6rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .6rem .8rem; cursor: pointer; }
.headline-options input { accent-color: var(--brand); width: 20px; height: 20px; margin: 0; }
.table tr.table-group th { background: var(--brand-soft); color: var(--brand); font-weight: 800; }
@media (max-width: 760px) {
  .table.responsive tr.table-group { background: none; border: 0; padding: .6rem 0 .1rem; margin: 0; }
  .table.responsive tr.table-group th { display: block; background: none; padding: 0 .2rem; }
}

/* --- Admin Trucks & Moi : autocomplétion des communes, saisie du planning --- */
.ac-list { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: .25rem 0; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 280px; overflow-y: auto; }
.ac-list li { padding: .55rem .8rem; cursor: pointer; }
.ac-list li small { color: var(--muted); }
.ac-list li.active, .ac-list li:hover { background: var(--brand-soft); }
.daypick { display: flex; flex-wrap: wrap; gap: .35rem; }
.daypick label { display: inline-flex; align-items: center; gap: .3rem; margin: 0; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; cursor: pointer; background: var(--surface); }
.daypick input { margin: 0; }
.daypick label:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }
.cuisine-pick { display: flex; flex-wrap: wrap; gap: .35rem; }
.cuisine-pick label { display: inline-flex; align-items: center; gap: .3rem; margin: 0; padding: .35rem .65rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; cursor: pointer; }
.cuisine-pick label:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); }
.tier { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.tier-listed { background: #eceae6; color: #4b4740; }
.tier-claimed { background: var(--info-soft); color: var(--info); }
.tier-ordering { background: var(--ok-soft); color: var(--ok); }
.tier-trial { background: var(--warn-soft); color: var(--warn); }
.cert { display: inline-block; padding: .05rem .45rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.cert-confirmed { background: var(--ok-soft); color: var(--ok); }
.cert-planned { background: var(--info-soft); color: var(--info); }
.cert-unconfirmed { background: var(--warn-soft); color: var(--warn); }
.admin-section { scroll-margin-top: 4rem; }
.subtle-list { list-style: none; padding: 0; margin: 0; }
.subtle-list > li { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.subtle-list > li:last-child { border-bottom: 0; }
details.inline-edit > summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .9rem; }

/* Statistiques : histogramme à une série (barres fines arrondies, info-bulle), barres horizontales des répartitions */
.bars { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 180px; margin: 1.6rem 0 1.4rem; padding-top: 4px; border-bottom: 1px solid var(--line); }
.bars-max { position: absolute; top: -1.2rem; left: 0; font-size: .75rem; color: var(--muted); }
.bar-col { position: relative; flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; outline: none; }
.bar-col .bar { width: 100%; max-width: 28px; background: var(--brand); border-radius: 4px 4px 0 0; }
.bar-col:hover .bar, .bar-col:focus .bar { background: var(--brand-dark); }
.bar-col:focus-visible { box-shadow: 0 0 0 2px var(--brand-soft); border-radius: 4px; }
.bar-x { position: absolute; top: 100%; margin-top: .3rem; font-size: .7rem; color: var(--muted); white-space: nowrap; }
.bar-tip { position: absolute; z-index: 60; background: #1f1d1a; color: #fff; font-size: .8rem; padding: .35rem .6rem; border-radius: 8px; pointer-events: none; max-width: 260px; }
.hbar { height: 6px; background: var(--line); border-radius: 999px; margin-top: .35rem; overflow: hidden; }
.hbar > div { height: 100%; background: var(--brand); border-radius: 999px; }

/* --- Espace commerçant : menu groupé (barre latérale sur grand écran, onglets + tiroir sur téléphone) --- */
.sidenav { background: var(--surface); }
.sidenav ul { list-style: none; margin: 0 0 .75rem; padding: 0; }
.sidenav-title { margin: .9rem .9rem .3rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sidenav a { display: flex; align-items: center; gap: .6rem; padding: .62rem .9rem; margin: 0 .4rem; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.sidenav a span { width: 1.4rem; text-align: center; }
.sidenav a:hover { background: var(--bg); }
.sidenav a.active { background: var(--brand-soft); color: var(--brand-dark); }
.sidenav-head { display: none; }
.tabbar { display: none; }
@media (min-width: 960px) {
  .app-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); align-items: start; }
  .sidenav { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); padding: .3rem 0 2rem; }
  .sidenav-backdrop { display: none; }
}
@media (max-width: 959px) {
  .sidenav { position: fixed; z-index: 90; top: 0; left: 0; bottom: 0; width: min(300px, 86vw); overflow-y: auto; padding-bottom: 2rem;
    transform: translateX(-105%); transition: transform .2s ease; box-shadow: 0 0 30px rgba(0,0,0,.2); }
  .sidenav.open { transform: none; }
  .sidenav-head { display: flex; justify-content: space-between; align-items: center; padding: .9rem .9rem .2rem; }
  .sidenav-close { border: 0; background: var(--bg); border-radius: 999px; width: 36px; height: 36px; font-size: 1rem; cursor: pointer; }
  .sidenav-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.35); }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; z-index: 70; left: 0; right: 0; bottom: 0;
    background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .45rem .2rem .5rem; border: 0; background: none;
    font: inherit; font-size: .72rem; font-weight: 600; color: var(--muted); text-decoration: none; cursor: pointer; }
  .tabbar span { font-size: 1.25rem; line-height: 1.2; }
  .tabbar .active { color: var(--brand-dark); }
  .merchant-app main.page { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
  .merchant-app .help-fab { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .merchant-app .cart-bar { bottom: calc(60px + env(safe-area-inset-bottom)); }
  body.menu-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .sidenav { transition: none; } }
@media print { .sidenav, .tabbar, .sidenav-backdrop { display: none !important; } .app-shell { display: block; } }
/* Classement des produits vendus */
.best-seller { display: flex; gap: .6rem; align-items: flex-start; background: var(--brand-soft); border-radius: 12px; padding: .7rem .9rem; margin: 1rem 0 .5rem; }
.best-seller > span:first-child { font-size: 1.4rem; line-height: 1.1; }
.ranking { list-style: none; padding: 0; margin: .5rem 0 0; }
.ranking > li { padding: .65rem 0; border-bottom: 1px solid var(--line); }
.ranking > li:last-child { border-bottom: 0; }
.ranking-row { display: flex; align-items: baseline; gap: .6rem; }
.rank { flex: 0 0 1.6rem; height: 1.6rem; display: inline-grid; place-items: center; border-radius: 50%; background: var(--bg); font-weight: 700; font-size: .8rem; }
.ranking > li:nth-child(-n+3) .rank { background: var(--brand); color: #fff; }
.ranking-name { flex: 1 1 auto; font-weight: 600; min-width: 0; }
.ranking-value { text-align: right; white-space: nowrap; }
.ranking .hbar { margin-left: 2.2rem; }
.ranking-meta { margin: .3rem 0 0 2.2rem; }
.trend { font-weight: 700; }
.trend.up { color: var(--ok); }
.trend.down { color: var(--danger); }
/* Mode service : pastilles, bandeaux en direct, commandes à traiter */
.nav-badge { margin-left: auto; min-width: 1.35rem; height: 1.35rem; padding: 0 .4rem; border-radius: 999px; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 800; line-height: 1.35rem; text-align: center; }
.nav-badge[hidden] { display: none; }
.tabbar a { position: relative; }
.tabbar .nav-badge { position: absolute; top: .2rem; left: calc(50% + .45rem); margin: 0; box-shadow: 0 0 0 2px var(--surface); }
.service-toggle { display: inline-flex; align-items: center; gap: .45rem; margin-left: auto; margin-right: .75rem; min-height: 34px; padding: .2rem .75rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: transparent; color: inherit; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.service-dot { width: .6rem; height: .6rem; border-radius: 50%; background: rgba(255,255,255,.45); }
.service-toggle.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.service-toggle.on .service-dot { background: #fff; animation: service-pulse 1.6s ease-in-out infinite; }
@keyframes service-pulse { 50% { opacity: .35; } }
tr.is-new td:first-child { box-shadow: inset 4px 0 0 var(--brand); }
tr.is-new .td-main::before, .prep-order.is-new .prep-order-head > span:first-child::before { content: ''; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--brand); margin-right: .4rem; vertical-align: middle; }
.prep-order.is-new { border-left: 4px solid var(--brand); }
.just-arrived { animation: just-arrived 2.4s ease-out 2; }
@keyframes just-arrived { 0%, 35% { background-color: var(--brand-soft); } 100% { background-color: transparent; } }
.live-toasts { position: fixed; z-index: 120; left: 50%; transform: translateX(-50%); top: .75rem; width: min(560px, calc(100vw - 2rem)); display: grid; gap: .5rem; pointer-events: none; }
.live-toast { pointer-events: auto; display: flex; align-items: center; gap: .6rem; padding: .7rem .8rem .7rem 1rem; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-weight: 600; animation: toast-in .25s ease-out; }
.live-toast > span { flex: 1 1 auto; }
.live-toast-close { border: 0; background: transparent; color: inherit; opacity: .7; font-size: 1rem; cursor: pointer; padding: .3rem; }
@keyframes toast-in { from { transform: translateY(-8px); opacity: 0; } }
.btn.is-busy { opacity: .6; }
@media (max-width: 600px) { .topbar .container { gap: .5rem; } .service-toggle { margin-right: 0; padding: .2rem .55rem; font-size: .78rem; flex: 0 0 auto; } }
@media (prefers-reduced-motion: reduce) { .service-toggle.on .service-dot, .just-arrived, .live-toast { animation: none; } }
@media print { .service-toggle, .live-toasts { display: none !important; } }
.sidenav-account { display: none; border-top: 1px solid var(--line); margin-top: .5rem; }
.sidenav-switch { margin: 0 .9rem .5rem; }
@media (max-width: 959px) {
  .sidenav-account { display: block; }
  .topbar .user { display: none; }
  .chips-scroll { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin-right: -1rem; padding-right: 1rem; }
  .chips-scroll::-webkit-scrollbar { display: none; }
  .chips-scroll .chip { flex: 0 0 auto; }
}
.prep-next { min-width: 11rem; }
@media (max-width: 600px) { .prep-next { width: 100%; min-height: 50px; font-size: 1.05rem; } }
.sidenav-push { margin: .5rem .9rem 1rem; padding: .75rem; border-radius: 12px; background: var(--bg); }
.sidenav-push .btn { width: 100%; }
.sidenav-push p { margin: .45rem 0 0; }
.td-pickup { min-width: 11rem; }
/* Carte fixe / carte du moment */
.card-mode { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; }
details.card-mode { display: block; }
details.card-mode summary { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; cursor: pointer; list-style: none; }
details.card-mode summary::-webkit-details-marker { display: none; }
.card-mode > div:first-child { flex: 1 1 260px; }
.card-mode-live { border-left: 4px solid var(--ok); }
.card-mode-paused { border-left: 4px solid var(--warn); background: var(--warn-soft); }
.card-mode-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.card-paused-banner { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.card-paused-banner > span { flex: 1 1 200px; }
.card-updated { display: inline-flex; gap: .4rem; align-items: center; margin: .6rem 0 0; padding: .3rem .75rem; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: .85rem; font-weight: 600; }
