/* ==========================================================================
   COMPTOIR 7 — gestion du dépôt (back-office). Barre latérale bleu dépôt,
   contenu sur papier, bons de commande comme des étiquettes de carton.
   ========================================================================== */

html { overflow-x: clip; }
body.adm { background: var(--paper); overflow-x: clip; }
.i--out { width: 15px; height: 15px; margin-left: auto; opacity: .55; }

/* ---------- Coque ------------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100vh - 34px); }
.side { position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 24px; padding: 22px 14px 56px; background: var(--depot); color: rgba(255, 253, 249, .8); scrollbar-width: thin; }
.side__logo { display: block; padding: 0 6px; color: #fff; text-decoration: none; }
.side__logo .logo-mark { width: 38px; height: 38px; }
.side__logo .logo__word { font-size: 27px; }
.side__logo .logo__word small { color: rgba(255, 253, 249, .6); opacity: 1; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 14.5px; color: rgba(255, 253, 249, .74); transition: background-color .2s, color .2s; }
.nav a .i { width: 20px; height: 20px; }
.nav a:hover { background: rgba(255, 253, 249, .07); color: #fff; }
.nav a[aria-current="page"] { background: var(--paper); color: var(--ink); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--signal); }
.nav__badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: var(--carton); color: var(--ink); font-style: normal; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.nav__badge--signal { background: var(--signal); color: #fff; animation: badge-pulse 2s ease-in-out infinite; }
.nav__badge--red { background: var(--red); color: #fff; }
@keyframes badge-pulse { 50% { box-shadow: 0 0 0 5px rgba(255, 106, 19, .22); } }
.side__k { margin: 0 0 6px 12px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 253, 249, .45); }
.side__apps { display: flex; flex-direction: column; gap: 1px; }
.side__apps a { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 12px; border-radius: 9px; color: rgba(255, 253, 249, .7); font-size: 13.5px; font-weight: 550; text-decoration: none; }
.side__apps a:hover { background: rgba(255, 253, 249, .07); color: #fff; }
.side__apps .i { width: 17px; height: 17px; }
.side__foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding: 14px 8px 0; border-top: 1px dashed rgba(255, 253, 249, .16); }
.live-dot { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; line-height: 1.4; color: rgba(255, 253, 249, .6); }
.live-dot i { position: relative; flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #4fd18b; }
.live-dot i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #4fd18b; animation: ping 2s infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3); opacity: 0; } }
.side__reset { background: transparent; color: rgba(255, 253, 249, .85); border-color: rgba(255, 253, 249, .22); }
.side__reset:hover { color: #fff; border-color: rgba(255, 253, 249, .55); }

.main { min-width: 0; padding: 24px clamp(16px, 2.6vw, 36px) 90px; outline: none; }
.topbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 20px; }
.topbar__l { min-width: 0; }
.topbar__date { margin-bottom: 6px; color: var(--kraft-2); }
.topbar__h { font-size: clamp(36px, 4.2vw, 58px); letter-spacing: -.005em; }
.topbar__r { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.clock { padding: 0 6px; font-size: 13.5px; color: var(--ink-3); }
.icon-btn { display: none; width: 44px; height: 44px; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: var(--white); color: var(--ink-2); }
.icon-btn .i { width: 19px; height: 19px; }

/* ---------- Blocs ------------------------------------------------------------------ */
.grid { display: grid; gap: 14px; }
.grid--kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: start; }
.grid--2e { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.panel { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 14px; }
.panel h2 { display: flex; align-items: center; gap: 9px; font-size: 18px; letter-spacing: -.01em; }
.panel__sub { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--ink-3); font-size: 13px; }
.panel__note { display: flex; gap: 8px; color: var(--ink-3); font-size: 13px; line-height: 1.45; }
.panel__note .i { width: 16px; height: 16px; margin-top: 2px; }
.panel--hot { border-color: var(--signal); box-shadow: 0 0 0 3px rgba(255, 106, 19, .12), var(--shadow); }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--signal); color: #fff; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.count--red { background: var(--red); }
.count--plain { background: var(--carton); color: var(--ink-2); }
.empty { padding: 18px; border-radius: var(--r-sm); background: var(--carton); color: var(--ink-3); text-align: center; font-size: 14px; }
.linkbtn { padding: 0; border: 0; background: none; color: var(--depot); font-weight: 650; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.btn--ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn--ok:hover { background: #258a4e; border-color: #258a4e; }
.btn--pay { background: var(--warn-soft); border-color: #e9c46a; color: #6d4700; }

/* Tuiles de chiffres */
.kpi { position: relative; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow: hidden; }
.kpi[data-go] { cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s; }
.kpi[data-go]:hover { transform: translateY(-2px); }
.kpi__k { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.kpi__v { font-family: var(--display); font-stretch: 68%; font-weight: 800; font-size: clamp(34px, 3.1vw, 46px); line-height: 1; letter-spacing: -.005em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi__v small { font-size: .5em; color: var(--ink-3); }
.kpi small { color: var(--ink-2); font-size: 13px; line-height: 1.35; }
.kpi__spark { position: absolute; top: 14px; right: 14px; }
.spark path { fill: none; stroke: var(--kraft); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark circle { fill: var(--signal); }
.kbar { display: block; height: 7px; margin: 4px 0 2px; border-radius: 999px; background: var(--carton); overflow: hidden; }
.kbar i { display: block; height: 100%; border-radius: inherit; background: var(--kraft); transition: width .6s var(--ease); }
.kbar--red i { background: var(--red); }
.kpi--depot { background: var(--depot); border-color: var(--depot); color: #fff; }
.kpi--depot .kpi__k, .kpi--depot small { color: rgba(255, 253, 249, .72); }
.kpi--depot .kpi__v { color: #fff; }
.kpi--alert .kpi__v { color: var(--red); }

/* Constats */
.insights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.ins { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 12px; padding: 13px 14px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.45; min-width: 0; }
.ins p { flex: 1 1 180px; min-width: 0; color: var(--ink-2); }
.ins b { color: var(--ink); }
.ins .btn { margin-left: 42px; }
.ins__i { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--carton); color: var(--depot); }
.ins__i .i { width: 17px; height: 17px; }
.ins--signal { border-color: #ffc59e; background: #fff6ef; }
.ins--signal .ins__i { background: var(--signal); color: #fff; }
.ins--red .ins__i { background: var(--red-soft); color: var(--red); }
.ins--ok .ins__i { background: var(--ok-soft); color: var(--ok); }
.ins--warn .ins__i { background: var(--warn-soft); color: #8a5c00; }

/* ---------- Le tableau des commandes ----------------------------------------------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: start; }
.col { display: flex; flex-direction: column; min-width: 0; border-radius: var(--r); background: #ece6dc; border: 1px solid var(--line); overflow: hidden; }
.col__h { position: relative; display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px; }
.col__h b { font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 17px; text-transform: uppercase; letter-spacing: .01em; }
.col__h { flex-wrap: wrap; row-gap: 2px; }
.col__h small { flex-basis: 100%; color: var(--ink-3); font-size: 11px; }
.col__hz { position: absolute; left: 0; right: 0; top: 0; height: 4px; }
.col__n { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--white); font-weight: 800; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.col--validate { background: #f8ece0; }
.col--validate .col__n { background: var(--signal); color: #fff; }
.col--new .col__n { background: var(--depot); color: #fff; }
.col__list { display: flex; flex-direction: column; gap: 7px; padding: 2px 8px 10px; max-height: clamp(380px, calc(100vh - 330px), 720px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.col__empty { padding: 18px 8px; color: var(--ink-3); font-size: 13px; text-align: center; border: 1.5px dashed var(--line-2); border-radius: 10px; }
.col__bulk { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin: 0 8px 8px; border-radius: 10px; border: 1px dashed var(--depot); background: transparent; color: var(--depot); font-weight: 650; font-size: 13px; }
.col__bulk:hover { background: var(--depot); color: #fff; }
.col__bulk .i { width: 16px; height: 16px; }

.tk { position: relative; display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 10px 11px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); text-align: left; box-shadow: 0 1px 0 rgba(18, 20, 23, .04); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.tk:hover { transform: translateY(-1px); border-color: var(--line-2); box-shadow: 0 8px 18px -12px rgba(18, 20, 23, .35); }
.tk__top { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-3); }
.tk__no { color: var(--ink-2); font-size: 11.5px; }
.tk__src { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--carton); color: var(--depot); }
.tk__src .i { width: 13px; height: 13px; }
.tk__t { margin-left: auto; font-size: 11px; }
.tk__who { font-size: 14px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk__meta { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk__meta i { font-style: normal; font-weight: 700; color: var(--c); }
.tk__foot { display: flex; align-items: center; justify-content: space-between; }
.tk__amt { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.tk__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.tk__tags .tag { height: 21px; padding: 0 7px; font-size: 11px; }
.tk--validate { border-color: #ffb27e; }
.tk--validate::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 10px 10px 0 0; background: repeating-linear-gradient(-45deg, var(--warn) 0 6px, var(--ink) 6px 12px); }
.tk--validate .tk__top { margin-top: 3px; }
.tk--refused { opacity: .55; background: transparent; }
.tk--done { opacity: .7; }
.tk.is-live { border-left: 3px solid var(--signal); }
.tk.is-arrive { animation: tk-in .7s var(--spring) both, flash 2.6s var(--ease) .2s; }
@keyframes tk-in { from { transform: translateY(-16px) scale(.96); opacity: 0; } }
.board-dots { display: none; }

/* Fil d'activité */
.feed { display: flex; flex-direction: column; gap: 8px; max-height: 470px; overflow: auto; overscroll-behavior: contain; }
.feed__item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 9px 10px; border-radius: 10px; background: var(--paper); font-size: 13.5px; line-height: 1.42; }
.feed__item.is-new { animation: flash 2.6s var(--ease); }
.feed__i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--white); color: var(--depot); border: 1px solid var(--line); }
.feed__i .i { width: 16px; height: 16px; }
.feed__i--signal { background: var(--signal); border-color: var(--signal); color: #fff; }
.feed__i--ok { color: var(--ok); }
.feed__i--red { color: var(--red); }
.feed__item time { color: var(--ink-3); font-size: 11.5px; }
.srcs { display: flex; flex-direction: column; gap: 12px; }
.src { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-areas: "i l n" "i b b"; gap: 2px 10px; align-items: center; }
.src__i { grid-area: i; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--carton); color: var(--depot); }
.src__i .i { width: 16px; height: 16px; }
.src__l { grid-area: l; font-weight: 600; font-size: 14px; }
.src b { grid-area: n; font-size: 15px; }
.src .kbar { grid-area: b; margin: 0; }

/* ---------- Stock -------------------------------------------------------------------- */
.depot { padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.depot__h { display: flex; align-items: center; gap: 14px; }
.depot__h h2 { font-size: 19px; }
.depot__h p { color: var(--ink-3); font-size: 13px; }
.depot__q { flex: none; display: grid; place-items: center; width: 64px; height: 56px; border-radius: 10px; background: var(--depot); color: #fff; font-size: 19px; text-align: center; line-height: .85; padding: 4px; }
.depot__n { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.depot__n div { padding: 9px 12px; border-radius: 10px; background: var(--paper); min-width: 0; }
.depot__n span { display: block; color: var(--ink-3); font-size: 12px; }
.depot__n b { font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 24px; line-height: 1.1; white-space: nowrap; }
.depot__n .is-red b { color: var(--red); }
.sky { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; align-items: end; padding: 12px 6px 4px; border-radius: 12px; background: linear-gradient(180deg, transparent 0 calc(100% - 46px), #e9e1d3 calc(100% - 46px)); }
.sky__c { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 4px 0; border: 0; border-radius: 8px; background: transparent; transition: background-color .2s; }
.sky__c:hover, .sky__c.is-on { background: rgba(31, 58, 95, .07); }
.sky__c .pile { width: 28px; height: auto; }
.sky__c b { font-size: 11.5px; font-weight: 600; }
.sky__c small { max-width: 100%; overflow: hidden; color: var(--ink-3); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.alerts { display: flex; flex-direction: column; }
.al { display: grid; grid-template-columns: 34px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 330px); gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.al:first-child { border-top: 0; }
.al.is-new { animation: flash 2.4s var(--ease); }
.al__c .carton { width: 34px; }
.al__m { display: flex; flex-direction: column; min-width: 0; padding: 0; border: 0; background: none; text-align: left; }
.al__m b { font-size: 14.5px; }
.al__m small { color: var(--ink-3); font-size: 12.5px; }
.al__m em { font-style: normal; color: var(--red); font-weight: 650; }
.al__g { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--ink-3); min-width: 0; }
.al__g b { color: var(--red); font-size: 14px; }
.al__a { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.row:first-child { border-top: 0; }
.row.is-new { animation: flash 2.4s var(--ease); }
.row--btn { width: 100%; border-left: 0; border-right: 0; border-bottom: 0; background: none; text-align: left; }
.row__i { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--carton); color: var(--depot); }
.row__i .i { width: 17px; height: 17px; }
.row__i--ok { background: var(--ok-soft); color: var(--ok); }
.row__i--wait { background: #dde5ef; color: var(--depot); }
.row__main { flex: 1; min-width: 0; }
.row__main b { display: block; font-size: 14px; font-weight: 650; }
.row__main small { display: block; color: var(--ink-3); font-size: 12.5px; }
.row__side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.row__t { color: var(--ink-3); font-size: 12.5px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search { position: relative; flex: 1 1 240px; min-width: 0; }
.search .i { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--ink-3); }
.search input { width: 100%; height: 42px; padding: 0 14px 0 40px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--paper); font-size: 14.5px; }
.search input:focus { outline: none; border-color: var(--depot); box-shadow: 0 0 0 3px rgba(31, 58, 95, .14); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--white); font-weight: 600; font-size: 13px; color: var(--ink-2); }
.chip i { width: 9px; height: 9px; border-radius: 3px; }
.chip small { color: var(--ink-3); font-size: 11.5px; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed="true"] small { color: rgba(255, 255, 255, .6); }
.refs { display: flex; flex-direction: column; }
.refs__h, .ref { display: grid; grid-template-columns: minmax(0, 1fr) 84px 84px 96px; gap: 10px; align-items: center; }
.refs__h { padding: 0 10px 6px; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.refs__h span:not(:first-child) { text-align: right; }
.ref { width: 100%; padding: 9px 10px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; transition: background-color .15s; }
.ref:hover { background: var(--paper); }
.ref__m { min-width: 0; }
.ref__m b { display: block; font-size: 14px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref__m small { color: var(--ink-3); font-size: 11.5px; }
.ref__n { text-align: right; font-size: 14px; }
.ref__n.is-low { color: var(--red); font-weight: 700; }
.ref__thr { color: var(--ink-3); }

/* ---------- Tournées ------------------------------------------------------------------- */
.tmap { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 0; margin: 14px 0; overflow: hidden; }
.tmap__map { min-width: 0; background: #efe9df; }
.tmap__map .routemap { display: block; }
.tmap__leg { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 18px; min-width: 0; }
.tleg { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--paper); }
.tleg b { display: block; font-size: 14px; }
.tleg small { display: block; color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tleg__c { font-size: 14px; font-weight: 600; white-space: nowrap; }
.tleg__bar { grid-column: 2 / -1; display: flex; flex-direction: column; gap: 2px; }
.tleg__bar .kbar { margin: 0; height: 6px; }
.tleg__bar .kbar i { background: var(--c); }
.tleg__bar small { color: var(--ink-3); font-size: 11.5px; }
.tleg--abs { background: var(--red-soft); }
.tleg--abs .row__i { width: 34px; height: 34px; background: #fff; color: var(--red); }
.tno { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--c); color: #fff; font-family: var(--display); font-stretch: 66%; font-weight: 800; font-size: 20px; }
.tno--lg { width: 46px; height: 46px; font-size: 27px; border-radius: 11px; background: var(--c); }
.trucks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.truck { padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; border-top: 4px solid var(--c); }
.truck__h { display: flex; align-items: center; gap: 12px; }
.truck__h h2 { font-size: 18px; }
.truck__h p { color: var(--ink-3); font-size: 12.5px; }
.truck__cash { display: flex; flex-direction: column; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: #fff; }
.truck__cash span { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.truck__cash b { font-family: var(--display); font-stretch: 68%; font-weight: 800; font-size: 34px; line-height: 1.05; letter-spacing: 0; white-space: nowrap; }
.truck__cash small { color: rgba(255, 255, 255, .7); font-size: 12.5px; }
.sq { display: flex; gap: 4px; }
.sq i { flex: 1 1 0; min-width: 0; max-width: 14px; height: 14px; border-radius: 3px; background: var(--carton-2); }
.sq i.is-done { background: var(--c); }
.sq i.is-abs { background: repeating-linear-gradient(-45deg, var(--warn) 0 3px, var(--ink) 3px 6px); }
.truck__sub { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-3); font-size: 12.5px; }
.stops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-height: 520px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.stop { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.stop.is-new { animation: flash 2.4s var(--ease); }
.stop__n { color: var(--ink-3); font-size: 11px; }
.stop__m { display: flex; flex-direction: column; min-width: 0; padding: 0; border: 0; background: none; text-align: left; }
.stop__m b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stop__m small { color: var(--ink-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stop__s { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.stop__s small { color: var(--ink-3); font-size: 11px; }
.stop__amt { font-size: 13px; font-weight: 600; white-space: nowrap; }
.stop--todo .stop__n { color: var(--ink-2); }
.stop.is-hl { background: color-mix(in srgb, var(--c) 12%, transparent); }
.truck.is-hl { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 35%, transparent), var(--shadow); }
.stop--absent { background: linear-gradient(90deg, var(--red-soft), transparent 70%); }

/* ---------- Clients -------------------------------------------------------------------- */
.clients { display: flex; flex-direction: column; }
.crow { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(0, .8fr); gap: 16px; align-items: center; width: 100%; padding: 10px 10px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; transition: background-color .15s; }
.crow:hover { background: var(--paper); }
.crow--h { padding-top: 0; border-top: 0; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.crow--h:hover { background: none; }
.crow.is-over { background: linear-gradient(90deg, rgba(198, 59, 43, .08), transparent 60%); }
.crow.is-new { animation: flash 2.4s var(--ease); }
.crow__w { display: flex; align-items: center; gap: 10px; min-width: 0; }
.crow__w > span:last-child { min-width: 0; }
.crow__w b { display: block; font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow__w small { display: block; color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow__w em { font-style: normal; color: #8a5c00; font-weight: 650; }
.crow.is-over .av { background: var(--red); color: #fff; }
.crow__e { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.crow__n { display: flex; align-items: baseline; gap: 6px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.crow__n b { color: var(--ink); font-size: 13.5px; }
.crow__n em { margin-left: auto; font-style: normal; font-weight: 700; color: var(--ink-2); }
.crow__n em.is-red, .is-red { color: var(--red); }
.crow__n em.is-warn { color: #a06a00; }
.crow__p { font-size: 13px; font-weight: 600; }
.crow__p small { display: block; color: var(--ink-3); font-size: 11.5px; font-weight: 500; }
.crow__p.is-late small { color: var(--red); }
.more { display: block; width: 100%; min-height: 46px; margin-top: 6px; border-radius: 10px; border: 1px dashed var(--line-2); background: transparent; font-weight: 650; color: var(--depot); }
.more:hover { background: var(--paper); }
.ebar { position: relative; display: block; height: 8px; border-radius: 999px; background: var(--carton); }
.ebar i { position: absolute; top: 0; bottom: 0; }
.ebar__f { left: 0; border-radius: 999px 0 0 999px; background: var(--depot); }
.is-near .ebar__f { background: var(--warn); }
.is-over .ebar__f { background: var(--red); }
.ebar__o { background: repeating-linear-gradient(-45deg, var(--red) 0 4px, #8e2418 4px 8px); border-radius: 0 999px 999px 0; }
.ebar__x { background: repeating-linear-gradient(-45deg, var(--signal) 0 4px, #ffb27e 4px 8px); border-radius: 0 999px 999px 0; }
.ebar__cap { width: 2px; top: -4px !important; bottom: -4px !important; margin-left: -1px; background: var(--ink); }

/* ---------- Prix -------------------------------------------------------------------- */
.chart { min-height: 160px; width: 100%; min-width: 0; }
.chart-svg { display: block; overflow: visible; }
.gridline { stroke: var(--line); stroke-width: 1; }
.axis { stroke: var(--line-2); stroke-width: 1; }
.tick { font-family: var(--mono); font-size: 11px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.col__bar { fill: var(--kraft); transition: fill .2s; }
.col--accent .col__bar { fill: var(--signal); }
.col.is-hover .col__bar { fill: var(--depot); }
.col__ghost { fill: var(--carton-2); }
.col__mark { font-family: var(--mono); font-size: 11px; font-weight: 700; fill: var(--signal-2); }
.hit { fill: transparent; cursor: crosshair; outline: none; }
.tip { position: fixed; left: 0; top: 0; z-index: 95; max-width: 260px; padding: 8px 11px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 12.5px; line-height: 1.4; pointer-events: none; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); }
.tip[hidden] { display: none; }
.lg { display: inline-block; width: 12px; height: 9px; border-radius: 2px; vertical-align: -1px; }
.lg--ghost { background: var(--carton-2); }
.lg--acc { background: var(--signal); }
.prices { display: flex; flex-direction: column; }
.prow { display: grid; grid-template-columns: minmax(0, 1.4fr) 170px minmax(0, 1fr) 150px; gap: 14px; align-items: center; padding: 9px 10px; border-top: 1px solid var(--line); }
.prow--h { padding-top: 0; border-top: 0; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.prow.is-new { animation: flash 2.4s var(--ease); }
.prow.has-promo { background: linear-gradient(90deg, #fff4ea, transparent 70%); }
.prow__m { min-width: 0; }
.prow__m b { display: block; font-size: 14px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow__m small { color: var(--ink-3); font-size: 11.5px; }
.prow__b { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.prow__b .linkbtn { font-size: 11.5px; }
.pin { position: relative; display: block; width: 130px; }
.pin input { width: 100%; height: 40px; padding: 0 36px 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--white); font-size: 14.5px; text-align: right; }
.pin input:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px rgba(255, 106, 19, .16); }
.pin i { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12px; color: var(--ink-3); }
.prow__g { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--ink-2); }
.prow__p { display: flex; justify-content: flex-end; }
.tag--btn { border: 0; cursor: pointer; height: 32px; }

/* ---------- Tiroir (le conteneur couvre l'écran et coupe : rien ne déborde sur iPhone) ----- */
.drawer { position: fixed; inset: 0; z-index: 80; visibility: hidden; overflow: hidden; pointer-events: none; }
.drawer.is-open { visibility: visible; pointer-events: auto; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(18, 20, 23, .38); opacity: 0; transition: opacity .3s; }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); overflow-y: auto; overscroll-behavior: contain; padding: 26px 26px calc(40px + env(safe-area-inset-bottom)); background: var(--paper); box-shadow: -20px 0 50px -20px rgba(0, 0, 0, .35); transform: translateX(104%); transition: transform .45s var(--ease); outline: none; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: var(--white); }
.drawer__close .i { width: 18px; height: 18px; }
.drawer__body { display: flex; flex-direction: column; gap: 14px; }
.drawer h2 { padding-right: 48px; font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 32px; line-height: 1; text-transform: uppercase; }
.drawer h3 { margin-top: 6px; font-size: 15px; }
.drawer .kicker { padding-right: 48px; color: var(--kraft-2); }
.d-sub { margin-top: -6px; color: var(--ink-3); font-size: 13.5px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.facts div { padding: 10px 12px; border-radius: 10px; background: var(--white); border: 1px solid var(--line); font-size: 13.5px; min-width: 0; }
.facts span { display: block; color: var(--ink-3); font-size: 11.5px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.steps li { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; color: var(--ink-3); min-width: 0; }
.steps li i { height: 6px; border-radius: 3px; background: var(--carton-2); }
.steps li span { overflow-wrap: anywhere; line-height: 1.25; }
.steps .is-done i { background: var(--ok); }
.steps .is-done { color: var(--ink-2); }
.steps .is-cur i { background: var(--signal); }
.steps .is-cur { color: var(--ink); font-weight: 700; }
.steps .is-skip i { background: repeating-linear-gradient(90deg, var(--ok) 0 4px, transparent 4px 7px); }
.steps .is-fail i { background: var(--red); }
.steps .is-fail { color: var(--red); font-weight: 700; }
.d-enc { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); }
.d-enc__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 13.5px; color: var(--ink-2); }
.d-enc__row--sm { font-size: 12.5px; color: var(--ink-3); }
.d-enc__row em { font-style: normal; font-weight: 700; }
.d-enc--big .d-enc__row b { font-family: var(--display); font-stretch: 68%; font-weight: 800; font-size: 30px; line-height: 1; }
.arr { color: var(--ink-3); }
.decide { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px 14px 14px; border-radius: 12px; background: #fff6ef; border: 1px solid #ffc59e; overflow: hidden; font-size: 14px; }
.decide__hz { position: absolute; left: 0; right: 0; top: 0; height: 5px; }
.decide__b { display: flex; flex-wrap: wrap; gap: 8px; }
.d-note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; }
.d-note .i { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.d-note--ok { background: var(--ok-soft); color: #1d5e37; }
.d-note--warn { background: var(--warn-soft); color: #6d4700; }
.d-note--red { background: var(--red-soft); color: #87261b; }
.d-note--signal { background: var(--signal-soft); color: #9a3b07; }
.dlines { display: flex; flex-direction: column; border-radius: 12px; background: var(--white); border: 1px solid var(--line); overflow: hidden; }
.dl { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 8px; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 13.5px; }
.dl:first-child { border-top: 0; }
.dl__q { font-weight: 700; color: var(--ink-2); }
.dl__m { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dl__m b { font-weight: 650; }
.dl__m small { color: var(--ink-3); font-size: 12px; }
.dl__st { color: var(--ink-3); font-size: 12px; }
.dl__t { font-weight: 600; white-space: nowrap; }
.dl.is-short { background: var(--red-soft); }
.dl.is-short .dl__st { color: var(--red); font-size: 13px; }
.dl.is-ok .dl__st { color: var(--ok); font-weight: 650; }
.dl.is-part .dl__st { color: #8a5c00; font-weight: 650; }
.dl__acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dl__warn { margin-top: 6px; color: #8a5c00; font-size: 12px; line-height: 1.4; }
.d-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 4px; font-size: 13.5px; color: var(--ink-3); }
.d-total b { color: var(--ink); font-size: 18px; }
.d-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.d-hint { color: var(--ink-3); font-size: 12.5px; line-height: 1.45; }
.d-quote { padding: 10px 14px; border-left: 3px solid var(--kraft); background: var(--white); font-style: italic; color: var(--ink-2); }
.hist { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px dashed var(--line-2); display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.hist time { margin-right: 10px; color: var(--ink-3); font-size: 12px; }
.dboxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dbox { display: flex; gap: 12px; align-items: flex-end; padding: 12px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); min-width: 0; }
.dbox .pile { width: 24px; height: auto; flex: none; }
.dbox span { display: block; color: var(--ink-3); font-size: 11.5px; }
.dbox b { display: block; font-family: var(--display); font-stretch: 68%; font-weight: 800; font-size: 32px; line-height: 1; }
.dbox small { color: var(--ink-3); font-size: 12px; }
.dbox.is-low b { color: var(--red); }
.form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.form--row .lbl--grow { flex: 1 1 140px; }
.lbl { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.field { height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--white); font-size: 15px; max-width: 100%; }
.field:focus { outline: none; border-color: var(--depot); box-shadow: 0 0 0 3px rgba(31, 58, 95, .14); }
.field.is-err { border-color: var(--red); box-shadow: 0 0 0 3px rgba(198, 59, 43, .14); }
.stepper { display: inline-flex; align-items: center; border-radius: 12px; border: 1px solid var(--line-2); background: var(--white); overflow: hidden; }
.stepper button { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; }
.stepper button:hover { background: var(--paper); }
.stepper .i { width: 18px; height: 18px; }
.stepper input { width: 76px; height: 44px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; text-align: center; }
.stepper output { padding: 0 14px; font-size: 14px; white-space: nowrap; }
.stepper--wide { width: 100%; justify-content: space-between; }
.plaf { display: flex; align-items: center; gap: 10px; }
.plaf__b { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line-2); background: var(--white); }
.plaf__b:hover { border-color: var(--depot); }
.plaf__v { flex: 1; text-align: center; font-family: var(--display); font-stretch: 68%; font-weight: 800; font-size: 32px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 12px; background: var(--carton); max-width: 100%; }
.seg button { min-height: 38px; padding: 0 12px; border-radius: 9px; border: 0; background: transparent; font-weight: 600; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(18, 20, 23, .12); }
.inv { display: flex; flex-direction: column; border-radius: 12px; background: var(--white); border: 1px solid var(--line); }
.inv__r { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, .8fr) auto; gap: 8px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 12.5px; }
.inv__r:first-child { border-top: 0; }
.inv__r .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ppv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ppv div { padding: 10px 12px; border-radius: 10px; background: var(--white); border: 1px solid var(--line); min-width: 0; }
.ppv span { display: block; color: var(--ink-3); font-size: 11.5px; }
.ppv b { font-size: 14px; }
.ppv s { color: var(--ink-3); font-weight: 400; }
.chart--sm { min-height: 160px; }

/* ---------- Bon de préparation imprimable ------------------------------------------------ */
.print-sheet { display: none; }
@media print {
  body > *:not(.print-sheet) { display: none !important; }
  .print-sheet { display: block; color: #000; font-family: var(--ui); }
  .ps__head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 2px solid #000; }
  .ps__head div { display: flex; flex-direction: column; align-items: flex-end; }
  .ps__head b { font-family: var(--display); font-stretch: 66%; font-size: 28px; }
  .ps__who { margin: 12px 0; font-size: 13px; }
  .print-sheet table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  .print-sheet th, .print-sheet td { padding: 6px 8px; border-bottom: 1px solid #999; text-align: left; }
  .ps__foot { margin-top: 18px; font-size: 12.5px; }
}

/* ---------- Mode intégré ---------------------------------------------------------------- */
.is-embed .demo-bar, .is-embed .pmode, .is-embed .topbar__app { display: none !important; }
.is-embed .shell { min-height: 100vh; }
.is-embed .side { padding-bottom: 18px; }

/* ---------- Bascule et toasts ------------------------------------------------------------ */
html.has-drawer .pmode { opacity: 0; pointer-events: none; }
.toast--signal .toast__dot { background: var(--signal); }
.toast--ok .toast__dot { background: #4fd18b; }
.toast--red .toast__dot { background: #ff7a6b; }
.toast-stack { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }

/* ---------- Écrans moyens ---------------------------------------------------------------- */
@media (max-width: 1320px) {
  .board { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(236px, 1fr); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
  .col { scroll-snap-align: start; }
  .trucks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .grid--kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* le tableau des commandes passe avant les constats */
  .view[data-view="commandes"] { display: flex; flex-direction: column; }
  .view[data-view="commandes"] > .board { order: 1; margin-top: 14px; }
  .view[data-view="commandes"] > .board-dots { order: 1; }
  .view[data-view="commandes"] > .insights { order: 2; margin-top: 18px; }
  .view[data-view="commandes"] > .grid--2 { order: 3; }
  .insights { grid-template-columns: minmax(0, 1fr); }
  .tmap { grid-template-columns: minmax(0, 1fr); }
  .prow { grid-template-columns: minmax(0, 1fr) 150px 120px; }
  .prow__g { display: none; }
  .prow--h span:nth-child(3) { display: none; }
}
@media (max-width: 980px) {
  .grid--2, .grid--2e { grid-template-columns: minmax(0, 1fr); }
  .trucks { grid-template-columns: minmax(0, 1fr); }
  .stops { max-height: none; }
}

/* ---------- Tablette : barre latérale réduite aux icônes, tableau sur 2–3 colonnes ---------- */
@media (min-width: 761px) and (max-width: 1180px) {
  .shell { grid-template-columns: 78px minmax(0, 1fr); }
  .side { padding: 18px 10px 24px; gap: 18px; align-items: stretch; }
  .side__logo { display: grid; place-items: center; padding: 0; }
  .side__logo .logo__word, .side__k, .side__apps .i--out, .live-dot span { display: none; }
  .nav a { justify-content: center; padding: 0; min-height: 52px; }
  .nav a > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav a .i { width: 22px; height: 22px; }
  .nav a[aria-current="page"]::before { left: -10px; }
  .nav__badge { position: absolute; top: 4px; right: 4px; min-width: 19px; height: 19px; padding: 0 5px; font-size: 11px; }
  .side__apps a { justify-content: center; padding: 0; min-height: 44px; font-size: 0; }
  .side__apps .i { width: 20px; height: 20px; }
  .side__foot { align-items: center; padding: 12px 0 0; }
  .live-dot { justify-content: center; }
  .side__reset { width: 44px; height: 44px; padding: 0; font-size: 0; justify-content: center; }
  .side__reset .i { width: 19px; height: 19px; }
  .main { padding: 22px 20px 96px; }
  .board { grid-auto-columns: minmax(270px, 1fr); }
  .col__list { max-height: min(62vh, 640px); }
}
@media (max-width: 860px) {
  .search input, .field, .pin input, .stepper input { font-size: 16px; }
}

/* ---------- Téléphone : barre d'onglets en bas ------------------------------------------------ */
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .side { position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; top: auto; height: auto; flex-direction: row; gap: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); overflow: hidden; background: rgba(21, 41, 63, .96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 -10px 30px -18px rgba(0, 0, 0, .5); }
  .side__logo, .side__apps, .side__foot, .nav__long { display: none; }
  .nav { flex: 1; flex-direction: row; gap: 2px; min-width: 0; }
  .nav a { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 3px; height: 56px; min-height: 0; padding: 0 2px; font-size: 11px; text-align: center; }
  .nav a > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav a[aria-current="page"]::before { left: 30%; right: 30%; top: -6px; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .nav__badge { position: absolute; top: 3px; left: calc(50% + 6px); margin: 0; min-width: 19px; height: 19px; font-size: 11px; }
  .main { padding: 14px 16px calc(92px + env(safe-area-inset-bottom)); }
  .topbar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 10px; margin-bottom: 16px; }
  .topbar__r { order: -1; flex-wrap: nowrap; justify-content: space-between; }
  .topbar__app, .clock { display: none; }
  .icon-btn { display: grid; }
  .toast-stack { left: 12px; right: 12px; align-items: stretch; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); max-width: none; }
  .toast { max-width: none; }
  .drawer__panel { width: 100%; padding: 22px 16px calc(36px + env(safe-area-inset-bottom)); }
  .board { grid-auto-columns: calc(100vw - 64px); gap: 10px; margin: 14px -16px 0; padding: 0 16px 6px; scroll-padding: 0 16px; scrollbar-width: none; }
  .board::-webkit-scrollbar { display: none; }
  .col__list { max-height: 58vh; }
  .board-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
  .board-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); transition: width .3s var(--ease), background-color .3s; }
  .board-dots i.is-on { width: 20px; border-radius: 4px; background: var(--depot); }
  .al { grid-template-columns: 34px minmax(0, 1fr); }
  .al__g { grid-column: 2; }
  .al__a { grid-column: 1 / -1; justify-content: flex-start; }
  .crow { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .crow--h { display: none; }
  .crow__e { padding-left: 46px; }
  .crow__p { padding-left: 46px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
  .crow__p small { display: inline; }
}
@media (max-width: 600px) {
  .demo-bar { white-space: nowrap; }
  .topbar__h { font-size: 38px; }
  .topbar__date { font-size: 10.5px; }
}
@media (max-width: 520px) {
  .grid--kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 13px 13px; }
  .kpi__v { font-size: 28px; }
  .kpi small { font-size: 12px; }
  .kpi__spark { display: none; }
  .panel { padding: 16px 14px; }
  .ins .btn { margin-left: 42px; }
  .depot { padding: 16px 14px; }
  .depot__n b { font-size: 15px; }
  .sky { gap: 2px; padding: 10px 2px 4px; }
  .sky__c .pile { width: 22px; }
  .sky__c b { font-size: 10.5px; }
  .sky__c small { font-size: 9.5px; }
  .refs__h, .ref { grid-template-columns: minmax(0, 1fr) 54px 54px; gap: 6px; }
  .refs__h span:nth-child(4), .ref__thr { display: none; }
  .ref__n { font-size: 13px; }
  .prow { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; }
  .prow--h { display: none; }
  .prow__b { grid-column: 1; flex-direction: row; align-items: center; gap: 10px; }
  .prow__p { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .pin { width: 124px; }
  .truck { padding: 16px 14px; }
  .truck__cash b { font-size: 30px; }
  .tleg { grid-template-columns: 34px minmax(0, 1fr); }
  .tleg__c { grid-column: 2; }
  .facts, .dboxes { grid-template-columns: minmax(0, 1fr); }
  .ppv { grid-template-columns: minmax(0, 1fr); }
  .inv__r { grid-template-columns: minmax(0, 1fr) auto; }
  .inv__r span:nth-child(2) { display: none; }
  .inv__r span:nth-child(3) { display: none; }
  .steps li span { font-size: 10.5px; }
  .drawer h2 { font-size: 28px; }
  .decide__b .btn { flex: 1 1 100%; }
  .seg button { padding: 0 10px; }
}

/* Fiche ouverte : les notifications passent à gauche du tiroir pour ne rien cacher */
@media (min-width: 761px) {
  .toast-stack { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  html.has-drawer .toast-stack { right: calc(min(560px, 100%) + 16px); bottom: 16px; }
}
.form--row > .seg { width: 100%; }
.form--row > .seg button { flex: 1 1 auto; }
.drawer .seg { display: flex; width: 100%; }
.drawer .seg button { flex: 1 1 auto; }
@media (max-width: 760px) {
  html.has-drawer .toast-stack { top: calc(10px + env(safe-area-inset-top, 0px)); bottom: auto; }
}

/* Bascule « Site revendeur | Gestion dépôt » : jamais posée sur le contenu.
   Grand écran : au pied de la barre latérale. Tablette et téléphone : dans l'en-tête. */
.pmode.pmode--side, .pmode.pmode--top { position: static; transform: none; max-width: none; box-shadow: none; }
.pmode.pmode--side { align-self: stretch; background: rgba(11, 11, 10, .3); box-shadow: inset 0 0 0 1px rgba(255, 253, 249, .14); -webkit-backdrop-filter: none; backdrop-filter: none; }
.pmode--side a { flex: 1 1 0; min-width: 0; height: 34px; padding: 0 6px; font-size: 12px; }
html.has-drawer .pmode--side { opacity: 1; pointer-events: auto; }
.pmode.pmode--top { display: none; }
@media (max-width: 1180px) {
  .pmode.pmode--side { display: none; }
  .pmode.pmode--top { display: flex; }
  .pmode--top a { height: 36px; padding: 0 13px; font-size: 12.5px; }
}
