:root {
  --bg: #0d0f12; --panel: #16191e; --panel-2: #1c2026; --line: #272c35;
  --text: #e8eaed; --muted: #8b93a1; --rec: #e5343d; --ok: #35c46a; --warn: #f0a63a;
  --accent: #b86bd6; --private: #3d7be0;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); overflow: hidden; user-select: none;
  font: 16px/1.4 "Bahnschrift", "Segoe UI", system-ui, sans-serif;
  display: flex; flex-direction: column;
}
.hidden { display: none !important; }
body.face-tenant .tech-only { display: none !important; }
body.face-tech .tenant-only { display: none !important; }

/* Bandeau */
#top { display: flex; align-items: center; gap: 26px; padding: 0 24px; height: 76px; flex: none; background: #121418; border-bottom: 1px solid var(--line); }
.brand { font-size: 24px; letter-spacing: .08em; font-weight: 600; white-space: nowrap; }
.pill { font-weight: 700; letter-spacing: .06em; padding: 7px 16px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); white-space: nowrap; }
.pill.rec { background: var(--rec); border-color: var(--rec); }
.pill.private { background: var(--private); border-color: var(--private); }
.figure { font-variant-numeric: tabular-nums; white-space: nowrap; }
.label { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.value { font-size: 22px; font-weight: 600; }
.spacer { flex: 1; }
.remote { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; white-space: nowrap; }
.remote .eye { width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.remote.watching { color: var(--warn); } .remote.watching .eye { background: var(--warn); }
.remote.cut { color: var(--private); } .remote.cut .eye { background: var(--private); }

button { font: inherit; color: var(--text); cursor: pointer; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); padding: 12px 20px; min-height: 48px; }
button:active { transform: scale(.98); }
button:disabled { opacity: .4; cursor: default; }
button:disabled:active { transform: none; }
button.ghost { background: transparent; }
button.solid { background: var(--private); border-color: var(--private); font-weight: 600; }
button.danger { background: transparent; border-color: var(--rec); color: var(--rec); }
.account .acc-mail { flex: 1; min-width: 220px; min-height: 44px; margin: 0; padding: 8px 12px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
#page-notify .row input { flex: 1; min-width: 0; margin: 0; }
.keybox { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font: 13px/1.4 Consolas, monospace; word-break: break-all; user-select: text; }

/* Rappel de durée : au-dessus de tout, impossible à manquer. */
.overlay.reminder { z-index: 90; background: rgba(5, 6, 8, .9); }
.dialog.reminder-box { width: min(980px, 92vw); padding: 44px 48px; text-align: center; border: 4px solid var(--warn); animation: reminder-pulse 1.6s ease-in-out infinite; }
.dialog.reminder-box .reminder-tag { margin: 0 0 10px; color: var(--rec); font-weight: 700; letter-spacing: .14em; font-size: 18px; }
.dialog.reminder-box h2 { font-size: 46px; line-height: 1.15; margin: 0 0 14px; }
.dialog.reminder-box .reminder-question { font-size: 26px; margin: 0 0 10px; }
.dialog.reminder-box .reminder-countdown { font-size: 22px; color: var(--warn); margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.dialog.reminder-box .row { gap: 20px; margin-top: 30px; }
.dialog.reminder-box .row button { min-height: 120px; font-size: 24px; font-weight: 700; letter-spacing: .04em; border-width: 2px; }
.dialog.reminder-box .reminder-go { background: var(--ok); border-color: var(--ok); color: #06180d; }
.dialog.reminder-box .reminder-stop { background: transparent; border-color: var(--rec); color: var(--rec); }
.dialog.reminder-box .reminder-stop.armed { background: var(--rec); color: #fff; }
@keyframes reminder-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(240, 166, 58, .0); } 50% { box-shadow: 0 0 60px 10px rgba(240, 166, 58, .55); } }
#btn-rec.preparing { background: var(--warn); border-color: var(--warn); color: #1a1408; }
#btn-rec.blocked { background: var(--panel-2); border-color: var(--line); color: var(--muted); }
button.wide { flex: 1; }

.banner { flex: none; padding: 10px 24px; background: #3a2a10; color: var(--warn); border-bottom: 1px solid var(--line); }

/* Corps */
main { flex: 1; min-height: 0; display: flex; gap: 16px; padding: 16px 24px; }
#side { width: 340px; flex: none; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.card h3, .light h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.card .big { font-size: 44px; font-weight: 600; color: var(--accent); line-height: 1.1; font-variant-numeric: tabular-nums; }
.sub { color: var(--muted); font-size: 14px; margin: 0; }
.soon { border-style: dashed; opacity: .6; }
.gauge { height: 6px; border-radius: 3px; background: #0b0d10; overflow: hidden; margin-top: 10px; }
.gauge i { display: block; height: 100%; width: 0; background: var(--accent); }
.health { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.health li { display: flex; align-items: center; gap: 10px; }
.health .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: none; }
.health .dot.ok { background: var(--ok); } .health .dot.bad { background: var(--rec); } .health .dot.warn { background: var(--warn); }
.health .right { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

#center { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
#quad-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; container-type: size; }
#quad { width: min(100cqw, calc(100cqh * 16 / 9)); aspect-ratio: 16 / 9; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; }
.tile { position: relative; background: #000; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; }
/* Tally à l'écran : rouge quand on enregistre, vert en mode privé (le voyant de la caméra
   ne se commande pas par le réseau). Si les deux sont vrais, le rouge l'emporte. */
.tile.cam { border-width: 4px; }
.tile.rec { border-color: var(--rec); box-shadow: 0 0 18px rgba(229, 52, 61, .45); }
body.private .tile.cam:not(.rec) { border-color: var(--ok); box-shadow: 0 0 18px rgba(53, 196, 106, .35); }
.tile .tally { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: none; padding: 4px 14px; border-radius: 6px; font-size: 14px; font-weight: 700; letter-spacing: .1em; color: #fff; z-index: 2; }
.tile.rec .tally { display: block; background: var(--rec); }
body.private .tile.cam:not(.rec) .tally { display: block; background: #1f8a48; }
.tile.rec .tally::before { content: "● REC"; }
body.private .tile.cam:not(.rec) .tally::before { content: "PRIVÉ"; }
body.recording .fs-stage { outline: 4px solid var(--rec); outline-offset: -4px; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tile .tag { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: rgba(13, 15, 18, .78); font-size: 15px; }
/* Le point de signal reste neutre : le rouge et le vert sont réservés au tally. */
.tile .tag .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--warn); flex: none; }
.tile .tag .dot.ok { background: #cfd3da; }
.tile .tag .name { font-weight: 600; }
.tile .tag .meta { margin-left: auto; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.tile .nosignal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 22px; letter-spacing: .1em; background: #07080a; }
.tile .vu { position: absolute; top: 10px; right: 10px; bottom: 50px; display: flex; gap: 4px; padding: 4px; background: rgba(13, 15, 18, .78); border-radius: 4px; }
.tile .vu .ch { position: relative; width: 10px; background: #0b0d10; border-radius: 2px; overflow: hidden; }
.tile .vu .ch i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--ok); transition: height .08s linear; }
.tile .vu .ch i.hot { background: var(--warn); } .tile .vu .ch i.clip { background: var(--rec); }
.tile.cam { cursor: pointer; }
/* Outils d'une caméra : au survol à la souris, toujours visibles au doigt (pas de survol). */
.tile .tools { position: absolute; top: 10px; left: 10px; display: flex; gap: 8px; opacity: 0; transition: opacity .15s; }
.tile:hover .tools { opacity: 1; }
@media (hover: none) { .tile .tools { opacity: 1; } }
.tile .tool { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; background: rgba(13, 15, 18, .82); border-color: rgba(255, 255, 255, .25); font-size: 15px; }
.tile .tool svg, .veil svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Mode privé : aperçus floutés, œil barré */
.veil { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; font-size: 18px; letter-spacing: .08em; background: rgba(13, 15, 18, .35); }
.veil svg { width: 72px; height: 72px; stroke-width: 1.6; }
body.private .tile.cam img, body.private #cam-view { filter: blur(32px) saturate(.6); transform: scale(1.15); }
body.private .tile.cam .veil { display: flex; }
body.private .tile.cam .tools, body.private .tile.cam .vu { display: none; }
body.private .tile.cam .nosignal > * { visibility: hidden; }
body.private .tile.cam { cursor: default; }
.tile.info { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: var(--panel); }
.tile.info .clock { font-size: 64px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.tile.info .date { color: var(--muted); font-size: 18px; }
.tile.info .take { margin-top: 14px; color: var(--muted); font-size: 15px; text-align: center; font-variant-numeric: tabular-nums; }

#lights { flex: none; display: grid; grid-template-columns: repeat(3, 1fr) 220px; gap: 10px; }
.light { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.light h3 { margin: 0; white-space: nowrap; }
.light .light-head { display: flex; align-items: baseline; gap: 10px; }
.light .light-head .values { margin-left: auto; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.light .fader { position: relative; display: flex; align-items: center; gap: 8px; padding-top: 12px; }
.light .fader .name { position: absolute; top: 0; left: 52px; color: var(--muted); font-size: 12px; line-height: 1; }
.light .fader input { flex: 1; min-width: 0; height: 32px; }
.light .fader input.kelvin { accent-color: #e8b04a; }
.light .fader button { min-width: 44px; min-height: 40px; padding: 4px 8px; font-size: 20px; line-height: 1; }
.light.off .values { color: var(--muted); }
.light.status { justify-content: space-between; }
.light.status .state { font-size: 14px; color: var(--muted); }
.light.status .state.ok { color: var(--ok); } .light.status .state.bad { color: var(--warn); }
.light.status .note { font-size: 12px; color: var(--warn); }
.light.status button { min-height: 44px; }
.light.empty { grid-column: 1 / -1; flex-direction: row; align-items: center; color: var(--muted); }

/* Modes de lumière : JOUR, SOMBRE, NUIT, AUTO. Gros boutons pour le locataire, plus petits en technique. */
#ambiance { flex: none; display: flex; align-items: center; gap: 14px; min-width: 0; }
#ambiance .ambiance-title { color: var(--muted); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
#ambiance-modes { display: flex; gap: 10px; }
#ambiance-modes button { min-width: 120px; min-height: 52px; font-weight: 700; letter-spacing: .06em; line-height: 1.1; }
#ambiance-modes button small { display: block; font-size: 11px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
#ambiance-modes button.on { background: var(--warn); border-color: var(--warn); color: #1a1408; }
#ambiance-modes button.on small { color: #1a1408; }
#ambiance-modes button.picked { border-color: var(--warn); color: var(--warn); }
#ambiance-store { display: flex; align-items: center; gap: 8px; margin-left: 10px; }
#ambiance-store button { min-height: 44px; padding: 8px 14px; font-size: 14px; }
#ambiance-note { margin-left: auto; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.face-tenant #ambiance { justify-content: center; gap: 20px; padding-top: 4px; }
body.face-tenant #ambiance-modes { gap: 14px; }
body.face-tenant #ambiance-modes button { min-width: 190px; min-height: 76px; font-size: 22px; }
body.face-tenant #ambiance-modes button small { font-size: 13px; }

/* Commandes */
#actions { flex: none; display: flex; gap: 16px; padding: 0 24px 20px; height: 132px; }
body.face-tech #actions { height: 96px; }
.action { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 14px; border: 2px solid var(--line); }
.action .title { position: relative; font-size: 30px; font-weight: 700; letter-spacing: .06em; }
body.face-tech .action .title { font-size: 24px; }
.action .hint { position: relative; font-size: 15px; color: rgba(255, 255, 255, .75); }
.action.private { flex: 1; background: var(--panel-2); }
.action.private.on { background: var(--private); border-color: var(--private); }
.action.rec { flex: 2; background: var(--rec); border-color: var(--rec); }
.action.rec.recording { background: #2a2f3a; border-color: var(--rec); }
.action.rec:disabled, .action.private:disabled { opacity: .5; }
.action .hold { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--rec); }

/* Fenêtres par-dessus */
.overlay { position: fixed; inset: 0; background: rgba(5, 6, 8, .82); display: flex; align-items: center; justify-content: center; z-index: 20; }
.dialog { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px 32px; width: 460px; max-width: 92vw; }
.dialog.large { width: 1100px; max-height: 94vh; overflow-y: auto; }
.dialog h2, .drawer h2 { margin: 0 0 14px; font-size: 24px; font-weight: 600; }
.dialog .row { display: flex; gap: 12px; margin-top: 22px; }
.dots { display: flex; gap: 12px; justify-content: center; min-height: 22px; margin: 6px 0 4px; }
.dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); }
.dots i.on { background: var(--text); border-color: var(--text); }
.msg { min-height: 22px; margin: 8px 0 12px; text-align: center; color: var(--warn); font-size: 15px; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.keys button { height: 84px; font-size: 30px; font-weight: 600; }
.keys button.small { font-size: 17px; font-weight: 400; color: var(--muted); }

.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 620px; background: var(--panel); border-left: 1px solid var(--line); z-index: 15; padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.drawer-head h2 { margin: 0; }
.drawer img { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; object-fit: contain; }
/* Une caméra en plein écran, avec ses filtres d'aide */
.fs { position: fixed; inset: 0; z-index: 30; background: #000; display: flex; align-items: center; justify-content: center; }
.fs-stage { position: relative; width: min(100vw, calc(100vh * 16 / 9)); aspect-ratio: 16 / 9; }
.fs-stage canvas { width: 100%; height: 100%; display: block; }
.fs-grid { position: absolute; inset: 0; pointer-events: none; }
.fs-grid i { position: absolute; background: rgba(255, 255, 255, .55); }
.fs-grid i:nth-child(1) { left: 33.333%; top: 0; bottom: 0; width: 1px; }
.fs-grid i:nth-child(2) { left: 66.666%; top: 0; bottom: 0; width: 1px; }
.fs-grid i:nth-child(3) { top: 33.333%; left: 0; right: 0; height: 1px; }
.fs-grid i:nth-child(4) { top: 66.666%; left: 0; right: 0; height: 1px; }
.fs-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 18px; padding: 16px 24px; background: rgba(13, 15, 18, .7); font-size: 20px; font-weight: 600; }
.fs-top .sub { flex: 1; font-weight: 400; }
.fs-tools { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; gap: 12px; padding: 16px 24px; background: rgba(13, 15, 18, .7); }
.toggle { min-width: 190px; min-height: 56px; font-size: 17px; background: rgba(28, 32, 38, .9); }
.toggle.on { background: var(--private); border-color: var(--private); font-weight: 600; }
.q-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.q-row .who { width: 330px; font-weight: 600; }
.q-row .weight { margin-left: auto; color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.seg button small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.seg button.on small { color: rgba(255, 255, 255, .8); }
#q-summary { margin: 12px 0 4px; color: var(--text); font-variant-numeric: tabular-nums; }

/* Navigation Régie / Rushs, identité du portail */
#nav { display: flex; gap: 6px; }
#nav button { min-height: 44px; padding: 8px 18px; }
#nav button.on { background: var(--panel-2); border-color: var(--text); font-weight: 600; }
.who { color: var(--muted); font-size: 15px; white-space: nowrap; }
body.portal .local-only, body.portal #btn-lock, body.portal #btn-tech, body.portal #btn-private { display: none !important; }
body.role-production #btn-settings { display: none !important; }
.solid-wall { background: var(--bg); z-index: 50; }
.dialog input[type="text"], .dialog input[type="password"], .account-form input { width: 100%; min-height: 52px; margin-top: 12px; padding: 10px 14px; font: inherit; font-size: 18px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.dialog input:focus, .account-form input:focus { outline: 2px solid var(--private); outline-offset: 1px; }

/* Page Rushs, façon Finder : jours et fichiers à gauche, lecteur à droite */
#rushes-page { flex: 1; min-width: 0; min-height: 0; display: flex; }
.finder { flex: 1; min-width: 0; min-height: 0; display: flex; gap: 16px; }
.finder-side { width: 640px; flex: none; min-height: 0; display: flex; flex-direction: column; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.finder-head { display: flex; align-items: center; gap: 10px; }
.finder-head h2 { margin: 0; font-size: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.finder-head button { min-height: 42px; padding: 6px 14px; font-size: 15px; }
#rushes-list { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; }
.folder { display: flex; align-items: center; gap: 14px; width: 100%; margin-bottom: 6px; padding: 12px 14px; text-align: left; background: var(--panel-2); }
.folder svg, .aws svg { width: 26px; height: 26px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.folder svg { color: var(--private); }
.folder .what { flex: 1; min-width: 0; }
.folder .what b { display: block; font-size: 17px; text-transform: capitalize; }
.folder::after { content: "›"; font-size: 26px; color: var(--muted); }
.take-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 8px 6px 6px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.take-row b { font-size: 17px; }
.take-row .badge { padding: 1px 8px; border-radius: 6px; background: #3a2a10; color: var(--warn); font-size: 12px; }
.pick { width: 24px; height: 24px; flex: none; accent-color: var(--private); }
.file { display: flex; align-items: center; gap: 12px; padding: 8px 6px 8px 14px; border-bottom: 1px solid rgba(39, 44, 53, .6); border-left: 3px solid transparent; cursor: pointer; }
.file:hover { background: rgba(255, 255, 255, .03); }
.file.current { background: rgba(61, 123, 224, .14); border-left-color: var(--private); }
.file .desc { flex: 1; min-width: 0; }
.file .desc b { font-size: 15px; font-weight: 600; }
.file .desc span { color: var(--muted); font-size: 13px; margin-left: 8px; font-variant-numeric: tabular-nums; }
.file.gone { cursor: default; }
.file.gone .desc, .file.gone .aws { opacity: .42; }
.file .restore { min-height: 38px; padding: 4px 12px; font-size: 13px; }
.aws { display: flex; color: var(--muted); }
.aws.pending { color: var(--warn); } .aws.archived { color: var(--ok); }
.aws svg { width: 22px; height: 22px; }
.rushes-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--private); border-radius: 10px; background: var(--panel-2); font-size: 15px; }
.rushes-bar button { min-height: 44px; padding: 6px 14px; font-size: 15px; }
.finder-view { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.viewer-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 18px; }
#viewer { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.viewer-head { display: flex; align-items: baseline; gap: 14px; }
.viewer-head h2 { margin: 0; font-size: 20px; font-weight: 600; }
.viewer-stage { position: relative; flex: 1; min-height: 0; background: #000; border-radius: 8px; overflow: hidden; }
.viewer-stage video { width: 100%; height: 100%; object-fit: contain; display: block; }
.viewer-note { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; color: var(--muted); font-size: 17px; background: #07080a; }
.viewer-bar { display: flex; align-items: center; gap: 10px; }
.viewer-bar button { min-width: 58px; min-height: 50px; padding: 6px 12px; }
.viewer-bar .tc { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .04em; min-width: 190px; text-align: center; }
.viewer-bar input[type="range"] { flex: 1; min-width: 0; height: 28px; accent-color: var(--private); }
.viewer-bar .seg button { min-width: 50px; }

/* Réglages : archivage AWS */
.aws-form { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.aws-form input { width: 100%; min-height: 52px; padding: 10px 14px; font: inherit; font-size: 17px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.aws-form input:focus { outline: 2px solid var(--private); outline-offset: 1px; }
.aws-form button { min-height: 52px; }
#side-aws { margin-top: 8px; }

/* Rushs : les caméras d'une prise côte à côte, synchronisées */
.viewer-multi { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; background: #000; }
.viewer-multi .cell { position: relative; min-width: 0; min-height: 0; border: 2px solid transparent; cursor: pointer; }
.viewer-multi .cell.sound { border-color: var(--private); }
.viewer-multi video { width: 100%; height: 100%; object-fit: contain; display: block; }
.viewer-multi .cell span { position: absolute; left: 8px; bottom: 8px; padding: 3px 10px; border-radius: 6px; background: rgba(13, 15, 18, .78); font-size: 14px; }
.take-row .multi { margin-left: auto; min-height: 40px; padding: 4px 14px; font-size: 14px; }
.file.master { cursor: default; }
.file.master:hover { background: transparent; }
.aws.restoring { color: var(--private); }
/* Envoi FTP et transferts */
.dialog h3 { margin: 18px 0 8px; font-size: 14px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.dest { display: flex; align-items: center; gap: 14px; width: 100%; margin-bottom: 8px; padding: 12px 16px; text-align: left; background: var(--panel-2); }
.dest.on { border-color: var(--private); box-shadow: 0 0 0 1px var(--private); }
.dest .what { flex: 1; min-width: 0; }
.dest .what b { display: block; font-size: 17px; }
.ftp-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.ftp-form input { width: 100%; min-height: 52px; margin: 0; padding: 10px 14px; font: inherit; font-size: 17px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.ftp-form input:focus { outline: 2px solid var(--private); outline-offset: 1px; }
.transfers { max-height: 62vh; overflow-y: auto; margin-top: 14px; }
.transfer { padding: 10px 0; border-bottom: 1px solid var(--line); }
.transfer .line { display: flex; align-items: center; gap: 14px; font-variant-numeric: tabular-nums; }
.transfer .line b { flex: 1; min-width: 0; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transfer .state { color: var(--muted); font-size: 14px; white-space: nowrap; }
.transfer .state.bad { color: var(--warn); } .transfer .state.ok { color: var(--ok); }
.transfer button { min-height: 40px; padding: 4px 14px; font-size: 14px; }
/* Réglages : accès distant */
.account-form { display: grid; grid-template-columns: 1fr auto 1.4fr auto; gap: 10px; align-items: end; }
.account-form input { margin-top: 0; }
.account-form button { min-height: 52px; }
.account { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.account .role { color: var(--muted); font-size: 14px; flex: 1; }
.journal { max-height: 190px; overflow-y: auto; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.journal div { padding: 3px 0; border-bottom: 1px solid var(--line); }
.journal b { color: var(--text); font-weight: 600; }

/* Panneau de contrôle d'une caméra (volet Infos et plein écran) */
.controls { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.controls h3 { margin: 10px 0 2px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.controls .warn { padding: 8px 12px; border-radius: 8px; background: #3a1518; color: #ff9aa0; font-size: 14px; }
.controls .off { color: var(--muted); font-size: 15px; padding: 8px 0; }
.ctl { display: flex; align-items: center; gap: 8px; }
.ctl .name { width: 104px; flex: none; color: var(--muted); font-size: 14px; }
.ctl .val { flex: 1; min-width: 0; text-align: center; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ctl .val small { display: block; font-size: 11px; font-weight: 400; color: var(--ok); }
.ctl button { min-width: 64px; min-height: 52px; padding: 8px 12px; font-size: 17px; }
.ctl button.wide { flex: 1; }
.ctl button.on { background: var(--private); border-color: var(--private); font-weight: 600; }
.drawer .controls { flex: 1; min-height: 0; }
.drawer img { width: auto; height: 236px; align-self: center; }
.fs-side { position: absolute; top: 72px; right: 0; bottom: 92px; width: 440px; padding: 14px 18px; background: rgba(13, 15, 18, .86); border-left: 1px solid var(--line); }
.fs-mark { position: absolute; width: 90px; height: 90px; margin: -45px 0 0 -45px; border: 2px solid #fff; border-radius: 6px; pointer-events: none; box-shadow: 0 0 0 1px #000; }
.ip-display { min-height: 56px; margin: 6px 0 4px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 28px; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.net-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.net-row .who { width: 120px; font-weight: 600; font-size: 18px; }
.net-row .host { min-width: 250px; font-size: 18px; font-variant-numeric: tabular-nums; }
.net-row .state { flex: 1; color: var(--muted); font-size: 14px; }
.net-row .state.ok { color: var(--ok); } .net-row .state.bad { color: var(--warn); }
.dmx-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dmx-row input[type=text] { width: 190px; min-height: 52px; margin-top: 0; font-size: 18px; font-weight: 600; }
.dmx-row .num { min-width: 84px; min-height: 52px; font-size: 19px; font-variant-numeric: tabular-nums; }
.dmx-row > button:last-child { margin-left: auto; }
.page .row #dmx-add, .page .row #net-scan { margin-left: 0; }
.found { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.found .what { flex: 1; min-width: 260px; }
.found .what b { display: block; font-size: 17px; }

/* Réglages : un menu, puis une sous-page par sujet */
#settings .drawer-head h2 { flex: 1; }
.menu { display: grid; gap: 10px; margin-top: 18px; }
.menu-row { display: flex; align-items: center; gap: 20px; width: 100%; min-height: 72px; padding: 14px 20px; text-align: left; background: var(--panel-2); }
.menu-row .menu-name { font-size: 20px; font-weight: 600; width: 300px; flex: none; }
.menu-row .menu-hint { color: var(--muted); font-size: 15px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-row::after { content: "›"; font-size: 28px; color: var(--muted); }
.menu-row.soon { border-style: dashed; opacity: .5; }
.menu-row.soon::after { content: ""; }
.page { margin-top: 18px; }
.page h3 { margin: 18px 0 8px; font-size: 14px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.page .row { align-items: center; margin-top: 16px; }
.page .row button { margin-left: auto; }
.page .path { margin: 0 0 4px; font-size: 20px; font-variant-numeric: tabular-nums; word-break: break-all; }
.cam-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cam-row .who { width: 300px; font-weight: 600; }
.cam-row .what { color: var(--muted); font-size: 14px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { margin: 0; border: 0; border-radius: 0; min-width: 64px; background: transparent; }
.seg button.on { background: var(--private); font-weight: 600; }
#cam-summary { margin: 12px 0 4px; color: var(--text); font-variant-numeric: tabular-nums; }
.drives { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin-bottom: 12px; }
.drive { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 18px; text-align: left; background: var(--panel-2); }
.drive.on { border-color: var(--private); box-shadow: 0 0 0 1px var(--private); }
.drive .letter { font-size: 22px; font-weight: 600; }
.drive .space { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.drive .gauge { width: 100%; margin-top: 6px; }
.msg.left { text-align: left; margin: 0; }
.tile .nosignal { flex-direction: column; gap: 8px; }
.tile .nosignal small { font-size: 14px; letter-spacing: 0; }
