/* Stations Banana's Burg : caisse, salle, cuisine.
   Trois thèmes au choix (html[data-theme]) : comptoir (défaut), nuit, soleil.
   La cuisine reste toujours sombre (body[data-station="cuisine"]).
   Cibles tactiles ≥ 44 px partout. */

/* ---------- Thème « Comptoir » (défaut) : clair et neutre ---------- */
:root {
  --nav-h: 60px;
  --bg: #f2f3f5;
  --surface: #ffffff;
  --surface-2: #f6f7f8;
  --surface-3: #eceef1;
  --line: #e3e5e9;
  --line-2: #d3d6dc;
  --ink: #14161a;
  --ink-2: #3d424b;
  --muted: #646a76;
  --primary: #14161a;
  --on-primary: #ffffff;
  --order: #ffd43b;
  --on-order: #14161a;
  --pay: #12a150;
  --on-pay: #ffffff;
  --ok: #12a150;
  --on-ok: #ffffff;
  --danger: #d93a2b;
  --on-danger: #ffffff;
  --danger-soft: #fdecea;
  --danger-ink: #9b1c10;
  --warn: #e8890c;
  --warn-soft: #fff4e0;
  --warn-ink: #7a4100;
  --sel: #fff8d6;
  --sel-line: #f0c000;
  --focus: #2563eb;
  --bar-bg: #ffffff;
  --bar-ink: #14161a;
  --bar-muted: #646a76;
  --bar-line: #e3e5e9;
  --tabs-bg: #f0f1f3;
  --tab-ink: #555b66;
  --tab-on-bg: #ffffff;
  --tab-on-ink: #14161a;
  --search-bg: #f2f3f5;
  --logo-bg: #14161a;
  --logo-ink: #ffd43b;
  --lock-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd43b' stroke-width='2' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
  --chip-bg: #ffffff;
  --chip-ink: #14161a;
  --chip-on-bg: #14161a;
  --chip-on-ink: #ffffff;
  --price: #3d424b;
  --img-bg: #f2f3f5;
  --review-bg: #fff1d6;
  --review-ink: #7a4300;
  --badge-bg: #d9480f;
  --badge-ink: #ffffff;
  --tile-cash: #12a150;
  --tile-card: #2563eb;
  --tile-voucher: #c86a00;
  --tile-cheque: #7c3aed;
  --floor-bg: #eceef1;
  --floor-dot: rgba(20, 22, 26, .10);
  --space-free: #ffffff;
  --space-free-ink: #14161a;
  --space-free-line: #c9cdd4;
  --space-cook: #f59f00;
  --space-cook-ink: #1f1400;
  --space-dining: #1c7ed6;
  --space-dining-ink: #ffffff;
  --space-bill: #e03131;
  --space-bill-ink: #ffffff;
  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 14px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow-sm: 0 1px 2px rgba(16, 18, 22, .06);
  --shadow: 0 6px 18px rgba(16, 18, 22, .08);
  --shadow-lg: 0 24px 60px rgba(16, 18, 22, .24);
  --backdrop: rgba(16, 18, 22, .48);
  color-scheme: light;
}

/* ---------- Thème « Nuit tropicale » : sombre vert et or (vitrine) ---------- */
:root[data-theme="nuit"] {
  --bg: #07140d;
  --surface: #0e1d15;
  --surface-2: #132519;
  --surface-3: #1a3123;
  --line: rgba(246, 241, 228, .09);
  --line-2: rgba(246, 241, 228, .18);
  --ink: #f6f1e4;
  --ink-2: #dbe3d6;
  --muted: #a3b4a0;
  --primary: #e7c56a;
  --on-primary: #0b1a11;
  --order: #224430;
  --on-order: #f6f1e4;
  --pay: #3ecf6e;
  --on-pay: #04200e;
  --ok: #3ecf6e;
  --on-ok: #04200e;
  --danger: #ff7d6e;
  --on-danger: #2a0904;
  --danger-soft: rgba(255, 125, 110, .12);
  --danger-ink: #ffb4aa;
  --warn: #f2a640;
  --warn-soft: rgba(242, 166, 64, .12);
  --warn-ink: #ffd391;
  --sel: rgba(231, 197, 106, .10);
  --sel-line: #e7c56a;
  --focus: #e7c56a;
  --bar-bg: #050f09;
  --bar-ink: #f6f1e4;
  --bar-muted: #a3b4a0;
  --bar-line: rgba(231, 197, 106, .16);
  --tabs-bg: #0e1d15;
  --tab-ink: #b9c6b5;
  --tab-on-bg: #e7c56a;
  --tab-on-ink: #0b1a11;
  --search-bg: #0e1d15;
  --logo-bg: #e7c56a;
  --logo-ink: #0b1a11;
  --lock-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1a11' stroke-width='2' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
  --chip-bg: #0e1d15;
  --chip-ink: #f6f1e4;
  --chip-on-bg: #e7c56a;
  --chip-on-ink: #0b1a11;
  --price: #e7c56a;
  --img-bg: #163022;
  --review-bg: rgba(231, 197, 106, .14);
  --review-ink: #e7c56a;
  --badge-bg: #e8590c;
  --badge-ink: #ffffff;
  --tile-cash: #23854a;
  --tile-card: #2f62c9;
  --tile-voucher: #b8650f;
  --tile-cheque: #7046d6;
  --floor-bg: #0a1a11;
  --floor-dot: rgba(231, 197, 106, .12);
  --space-free: #132519;
  --space-free-ink: #f6f1e4;
  --space-free-line: rgba(246, 241, 228, .24);
  --space-cook: #f2a640;
  --space-cook-ink: #1f1400;
  --space-dining: #4c8df0;
  --space-dining-ink: #06142b;
  --space-bill: #ff6b5e;
  --space-bill-ink: #2a0904;
  --radius: 12px;
  --radius-sm: 10px;
  --radius-lg: 16px;
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow-sm: none;
  --shadow: 0 8px 22px rgba(0, 0, 0, .35);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, .55);
  --backdrop: rgba(1, 6, 3, .66);
  color-scheme: dark;
}

