/* ==========================================================================
   TRAVERSE — gestion de l'atelier (démo Démesure).
   Barre latérale anthracite, contenu sur papier calque, chiffres en mono,
   une seule couleur d'accent : le jaune mètre-ruban. Sur téléphone : barre
   d'onglets en bas, bascule « Site client | Gestion atelier » dans l'en-tête
   (jamais posée sur le contenu).
   ========================================================================== */

html { overflow-x: clip; }
body.ad { background: var(--calque); }
.amber { color: #8a5208; }
.red { color: var(--red); }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; line-height: 1.45; }
.btn--sm { min-height: 40px; padding: 0 14px; border-radius: 10px; font-size: 13.5px; gap: 7px; }
.btn--sm .i { width: 17px; height: 17px; }
.ibtn { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); }
.ibtn:hover { border-color: var(--ink-3); }
.ibtn .i { width: 19px; height: 19px; }
.card { background: var(--paper); border-radius: var(--r-l); box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.live-dot { position: relative; display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: #5fd18b; }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid #5fd18b; opacity: 0; animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { opacity: .8; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes flash { 0%, 30% { background-color: var(--metre-soft); box-shadow: 0 0 0 2px var(--metre); } }
.is-new { animation: flash 2.4s var(--ease); }

/* ---------- Coque ----------------------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100vh - 36px); background: linear-gradient(90deg, var(--anthracite) 248px, transparent 248px); }
.side { position: sticky; top: 0; align-self: start; height: calc(100vh - 36px); height: calc(100dvh - 36px); overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px 16px; background: var(--anthracite); color: rgba(255, 255, 255, .78); scrollbar-width: none; }
.side::-webkit-scrollbar { display: none; }
.side__brand { display: flex; flex-direction: column; gap: 6px; padding: 2px 8px 4px; text-decoration: none; color: #fff; }
.side__brand .logo-mark { width: 30px; height: 30px; }
.side__brand .logo__w b { font-size: 19px; }
.side__sub { padding-left: 40px; font-family: var(--display); font-weight: 600; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--metre); }
.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: 12px; color: rgba(255, 255, 255, .72); font-weight: 600; font-size: 14.5px; text-decoration: none; transition: background-color .2s, color .2s; }
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a[aria-current="page"] { background: var(--calque); color: var(--ink); }
.nav a[aria-current="page"] .i { color: var(--ink); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 3px 3px 0; background: var(--metre); }
.nav .i { width: 20px; height: 20px; }
.nav__short { display: none; }
.nav__badge { margin-left: auto; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff; font-style: normal; font-family: var(--mono); font-size: 11.5px; }
.nav__badge--red { background: var(--red); }
.nav__badge--warn { background: var(--warn); color: var(--ink); }
.nav__badge--metre { background: var(--metre); color: var(--ink); }
.nav a[aria-current="page"] .nav__badge:not(.nav__badge--red):not(.nav__badge--warn):not(.nav__badge--metre) { background: var(--ink); }
.side__apps { display: grid; gap: 1px; }
.side__k { padding: 0 12px 6px; font-family: var(--display); font-weight: 600; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .42); }
.side__apps a { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 12px; border-radius: 10px; color: rgba(255, 255, 255, .75); font-size: 13.5px; text-decoration: none; }
.side__apps a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side__apps .i { width: 17px; height: 17px; color: rgba(255, 255, 255, .55); }
.side__apps .i--out { width: 14px; height: 14px; margin-left: auto; color: var(--metre); }
.side__foot { margin-top: auto; display: grid; gap: 12px; padding: 14px 6px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.side__live { display: flex; align-items: center; gap: 10px; font-size: 12.5px; line-height: 1.35; color: rgba(255, 255, 255, .62); }
.side__reset { justify-self: start; background: transparent; color: rgba(255, 255, 255, .82); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.side__reset:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55); color: #fff; }
.pmode.pmode--side, .pmode.pmode--top { position: static; transform: none; z-index: auto; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.pmode--side { align-self: stretch; background: rgba(0, 0, 0, .28); }
.pmode--side a { flex: 1 1 0; min-width: 0; height: 40px; padding: 0 6px; font-size: 12.5px; }
html.has-drawer .pmode--side { opacity: 1; pointer-events: auto; }
.topbar__m { display: none; }

.main { min-width: 0; padding: 24px clamp(16px, 2.6vw, 36px) 80px; outline: none; }
.topbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 20px; }
.topbar__date { margin-bottom: 6px; color: var(--ink-3); font-size: 12px; letter-spacing: .02em; }
.topbar h1 { font-family: var(--display); font-weight: 680; font-stretch: 108%; font-size: clamp(30px, 2.8vw, 40px); line-height: 1; letter-spacing: -.01em; }
.topbar__r { display: flex; flex-wrap: wrap; gap: 8px; }
.view, [data-slot="atelier"] { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ---------- Blocs ------------------------------------------------------------------------------ */
.panel { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 18px 20px; }
.panel__h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.panel__h h2 { font-family: var(--display); font-weight: 650; font-stretch: 104%; font-size: 19px; line-height: 1.2; }
.panel__sub { color: var(--ink-3); font-size: 12.5px; }
.panel__n { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: var(--red); color: #fff; font-family: var(--mono); font-size: 13px; }
.panel__n.is-ok { background: var(--ok); }
.panel__n .i { width: 16px; height: 16px; }
.empty { padding: 16px; border-radius: 12px; background: var(--calque); color: var(--ink-3); text-align: center; font-size: 14px; }
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--ok); font-size: 12.5px; font-weight: 650; }
.ins { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 12px; padding: 13px 15px; border-radius: 14px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.ins > .i { flex: none; margin-top: 2px; color: var(--metre-2); }
.ins > span { flex: 1 1 260px; min-width: 0; }
.ins b { color: var(--ink); font-weight: 650; }
.ins .btn { flex: none; margin-left: auto; }
.ins--warn { background: var(--warn-soft); box-shadow: none; color: #5d3d04; }
.ins--warn > .i { color: var(--warn); }
.ins--red { background: var(--red-soft); box-shadow: none; color: #6f2318; }
.ins--red > .i { color: var(--red); }
.ins--ok { background: var(--ok-soft); box-shadow: none; color: #1d5a3a; }
.ins--ok > .i { color: var(--ok); }
.inss { display: grid; gap: 10px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.closed { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px; background: var(--anthracite); color: #fff; font-size: 14.5px; }
.closed .i { color: var(--metre); }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 16px 18px; color: var(--ink); text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s; }
a.kpi:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--ink-3), var(--shadow); }
.kpi__k { font-family: var(--display); font-weight: 600; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.kpi__v { font-family: var(--mono); font-weight: 400; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.05; letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kpi__v small { font-size: .55em; letter-spacing: 0; color: var(--ink-2); }
.kpi__s { color: var(--ink-2); font-size: 12.5px; line-height: 1.35; }
.kpi--brand { background: var(--anthracite); box-shadow: none; color: #fff; }
.kpi--brand .kpi__k { color: rgba(255, 255, 255, .6); }
.kpi--brand .kpi__v { color: var(--metre); }
.kpi--brand .kpi__v small { color: rgba(255, 255, 255, .7); }
.kpi--brand .kpi__s { color: rgba(255, 255, 255, .72); }
a.kpi--brand:hover { box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .6); }
.kpi--warn { box-shadow: 0 0 0 1.5px var(--warn), var(--shadow); }
.kpi__spark { position: absolute; right: 14px; top: 14px; }
.spark path { fill: none; stroke: var(--metre); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--metre); }
.meter { display: block; height: 6px; margin-top: 6px; border-radius: 999px; background: var(--grid); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--ok); transition: width .6s var(--ease); }

/* ---------- Aujourd'hui ------------------------------------------------------------------------------ */
.today { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.today__side { display: grid; gap: 16px; min-width: 0; }
.dh { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-family: var(--display); font-weight: 600; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.dh .i { width: 16px; height: 16px; color: var(--metre-2); }
.dlist { display: flex; flex-direction: column; }
.drow { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 58px; padding: 9px 4px; border-top: 1px solid var(--line); }
.drow:first-child { border-top: 0; }
.drow__t { font-size: 12.5px; color: var(--ink-2); }
.drow__b { min-width: 0; }
.drow__b b { display: block; overflow: hidden; font-size: 14.5px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.drow__b small { display: block; overflow: hidden; color: var(--ink-3); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.drow__b .tag { margin-top: 4px; }
.drow__s { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.drow__n { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.drow.is-hot { margin: 0 -8px; padding-left: 12px; padding-right: 12px; border-radius: 12px; background: var(--metre-soft); border-top-color: transparent; }
.drow.is-hot + .drow { border-top-color: transparent; }
.drow.is-clash .drow__t { color: var(--red); font-weight: 700; }

.todo { display: flex; flex-direction: column; }
.todo__it { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.todo__it:first-child { border-top: 0; padding-top: 2px; }
.todo__ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--calque); color: var(--ink-2); }
.todo__ico .i { width: 19px; height: 19px; }
.todo__ico--red { background: var(--red-soft); color: var(--red); }
.todo__ico--warn { background: var(--warn-soft); color: #9a5c06; }
.todo__ico--metre { background: var(--metre-soft); color: #6b5300; }
.todo__b { min-width: 0; }
.todo__b b { display: block; font-size: 14px; font-weight: 650; line-height: 1.35; }
.todo__b small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 12.5px; line-height: 1.4; }
.todo__it .btn { justify-self: end; white-space: nowrap; }
.todo__it.is-done { opacity: .62; }
.todo__it.is-done .todo__ico { background: var(--ok-soft); color: var(--ok); }
.todo__done { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-family: var(--mono); font-size: 12px; }
.todo__done .i { width: 15px; height: 15px; }

.feed { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; overscroll-behavior: contain; }
.feed__it { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px 10px; border-radius: 12px; background: var(--calque); font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.feed__it b { color: var(--ink); font-weight: 650; }
.feed__ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--white); color: var(--ink-2); }
.feed__ico .i { width: 16px; height: 16px; }
.feed__it.is-ok .feed__ico { color: var(--ok); }
.feed__it.is-metre .feed__ico { color: #8a6a00; background: var(--metre-soft); }
.feed__it time { color: var(--ink-3); font-size: 11.5px; padding-top: 2px; white-space: nowrap; }
.feed__it.is-live { background: var(--metre-soft); }
.feed__it.is-live time { color: #6b5300; font-family: var(--ui); font-weight: 650; }
.feed__it.is-live .feed__ico { background: var(--metre); color: var(--ink); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.9); } }
.owner { margin: 6px 0 0; padding: 22px 4px 0; border-top: 1px dashed var(--grid-2); }
.owner blockquote { margin: 0; max-width: 46ch; font-family: var(--display); font-weight: 560; font-stretch: 104%; font-size: clamp(19px, 1.7vw, 24px); line-height: 1.3; color: var(--ink); }
.owner figcaption { margin-top: 8px; color: var(--ink-3); font-size: 12px; }

/* ---------- Chantiers -------------------------------------------------------------------------------- */
.belv-card { display: grid; grid-template-columns: 64px minmax(0, 1fr) 44px; align-items: center; gap: 16px; padding: 14px 16px; text-decoration: none; color: var(--ink); background: var(--anthracite); box-shadow: none; transition: transform .25s var(--ease); }
.belv-card:hover { transform: translateY(-2px); }
.belv-card__art svg { width: 64px; height: auto; }
.belv-card .kicker { color: var(--metre); }
.belv-card__b { min-width: 0; color: #fff; }
.belv-card__b b { display: block; margin-top: 3px; font-family: var(--display); font-weight: 650; font-stretch: 104%; font-size: 18px; line-height: 1.2; }
.belv-card__b small { display: block; margin-top: 3px; color: rgba(255, 255, 255, .7); font-size: 13px; }
.belv-card__go { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--metre); color: var(--ink); }
.bm { fill: rgba(255, 255, 255, .14); }
.bm--releve { fill: var(--glass); }
.bm--fabrication { fill: var(--metre); }
.bm--livre { fill: #8fc9a7; }
.bm--pose { fill: var(--ok); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.search { position: relative; flex: 1 1 260px; min-width: 0; max-width: 460px; }
.search .i { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search input { width: 100%; height: 46px; padding: 0 14px 0 42px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--white); font-size: 15px; -webkit-appearance: none; appearance: none; }
.search input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(242, 194, 27, .35); }
.chips-f { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; overscroll-behavior-x: contain; }
.chips-f::-webkit-scrollbar { display: none; }
.chips-f button { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink-2); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.chips-f button i { font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.chips-f button[aria-pressed="true"] { background: var(--anthracite); border-color: var(--anthracite); color: #fff; }
.chips-f button[aria-pressed="true"] i { color: var(--metre); }
.chips-f button.is-red { border-color: rgba(200, 64, 46, .45); color: var(--red); }
.chips-f button.is-red i { color: var(--red); }
.chips-f button.is-red[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.chips-f button.is-red[aria-pressed="true"] i { color: #fff; }
.panel--list { padding: 6px 16px; }
.jlist { display: flex; flex-direction: column; }
.jrow { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; min-height: 70px; padding: 10px 4px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; }
.jrow:first-child { border-top: 0; }
.jrow:hover { background: rgba(21, 24, 27, .025); }
.jrow__art { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); padding: 3px; }
.jrow__art .dw { width: 100%; height: 100%; }
.jrow__b { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.jrow__b b { flex: 1 1 100%; overflow: hidden; font-size: 14.5px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.jrow__b small { flex: 1 1 100%; overflow: hidden; color: var(--ink-3); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.jrow__s { display: grid; justify-items: end; gap: 4px; }
.jrow__amt { font-size: 13px; white-space: nowrap; }
.jrow__paid { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }
.jrow.is-alert .jrow__art { box-shadow: inset 0 0 0 1.5px var(--red); background: var(--red-soft); }
.more { align-self: center; margin: 8px auto 12px; display: flex; }

/* Belvédère */
.back { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; min-height: 44px; color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none; }
.back .i { width: 17px; height: 17px; }
.belv-h { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px 24px; align-items: center; padding: 20px 22px; }
.belv-h h2 { margin-top: 4px; font-family: var(--display); font-weight: 680; font-stretch: 108%; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.05; }
.belv-h__spec { margin-top: 8px; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.belv-h__spec b { font-family: var(--mono); font-weight: 400; color: var(--ink); white-space: nowrap; }
.belv-h__links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; }
.belv-h__links a { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink); font-size: 14px; font-weight: 650; text-decoration: underline; text-decoration-color: var(--metre-2); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.belv-h .kpi { box-shadow: 0 0 0 1px var(--line); background: var(--white); }
.belv-h .kpi--brand { background: var(--anthracite); }
.belv { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.belv__side { display: grid; gap: 16px; min-width: 0; }
.fg { display: grid; grid-template-columns: 34px repeat(6, minmax(0, 1fr)); gap: 5px; padding: 12px; border-radius: 16px; background: var(--white); background-image: var(--mm); background-size: 10px 10px; box-shadow: inset 0 0 0 1px var(--line); }
.fg__h { text-align: center; font-size: 11px; color: var(--ink-3); }
.fg__f { display: grid; place-items: center; font-size: 11px; color: var(--ink-3); }
.fg__c { position: relative; display: grid; place-items: center; align-content: center; gap: 0; min-width: 0; min-height: 46px; padding: 2px; border: 1.5px solid rgba(21, 24, 27, .22); border-radius: 6px; background: var(--paper); color: var(--ink); font-family: var(--mono); line-height: 1.15; transition: transform .2s var(--ease); }
.fg__c:hover { transform: translateY(-1px); border-color: var(--ink); }
.fg__c b { font-weight: 400; font-size: 12.5px; }
.fg__c small { font-size: 10px; color: var(--ink-3); }
.fg__c--releve { background: var(--glass); }
.fg__c--fabrication { background: var(--metre); border-color: var(--ink); }
.fg__c--livre { background: #b9dcc6; }
.fg__c--pose { background: var(--ok); color: #fff; border-color: #1f6b43; }
.fg__c--pose small { color: rgba(255, 255, 255, .8); }
.fg__c i { position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 1.5px var(--paper); }
.fg__c.has-diag i { background: var(--red); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-2); font-size: 12.5px; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend b { font-weight: 400; color: var(--ink-3); }
.lg { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(21, 24, 27, .3); background: var(--paper); }
.lg--releve { background: var(--glass); }
.lg--fabrication { background: var(--metre); }
.lg--livre { background: #b9dcc6; }
.lg--pose { background: var(--ok); }
.lg--flag { width: 9px; height: 9px; border-radius: 50%; border: 0; background: var(--warn); }
.lg--jobs { background: var(--alu); }
.lg--job { background: var(--metre); }
.lg--belv { background: var(--anthracite); }
.lg--cap { width: 16px; height: 0; border: 0; border-top: 2px dashed var(--red); border-radius: 0; }
.stps { display: grid; gap: 6px; }
.stp { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.stp .btn { grid-column: 2 / -1; justify-self: start; }
.stp__pct { display: grid; place-items: center; height: 34px; border-radius: 9px; background: var(--calque); font-size: 13px; }
.stp__b { min-width: 0; }
.stp__b b { display: block; font-size: 13.5px; font-weight: 650; }
.stp__b small { display: block; color: var(--ink-3); font-size: 12px; }
.stp__amt { font-size: 13px; white-space: nowrap; }
.stp.is-next { box-shadow: inset 0 0 0 1.5px var(--metre-2); }
.stp.is-next .stp__pct { background: var(--metre); }
.stp.is-paid .stp__pct { background: var(--ok); color: #fff; }
.stp.is-paid .stp__b small { color: var(--ok); }
.stps--row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stps--row .stp { grid-template-columns: 52px minmax(0, 1fr); }
.stps--row .stp__amt { grid-column: 2; }

/* ---------- Atelier : débit ----------------------------------------------------------------------- */
.atop { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.seg--big button { min-height: 44px; padding: 0 16px; gap: 7px; display: inline-flex; }
.seg--big .i { width: 17px; height: 17px; }
.dhead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; align-items: center; padding: 18px 20px; background: var(--anthracite); box-shadow: none; color: #fff; }
.dhead .kicker { color: rgba(255, 255, 255, .55); }
.dhead h2 { margin: 6px 0 12px; font-family: var(--display); font-weight: 650; font-stretch: 104%; font-size: 21px; }
.dhead .seg { background: rgba(255, 255, 255, .1); }
.dhead .seg button { color: rgba(255, 255, 255, .72); }
.dhead .seg [aria-pressed="true"] { background: var(--metre); color: var(--ink); box-shadow: none; }
.dnums { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dnums p { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); }
.dnums b { font-weight: 400; font-size: clamp(26px, 2.6vw, 38px); line-height: 1; letter-spacing: -.02em; color: #fff; white-space: nowrap; }
.dnums .is-m b { color: var(--metre); }
.dnums span { font-size: 12.5px; color: rgba(255, 255, 255, .78); line-height: 1.35; }
.dnums em { display: block; font-style: normal; color: rgba(255, 255, 255, .5); }
.dhead__act { grid-column: 2; grid-row: 1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; align-self: start; }
.dhead__act .btn { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.dhead__act .btn:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }
.dgrid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.dgrid__main { display: grid; gap: 14px; min-width: 0; }
.dgrid__side { position: sticky; top: 16px; min-width: 0; }
.dsec { padding: 14px 16px 10px; border-radius: var(--r-l); background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.dsec.is-draft { background: repeating-linear-gradient(135deg, var(--paper) 0 10px, #fdf7e2 10px 20px); box-shadow: 0 0 0 1.5px var(--metre-2); }
.dsec.is-acc { box-shadow: 0 0 0 2px var(--metre); }
.dsec.is-flash { animation: flash 2.4s var(--ease); }
.dsec__h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }
.dsec__h p:first-child { font-size: 14.5px; }
.dsec__s { flex: 1 1 100%; color: var(--ink-3); font-size: 11.5px; }
.tag--warn.tag--dash { box-shadow: inset 0 0 0 1px currentColor; }
.dgrp { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 4px; padding-top: 10px; border-top: 1px dashed var(--grid-2); font-size: 11.5px; color: var(--ink-2); }
.dgrp span { color: var(--ink-3); }
.brs { display: flex; flex-direction: column; }
.br { display: grid; grid-template-columns: 160px minmax(0, 1fr) 132px; align-items: center; gap: 12px; padding: 7px 4px; border-top: 1px solid rgba(21, 24, 27, .06); }
.brs .br:first-child { border-top: 0; }
.br__l { display: flex; flex-direction: column; min-width: 0; font-size: 11.5px; line-height: 1.3; }
.br__l b { font-weight: 400; font-size: 12.5px; color: var(--ink); }
.br__w { overflow: hidden; color: var(--ink-3); text-overflow: ellipsis; white-space: nowrap; }
.br__next { align-self: flex-start; margin-bottom: 3px; padding: 1px 7px; border-radius: 6px; background: var(--metre); color: var(--ink); font-family: var(--ui); font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
.br__g { min-width: 0; }
.br.is-cur { margin: 2px -8px; padding-left: 12px; padding-right: 12px; border-radius: 12px; background: var(--metre-soft); border-top-color: transparent; }
.br.is-cut .br__g { opacity: .4; }
.br.is-moved .br__g { animation: moved 1s var(--ease); }
@keyframes moved { 0% { transform: translateX(-6px); opacity: .5; } }
.cutb { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); font-size: 13px; font-weight: 650; white-space: nowrap; }
.cutb:hover { border-color: var(--ink); }
.cutb__box { width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--ink-3); }
.cutb.is-done { background: var(--ok-soft); border-color: transparent; color: #1f6b43; font-family: var(--mono); font-weight: 400; }
.cutb.is-done .i { width: 17px; height: 17px; }
.cutb.is-wait { border-style: dashed; color: var(--ink-3); font-weight: 600; cursor: default; }
.br.is-cur .cutb:not(.is-done) { background: var(--metre); border-color: var(--ink); }
[data-slot="atelier"].is-switch .br { animation: sw .7s var(--ease) both; }
[data-slot="atelier"].is-switch .br:nth-child(odd) { animation-delay: .04s; }
@keyframes sw { from { opacity: 0; transform: translateX(-14px); } }
.chart { min-height: 210px; }
.chart-svg { display: block; overflow: visible; font-family: var(--mono); }
.gridline { stroke: var(--grid); stroke-dasharray: 3 4; }
.axis { stroke: var(--ink-3); }
.tick { fill: var(--ink-3); font-family: var(--mono); font-size: 11px; font-variant-numeric: tabular-nums; }
.col__bar { fill: var(--alu); }
.col--accent .col__bar { fill: var(--metre); stroke: var(--ink); stroke-width: .8; }
.col.is-hover .col__bar { fill: var(--alu-2); }
.col--accent.is-hover .col__bar { fill: var(--metre-2); }
.col__ghost { fill: var(--grid); }
.col__mark { fill: var(--ink); font-family: var(--mono); font-size: 11.5px; }
.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: 11px; background: var(--ink); color: #fff; font-size: 12.5px; line-height: 1.4; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5); pointer-events: none; }
.tip[hidden] { display: none; }
.tip b { display: block; font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .04em; color: var(--metre); }
.panel--waste .ins { padding: 10px 12px; font-size: 13px; }

/* Planning de l'atelier */
.pweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: end; }
.pday { display: grid; justify-items: center; gap: 6px; min-width: 0; padding: 10px 4px 8px; border-radius: 14px; }
.pday.is-today { background: var(--calque); box-shadow: inset 0 0 0 1.5px var(--ink); }
.pday.is-next { background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(21, 24, 27, .03) 8px 16px); box-shadow: inset 0 0 0 1px var(--line); }
.pday.is-past { opacity: .5; }
.pday__pct { font-size: 13px; color: var(--ink-2); }
.pday.is-over .pday__pct { color: var(--red); font-weight: 700; font-size: 15px; }
.pday__bar { position: relative; display: flex; flex-direction: column-reverse; justify-content: flex-start; gap: 2px; width: min(56px, 80%); height: 200px; border-radius: 8px 8px 4px 4px; background: rgba(21, 24, 27, .04); overflow: visible; }
.pday__cap { position: absolute; left: -8px; right: -8px; height: 0; border-top: 2px dashed var(--red); z-index: 2; }
.ld { display: block; flex: none; border-radius: 4px; background: var(--alu); transition: height .6s var(--ease); }
.ld--job { background: var(--metre); box-shadow: inset 0 0 0 1px var(--ink); }
.ld--job.is-draft { background: repeating-linear-gradient(135deg, var(--metre-soft) 0 5px, var(--metre) 5px 9px); }
.ld--belv { background: var(--anthracite); }
.pday.is-over .ld:last-child { box-shadow: 0 0 0 2px var(--red); }
.pday__d { font-size: 13px; font-weight: 650; }
.pday small { font-size: 11.5px; color: var(--ink-3); text-align: center; }
.pls { display: flex; flex-direction: column; }
.pl { display: grid; grid-template-columns: 150px minmax(0, 1fr) 70px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.pl:first-child { border-top: 0; }
.pl > span:nth-child(2) { display: flex; flex-wrap: wrap; gap: 6px; }
.pl__it { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: rgba(21, 24, 27, .06); font-size: 12.5px; }
.pl__it i { font-style: normal; font-size: 11px; color: var(--ink-3); }
.pl__it--job { background: var(--metre-soft); }
.pl__it--job.is-draft { box-shadow: inset 0 0 0 1px var(--metre-2); background: transparent; }
.pl__it--belv { background: var(--anthracite); color: #fff; }
.pl__it--belv i { color: rgba(255, 255, 255, .6); }
.pl__n { text-align: right; font-size: 12.5px; color: var(--ink-2); }
.pl.is-over .pl__n { color: var(--red); font-weight: 700; }

/* ---------- Poses ------------------------------------------------------------------------------------ */
.pg-wrap { min-width: 0; }
.pg { display: grid; grid-template-columns: 112px repeat(var(--n), minmax(0, 1fr)); gap: 6px; }
.pg__k { display: flex; flex-direction: column; justify-content: center; padding: 6px 4px; font-size: 13px; }
.pg__k b { font-weight: 650; }
.pg__k small { color: var(--ink-3); font-size: 11.5px; }
.pg__k--v { opacity: .8; }
.pg__d { display: flex; flex-direction: column; padding: 4px 6px; font-size: 13px; }
.pg__d small { color: var(--ink-3); font-size: 11.5px; }
.pg__d.is-today b { color: var(--ink); text-decoration: underline; text-decoration-color: var(--metre); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.pg__c { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 84px; padding: 6px; border-radius: 12px; background: var(--calque); }
.pg__c.is-today { box-shadow: inset 0 0 0 1.5px var(--grid-2); }
.pg__c--v { position: relative; min-height: 40px; flex-direction: row; flex-wrap: wrap; gap: 4px; align-content: center; }
.vu { padding: 2px 7px; border-radius: 6px; background: var(--anthracite); color: #fff; font-family: var(--mono); font-size: 10.5px; white-space: nowrap; }
.vu.is-clash { background: var(--red); }
.pc { display: grid; gap: 1px; width: 100%; min-width: 0; padding: 8px 9px; border: 0; border-left: 3px solid var(--alu-2); border-radius: 9px; background: var(--white); box-shadow: 0 1px 0 rgba(21, 24, 27, .06), 0 0 0 1px var(--line); color: var(--ink); text-align: left; font-size: 12.5px; line-height: 1.3; }
.pc:hover { box-shadow: 0 8px 16px -10px rgba(21, 24, 27, .4), 0 0 0 1px var(--ink-3); }
.pc__h { font-size: 11px; color: var(--ink-2); }
.pc b { overflow: hidden; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.pc small { overflow: hidden; color: var(--ink-3); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.pc__v { display: flex; align-items: center; gap: 4px; margin-top: 3px; color: var(--ink-2); font-size: 11.5px; }
.pc__v .i { width: 14px; height: 14px; }
.pc.is-ok { border-left-color: var(--ok); }
.pc.is-by { border-left-color: var(--metre); }
.pc.is-clash { border-left-color: var(--red); background: var(--red-soft); }
.pms { display: none; }
.pm h3 { margin: 10px 0 6px; font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.pm__r { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 6px; }
.pm__t { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.route { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 1060px) { .route { grid-template-columns: minmax(0, 640px) minmax(0, 1fr); align-items: start; column-gap: 24px; } .route > .muted { grid-column: 2; } }
.route__svg { width: 100%; height: auto; border-radius: 16px; background: var(--white); background-image: var(--mm); background-size: 12px 12px; box-shadow: inset 0 0 0 1px var(--line); }
.rt-c { fill: var(--alu-2); }
.rt-l { font-family: var(--ui); font-size: 11px; fill: var(--ink-3); }
.rt-l--a { font-weight: 700; fill: var(--ink); font-size: 12px; }
.rt-l--stop { fill: var(--ink); font-weight: 650; }
@media (max-width: 640px) { .rt-l { display: none; font-size: 22px; } .rt-l--stop, .rt-l--a { display: inline; font-size: 22px; } .rt-s text { font-size: 13px; } }
.rt-p { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.rt-p--A { stroke: var(--metre-2); }
.rt-p--B { stroke: var(--anthracite); stroke-dasharray: 6 5; }
.rt-s circle { stroke: var(--ink); stroke-width: 1.4; }
.rt-s--A circle { fill: var(--metre); }
.rt-s--B circle { fill: var(--white); }
.rt-s text { font-family: var(--mono); font-size: 10px; fill: var(--ink); }
.rt-a rect { fill: var(--anthracite); }
.rt-a path { fill: none; stroke: var(--metre); stroke-width: 2; }
.route__l { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.route__l li { display: flex; align-items: baseline; gap: 8px; }
.rt-k { flex: none; display: inline-block; width: 18px; height: 0; border-top: 3px solid var(--metre-2); transform: translateY(-3px); }
.rt-k--B { border-top: 3px dashed var(--anthracite); }

/* ---------- Stock -------------------------------------------------------------------------------- */
.sks { display: flex; flex-direction: column; }
.sk { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 52px 118px; align-items: center; gap: 12px; min-height: 52px; padding: 6px 0; border-top: 1px solid var(--line); }
.sk:first-child { border-top: 0; }
.sk__l { min-width: 0; }
.sk__l b { font-weight: 400; font-size: 13px; }
.sk__l small { display: flex; align-items: center; gap: 6px; overflow: hidden; color: var(--ink-3); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.sw { flex: none; display: inline-block; width: 11px; height: 11px; border-radius: 3px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.sk__bar { position: relative; height: 10px; border-radius: 999px; background: var(--grid); }
.sk__bar i { display: block; height: 100%; border-radius: inherit; background: var(--alu-2); }
.sk__bar em { position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 2px; background: var(--ink); }
.sk.is-low .sk__bar i { background: var(--red); }
.sk.is-low .sk__q { color: var(--red); }
.sk.is-ord .sk__bar i { background: var(--ok); }
.sk__q { font-size: 13px; text-align: right; }
.sk__q small { color: var(--ink-3); font-size: 11px; }
.sk__a { display: flex; justify-content: flex-end; }
.racks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rack { min-width: 0; padding: 10px; border-radius: 14px; background: var(--calque); }
.rack__h { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 12px; color: var(--ink-2); }
.rack__h span { color: var(--ink-3); }
.rack__l { display: grid; gap: 4px; }
.cu { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0 8px; padding: 6px 8px 8px; border-radius: 8px; background: var(--white); font-size: 11.5px; overflow: hidden; }
.cu b { font-weight: 400; font-size: 11.5px; }
.cu small { overflow: hidden; color: var(--ink-3); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.cu__bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--c); }
.cu em { grid-column: 1 / -1; font-style: normal; font-size: 10.5px; font-weight: 650; color: #6b5300; }
.cu.is-used { box-shadow: inset 0 0 0 1.5px var(--metre-2); background: var(--metre-soft); }
.gos { display: flex; flex-direction: column; }
.go { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.go:first-child { border-top: 0; }
.go__i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--calque); color: var(--ink-2); }
.go__i .i { width: 18px; height: 18px; }
.go.is-late .go__i { background: var(--warn-soft); color: #9a5c06; }
.go__b { min-width: 0; }
.go__b b { display: block; font-size: 13.5px; font-weight: 650; }
.go__b small { display: block; color: var(--ink-3); font-size: 12px; line-height: 1.4; }
.go__a { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.pr { display: flex; flex-direction: column; }
.pr__r { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 52px; padding: 6px 0; border-top: 1px solid var(--line); }
.pr__r:first-child { border-top: 0; }
.pr__r b { display: block; font-size: 13.5px; font-weight: 650; }
.pr__r small { display: block; color: var(--ink-3); font-size: 12px; }
.pr__r--alu { margin: 0 0 4px; padding: 10px 12px; border-radius: 14px; border: 0; background: var(--metre-soft); }
.pr__r--alu + .pr__r { border-top: 0; }
.pr__in { position: relative; display: inline-flex; align-items: center; }
.pr__in input { width: 140px; height: 44px; padding: 0 58px 0 12px; border: 1.5px solid var(--line); border-radius: 11px; background: var(--white); font-family: var(--mono); font-size: 16px; text-align: right; -webkit-appearance: none; appearance: none; }
.pr__in input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(242, 194, 27, .35); }
.pr__in i { position: absolute; right: 10px; font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--ink-3); pointer-events: none; }
.pr__v { font-size: 13px; white-space: nowrap; }

/* ---------- Encaissements ------------------------------------------------------------------------ */
.ers { display: flex; flex-direction: column; }
.er { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 56px; padding: 8px 0; border-top: 1px solid var(--line); }
.er:first-child { border-top: 0; }
.er__b { min-width: 0; }
.er__b b { display: block; overflow: hidden; font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.er__b small { display: block; color: var(--ink-3); font-size: 12px; line-height: 1.4; }
.er__amt { font-size: 13px; white-space: nowrap; text-align: right; }
.er__a { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.er.is-late .er__amt { color: var(--red); }
.modes { display: grid; gap: 10px; }
.modes li { display: grid; grid-template-columns: 82px minmax(0, 1fr) 46px; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; }
.modes .meter { height: 10px; margin: 0; }
.modes .meter i { background: var(--anthracite); }
.modes li:first-child .meter i { background: var(--metre); }
.modes b { font-weight: 400; font-size: 12.5px; text-align: right; }

/* ---------- Tiroir ---------------------------------------------------------------------------------- */
.drawer { position: fixed; inset: 0; z-index: 80; visibility: hidden; overflow: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(21, 24, 27, .42); opacity: 0; transition: opacity .3s; }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(560px, 100%); background: var(--paper); box-shadow: -24px 0 60px -30px rgba(0, 0, 0, .45); transform: translateX(102%); transition: transform .45s var(--ease); outline: none; }
.drawer.is-wide .drawer__panel { width: min(1080px, 100%); }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__close { position: absolute; top: 12px; right: 14px; z-index: 5; display: grid; place-items: center; width: 44px; height: 44px; border: 1.5px solid var(--line); border-radius: 50%; background: var(--paper); }
.drawer__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 16px; padding: 20px 22px 40px; }
.dh2 { padding-right: 52px; }
.dh2 h2 { margin-top: 4px; font-family: var(--display); font-weight: 680; font-stretch: 106%; font-size: 26px; line-height: 1.1; }
.dh2__s { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; color: var(--ink-2); font-size: 13.5px; }
.dh2__s .i { width: 15px; height: 15px; color: var(--ink-3); }
.dsect { display: grid; gap: 10px; }
.dsect h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.dsect h3 .tag { text-transform: none; letter-spacing: 0; font-family: var(--ui); }
.stepper { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.stepper button { display: grid; justify-items: center; gap: 4px; width: 100%; min-height: 58px; padding: 6px 2px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-3); font-size: 10.5px; font-weight: 650; line-height: 1.2; text-align: center; }
.stepper button:not(:disabled):hover { background: var(--calque); color: var(--ink); }
.stepper button:disabled { cursor: default; }
.stepper i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--grid-2); font-style: normal; font-family: var(--mono); font-size: 11px; background: var(--white); }
.stepper i .i { width: 14px; height: 14px; }
.stepper .is-past { color: var(--ink-2); }
.stepper .is-past i { background: var(--ok); border-color: var(--ok); color: #fff; }
.stepper .is-cur { color: var(--ink); }
.stepper .is-cur i { background: var(--metre); border-color: var(--ink); }
.stepper span { overflow-wrap: anywhere; hyphens: auto; }
.dls { display: grid; gap: 8px; }
.dl { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 8px 10px 8px 8px; border: 0; border-radius: 14px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-align: left; }
.dl:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.dl__art { display: grid; place-items: end center; height: 76px; padding: 2px; border-radius: 10px; background: var(--paper); background-image: var(--mm); background-size: 8px 8px; }
.dl__art .dw { width: 100%; height: 100%; }
.dl__b { min-width: 0; display: grid; gap: 1px; font-size: 13px; }
.dl__b b { font-size: 14px; font-weight: 650; }
.dl__b small { color: var(--ink-3); font-size: 12px; }
.dl__b .tag { justify-self: start; margin-top: 3px; }
.dl__id { font-size: 11px; color: var(--ink-3); }
.dl__p { font-size: 12.5px; white-space: nowrap; }
.dl.is-alert { box-shadow: inset 0 0 0 1.5px var(--red); }
.tots { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--calque); }
.tots p { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.tots b { font-weight: 400; white-space: nowrap; }
.tots .tots__ttc { margin-top: 2px; padding-top: 6px; border-top: 1px solid var(--grid-2); font-weight: 650; font-size: 15px; }
.tots .tots__ttc b { font-size: 16px; }
.tots .muted { display: block; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.facts div { min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--calque); font-size: 13.5px; }
.facts span { display: block; color: var(--ink-3); font-size: 11.5px; }
.facts b { display: block; font-weight: 650; overflow-wrap: anywhere; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.btns--end { padding-top: 6px; border-top: 1px dashed var(--grid-2); }
.lbl { display: grid; gap: 7px; min-width: 0; }
.lbl > span { font-family: var(--display); font-weight: 600; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink-2); font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background-color .2s, border-color .2s, color .2s; }
.chips button[aria-checked="true"] { background: var(--metre); border-color: var(--ink); color: var(--ink); }
.chips button:disabled { opacity: .55; cursor: default; }
.chips button[aria-checked="true"]:disabled { opacity: 1; }
.belv-st { display: flex; flex-wrap: wrap; gap: 6px; }
.belv-st button { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink-2); font-size: 13px; font-weight: 600; }
.belv-st .is-cur { border-color: var(--ink); color: var(--ink); box-shadow: 0 0 0 3px var(--metre-soft); }
.belv-st .is-past { color: var(--ink-3); }
.bos { display: flex; flex-direction: column; }
.bo { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.bo:first-child { border-top: 0; }
.bo__art { display: grid; place-items: end center; height: 52px; }
.bo__art .dw { width: 100%; height: 100%; }
.bo__b { min-width: 0; }
.bo__b b { display: block; font-size: 13.5px; font-weight: 650; }
.bo__b small { display: block; color: var(--ink-3); font-size: 12px; }
.bo__c { display: grid; justify-items: end; gap: 1px; font-size: 11.5px; color: var(--ink-3); text-align: right; }
.bo__c b { font-weight: 400; font-size: 12.5px; color: var(--ink); }
.bo__c em { font-style: normal; font-family: var(--ui); font-weight: 650; font-size: 11.5px; }
.bo.is-diag { margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 12px; background: var(--red-soft); }
.bo.is-cote { margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 12px; background: var(--warn-soft); }
.pose-art { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 16px; background: var(--calque); }
.pose-art .truck { flex: none; width: 110px; }
.pose-art b { display: block; font-size: 15px; }
.pose-art small { display: block; color: var(--ink-3); font-size: 12.5px; }
.paybig { display: grid; gap: 2px; padding: 18px; border-radius: 18px; background: var(--anthracite); color: #fff; }
.paybig span { font-size: 12.5px; color: rgba(255, 255, 255, .65); }
.paybig b { font-weight: 400; font-size: 34px; color: var(--metre); letter-spacing: -.02em; white-space: nowrap; }
.paybig small { color: rgba(255, 255, 255, .65); font-size: 12.5px; }
.limit { padding: 13px 14px; border-radius: 14px; background: var(--red-soft); border: 1.5px solid rgba(200, 64, 46, .4); }
.limit__msg { display: flex; gap: 9px; font-size: 14.5px; line-height: 1.4; font-weight: 650; color: #8f2a1c; }
.limit__msg .i { color: var(--red); margin-top: 1px; }
.limit__sub { margin: 4px 0 10px 29px; font-size: 13px; color: #7a3226; }
.limit__fixes { display: flex; flex-wrap: wrap; gap: 8px; }
.limit__fixes .btn { min-height: 46px; font-size: 14px; }

/* ---------- Configurateur (tiroir large) ------------------------------------------------------------- */
.cfh { display: flex; align-items: center; gap: 10px; padding-right: 52px; }
.cfh__t { flex: 1; min-width: 0; }
.cfh h2 { margin-top: 2px; overflow: hidden; font-family: var(--display); font-weight: 680; font-stretch: 106%; font-size: 24px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.cfh .kicker { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cfg__l { display: grid; gap: 12px; min-width: 0; position: sticky; top: 0; }
.cfg__r { display: grid; gap: 4px; min-width: 0; }
.cdraw { position: relative; display: flex; justify-content: center; align-items: flex-end; height: min(52vh, 440px); border-radius: 16px; background: var(--white); background-image: var(--mm); background-size: 10px 10px; box-shadow: inset 0 0 0 1px var(--line); padding: 8px 6px 4px; touch-action: none; user-select: none; -webkit-user-select: none; }
.cdraw .dw { width: 100%; height: 100%; }
.cdraw .dw-knob__halo { animation: halo 2.2s var(--ease) infinite; transform-box: fill-box; transform-origin: center; }
@keyframes halo { 50% { transform: scale(1.35); opacity: .6; } }
html.is-drag, html.is-drag * { cursor: grabbing !important; }
.cprice { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--anthracite); color: #fff; }
.cprice > div { display: flex; flex-direction: column; line-height: 1.1; }
.cprice small { margin-top: 3px; font-size: 11px; color: rgba(255, 255, 255, .6); }
.cprice__ttc { font-size: 27px; color: var(--metre); white-space: nowrap; }
.cprice__ttc.is-tick { animation: tick .35s var(--ease); }
@keyframes tick { 40% { transform: translateY(-2px); } }
.cprice__ht { text-align: right; }
.cprice__ht .mono { font-size: 15px; white-space: nowrap; }
.cprice.is-over .cprice__ttc { color: rgba(255, 255, 255, .5); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.deb { padding: 12px 12px 10px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); }
.deb__h { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 650; }
.deb__h .i { width: 17px; height: 17px; }
.deb__n { margin-left: auto; font-size: 11.5px; font-weight: 400; color: var(--ink-2); white-space: nowrap; }
.deb__bars { display: grid; gap: 4px; margin-top: 8px; }
.deb__row { display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: center; gap: 6px; }
.deb__ref { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.deb__s { margin-top: 8px; font-size: 11.5px; color: var(--ink-3); line-height: 1.4; }
.cfg__cart { overflow-x: auto; }
.dims { display: grid; grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr); align-items: end; gap: 6px; }
.dim { position: relative; display: grid; gap: 4px; min-width: 0; }
.dim > span { font-family: var(--display); font-weight: 600; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.dim input { width: 100%; min-width: 0; height: 52px; padding: 0 34px 0 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white); font-family: var(--mono); font-size: 21px; text-align: center; -webkit-appearance: none; appearance: none; }
.dim input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(242, 194, 27, .35); }
.dim input[readonly] { background: transparent; }
.dim input[aria-invalid="true"] { border-color: var(--red); }
.dim i { position: absolute; right: 11px; bottom: 16px; font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--ink-3); pointer-events: none; }
.dims__x { padding-bottom: 14px; text-align: center; font-family: var(--mono); font-size: 18px; color: var(--ink-3); }
.fld2 { display: grid; gap: 7px; margin-top: 14px; }
.fld2 > span { font-family: var(--display); font-weight: 600; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.fld2 > small { font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.sws { display: flex; flex-wrap: wrap; gap: 6px; }
.swb { width: 44px; height: 44px; border-radius: 12px; border: 0; background: linear-gradient(135deg, var(--c) 50%, var(--c2) 50%); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); }
.swb[aria-checked="true"] { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2), 0 0 0 2.5px var(--paper), 0 0 0 4.5px var(--ink); }
.swb:disabled { opacity: .25; cursor: default; }
.swb[aria-checked="true"]:disabled { opacity: 1; }
.togs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.tog { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); text-align: left; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.tog__t { position: relative; flex: none; width: 40px; height: 24px; border-radius: 999px; background: var(--grid-2); transition: background-color .25s; }
.tog__t::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .3s var(--ease); }
.tog[aria-checked="true"] { color: var(--ink); border-color: var(--ink-3); }
.tog[aria-checked="true"] .tog__t { background: var(--metre-2); }
.tog[aria-checked="true"] .tog__t::after { transform: translateX(16px); }
.tog:disabled { opacity: .55; }
.imp { display: flex; align-items: center; gap: 8px; }
.imp b { min-width: 86px; text-align: center; font-size: 16px; font-weight: 400; }
.imp__b { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--white); font-size: 20px; font-weight: 600; }
.imp__b:disabled { opacity: .4; }
.imp__x { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-left: auto; padding: 0 12px; border: 0; border-radius: 12px; background: rgba(21, 24, 27, .06); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.imp__x .i { width: 15px; height: 15px; }

/* ---------- Impression : fiche de débit, étiquettes ------------------------------------------------------ */
.print-sheet { display: none; }
@media print {
  body > *:not(.print-sheet) { display: none !important; }
  body { background: #fff; }
  .print-sheet { display: block; color: #000; font-family: var(--ui); font-size: 11px; }
  .ps__h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 2px solid #000; }
  .ps__h b { font-family: var(--display); font-stretch: 112%; letter-spacing: .06em; font-size: 18px; }
  .print-sheet table { width: 100%; border-collapse: collapse; }
  .print-sheet th, .print-sheet td { padding: 4px 6px; border-bottom: 1px solid #999; text-align: left; vertical-align: top; font-family: var(--mono); font-size: 10px; }
  .labs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .lab { display: grid; gap: 1px; padding: 6px; border: 1px dashed #000; break-inside: avoid; }
  .lab b { font-size: 11px; }
}

/* ---------- Mode intégré ------------------------------------------------------------------------------ */
.is-embed .shell { min-height: 100vh; }
@media (min-width: 861px) { .is-embed .side { height: 100vh; height: 100dvh; } }
.is-embed .side__apps { display: none; }

/* ---------- Écrans moyens -------------------------------------------------------------------------------- */
@media (max-width: 1320px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis.kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .belv-h { grid-template-columns: minmax(0, 1fr); }
  .stps--row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .today { grid-template-columns: minmax(0, 1fr); }
  .today__side { order: -1; }
  .dgrid { grid-template-columns: minmax(0, 1fr); }
  .dgrid__side { position: static; order: -1; }
  .belv { grid-template-columns: minmax(0, 1fr); }
  .racks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dnums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1060px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .cfg { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .cfg__l, .cfg__r { display: contents; }
  .cfg .dims { order: -2; }
  .cfg .cdraw { order: -1; }
  .cfg .copts { order: 1; }
  .cfg .deb { order: 2; }
  .cfg .cfg__cart { order: 3; }
  .copts .fld2:first-child { margin-top: 2px; }
}
@media (max-width: 1023px) {
  .topbar__r { display: none; }
}

/* ---------- Tablette et téléphone : barre d'onglets en bas, bascule dans l'en-tête ------------------------------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); min-height: 0; background: none; }
  .side { position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; top: auto; height: auto; flex-direction: row; gap: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); overflow: hidden; background: rgba(35, 39, 43, .97); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 -10px 30px -18px rgba(0, 0, 0, .5); }
  .side__brand, .side__apps, .side__foot { display: none; }
  .nav { flex: 1; flex-direction: row; gap: 1px; min-width: 0; }
  .nav a { flex: 1 1 0; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; height: 56px; min-height: 0; padding: 0 1px; border-radius: 12px; font-size: 10.5px; font-weight: 650; text-align: center; letter-spacing: -.01em; }
  .nav a > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav a[aria-current="page"] { background: rgba(255, 255, 255, .1); color: #fff; }
  .nav a[aria-current="page"] .i { color: var(--metre); }
  .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__long { display: none; }
  .nav__short { display: inline; }
  .nav__badge { position: absolute; top: 3px; left: calc(50% + 5px); margin: 0; min-width: 18px; height: 18px; padding: 0 4px; font-size: 10.5px; }
  .main { padding: 12px 16px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .topbar { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 12px; margin-bottom: 16px; }
  .topbar__m { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .pmode--top { background: var(--p-ink); }
  .pmode--top a { height: 44px; padding: 0 14px; font-size: 12.5px; }
  .topbar h1 { font-size: 30px; }
  .topbar__date { font-size: 11px; }
  .drawer__panel, .drawer.is-wide .drawer__panel { width: 100%; }
  .drawer__body { padding: 18px 16px calc(36px + env(safe-area-inset-bottom, 0px)); }
  .search input, .pr__in input, .dim input { font-size: 16px; }
  .toast-stack { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  /* tiroir ouvert : le toast se pose en bas, jamais sur l’en-tête du tiroir (fermer, ligne précédente/suivante) */
  html.has-drawer .toast-stack { top: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .pg-wrap { display: none; }
  .pms { display: block; }
  .cdraw { height: min(46vh, 360px); }
  .dim input { font-size: 21px; }
}
@media (max-width: 640px) {
  .kpis, .kpis.kpis--3 { gap: 10px; }
  .kpis.kpis--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis.kpis--3 > :last-child { grid-column: 1 / -1; }
  .kpi { padding: 12px 13px; }
  .kpi__v { font-size: 21px; }
  .kpi__s { font-size: 11.5px; }
  .kpi__spark { display: none; }
  .panel { padding: 16px 14px; }
  .panel--list { padding: 4px 12px; }
  .drow { grid-template-columns: 52px minmax(0, 1fr); row-gap: 6px; }
  .drow__s { grid-column: 2; justify-content: flex-start; }
  .todo__it { grid-template-columns: 34px minmax(0, 1fr); }
  .todo__ico { width: 34px; height: 34px; }
  .todo__it .btn, .todo__done { grid-column: 2; justify-self: start; }
  .jrow { grid-template-columns: 46px minmax(0, 1fr); gap: 6px 12px; }
  .jrow__art { width: 46px; height: 46px; }
  .jrow__s { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; justify-items: start; gap: 6px 10px; }
  .belv-card { grid-template-columns: 48px minmax(0, 1fr); padding: 12px 14px; }
  .belv-card__art svg { width: 48px; }
  .belv-card__go { display: none; }
  .belv-card__b b { font-size: 16px; }
  .fg { grid-template-columns: 26px repeat(6, minmax(0, 1fr)); gap: 3px; padding: 8px; }
  .fg__c { min-height: 44px; border-radius: 5px; }
  .fg__c b { font-size: 11.5px; }
  .fg__c small { display: none; }
  .dhead { grid-template-columns: minmax(0, 1fr); padding: 16px 14px; }
  .dhead__act { grid-column: 1; grid-row: auto; justify-content: flex-start; }
  .dhead .seg { display: flex; }
  .dhead .seg button { flex: 1 1 auto; padding: 0 8px; font-size: 13px; }
  .dnums p { padding: 10px 11px; }
  .dnums b { font-size: 24px; }
  .dnums span { font-size: 11.5px; }
  .br { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 9px 2px; }
  .br__l { grid-column: 1; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
  .br__w { flex: 1 1 100%; }
  .br__g { grid-column: 1 / -1; grid-row: 2; }
  .br .cutb { grid-column: 2; grid-row: 1; min-height: 44px; padding: 0 10px; font-size: 12.5px; }
  .br.is-cur { margin: 2px -6px; padding-left: 8px; padding-right: 8px; }
  .seg--big { display: flex; width: 100%; }
  .seg--big button { flex: 1 1 0; padding: 0 8px; font-size: 13.5px; }
  .atop > .btn { display: none; }
  .pweek { gap: 3px; }
  .pday { padding: 8px 0 6px; border-radius: 10px; }
  .pday__bar { height: 150px; width: 70%; }
  .pday__pct { font-size: 11px; }
  .pday.is-over .pday__pct { font-size: 12px; }
  .pday__d { font-size: 11px; }
  .pday small { display: none; }
  .pl { grid-template-columns: minmax(0, 1fr) 56px; }
  .pl > span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .sk { grid-template-columns: minmax(0, 1fr) 46px; row-gap: 6px; }
  .sk__bar { grid-column: 1 / -1; grid-row: 2; }
  .sk__a { grid-column: 1 / -1; justify-content: flex-start; }
  .sk__a:empty { display: none; }
  .racks { grid-template-columns: minmax(0, 1fr); }
  .go { grid-template-columns: 36px minmax(0, 1fr); }
  .go__a { grid-column: 2; justify-content: flex-start; }
  .pr__in input { width: 124px; }
  .er { grid-template-columns: minmax(0, 1fr) auto; }
  .er__a { grid-column: 1 / -1; justify-content: flex-start; }
  .er__a:empty { display: none; }
  .stps--row { grid-template-columns: minmax(0, 1fr); }
  .modes li { grid-template-columns: 72px minmax(0, 1fr) 40px; }
  .stepper { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 2px; }
  .dl { grid-template-columns: 64px minmax(0, 1fr); }
  .dl__art { height: 64px; }
  .dl__p { grid-column: 2; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .togs { grid-template-columns: minmax(0, 1fr); }
  .cfh h2 { font-size: 20px; }
  .bo { grid-template-columns: 40px minmax(0, 1fr); }
  .bo__c { grid-column: 2; justify-items: start; text-align: left; }
  .ins .btn { margin-left: 34px; }
}
@media (max-width: 400px) {
  .pmode--top a { padding: 0 11px; font-size: 12px; }
}

/* Téléphone : la notification se pose sur la barre d'onglets, opaque, pleine largeur */
@media (max-width: 860px) {
  html:not(.has-drawer) .toast-stack { left: 0; right: 0; width: auto; transform: none; bottom: calc(68px + env(safe-area-inset-bottom, 0px)); gap: 0; }
  html:not(.has-drawer) .toast { border-radius: 18px 18px 0 0; padding: 14px 18px 15px; box-shadow: 0 -16px 32px -20px rgba(0, 0, 0, .55); }
  html:not(.has-drawer) .toast + .toast { display: none; }
}

/* Tiroir ouvert sur ordinateur : les notifications passent à gauche, sur le voile, jamais sur le tiroir */
@media (min-width: 861px) {
  html.has-drawer .toast-stack { left: 16px; right: auto; bottom: 16px; transform: none; width: min(330px, calc(100vw - 600px)); }
  html.has-drawer:has(.drawer.is-wide) .toast-stack { width: max(240px, calc(100vw - 1080px - 32px)); }
}
