/* SnackFlow — feuille de style commune */
@font-face { font-family: 'Bricolage'; src: url('../fonts/bricolage-grotesque-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Bricolage'; src: url('../fonts/bricolage-grotesque-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Marker'; src: url('../fonts/permanent-marker-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; } /* Permanent Marker, Apache 2.0 : noms de la vitrine */
@font-face { font-family: 'Figtree'; src: url('../fonts/figtree-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('../fonts/figtree-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('../fonts/figtree-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('../fonts/figtree-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('../fonts/figtree-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; }

:root {
  --brand: #FFC72C;
  --on-brand: #1B1830;
  --ink: #1B1830;
  --ink-2: #3A3654;
  --muted: #6B6880;
  --bg: #F1F1F6;
  --surface: #FFFFFF;
  --surface-2: #F7F7FA;
  --line: #E1E0EA;
  --focus: #4E5BF2;
  --danger: #D93A26;
  --danger-bg: #FDECEA;
  --ok: #0F7040; /* 4,5:1 au moins sur fond clair (contre-audit du 28/09) */
  --ok-bg: #E4F6EC;
  --warn: #A8550A;
  --warn-bg: #FFF1E0;
  --info: #4E5BF2;
  --info-bg: #ECEEFE;
  --st-attente: #4E5BF2;
  --st-preparation: #E8820C;
  --st-pret: #0F7040;
  --st-servi: #8D8AA0;
  --st-annule: #D93A26;
  --shadow: 0 1px 2px rgba(27, 24, 48, .06), 0 6px 20px rgba(27, 24, 48, .07);
  --shadow-lg: 0 24px 60px rgba(27, 24, 48, .22);
  --r: 14px;
  --r-sm: 9px;
  --display: 'Bricolage', 'Arial Black', system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #F1F0F7; --ink-2: #D6D4E4; --muted: #A29EB8; --bg: #121020; --surface: #1C1930; --surface-2: #24203A; --line: #332E4D;
    --danger-bg: #3A1A1A; --ok-bg: #12301F; --warn-bg: #3A2710; --info-bg: #1E2150; --focus: #8C95FF; --info: #8C95FF; --st-attente: #8C95FF;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #F1F0F7; --ink-2: #D6D4E4; --muted: #A29EB8; --bg: #121020; --surface: #1C1930; --surface-2: #24203A; --line: #332E4D;
  --danger-bg: #3A1A1A; --ok-bg: #12301F; --warn-bg: #3A2710; --info-bg: #1E2150; --focus: #8C95FF; --info: #8C95FF; --st-attente: #8C95FF;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
/* body est un conteneur de requêtes (réglage de l'affichage) : son fond ne passe plus à la page, html le porte aussi. */
html { background: var(--bg); }
/* Réglage de l'affichage (public/js/affichage.js) : body est le cadre, taille et transform posés en ligne ; hors du cadre, noir. */
html.sf-cadre { background: #000; overflow: hidden; }
html.sf-cadre body { position: fixed; left: 0; top: 0; transform-origin: 0 0; overflow: auto; }
/* À l'impression (bilan de la semaine…), pas de cadre : la page s'écoule sur plusieurs feuilles, sans rotation ni zoom. */
@media print {
  html.sf-cadre { overflow: visible; background: none; }
  html.sf-cadre body { position: static; transform: none !important; width: auto !important; height: auto !important; overflow: visible; }
}
body { container-type: size; margin: 0; font-family: var(--body); font-size: 15px; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
[hidden] { display: none !important; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.display { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
body { display: flex; flex-direction: column; }
#app { flex: 1; min-height: 0; position: relative; }
#sf-notices { flex: none; display: grid; }
#sf-notices:empty { display: none; }
.notice { display: flex; align-items: center; gap: 12px; padding: 10px 16px; font-size: 14.5px; line-height: 1.4; border-bottom: 1px solid rgba(0,0,0,.08); }
.notice > div { flex: 1; min-width: 0; }
.notice b { font-weight: 800; }
.notice .n-ic svg { width: 20px; height: 20px; display: block; }
.notice > div .icon { width: 1.1em; height: 1.1em; vertical-align: -0.2em; }
.notice-info { background: #E6EAFF; color: #22307A; }
.notice-warning { background: #FFE9C7; color: #6B3A00; }
.notice-critical { background: #D93A26; color: #fff; }
.notice .btn { color: inherit; }
.gate { height: 100%; display: grid; place-items: center; padding: 16px; background: var(--bg); overflow: auto; }
.gate-card { width: min(460px, 100%); background: var(--surface); border-radius: 24px; padding: 30px 26px; box-shadow: var(--shadow); display: grid; gap: 14px; text-align: center; justify-items: center; }
.gate-card h1 { font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -.02em; }
.gate-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.gate-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); }
.gate-ic svg { width: 30px; height: 30px; }
.gate-ic.gate-danger { background: var(--danger); color: #fff; }
.gate-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; width: 100%; }
.gate-code { font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: .12em; text-align: center; text-transform: uppercase; min-height: 60px; }
.support-banner { flex: none; display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 16px; background: #4E5BF2; color: #fff; font-weight: 700; font-size: 14px; flex-wrap: wrap; }
.support-banner span { flex: 1; }
.support-banner svg { width: 18px; height: 18px; }
.support-banner select { background: rgba(255,255,255,.15); color: #fff; border: 0; border-radius: 8px; padding: 6px 8px; font-weight: 700; }
.support-banner select option { color: #1B1830; }
.support-banner button { border: 0; background: #fff; color: #4E5BF2; font-weight: 800; border-radius: 9px; padding: 7px 12px; }
.view { height: 100%; position: relative; overflow: hidden; }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 15px; white-space: nowrap; transition: transform .08s ease, background .15s ease, border-color .15s; user-select: none; }
.btn:hover { border-color: var(--muted); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-brand { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.btn-brand:hover { border-color: transparent; filter: brightness(1.04); }
.btn-ink { background: var(--ink); color: var(--bg); border-color: transparent; }
.btn-danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-lg { min-height: 60px; font-size: 18px; padding: 0 26px; border-radius: var(--r); }
.btn-xl { min-height: 76px; font-size: 22px; padding: 0 32px; border-radius: 18px; font-weight: 700; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
.btn-icon { width: 44px; padding: 0; }
.btn-sm.btn-icon { width: 34px; min-height: 34px; }
.btn-block { width: 100%; }
.icon { width: 20px; height: 20px; display: inline-block; vertical-align: middle; flex: none; }

/* ---------- formulaires ---------- */
.field { display: grid; gap: 6px; }
.field > span, .label { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
textarea.input { min-height: 80px; resize: vertical; }
.input:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.hint { font-size: 13px; color: var(--muted); line-height: 1.4; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; margin: 0; flex: none; cursor: pointer; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { left: 21px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; align-items: start; }

/* ---------- pastilles ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-attente { color: var(--st-attente); background: var(--info-bg); }
.st-preparation { color: var(--st-preparation); background: var(--warn-bg); }
.st-pret { color: var(--st-pret); background: var(--ok-bg); }
.st-servi { color: var(--st-servi); background: var(--surface-2); }
.st-annule { color: var(--st-annule); background: var(--danger-bg); }

/* ---------- fenêtres ---------- */
.overlay { position: fixed; inset: 0; background: rgba(18, 16, 32, .55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; animation: fade .15s ease; }
.modal { background: var(--surface); color: var(--ink); border-radius: 20px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: calc(100% - 16px); display: flex; flex-direction: column; overflow: hidden; animation: pop .18s cubic-bezier(.2, .9, .3, 1.2); }
.modal-wide { width: min(900px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 10px; }
.modal-head h2 { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.01em; }
.modal-body { padding: 8px 20px 18px; overflow: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.94) translateY(8px); opacity: 0; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }

.toasts { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 80; pointer-events: none; width: min(520px, calc(100% - 32px)); }
.toast { background: var(--ink); color: var(--bg); padding: 13px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; animation: rise .2s ease; display: flex; gap: 10px; align-items: center; }
.toast.error { background: var(--danger); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }

.receipt-wrap { background: #E9E7E1; padding: 16px; border-radius: 12px; display: flex; justify-content: center; overflow: auto; }
.receipt-wrap .receipt-paper { box-shadow: 0 2px 10px rgba(0,0,0,.12); }

.banner-offline { position: fixed; top: 0; left: 0; right: 0; z-index: 90; background: var(--danger); color: #fff; text-align: center; padding: 8px 12px; font-weight: 700; font-size: 14px; }

/* ---------- pavé numérique & code ---------- */
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pad button { min-height: 58px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pad button:active { background: var(--surface-2); transform: scale(.97); }
.pin-screen { height: 100%; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.pin-card { width: min(360px, 100%); background: var(--surface); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); display: grid; gap: 18px; text-align: center; }
.pin-card h1 { font-family: var(--display); font-weight: 800; font-size: 26px; }
.pin-dots { display: flex; justify-content: center; gap: 12px; height: 18px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); }
.pin-dots i.on { background: var(--ink); border-color: var(--ink); }
.pin-err { color: var(--danger); font-weight: 600; min-height: 20px; font-size: 14px; }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---------- composeur d'article (borne & caisse) ---------- */
.composer { display: flex; flex-direction: column; height: 100%; }
.composer-scroll { overflow: auto; flex: 1; padding: 0 0 20px; }
.composer-hero { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 20px 22px 8px; align-items: center; }
.composer-hero img { width: 180px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; background: var(--surface-2); }
.composer-hero h2 { font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -.02em; }
.composer-hero p { margin: 6px 0 0; color: var(--muted); line-height: 1.45; }
.composer-allergens { font-size: 13px; color: var(--muted); margin-top: 8px; }
.composer-section { padding: 14px 22px 4px; }
.composer-section h3 { font-family: var(--display); font-weight: 800; font-size: 19px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.composer-section h3 small { font-family: var(--body); font-weight: 600; font-size: 13px; color: var(--muted); }
.composer-section.missing h3 small { color: var(--danger); }
.composer-section.missing .opt-grid { animation: shake .35s; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.opt { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 58px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); text-align: left; font-weight: 600; transition: border-color .12s, background .12s; }
.opt small { font-weight: 600; color: var(--muted); font-size: 15px; }
.opt.on { border-color: var(--ink); background: color-mix(in srgb, var(--brand) 22%, var(--surface)); }
.opt.on::after { content: ''; position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 13px no-repeat; }
.opt.remove.on { border-color: var(--danger); background: var(--danger-bg); }
.opt.remove.on::after { background-color: var(--danger); }
.opt:disabled { opacity: .4; text-decoration: line-through; }
.opt-img { flex-direction: row; align-items: center; gap: 10px; padding: 8px; }
.opt-img img { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; flex: none; }
.formula-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.formula-choice .opt { min-height: 86px; padding: 14px 16px; }
.formula-choice .opt b { font-family: var(--display); font-size: 20px; font-weight: 800; }
.composer-foot { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.qty button { width: 48px; height: 48px; border: 0; background: transparent; display: grid; place-items: center; }
.qty button:active { background: var(--surface-2); }
.qty span { min-width: 36px; text-align: center; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.composer-note { padding: 14px 22px 0; }

/* =========================================================
   LANCEUR
   ========================================================= */
.launcher { height: 100%; overflow: auto; background: var(--bg); padding: 16px; }
.launcher-inner { max-width: 1040px; margin: 0 auto; padding-block: 28px 40px; display: grid; gap: 26px; }
.launcher-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.launcher-head h1 { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 5cqw, 54px); letter-spacing: -.03em; line-height: 1; }
.launcher-head p { margin: 8px 0 0; color: var(--muted); font-size: 16px; }
.brand-mark { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark .logo { width: 56px; height: 56px; border-radius: 16px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 26px; overflow: hidden; flex: none; }
.brand-mark .logo img { width: 100%; height: 100%; object-fit: cover; }
.screens { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.screen-card { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; text-align: left; padding: 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); transition: transform .12s, border-color .12s; text-decoration: none; color: inherit; }
.screen-card:hover { transform: translateY(-2px); border-color: var(--ink); }
.screen-card .ic { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); }
.screen-card .ic svg { width: 28px; height: 28px; }
.screen-card h2 { font-family: var(--display); font-weight: 800; font-size: 21px; }
.screen-card p { margin: 4px 0 8px; color: var(--muted); line-height: 1.45; font-size: 14.5px; }
.screen-card code { font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); padding: 2px 7px; border-radius: 6px; }
.launcher-foot { color: var(--muted); font-size: 13.5px; line-height: 1.5; }

/* =========================================================
   BORNE CLIENT
   ========================================================= */
.kiosk { --k-pad: clamp(14px, 2.2cqw, 28px); color: var(--ink); background: var(--bg); display: flex; flex-direction: column; font-size: 17px; color-scheme: light; --ink: #1B1830; --ink-2: #3A3654; --muted: #6B6880; --bg: #F1F1F6; --surface: #fff; --surface-2: #F7F7FA; --line: #E1E0EA; }
.kiosk-welcome { position: absolute; inset: 0; background: var(--brand); color: var(--on-brand); display: flex; flex-direction: column; overflow: hidden; z-index: 5; }
.kiosk-welcome .collage { position: absolute; inset: 0; pointer-events: none; }
.kiosk-welcome .collage .fl { position: absolute; width: clamp(130px, 29cqw, 320px); translate: calc(var(--px, 0) * var(--d, 10px)) calc(var(--py, 0) * var(--d, 10px)); }
.kiosk-welcome .collage img { display: block; width: 100%; border-radius: 26px; box-shadow: 0 20px 50px rgba(0,0,0,.18); transform: rotate(var(--rot, 0deg)); animation: float 9s ease-in-out infinite; }
@container (min-aspect-ratio: 1/1) {
  .kiosk-welcome .collage { left: 44%; bottom: 26%; }
  .kiosk-welcome .collage .fl { width: clamp(120px, 17cqw, 250px); }
}
@keyframes float { 50% { transform: translateY(-14px) rotate(var(--rot, 0deg)); } }
.kiosk-welcome .w-top .logo { background: var(--on-brand); color: var(--brand); }
.kiosk-welcome .w-top { position: relative; padding: calc(var(--k-pad) * 1.6) var(--k-pad) 0; display: flex; justify-content: space-between; align-items: center; }
.kiosk-welcome .w-center { z-index: 1; position: relative; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: var(--k-pad); gap: 14px; }
.kiosk-welcome h1 { font-family: var(--display); font-weight: 800; font-size: clamp(56px, 11cqw, 150px); line-height: .88; letter-spacing: -.045em; max-width: 9ch; }
.kiosk-welcome .tag { font-size: clamp(18px, 2.4cqw, 28px); font-weight: 600; max-width: 26ch; line-height: 1.25; }
.kiosk-welcome .w-actions { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: var(--k-pad); padding-bottom: calc(var(--k-pad) * 1.6); }
.w-mode { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 8px; min-height: clamp(150px, 20cqh, 240px); padding: 22px; border-radius: 26px; border: 0; background: var(--on-brand); color: var(--brand); text-align: left; box-shadow: 0 16px 40px rgba(0,0,0,.18); transition: transform .1s; }
.w-mode:active { transform: scale(.97); }
.w-mode svg { width: 46px; height: 46px; margin-bottom: auto; }
.w-mode b { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 4cqw, 44px); letter-spacing: -.02em; line-height: 1; }
.w-mode span { font-size: 16px; opacity: .8; font-weight: 600; }
.w-hint { position: relative; text-align: center; font-weight: 700; padding-bottom: 12px; font-size: 18px; } /* pleine opacité, sans clignotement (contre-audit du 28/09) */
@keyframes blink { 50% { opacity: .35; } }

.kiosk-head { display: flex; align-items: center; gap: 14px; padding: 12px var(--k-pad); background: var(--surface); border-bottom: 1px solid var(--line); }
.kiosk-head .logo { width: 46px; height: 46px; border-radius: 13px; font-size: 21px; }
.kiosk-head h1 { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -.02em; }
.kiosk-head .sp { flex: 1; }
.mode-pill { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; }
.kiosk-body { flex: 1; display: grid; grid-template-columns: clamp(150px, 18cqw, 200px) minmax(0, 1fr); min-height: 0; }
.cat-rail { overflow: auto; padding: 12px 8px 110px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; background: var(--surface); border-right: 1px solid var(--line); }
.cat-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 12px; border-radius: 16px; border: 2px solid transparent; background: transparent; font-weight: 700; font-size: 14.5px; line-height: 1.15; text-align: center; min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.cat-btn img { width: 100%; max-width: 110px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--surface-2); }
.cat-btn.on { background: color-mix(in srgb, var(--brand) 25%, var(--surface)); border-color: var(--ink); }
.prod-area { overflow: auto; padding: 18px var(--k-pad) 120px; }
.prod-area h2 { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 4cqw, 40px); letter-spacing: -.02em; margin-bottom: 16px; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.prod-card { position: relative; display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); text-align: left; padding: 0; box-shadow: var(--shadow); transition: transform .1s; }
.prod-card:active { transform: scale(.97); }
.prod-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); display: block; }
.prod-card .pc-media { display: block; }
.prod-card .pc-name em { font-style: inherit; }
.prod-card .pc-body { padding: 12px 14px 14px; display: grid; gap: 4px; }
.prod-card .pc-name { font-weight: 700; font-size: 17px; line-height: 1.2; }
.prod-card .pc-price { font-family: var(--display); font-weight: 800; font-size: 21px; }
.prod-card .pc-menu { font-size: 15px; color: var(--muted); font-weight: 600; }
.prod-card .badge { position: absolute; top: 10px; left: 10px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 99px; letter-spacing: .02em; }
.prod-card.out { opacity: .55; }
.prod-card.out::after { content: 'Épuisé'; position: absolute; top: 36%; left: 50%; transform: translate(-50%, -50%) rotate(-8deg); background: var(--danger); color: #fff; font-weight: 800; padding: 6px 16px; border-radius: 8px; font-size: 18px; }
.cart-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 16px; padding: 14px var(--k-pad) calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: #fff; z-index: 3; }
.cart-bar .cb-count { width: 52px; height: 52px; border-radius: 16px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 24px; }
.cart-bar .cb-total { font-family: var(--display); font-weight: 800; font-size: 30px; }
.cart-bar .cb-label { font-size: 14px; opacity: .7; font-weight: 600; }
.cart-bar .sp { flex: 1; }
.cart-bar .btn { color: var(--on-brand); }
/* Contre-audit du 28/09 : sur la borne, les messages s'affichent en bas, près du doigt, au-dessus de la barre panier. */
body:has(.kiosk) .toasts { top: auto; bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
body:has(.kiosk) .toast { font-size: 18px; padding: 16px 22px; }
/* Cibles tactiles de la borne (contre-audit du 28/09). */
.kiosk .btn-sm { min-height: 48px; }
.cv-upsell { padding: 14px 0 4px; }
.cv-upsell h3 { font-family: var(--display); font-weight: 800; font-size: 22px; margin: 0 0 10px; }
.cv-up-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cv-up { display: grid; gap: 6px; justify-items: center; min-height: 60px; padding: 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 16px; text-align: center; }
.cv-up img { width: 100%; max-width: 110px; aspect-ratio: 1; object-fit: contain; }
.kiosk .mode-pill { height: 52px; }
.kiosk .sheet-close { min-width: 60px; min-height: 60px; }
.pos-line-actions .btn-sm { min-height: 44px; min-width: 44px; }
.sheet-overlay { position: absolute; inset: 0; background: rgba(18, 16, 32, .5); z-index: 10; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { background: var(--surface); width: min(920px, 100%); height: min(92%, 1400px); border-radius: 28px 28px 0 0; overflow: hidden; animation: rise .22s ease; display: flex; flex-direction: column; }
.sheet-close { position: absolute; top: 14px; right: 14px; z-index: 2; }
.kiosk .composer-hero { grid-template-columns: minmax(160px, 38%) 1fr; }
.kiosk .composer-hero img { width: 100%; }
.kiosk .composer-hero h2 { font-size: clamp(28px, 4cqw, 40px); }
.kiosk .opt { min-height: 64px; font-size: 17px; }
.cart-view { position: absolute; inset: 0; background: var(--bg); z-index: 6; display: flex; flex-direction: column; animation: rise .2s ease; }
.cart-view .cv-list { flex: 1; overflow: auto; padding: 16px var(--k-pad); display: grid; gap: 12px; align-content: start; }
.cv-line { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; align-items: center; padding: 12px; background: var(--surface); border-radius: 18px; border: 1px solid var(--line); }
.cv-line img { width: 96px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.cv-line .cv-name { font-weight: 800; font-size: 19px; }
.cv-line .cv-det { color: var(--muted); font-size: 14.5px; line-height: 1.4; margin-top: 3px; }
.cv-line .cv-right { display: grid; justify-items: end; gap: 8px; }
.cv-line .cv-price { font-family: var(--display); font-weight: 800; font-size: 20px; }
.cv-foot { padding: 16px var(--k-pad) calc(18px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); display: grid; gap: 14px; }
.cv-total { display: flex; justify-content: space-between; align-items: baseline; }
.cv-total b { font-family: var(--display); font-weight: 800; font-size: 40px; }
.cv-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
.kiosk-done { position: absolute; inset: 0; z-index: 8; background: var(--ink); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 24px; animation: fade .2s; }
.kiosk-done .kd-label { font-size: clamp(20px, 3cqw, 30px); font-weight: 700; opacity: .8; }
.kiosk-done .kd-num { font-family: var(--display); font-weight: 800; font-size: clamp(150px, 30cqw, 340px); line-height: .85; color: var(--brand); letter-spacing: -.05em; animation: pop .4s cubic-bezier(.2, .9, .3, 1.3); }
.kiosk-done .kd-msg { font-size: clamp(20px, 2.8cqw, 30px); max-width: 24ch; line-height: 1.3; font-weight: 600; }
.kiosk-done .kd-wait { font-size: clamp(20px, 2.8cqw, 30px); font-weight: 700; }
.kiosk-done .kd-qr { display: grid; justify-items: center; gap: 8px; position: relative; z-index: 1; } /* au-dessus des confettis : le QR reste lisible */
.kiosk-done .kd-qr-img { background: #fff; padding: 10px; border-radius: 12px; line-height: 0; }
.kiosk-done .kd-qr-img svg { width: 180px; height: 180px; display: block; }
.kiosk-done .kd-qr-cap { font-size: clamp(16px, 2cqw, 22px); font-weight: 600; opacity: .85; max-width: 24ch; }
.kiosk-done .kd-total { font-family: var(--display); font-weight: 800; font-size: 34px; }
/* Établissement sans caisse : « À régler au comptoir » et le total bien visibles */
.kiosk-done .kd-pay { font-family: var(--display); font-weight: 800; font-size: clamp(32px, 5cqw, 56px); line-height: 1.1; background: #fff; color: var(--ink); border-radius: 18px; padding: 10px 28px; }
.kiosk-done.kd-comptoir .kd-total { font-size: clamp(40px, 6cqw, 64px); }
.kiosk-idle { position: absolute; inset: 0; background: rgba(18,16,32,.7); z-index: 20; display: grid; place-items: center; padding: 20px; }
.kiosk-idle .box { background: #fff; color: var(--ink); border-radius: 28px; padding: 34px; text-align: center; display: grid; gap: 18px; width: min(520px, 100%); }
.kiosk-idle h2 { font-family: var(--display); font-weight: 800; font-size: 34px; }
.kiosk-idle .count { font-family: var(--display); font-weight: 800; font-size: 80px; line-height: 1; }
.kiosk-offline { position: absolute; inset: 0; z-index: 30; background: var(--ink); color: #fff; display: grid; place-items: center; text-align: center; padding: 24px; }
.kiosk-closed { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; text-align: center; padding: 24px; color: #fff;
  background: radial-gradient(80% 50% at 50% 0%, color-mix(in srgb, var(--brand) 45%, transparent), transparent 70%), linear-gradient(180deg, #1B1640 0%, #0D0B26 100%); }
.kiosk-closed .kc-card { width: min(620px, 100%); display: grid; justify-items: center; gap: 14px; }
.kiosk-closed .brand-mark { display: flex; justify-content: center; }
.kiosk-closed .brand-mark .logo { width: 110px; height: 110px; font-size: 44px; border-radius: 28px; }
.kiosk-closed .kc-moon { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%; color: #FFE08A; background: rgba(255, 224, 138, .12); box-shadow: 0 0 40px rgba(255, 224, 138, .25); }
.kiosk-closed .kc-moon svg { width: 44px; height: 44px; }
.kiosk-closed h2 { font-family: var(--display); font-size: clamp(34px, 6cqw, 56px); font-weight: 800; line-height: 1.1; }
.kiosk-closed .kc-next { font-size: clamp(20px, 3cqw, 30px); }
.kiosk-closed .kc-next b { color: #FFE08A; }
.kiosk-closed .kc-week { list-style: none; margin: 10px 0 0; padding: 14px 18px; width: 100%; display: grid; gap: 2px; border-radius: 20px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); font-size: clamp(16px, 2.2cqw, 20px); }
.kiosk-closed .kc-week li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 10px; border-radius: 10px; }
.kiosk-closed .kc-week li span:last-child { font-variant-numeric: tabular-nums; opacity: .9; }
.kiosk-closed .kc-week li.today { background: rgba(255, 255, 255, .12); font-weight: 800; }
.kiosk-closed .kc-bye { margin-top: 8px; font-size: clamp(18px, 2.4cqw, 22px); font-weight: 700; }
.kiosk-closed .kc-contact { opacity: .75; font-size: 16px; }
.kiosk-offline h2 { font-family: var(--display); font-size: 38px; font-weight: 800; }
.secret-corner { position: absolute; top: 0; left: 0; width: 70px; height: 70px; z-index: 40; }
@container (max-width: 640px) {
  .kiosk-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .cat-rail { padding-bottom: 12px; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 104px; border-right: 0; border-bottom: 1px solid var(--line); }
  .kiosk-head { gap: 8px; }
  .kiosk-head h1 { display: none; }
  .kiosk-head .btn-lg { min-height: 44px; padding: 0 12px; font-size: 15px; }
  .mode-pill { height: 52px; padding: 0 12px; font-size: 14px; }
  .cv-line { grid-template-columns: 64px 1fr; }
  .cv-line img { width: 64px; }
  .cv-line .cv-right { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; align-items: center; }
  .cv-actions { grid-template-columns: 1fr; }
  .kiosk .composer-hero { grid-template-columns: 1fr; }
  .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kiosk-welcome .w-actions { grid-template-columns: 1fr; }
}


/* ---------- animations de la borne (désactivables dans les paramètres) ---------- */
.fx .kiosk-welcome h1 .ch { display: inline-block; animation: chUp .75s cubic-bezier(.2, .9, .3, 1.25) backwards; animation-delay: calc(var(--i) * 45ms + 120ms); }
.kiosk-welcome h1 .wd { display: inline-block; white-space: nowrap; }
.sheet-overlay.out { pointer-events: none; }
@keyframes chUp { from { transform: translateY(.7em) rotate(10deg); opacity: 0; } }
.fx .kiosk-welcome .tag { animation: riseIn .6s ease backwards .55s; }
.fx .kiosk-welcome .w-hint { animation: riseIn .6s ease backwards .75s; }
.fx .kiosk-welcome .w-mode { animation: riseIn .6s cubic-bezier(.2, .9, .3, 1.15) backwards; animation-delay: calc(var(--i, 0) * 110ms + .6s); }
.fx .kiosk-welcome .w-top .logo { animation: popIn .5s cubic-bezier(.2, .9, .3, 1.4) backwards .1s; }
.fx .kiosk-welcome .collage .fl { animation: flIn .8s cubic-bezier(.2, .9, .3, 1.3) backwards; animation-delay: calc(var(--i) * 90ms + 200ms); transition: translate 1.1s cubic-bezier(.2, .8, .2, 1); }
@keyframes flIn { from { scale: .4; opacity: 0; } }
@keyframes riseIn { from { transform: translateY(26px); opacity: 0; } }
@keyframes popIn { from { transform: scale(.3); opacity: 0; } }
.fx .w-mode { transition: transform .15s ease; }
.fx-reveal { position: absolute; inset: 0; z-index: 50; pointer-events: none; display: grid; place-items: center; color: var(--brand); }
.fx-reveal .rv-in { display: grid; justify-items: center; gap: 10px; animation: rvText .5s ease both .12s; }
.fx-reveal .rv-in svg { width: 64px; height: 64px; }
.fx-reveal .rv-in b { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 7cqw, 80px); letter-spacing: -.03em; }
@keyframes rvText { from { transform: scale(.8); opacity: 0; } }

.cat-rail { position: relative; }
.rail-ind { display: none; }
.fx .rail-ind { display: block; position: absolute; top: 0; left: 0; border-radius: 16px; border: 2px solid var(--ink); background: color-mix(in srgb, var(--brand) 25%, var(--surface)); transition: transform .45s cubic-bezier(.3, 1.3, .5, 1), width .45s cubic-bezier(.3, 1.3, .5, 1), height .45s cubic-bezier(.3, 1.3, .5, 1); z-index: 0; pointer-events: none; }
.fx .cat-btn { position: relative; z-index: 1; transition: transform .15s; }
.fx .cat-btn:active { transform: scale(.95); }
.fx .cat-btn.on { background: transparent; border-color: transparent; }
.fx .cat-btn.on img { animation: wiggle .5s ease; }
@keyframes wiggle { 30% { transform: rotate(-6deg) scale(1.08); } 60% { transform: rotate(4deg) scale(1.04); } }
.fx .prod-area h2 { animation: riseIn .45s ease backwards; }
.fx .prod-card { animation: cardIn .5s cubic-bezier(.2, .85, .25, 1.15) backwards; animation-delay: calc(var(--i, 0) * 55ms + 60ms); transition: transform .18s ease, box-shadow .18s ease; will-change: transform; }
.fx .still .prod-card, .fx .still h2, .fx .still .badge { animation: none; }
@keyframes cardIn { from { transform: translateY(34px) scale(.94); opacity: 0; } }
.fx .prod-card:active { transform: none; }
.fx .prod-card.press { transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(.96); box-shadow: 0 2px 6px rgba(27, 24, 48, .12); }
.fx .prod-card::before { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .6) 50%, transparent 65%); transform: translateX(-130%); }
.fx .prod-card.shine::before { animation: shine .7s ease; }
@keyframes shine { to { transform: translateX(130%); } }
.fx .prod-card .badge { animation: badgeIn .5s cubic-bezier(.2, .9, .3, 1.6) backwards; animation-delay: calc(var(--i, 0) * 55ms + 380ms); }
@keyframes badgeIn { from { transform: scale(0) rotate(-20deg); } }

.fx .cart-bar.enter { animation: barUp .45s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes barUp { from { transform: translateY(110%); } }
.fx .cart-bar .cb-count.bump { animation: bump .5s cubic-bezier(.2, .9, .3, 1.8); }
@keyframes bump { 35% { transform: scale(1.45) rotate(-8deg); } 70% { transform: scale(.92); } }
.fly { position: fixed; z-index: 70; pointer-events: none; left: 0; top: 0; will-change: transform; }
.fly img { display: block; border-radius: 18px; box-shadow: 0 16px 40px rgba(0, 0, 0, .3); will-change: transform; }

.fx .sheet-overlay { animation: fade .25s ease; }
.fx .sheet { animation: sheetUp .55s cubic-bezier(.2, .95, .25, 1.08); }
@keyframes sheetUp { from { transform: translateY(100%); } }
.fx .sheet-overlay.out { animation: fadeOut .28s ease forwards; }
.fx .sheet-overlay.out .sheet { animation: sheetDown .28s cubic-bezier(.5, 0, .75, 0) forwards; }
@keyframes sheetDown { to { transform: translateY(100%); } }
@keyframes fadeOut { to { opacity: 0; } }
.fx .composer:not(.settled) .composer-hero img { animation: heroZoom .7s cubic-bezier(.2, .9, .3, 1.2) backwards .12s; }
.fx .composer:not(.settled) .composer-hero h2, .fx .composer:not(.settled) .composer-hero p { animation: riseIn .5s ease backwards .22s; }
.fx .composer:not(.settled) .composer-section { animation: riseIn .5s ease backwards; animation-delay: .3s; }
@keyframes heroZoom { from { transform: scale(.75) rotate(-6deg); opacity: 0; } }
.fx .opt { transition: transform .12s ease, border-color .15s, background .15s; }
.fx .opt:active { transform: scale(.95); }
.fx .opt.just { animation: optBump .35s cubic-bezier(.2, .9, .3, 1.5); }
.fx .opt.just.on::after { animation: checkPop .4s cubic-bezier(.2, .9, .3, 1.8); }
@keyframes optBump { 40% { transform: scale(1.05); } }
@keyframes checkPop { from { transform: scale(0) rotate(-45deg); } }
.fx .composer-section.unfold { animation: unfold .5s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 110ms); }
@keyframes unfold { from { clip-path: inset(0 0 100% 0); transform: translateY(-14px); opacity: 0; } to { clip-path: inset(0 0 0 0); } }
.fx .composer-foot .qty span.just { animation: bump .35s ease; display: inline-block; }

.fx .cart-view { animation: cartIn .4s cubic-bezier(.2, .9, .3, 1.05); }
@keyframes cartIn { from { transform: translateX(8%); opacity: 0; } }
.fx .cv-list.enter .cv-line { animation: lineIn .45s cubic-bezier(.2, .85, .25, 1.1) backwards; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
@keyframes lineIn { from { transform: translateX(40px); opacity: 0; } }
.cv-line { overflow: hidden; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.fx .kiosk-done { animation: none; }
.kiosk-done canvas.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.kd-check { width: clamp(70px, 9cqw, 110px); height: clamp(70px, 9cqw, 110px); }
.kd-check circle { fill: none; stroke: var(--brand); stroke-width: 5; stroke-dasharray: 290; stroke-dashoffset: 0; }
.kd-check path { fill: none; stroke: var(--brand); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 0; }
.fx .kd-check circle { animation: draw .6s ease backwards .15s; stroke-dashoffset: 0; }
.fx .kd-check path { animation: drawCheck .45s ease backwards .6s; }
@keyframes draw { from { stroke-dashoffset: 290; } }
@keyframes drawCheck { from { stroke-dashoffset: 80; } }
.fx .kiosk-done .kd-label { animation: riseIn .5s ease backwards .5s; }
.fx .kiosk-done .kd-num { animation: numIn .5s cubic-bezier(.2, .9, .3, 1.35); }
@keyframes numIn { from { transform: scale(.2) rotate(-12deg); opacity: 0; } 60% { opacity: 1; } }
.fx .kiosk-done .kd-msg, .fx .kiosk-done .kd-total, .fx .kiosk-done .kd-pay { animation: riseIn .5s ease backwards 1.1s; }
.fx .kiosk-done [data-new] { animation: riseIn .5s ease backwards 1.3s; }
.kd-ring { width: 34px; height: 34px; margin-left: 6px; transform: rotate(-90deg); }
.kd-ring circle { fill: none; stroke-width: 4; }
.kd-ring .bg { stroke: color-mix(in srgb, var(--on-brand) 20%, transparent); }
.kd-ring .fg { stroke: var(--on-brand); stroke-dasharray: 88; stroke-linecap: round; }

.attract { position: absolute; inset: 0; z-index: 20; background: var(--brand); color: var(--on-brand); overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; cursor: pointer; animation: fade .6s ease; }
.attract .at-top { display: flex; align-items: center; gap: 14px; padding: calc(var(--k-pad) * 1.4) var(--k-pad) 0; position: relative; z-index: 2; }
.attract .at-top .logo { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; overflow: hidden; font-family: var(--display); font-weight: 800; font-size: 24px; background: var(--on-brand); color: var(--brand); }
.attract .at-top .logo img { width: 100%; height: 100%; object-fit: cover; }
.attract .at-top b { font-family: var(--display); font-weight: 800; font-size: 26px; }
.attract .at-stage { position: relative; }
.attract .slide { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr auto; align-items: center; padding: 0 var(--k-pad); }
.attract .slide.in .at-img { animation: atImg 7s cubic-bezier(.2, .8, .2, 1) both; }
.attract .slide.in .at-txt > * { animation: riseIn .7s cubic-bezier(.2, .9, .3, 1.2) backwards; }
.attract .slide.in .at-txt > *:nth-child(2) { animation-delay: .12s; }
.attract .slide.in .at-txt > *:nth-child(3) { animation-delay: .24s; }
.attract .slide.out { animation: slideOut .6s ease forwards; }
@keyframes slideOut { to { opacity: 0; transform: translateX(-8%); } }
@keyframes atImg { from { transform: scale(.7) rotate(-8deg); opacity: 0; } 12% { opacity: 1; } to { transform: scale(1.06) rotate(2deg); } }
.attract .at-img { justify-self: center; width: min(78%, 62cqh); aspect-ratio: 4 / 3; object-fit: cover; border-radius: 40px; box-shadow: 0 40px 80px rgba(0, 0, 0, .25); }
.attract .at-txt { display: grid; gap: 10px; padding-bottom: 18px; }
.attract .at-badge { justify-self: start; background: var(--on-brand); color: var(--brand); font-weight: 800; padding: 8px 18px; border-radius: 99px; font-size: clamp(16px, 2cqw, 22px); }
.attract .at-name { font-family: var(--display); font-weight: 800; font-size: clamp(48px, 9cqw, 120px); line-height: .9; letter-spacing: -.04em; }
.attract .at-price { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 4cqw, 48px); }
.attract .at-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 0 var(--k-pad) calc(var(--k-pad) * 1.4); position: relative; z-index: 2; }
.attract .at-cta { background: var(--on-brand); color: var(--brand); border-radius: 22px; padding: 22px 30px; font-family: var(--display); font-weight: 800; font-size: clamp(22px, 3cqw, 34px); animation: ctaPulse 1.8s ease-in-out infinite; }
@keyframes ctaPulse { 50% { transform: scale(1.05); } }
.attract .dots { display: flex; gap: 8px; }
.attract .dots i { width: 10px; height: 10px; border-radius: 99px; background: currentColor; opacity: .3; transition: width .3s, opacity .3s; }
.attract .dots i.on { width: 30px; opacity: 1; }
.attract .burst { position: absolute; width: 140cqmax; height: 140cqmax; left: 50%; top: 45%; translate: -50% -50%; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--on-brand) 7%, transparent) 0 10deg, transparent 10deg 20deg); animation: rot 60s linear infinite; pointer-events: none; }
@keyframes rot { to { transform: rotate(360deg); } }
@container (min-aspect-ratio: 1/1) {
  .attract .slide { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .attract .at-img { width: min(92%, 70cqh); order: 2; }
}

/* =========================================================
   CAISSE
   ========================================================= */
.pos { display: grid; grid-template-rows: auto 1fr; background: var(--bg); }
.topbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line); min-height: 60px; flex-wrap: wrap; }
.topbar .brand-mark .logo { width: 40px; height: 40px; border-radius: 11px; font-size: 18px; }
.topbar .title { font-family: var(--display); font-weight: 800; font-size: 19px; }
.topbar .sp { flex: 1; }
.topbar .clock { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); padding: 0 6px; }
.conn { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); display: inline-block; }
.conn.off { background: var(--danger); animation: blink 1s infinite; }
.btn .count { min-width: 22px; height: 22px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 12.5px; display: inline-grid; place-items: center; padding: 0 6px; font-weight: 800; }
.pos-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 28%); min-height: 0; }
/* Catégories en bande verticale défilante à gauche des articles (demande d'Adil du 19/10/2026) */
.pos-left { display: grid; grid-template-columns: clamp(140px, 15cqw, 184px) minmax(0, 1fr); min-height: 0; }
.pos-cats { display: flex; flex-direction: column; gap: 8px; padding: 10px 8px 14px 12px; overflow-x: hidden; overflow-y: auto; min-height: 0; border-right: 1px solid var(--line); overscroll-behavior: contain; }
.pos-cat { flex: none; width: 100%; min-height: 52px; padding: 8px 12px; text-align: left; line-height: 1.2; font-size: 14.5px; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; border-radius: 12px; border: 2px solid transparent; background: var(--surface); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow); }
.pos-cat i { flex: none; width: 12px; height: 12px; border-radius: 4px; background: var(--c, var(--brand)); }
.pos-cat.on { border-color: var(--ink); }
.pos-grid { min-height: 0; overflow: auto; padding: 10px 12px 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); grid-auto-rows: 104px; gap: 10px; align-content: start; }
.pos-tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 11px 12px 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; overflow: hidden; box-shadow: var(--shadow); transition: transform .06s; }
.pos-tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c, var(--brand)); }
.pos-tile:active { transform: scale(.96); }
.pos-tile .t-name { font-weight: 700; font-size: 15px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pos-tile .t-price { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; display: flex; justify-content: space-between; align-items: flex-end; gap: 6px; }
.pos-tile .t-price > span:first-child { white-space: nowrap; }
.pos-tile .t-flags { font-size: 10.5px; font-weight: 800; color: var(--muted); letter-spacing: .04em; text-align: right; line-height: 1.2; }
.pos-tile.out { opacity: .45; }
.pos-tile.out .t-price::after { content: 'RUPTURE'; font-size: 11px; color: var(--danger); font-weight: 800; }
.pos-right { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-left: 1px solid var(--line); }
.pos-modes { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 10px; border-bottom: 1px solid var(--line); }
.seg { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; }
.seg.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pos-ctx { padding: 8px 12px; background: var(--info-bg); color: var(--info); font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pos-lines { flex: 1; overflow: auto; }
.pos-line { display: grid; grid-template-columns: 36px 1fr auto; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: start; }
.pos-line.sel { background: color-mix(in srgb, var(--brand) 18%, var(--surface)); }
.pos-line .q { font-weight: 800; font-variant-numeric: tabular-nums; }
.pos-line .n { font-weight: 700; }
.pos-line .d { font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.pos-line .p { font-weight: 800; font-variant-numeric: tabular-nums; }
.pos-line-actions { display: flex; gap: 6px; padding: 6px 12px 10px; background: color-mix(in srgb, var(--brand) 18%, var(--surface)); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pos-empty { height: 100%; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 24px; line-height: 1.5; }
.pos-total { padding: 12px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.pos-total .tt { display: flex; justify-content: space-between; align-items: baseline; }
.pos-total .tt b { font-family: var(--display); font-weight: 800; font-size: 36px; font-variant-numeric: tabular-nums; }
.pos-total .row { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pay-summary { display: grid; gap: 10px; align-content: start; }
.pay-big { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.pay-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.pay-row.change { background: var(--ok-bg); color: var(--ok); font-size: 20px; font-weight: 800; }
.pay-row.rest { background: var(--warn-bg); color: var(--warn); font-size: 18px; font-weight: 800; }
.pay-input { font-family: var(--display); font-weight: 800; font-size: 34px; text-align: right; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); min-height: 62px; font-variant-numeric: tabular-nums; }
.pay-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.pay-methods .btn { min-height: 64px; flex-direction: column; gap: 3px; font-size: 14px; }
.success-num { font-family: var(--display); font-weight: 800; font-size: 96px; line-height: .9; text-align: center; }
.list-table { width: 100%; border-collapse: collapse; }
.list-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); font-weight: 700; }
.list-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list-table tr.click { cursor: pointer; }
.list-table tr.click:hover td { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }
.order-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; background: var(--surface); }
.order-card .oc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-card .oc-num { font-family: var(--display); font-weight: 800; font-size: 28px; }
.order-card .oc-lines { font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.order-card .oc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@container (max-width: 860px) {
  .pos-main { grid-template-columns: 1fr; grid-template-rows: 1fr minmax(300px, 45%); }
  /* Petit écran : la bande verticale serait trop étroite, les catégories repassent en rangée défilante au-dessus */
  .pos-left { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .pos-cats { flex-direction: row; overflow-x: auto; overflow-y: hidden; border-right: 0; padding: 10px 12px 4px; }
  .pos-cat { width: auto; white-space: nowrap; hyphens: manual; -webkit-hyphens: manual; }
  .pos-right { border-left: 0; border-top: 1px solid var(--line); }
  .pay-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   CUISINE (écran sombre)
   ========================================================= */
.kds { --k-bg: #0F0E17; --k-card: #1B1928; --k-line: #2C2940; --k-ink: #F4F3FA; --k-muted: #9C98B5; background: var(--k-bg); color: var(--k-ink); display: flex; flex-direction: column; color-scheme: dark; }
.kds-head { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--k-line); flex-wrap: wrap; }
.kds-head h1 { font-family: var(--display); font-weight: 800; font-size: 22px; }
.kds-head .sp { flex: 1; }
.kds-head .clock { font-family: var(--display); font-weight: 800; font-size: 26px; font-variant-numeric: tabular-nums; }
.kds-stat { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 700; color: var(--k-muted); }
.kds-stat b { font-family: var(--display); font-size: 24px; color: var(--k-ink); }
.kds .btn { background: var(--k-card); color: var(--k-ink); border-color: var(--k-line); }
.kds-alerts .notice { font-size: 18px; padding: 12px 16px; } /* panne d'imprimante : lisible à distance en cuisine */
.kds .btn-brand { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.kds-board { flex: 1; overflow: auto; padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; align-content: start; }
.kds-card { background: var(--k-card); border-radius: 16px; border: 1px solid var(--k-line); display: flex; flex-direction: column; overflow: hidden; animation: pop .25s ease; }
.kds-card .kc-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--st-preparation); color: #1B1100; }
.kds-card.late .kc-head { background: #E5412D; color: #fff; animation: latepulse 1.6s ease-in-out infinite; }
@keyframes latepulse { 50% { filter: brightness(1.25); } }
.kds-card.ready .kc-head { background: #17A05D; color: #fff; }
.kds-card .kc-num { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1; }
.kds-card .kc-meta { display: grid; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; line-height: 1.3; }
.kds-card .kc-time { margin-left: auto; font-family: var(--display); font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; }
.kds-card .kc-body { padding: 10px 14px; display: grid; gap: 8px; flex: 1; align-content: start; }
.kds-line { display: grid; grid-template-columns: 34px 1fr; gap: 8px; cursor: pointer; padding: 4px 0; border-bottom: 1px dashed var(--k-line); }
.kds-line:last-child { border-bottom: 0; }
.kds-line .q { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.1; }
.kds-line .n { font-weight: 800; font-size: 18px; line-height: 1.2; }
.kds-line .d { font-size: 14.5px; color: var(--k-muted); line-height: 1.35; margin-top: 2px; }
.kds-line .d .rm { color: #FF8A7A; font-weight: 700; }
.kds-line .d .add { color: #7EE0A8; font-weight: 700; }
.kds-line.cold { opacity: .45; }
.kds-line.done .n, .kds-line.done .d { text-decoration: line-through; opacity: .45; }
.kds-poste-sel { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.kds-poste-sel[hidden] { display: none; }
.kds-poste-sel .input { min-height: 40px; padding: 4px 10px; }
.kds-postes { display: flex; flex-wrap: wrap; gap: 6px; }
.kds-poste { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: #2A2E3A; color: #C9CDD8; font-size: 13px; font-weight: 800; }
.kds-poste.done { background: #12301F; color: #7CE0A3; }
.kds-poste .icon { width: 13px; height: 13px; }
.kds-autres { color: #9AA0B0; font-size: 13px; font-weight: 700; }
.kds-note { background: #3A2F0B; color: #FFE08A; border-radius: 10px; padding: 8px 10px; font-weight: 700; font-size: 14px; }
.kds-card .kc-foot { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px 14px 14px; }
.kds-card .kc-foot .btn { min-height: 56px; font-size: 18px; }
.kds-unpaid { justify-self: start; background: #2B2F66; color: #C9CDFF; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
.kds-recent { border-top: 1px solid var(--k-line); padding: 10px 16px; display: flex; gap: 8px; align-items: center; overflow-x: auto; flex: none; }
.kds-recent .lbl { color: var(--k-muted); font-weight: 700; font-size: 13px; white-space: nowrap; }
.kds-empty { grid-column: 1 / -1; text-align: center; padding: 80px 20px; color: var(--k-muted); }
.kds-empty b { display: block; font-family: var(--display); font-size: 34px; color: var(--k-ink); margin-bottom: 8px; }

/* Prévisions : les règles d'en-tête ne s'appliquent qu'à la bande présente. */
.kds.has-previsions .kds-head .btn, .kds.has-previsions .kds-stat { font-size: 16px; }
.kds .prev-bande { display: flex; flex: none; align-items: center; gap: 4px; height: 44px; padding: 2px 8px; border: 1px solid var(--k-line); border-radius: 12px; background: var(--k-card); color: var(--k-ink); white-space: nowrap; }
.kds .prev-bande .p-titre { font-size: 16px; color: var(--k-muted); font-weight: 600; padding: 0 6px 0 2px; }
.kds .prev-creneau { display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: baseline; line-height: 1; padding: 0 8px; flex: none; border-left: 1px solid var(--k-line); font-variant-numeric: tabular-nums; }
.kds .prev-creneau .p-h { font-size: 16px; color: var(--k-muted); font-weight: 600; }
.kds .prev-creneau .p-v { font-family: var(--display); font-weight: 800; font-size: 22px; }
.kds .prev-creneau .p-f { grid-column: 1 / -1; font-size: 16px; color: var(--k-muted); }
.kds .prev-creneau.pointe .p-v { color: var(--brand); }
.kds .prev-source { font-size: 16px; color: var(--k-muted); white-space: nowrap; margin-left: auto; padding-left: 6px; }
@container (max-width: 1199px) {
  .kds.has-previsions .kds-head { column-gap: 8px; }
  .kds .prev-bande { order: 20; flex: 1 1 100%; justify-content: flex-start; }
}

/* Couleurs de texte propres aux prévisions ; les couleurs d'état communes restent intactes. */
.prev-page, .prev-console { --prev-ok: #0F7040; --prev-warn: #A8550A; }
:root[data-theme="dark"] .prev-page, :root[data-theme="dark"] .prev-console { --prev-ok: #4CC07F; --prev-warn: #F0A040; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .prev-page, :root:not([data-theme="light"]) .prev-console { --prev-ok: #4CC07F; --prev-warn: #F0A040; } }
.admin.has-previsions .admin-nav .nav-item { min-height: 44px; font-size: 16px; flex-shrink: 0; }
.prev-page { min-width: 0; font-size: 16px; }
.prev-page .kpi .k-label, .prev-page .kpi .k-sub, .prev-page .page-head p, .prev-page .btn { font-size: 16px; }
.prev-page [data-prev-model], .prev-page [data-prev-calcul] { display: grid; gap: 4px; }
.prev-page .k-val.texte { font-size: 22px; }
.prev-page .kpi { min-width: 0; }
.prev-page .kpis { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.prev-chart-wrap { overflow-x: auto; min-width: 0; max-width: 100%; }
.prev-page .chart .axis { font-size: 16px; }
.prev-page .pr-plage { stroke: var(--muted); stroke-width: 3; stroke-linecap: round; }
.prev-page .pr-pt { fill: var(--brand); stroke: var(--ink); stroke-width: 1.5; }
.prev-page .bar.partiel { opacity: .45; }
.legende-chart { display: flex; gap: 18px; flex-wrap: wrap; font-size: 16px; color: var(--ink-2); }
.legende-chart i { display: inline-block; vertical-align: -2px; margin-right: 6px; }
.legende-chart .l-reel { width: 14px; height: 14px; background: var(--ink); border-radius: 3px; }
.legende-chart .l-prev { width: 12px; height: 12px; background: var(--brand); border: 1.5px solid var(--ink); border-radius: 50%; }
.legende-chart .l-plage { width: 3px; height: 16px; background: var(--muted); border-radius: 2px; }
.prev-page .table-wrap { min-width: 0; }
.prev-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prev-table th { text-align: left; font-size: 16px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.prev-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
.prev-table .num { text-align: right; }
.prev-page .ecart-ok { color: var(--prev-ok); font-weight: 700; }
.prev-page .ecart-ko { color: var(--prev-warn); font-weight: 700; }
.prev-note { font-size: 16px; color: var(--ink-2); background: var(--info-bg); border-radius: 10px; padding: 10px 12px; margin: 0; }
.prev-age { color: var(--prev-warn); background: var(--warn-bg); }
.prev-etat p { margin: 0; font-size: 16px; }
.prev-etat .btn { justify-self: start; min-height: 44px; }
.prev-console { font-size: 16px; }
.prev-console p { margin: 0; font-size: 16px; line-height: 1.5; }
.prev-console .switch { min-height: 44px; font-size: 16px; padding-block: 9px; }
.prev-console .chip { height: auto; min-height: 26px; font-size: 16px; }
.prev-console-help { color: var(--muted); }
.prev-console .prev-ml-state[data-ml-state="on"] { color: var(--prev-ok); background: var(--ok-bg); }
.prev-console .prev-ml-state[data-ml-state="off"] { color: var(--muted); background: var(--surface-2); }
.prev-console [data-prev-save-error] { color: var(--st-annule); }

/* =========================================================
   ÉCRAN D'APPEL
   ========================================================= */
.callscreen { background: #0F0E17; color: #fff; display: grid; grid-template-rows: auto 1fr; color-scheme: dark; }
.cs-head { display: flex; align-items: center; gap: 16px; padding: clamp(14px, 2.4cqw, 30px) clamp(16px, 3cqw, 40px); }
.cs-head .logo { width: clamp(46px, 5cqw, 72px); height: clamp(46px, 5cqw, 72px); border-radius: 18px; font-size: clamp(22px, 2.6cqw, 34px); }
.cs-head h1 { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3.6cqw, 52px); letter-spacing: -.02em; }
.cs-head .sp { flex: 1; }
.cs-head .cs-wait { font-family: var(--display); font-weight: 700; font-size: clamp(16px, 2cqw, 28px); color: #fff; }
.cs-head .clock { font-family: var(--display); font-weight: 800; font-size: clamp(24px, 3cqw, 44px); font-variant-numeric: tabular-nums; opacity: .8; }
.cs-cols { display: grid; grid-template-columns: 1fr 1.35fr; min-height: 0; }
.cs-col { padding: 0 clamp(16px, 3cqw, 40px) 24px; display: flex; flex-direction: column; min-height: 0; }
.cs-col h2 { font-family: var(--display); font-weight: 800; font-size: clamp(22px, 3cqw, 42px); padding: 14px 0; border-bottom: 4px solid rgba(255,255,255,.14); margin-bottom: 18px; display: flex; align-items: center; gap: 14px; }
.cs-col.ready { background: var(--brand); color: var(--on-brand); border-radius: 36px 0 0 0; }
.cs-col.ready h2 { border-color: color-mix(in srgb, var(--on-brand) 25%, transparent); }
.cs-nums { display: flex; flex-wrap: wrap; gap: clamp(8px, 1.6cqw, 22px); align-content: flex-start; overflow: hidden; }
.cs-num { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1; }
.cs-col.prep .cs-num { font-size: clamp(40px, 6cqw, 92px); opacity: .55; min-width: 2.2ch; }
.cs-col.ready .cs-num { font-size: clamp(60px, 9.5cqw, 150px); min-width: 2.2ch; }
.cs-col.ready .cs-num.fresh { animation: fresh 1s ease 3; }
@keyframes fresh { 50% { transform: scale(1.12); } }
.cs-name { display: block; font-family: var(--body); font-size: .22em; font-weight: 700; letter-spacing: 0; opacity: .8; }
.cs-flash { position: absolute; inset: 0; z-index: 10; background: var(--brand); color: var(--on-brand); display: flex; flex-direction: column; align-items: center; justify-content: center; animation: fade .2s; }
.cs-flash .l { font-size: clamp(26px, 4cqw, 60px); font-weight: 800; font-family: var(--display); }
.cs-flash .n { font-family: var(--display); font-weight: 800; font-size: clamp(180px, 36cqw, 520px); line-height: .85; letter-spacing: -.05em; animation: pop .5s cubic-bezier(.2,.9,.3,1.3); }
.cs-sound { position: absolute; right: 16px; bottom: 16px; z-index: 12; }
@container (max-width: 700px) { .cs-cols { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .cs-col.ready { border-radius: 28px 28px 0 0; } }

/* =========================================================
   ADMINISTRATION
   ========================================================= */
.admin { display: grid; grid-template-columns: 236px 1fr; background: var(--bg); }
.admin-nav { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 10px; gap: 2px; overflow: auto; }
.admin-nav .brand-mark { padding: 4px 8px 16px; }
.admin-nav .brand-mark .logo { width: 42px; height: 42px; border-radius: 12px; font-size: 19px; }
.admin-nav .brand-mark b { font-family: var(--display); font-weight: 800; font-size: 18px; display: block; line-height: 1.1; }
.admin-nav .brand-mark small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.nav-item { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 12px; border-radius: 10px; border: 0; background: transparent; font-weight: 600; text-align: left; color: var(--ink-2); }
.nav-item:hover { background: var(--surface-2); }
.nav-item.on { background: var(--ink); color: var(--bg); }
.nav-item svg { width: 19px; height: 19px; }
.admin-nav .sp { flex: 1; min-height: 12px; }
.admin-main { overflow: auto; min-width: 0; }
.admin-page { max-width: 1180px; margin: 0 auto; padding: 24px clamp(16px, 3cqw, 32px) 60px; display: grid; gap: 20px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--display); font-weight: 800; font-size: 32px; letter-spacing: -.02em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 14px; min-width: 0; }
.panel h2 { font-family: var(--display); font-weight: 800; font-size: 19px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: grid; gap: 4px; }
.kpi .k-label { font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.kpi .k-val { font-family: var(--display); font-weight: 800; font-size: 32px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi .k-sub { font-size: 13px; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--body); }
.chart .gridl { stroke: var(--line); stroke-width: 1; }
.chart .bar { fill: var(--ink); }
.chart .bar.hl { fill: var(--brand); stroke: var(--ink); stroke-width: 1.5; }
.chart .val { fill: var(--ink); font-size: 11px; font-weight: 700; font-family: var(--body); }
.hbar { display: grid; grid-template-columns: minmax(90px, 1.2fr) 2fr auto; gap: 10px; align-items: center; font-size: 14px; padding: 5px 0; }
.hbar .track { height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.hbar .track, .hbar .fill { display: block; }
.hbar .fill { height: 100%; background: var(--ink); border-radius: 6px; }
.hbar b { font-variant-numeric: tabular-nums; }
.seg-group { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); flex-wrap: wrap; }
.seg-group button { border: 0; background: transparent; padding: 0 14px; min-height: 38px; font-weight: 600; font-size: 14px; }
.seg-group button.on { background: var(--ink); color: var(--bg); }
.cat-list { display: grid; gap: 6px; }
.cat-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; }
.cat-row.on { border-color: var(--ink); background: var(--surface-2); }
.cat-row > span:nth-of-type(1) { min-width: 0; overflow-wrap: anywhere; }
.cat-row i { width: 14px; height: 14px; border-radius: 4px; background: var(--c); }
.cat-row .cnt { font-size: 12.5px; color: var(--muted); }
.catalog-layout { display: grid; grid-template-columns: 250px 1fr; gap: 16px; align-items: start; }
.admin-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.admin-prod { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; min-width: 0; }
.admin-prod img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface-2); display: block; cursor: pointer; }
.admin-prod .ap-body { padding: 10px 12px 12px; display: grid; gap: 8px; }
.admin-prod .ap-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.admin-prod .ap-name { font-weight: 700; line-height: 1.2; min-width: 0; }
.admin-prod .ap-row { display: flex; justify-content: space-between; align-items: center; gap: 4px; flex-wrap: wrap; }
.admin-prod .ap-price { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-prod .ap-flags { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-prod.inactive { opacity: .55; }
.photo-drop { display: grid; grid-template-columns: 180px 1fr; gap: 14px; align-items: center; }
.photo-drop .ph { width: 180px; aspect-ratio: 4 / 3; border-radius: 12px; background: var(--surface-2) center / cover no-repeat; border: 2px dashed var(--line); display: grid; place-items: center; color: var(--muted); font-size: 13px; text-align: center; padding: 8px; }
.photo-drop.drag .ph { border-color: var(--focus); }
.group-link { display: grid; grid-template-columns: auto 1fr 70px 70px; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.group-link .input { min-height: 36px; padding: 6px 8px; }
.rows-editor { display: grid; gap: 8px; }
.row-edit { display: grid; grid-template-columns: 1fr 110px auto auto; gap: 8px; align-items: center; }
.step-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; }
.choice-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.choice-pick label { display: grid; grid-template-columns: auto 1fr 84px; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.choice-pick .input { min-height: 32px; padding: 4px 6px; }
.status-line { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.status-line.ok { background: var(--ok-bg); color: var(--ok); }
.status-line.bad { background: var(--danger-bg); color: var(--danger); }
.status-line.warn { background: var(--warn-bg); color: var(--warn); }
.status-line.info { background: var(--info-bg); color: var(--info); }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px; word-break: break-all; }
.drawer-overlay { position: fixed; inset: 0; background: rgba(18,16,32,.45); z-index: 50; display: flex; justify-content: flex-end; animation: fade .15s; }
.drawer { width: min(720px, 100%); height: 100%; background: var(--surface); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slidein .2s ease; }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }
.drawer .modal-body { flex: 1; display: grid; gap: 16px; align-content: start; padding-top: 12px; }
.fieldset { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.fieldset > .label { margin-bottom: -2px; }
.admin-mobile-bar { display: none; }
@container (max-width: 900px) {
  .admin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .admin-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .admin-nav .brand-mark, .admin-nav .sp { display: none; }
  .nav-item { flex: none; }
  .two-col, .catalog-layout { grid-template-columns: 1fr; }
  .photo-drop { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* =========================================================
   CONSOLE ÉDITEUR
   ========================================================= */
.cs .admin-nav .brand-mark .logo { background: var(--ink); color: var(--bg); }
.cs .admin-nav .brand-mark .logo svg { width: 22px; height: 22px; }
.cs-auth { text-align: left; justify-items: stretch; }
.cs-auth .gate-ic, .cs-auth h1, .cs-auth > p { justify-self: center; text-align: center; }
.cs-tabs { align-self: start; }
.cs-alert { display: grid; grid-template-columns: 12px 1fr auto; gap: 12px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.cs-alert:hover { border-color: var(--ink); }
.cs-alert small { color: var(--muted); font-size: 13px; }
.cs-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--info); }
.cs-critical .cs-dot { background: var(--danger); }
.cs-warning .cs-dot { background: var(--warn); }
.cs-log { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cs-online { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--line); vertical-align: middle; }
.cs-online.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.cs-url { cursor: pointer; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); margin-left: 4px; }
.cs-code { font-family: var(--display); font-weight: 800; font-size: 44px; letter-spacing: .1em; padding: 14px; border-radius: 14px; background: var(--surface-2); text-align: center; font-variant-numeric: tabular-nums; word-break: break-all; }
.cs-support-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.cs-support-grid .opt { align-items: center; gap: 8px; min-height: 90px; }
.cs-support-grid .opt svg { width: 26px; height: 26px; }
.cs-menu { display: grid; gap: 6px; }
.cs-menu-item { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: center; text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.cs-menu-item:hover { border-color: var(--ink); }
.cs-menu-item small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.cs-menu-item.danger { color: var(--danger); }
.cs-usage { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.cs-use { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; gap: 4px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; align-items: center; }
.cs-use-ic { grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; }
.cs-use small { color: var(--muted); margin-left: 6px; font-variant-numeric: tabular-nums; }
.cs-bar { height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; display: block; }
.cs-bar i { display: block; height: 100%; background: var(--ok); border-radius: 4px; }
.cs-bar i.full { background: var(--warn); }
.cs-msg { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 10px 12px; border-radius: 12px; }
.cs-msg-meta { font-size: 12.5px; opacity: .8; }
.cs-msg-body { font-size: 14px; margin-top: 3px; }
.cs-msg .btn { color: inherit; }
.cs-limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.cs-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.cs-plan .k-val { font-family: var(--display); font-weight: 800; font-size: 34px; }
.cs-plan .k-val small { font-size: 16px; color: var(--muted); }
.cs-plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cs-plan li { display: flex; gap: 8px; align-items: center; }
.cs-plan li svg { width: 18px; height: 18px; color: var(--muted); }
.cs-plan.off { opacity: .6; }
.cs-plan .btn { justify-self: start; }
.cs-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; max-height: 220px; overflow: auto; }

/* ---------- mascotte de la borne (réglage kiosk_mascot) ----------
 * L'équipier en bas à droite et sa bulle. Au-dessus de la barre du panier et de l'écran final, sous les fenêtres.
 * Les animations ne jouent qu'avec la classe .fx (animations de la borne actives, mouvement non réduit). */
.mascotte { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); z-index: 9; display: flex; align-items: flex-end; gap: 4px; pointer-events: none; }
.mascotte .mq-bubble, .mascotte button { pointer-events: auto; }
.mq-char { width: 124px; flex: none; }
.mq-char .mq-svg { display: block; width: 100%; height: auto; overflow: visible; }
.mq-bubble { position: relative; margin-bottom: 78px; max-width: min(360px, calc(100cqw - 180px)); display: grid; gap: 10px; padding: 14px 16px; background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 16px 34px -14px rgba(18, 16, 32, .55); font-family: var(--body); text-align: left; }
.mq-bubble::after { content: ""; position: absolute; right: -12px; bottom: 26px; width: 18px; height: 18px; background: #fff; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(-45deg); border-radius: 0 0 5px 0; }
.mq-text { margin: 0; text-wrap: pretty; font-size: var(--k-fs-m, 18px); font-weight: 700; line-height: 1.3; }
.mq-sub { margin: -4px 0 0; font-size: var(--k-fs-s, 16px); color: var(--muted); }
.mq-prod { display: flex; align-items: center; gap: 12px; min-height: var(--k-target, 60px); padding: 8px 12px 8px 8px; border: 0; border-radius: 14px; background: color-mix(in srgb, var(--brand) 22%, #fff); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.mq-prod img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; }
.mq-pn { flex: 1; min-width: 0; font-size: var(--k-fs-m, 18px); font-weight: 800; }
.mq-pp { flex: none; padding: 4px 10px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-weight: 800; }
.mq-act { min-height: 56px; font-size: var(--k-fs-m, 18px); justify-content: center; }
.mq-open { opacity: 0; }
.mq-arm-l, .mq-arm-r { transform-box: fill-box; transform-origin: 50% 8px; }
.mq-eyes { transform-box: fill-box; transform-origin: 50% 50%; }
/* Sans animation : bras posés selon l'humeur, sans mouvement */
.mq-point .mq-arm-l { transform: rotate(105deg); }
.mq-party .mq-arm-l { transform: rotate(150deg); }
.mq-party .mq-arm-r { transform: rotate(-150deg); }
@container (max-width: 720px) { .mq-char { width: 88px; } .mq-bubble { margin-bottom: 54px; max-width: calc(100cqw - 130px); padding: 10px 12px; } }

.mascotte.fx .mq-char { animation: mq-in .7s cubic-bezier(.3, 1.4, .5, 1) both; }
.mascotte.fx .mq-bubble { animation: mq-pop .38s .28s cubic-bezier(.3, 1.5, .5, 1) both; transform-origin: 100% 85%; }
.mascotte.fx .mq-svg { animation: mq-breathe 3.2s 1s ease-in-out infinite; transform-origin: 50% 100%; }
.mascotte.fx .mq-eyes { animation: mq-blink 4.2s 1.4s infinite; }
.mascotte.fx .mq-open { animation: mq-talk .26s .5s 6 steps(1, end); }
.mascotte.fx .mq-smile { animation: mq-talk-off .26s .5s 6 steps(1, end); }
.mascotte.fx.mq-hello .mq-arm-r { animation: mq-wave 1.5s .35s ease-in-out both; }
.mascotte.fx.mq-point .mq-arm-l { animation: mq-point .55s .4s cubic-bezier(.3, 1.4, .5, 1) both; }
.mascotte.fx.mq-party .mq-char { animation: mq-in .7s cubic-bezier(.3, 1.4, .5, 1) both, mq-jump .6s .8s ease-in-out 3; }
.mascotte.fx.mq-party .mq-arm-l { animation: mq-cheer-l .6s .8s ease-in-out 3 alternate both; }
.mascotte.fx.mq-party .mq-arm-r { animation: mq-cheer-r .6s .8s ease-in-out 3 alternate both; }
.mascotte.fx.out .mq-char { animation: mq-out .4s ease-in both; }
.mascotte.fx.out .mq-bubble { animation: mq-fade .25s ease-in both; }
@keyframes mq-in { 0% { transform: translateY(115%); } 60% { transform: translateY(-9%); } 80% { transform: translateY(3%); } 100% { transform: none; } }
@keyframes mq-out { to { transform: translateY(115%); } }
@keyframes mq-pop { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: none; } }
@keyframes mq-fade { to { opacity: 0; transform: scale(.9); } }
@keyframes mq-breathe { 50% { transform: scaleY(1.018); } }
@keyframes mq-blink { 0%, 94%, 100% { transform: none; } 97% { transform: scaleY(.1); } }
@keyframes mq-talk { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes mq-talk-off { 0% { opacity: 0; } 50% { opacity: 1; } }
@keyframes mq-wave { 0% { transform: none; } 22% { transform: rotate(-155deg); } 38% { transform: rotate(-125deg); } 54% { transform: rotate(-155deg); } 70% { transform: rotate(-125deg); } 86% { transform: rotate(-150deg); } 100% { transform: none; } }
@keyframes mq-point { from { transform: none; } to { transform: rotate(105deg); } }
@keyframes mq-jump { 50% { transform: translateY(-16%); } }
@keyframes mq-cheer-l { from { transform: rotate(130deg); } to { transform: rotate(165deg); } }
@keyframes mq-cheer-r { from { transform: rotate(-130deg); } to { transform: rotate(-165deg); } }
/* Logo envoyé en image (24/10/2026) : carré PNG, transparence gardée, affiché en entier, sans fond de couleur derrière */
.logo:has(img) { background: transparent !important; }
.logo img { object-fit: contain !important; }

/* ----- cuisine : dates d'ouverture des produits ----- */
.btn .count[data-opened-n] { background: #B85C00; }
.btn .count[data-opened-n].late { background: var(--danger); }
.btn .count[hidden] { display: none; }
.kds-head [data-opened].late { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 18%, transparent); animation: ouv-late 1.6s ease-in-out infinite; }
.kds-head [data-opened].late .icon { color: var(--danger); width: 22px; height: 22px; }
@keyframes ouv-late { 50% { background: color-mix(in srgb, var(--danger) 34%, transparent); } }
@media (prefers-reduced-motion: reduce) { .kds-head [data-opened].late { animation: none; } }
.ouv-modal { width: min(980px, 100%); }
.ouv { display: grid; gap: 12px; }
.ouv-add { display: grid; grid-template-columns: 1fr 150px auto; gap: 10px; }
.ouv-hint { margin: -4px 0 0; }
.ouv-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ouv-bar .sp { flex: 1; }
.ouv-bar .input { width: auto; min-height: 44px; }
.ouv-list { display: grid; gap: 8px; max-height: min(56cqh, 620px); overflow-y: auto; overscroll-behavior: contain; }
.ouv-empty { text-align: center; padding: 28px 12px; }
.ouv-row { display: grid; grid-template-columns: auto 1fr auto auto auto auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 12px; background: var(--surface); }
.ouv-row:not(:has(.ouv-check)) { grid-template-columns: 1fr auto auto auto auto; }
.ouv-row.ok { border-left-color: var(--ok); }
.ouv-row.soon { border-left-color: #E08A00; background: color-mix(in srgb, var(--warn-bg) 60%, var(--surface)); }
.ouv-row.late { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger-bg) 70%, var(--surface)); }
.ouv-row:has(.ouv-check) { cursor: pointer; }
.ouv-row.picked { outline: 3px solid var(--brand); outline-offset: -1px; }
.ouv-check { width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--ink-2); display: grid; place-items: center; }
.ouv-row.picked .ouv-check { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.ouv-name { font-weight: 800; font-size: 17px; }
.ouv-when { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.ouv-limit { display: grid; text-align: right; font-size: 14px; }
.ouv-limit .lbl { color: var(--muted); font-size: 12px; font-weight: 700; }
.chip.ouv-ok { background: var(--ok-bg); color: var(--ok); }
.chip.ouv-soon { background: var(--warn-bg); color: var(--warn); }
.chip.ouv-late { background: var(--danger); color: #fff; }
@container (max-width: 720px) {
  .ouv-add { grid-template-columns: 1fr 1fr; }
  .ouv-add .input[data-name] { grid-column: 1 / -1; }
  .ouv-row, .ouv-row:not(:has(.ouv-check)) { grid-template-columns: 1fr auto auto; }
  .ouv-limit { grid-column: 1 / 2; text-align: left; }
}
/* le bouton se réduit à son icône quand la bande des prévisions occupe la ligne, ou sur un écran étroit */
.kds.has-previsions [data-opened] .lbl { display: none; }
@container (max-width: 1100px) { .kds [data-opened] .lbl { display: none; } }
.photo-drop[hidden] { display: none; }
/* fiche article : bascule de la photo seule / en menu */
.composer-hero img.hero-swap { animation: heroSwap .45s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes heroSwap { from { opacity: 0; transform: scale(.9) rotate(-2deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .composer-hero img.hero-swap { animation: none; } }

/* ----- administration : disposition de la borne (glisser-déposer) ----- */
.dz { display: grid; gap: 12px; }
.dz-tabs { justify-self: start; }
.dz-help { margin: 0; }
.dz-kiosk { display: grid; grid-template-columns: 210px 1fr; min-height: 520px; border-radius: 22px; overflow: hidden; border: 8px solid #1B1830; background: var(--bg); box-shadow: var(--shadow); }
.dz-rail { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 12px 10px; background: var(--surface); border-right: 1px solid var(--line); }
.dz-cat { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; font-weight: 700; cursor: grab; touch-action: pan-y; user-select: none; background: var(--surface); border: 2px solid transparent; }
.dz-cat.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 18%, var(--surface)); }
.dz-cat img, .dz-cat .dz-noimg { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.dz-main { padding: 16px; display: grid; align-content: start; gap: 12px; }
.dz-main h2 { font-family: var(--display); font-size: 24px; margin: 0; }
.dz-grid { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.dz-tile { display: grid; gap: 4px; padding: 8px 8px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); cursor: grab; touch-action: pan-y; user-select: none; text-align: center; }
.dz-tile img, .dz-tile .dz-noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.dz-opt img, .dz-opt .dz-noimg { aspect-ratio: 1; border-radius: 50%; width: 70%; justify-self: center; }
.dz-noimg { display: grid; place-items: center; color: var(--muted); background: var(--surface-2); }
.dz-tile b { font-size: 14px; line-height: 1.2; }
.dz-tile small { color: var(--muted); font-weight: 600; }
.dz-tile.off, .dz-cat.off { opacity: .5; }
.dz-groups { display: flex; flex-wrap: wrap; gap: 8px; }
.dz-groups .chip { height: 36px; padding: 0 14px; border: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.dz-groups .chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.dz-opts { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
/* pendant le glissé : la place libre en pointillé, les autres frémissent comme sur un téléphone */
.dz-hole { opacity: .25; outline: 2px dashed var(--brand); outline-offset: -2px; }
.dz-ghost { position: fixed; z-index: 1000; margin: 0; pointer-events: none; box-shadow: 0 18px 40px rgba(0, 0, 0, .3); opacity: .95; }
.dz-on > [data-id]:not(.dz-hole) { animation: dzJiggle .28s ease-in-out infinite alternate; }
.dz-on > [data-id]:nth-child(2n):not(.dz-hole) { animation-delay: -.14s; }
@keyframes dzJiggle { from { rotate: -1deg; } to { rotate: 1deg; } }
@media (prefers-reduced-motion: reduce) { .dz-on > [data-id] { animation: none !important; } }
@container (max-width: 720px) { .dz-kiosk { grid-template-columns: 1fr; } .dz-rail { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); } .dz-cat { flex: none; } }
.dz-name { min-width: 0; overflow-wrap: anywhere; }
.dz-groups + .dz-grid { margin-top: 4px; }
/* aperçu fidèle de la borne (1080 px de large, réduit à la page) */
.dz-bar { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: end; }
.dz-bar .field { min-width: 170px; }
.dz-bar .dz-size { min-width: 280px; }
.dz-bar .dz-size[hidden] { display: none; }
.dz-size input[type=range] { width: 100%; accent-color: var(--brand); height: 32px; }
.dz-stage { position: relative; overflow: hidden; border-radius: 26px; border: 10px solid #1B1830; background: #1B1830; box-shadow: var(--shadow); max-width: 900px; }
.dz-screen { position: absolute; top: 0; left: 0; width: 1080px; height: 1780px; transform-origin: 0 0; display: flex; flex-direction: column; }
.dz-screen .kiosk-body { flex: 1; min-height: 0; }
.dz-screen .prod-grid { position: relative; }
.dz-screen .cat-rail { padding-bottom: 20px; }
.dz-screen .prod-card, .dz-screen .cat-btn { cursor: grab; touch-action: pan-y; user-select: none; }
.dz-screen .prod-card .chip { justify-self: start; }
.dz-off { opacity: .5; }
.dz-lift { position: relative; z-index: 20; cursor: grabbing !important; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .35)); }
.dz-lift, .dz-on > .dz-lift { animation: none !important; }

/* ----- fiche article de la borne : place et taille du bouton « Ajouter » (réglages kiosk_add_*) ----- */
.composer { --add-k: 1; }
.kiosk .composer [data-add] { min-height: calc(76px * var(--add-k)); font-size: calc(22px * var(--add-k)); border-radius: calc(18px * var(--add-k)); }
.kiosk .composer .composer-foot .qty button { width: calc(var(--k-target, 60px) * max(1, var(--add-k) * .9)); height: calc(var(--k-target, 60px) * max(1, var(--add-k) * .9)); }
.composer.cf-haut .composer-foot { order: -1; border-top: 0; border-bottom: 1px solid var(--line); padding-right: 92px; }
.composer.cf-gauche, .composer.cf-droite { flex-direction: row; }
.composer.cf-gauche .composer-foot { order: -1; border-top: 0; border-right: 1px solid var(--line); }
.composer.cf-droite .composer-foot { border-top: 0; border-left: 1px solid var(--line); }
.composer.cf-gauche .composer-foot, .composer.cf-droite .composer-foot { flex-direction: column; justify-content: flex-start; width: calc(230px * min(1.2, var(--add-k))); flex: none; padding: 92px 16px 22px; }
.composer.cf-gauche .composer-scroll, .composer.cf-droite .composer-scroll { min-width: 0; }
.composer.cf-gauche [data-add], .composer.cf-droite [data-add] { flex: none !important; width: 100%; min-height: calc(160px * var(--add-k)); flex-direction: column; white-space: normal; line-height: 1.2; padding: 12px; }
/* bouton en haut ou à gauche : la croix de fermeture passe de l'autre côté pour ne pas le gêner */
.sheet:has(.composer.cf-gauche) .sheet-close { right: 16px; }

/* ----- mascotte : place choisie (réglage kiosk_mascot_position) ----- */
.mascotte.mq-bas-gauche, .mascotte.mq-haut-gauche { right: auto; left: max(16px, env(safe-area-inset-left, 0px)); flex-direction: row-reverse; }
.mascotte.mq-haut-droite, .mascotte.mq-haut-gauche { align-items: flex-start; }
.mascotte.mq-haut-droite .mq-bubble, .mascotte.mq-haut-gauche .mq-bubble { margin-bottom: 0; margin-top: 40px; }
.mascotte.mq-haut-droite .mq-bubble::after { bottom: auto; top: 30px; }
.mascotte.mq-bas-gauche .mq-bubble::after, .mascotte.mq-haut-gauche .mq-bubble::after { right: auto; left: -12px; transform: rotate(135deg); }
.mascotte.mq-haut-gauche .mq-bubble::after { bottom: auto; top: 30px; }
.dz-split { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 560px); gap: 24px; align-items: start; }
.dz-bar-col { flex-direction: column; align-items: stretch; }
.dz-screen-tall { height: 1920px; background: var(--bg); }
.dz-screen-tall .sheet-overlay { animation: none; }
.dz-screen-tall .sheet { animation: none; }
.dz-screen-tall .mascotte { pointer-events: none; z-index: 12; }
@container (max-width: 860px) { .dz-split { grid-template-columns: 1fr; } }
/* disposition : présentation Affiche */
.dz-aff { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); max-width: 900px; }
.dz-aff-decor, .dz-aff-item { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dz-aff-item [data-pn] { font-weight: 700; min-width: 160px; }
.dz-aff-item .field { min-width: 240px; }
.dz-aff-item .field[hidden], .dz-aff-item .btn[hidden] { display: none; }
.dz-aff-item input[type=range] { width: 100%; accent-color: var(--brand); }
.dz-screen .poster-items .prod-card { cursor: grab; touch-action: none; }
.dz-screen .poster-items .prod-card.dz-pick { outline: 4px dashed #22E4FF; outline-offset: 6px; border-radius: 18px; }
/* la barre du panier de la borne, en bas de l'aperçu : ce qui passe dessous sera caché */
.dz-screen:not(.dz-screen-tall)::after { content: 'Barre du panier'; position: absolute; left: 0; right: 0; bottom: 0; height: 110px; z-index: 30; display: grid; place-items: center; background: rgba(18, 12, 58, .92); color: rgba(255, 255, 255, .6); font: 700 28px var(--display); letter-spacing: .04em; pointer-events: none; }
.sf-restart { position: fixed; z-index: 2000; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(720px, calc(100% - 32px)); box-shadow: 0 12px 40px rgba(0, 0, 0, .3); }
/* disposition : barre d'enregistrement, toujours visible en haut */
.dz-save { position: sticky; top: 0; z-index: 40; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); max-width: 900px; }
.dz-save .sp { flex: 1; }
.dz-save [data-dn] { font-weight: 700; color: var(--muted); }
.dz-save.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, var(--surface)); }
.dz-save.on [data-dn] { color: var(--ink); }

/* ----- bandeau des horaires (caisse, cuisine, écran d'appel) ----- */
.hours-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 9px 14px; font-size: 15px; border-bottom: 1px solid var(--line); }
.hours-banner[hidden] { display: none; }
.hours-banner .hb-ic .icon { width: 20px; height: 20px; }
.hours-banner .hb-txt { flex: 1; min-width: 220px; }
.hours-banner .hb-acts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hours-banner .hb-lbl { font-weight: 700; font-size: 13px; }
.hours-banner.closed { background: #2A1B3D; color: #fff; }
.hours-banner.closed .btn { background: #fff; color: #1B1830; border-color: #fff; }
.hours-banner.soon { background: var(--warn-bg); color: var(--warn); }
.hours-banner.extended { background: var(--ok-bg); color: var(--ok); }
.hours-banner.public { justify-content: center; font-size: clamp(18px, 2.4cqw, 30px); padding: 14px 20px; border: 0; }
.hours-banner.public .hb-txt { flex: none; text-align: center; }
.kds-delivery { display: flex; gap: 8px; align-items: flex-start; padding: 6px 10px; margin-bottom: 8px; border-radius: 8px; background: #2D7FF9; color: #fff; font-weight: 700; font-size: 14px; } .kds-delivery .icon { flex: none; width: 18px; height: 18px; }

/* ----- administration : matériel ----- */
.hw { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); align-items: start; }
.hw-card { display: grid; gap: 12px; }
.hw-title { display: flex; gap: 12px; align-items: flex-start; }
.hw-title h2 { margin: 0; }
.hw-title .hint { margin: 2px 0 0; }
.hw-title > div { flex: 1; }
.hw-ic { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--brand) 22%, var(--surface)); }
.hw-state { flex: none; font-size: 12.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.hw-state.ok { background: var(--ok-bg); color: var(--ok); }
.hw-state.off { background: var(--surface-2); color: var(--muted); }
.hw-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.hw .hw-off { opacity: .45; }

/* ----- écran du gérant (téléphone) ----- */
.gm { min-height: 100%; display: flex; flex-direction: column; background: var(--bg); padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
.gm-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.gm-head .logo { width: 40px; height: 40px; border-radius: 12px; font-size: 18px; }
.gm-title { flex: 1; min-width: 0; display: grid; }
.gm-title b { font-family: var(--display); font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-title small { color: var(--muted); text-transform: capitalize; }
.gm-main { flex: 1; display: grid; gap: 12px; align-content: start; padding: 12px 12px 20px; max-width: 720px; width: 100%; margin: 0 auto; }
.gm-loading { padding: 40px 0; text-align: center; color: var(--muted); }
.gm-pad { margin: 0; padding: 4px 4px; }
.gm-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.gm-tabs button { display: grid; justify-items: center; gap: 3px; padding: 9px 2px 8px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; min-height: 58px; }
.gm-tabs button .icon { width: 22px; height: 22px; }
.gm-tabs button.on { color: var(--ink); }
.gm-tabs button.on .icon { color: var(--brand); filter: drop-shadow(0 0 0 currentColor); }
.gm-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gm-kpi { display: grid; gap: 2px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.gm-kpi.big { grid-column: 1 / -1; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 30%, var(--surface)), var(--surface)); }
.gm-kpi span { color: var(--muted); font-size: 13px; font-weight: 700; }
.gm-kpi b { font-family: var(--display); font-size: 26px; line-height: 1.1; }
.gm-kpi.big b { font-size: 38px; }
.gm-kpi small { color: var(--muted); font-size: 12.5px; min-height: 1em; }
.gm-delta { font-weight: 800; }
.gm-delta.up { color: var(--ok); }
.gm-delta.down { color: var(--danger); }
.gm-card { padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 8px; }
.gm-card h2 { font-family: var(--display); font-size: 16px; margin: 0 0 2px; }
.gm-bars { display: grid; grid-template-columns: repeat(17, 1fr); gap: 3px; align-items: end; height: 120px; }
.gm-bar { height: 100%; display: grid; grid-template-rows: 1fr auto; align-items: end; justify-items: center; }
.gm-bar i { width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--brand) 70%, var(--ink)); }
.gm-bar.now i { background: var(--brand); }
.gm-bar span { font-size: 10px; color: var(--muted); height: 14px; }
.gm-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: top; }
.gm-top li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: baseline; counter-increment: top; }
.gm-top li::before { content: counter(top); font-weight: 800; color: var(--muted); width: 18px; }
.gm-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.gm-split { grid-template-columns: 1fr 1fr; gap: 16px; }
.gm-share { display: grid; gap: 3px; margin-bottom: 6px; }
.gm-share i { height: 6px; border-radius: 3px; background: var(--brand); }
.gm-alerts { display: grid; gap: 8px; }
.gm-alert { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--warn-bg); color: var(--warn); }
.gm-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.gm-chips .chip { height: 36px; padding: 0 14px; border: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.gm-chips .chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.gm-orders { display: grid; gap: 8px; }
.gm-order { border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--line); overflow: hidden; }
.gm-order.st-attente { border-left-color: var(--st-attente); }
.gm-order.st-preparation { border-left-color: var(--st-preparation); }
.gm-order.st-pret { border-left-color: var(--st-pret); }
.gm-order.st-annule { opacity: .65; }
.gm-order summary { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; list-style: none; }
.gm-order summary::-webkit-details-marker { display: none; }
.gm-num { font-family: var(--display); font-size: 24px; font-weight: 800; min-width: 44px; }
.gm-ord-mid { display: grid; min-width: 0; }
.gm-ord-mid small { color: var(--muted); }
.gm-ord-body { padding: 0 14px 12px; display: grid; gap: 4px; font-size: 14px; }
.gm-dl { display: flex; gap: 6px; align-items: flex-start; margin: 4px 0 0; color: #2D7FF9; font-weight: 700; }
.gm-search { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.gm-search .input { flex: 1; }
.gm-stock { display: grid; gap: 10px; }
.gm-toggle { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer; }
.gm-toggle small { font-weight: 700; color: var(--ok); }
.gm-toggle.out small { color: var(--danger); }
.gm-toggle input { width: 22px; height: 22px; accent-color: var(--ok); }
.gm-feed { display: grid; gap: 2px; }
.gm-feed-day { margin: 10px 4px 4px; font-size: 13px; text-transform: capitalize; color: var(--muted); }
.gm-ev { display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 10px 12px; background: var(--surface); border-radius: 12px; border: 1px solid var(--line); }
.gm-ev-t { color: var(--muted); font-size: 13px; padding-top: 2px; }
.gm-ev div { display: grid; }
.gm-ev small { color: var(--muted); }
.gm-links { gap: 0; padding: 4px 0; }
.gm-link { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.gm-link:last-child { border-bottom: 0; }
.gm-link span { display: grid; }
.gm-link small { color: var(--muted); }
@container (min-width: 760px) { .gm-kpis { grid-template-columns: repeat(3, 1fr); } }
.kds-card .kc-table { display: inline-block; margin-top: 2px; padding: 1px 6px; border-radius: 4px; background: var(--ink); color: var(--surface); font-size: 13px; letter-spacing: .06em; }
/* Payer à plusieurs : un bouton par article, à l'unité */
.pay-split { display: grid; gap: 6px; max-height: 300px; overflow: auto; }
.pay-unit { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pay-unit.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 22%, var(--surface)); font-weight: 700; }
.pay-unit:disabled { opacity: .5; cursor: default; }
.pay-rendu { color: var(--ok, #15803d); margin-left: 6px; }
/* Hygiène (cuisine) */
.hyg { display: grid; gap: 18px; }
.hyg h3 { font-size: 17px; margin-bottom: 4px; }
.hyg-temps, .hyg-tasks { display: grid; gap: 8px; margin-top: 8px; }
.hyg-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.hyg-row [data-note]:not([hidden]) { grid-column: 1 / -1; grid-row: 2; }
.hyg-row.bad { border-color: var(--danger, #dc2626); background: color-mix(in srgb, var(--danger, #dc2626) 10%, transparent); }
.hyg-tasks { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.hyg-task { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; text-align: left; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.hyg-task small { grid-column: 2; font-weight: 400; color: var(--muted); }
.hyg-box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; grid-row: span 2; }
.hyg-task.done { border-color: #15803d; cursor: default; }
.hyg-task.done .hyg-box { background: #15803d; border-color: #15803d; color: #fff; }
/* Sous 1440 px : bouton Hygiène réduit à son icône, la pastille posée dans son coin, pour que l'horloge reste sur la ligne. */
@container (max-width: 1440px) { .kds-head [data-hyg] .lbl { display: none; } .kds-head [data-hyg] { position: relative; min-width: 44px; padding: 0 12px; } .kds-head [data-hyg] .count { position: absolute; top: -6px; right: -6px; margin: 0; } }

/* Cuisine, 30/10/2026 : stock bas, tableau d'équipe, cuisson synchronisée */
.kds-stock { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 16px; background: rgba(232, 163, 61, .16); border-bottom: 1px solid rgba(232, 163, 61, .45); color: #FFD08A; font-size: 16px; }
.kds-stock .icon { width: 20px; height: 20px; }
.kds-score { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding: 8px 16px; border-bottom: 1px solid var(--k-line); color: var(--k-muted); font-size: 15px; }
.kds-score b { color: var(--k-ink); font-size: 18px; }
.kds-score .icon { width: 18px; height: 18px; vertical-align: -3px; }
.kds-score .ks-main.ok b { color: #7EE0A8; }
.kds-score .ks-main.ko b { color: #FFB86B; }
.kds-score .ks-streak .icon { color: #FF8A3D; }
.kds-sync { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.kds-sync .ksy { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--k-muted); font-size: 14px; font-weight: 700; }
.kds-sync .ksy .icon { width: 15px; height: 15px; }
.kds-sync .ksy.go { background: #E8590C; color: #fff; animation: ksy-go 1.2s ease-in-out infinite; }
@keyframes ksy-go { 50% { background: #C2410C; } }
@media (prefers-reduced-motion: reduce) { .kds-sync .ksy.go { animation: none; } }
.kds-line.done .kds-sync { display: none; }

/* Administration, 30/10/2026 : tuiles des pages Analyse et Pointage, stock bas, liste de courses, aperçu du bilan */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.list-table tr.row-warn td { background: color-mix(in srgb, var(--warn, #E8A33D) 10%, transparent); }
.txt-warn { color: #B85C00; }
.buy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.report-preview { background: #fff; color: #181830; border-radius: 12px; padding: 16px; }

/* ---------- réglage de l'affichage (public/js/affichage.js) : dans le cadre, donc aperçu immédiat ---------- */
.aff-reglage { position: fixed; inset: 0; z-index: 1000; background: #1B1830; color: #fff; outline: 4px solid var(--brand); outline-offset: -4px; font-family: var(--body); }
.aff-fleche { position: absolute; color: var(--brand); font-size: 40px; line-height: 1; pointer-events: none; }
.aff-f-haut { top: 6px; left: 50%; translate: -50% 0; }
.aff-f-bas { bottom: 6px; left: 50%; translate: -50% 0; }
.aff-f-gauche { left: 8px; top: 50%; translate: 0 -50%; }
.aff-f-droite { right: 8px; top: 50%; translate: 0 -50%; }
/* Le panneau est dans html, hors du cadre : centré sur l'écran réel, max-width/max-height et rotate posés par le script */
.aff-panneau { position: fixed; left: 50%; top: 50%; translate: -50% -50%; z-index: 1001; width: 560px; overflow: auto; display: grid; gap: 16px; padding: 22px; border-radius: 24px; background: #2A2545; color: #fff; text-align: center; font-family: var(--body); color-scheme: dark; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.aff-panneau h1 { font-family: var(--display); font-weight: 800; font-size: 32px; letter-spacing: -.02em; }
.aff-panneau p { margin: 0; color: #D6D4E4; font-size: 17px; line-height: 1.4; }
.aff-lignes { display: grid; gap: 10px; }
.aff-ligne { display: grid; grid-template-columns: 1fr 64px 110px 64px; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 16px; background: rgba(255, 255, 255, .07); }
.aff-nom { text-align: left; font-weight: 700; font-size: 19px; }
.aff-val { font-weight: 800; font-size: 21px; }
.aff-pm { width: 64px; height: 64px; border-radius: 16px; border: 0; background: #fff; color: #1B1830; font-size: 34px; font-weight: 800; line-height: 1; touch-action: manipulation; }
.aff-pm:active { transform: scale(.94); }
.aff-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.aff-actions .btn { min-height: 64px; white-space: normal; }
.aff-actions .btn:not(.btn-brand) { background: rgba(255, 255, 255, .12); color: #fff; border-color: transparent; }
.aff-actions [data-a="valider"] { grid-column: 1 / -1; }
.aff-test { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 16px; background: #0F0E17; outline: 4px dashed var(--brand); outline-offset: -4px; touch-action: none; }
.aff-test p { margin: 0; font-size: 22px; font-weight: 700; pointer-events: none; }
.aff-point { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--brand); pointer-events: none; }