/* ---------- Thème « Soleil » : crème et jaune (page addition) ---------- */
:root[data-theme="soleil"] {
  --bg: #fbf6ee;
  --surface: #fffdf9;
  --surface-2: #f3eadc;
  --surface-3: #eadfcd;
  --line: #eee4d4;
  --line-2: #dccfb9;
  --ink: #1c1a17;
  --ink-2: #3b3630;
  --muted: #6a6258;
  --primary: #1c1a17;
  --on-primary: #ffffff;
  --order: #f3eadc;
  --on-order: #1c1a17;
  --pay: #ffd000;
  --on-pay: #1c1a17;
  --ok: #2f9e5b;
  --on-ok: #ffffff;
  --danger: #d6452f;
  --on-danger: #ffffff;
  --danger-soft: #fdebe6;
  --danger-ink: #8f2412;
  --warn: #e8890c;
  --warn-soft: #fff1d9;
  --warn-ink: #7a4100;
  --sel: #fff3bf;
  --sel-line: #ffd000;
  --focus: #1c1a17;
  --bar-bg: #ffd000;
  --bar-ink: #1c1a17;
  --bar-muted: #4f4200;
  --bar-line: #e9bd00;
  --tabs-bg: rgba(28, 26, 23, .08);
  --tab-ink: #3b3300;
  --tab-on-bg: #fffdf9;
  --tab-on-ink: #1c1a17;
  --search-bg: #fffdf9;
  --logo-bg: #1c1a17;
  --logo-ink: #ffd000;
  --lock-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
  --chip-bg: #f3eadc;
  --chip-ink: #1c1a17;
  --chip-on-bg: #1c1a17;
  --chip-on-ink: #ffffff;
  --price: #6a6258;
  --img-bg: #f3eadc;
  --review-bg: #fffdf9;
  --review-ink: #7a4300;
  --badge-bg: #d6452f;
  --badge-ink: #ffffff;
  --tile-cash: #2f9e5b;
  --tile-card: #3a6fd8;
  --tile-voucher: #c86a00;
  --tile-cheque: #7c4ddb;
  --floor-bg: #f3eadc;
  --floor-dot: rgba(28, 26, 23, .10);
  --space-free: #fffdf9;
  --space-free-ink: #1c1a17;
  --space-free-line: #d6c8b0;
  --space-cook: #ff9f1c;
  --space-cook-ink: #2b1700;
  --space-dining: #3a86ff;
  --space-dining-ink: #ffffff;
  --space-bill: #e5484d;
  --space-bill-ink: #ffffff;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 22px;
  --font: 'Signika', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow-sm: none;
  --shadow: 0 8px 20px rgba(60, 40, 10, .08);
  --shadow-lg: 0 24px 60px rgba(60, 40, 10, .22);
  --backdrop: rgba(28, 26, 23, .45);
  color-scheme: light;
}

