html { background: #0f0f10; min-height: 100%; }
/* Passe — identité : papier crème, vert bouteille, safran, tomate pour l'urgence. Titres en serif. */
:root {
  --paper: #f6f1e7; --paper-2: #fbf8f1; --ink: #1d2823; --ink-2: #4b5a53; --line: #ddd5c4;
  --green: #1f4d3f; --green-2: #2d6a57; --saffron: #e9a23b; --tomato: #d3402a; --sky: #2f6f8f; --stone: #8a8f8b;
  --ok: #2f7d4f; --radius: 14px; --navh: 68px; --shadow: 0 2px 10px rgba(30, 40, 35, .12);
  --alert-a: var(--tomato); --alert-b: #fff3ef;
  font-size: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.35; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; margin: 0; line-height: 1.15; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 99; }
.splash { padding: 3rem; text-align: center; color: var(--ink-2); }
.muted { color: var(--ink-2); } .small { font-size: .85rem; } .block { display: block; } .grow { flex: 1; min-width: 0; }
.error { color: var(--tomato); font-weight: 600; } .error:empty { display: none; }
code { font-size: .85em; background: #0001; padding: 1px 5px; border-radius: 4px; word-break: break-all; }
hr { border: 0; border-top: 1px solid var(--line); width: 100%; }

/* ---------- Coque ---------- */
#app { min-height: 100dvh; display: grid; grid-template-rows: auto auto 1fr; grid-template-columns: minmax(0, 1fr); }
.topbar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; padding-top: max(8px, env(safe-area-inset-top)); background: var(--green); color: #fff; position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--paper); color: var(--green); font: 700 20px Georgia, serif; flex: none; }
.brand-name { font: 700 1.25rem Georgia, serif; } .resto { opacity: .8; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand.big { color: var(--green); font-size: 1.6rem; } .brand.big .logo { background: var(--green); color: var(--paper); }
.conn { font-size: .8rem; padding: 3px 10px; border-radius: 99px; background: #ffffff22; white-space: nowrap; }
.conn.online { background: #2f7d4f; } .conn.offline { background: var(--tomato); } .conn.demo { background: var(--saffron); color: #2b1d00; }
.banner { padding: 6px 14px; font-size: .85rem; text-align: center; } .banner.hidden { display: none; }
.banner.demo { background: #fff0d1; color: #5a3b00; } .banner.offline { background: #fde1db; color: #7a1c0e; font-weight: 600; }
.icon-btn { border: 0; background: transparent; color: inherit; width: 44px; height: 44px; border-radius: 12px; font-size: 1.2rem; display: inline-grid; place-items: center; }
.icon-btn:hover { background: #0001; } .topbar .icon-btn:hover { background: #ffffff22; }
#view { padding: 14px 14px calc(var(--navh) + 28px + env(safe-area-inset-bottom)); outline: none; max-width: 1400px; width: 100%; margin: 0 auto; }
.no-nav #view { padding-bottom: 28px; }

.nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; background: var(--paper-2); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 10px #0001; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--navh); padding: 6px 4px; text-decoration: none; color: var(--ink-2); position: relative; font-weight: 600; font-size: .82rem; border-top: 4px solid transparent; }
.nav-item .ico { font-size: 1.5rem; line-height: 1; }
.nav-item.current { color: var(--green); border-top-color: var(--green); background: #1f4d3f12; }
.nav-item .badge-n { position: absolute; top: 6px; right: calc(50% - 34px); min-width: 22px; height: 22px; border-radius: 11px; background: var(--tomato); color: #fff; font-size: .8rem; display: grid; place-items: center; padding: 0 6px; }
.nav-item .badge-n[hidden], .nav-item .todo[hidden] { display: none; }
.nav-item .todo { font-size: .7rem; font-weight: 700; color: var(--tomato); text-transform: uppercase; letter-spacing: .03em; }
@media (min-width: 900px) {
  #app { grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: auto auto 1fr; }
  .topbar, .banner { grid-column: 1 / -1; }
  .nav { position: sticky; top: 52px; align-self: start; grid-row: 3; grid-column: 1; flex-direction: column; height: calc(100dvh - 52px); border-top: 0; border-right: 1px solid var(--line); box-shadow: none; padding-top: 8px; z-index: 10; }
  #view { grid-row: 3; grid-column: 2; padding-bottom: 28px; }
  .nav-item { flex: 0 0 auto; min-height: 92px; border-top: 0; border-left: 4px solid transparent; margin: 2px 0; }
  .nav-item.current { border-left-color: var(--green); }
  .nav-item .badge-n { right: 10px; }
  #app.no-nav { grid-template-columns: minmax(0, 1fr); } .no-nav #view { grid-column: 1; }
}

/* ---------- Boutons, champs, cartes ---------- */
.btn { border: 2px solid var(--ink); background: var(--paper-2); border-radius: 12px; padding: 10px 16px; min-height: 48px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover:not(:disabled) { background: #fff; } .btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; } .btn.primary:hover:not(:disabled) { background: var(--green-2); }
.btn.danger { background: #fff; border-color: var(--tomato); color: var(--tomato); } .btn.danger:hover:not(:disabled) { background: #fde7e2; }
.btn.saffron { background: var(--saffron); border-color: #b9761a; color: #2b1d00; } .btn.green { background: var(--ok); border-color: #1f5c37; color: #fff; }
.btn.xl { min-height: 64px; font-size: 1.25rem; width: 100%; border-radius: 14px; }
.btn.sm { min-height: 40px; padding: 6px 12px; font-size: .9rem; border-width: 1.5px; }
.btn-link { background: none; border: 0; color: var(--sky); text-decoration: underline; padding: 8px 0; text-align: left; }
.btn-ghost { background: transparent; border: 0; padding: 0; }
.card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.card.info { background: #e8f1f5; border-color: #bcd5e0; } .card.error { background: #fde7e2; }
.stack { display: flex; flex-direction: column; gap: 12px; } .stack.center { align-items: center; text-align: center; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .row.end { justify-content: flex-end; } .row.center { justify-content: center; }
.field { display: flex; flex-direction: column; gap: 4px; } .field > span { font-weight: 600; font-size: .9rem; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=search], select, textarea { width: 100%; padding: 10px 12px; min-height: 46px; border: 1.5px solid #b8ae98; border-radius: 10px; background: #fff; }
input.narrow { width: 80px; } .search { max-width: 260px; }
textarea { resize: vertical; }
.opt { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.opt input { width: 22px; height: 22px; accent-color: var(--green); flex: none; }
.opt-group { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; } .opt-group legend { font-weight: 700; padding: 0 6px; }
.req-tag, .opt-tag { font-size: .7rem; margin-left: 8px; padding: 2px 8px; border-radius: 99px; } .req-tag { background: var(--tomato); color: #fff; } .opt-tag { background: #0001; }
.al-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.chip.warn { background: #fde7e2; border-color: var(--tomato); color: #7a1c0e; margin-left: 6px; } .chip.big { font-size: 1.1rem; padding: 8px 16px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .8rem; font-weight: 700; color: #fff; }
.st-new { background: var(--tomato); } .st-preparing { background: #b9761a; } .st-ready { background: var(--ok); } .st-served { background: var(--stone); } .st-cancelled { background: #555; }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; margin-left: 8px; border-radius: 12px; background: var(--ink); color: #fff; font-size: .85rem; }
.empty { text-align: center; padding: 28px 10px; color: var(--ink-2); } .empty .big { font-size: 2.6rem; }
.switch { position: relative; display: inline-block; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.slider { position: absolute; inset: 0; background: #b5b5ad; border-radius: 99px; transition: .15s; } .slider::after { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + .slider { background: var(--ok); } .switch input:checked + .slider::after { transform: translateX(22px); }
.switch input:focus-visible + .slider { outline: 3px solid var(--sky); }

/* ---------- Alertes : alternance lente (1,6 s) ; statique si animations coupées ---------- */
@keyframes passe-alt { 0%, 49.99% { background: var(--alert-a); color: #fff; } 50%, 100% { background: var(--alert-b); color: #7a1c0e; } }
@keyframes passe-alt-border { 0%, 49.99% { border-color: var(--tomato); box-shadow: 0 0 0 5px #d3402a55; } 50%, 100% { border-color: #e8b9ae; box-shadow: 0 0 0 0 #0000; } }
[data-anim=on] .alert-blink { animation: passe-alt 1.6s step-end infinite; }
[data-anim=on] .alert-blink .todo, [data-anim=on] .alert-blink .ico { color: inherit; }
[data-anim=on] .alert-blink-border { animation: passe-alt-border 1.6s step-end infinite; }
[data-anim=off] .alert-blink { background: var(--tomato); color: #fff; }
[data-anim=off] .alert-blink-border { border-color: var(--tomato); box-shadow: 0 0 0 5px #d3402a55; }
.nav-item.alert-blink .todo { color: inherit; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 1.3rem; margin: 4px 0 12px; }
.col-head .count { background: #fff; color: var(--ink); } .col-head .todo { margin-left: auto; font: 700 .85rem system-ui; text-transform: uppercase; letter-spacing: .04em; }
.col-head.plain { background: transparent; color: var(--ink); padding-left: 0; }
.col-head.alert-blink { background: var(--tomato); }

/* ---------- Tickets (cuisine / salle) ---------- */
.cols { display: grid; grid-template-columns: 1fr; gap: 18px; } @media (min-width: 760px) { .cols { grid-template-columns: 1fr 1fr; } }
.ticket { background: var(--paper-2); border: 3px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
.ticket.u-warn { border-color: var(--saffron); } .ticket.u-late { border-color: var(--tomato); background: #fff2ee; }
.ticket header { display: flex; gap: 14px; align-items: center; }
.tbl { background: var(--ink); color: #fff; border-radius: 14px; padding: 6px 16px; text-align: center; min-width: 96px; } .tbl small { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; opacity: .8; } .tbl strong { font-size: 3rem; line-height: 1; font-family: Georgia, serif; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; } .meta .num { font-weight: 800; font-size: 1.4rem; } .meta .age { font-weight: 700; font-size: 1.2rem; } .meta .at { color: var(--ink-2); }
.meta .late { background: var(--tomato); color: #fff; padding: 2px 10px; border-radius: 99px; font-weight: 800; font-size: .85rem; }
.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lines li { display: flex; gap: 10px; font-size: 1.15rem; } .lines .q { font-weight: 800; min-width: 2.2em; } .lines .n { flex: 1; font-weight: 600; }
.lines small { display: block; font-weight: 400; color: var(--ink-2); font-size: .9rem; } .note { display: block; color: #7a1c0e; font-style: normal; font-weight: 700; }
.kitchen .lines li { font-size: 1.5rem; } .kitchen .lines small { font-size: 1.05rem; }
.order-note { margin: 0; padding: 8px 10px; background: #fff3d1; border-radius: 10px; font-weight: 600; }
.ready-strip { margin-top: 10px; } .ready-strip h3 { margin-bottom: 8px; } .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.req { display: flex; align-items: center; gap: 12px; padding: 12px; border: 2px solid var(--saffron); border-radius: 14px; background: #fff7e3; margin-bottom: 10px; font-size: 1.1rem; } .req.bill { border-color: var(--sky); background: #e8f1f5; } .req .ico { font-size: 1.8rem; }
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.tile { border: 2px solid var(--line); border-radius: 14px; background: #fff; min-height: 88px; padding: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tile strong { font: 700 1.8rem Georgia, serif; } .tile small { font-weight: 700; font-size: .75rem; text-transform: uppercase; }
.s-cooking { background: #fff0d1; border-color: var(--saffron); } .s-ready { background: #dff3e6; border-color: var(--ok); } .s-served { background: #eceae3; } .s-bill { background: #dfeef5; border-color: var(--sky); } .s-call { background: #ffe0d9; border-color: var(--tomato); }
.tile.static { cursor: default; }

/* ---------- Client ---------- */
.client { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; min-width: 0; width: 100%; }
.client > * { min-width: 0; }
.c-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; } .c-head h1 { font-size: 1.7rem; }
.table-chip { display: inline-block; white-space: nowrap; margin-top: 4px; padding: 4px 14px; border-radius: 99px; background: var(--green); color: #fff; font-weight: 800; border: 0; }
.c-actions { display: flex; gap: 8px; flex-wrap: wrap; } @media (max-width: 640px) { .c-head .grow { flex-basis: 60%; } .c-actions { order: 3; width: 100%; } .c-actions .btn { flex: 1; padding: 8px; } .c-head h1 { font-size: 1.4rem; } .item .photo { width: 64px; height: 64px; } .item { gap: 8px; padding: 10px; } .step-btn { width: 44px; height: 44px; } .brand .resto { display: none; } } .lang select { width: auto; min-height: 44px; }
.c-tabs { display: flex; gap: 6px; background: #0001; padding: 4px; border-radius: 14px; }
.c-tabs button { flex: 1; min-height: 48px; border: 0; border-radius: 11px; background: transparent; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.c-tabs button.on { background: #fff; box-shadow: var(--shadow); } .c-tabs .todo { margin-left: 8px; color: var(--ok); font-size: .85rem; }
[data-anim=on] .c-tabs .pulse { animation: passe-alt-ok 1.6s step-end infinite; } @keyframes passe-alt-ok { 0%, 49.99% { background: var(--ok); color: #fff; } 50%, 100% { background: #dff3e6; color: #1f5c37; } }
.cat-chips { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0; position: sticky; top: 52px; background: var(--paper); z-index: 5; scrollbar-width: none; } .cat-chips .chip { cursor: pointer; min-height: 44px; }
.cat { scroll-margin-top: 110px; } .cat h2 { margin: 14px 0 8px; font-size: 1.5rem; }
.item { display: flex; gap: 12px; align-items: center; padding: 12px; margin-bottom: 8px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); }
.item.off { opacity: .55; } .item .photo { width: 88px; height: 88px; object-fit: cover; border-radius: 12px; flex: none; }
.item .txt { flex: 1; min-width: 0; } .item h3 { font-size: 1.15rem; } .item .desc { margin: 2px 0; color: var(--ink-2); font-size: .92rem; }
.allergens { margin: 4px 0; display: flex; flex-wrap: wrap; gap: 4px; } .al { font-size: .72rem; background: #fff; border: 1px solid var(--line); padding: 1px 7px; border-radius: 99px; }
.price { margin: 2px 0 0; font-weight: 800; font-size: 1.1rem; } .price small { font-weight: 400; color: var(--ink-2); }
.stepper { display: flex; align-items: center; gap: 4px; flex: none; background: #fff; border: 2px solid var(--green); border-radius: 99px; padding: 3px; }
.step-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--paper); font-size: 1.6rem; font-weight: 700; color: var(--green); line-height: 1; } .step-btn.plus { background: var(--green); color: #fff; } .step-btn:disabled { opacity: .35; }
.qty { min-width: 30px; text-align: center; font-weight: 800; font-size: 1.25rem; color: var(--ink-2); } .qty.on { color: var(--ink); }
.stepper.sm .step-btn { width: 40px; height: 40px; font-size: 1.3rem; }
.legal { font-size: .8rem; color: var(--ink-2); text-align: center; }
.cartbar { position: sticky; bottom: calc(var(--navh) + 8px + env(safe-area-inset-bottom)); z-index: 15; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 18px; border-radius: 18px; border: 0; background: var(--stone); color: #fff; font-size: 1.05rem; box-shadow: 0 4px 16px #0004; text-align: left; }
.cartbar.has { background: var(--green); } .cartbar .ico { font-size: 1.5rem; } .cartbar .go { font-weight: 800; }
.no-nav .cartbar { bottom: calc(10px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .cartbar { bottom: 12px; } }
.cart-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cart-lines li { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); } .cart-lines li.off { opacity: .6; } .cart-lines small { display: block; color: var(--ink-2); } .cart-lines .sum { min-width: 70px; text-align: right; font-weight: 700; }
.total-row { display: flex; justify-content: space-between; align-items: center; font-size: 1.15rem; } .total-row strong { font-size: 1.4rem; } .total-row.big { padding: 14px; background: #fff; border-radius: 12px; border: 2px solid var(--ink); }
.picker { text-align: center; padding: 16px 0; } .picker h2 { margin-bottom: 6px; } .picker .tables { margin-top: 14px; }
.orders { display: flex; flex-direction: column; gap: 12px; }
.track { list-style: none; margin: 8px 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; font-size: .8rem; font-weight: 600; }
.track li { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--stone); position: relative; }
.track .dot { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--stone); display: grid; place-items: center; background: #fff; font-weight: 800; }
.track li.done { color: var(--ok); } .track li.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; } .track li.now { color: var(--ink); } .track li.now .dot { border-color: var(--saffron); background: var(--saffron); color: #2b1d00; }
.ready-msg { margin: 0; padding: 10px; background: #dff3e6; border-radius: 10px; font-weight: 700; color: #1f5c37; }

/* ---------- Modales, toasts ---------- */
.backdrop { position: fixed; inset: 0; background: #0008; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--paper); width: 100%; max-width: 560px; max-height: 92dvh; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; box-shadow: 0 -8px 30px #0006; outline: none; }
.sheet.wide { max-width: 720px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 6px; gap: 8px; } .sheet-head h2 { font-size: 1.35rem; }
.sheet-body { padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); overflow-y: auto; }
@media (min-width: 700px) { .backdrop { align-items: center; } .sheet { border-radius: 22px; } }
#toasts { position: fixed; z-index: 200; left: 0; right: 0; top: 70px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow); max-width: 92vw; font-weight: 600; } .toast.ok { background: var(--ok); } .toast.error { background: var(--tomato); }

/* ---------- Gestion ---------- */
.admin { display: flex; flex-direction: column; gap: 14px; }
.subnav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; } .subnav button { border: 1.5px solid var(--line); background: var(--paper-2); border-radius: 99px; padding: 8px 16px; min-height: 44px; font-weight: 700; white-space: nowrap; display: flex; align-items: center; } .subnav button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpi { background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; } .kpi small { color: var(--ink-2); font-weight: 600; } .kpi strong { font: 700 1.8rem Georgia, serif; }
.kpi[class*=st-] { color: #fff; } .kpi[class*=st-] small { color: #fffc; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.top { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; } .top li { padding-left: 4px; } .top li::marker { font-weight: 700; } .top li { display: list-item; } .top b { float: right; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 130px; margin-top: 10px; } .bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; font-size: .65rem; color: var(--ink-2); } .bar i { display: block; width: 100%; background: var(--green); border-radius: 3px 3px 0 0; min-height: 2px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; } .seg button { border: 1.5px solid var(--line); background: var(--paper-2); border-radius: 10px; padding: 8px 12px; min-height: 42px; font-weight: 600; } .seg button.on { background: var(--ink); color: #fff; }
.tbl-list { width: 100%; border-collapse: collapse; background: var(--paper-2); border-radius: 12px; overflow: hidden; } .tbl-list th, .tbl-list td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); } .tbl-list th { background: #0000000d; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.tbl-list tbody tr { cursor: pointer; } .tbl-list tbody tr:hover { background: #fff; } .tbl-list tr.is-new { background: #fde7e2; font-weight: 700; }
.item-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; } .item-row.off strong { text-decoration: line-through; color: var(--stone); } .item-row small { display: block; color: var(--ink-2); } .item-row select { width: auto; }
.times { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; } .times dt { color: var(--ink-2); } .times dd { margin: 0; font-weight: 700; }
.qr { background: #fff; padding: 8px; border-radius: 12px; line-height: 0; } .qr svg { width: min(70vw, 300px); height: auto; } .url { max-width: 100%; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; } .checklist li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--paper-2); border: 2px solid var(--line); border-radius: 12px; font-weight: 600; }
.checklist .tick { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #0001; font-weight: 800; flex: none; } .checklist li.ok { border-color: var(--ok); background: #eaf6ee; } .checklist li.ok .tick { background: var(--ok); color: #fff; }
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 18px; } .auth .card { width: min(440px, 100%); }
@media print { .nav, .topbar, .banner, .cartbar, #toasts { display: none !important; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* =====================================================================
   THÈME « NUIT » — sombre, premium, accent en dégradé orange (aucun rouge)
   ===================================================================== */
:root {
  --bg: #0f0f10; --surface: #18181b; --surface-2: #222226; --surface-3: #2c2c31; --text: #f6f3ee; --muted: #a1a1aa; --hair: #2e2e34;
  --o1: #ffb347; --o2: #ff7a18; --grad: linear-gradient(135deg, #ffb347 0%, #ff7a18 100%); --on-o: #1b0e00;
  --paper: var(--bg); --paper-2: var(--surface); --ink: var(--text); --ink-2: var(--muted); --line: var(--hair);
  --tomato: #ff8a3d; --saffron: #ffb347; --ok: #3ccf8e; --sky: #7cb7ff; --stone: #6b6b73;
  --radius: 18px; --shadow: 0 10px 30px rgba(0,0,0,.35); --glow: 0 8px 24px rgba(255,122,24,.35);
}
html, body { background: var(--bg); color: var(--text); }
body { font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 500; }
h1, h2, h3 { font-family: Manrope, system-ui, sans-serif; font-weight: 800; letter-spacing: -.02em; }
::selection { background: #ff7a1855; }
:focus-visible { outline-color: var(--o1); }
code { background: #ffffff12; }
.muted { color: var(--muted); }
.error { color: var(--o1); }
hr { border-top-color: var(--hair); }

/* Coque */
.topbar { background: rgba(15,15,16,.85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--hair); }
.logo { background: var(--grad); color: var(--on-o); font-family: Manrope, sans-serif; font-weight: 800; border-radius: 11px; }
.brand-name { font-family: Manrope, sans-serif; font-weight: 800; letter-spacing: -.01em; }
.conn { background: var(--surface-2); border: 1px solid var(--hair); font-weight: 700; }
.conn.online { background: #3ccf8e22; color: #7ff0bd; border-color: #3ccf8e55; }
.conn.offline, .conn.demo { background: #ff7a1822; color: var(--o1); border-color: #ff7a1855; }
.banner.demo, .banner.offline { background: var(--surface); color: var(--muted); border-bottom: 1px solid var(--hair); font-weight: 600; }
.banner.offline { color: var(--o1); }
.icon-btn:hover, .topbar .icon-btn:hover { background: #ffffff12; }
.nav { background: rgba(24,24,27,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--hair); box-shadow: none; }
.nav-item { color: var(--muted); font-weight: 700; border-top: 0; }
.nav-item.current { color: var(--o1); background: transparent; }
.nav-item.current .ico { filter: none; }
.nav-item.current::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad); }
.nav-item .badge-n { background: var(--grad); color: var(--on-o); font-weight: 800; }
.nav-item .todo { color: var(--o1); }
@media (min-width: 900px) {
  .nav { border-right: 1px solid var(--hair); border-top: 0; background: var(--surface); }
  .nav-item { border-left: 0; margin: 4px 10px; border-radius: 16px; }
  .nav-item.current { background: #ff7a1814; } .nav-item.current::before { top: 22%; bottom: 22%; left: -10px; right: auto; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
}

/* Composants */
.btn { background: var(--surface-2); color: var(--text); border: 1px solid var(--hair); border-radius: 14px; font-weight: 700; transition: transform .1s, filter .15s, background .15s; }
.btn:hover:not(:disabled) { background: var(--surface-3); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn.primary, .btn.saffron { background: var(--grad); border: 0; color: var(--on-o); box-shadow: var(--glow); }
.btn.primary:hover:not(:disabled), .btn.saffron:hover:not(:disabled) { background: var(--grad); filter: brightness(1.07); }
.btn.green { background: #3ccf8e; border: 0; color: #04200f; }
.btn.danger { background: transparent; border: 1px solid #ff7a1866; color: var(--o1); } .btn.danger:hover:not(:disabled) { background: #ff7a1814; }
.btn-link { color: var(--o1); }
.card, .kpi, .tbl-list { background: var(--surface); border: 1px solid var(--hair); box-shadow: none; }
.card.info { background: #ffb34710; border-color: #ffb34733; color: var(--text); }
.card.error { background: #ff7a1814; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=search], select, textarea {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--hair); border-radius: 12px; }
input::placeholder, textarea::placeholder { color: #6b6b73; }
select option { background: var(--surface-2); color: var(--text); }
.opt { background: var(--surface-2); border: 1px solid var(--hair); } .opt:has(input:checked) { border-color: var(--o2); background: #ff7a1812; }
.opt input { accent-color: var(--o2); }
.opt-group { border: 1px solid var(--hair); }
.req-tag { background: var(--grad); color: var(--on-o); } .opt-tag { background: #ffffff12; }
.chip { background: var(--surface-2); border: 1px solid var(--hair); color: var(--text); }
.chip.warn { background: #ff7a1818; border-color: #ff7a1855; color: var(--o1); }
.badge { color: var(--on-o); }
.st-new { background: var(--grad); } .st-preparing { background: #ffd28a; } .st-ready { background: #3ccf8e; color: #04200f; } .st-served { background: #3a3a40; color: var(--text); } .st-cancelled { background: #2a2a2e; color: var(--muted); }
.kpi[class*=st-] { color: var(--on-o); } .kpi[class*=st-] small { color: inherit; opacity: .8; }
.kpi.st-served, .kpi.st-cancelled { color: var(--text); }
.kpi strong { font-family: Manrope, sans-serif; font-weight: 800; }
.count { background: #ffffff1a; color: var(--text); }
.empty { color: var(--muted); }
.switch .slider { background: #3a3a40; } .switch input:checked + .slider { background: var(--o2); }
.sheet { background: var(--surface); border: 1px solid var(--hair); box-shadow: 0 -20px 60px #000a; }
.backdrop { background: #000b; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.toast { background: var(--surface-3); color: var(--text); border: 1px solid var(--hair); } .toast.ok { background: #1d3a2c; color: #9ff2c9; } .toast.error { background: #3a2410; color: var(--o1); }
.subnav button, .seg button { background: var(--surface); border: 1px solid var(--hair); color: var(--muted); }
.subnav button.on, .seg button.on { background: var(--grad); color: var(--on-o); border-color: transparent; }
.subnav .count { background: #0003; color: inherit; }
.tbl-list th { background: var(--surface-2); color: var(--muted); } .tbl-list th, .tbl-list td { border-bottom-color: var(--hair); }
.tbl-list tbody tr:hover { background: var(--surface-2); } .tbl-list tr.is-new { background: #ff7a1812; }
.item-row { border-bottom-color: var(--hair); }
.bar i { background: var(--grad); }
.checklist li { background: var(--surface); border: 1px solid var(--hair); } .checklist li.ok { background: #3ccf8e12; border-color: #3ccf8e55; } .checklist li.ok .tick { background: #3ccf8e; color: #04200f; } .checklist .tick { background: #ffffff12; }
.qr { background: #fff; }
.auth .card { background: var(--surface); }
.brand.big { color: var(--text); } .brand.big .logo { background: var(--grad); color: var(--on-o); }

/* Alertes : alternance orange dégradé / sombre (1,6 s), jamais de rouge */
@keyframes passe-alt { 0%, 49.99% { background: var(--grad); color: var(--on-o); } 50%, 100% { background: var(--surface-2); color: var(--o1); } }
@keyframes passe-alt-border { 0%, 49.99% { border-color: var(--o2); box-shadow: 0 0 0 4px #ff7a1855, var(--glow); } 50%, 100% { border-color: var(--hair); box-shadow: none; } }
[data-anim=off] .alert-blink { background: var(--grad); color: var(--on-o); }
[data-anim=off] .alert-blink-border { border-color: var(--o2); box-shadow: 0 0 0 4px #ff7a1855; }
.nav-item.alert-blink { border-radius: 16px; }
.col-head { background: var(--surface); color: var(--text); border: 1px solid var(--hair); font-weight: 800; font-size: 1.25rem; border-radius: 16px; }
.col-head.plain { background: transparent; border: 0; }
.col-head .count { background: #ffffff1a; color: inherit; }
.col-head.alert-blink .count { background: #0003; }

/* Cuisine / Salle */
.ticket { background: var(--surface); border: 2px solid var(--hair); border-radius: 20px; }
.ticket.u-warn { border-color: #ffd28a88; } .ticket.u-late { background: #24180e; border-color: var(--o2); }
.tbl { background: var(--grad); color: var(--on-o); border-radius: 16px; } .tbl strong { font-family: Manrope, sans-serif; font-weight: 800; }
.meta .late { background: var(--grad); color: var(--on-o); }
.meta .at { color: var(--muted); }
.lines small { color: var(--muted); } .note { color: var(--o1); }
.order-note { background: #ffb34714; color: #ffd9a8; }
.req { background: var(--surface); border: 1px solid #ffb34755; } .req.bill { background: var(--surface); border-color: #7cb7ff55; }
.tile { background: var(--surface); border: 1px solid var(--hair); color: var(--text); }
.tile small { color: var(--muted); }
.s-cooking { background: #ffb34714; border-color: #ffb34766; } .s-cooking small { color: var(--o1); }
.s-ready { background: #3ccf8e14; border-color: #3ccf8e77; } .s-ready small { color: #7ff0bd; }
.s-bill { background: #7cb7ff14; border-color: #7cb7ff66; } .s-bill small { color: var(--sky); }
.s-call { background: var(--grad); border-color: transparent; color: var(--on-o); } .s-call small { color: var(--on-o); }
.s-served { background: var(--surface-2); }

/* ---------- Client ---------- */
.client { max-width: 1120px; gap: 16px; }
.hero { position: relative; overflow: hidden; border-radius: 28px; padding: 34px 32px; min-height: 280px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px;
  background: radial-gradient(520px 340px at 88% 50%, rgba(255,122,24,.45), transparent 65%), radial-gradient(400px 260px at 100% 0%, rgba(255,179,71,.25), transparent 70%), linear-gradient(160deg, #1d1d21, #121214);
  border: 1px solid var(--hair); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(15,15,16,.0), rgba(15,15,16,.0)); }
.hero > * { position: relative; z-index: 1; }
.hero .kicker { margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 4.2rem); line-height: 1; margin: 10px 0 12px; color: var(--text); }
.hero-sub { margin: 0 0 22px; max-width: 34ch; color: var(--muted); font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.table-chip { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 10px 18px; min-height: 46px; border-radius: 99px; background: var(--grad); color: var(--on-o); font-weight: 800; border: 0; box-shadow: var(--glow); }
.pill { background: #ffffff0f; color: var(--text); border: 1px solid #ffffff1f; border-radius: 99px; padding: 10px 18px; min-height: 46px; font-weight: 700; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pill:hover:not(:disabled) { background: #ffffff1a; } .pill:disabled { color: #7ff0bd; border-color: #3ccf8e55; }
.hero .lang select { background: #ffffff0f; color: var(--text); border: 1px solid #ffffff1f; border-radius: 99px; min-height: 46px; width: auto; }
.hero-art { width: clamp(150px, 30vw, 300px); filter: drop-shadow(0 30px 40px rgba(0,0,0,.6)); animation: none; }
[data-anim=on] .hero-art { animation: passe-float 6s ease-in-out infinite; }
@keyframes passe-float { 50% { transform: translateY(-8px) rotate(-2deg); } }
.hero-art svg { display: block; width: 100%; height: auto; }

.c-tabs { background: var(--surface); border: 1px solid var(--hair); border-radius: 16px; padding: 5px; }
.c-tabs button { color: var(--muted); font-weight: 700; }
.c-tabs button.on { background: var(--surface-3); color: var(--text); box-shadow: none; }
.c-tabs .count { background: var(--grad); color: var(--on-o); }
.c-tabs .todo { color: #7ff0bd; }
@keyframes passe-alt-ok { 0%, 49.99% { background: var(--grad); color: var(--on-o); } 50%, 100% { background: transparent; color: var(--o1); } }
.cat-chips { gap: 8px; padding: 10px 0 12px; top: 60px; background: linear-gradient(var(--bg) 80%, transparent); }
.cat-chips .chip { background: var(--surface); border: 1px solid var(--hair); color: var(--text); font-weight: 700; padding: 8px 18px; }
.cat-chips .chip:hover { border-color: var(--o2); color: var(--o1); }
.cat h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin: 26px 0 14px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.item { flex-direction: column; align-items: stretch; padding: 0; margin: 0; gap: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--hair); border-radius: 22px; transition: transform .15s, border-color .15s; }
.item:hover { transform: translateY(-3px); border-color: #3a3a42; }
.item .vis { position: relative; height: 160px; display: grid; place-items: center; overflow: hidden; }
.item .vis::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 55%, rgba(255,122,24,.22), transparent 60%); }
.item .vis > span:first-child { position: relative; z-index: 1; display: grid; place-items: center; width: 112px; height: 112px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #3a3a40, #232327 70%); box-shadow: 0 18px 30px rgba(0,0,0,.55), inset 0 1px 0 #ffffff14; font-size: 3.6rem; }
.item .vis img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.item .txt { padding: 4px 18px 2px; flex: 1; }
.item h3 { font-size: 1.1rem; font-weight: 800; }
.item .desc { color: var(--muted); font-size: .88rem; margin: 6px 0; }
.al { background: #ffffff0d; border: 1px solid var(--hair); color: var(--muted); font-weight: 600; }
.item .price { margin: 8px 0 0; color: var(--muted); font-size: .85rem; font-weight: 600; }
.item .price strong { color: var(--text); font-size: 1.25rem; font-weight: 800; margin-right: 4px; }
.item .stepper { align-self: flex-end; margin: 10px 14px 16px; background: var(--surface-2); border: 1px solid var(--hair); border-radius: 99px; padding: 4px; gap: 6px; }
.step-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface-3); color: var(--text); font-size: 1.5rem; }
.step-btn.plus { background: var(--grad); color: var(--on-o); box-shadow: var(--glow); }
.step-btn:disabled { opacity: .3; box-shadow: none; }
.qty { color: #5f5f66; font-weight: 800; } .qty.on { color: var(--text); }
.item.off { opacity: .45; }
.legal { color: #6b6b73; }
.cartbar { background: var(--surface-2); color: var(--muted); border: 1px solid var(--hair); border-radius: 22px; box-shadow: 0 16px 40px rgba(0,0,0,.6); font-weight: 700; }
.cartbar.has { background: var(--grad); color: var(--on-o); border-color: transparent; box-shadow: 0 16px 40px rgba(255,122,24,.35); }
.cartbar.has strong { font-size: 1.25rem; font-weight: 800; }
.cartbar .go { background: #1b0e0022; padding: 8px 14px; border-radius: 14px; } .cartbar:not(.has) .go { display: none; }
.cart-lines li { border-bottom-color: var(--hair); } .cart-lines small { color: var(--muted); }
.total-row strong { font-weight: 800; } .total-row.big { background: var(--surface); border: 1px solid var(--hair); }
.track li { color: #5f5f66; } .track .dot { background: var(--surface-2); border: 2px solid #3a3a40; color: var(--muted); }
.track li.done { color: #7ff0bd; } .track li.done .dot { background: #3ccf8e; border-color: #3ccf8e; color: #04200f; }
.track li.now { color: var(--o1); } .track li.now .dot { background: var(--grad); border-color: transparent; color: var(--on-o); }
.ready-msg { background: #3ccf8e18; color: #9ff2c9; }
.picker .tile { background: var(--surface); }

@media (max-width: 640px) {
  .brand-name { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .brand { min-width: 0; flex: 1; } .topbar .grow { display: none; }
  .hero { grid-template-columns: 1fr; padding: 24px 20px; border-radius: 24px; min-height: 0;
    background: radial-gradient(300px 240px at 100% 10%, rgba(255,122,24,.45), transparent 70%), linear-gradient(160deg, #1d1d21, #121214); }
  .hero-art { position: absolute !important; right: -24px; top: -10px; width: 150px; opacity: .9; z-index: 0 !important; }
  .hero-main { position: relative; z-index: 1; }
  .hero h1 { font-size: clamp(1.9rem, 9vw, 2.5rem); max-width: 75%; }
  .hero-sub { max-width: 70%; font-size: .95rem; margin-bottom: 16px; }
  .pill, .table-chip { padding: 8px 14px; min-height: 42px; font-size: .85rem; }
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .item { border-radius: 18px; } .item .vis { height: 112px; } .item .vis > span:first-child { width: 80px; height: 80px; font-size: 2.6rem; }
  .item .txt { padding: 2px 12px; } .item h3 { font-size: .98rem; }
  .item .desc { font-size: .78rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .item .allergens { display: none; } .item .price strong { font-size: 1.05rem; }
  .item .stepper { align-self: stretch; justify-content: space-between; margin: 8px 10px 12px; } .step-btn { width: 36px; height: 36px; font-size: 1.25rem; }
  .cartbar { gap: 8px; padding: 8px 10px 8px 16px; font-size: .9rem; } .cartbar .go { padding: 8px 10px; }
}
@media (max-width: 360px) { .cat-grid { grid-template-columns: 1fr; } }
