/* ==========================================================================
   TRAVERSE — écran de l'atelier (débit du jour). Lisible de loin : gros
   chiffres mono, une barre suivante en grand, les autres en liste.
   Étroit (téléphone, page « en direct ») : une colonne. Large : la barre
   suivante à gauche, la liste à droite.
   ========================================================================== */

html, body { height: 100%; }
body.at { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; background: var(--calque); }
.at .demo-bar { flex: none; }
.scr { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

/* ---------- En-tête ------------------------------------------------------------------- */
.sh { flex: none; position: relative; padding: 10px 14px 14px; background: var(--anthracite); color: #fff; overflow: hidden; }
.sh::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 12px 12px; pointer-events: none; }
.sh > * { position: relative; }
.sh__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sh__brand { display: inline-flex; align-items: center; gap: 8px; }
.sh__mark { width: 26px; height: 26px; color: #fff; }
.sh__mark .logo-mark__cote { stroke: var(--metre); }
.sh__mark .logo-mark__glass { fill: var(--glass); opacity: .6; }
.sh__brand b { display: block; font-family: var(--display); font-weight: 680; font-stretch: 112%; font-size: 14px; letter-spacing: .08em; line-height: 1; }
.sh__brand small { display: block; margin-top: 3px; font-family: var(--display); font-weight: 600; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--metre); }
.sh__live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .7); }
.sh__live i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #4fd18b; }
.sh__live i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #4fd18b; animation: live 1.8s ease-out infinite; }
@keyframes live { 0% { opacity: .8; transform: scale(.5); } 100% { opacity: 0; transform: scale(1.6); } }
.sh__t { margin-top: 10px; font-family: var(--display); font-weight: 680; font-stretch: 106%; font-size: 24px; line-height: 1.05; letter-spacing: -.015em; }
.sh__d { margin-top: 4px; font-size: 11px; color: rgba(255, 255, 255, .62); }
.sh__seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin-top: 10px; }
.sh__seg button { min-height: 42px; font-size: 13.5px; }
.kp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.kp__c { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 9px 10px 8px; border-radius: 12px; background: rgba(255, 255, 255, .07); }
.kp__c b { font-size: 26px; font-weight: 500; line-height: 1; letter-spacing: -.02em; color: #fff; white-space: nowrap; }
.kp__c--m b { color: var(--metre); }
.kp__c span { font-size: 11px; line-height: 1.25; color: rgba(255, 255, 255, .72); }
.kp__c em { display: block; font-style: normal; color: rgba(255, 255, 255, .5); }
.kp__c b.is-bump { animation: bump .7s var(--ease); }
@keyframes bump { 35% { transform: scale(1.12); } }

/* ---------- Corps ------------------------------------------------------------------------ */
.sbody { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; outline: none; padding: 12px 12px 30px; }
.lay { display: grid; gap: 12px; }
.lay__a, .lay__b { min-width: 0; }

.hero { padding: 12px 12px 12px; border-radius: 16px; background: var(--paper); border: 1.5px solid var(--ink); box-shadow: 6px 6px 0 rgba(21, 24, 27, .06); }
.hero.is-by { border-color: var(--metre-2); box-shadow: 0 0 0 3px var(--metre-soft), 6px 6px 0 rgba(21, 24, 27, .06); }
.hero__k { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 600; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.hero__k .i { width: 16px; height: 16px; }
.hero__t { margin-top: 4px; font-size: 14px; font-weight: 600; line-height: 1.35; }
.hero__t b { font-size: 15px; }
.hero__t .tag { vertical-align: 1px; }
.hero__bar { margin-top: 8px; }
.hero__pcs { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 10px; }
.pc { display: inline-flex; align-items: baseline; gap: 4px; padding: 3px 7px; border-radius: 7px; background: rgba(21, 24, 27, .06); font-family: var(--mono); font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.pc b { font-weight: 500; color: var(--ink); font-size: 12px; }
.pc i { font-style: normal; color: var(--ink-3); }
.pc small { font-size: 9.5px; color: var(--ink-3); }
.pc.is-by { background: var(--metre-soft); }
.hero .btn .i { stroke-width: 2.4; }
.hero--base .hero__t { font-weight: 500; color: var(--ink-2); }

.sec { margin-top: 4px; }
.sec + .sec { margin-top: 18px; }
.sec__h { display: grid; gap: 5px; padding: 0 2px 8px; }
.sec__h > p:first-child { font-size: 14px; line-height: 1.3; }
.sec__h .tag { justify-self: start; white-space: normal; }
.tag--dash { background: transparent; box-shadow: inset 0 0 0 1.5px var(--warn); border-radius: 999px; }
.sec__s { font-size: 11px; color: var(--ink-3); }
.brs { display: grid; gap: 6px; }

.br { padding: 7px 8px 7px 9px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); content-visibility: auto; contain-intrinsic-size: auto 64px; }
.br__l { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 10.5px; color: var(--ink-3); line-height: 1.3; }
.br__l b { font-weight: 600; color: var(--ink); font-size: 11.5px; }
.br__w { color: var(--ink-3); }
.br__next { flex-basis: 100%; font-family: var(--display); font-weight: 650; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
@media (max-width: 999px) { .lay__a { display: none; } }
@media (min-width: 1000px) { .br__next { display: none; } }
.br__g { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-top: 4px; }
.br.is-by { border-color: rgba(224, 174, 0, .55); }
.br.is-cur { border: 1.5px solid var(--ink); box-shadow: 0 0 0 3px var(--metre-soft); }
.br.is-cut { background: transparent; }
.br.is-cut .db { opacity: .45; }
.br.is-moved { animation: moved .9s var(--ease); }
.br.is-new { animation: rowin .6s var(--ease) both; }
@keyframes moved { 0% { box-shadow: 0 0 0 3px var(--metre); } 100% { box-shadow: 0 0 0 0 rgba(242, 194, 27, 0); } }
@keyframes rowin { from { opacity: 0; transform: translateY(-6px); } }
.is-switch .br { animation: rowin .5s var(--ease) both; animation-delay: calc(min(var(--i), 18) * 22ms); }
.is-flash .br.is-by { animation: solid 1.6s var(--ease) both; animation-delay: calc(min(var(--i), 18) * 40ms); }
@keyframes solid { 0% { box-shadow: 0 0 0 0 rgba(242, 194, 27, 0); } 25% { box-shadow: 0 0 0 4px var(--metre); background: var(--metre-soft); } 100% { box-shadow: 0 0 0 0 rgba(242, 194, 27, 0); } }

.cutb { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 88px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 11px; background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--grid-2); font-size: 13px; font-weight: 650; white-space: nowrap; }
.cutb__box { flex: none; width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--ink-3); background: var(--white); }
.br.is-cur .cutb__box { border-color: var(--ink); }
.cutb:active { transform: scale(.97); }
.br.is-cur .cutb:not(.is-done) { background: var(--metre); color: var(--ink); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12); }
.cutb.is-done { box-shadow: none; }
.cutb.is-done { background: var(--ok-soft); color: #1f6b43; font-family: var(--mono); font-weight: 500; font-size: 12px; }
.cutb.is-done .i { width: 15px; height: 15px; stroke-width: 2.6; }
.cutb.is-wait { background: transparent; color: #8a5208; box-shadow: inset 0 0 0 1.5px rgba(217, 138, 28, .6); font-size: 12px; cursor: default; }

.at .toast-stack { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom)); }

/* ---------- Grand écran d'atelier ------------------------------------------------------------- */
@media (min-width: 1000px) {
  .sh { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "top top" "t kp" "d kp" "seg kp"; gap: 0 40px; padding: 16px 32px 22px; }
  .sh__top { grid-area: top; }
  .sh__t { grid-area: t; font-size: 34px; margin-top: 14px; }
  .sh__d { grid-area: d; font-size: 13px; }
  .sh__seg { grid-area: seg; width: 420px; }
  .kp { grid-area: kp; align-self: end; grid-template-columns: repeat(3, 210px); gap: 12px; }
  .kp__c { padding: 14px 16px 12px; }
  .kp__c b { font-size: 46px; }
  .kp__c span { font-size: 13px; }
  .sbody { padding: 22px 32px 40px; }
  .lay { grid-template-columns: 430px minmax(0, 1fr); gap: 40px; align-items: start; }
  .lay__a { position: sticky; top: 0; }
  .hero { padding: 20px; }
  .hero__t { font-size: 17px; }
  .pc { font-size: 13px; padding: 5px 9px; }
  .pc b { font-size: 15px; }
  .br__l { font-size: 12px; }
}
