/* PRESSÉ — back-office de démo (Démesure). Même charte que le site, en plus dense : c'est un outil. */

:root {
  --mustard: #ffcf1a;
  --ketchup: #ff3d24;
  --pickle: #6cc04a;
  --cream: #fff3dc;
  --paper: #fffaf0;
  --ink: #1a0f08;
  --brown: #7a3b17;
  --muted: #7d6656;
  --line: rgba(26, 15, 8, .12);
  --ghost: #e6d3b5;
  --closed: rgba(26, 15, 8, .05);
  --good: #2f7a1a;
  --bad: #c22a12;
  --font: "Bricolage Grotesque", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --b: 2.5px solid var(--ink);
  --sh: 5px 5px 0 var(--ink);
  --r: 18px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --top: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; /* garde-fou iPhone : jamais de défilement horizontal */ }
body {
  margin: 0; min-height: 100vh;
  background: var(--cream); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--ketchup); outline-offset: 2px; }
::selection { background: var(--ketchup); color: var(--cream); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.kicker { font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brown); }
.muted { color: var(--muted); }
.link { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--ketchup); }
.link:hover { color: var(--ketchup); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px;
  background: var(--ink); color: var(--mustard);
  border: var(--b); border-radius: 12px; box-shadow: 4px 4px 0 var(--ketchup);
  font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; text-decoration: none;
  transition: transform .25s var(--spring), box-shadow .25s var(--spring);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ketchup); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ketchup); }
.btn--sm { height: 38px; padding: 0 14px; font-size: 12.5px; border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); }
.btn--sm:hover { box-shadow: 5px 5px 0 var(--ink); }
.btn--light { background: var(--paper); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.btn--light:hover { box-shadow: 5px 5px 0 var(--ink); }

/* Bandeau démo */
.demo-bar { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; padding: 8px 20px; background: var(--ink); color: rgba(255, 243, 220, .75); font-size: 12.5px; }
.demo-bar a { color: var(--mustard); text-decoration: underline; text-underline-offset: 3px; }
.demo-bar__links { display: flex; flex-wrap: wrap; gap: 4px 18px; }

/* Barre du haut */
.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  height: var(--top); padding: 0 20px;
  background: var(--mustard); border-bottom: 3px solid var(--ink);
}
.logo { position: relative; display: inline-flex; align-items: baseline; gap: 22px; font-size: 26px; font-weight: 800; letter-spacing: -.03em; font-variation-settings: "wdth" 75; text-decoration: none; }
.logo i { position: absolute; left: 86px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--ketchup); border: 2px solid var(--ink); }
.logo small { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--ink); color: var(--mustard); transform: translateY(-3px); }
.seg { display: inline-flex; border: var(--b); border-radius: 999px; overflow: hidden; background: var(--paper); flex: none; }
.seg button { height: 36px; padding: 0 14px; font-weight: 800; font-size: 13.5px; white-space: nowrap; transition: background-color .2s, color .2s; }
.seg button + button { border-left: 2px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--mustard); }
.seg button:not([aria-pressed="true"]):hover { background: var(--cream); }
.seg[hidden] { display: none; }
.seg--resto { margin-left: 10px; }
.resto-select { display: none; }
.resto-select select { height: 38px; padding: 0 32px 0 12px; border: var(--b); border-radius: 999px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231a0f08' stroke-width='2.5'/%3E%3C/svg%3E") no-repeat right 12px center; font-weight: 800; font-size: 14px; appearance: none; }
.top__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.clock { font-family: var(--mono); font-weight: 700; font-size: 14px; padding: 0 6px; white-space: nowrap; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: var(--b); border-radius: 50%; background: var(--paper); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .icon-off { opacity: 0; }
.icon-btn[aria-pressed="false"] .icon-off { opacity: 1; }
.icon-btn[aria-pressed="false"] { background: var(--cream); }

/* Structure */
.shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: calc(100vh - var(--top)); }
.side {
  position: sticky; top: var(--top); align-self: start; height: calc(100vh - var(--top));
  display: flex; flex-direction: column; gap: 6px; padding: 18px 14px;
  border-right: 3px solid var(--ink); background: var(--cream);
}
.side a { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 12px; border-radius: 12px; font-weight: 800; font-size: 16px; text-decoration: none; border: 2.5px solid transparent; transition: background-color .2s, transform .25s var(--spring); }
.side a svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.side a:hover { background: var(--paper); border-color: var(--ink); transform: translateX(3px); }
.side a[aria-current="page"] { background: var(--ink); color: var(--mustard); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ketchup); }
.badge { margin-left: auto; min-width: 24px; height: 24px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--ketchup); color: var(--cream); font-size: 12.5px; animation: bump .6s var(--spring); }
.badge--warn { background: var(--mustard); color: var(--ink); border: 2px solid var(--ink); }
.badge[hidden] { display: none; }
.side__foot { margin-top: 28px; padding: 14px 6px 0; border-top: 2px dashed rgba(26, 15, 8, .25); font-size: 12.5px; color: var(--muted); }
.side__foot button { margin-top: 6px; font-weight: 800; font-size: 13px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
main { padding: 26px clamp(16px, 2.6vw, 34px) 60px; min-width: 0; }
@keyframes bump { 40% { transform: scale(1.25) rotate(-6deg); } }

/* En-têtes de vue */
.view[hidden] { display: none; }
.view { animation: view-in .45s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } }
.view__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.view__head h1 { font-size: clamp(38px, 5vw, 64px); font-weight: 800; line-height: .9; letter-spacing: -.035em; text-transform: uppercase; font-variation-settings: "wdth" 75; margin-top: 6px; }
.view__head h1 span { color: var(--ketchup); -webkit-text-stroke: 0; }
.view__tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hint { margin-top: 16px; font-size: 14px; color: var(--muted); max-width: 760px; }
.hint .link { color: var(--ink); }

.switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; cursor: pointer; }
.switch input { appearance: none; width: 46px; height: 26px; border-radius: 999px; border: var(--b); background: var(--paper); position: relative; cursor: pointer; flex: none; transition: background-color .2s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: var(--ink); transition: transform .3s var(--spring); }
.switch input:checked { background: var(--pickle); }
.switch input:checked::after { transform: translateX(20px); }

/* Panneaux */
.panel { background: var(--paper); border: var(--b); border-radius: var(--r); box-shadow: var(--sh); padding: 20px 22px; min-width: 0; }
.panel--flush { padding: 0; overflow: hidden; }
.panel__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px 20px; flex-wrap: wrap; margin-bottom: 14px; }
.panel h2 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.note { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; }

/* ---------- SERVICE ---------- */
.pulse { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.pulse div { display: flex; flex-direction: column; padding: 12px 16px; background: var(--paper); border: var(--b); border-radius: 14px; }
.pulse span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.pulse b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variation-settings: "wdth" 85; line-height: 1.15; }

.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 14px; background: var(--ink); border-radius: 24px; box-shadow: 6px 6px 0 var(--ketchup); min-height: 460px; }
.col { display: flex; flex-direction: column; min-width: 0; }
.col h2 { display: flex; align-items: center; gap: 10px; padding: 6px 8px 12px; color: var(--cream); font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.col h2 b { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: var(--cream); color: var(--ink); font-size: 13px; }
.col[data-col="new"] h2 b { background: var(--ketchup); color: var(--cream); }
.col[data-col="ready"] h2 b { background: var(--pickle); color: var(--ink); }
.col__list { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 4px; border-radius: 16px; background: rgba(255, 243, 220, .05); min-height: 120px; }
.col__list:empty::before { content: attr(data-empty); display: grid; place-items: center; min-height: 110px; color: rgba(255, 243, 220, .35); font-family: var(--mono); font-size: 12px; text-align: center; padding: 10px; }

.ticket {
  position: relative; padding: 12px 14px 12px;
  background: var(--paper); color: var(--ink);
  border-radius: 10px 10px 4px 4px;
  font-family: var(--mono); font-size: 13px;

  mask: linear-gradient(#000 0 0) top / 100% calc(100% - 6px) no-repeat, radial-gradient(circle at 6px 6px, transparent 4.5px, #000 5px) bottom left / 12px 6px repeat-x;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 6px) no-repeat, radial-gradient(circle at 6px 6px, transparent 4.5px, #000 5px) bottom left / 12px 6px repeat-x;
  padding-bottom: 18px;
}
.ticket.is-new { animation: ticket-in .7s var(--spring); }
.ticket.is-moved { animation: ticket-move .5s var(--spring); }
.ticket.is-gone { animation: ticket-out .42s var(--ease) forwards; }
@keyframes ticket-in { 0% { transform: translateY(-40px) rotate(-6deg) scale(.9); opacity: 0; } 60% { opacity: 1; } }
@keyframes ticket-move { 0% { transform: translateX(-30px) rotate(-3deg); opacity: .4; } }
@keyframes ticket-out { to { transform: translateX(60px) rotate(8deg); opacity: 0; } }
.ticket.is-mine { background: #fff; box-shadow: inset 0 0 0 3px var(--ketchup); }
.ticket__mine { position: absolute; top: 9px; right: 50%; transform: translateX(50%) rotate(-2deg); padding: 2px 8px; border-radius: 6px; background: var(--ketchup); color: var(--cream); font-family: var(--font); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.ticket__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ticket__no { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.ticket__time { padding: 3px 8px; border-radius: 6px; background: rgba(26, 15, 8, .08); font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ticket[data-level="slow"] .ticket__time { background: var(--mustard); }
.ticket[data-level="late"] .ticket__time { background: var(--ketchup); color: var(--cream); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .55; } }
.ticket__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 8px 0 10px; font-family: var(--font); font-size: 12.5px; color: var(--muted); }
.ticket__meta b { color: var(--ink); font-size: 14px; }
.chan { padding: 1px 7px; border-radius: 999px; border: 1.5px solid var(--ink); color: var(--ink); font-weight: 700; font-size: 11.5px; }
.chan--click { background: var(--mustard); }
.chan--livraison { background: #ffd9c9; }
.ticket__lines { border-top: 2px dashed rgba(26, 15, 8, .2); padding-top: 6px; }
.tl { display: flex; gap: 8px; width: 100%; padding: 5px 4px; text-align: left; border-radius: 6px; font-family: var(--mono); font-size: 13.5px; line-height: 1.3; }
.tl:hover { background: rgba(26, 15, 8, .05); }
.tl b { flex: none; min-width: 26px; }
.tl small { display: block; font-size: 11.5px; color: var(--muted); }
.tl[aria-pressed="true"] span { text-decoration: line-through; text-decoration-thickness: 2px; opacity: .45; }
.tl[aria-pressed="true"] b { color: var(--good); }
.ticket__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 2px dashed rgba(26, 15, 8, .2); }
.ticket__total { font-weight: 700; }
.ticket__go { height: 38px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 10px; background: var(--ink); color: var(--mustard); font-family: var(--font); font-weight: 800; font-size: 13.5px; text-transform: uppercase; box-shadow: 3px 3px 0 var(--ketchup); transition: transform .2s var(--spring), box-shadow .2s var(--spring); }
.ticket__go:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ketchup); }
.ticket__go:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ketchup); }
.ticket[data-status="prep"] .ticket__go { background: var(--pickle); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.ticket[data-status="ready"] .ticket__go { background: var(--paper); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }

/* ---------- CHIFFRES ---------- */
.insights { margin-bottom: 18px; background: var(--ink); color: var(--cream); box-shadow: 5px 5px 0 var(--ketchup); }
.insights h2 { font-size: 13px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mustard); margin-bottom: 12px; }
.insights ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 26px; }
.ins { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.ins svg { width: 22px; height: 22px; flex: none; margin-top: 1px; fill: none; stroke: var(--mustard); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ins--alert svg { stroke: var(--ketchup); }
.ins b { color: var(--mustard); font-weight: 800; }
.ins a { color: var(--cream); font-weight: 700; text-decoration-color: var(--ketchup); text-underline-offset: 3px; }

.kpis { display: grid; grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--paper); border: var(--b); border-radius: var(--r); box-shadow: var(--sh); min-width: 0; }
.kpi__label { font-size: 13px; font-weight: 700; color: var(--muted); }
.kpi__value { font-size: 32px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variation-settings: "wdth" 85; white-space: nowrap; }
.kpi--hero { background: var(--mustard); }
.kpi--hero .kpi__label { color: var(--ink); }
.kpi--hero .kpi__value { font-size: clamp(40px, 4.4vw, 56px); }
.kpi__foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 13px; }
.kpi__foot small { color: var(--brown); font-size: 12px; }
.kpi .spark { position: absolute; right: 14px; top: 16px; }
.spark path { fill: none; stroke: rgba(26, 15, 8, .4); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--ketchup); stroke: var(--paper); stroke-width: 2; }
.kpi--hero .spark circle { stroke: var(--mustard); }
.delta { font-weight: 800; font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.delta--good { color: var(--good); }
.delta--bad { color: var(--bad); }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.panel--wide { grid-column: 1 / -1; }
.chart { position: relative; width: 100%; min-height: 200px; }
.chart--heat { overflow-x: auto; min-height: 0; }
.chart-svg { display: block; overflow: visible; }
.chart-svg .gridline { stroke: var(--line); stroke-width: 1; }
.chart-svg .axis { stroke: rgba(26, 15, 8, .5); stroke-width: 1.5; }
.chart-svg .tick { fill: var(--muted); font-family: var(--mono); font-size: 11px; font-variant-numeric: tabular-nums; }
.col__bar { fill: var(--ink); transition: fill .15s; }
.col__ghost { fill: var(--ghost); }
.col--accent .col__bar { fill: var(--ketchup); }
.col.is-hover .col__bar { fill: var(--brown); }
.col--accent.is-hover .col__bar { fill: #c22a12; }
.col__mark { fill: var(--ink); font-family: var(--font); font-weight: 800; font-size: 12px; }
.hit { fill: transparent; cursor: crosshair; outline: none; }
.cell.is-hover rect:first-child { stroke: var(--ink); stroke-width: 2; }
.cell__peak { font-family: var(--font); font-weight: 800; font-size: 12px; fill: var(--ink); pointer-events: none; }
.cell__peak.is-light { fill: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.sw--bar { background: var(--ink); }
.sw--ghost { background: var(--ghost); }
.legend--ramp i { display: inline-block; width: 120px; height: 10px; border-radius: 5px; }

.tip { position: fixed; left: 0; top: 0; z-index: 90; max-width: 260px; padding: 9px 12px; background: var(--ink); color: var(--cream); border-radius: 10px; font-size: 13px; line-height: 1.4; pointer-events: none; box-shadow: 3px 3px 0 var(--ketchup); }
.tip b { color: var(--mustard); }
.tip .muted { color: rgba(255, 243, 220, .7); }
.tip[hidden] { display: none; }

.meter { display: block; height: 10px; border-radius: 5px; background: rgba(26, 15, 8, .08); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 5px; background: var(--ink); transition: width .6s var(--ease); }

.rank__row { display: grid; grid-template-columns: 22px 54px minmax(0, 1fr) 62px 62px; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.rank__row:last-child { border-bottom: 0; }
.rank__n { font-family: var(--mono); font-weight: 700; color: var(--muted); }
.rank__art svg { display: block; width: 54px; height: auto; }
.rank__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rank__name { font-weight: 800; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank__name em { font-style: normal; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; padding: 1px 6px; border-radius: 5px; background: var(--mustard); border: 1.5px solid var(--ink); vertical-align: 2px; }
.rank__num { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rank__num b { font-size: 17px; }
.rank__num small { font-size: 11.5px; color: var(--muted); }
.rank__d { text-align: right; }
.rank__row:first-child .meter i { background: var(--ketchup); }

.bars li { display: grid; grid-template-columns: 112px minmax(0, 1fr) 46px 52px; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bars li:last-child { border-bottom: 0; }
.bars__label { font-weight: 700; font-size: 14px; }
.bars b { text-align: right; font-variant-numeric: tabular-nums; }
.bars .delta { text-align: right; font-size: 12px; }

.split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.split__item { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 2px solid var(--ink); border-radius: 12px; }
.split__item > span:first-child { font-weight: 700; font-size: 13px; }
.split__item b { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variation-settings: "wdth" 85; }
.split__item small { font-size: 12px; color: var(--muted); }
.split__foot { grid-column: 1 / -1; padding-top: 6px; font-size: 14px; }
.split__foot b { font-size: 18px; }

/* ---------- STOCKS ---------- */
.stock-sum { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); font-size: 13.5px; font-weight: 600; }
.pill svg, .lvl svg { width: 18px; height: 18px; padding: 2px; border-radius: 50%; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; flex: none; }
.pill--ok svg, .lvl-ok .lvl svg { background: var(--pickle); }
.pill--warn svg, .lvl-warn .lvl svg { background: var(--mustard); }
.pill--crit svg, .pill--out svg, .lvl-crit .lvl svg, .lvl-out .lvl svg { background: var(--ketchup); stroke: #fff; }
.stock { width: 100%; border-collapse: collapse; font-size: 14px; }
.stock th, .stock td { padding: 12px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.stock thead th { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; background: var(--cream); border-bottom: 2px solid var(--ink); }
.stock tbody th b { display: block; font-size: 15px; }
.stock tbody th small { font-weight: 500; font-size: 12px; color: var(--muted); }
.stock tbody tr:last-child > * { border-bottom: 0; }
.stock .num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }
.stock .act { text-align: right; white-space: nowrap; }
.stock .act .link { font-size: 13px; }
.stock .act .ordered + .link { display: block; margin: 4px 0 0 auto; font-size: 12.5px; }
.stock td .link { font-size: 12.5px; }
.lvl-out, .lvl-crit { background: rgba(255, 61, 36, .07); }
.gauge { position: relative; display: block; width: 130px; height: 12px; border-radius: 6px; background: rgba(26, 15, 8, .08); overflow: hidden; margin-bottom: 6px; }
.gauge i { display: block; height: 100%; border-radius: 6px; background: var(--pickle); transition: width .6s var(--ease); }
.gauge u { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); opacity: .5; }
.lvl-warn .gauge i { background: var(--mustard); }
.lvl-crit .gauge i, .lvl-out .gauge i { background: var(--ketchup); }
.lvl { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; }
.ordered { display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--good); }

/* ---------- CARTE ---------- */
.menu-list .mi-head { padding: 14px 20px 8px; background: var(--cream); font-family: var(--mono); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brown); border-bottom: 2px solid var(--ink); }
.menu-list .mi-head:not(:first-child) { border-top: 2px solid var(--ink); }
.mi { display: grid; grid-template-columns: 64px minmax(0, 1fr) 96px 92px 150px; align-items: center; gap: 16px; padding: 10px 20px; border-bottom: 1px solid var(--line); transition: background-color .3s; }
.mi:last-child { border-bottom: 0; }
.mi__art svg { display: block; width: 64px; height: auto; transition: filter .3s, opacity .3s; }
.side-art { display: block; width: 50px; height: 50px; margin: 0 auto; overflow: visible; }
.mi__body b { display: block; font-size: 16.5px; }
.mi__body small { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; }
.mi__num { display: flex; flex-direction: column; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mi__num b { font-size: 19px; }
.mi__num small { font-size: 11.5px; color: var(--muted); }
.mi__price { font-weight: 800; font-size: 17px; text-align: right; white-space: nowrap; }
.mi.is-off { background: rgba(26, 15, 8, .04); }
.mi.is-off .mi__art svg { filter: grayscale(1); opacity: .5; }
.mi.is-off .mi__body b { text-decoration: line-through; text-decoration-thickness: 2px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; justify-self: end; cursor: pointer; font-weight: 800; font-size: 13.5px; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle__ui { position: relative; width: 50px; height: 28px; border-radius: 999px; border: var(--b); background: var(--ketchup); transition: background-color .2s; flex: none; }
.toggle__ui::after { content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); transition: transform .3s var(--spring); }
.toggle input:checked + .toggle__ui { background: var(--pickle); }
.toggle input:checked + .toggle__ui::after { transform: translateX(22px); }
.toggle input:focus-visible + .toggle__ui { outline: 3px solid var(--ketchup); outline-offset: 2px; }
.toggle__txt { min-width: 64px; }

/* ---------- Notifications ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.note-toast { pointer-events: auto; display: flex; flex-direction: column; max-width: 360px; padding: 12px 16px; border: var(--b); border-radius: 14px; background: var(--paper); box-shadow: var(--sh); font-size: 14px; animation: toast-in .5s var(--spring); transition: opacity .4s, transform .4s var(--ease); }
.note-toast span { font-size: 13px; color: var(--muted); }
.note-toast--hot { background: var(--ketchup); color: var(--cream); cursor: pointer; }
.note-toast--hot span { color: rgba(255, 243, 220, .85); }
.note-toast--ok { background: var(--paper); }
.note-toast--warn { background: var(--mustard); }
.note-toast--warn span { color: var(--ink); }
.note-toast.is-out { opacity: 0; transform: translateX(30px); }
@keyframes toast-in { from { transform: translateY(30px) rotate(3deg); opacity: 0; } }

/* ---------- Accueil ---------- */
.welcome { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(26, 15, 8, .55); opacity: 0; transition: opacity .35s; }
.welcome.is-on { opacity: 1; }
.welcome[hidden] { display: none; }
.welcome__card { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 28px; background: var(--mustard); border: 3px solid var(--ink); border-radius: 26px; box-shadow: 8px 8px 0 var(--ink); transform: translateY(20px) rotate(-1.5deg); transition: transform .6s var(--spring); }
.welcome.is-on .welcome__card { transform: none; }
.welcome h2 { font-size: clamp(34px, 5vw, 50px); font-weight: 800; line-height: .92; letter-spacing: -.035em; text-transform: uppercase; font-variation-settings: "wdth" 75; margin: 8px 0 14px; }
.welcome p { font-size: 16px; }
.welcome .kicker { color: var(--ink); }
.welcome ol { counter-reset: s; margin: 16px 0 22px; display: grid; gap: 10px; }
.welcome li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; font-size: 15px; }
.welcome li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--mustard); font-weight: 800; }
.welcome__ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .seg--resto { display: none; }
  .resto-select { display: block; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .insights ul { grid-template-columns: 1fr; }
  .mi { grid-template-columns: 56px minmax(0, 1fr) 84px 130px; }
  .mi__num { display: none; }
}
@media (max-width: 980px) {
  .clock { display: none; }
  .grid { grid-template-columns: 1fr; }
  .stock .gauge { width: 90px; }
  .stock th:nth-child(4), .stock td:nth-child(4) { display: none; }
}
@media (max-width: 820px) {
  :root { --top: 58px; }
  .top { gap: 10px; padding: 0 12px; }
  .logo { font-size: 22px; gap: 16px; }
  .logo i { left: 72px; }
  .logo small, .logo i { display: none; }
  .top .btn--sm { display: none; }
  .resto-select select { height: 36px; font-size: 13px; padding-left: 10px; max-width: 150px; }
  .seg button { height: 32px; padding: 0 11px; }
  .icon-btn { width: 36px; height: 36px; }
  .shell { display: block; }
  .side {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 50; height: auto;
    flex-direction: row; gap: 4px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 3px solid var(--ink); background: var(--mustard);
  }
  .side a { flex: 1; position: relative; flex-direction: column; justify-content: center; gap: 2px; height: 56px; padding: 0 4px; font-size: 11.5px; border-radius: 12px; }
  .side a:hover { transform: none; background: transparent; border-color: transparent; }
  .side a[aria-current="page"] { box-shadow: none; }
  .side .badge { position: absolute; top: 3px; right: calc(50% - 26px); margin: 0; min-width: 20px; height: 20px; font-size: 11px; padding: 0 5px; }
  .side__foot { display: none; }
  main { padding: 18px 14px calc(96px + env(safe-area-inset-bottom)); }
  .toasts { left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); align-items: stretch; }
  .note-toast { max-width: none; }
  .pulse { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
  .pulse div { padding: 8px 12px; border-radius: 12px; }
  .pulse span { font-size: 11.5px; line-height: 1.25; }
  .pulse b { font-size: 19px; }
  .view__head { margin-bottom: 14px; }
  .board { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding: 10px; margin: 0 -14px; border-radius: 0; box-shadow: none; min-height: 420px; }
  .col { flex: 0 0 84%; scroll-snap-align: center; }
  .kpi__value { font-size: 25px; }
  .kpi--hero { grid-column: 1 / -1; }
  .kpi--hero .kpi__value { font-size: 34px; }
  .kpi .spark { display: none; }
  .bars li { grid-template-columns: 92px minmax(0, 1fr) 40px 44px; gap: 8px; }
  .rank__row { grid-template-columns: 18px 44px minmax(0, 1fr) 50px; }
  .rank__art svg { width: 44px; }
  .rank__d { display: none; }
  .split { grid-template-columns: 1fr; }
  .split__item { display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .split__item .meter { grid-column: 1 / -1; }
  .split__item small { grid-column: 1 / -1; }
  .stock thead { display: none; }
  .stock, .stock tbody, .stock tr { display: block; }
  .stock tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .stock th, .stock td { padding: 0; border: 0; }
  .stock tbody th { grid-column: 1; }
  .stock td:nth-child(2) { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
  .stock .gauge { flex: 1; margin: 0; width: auto; }
  .stock td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; }
  .stock td:nth-child(5) { grid-column: 1; font-size: 13px; color: var(--muted); }
  .stock .act { grid-column: 2; }
  .mi { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px 12px; padding: 12px 14px; }
  .mi__art svg { width: 48px; }
  .side-art { width: 40px; height: 40px; }
  .mi__body small { display: none; }
  .mi__price { grid-column: 2; grid-row: 2; text-align: left; font-size: 15px; }
  .toggle { grid-column: 3; grid-row: 1 / 3; flex-direction: column; gap: 4px; font-size: 11.5px; }
  .toggle__txt { min-width: 0; }
  .welcome__card { padding: 22px; }
  .demo-bar { padding: 8px 14px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