/* ---------- Cuisine : toujours sombre, contrasté, lisible de loin ---------- */
body.o-pos[data-station="cuisine"] {
  --bg: #0b0d10;
  --surface: #151a20;
  --surface-2: #1c222a;
  --surface-3: #252c36;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);
  --ink: #f5f7fa;
  --ink-2: #d5dae1;
  --muted: #9aa4b1;
  --primary: #f5f7fa;
  --on-primary: #0b0d10;
  --order: #2f7cf6;
  --on-order: #ffffff;
  --pay: #22c55e;
  --on-pay: #04210e;
  --ok: #22c55e;
  --on-ok: #04210e;
  --danger: #ef4444;
  --on-danger: #ffffff;
  --danger-soft: rgba(239, 68, 68, .14);
  --danger-ink: #fecaca;
  --warn: #f59f00;
  --warn-soft: rgba(245, 159, 0, .14);
  --warn-ink: #ffe08a;
  --sel: rgba(255, 255, 255, .06);
  --sel-line: #f5f7fa;
  --focus: #60a5fa;
  --bar-bg: #0b0d10;
  --bar-ink: #f5f7fa;
  --bar-muted: #9aa4b1;
  --bar-line: rgba(255, 255, 255, .08);
  --tabs-bg: #151a20;
  --tab-ink: #b4bcc7;
  --tab-on-bg: #f5f7fa;
  --tab-on-ink: #0b0d10;
  --search-bg: #151a20;
  --logo-bg: #ffd43b;
  --logo-ink: #0b0d10;
  --lock-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b0d10' stroke-width='2' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
  --review-bg: rgba(245, 159, 0, .16);
  --review-ink: #ffe08a;
  --kds-new: #3b82f6;
  --kds-cook: #f59f00;
  --kds-ready: #22c55e;
  --radius: 12px;
  --radius-sm: 10px;
  --radius-lg: 16px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow-sm: none;
  --shadow: 0 8px 22px rgba(0, 0, 0, .4);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, .6);
  --backdrop: rgba(0, 0, 0, .66);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.o-pos {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.35;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
.o-pos [hidden] { display: none !important; }
:where(.o-pos) :where(button, input) { font: inherit; color: inherit; }
.o-pos button { touch-action: manipulation; }
.o-pos :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.o-pos h2, .o-pos h3, .o-pos h4 { letter-spacing: -.01em; }
.o-ico { width: 20px; height: 20px; flex: 0 0 auto; }

/* ---------- Barre de navigation ---------- */
.o-nav {
  height: var(--nav-h);
  background: var(--bar-bg);
  color: var(--bar-ink);
  border-bottom: 1px solid var(--bar-line);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  position: relative;
  z-index: 50;
}
.o-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  margin-right: 10px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.o-nav-brand #nav-brand { overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.o-nav-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--logo-bg);
  color: var(--logo-ink);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.o-nav-logo svg { width: 22px; height: 22px; }
.o-nav-tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: calc(var(--radius) + 4px);
  background: var(--tabs-bg);
}
.o-nav a, .o-nav button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--bar-ink);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.o-nav-tabs a { color: var(--tab-ink); padding: 0 16px; }
body[data-station="caisse"] #nav-caisse,
body[data-station="cuisine"] #nav-cuisine,
body[data-station="salle"] #nav-salle {
  background: var(--tab-on-bg);
  color: var(--tab-on-ink);
  box-shadow: var(--shadow-sm);
}
body[data-station="caisse"]:has(#tickets.is-open) #nav-caisse { background: transparent; color: var(--tab-ink); box-shadow: none; }
body[data-station="caisse"]:has(#tickets.is-open) #nav-tickets { background: var(--tab-on-bg); color: var(--tab-on-ink); box-shadow: var(--shadow-sm); }
.o-nav-spacer { flex: 1; }
.o-nav-search {
  flex: 0 1 300px;
  min-width: 140px;
  width: auto;
  height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--search-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center;
  color: var(--bar-ink);
  padding: 0 12px 0 38px;
}
.o-nav-search::placeholder { color: var(--bar-muted); }
.o-nav-search:focus { border-color: var(--focus); outline: none; }
.o-nav .o-nav-icon { padding: 0 12px; color: var(--bar-ink); }
.o-nav .o-nav-review { background: var(--review-bg); color: var(--review-ink); }
.o-nav .o-nav-review.has-items { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--badge-bg) 55%, transparent); }
.o-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-ink);
  font-size: 12px;
  font-weight: 800;
}
.o-net {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff3cd;
  color: #5c3c00;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  flex: 0 0 auto;
}
.o-net::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #e8890c; animation: o-pulse 1.2s ease-in-out infinite; }
@keyframes o-pulse { 50% { opacity: .3; } }

