/* Écran tactile : une scène fixe de 1920 × 1080, mise à l'échelle pour remplir n'importe quel écran en largeur, sans défilement. */
html, body { height: 100%; overflow: hidden; background: #000; }
#viewport { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#stage { position: relative; width: 1920px; height: 1080px; flex: none; transform-origin: center center; background: var(--paper); color: var(--ink);
  display: flex; flex-direction: column; padding: 24px 36px 0; font-size: 20px; letter-spacing: -0.005em; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* ---------- Bandeau du haut ---------- */
.bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 40px; align-items: center; height: 92px; flex: none; }
.brand { display: flex; align-items: center; gap: 18px; min-width: 0; }
.adm { width: auto !important; padding: 0 20px; gap: 10px; font-size: 18px; font-weight: 600; color: var(--ink-2); }
.mark { width: 64px; height: 64px; flex: none; border-radius: 18px; background: var(--ink); color: var(--card); display: flex; align-items: center; justify-content: center; }
.brand h1 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 38px; line-height: 1.05; letter-spacing: -0.025em; white-space: nowrap; }
.brand p { margin: 4px 0 0; font-size: 18px; color: var(--ink-3); white-space: nowrap; max-width: 620px; overflow: hidden; text-overflow: ellipsis; }
.bar .road { height: 64px; }
.clock { text-align: right; }
.clock b { display: block; font-family: var(--display); font-weight: 600; font-size: 52px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.clock span { display: block; margin-top: 6px; font-size: 17px; color: var(--ink-3); white-space: nowrap; }

/* ---------- Annonce ---------- */
.announce { flex: none; margin-top: 12px; display: flex; align-items: center; gap: 18px; padding: 14px 24px; border-radius: 18px; background: var(--info-bg); color: var(--ink); font-size: 25px; font-weight: 500; }
.announce b { flex: none; font-size: 15px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-ink); background: var(--info); padding: 6px 12px; border-radius: 999px; }
.announce.alert { background: var(--stop); color: #fff; animation: pulse 2s ease-in-out infinite; }
.announce.alert b { background: #fff; color: var(--stop); }
@keyframes pulse { 50% { filter: brightness(1.1); } }

/* ---------- Pages ---------- */
#pages { flex: 1; min-height: 0; position: relative; }
.page { position: absolute; inset: 18px 0 16px; display: flex; flex-direction: column; animation: fadein 0.3s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.phead { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; min-height: 72px; }
h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 40px; letter-spacing: -0.03em; line-height: 1.05; }
.phead p, .qhead p { margin: 8px 0 0; font-size: 18px; color: var(--ink-2); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.phead p b, .qhead p b { color: var(--ink); font-weight: 600; }

/* Pastilles d'information */
.chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 17px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.chip b { color: var(--ink); font-weight: 600; }
.chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); flex: none; }
.chip.go i { background: var(--go); } .chip.warn i { background: var(--warn); } .chip.stop i { background: var(--stop); }
.chip.warn { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.chip.go { background: var(--go-bg); border-color: transparent; color: var(--go); }
.tag { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.tag.go { background: var(--go-bg); color: var(--go); } .tag.warn { background: var(--warn-bg); color: var(--warn); } .tag.info { background: var(--info-bg); color: var(--info); }

/* Boutons de navigation : contrôle segmenté */
.pnav { display: flex; gap: 12px; align-items: center; }
.seg { display: flex; gap: 4px; padding: 5px; border-radius: 20px; background: var(--card-2); border: 1px solid var(--line); }
.pbtn { min-width: 70px; height: 60px; padding: 0 22px; border-radius: 15px; border: 0; background: transparent; font-size: 20px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.pbtn svg { flex: none; }
.pbtn:active { background: var(--line); }
.pbtn[disabled] { opacity: 0.3; }
.pbtn.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- Avatars (initiales) ---------- */
.av { flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--rc, var(--ink-3)); color: #fff; font-style: normal; font-weight: 600; letter-spacing: -0.01em; }

/* ---------- Page Quais ---------- */
#p-quais { flex-direction: row; gap: 22px; }
.kpis { width: 400px; flex: none; display: flex; flex-direction: column; gap: 14px; }
.nt { flex: 1; min-height: 0; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px 24px; display: flex; flex-direction: column; justify-content: center; gap: 6px; overflow: hidden; box-shadow: var(--shadow); }
.nt label { font-size: 17px; font-weight: 500; color: var(--ink-3); }
.nt b { font-family: var(--display); font-weight: 700; font-size: 68px; line-height: 0.95; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nt b small { font-size: 28px; font-weight: 500; color: var(--ink-3); margin-left: 6px; letter-spacing: -0.02em; }
.nt b.txt { font-size: 34px; line-height: 1.1; letter-spacing: -0.025em; white-space: normal; }
.nt b.list { font-size: 44px; line-height: 1.05; letter-spacing: -0.03em; white-space: normal; }
.nt span { font-size: 16px; color: var(--ink-2); line-height: 1.4; }
.nt span strong { color: var(--ink); font-weight: 600; }
.nt .hot { color: var(--stop); font-weight: 600; }
.nt.free { background: var(--ink); color: var(--card); border-color: var(--ink); }
.nt.free label, .nt.free span, .nt.free b small { color: color-mix(in srgb, var(--card) 65%, transparent); }
.nt.free b { color: var(--card); } .nt.free b.few { color: var(--warn); } .nt.free b.none { color: var(--stop); }
.nt.alert { border: 2px solid var(--stop); background: var(--stop-bg); }

.quais { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qhead { flex: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.qhead h2 { font-size: 34px; }
.qhead p { display: block; font-size: 17px; }
.qhead .legend { display: flex; gap: 22px; margin: 0; font-size: 16px; color: var(--ink-2); align-items: center; white-space: nowrap; flex: none; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { display: inline-block; flex: none; width: 16px; height: 16px; border-radius: 5px; }
i.cell { border: 1.5px dashed var(--line-2); }
i.cell.on { border: 0; background: var(--go); }
i.cell.two { border: 0; background: color-mix(in srgb, var(--go) 75%, #000); box-shadow: 3px -3px 0 color-mix(in srgb, var(--go) 40%, var(--card)); }
.qgrid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 14px; }
.qc { --st: var(--go); --stb: var(--go-bg); position: relative; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; overflow: hidden; box-shadow: var(--shadow); transition: transform 0.12s ease; }
.qc:active { transform: scale(0.985); }
.qc.sature { --st: var(--warn); --stb: var(--warn-bg); } .qc.complet, .qc.depasse { --st: var(--stop); --stb: var(--stop-bg); }
.qc.depasse { border: 2px solid var(--stop); }
.qn { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.qn b { font-family: var(--display); font-weight: 700; font-size: 46px; line-height: 1; letter-spacing: -0.04em; display: flex; align-items: baseline; gap: 8px; }
.qn b small { font-family: var(--body); font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--ink-3); }
.stw { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; padding: 6px 11px; border-radius: 999px; background: var(--stb); color: var(--st); white-space: nowrap; }
.qn .stw { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.qn b { flex: none; }
.stw::before { flex: none; content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.qc.depasse .stw { background: var(--stop); color: #fff; }
.cta { font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); }
.qc.sature .cta, .qc.complet .cta, .qc.depasse .cta { color: var(--st); }
.cta small { display: block; font-family: var(--body); font-weight: 400; font-size: 15px; letter-spacing: 0; color: var(--ink-3); margin-top: 3px; }
.floor { flex: 1; min-height: 56px; display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 4px; padding: 8px; border-radius: 14px; background: var(--card-2); }
.floor i { display: block; border-radius: 4px; border: 1.5px dashed var(--line-2); }
.floor i.on { border: 0; background: var(--st); }
.floor i.two { border: 0; background: color-mix(in srgb, var(--st) 72%, #000); box-shadow: 2px -2px 0 color-mix(in srgb, var(--st) 40%, var(--card)); }
.meta { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; color: var(--ink-3); white-space: nowrap; }
.meta strong { color: var(--ink); font-weight: 600; }

/* ---------- Page Équipe du jour ---------- */
.eq-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.eq-shifts { flex: 1; min-height: 0; display: flex; gap: 20px; }
.shift { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.shift-h { flex: none; display: flex; align-items: center; gap: 12px; }
.shift-h h3 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.posts { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--pc, 4), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 14px; }
.post { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow: hidden; box-shadow: var(--shadow); position: relative; }
.post::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 5px; background: var(--rc); }
.post .ph { display: flex; align-items: center; gap: 10px; }
.post.off { background: var(--card-2); box-shadow: none; }
.post.off::before { display: none; }
.post.off .pr.abs .av { background: var(--line-2); color: var(--ink-2); }
.post .ph label { font-size: 22px; font-weight: 600; color: var(--rf); letter-spacing: 0.01em; }
.post .ph .cnt { margin-left: auto; min-width: 30px; height: 30px; padding: 0 9px; border-radius: 999px; background: var(--rb); color: var(--rf); font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.post .who { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.pr { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pr .av { width: var(--avs, 54px); height: var(--avs, 54px); font-size: calc(var(--avs, 54px) * 0.4); }
.pr span { font-size: var(--nf, 34px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr.abs .av { background: var(--card-2); color: var(--ink-3); }
.pr.abs span { color: var(--ink-3); text-decoration: line-through; font-weight: 500; }
.pr.hole .av { background: transparent; border: 2px dashed var(--warn); color: var(--warn); }
.pr.hole span { color: var(--warn); }
.post small { font-size: 15px; color: var(--ink-3); }
.foot { flex: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 18px; color: var(--ink-3); }
.foot .chip { height: 40px; font-size: 18px; }
.foot > span:first-child { font-weight: 500; margin-right: 4px; }
.empty { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 26px; font-size: 22px; color: var(--ink-3); padding: 40px; box-shadow: var(--shadow); }
.empty b { display: block; font-size: 36px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); margin-bottom: 10px; }

/* ---------- Page Planning ---------- */
.pl-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.pl-card { flex: 1; min-height: 0; display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 8px 14px 10px; box-shadow: var(--shadow); }
.wk { flex: 1; min-height: 0; display: grid; grid-template-columns: 220px repeat(var(--n), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); column-gap: 8px; font-size: var(--pf, 21px); position: relative; }
.wk .corner { display: flex; align-items: center; padding: 0 12px; font-size: 15px; font-weight: 500; color: var(--ink-3); }
.wk .col-today { background: var(--accent-bg); border-radius: 18px; margin: 4px -4px 0; }
.wk .dh { display: flex; align-items: center; gap: 12px; padding: 0 14px; position: relative; z-index: 1; }
.wk .dh .num { width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; flex: none; }
.wk .dh .dl { display: flex; flex-direction: column; line-height: 1.15; }
.wk .dh .dl b { font-size: 21px; font-weight: 600; text-transform: capitalize; letter-spacing: -0.015em; }
.wk .dh .dl span { font-size: 15px; color: var(--ink-3); }
.wk .dh.today .num { background: var(--accent); color: var(--accent-ink); }
.wk .dh.today .dl span { color: var(--accent); font-weight: 600; }
.wk .dh.shut { opacity: 0.45; }
.wk .role { display: flex; align-items: center; gap: 12px; padding: 0 12px; border-top: 1px solid var(--line); font-size: 22px; font-weight: 600; color: var(--ink); min-height: 0; overflow: hidden; letter-spacing: -0.01em; }
.wk .role i { width: 12px; height: 12px; border-radius: 4px; background: var(--rc); flex: none; }
.wk .cell { border-top: 1px solid var(--line); padding: 4px 2px; display: flex; flex-wrap: wrap; align-content: center; gap: 4px 6px; min-height: 0; overflow: hidden; position: relative; z-index: 1; }
.wk .shut-col { display: flex; align-items: center; justify-content: center; margin: 6px 0 4px; border-radius: 16px; position: relative; z-index: 1;
  background: repeating-linear-gradient(-45deg, var(--card-2) 0 10px, transparent 10px 20px); color: var(--ink-3); font-size: 18px; font-weight: 600; }
.wk .shut-col span { background: var(--card); padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); }
.pp { display: inline-flex; align-items: center; gap: 0.4em; height: 1.7em; padding: 0 0.7em 0 0.25em; border-radius: 999px; background: var(--rb); color: var(--rf); font-weight: 600; line-height: 1; white-space: nowrap; letter-spacing: -0.01em; }
.pp .av { font-size: 0.55em; width: 2.4em; height: 2.4em; } /* 1,3 fois la taille du texte */
.pp.abs { background: var(--card-2); color: var(--ink-3); text-decoration: line-through; font-weight: 500; }
.pp.abs .av { background: var(--line-2); }
.pp.hole { background: transparent; color: var(--warn); box-shadow: inset 0 0 0 1.5px var(--warn); border: 0; }
.pp.hole .av { background: var(--warn-bg); color: var(--warn); }
.dash { color: var(--line-2); font-weight: 500; padding-left: 10px; }

/* ---------- Page Accueil (récap) ---------- */
.home { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.1fr 1fr 1fr; grid-template-rows: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; }
.hc { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 20px 24px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; min-width: 0; min-height: 0; overflow: hidden; transition: transform 0.12s ease; }
button.hc:active { transform: scale(0.99); }
.h-quais { grid-column: 1; grid-row: 1 / span 2; }
.h-charge { grid-column: 2; grid-row: 1; }
.h-veille { grid-column: 2; grid-row: 2; }
.h-equipe { grid-column: 3; grid-row: 1 / span 2; }
.hc-h { display: flex; align-items: center; gap: 12px; flex: none; }
.hc-h h3 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.025em; margin-right: auto; }
.hc-h .chip { height: 34px; font-size: 16px; }
.more { display: inline-flex; align-items: center; gap: 2px; font-size: 17px; font-weight: 600; color: var(--accent); }
.hempty { flex: 1; display: flex; align-items: center; justify-content: center; border: 1.5px dashed var(--line); border-radius: 18px; color: var(--ink-3); font-size: 20px; }
.hnote { margin: 0; font-size: 16px; color: var(--ink-3); flex: none; }
.hnote b { color: var(--ink-2); font-weight: 600; }

/* Quais */
.hq-top { display: flex; gap: 22px; flex: none; }
.hq-top .big { flex: 1.1; background: var(--ink); color: var(--card); border-radius: 22px; padding: 18px 22px; display: flex; flex-direction: column; justify-content: center; }
.hq-top .big b { font-size: 84px; font-weight: 700; letter-spacing: -0.05em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.hq-top .big b small { font-size: 30px; font-weight: 500; letter-spacing: -0.02em; margin-left: 6px; color: color-mix(in srgb, var(--card) 60%, transparent); }
.hq-top .big span { font-size: 18px; color: color-mix(in srgb, var(--card) 65%, transparent); margin-top: 6px; }
.hq-top .big.few b { color: var(--warn); } .hq-top .big.none b { color: var(--stop); }
.hq-side { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.hq-side label { display: block; font-size: 16px; color: var(--ink-3); font-weight: 500; }
.hq-side b { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.hq-side b small { font-size: 18px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.hq-side .hot b { color: var(--stop); }
.hdocks { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; }
.hd { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 0; }
.hd b { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.hd .g { flex: 1; width: 100%; min-height: 40px; border-radius: 12px; background: var(--card-2); position: relative; overflow: hidden; }
.hd .g i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--go); border-radius: 0 0 12px 12px; }
.hd.sature .g i { background: var(--warn); } .hd.complet .g i, .hd.depasse .g i { background: var(--stop); }
.hd.res .g { background: repeating-linear-gradient(-45deg, var(--card-2) 0 7px, transparent 7px 14px); border: 1.5px solid var(--line); }
.hd span { font-size: 17px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hd.res span { color: var(--ink-3); font-weight: 500; font-size: 14px; }
.hd.complet span, .hd.depasse span { color: var(--stop); }

/* Charge */
.hl { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 12px; flex: none; }
.hl > div { background: var(--card-2); border-radius: 18px; padding: 12px 16px; }
.hl > div:first-child { background: var(--ink); color: var(--card); }
.hl > div:first-child label, .hl > div:first-child span, .hl > div:first-child b small { color: color-mix(in srgb, var(--card) 65%, transparent); }
.hl label { display: block; font-size: 16px; font-weight: 600; color: var(--ink-2); }
.hl b { display: flex; align-items: baseline; gap: 6px; font-size: 48px; font-weight: 700; letter-spacing: -0.045em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.hl b small { font-size: 18px; font-weight: 500; letter-spacing: 0; color: var(--ink-3); }
.hl span { font-size: 15px; color: var(--ink-3); }
.hdue { flex: 1; min-height: 0; display: grid; grid-template-columns: 90px repeat(var(--n), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); grid-template-rows: 26px; gap: 6px 8px; align-items: stretch; }
.hdue span { display: flex; align-items: center; font-size: 15px; color: var(--ink-3); white-space: nowrap; }
.hdue .h { font-weight: 600; padding-left: 12px; } .hdue .h.late { color: var(--stop); } .hdue .h.now { color: var(--warn); }
.hdue .l { font-size: 18px; font-weight: 700; color: var(--ink); }
.hdue .c { background: var(--card-2); border-radius: 12px; padding: 0 12px; gap: 6px; }
.hdue .c b { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.hdue .c.late { background: var(--stop-bg); color: var(--stop); } .hdue .c.late b { color: var(--stop); }
.hdue .c.now { background: var(--warn-bg); color: var(--warn); } .hdue .c.now b { color: var(--warn); }

/* Veille */
.hv { display: flex; gap: 12px; flex: none; }
.hv .ot { flex: 1; background: var(--card-2); border-radius: 18px; padding: 12px 16px; }
.hv label { display: block; font-size: 16px; font-weight: 600; color: var(--ink-2); }
.hv b { font-size: 38px; font-weight: 700; letter-spacing: -0.04em; line-height: 1.1; }
.hpr { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: space-around; gap: 8px; }
.hpr > div { display: grid; grid-template-columns: 110px minmax(0, 1fr) 180px; align-items: center; gap: 14px; }
.hpr label { font-size: 17px; font-weight: 600; color: var(--ink-2); }
.hpr b { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; text-align: right; white-space: nowrap; }
.hpr b small { font-size: 14px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; margin-left: 4px; }
.hpr .bar { position: relative; height: 10px; border-radius: 999px; background: var(--card-2); }
.hpr .bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--ink-3); }
.hpr .go .bar i { background: var(--go); } .hpr .warn .bar i { background: var(--warn); }
.hpr .bar u { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 2px; }

/* Équipe */
.hps { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; font-size: 20px; }
.hs { font-size: 16px; font-weight: 600; color: var(--ink-3); margin-top: 4px; }
.hp { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.hp:first-child { border-top: 0; }
.hp label { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; color: var(--ink-2); }
.hp label i { width: 10px; height: 10px; border-radius: 3px; background: var(--rc); flex: none; }
.hp > div { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Page Charge du jour (AIC) ---------- */
.ch-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 16px; }
.ch-sec { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; }
.ch-sec.grow { flex: 1; }
.ch-sec h3 { margin: 0; font-size: 18px; font-weight: 600; color: var(--ink-3); letter-spacing: -0.005em; }
.loads { display: grid; grid-template-columns: repeat(var(--lc), minmax(0, 1fr)); gap: 14px; }
.ld { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px 22px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.ld label { font-size: 18px; font-weight: 600; color: var(--ink-2); }
.ld b { font-size: 64px; font-weight: 700; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 10px; }
.ld b small { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink-3); }
.ld span { font-size: 18px; color: var(--ink-3); }
.ld.main { background: var(--ink); border-color: var(--ink); color: var(--card); }
.ld.main label, .ld.main span, .ld.main b small { color: color-mix(in srgb, var(--card) 65%, transparent); }
.ld.zero b { color: var(--ink-3); }
.due { flex: 1; min-height: 0; display: grid; grid-template-columns: 200px repeat(var(--dc), minmax(0, 1fr)); grid-template-rows: 44px; grid-auto-rows: minmax(0, 1fr); gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 14px 18px 18px; box-shadow: var(--shadow); }
.due-h { display: flex; align-items: center; padding: 0 16px; font-size: 18px; font-weight: 600; color: var(--ink-3); }
.due-h.late { color: var(--stop); } .due-h.now { color: var(--warn); }
.due-l { display: flex; align-items: center; padding: 0 8px; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.due-c { position: relative; overflow: hidden; border-radius: 18px; background: var(--card-2); padding: 0 18px; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; min-height: 0; }
.due-c b { font-size: 40px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.due-c b small { font-size: 18px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.due-c b.dash { color: var(--line-2); font-weight: 500; }
.due-c span { font-size: 17px; color: var(--ink-3); white-space: nowrap; }
.due-c i { position: absolute; left: 0; bottom: 0; height: 5px; background: var(--accent); opacity: 0.55; border-radius: 0 3px 3px 0; }
.due-c.late { background: var(--stop-bg); } .due-c.late b, .due-c.late span { color: var(--stop); } .due-c.late i { background: var(--stop); }
.due-c.now { background: var(--warn-bg); } .due-c.now b { color: var(--warn); } .due-c.now i { background: var(--warn); }
.due-c.none { background: transparent; border: 1.5px dashed var(--line); }
.ch-row { display: flex; gap: 20px; flex: none; }
.ch-row .ch-sec { flex: 2; } .ch-row .ch-sec.wide { flex: 3; }
.kps { display: grid; grid-template-columns: repeat(var(--kc), minmax(0, 1fr)); gap: 14px; }
.kp { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 14px 20px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kp label { font-size: 18px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kp label em { font-style: normal; font-size: 14px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--card-2); color: var(--ink-3); white-space: nowrap; }
.kp.go label em { background: var(--go-bg); color: var(--go); } .kp.warn label em { background: var(--warn-bg); color: var(--warn); }
.kp b { font-size: 44px; font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; display: flex; align-items: baseline; gap: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kp b small { font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--ink-3); }
.kp.go:not(.prod) b { color: var(--go); } .kp.warn:not(.prod) b { color: var(--warn); } .kp.stop b { color: var(--stop); }
.kp span { font-size: 15px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp .bar { position: relative; height: 8px; border-radius: 999px; background: var(--card-2); margin: 4px 0 2px; }
.kp .bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--ink-3); }
.kp.go .bar i { background: var(--go); } .kp.warn .bar i { background: var(--warn); }
.kp .bar u { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- Onglets du bas ---------- */
.tabs { flex: none; height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.tablist { display: flex; gap: 4px; padding: 6px; border-radius: 26px; background: var(--card-2); border: 1px solid var(--line); }
.tab { height: 74px; min-width: 170px; padding: 0 24px; border-radius: 20px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; gap: 12px; white-space: nowrap; font-size: 22px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink-3); }
.tab svg { flex: none; width: 30px; height: 30px; }
.tab[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.tab .prog { display: none; }
.status { display: flex; align-items: center; gap: 16px; font-size: 16px; color: var(--ink-3); white-space: nowrap; }
.conn { white-space: nowrap; }
.status .sample { background: var(--warn-bg); color: var(--warn); font-weight: 600; padding: 5px 12px; border-radius: 999px; }
.conn { display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.conn b { font-weight: 500; color: var(--ink-2); }
.conn i { width: 10px; height: 10px; border-radius: 50%; background: var(--go); box-shadow: 0 0 0 4px var(--go-bg); }
.conn.off i { background: var(--stop); box-shadow: 0 0 0 4px var(--stop-bg); }
.conn.off b { color: var(--stop); }
.status .fs + .fs { margin-left: -10px; }
#theme .i-sun { display: none; }
:root[data-theme="dark"] #theme .i-sun { display: block; } :root[data-theme="dark"] #theme .i-moon { display: none; }
.fs { width: 60px; height: 60px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); display: flex; align-items: center; justify-content: center; }

/* ---------- Détail d'un quai ---------- */
.modal { position: absolute; inset: 0; background: rgba(10, 12, 16, 0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 10; animation: fadein 0.2s ease; }
.sheet { width: 1500px; max-height: 920px; background: var(--paper); border-radius: 32px; padding: 30px 36px 34px; display: flex; flex-direction: column; gap: 22px; box-shadow: var(--shadow-lg); }
.m-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.m-head h2 { font-size: 42px; display: flex; align-items: center; gap: 16px; }
.m-head h2::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--st, var(--go)); }
.close { height: 64px; padding: 0 28px; border-radius: 18px; border: 0; background: var(--ink); color: var(--card); font-size: 21px; font-weight: 600; }
.m-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; min-height: 0; }
.m-floor { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 7px; padding: 16px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); }
.m-floor i { aspect-ratio: 1 / 1.2; border-radius: 7px; border: 1.5px dashed var(--line-2); position: relative; }
.m-floor i.on { border: 0; }
.m-floor i.two::after { content: "2"; position: absolute; right: 5px; top: 3px; font-size: 13px; font-weight: 700; color: #fff; }
.m-floor i.two { box-shadow: 3px -3px 0 rgba(0, 0, 0, 0.25); }
.m-cta { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1.05; letter-spacing: -0.03em; color: var(--st); margin-bottom: 6px; }
.m-cta small { display: block; font-family: var(--body); font-size: 19px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; margin-top: 8px; }
.m-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.m-facts div { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px; }
.m-facts label { display: block; font-size: 15px; color: var(--ink-3); }
.m-facts b { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; }
.m-ofs { background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.m-ofs h3 { margin: 0; padding: 14px 20px; font-size: 16px; color: var(--ink-3); font-weight: 500; border-bottom: 1px solid var(--line); }
.m-of { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 20px; border-bottom: 1px solid var(--line); font-size: 19px; }
.m-of:last-child { border-bottom: 0; }
.m-of i { width: 20px; height: 20px; border-radius: 6px; }
.m-of b { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.m-of small { display: block; font-size: 15px; color: var(--ink-3); }
.m-of .n { font-size: 28px; font-weight: 700; text-align: right; letter-spacing: -0.03em; }

/* ---------- Quai réservé (descentes BL) ---------- */
.qc.reserved { --st: var(--ink); --stb: var(--card-2); background: repeating-linear-gradient(-45deg, var(--card) 0 14px, var(--card-2) 14px 28px); }
.qc.reserved .stw { background: var(--ink); color: var(--card); }
.qc.reserved .cta { color: var(--ink); }
.qc.reserved .floor { background: var(--card); }
.qc.reserved .floor i.on, .qc.reserved .floor i.two { border: 0; }
.qc.reserved .floor i.two { box-shadow: 2px -2px 0 rgba(0, 0, 0, 0.25); }
.nodrop { color: var(--stop); font-weight: 600; }
.meta .hot { color: var(--stop); }
.m-note { margin: 16px 0 0; font-size: 18px; color: var(--ink-2); line-height: 1.45; }
.m-note.hot { color: var(--stop); font-weight: 600; }

/* ---------- Écran bloqué ---------- */
.blocker { position: absolute; inset: 0; z-index: 20; background: var(--paper); display: flex; align-items: center; justify-content: center; text-align: center; }
.blocker h2 { font-size: 56px; margin-bottom: 18px; }
.blocker p { font-size: 26px; color: var(--ink-2); max-width: 1100px; }

@media (prefers-reduced-motion: reduce) { .page, .modal { animation: none; } .announce.alert { animation: none; } }