/* Sélecteur de thème */
.o-theme-menu {
  position: fixed;
  z-index: 140;
  min-width: 260px;
  padding: 6px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.o-theme-menu p { margin: 6px 10px 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.o-theme-opt {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.o-theme-opt[aria-checked="true"] { background: var(--sel); }
.o-theme-opt strong { display: block; font-size: 15px; }
.o-theme-opt small { display: block; color: var(--muted); font-size: 12px; }
.o-theme-opt span:last-child { margin-left: auto; font-weight: 800; opacity: 0; }
.o-theme-opt[aria-checked="true"] span:last-child { opacity: 1; }
.o-theme-swatch { width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto; border: 1px solid rgba(0, 0, 0, .12); }
.o-theme-swatch.is-comptoir { background: linear-gradient(135deg, #ffffff 0 50%, #14161a 50% 75%, #ffd43b 75%); }
.o-theme-swatch.is-nuit { background: linear-gradient(135deg, #07140d 0 50%, #e7c56a 50% 75%, #3ecf6e 75%); }
.o-theme-swatch.is-soleil { background: linear-gradient(135deg, #fbf6ee 0 50%, #ffd000 50% 75%, #1c1a17 75%); }

/* ---------- Boutons ---------- */
.o-btn {
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: filter .12s, transform .06s, background-color .12s;
}
.o-btn:active:not(:disabled) { transform: scale(.985); filter: brightness(.94); }
.o-btn:disabled { opacity: .42; cursor: not-allowed; }
.o-btn.is-busy, .o-ticket.is-busy { cursor: progress; opacity: .7; }
.o-btn-ghost { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.o-btn-order { background: var(--order); color: var(--on-order); }
:root[data-theme="nuit"] .o-btn-order { border-color: rgba(231, 197, 106, .35); }
:root[data-theme="soleil"] .o-btn-order { border-color: var(--line-2); }
body[data-station="cuisine"] .o-btn-order { border-color: transparent; }
.o-btn-pay { background: var(--pay); color: var(--on-pay); }
.o-btn-ok { background: var(--ok); color: var(--on-ok); }
.o-btn-danger { background: var(--danger); color: var(--on-danger); }

/* ---------- Écran caisse ---------- */
.o-register {
  display: grid;
  grid-template-columns: minmax(340px, 400px) 1fr;
  height: calc(100vh - var(--nav-h));
  height: calc(100dvh - var(--nav-h));
}
.o-cart {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.o-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 10px;
}
.o-cart-head strong { font-size: 20px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-pill {
  flex: 0 0 auto;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.o-table-chip {
  margin: 0 16px 8px;
  min-height: 48px;
  padding: 0 14px 0 42px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--radius);
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='7' width='18' height='5' rx='1.5'/%3E%3Cpath d='M6 12v7M18 12v7'/%3E%3C/svg%3E") no-repeat 14px center;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.o-table-chip.is-set { border-style: solid; border-color: var(--sel-line); background-color: var(--sel); }
.o-table-chip:disabled { cursor: default; opacity: .75; }
.o-notices { display: grid; gap: 8px; margin: 0 16px 8px; }
.o-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.35;
}
.o-notice strong { color: var(--ink); }
.o-notice span { color: var(--ink-2); flex: 1 1 160px; }
.o-notice .o-btn { min-height: 44px; padding: 0 14px; font-size: 14px; }
.o-notice.is-warn { border-left-color: var(--warn); background: var(--warn-soft); }
.o-notice.is-error { border-left-color: var(--danger); background: var(--danger-soft); }
.o-cart-lines { flex: 1; min-height: 0; overflow: auto; padding: 0 8px; border-top: 1px solid var(--line); }
.o-empty { color: var(--muted); text-align: center; padding: 48px 20px; font-size: 15px; margin: 0; }
.o-cart-lines .o-empty {
  padding-top: 72px;
  background: no-repeat center 22px / 36px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h12v18l-3-2-3 2-3-2-3 2z'/%3E%3Cpath d='M9 8h6M9 12h6M9 16h3'/%3E%3C/svg%3E");
}
.o-line {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
}
.o-line:last-child { border-bottom: 0; }
.o-line-main { min-width: 0; }
.o-line-name { font-weight: 650; font-size: 16px; }
.o-line-n { font-weight: 800; margin-right: 6px; color: var(--muted); }
.o-line-mods { color: var(--muted); font-size: 13px; margin-top: 2px; }
.o-line-price { font-weight: 750; font-size: 16px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.o-line-tools { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
.o-line-qty { display: inline-flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.o-line-qty button {
  width: 48px;
  height: 44px;
  border: 0;
  background: var(--surface);
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
}
.o-line-qty b {
  min-width: 44px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.o-line-rm {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.o-line button:disabled { opacity: .4; cursor: not-allowed; }
.o-line.is-sent .o-line-tools { display: none; }
.o-line:not(.is-sent) .o-line-n { display: none; }
.o-cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 16px 12px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
}
.o-cart-summary #t-total { color: var(--ink); font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.o-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 12px 8px; }
.o-row .o-btn { min-height: 48px; padding: 0 8px; font-size: 14px; font-weight: 650; }
#t-service::before { content: "⇄"; font-size: 16px; opacity: .7; }
.o-row .o-btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.o-cart-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px; padding: 0 12px 12px; }
.o-cart-actions .o-btn { min-height: 64px; font-size: 18px; }
#t-pay[data-total]:not(:disabled) { justify-content: space-between; padding: 0 18px; }
#t-pay[data-total]:not(:disabled)::after { content: attr(data-total); font-variant-numeric: tabular-nums; }

.o-catalog { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.o-cats {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 0 0 auto;
}
.o-cats::-webkit-scrollbar { display: none; }
.o-cat {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-ink);
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}
.o-cat.is-active { background: var(--chip-on-bg); color: var(--chip-on-ink); border-color: transparent; }
.o-products {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 2px 14px 16px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(164px, 1fr));
  align-content: start;
}
.o-product {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 176px;
  padding: 0;
  overflow: hidden;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color .12s, transform .06s;
}
.o-product:active { transform: scale(.98); }
.o-product img, .o-product-ph {
  width: 100%;
  height: 112px;
  object-fit: contain;
  padding: 8px;
  background: var(--img-bg);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 28px;
}
.o-product-body { padding: 10px 12px 12px; }
.o-product-name { font-size: 15px; font-weight: 650; line-height: 1.22; }
.o-product-price { margin-top: 6px; color: var(--price); font-weight: 750; font-variant-numeric: tabular-nums; }
.o-products > .o-empty { grid-column: 1 / -1; }

/* ---------- Écran de verrouillage ---------- */
.o-lock {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(1200px 600px at 50% -10%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 70%),
    var(--bg);
}
:root[data-theme="soleil"] .o-lock { background: radial-gradient(900px 500px at 50% -10%, rgba(255, 208, 0, .55), transparent 70%), var(--bg); }
.o-lock-card {
  width: min(380px, 94vw);
  padding: 28px 24px 22px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.o-lock-card::before {
  content: "";
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: var(--logo-bg) no-repeat center / 26px var(--lock-icon);
}
.o-lock-card h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.01em; }
.o-lock-card p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.o-lock-pin {
  min-height: 44px;
  margin-bottom: 16px;
  font-size: 32px;
  letter-spacing: .45em;
  font-weight: 800;
  color: var(--ink);
}
.o-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.o-keys button {
  height: 64px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
}
.o-keys button:active { background: var(--surface-3); transform: scale(.97); }
.o-keys [data-k="enter"] { background: var(--primary); color: var(--on-primary); border-color: transparent; font-size: 18px; }
.o-keys .zero { grid-column: auto; }
.o-lock-error { color: var(--danger); min-height: 20px; margin-top: 12px; font-size: 14px; font-weight: 600; }

/* ---------- Écrans plein écran (paiement, commandes) ---------- */
.o-screen {
  position: fixed;
  inset: var(--nav-h) 0 0;
  z-index: 40;
  display: none;
  background: var(--bg);
}
.o-screen.is-open { display: grid; }
.o-pay { grid-template-columns: 1fr 380px; overflow: auto; }
.o-pay-methods { padding: 20px 28px 28px; min-width: 0; }
.o-pay-methods > .o-btn-ghost, .o-tickets > .o-btn-ghost { min-height: 48px; }
.o-pay-methods h2 { margin: 18px 0 14px; font-size: 26px; font-weight: 800; }
.o-pay-help { color: var(--muted); max-width: 60ch; line-height: 1.5; margin: 0 0 16px; }
.o-pay-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 210px));
  gap: 14px;
  margin: 8px 0 22px;
}
.o-pay-tile {
  aspect-ratio: 1.15;
  border: 0;
  border-radius: var(--radius-lg);
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 4px;
  padding: 18px;
  text-align: left;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.o-pay-tile::before {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.o-pay-tile strong { font-size: 40px; font-weight: 800; letter-spacing: .02em; line-height: 1; }
.o-pay-tile span { font-size: 16px; font-weight: 650; opacity: .95; }
.o-pay-tile.is-cash { background: var(--tile-cash); }
.o-pay-tile.is-card { background: var(--tile-card); }
.o-pay-tile.is-voucher { background: var(--tile-voucher); }
.o-pay-tile.is-cheque { background: var(--tile-cheque); }
.o-pay-tile:active { filter: brightness(.92); transform: scale(.985); }
.o-pay-lines { list-style: none; margin: 0 0 16px; padding: 0; max-width: 640px; }
.o-pay-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  margin-bottom: 8px;
  padding: 6px 8px 6px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.o-pay-line span { color: var(--muted); font-weight: 600; }
.o-pay-line button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}
.o-pay-line .o-btn { font-size: 14px; color: var(--on-danger); background: var(--danger); padding: 0 14px; }
.o-pay-side {
  background: var(--surface);
  border-left: 1px solid var(--line);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.o-due-label { color: var(--muted); font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.o-due { font-size: 40px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 16px; font-variant-numeric: tabular-nums; }
.o-typed {
  font-size: 22px;
  font-weight: 750;
  margin: 6px 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.o-num { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.o-num button {
  height: 60px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
}
.o-num button:active { background: var(--surface-3); transform: scale(.97); }
#pay-ok { min-height: 64px; font-size: 18px; margin-top: 14px !important; }
.o-finalize {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--warn);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.o-finalize strong { font-size: 17px; }
.o-finalize .o-pay-help { margin: 8px 0 0; }
.o-pay-tiles:has(.o-finalize) { grid-template-columns: minmax(0, 640px); }
.o-pending { flex-wrap: wrap; }
.o-pending .o-btn { min-height: 44px; font-size: 14px; }

.o-tickets { padding: 20px 28px 32px; overflow: auto; align-content: start; }
.o-tickets > .o-btn-ghost { justify-self: start; }
.o-tickets h2 { margin: 18px 0 6px; font-size: 26px; font-weight: 800; }
#tickets-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; align-items: start; }
.o-tickets h3 {
  grid-column: 1 / -1;
  margin: 18px 0 2px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.o-tickets h3:first-child { margin-top: 4px; }
.o-ticket {
  width: 100%;
  min-height: 76px;
  padding: 14px 16px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.o-ticket strong { display: block; font-size: 17px; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.o-ticket span { color: var(--muted); font-size: 14px; }
.o-flag {
  display: inline-block;
  margin: 8px 6px 0 0;
  padding: 3px 10px;
  border-radius: 999px;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}
.o-flag.is-warn { background: var(--warn-soft); color: var(--warn-ink); }
.o-flag.is-error { background: var(--danger-soft); color: var(--danger-ink); }

/* ---------- Fenêtres modales ---------- */
.o-modal-bg {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--backdrop);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}
.o-modal-bg.show { opacity: 1; pointer-events: auto; }
.o-modal {
  width: min(720px, 96vw);
  max-height: 90vh;
  max-height: 90dvh;
  overflow: auto;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(8px) scale(.99);
  transition: transform .15s;
}
.o-modal-bg.show .o-modal { transform: none; }
.o-modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.o-modal-head h3 { margin: 0; font-size: 19px; font-weight: 750; }
.o-modal-head .o-btn { min-height: 44px; min-width: 44px; padding: 0 14px; font-size: 15px; }
.o-modal-body { padding: 18px 20px; }
.o-modal-body > p:first-child { margin-top: 0; }
.o-modal-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.o-modal-foot .o-btn { min-width: 120px; }
/* Vérifications Hiboutik */
.o-op {
  border: 1px solid var(--line);
  border-left: 4px solid var(--warn);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.o-op-head { display: grid; gap: 2px; margin-bottom: 12px; }
.o-op-head strong { font-size: 16px; }
.o-op-head span { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.o-op-head small { color: var(--muted); font-size: 13px; }
.o-op-sale { display: grid; gap: 6px; font-size: 13px; font-weight: 650; margin-bottom: 12px; }
.o-op-sale input {
  height: 48px;
  max-width: 260px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 17px;
}
.o-op-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.o-op-actions .o-btn { min-height: 48px; }
.o-op-msg { margin: 10px 0 0; font-size: 14px; font-weight: 650; color: var(--ink-2); }
.o-op-msg:empty { display: none; }

/* ---------- Notifications ---------- */
.o-toast-stack {
  position: fixed;
  top: calc(var(--nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.o-toast {
  max-width: min(560px, calc(100vw - 32px));
  padding: 14px 20px;
  font-size: 16px !important;
  border-radius: var(--radius);
  background: #1f2329;
  color: #fff;
  font-size: 15px;
  font-weight: 550;
  line-height: 1.4;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  transition: opacity .3s;
}
.o-toast.success { background: #11804a; }
.o-toast.warn { background: #a85400; }
.o-toast.error { background: #c0291b; }

/* ---------- Salle ---------- */
.o-kds, .o-salle {
  height: calc(100vh - var(--nav-h));
  height: calc(100dvh - var(--nav-h));
  overflow: auto;
  padding: 18px 20px 28px;
  display: none;
}
.o-floor-toolbar, .o-floor-edit {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.o-floor-toolbar strong { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.o-floor-edit {
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.o-floor-edit .o-btn { min-height: 44px; padding: 0 14px; font-size: 14px; }
.o-floor-label, .o-floor-seats {
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.o-floor-label { width: 150px; }
.o-floor-seats { width: 76px; }
.o-floor-color { width: 48px; height: 44px; padding: 2px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.o-floor-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}
.o-legend { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 650; }
.o-legend::before { content: ""; width: 16px; height: 16px; border-radius: 5px; background: var(--c); border: 1px solid var(--b, transparent); }
.o-legend.is-free { --c: var(--space-free); --b: var(--space-free-line); }
.o-legend.is-busy { --c: var(--space-cook); }
.o-legend.is-dining { --c: var(--space-dining); }
.o-legend.is-bill { --c: var(--space-bill); }
.o-floor {
  position: relative;
  min-height: 420px;
  height: min(60vh, 560px);
  overflow: hidden;
  background-color: var(--floor-bg);
  background-image: radial-gradient(var(--floor-dot) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.o-floor-pick { height: 420px; }
.o-space {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px;
  text-align: center;
  line-height: 1.15;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  touch-action: none;
  background: var(--space-free) !important; /* la couleur d'état prime sur la couleur personnalisée */
  color: var(--space-free-ink);
  border: 2px solid var(--space-free-line);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .12s, transform .06s;
}
.o-space::before {
  content: none;
  position: absolute;
  top: 8px;
  left: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--space-color, transparent);
  box-shadow: 0 0 0 2px var(--surface);
}
#s-editbar:not([hidden]) ~ .o-floor .o-space::before { content: ""; }
.o-space.is-round::before { top: 12%; left: 50%; transform: translateX(-50%); }
.o-space:active { transform: scale(.98); }
.o-space strong { font-size: 17px; font-weight: 800; }
.o-space small { font-size: 13px; font-weight: 600; opacity: .85; }
.o-space.is-round { border-radius: 50%; }
.o-space.is-rect { border-radius: var(--radius); }
.o-space.is-square { border-radius: var(--radius-sm); }
.o-space.is-busy { background: var(--space-cook) !important; color: var(--space-cook-ink); border-color: transparent; box-shadow: var(--shadow); }
.o-space.is-dining { background: var(--space-dining) !important; color: var(--space-dining-ink); border-color: transparent; box-shadow: var(--shadow); }
.o-space.is-bill { background: var(--space-bill) !important; color: var(--space-bill-ink); border-color: transparent; box-shadow: var(--shadow); animation: o-bill 2s ease-in-out infinite; }
.o-space.is-bill small, .o-space.is-busy small, .o-space.is-dining small { opacity: 1; }
@keyframes o-bill { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--space-bill) 30%, transparent), var(--shadow); } }
.o-space.is-selected { outline: 3px solid var(--focus); outline-offset: 3px; z-index: 2; }
.o-space.is-locked { opacity: .45; cursor: not-allowed; animation: none; }
.o-salle-title { margin: 26px 0 12px; font-size: 20px; font-weight: 800; color: var(--ink); }
.o-salle-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.o-salle-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.o-salle-card h3 { margin: 0 0 6px; font-size: 18px; }
.o-salle-card p { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.o-salle-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.o-salle-actions .o-btn { flex: 1 1 auto; min-height: 48px; }
.o-salle-actions .o-btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
#s-ticket-body p { margin: 0 0 10px; }
#s-ticket-body p strong { font-size: 17px; }

/* ---------- Cuisine ---------- */
body[data-station="cuisine"] .o-nav-brand #nav-brand { max-width: 320px; }
.o-kds { padding: 16px; }
.o-kds-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
.o-kds-grid > .o-empty { grid-column: 1 / -1; padding: 18vh 20px; font-size: 26px; font-weight: 650; }
.o-kds-card {
  --kds: var(--kds-new);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--line);
  border-top: 8px solid var(--kds);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.o-kds-card.is-preparing { --kds: var(--kds-cook); }
.o-kds-card.is-ready { --kds: var(--kds-ready); border-color: color-mix(in srgb, var(--kds-ready) 55%, transparent); border-top-color: var(--kds-ready); }
.o-kds-card.is-danger { border-color: var(--danger); border-top-color: var(--kds); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 35%, transparent); }
.o-kds-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 10px; padding: 14px 16px 12px; }
.o-kds-head > div { display: contents; }
.o-kds-meta { grid-column: 1 / -1; grid-row: 2; }
.o-kds-where { font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; }
.o-kds-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--muted); font-size: 15px; font-weight: 600; }
.o-kds-status { padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--kds) 20%, transparent); color: var(--kds); font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.o-kds-timer {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.o-kds-card.is-warn .o-kds-timer { background: var(--warn); color: #1f1400; }
.o-kds-card.is-danger .o-kds-timer { background: var(--danger); color: #fff; }
.o-kds-lines { list-style: none; margin: 0; padding: 4px 16px 8px; flex: 1; }
.o-kds-line { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); font-size: 21px; font-weight: 700; line-height: 1.25; }
.o-kds-qty { flex: 0 0 auto; min-width: 44px; height: 36px; padding: 0 8px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--ink); color: var(--bg); font-size: 20px; font-weight: 800; }
.o-kds-line small { display: block; margin-top: 4px; font-size: 16px; font-weight: 600; color: var(--warn-ink); }
.o-kds-foot { padding: 0 16px 16px; }
.o-kds-foot .o-btn { width: 100%; min-height: 64px; font-size: 20px; }

/* ---------- Usage tactile ---------- */
.o-pos button, .o-pos a, .o-nav, .o-product, .o-space, .o-ticket, .o-cat, .o-kds-card, .o-lock-card {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.o-pos input, .o-pos textarea { -webkit-user-select: text; user-select: text; }
/* Retour visuel immédiat à l'appui, partout où l'on touche. */
.o-cat:active, .o-mod-opt:active, .o-ticket:active, .o-theme-opt:active,
.o-line-qty button:active:not(:disabled), .o-line-rm:active:not(:disabled), .o-table-chip:active:not(:disabled),
.o-nav a:active, .o-nav button:active, .o-pay-line button:active:not(:disabled) {
  transform: scale(.97);
  filter: brightness(.94);
}
.o-cat, .o-mod-opt, .o-ticket, .o-theme-opt, .o-table-chip, .o-line-qty button, .o-line-rm, .o-nav a, .o-nav button { transition: transform .06s, filter .06s, background-color .12s; }

/* Fenêtres : croix d'en-tête unifiée, gros boutons de pied, fenêtre large pour le plan. */
.o-modal-head .o-modal-x { width: 48px; min-width: 48px; height: 48px; padding: 0; font-size: 28px; font-weight: 500; line-height: 1; border-radius: 999px; }
.o-modal-foot { padding: 12px 16px 14px; }
.o-modal-foot .o-btn { min-height: 56px; min-width: 140px; font-size: 16px; }
.o-modal-foot .o-btn:last-child:not(:first-child) { min-width: 200px; }
.o-modal.is-lg { width: min(820px, 96vw); }
.o-modal.o-modal-wide { width: min(1040px, 96vw); max-width: none; }
.o-modal-wide .o-floor-pick { height: min(58vh, 560px); }
.o-modal-body .o-pay-help { font-size: 15px; }

/* Options d'un plat : grandes tuiles, état visible, groupe manquant signalé. */
.o-mod-group { margin-bottom: 20px; padding: 2px; border-radius: var(--radius); }
.o-mod-group:last-child { margin-bottom: 4px; }
.o-mod-group h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; font-size: 17px; }
.o-mod-group h4 small { flex-basis: 100%; color: var(--muted); font-size: 14px; font-weight: 500; }
.o-mod-group.is-missing { box-shadow: 0 0 0 2px var(--danger); padding: 10px; animation: o-shake .35s ease-in-out; }
@keyframes o-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.o-req { padding: 3px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn-ink); font-size: 13px; font-weight: 750; }
.o-req.is-done { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
:root[data-theme="comptoir"] .o-req.is-done, :root:not([data-theme]) .o-req.is-done { color: #0b7a3b; }
.o-req.is-optional { background: var(--surface-2); color: var(--muted); }
.o-mod-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.o-mod-opt {
  position: relative;
  min-height: 64px;
  padding: 10px 40px 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  text-align: left;
  border: 2px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
}
.o-mod-opt small { color: var(--muted); font-size: 14px; font-weight: 600; }
.o-mod-opt::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
}
.o-mod-opt.is-selected { border-color: var(--sel-line); background: var(--sel); }
.o-mod-opt.is-selected::after {
  border-color: var(--primary);
  background: var(--primary) no-repeat center / 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E");
}
:root[data-theme="nuit"] .o-mod-opt.is-selected::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1a11' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E"); }

/* Effets de survol réservés aux appareils qui ont une souris : sur tablette ils resteraient « collés » après un tap. */
@media (hover: hover) {
  .o-nav a:hover, .o-nav button:hover { background: color-mix(in srgb, var(--bar-ink) 8%, transparent); }
  .o-nav-tabs a:hover { color: var(--bar-ink); }
  .o-theme-opt:hover { background: var(--surface-2); }
  .o-btn-ghost:hover:not(:disabled) { background: var(--surface-3); }
  .o-line-qty button:hover:not(:disabled) { background: var(--surface-2); }
  .o-line-rm:hover:not(:disabled) { background: var(--danger-soft); color: var(--danger); }
  .o-row .o-btn-danger:hover:not(:disabled) { background: var(--danger-soft); }
  .o-product:hover { border-color: var(--line-2); }
  .o-pay-line button:hover:not(:disabled) { background: var(--danger-soft); color: var(--danger); }
  .o-pay-line .o-btn:hover:not(:disabled) { background: var(--danger); color: var(--on-danger); filter: brightness(.95); }
  .o-ticket:hover { border-color: var(--line-2); }
  .o-mod-opt:not(.is-selected):hover { border-color: var(--muted); }
}

/* Tablette en portrait et téléphone : les fenêtres s'ouvrent en bas, sous le pouce. */
@media (max-width: 820px) {
  .o-modal-bg { place-items: end center; padding: 0; }
  .o-modal, .o-modal.o-modal-wide { width: 100%; max-width: none !important; max-height: 92dvh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; transform: translateY(24px); }
  .o-modal-foot .o-btn { flex: 1 1 0; min-width: 0; }
  .o-modal-foot .o-btn:last-child:not(:first-child) { flex-grow: 1.6; min-width: 0; }
}

/* ---------- Adaptations tablette / téléphone ---------- */
@media (max-width: 1180px) {
  .o-nav-brand #nav-brand { display: none; }
  .o-nav-tabs a { padding: 0 12px; }
}
@media (max-width: 1100px) {
  #nav-home .o-nav-label, #nav-lock .o-nav-label { display: none; }
  .o-nav-search { min-width: 110px; }
  .o-net { font-size: 0; gap: 0; padding: 0 10px; }
  .o-net::after { content: "Hors ligne"; font-size: 12px; margin-left: 6px; }
  .o-nav { gap: 4px; }
}
@media (max-width: 1000px) {
  .o-nav .o-nav-label { display: none; }
  .o-register { grid-template-columns: minmax(300px, 360px) 1fr; }
  .o-pay { grid-template-columns: 1fr 340px; }
}
@media (max-width: 820px) {
  :root { --nav-h: 112px; }
  .o-nav { flex-wrap: wrap; height: auto; min-height: var(--nav-h); padding: 6px 8px; align-content: center; }
  .o-nav-spacer { display: none; }
  .o-nav-search { order: 9; flex: 1 1 100%; width: auto; }
  .o-register { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
  .o-cart { border-right: 0; border-bottom: 1px solid var(--line); }
  .o-pay { grid-template-columns: 1fr; }
  .o-pay-side { border-left: 0; border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  .o-space.is-bill, .o-net::before { animation: none; }
  .o-btn, .o-product, .o-modal, .o-modal-bg { transition: none; }
}
