/* Brainrot Studio : plateau télé. Noir studio + un rouge ON AIR + un jaune sous-titre + un vert « Spec valide ». Polices système uniquement. */
:root {
  --studio: #0C0C10;
  --plateau: #15151B;
  --rail: #1E1E26;
  --line: #2B2B36;
  --text: #F3F0E8;
  --muted: #9A97A6;
  --red: #FF3B30;
  --yellow: #FFE600;
  --green: #3DBE7A;
  --bar: 56px;
  --fake: 0px;
  --tb: 64px;
  --f-body: Bahnschrift, "Segoe UI", system-ui, sans-serif;
  --f-cond: "Bahnschrift SemiBold Condensed", "Bahnschrift Condensed", Bahnschrift, "Arial Narrow", "Arial Black", sans-serif;
  --ease: 160ms ease-out;
  --pw: clamp(184px, calc((100vh - 400px - var(--fake)) * 0.5625), 400px);
  --fh: calc(100vh - 292px - var(--fake));
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
:root.has-fake { --fake: 32px; }
html { background: var(--studio); }
body {
  margin: 0; min-width: 1100px; background: var(--studio); color: var(--text);
  font-family: var(--f-body); font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
img, video, svg { display: block; }
code, pre { font-family: Consolas, "Cascadia Mono", monospace; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--text); color: var(--studio); padding: 8px 16px; }
.skip:focus { left: 8px; }
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.art { width: 120px; height: 112px; fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }

/* ---------- barre du haut ---------- */
.fake-bar { position: sticky; top: 0; z-index: 31; height: var(--fake); display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 24px; background: var(--red); color: var(--studio); font-family: var(--f-cond); font-size: 15px; letter-spacing: .06em; }
.bar { position: sticky; top: var(--fake); z-index: 30; height: var(--bar); display: flex; align-items: center; gap: 32px; padding: 0 24px; background: var(--studio); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 14px; height: 22px; border: 1.5px solid var(--text); border-radius: 2px; position: relative; }
.brand-mark::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--red); }
.brand-name { font-family: var(--f-cond); font-size: 20px; text-transform: uppercase; letter-spacing: .06em; }
.brand-name b { font-weight: 400; color: var(--muted); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 6px 12px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; transition: color var(--ease); }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--text); }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.bar-right [data-nav="new"][aria-current="page"] { border-color: var(--text); }
.fal-pill { font-size: 12px; color: var(--muted); border: 1px dashed var(--line); padding: 2px 10px; border-radius: 2px; text-decoration: line-through; text-decoration-color: transparent; cursor: help; }
.tally { display: inline-flex; align-items: center; gap: 12px; height: 36px; padding: 0 16px; background: transparent; border: 1px solid var(--line); border-radius: 2px; font-family: var(--f-cond); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); cursor: pointer; transition: border-color var(--ease), color var(--ease); max-width: 520px; }
.tally:hover { border-color: var(--muted); color: var(--text); }
.tally-lamp { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--muted); flex: none; }
.tally-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tally.is-live { color: var(--text); border-color: var(--red); }
.tally.is-live .tally-lamp { background: var(--red); border-color: var(--red); animation: onair 2s ease-in-out infinite; }
@keyframes onair { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* ---------- boutons, puces, champs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 2px; background: transparent; font-weight: 600; font-size: 14px; letter-spacing: .02em; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background var(--ease), border-color var(--ease), color var(--ease); }
.btn-sm { height: 32px; padding: 0 12px; }
.btn-xs { height: 28px; padding: 0 8px; }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--rail); border-color: var(--muted); }
.btn-primary { background: var(--text); color: var(--studio); }
.btn-primary:hover { background: #fff; }
.btn-consume { background: var(--red); color: var(--studio); }
.btn-consume:hover { background: #ff5a50; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.is-flash { color: var(--yellow); border-color: var(--yellow); background: transparent; }
.btn-primary.is-flash { background: var(--yellow); color: var(--studio); }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border: 1px solid var(--muted); border-radius: 2px; font-family: var(--f-cond); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text); white-space: nowrap; }
.chip-bad { border-color: var(--red); color: var(--red); }
.chip-warn { border-color: var(--yellow); color: var(--yellow); }
.chip-ok { background: var(--text); border-color: var(--text); color: var(--studio); }
.chip-live { background: var(--red); border-color: var(--red); color: var(--studio); }
.field { width: 100%; padding: 8px 12px; background: var(--plateau); border: 1px solid var(--line); border-radius: 2px; color: var(--text); font-size: 14px; line-height: 20px; transition: border-color var(--ease); }
.field:hover { border-color: var(--muted); }
.field:focus { border-color: var(--text); outline: none; box-shadow: 0 0 0 1px var(--text); }
textarea.field { resize: vertical; min-height: 40px; }
.field.big { font-size: 16px; line-height: 24px; padding: 16px; }
.fld { display: grid; gap: 6px; margin-bottom: 12px; }
.fld > label, .lbl-top { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; }
.lbl-aside { color: var(--text); }
.hint { font-size: 12px; line-height: 16px; color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--text); }
.check-sm { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.row-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.row-actions.wrap { flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 8px 0 16px; }
.counter { font-size: 12px; color: var(--muted); }
.field-err { color: var(--red); font-size: 14px; min-height: 20px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.link { color: var(--text); text-decoration-color: var(--line); text-underline-offset: 3px; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; font-family: var(--f-cond); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; border-radius: 2px; border: 1px solid var(--line); color: var(--muted); }
.tag-todo { background: var(--yellow); border-color: var(--yellow); color: var(--studio); }
.tag-auto { color: var(--muted); }
.badge { display: inline-block; padding: 2px 8px; border: 1px solid var(--text); font-family: var(--f-cond); font-size: 12px; letter-spacing: .1em; }
kbd { font-family: var(--f-body); font-size: 12px; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 2px; background: var(--plateau); }

/* ---------- lower-third ---------- */
.lt { display: inline-flex; flex-direction: column; align-items: flex-start; max-width: 100%; }
.lt-main { position: relative; display: block; max-width: 100%; padding: 0 20px 0 22px; background: var(--text); color: var(--studio); font-family: var(--f-cond); font-size: 20px; line-height: 30px; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-main::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--red); }
.lt-sub { display: block; max-width: 100%; margin-left: 6px; padding: 0 12px; background: #2A2A33; color: var(--text); font-size: 12px; line-height: 20px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- pages ---------- */
main { min-height: calc(100vh - var(--bar) - var(--fake)); }
.boot { padding: 48px 32px; color: var(--muted); }
.page { padding: 32px 32px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.page-title { font-family: var(--f-cond); font-size: 40px; line-height: 44px; text-transform: uppercase; letter-spacing: .02em; font-weight: 400; }
.state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 56px 24px; max-width: 640px; margin: 0 auto; }
.state-title { font-family: var(--f-cond); font-size: 28px; line-height: 32px; text-transform: uppercase; letter-spacing: .02em; font-weight: 400; }
.state-text { color: var(--muted); font-size: 16px; line-height: 24px; max-width: 52ch; }
.state-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.state-err .state-title { color: var(--text); }
.state-err .state-text { color: var(--text); }
.state-wrap { display: grid; place-items: center; }
.errbox { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border: 1px solid var(--red); border-left-width: 4px; border-radius: 2px; background: var(--plateau); }
.errbox .ic { color: var(--red); margin-top: 2px; }
.errbox p { flex: 1; }
.errbox-actions { display: flex; gap: 8px; }
.panel { background: var(--plateau); border: 1px solid var(--line); border-radius: 2px; padding: 24px; }
.panel-quiet { background: transparent; }
.panel-h { font-family: var(--f-cond); font-size: 20px; text-transform: uppercase; letter-spacing: .04em; font-weight: 400; margin-bottom: 16px; }

/* ---------- programmes : affiches ---------- */
.posters { display: grid; grid-template-columns: repeat(auto-fill, var(--pw)); gap: 32px 24px; }
.poster { width: var(--pw); display: flex; flex-direction: column; }
.poster-media { position: relative; display: block; aspect-ratio: 9 / 16; background: #000; border-radius: 2px; overflow: hidden; text-decoration: none; outline-offset: 2px; }
.poster-img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease-out; }
.poster-media:hover .poster-img { transform: scale(1.025); }
.poster-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; background: var(--plateau); color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.poster-empty .art { width: 96px; height: 90px; }
.poster-fade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(12, 12, 16, .97) 0%, rgba(12, 12, 16, .78) 26%, rgba(12, 12, 16, 0) 58%); pointer-events: none; }
.poster-chip { position: absolute; top: 12px; left: 12px; }
.poster-chip .chip { background: rgba(12, 12, 16, .82); }
.poster-chip .chip-ok { background: var(--text); }
.poster-cap { position: absolute; left: 14px; right: 14px; bottom: 12px; display: grid; gap: 2px; }
.poster-num { font-family: var(--f-cond); font-size: 40px; line-height: .92; text-transform: uppercase; letter-spacing: .01em; }
.poster-ser { font-family: var(--f-cond); font-size: 12px; line-height: 16px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poster-title { font-family: var(--f-cond); font-size: 20px; line-height: 24px; text-transform: uppercase; letter-spacing: .03em; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.poster-strip { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-top: 0; background: var(--plateau); }
.cell { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 6px 10px; border-top: 1px solid var(--line); }
.cell:nth-child(odd) { border-right: 1px solid var(--line); }
.cell:nth-child(-n+2) { border-top: 0; }
.cell-l { font-family: var(--f-cond); font-size: 12px; letter-spacing: .1em; color: var(--muted); }
.cell-v { font-family: var(--f-cond); font-size: 14px; letter-spacing: .04em; color: var(--muted); }
.cell-v.is-full, .cell-v.is-good { color: var(--text); }
.cell-v.is-bad { color: var(--red); }
.cell-v.is-warn { color: var(--yellow); }
.poster-miss { margin-top: 8px; min-height: 20px; font-size: 12px; line-height: 20px; color: var(--muted); }
.poster-actions { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }

/* ---------- nouvel épisode ---------- */
.new-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: "form aside" "refs aside" "act aside"; gap: 24px; align-items: start; }
.ng-form { grid-area: form; }
.ng-refs { grid-area: refs; display: grid; gap: 12px; }
.ng-act { grid-area: act; margin-top: 0; }
.ng-aside { grid-area: aside; }
@media (min-width: 1500px) {
  .new-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) 320px; grid-template-areas: "form refs aside" "act refs aside"; grid-template-rows: auto 1fr; }
}
.new-grid .lbl-top { margin: 16px 0 8px; }
.steps { display: grid; gap: 16px; list-style: decimal; padding-left: 20px; color: var(--muted); }
.steps b { color: var(--text); }
.panel .mb-note { margin-top: 16px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 2px; padding: 2px; gap: 2px; }
.seg button { height: 32px; padding: 0 16px; background: transparent; border: 0; border-radius: 2px; color: var(--muted); font-weight: 600; cursor: pointer; transition: background var(--ease), color var(--ease); }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--studio); }
.seg-sm button { height: 24px; padding: 0 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.mb-warn { color: var(--yellow); }
.refs-h { font-family: var(--f-cond); font-size: 20px; line-height: 28px; font-weight: 400; text-transform: uppercase; letter-spacing: .04em; }
.refs-aside { font-size: 14px; letter-spacing: .04em; color: var(--muted); }
.dropzone { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px; border: 1px dashed var(--line); border-radius: 2px; color: var(--muted); transition: border-color var(--ease), background var(--ease); }
.dropzone.is-over { border-color: var(--text); background: var(--rail); color: var(--text); }
.ref-list { display: grid; gap: 8px; }
.ref-list:empty { display: none; }
.ref-item { display: grid; grid-template-columns: 120px minmax(0, 1fr) 160px; gap: 16px; align-items: start; padding: 12px; background: var(--studio); border: 1px solid var(--line); border-radius: 2px; }
.ref-prev { width: 120px; height: 160px; object-fit: contain; background: #000; border-radius: 2px; }
.img-fail { display: grid; place-items: center; border: 1px solid var(--line); color: var(--muted); }
.img-fail .ic { width: 32px; height: 32px; }
.ref-thumb { width: 72px; height: 72px; object-fit: contain; background: #000; border-radius: 2px; }
.ref-fields { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 0 16px; }
.ref-fields .fld { margin-bottom: 0; }
.ref-side { display: grid; gap: 8px; justify-items: end; min-width: 96px; }
.ref-stat { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-cond); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ref-stat.is-ok { color: var(--text); }
.ref-stat.is-err { color: var(--red); text-transform: none; font-family: var(--f-body); letter-spacing: 0; text-align: right; }
.mb-note { color: var(--muted); font-size: 14px; }

/* ---------- quotas ---------- */
.q-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
.q-panel { display: grid; gap: 16px; }
.q-big { display: flex; align-items: center; gap: 16px; }
.q-num { font-family: var(--f-cond); font-size: 64px; line-height: 64px; }
.q-sub { color: var(--muted); }
.q-back { font-size: 16px; }
.q-back b { font-family: var(--f-cond); font-size: 28px; font-weight: 400; vertical-align: -3px; margin-left: 4px; }
.q-back.is-quiet { color: var(--muted); }
.q-actions { display: grid; gap: 12px; justify-items: start; }
.dots { display: inline-flex; gap: 8px; }
.dots i { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--muted); }
.dots i.on { background: var(--text); border-color: var(--text); }
.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-form label { color: var(--muted); }
.inline-form .field { width: 120px; }
.meter { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--text); }
.meter-read { margin-top: 12px; font-size: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.meter-read .tag { margin-left: 8px; }
.q-summary { margin-top: 24px; padding: 16px; border: 1px solid var(--line); border-radius: 2px; color: var(--muted); font-size: 12px; line-height: 18px; }

/* ---------- casting ---------- */
.cast-layout { display: grid; gap: 32px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.cast-layout.has-form { grid-template-columns: minmax(0, 1fr) 380px; }
.tiles { display: grid; gap: 32px 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr)); }
.tile { background: var(--plateau); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.tile-media { position: relative; background: #c9c9cc; }
.sheet-btn { position: relative; display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.sheet-btn img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.zoom-hint { position: absolute; right: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: rgba(12, 12, 16, .86); color: var(--text); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: 0; transition: opacity var(--ease); }
.sheet-btn:hover .zoom-hint, .sheet-btn:focus-visible .zoom-hint { opacity: 1; }
.sheet-btn.ref-big { display: flex; flex-direction: column; background: #000; }
.sheet-btn.ref-big .ref-big-img { aspect-ratio: 16 / 9; height: auto; object-fit: contain; background: #000; }
.sheet-btn.ref-big .img-fail { width: 100%; aspect-ratio: 16 / 9; border: 0; }
.ref-big-cap { padding: 8px 12px; background: var(--plateau); border-top: 1px solid var(--line); color: var(--muted); font-family: var(--f-cond); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; text-align: left; }
.tile-media:has(.ref-big) .tile-lt { bottom: 48px; }
.sheet-empty { aspect-ratio: 16 / 9; display: grid; place-content: center; justify-items: center; gap: 8px; background: var(--plateau); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.tile-lt { position: absolute; left: 0; bottom: 16px; max-width: 80%; pointer-events: none; }
.tile-body { padding: 16px 20px 20px; display: grid; gap: 12px; }
.tile-voice { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); }
.tile-voice .ic { margin-top: 2px; }
.tics { display: grid; gap: 4px; }
.tics li { padding-left: 12px; border-left: 2px solid var(--yellow); }
.tile-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tile-shared { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.tile-shared b { color: var(--text); font-weight: 600; }
.ref-row { display: flex; align-items: center; gap: 12px; width: fit-content; padding: 4px 12px 4px 4px; background: transparent; border: 1px solid var(--line); border-radius: 2px; cursor: zoom-in; font-family: var(--f-cond); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.ref-row:hover { border-color: var(--muted); background: var(--rail); }
.ref-thumb-s { width: 40px; height: 40px; object-fit: contain; background: #000; border-radius: 2px; }
.picker { display: inline-flex; }
.head-tools { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.series-pick { display: grid; gap: 4px; }
.series-pick label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.series-pick .field { height: 40px; min-width: 200px; padding: 0 12px; }
select.field { appearance: auto; cursor: pointer; }
.series-premise { max-width: 80ch; margin: -8px 0 24px; color: var(--muted); font-size: 16px; line-height: 24px; }
.series-row { display: flex; align-items: flex-end; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }
.warn-line { color: var(--yellow); margin-bottom: 12px; }
.ref-fld { gap: 8px; }
.ref-pick { display: flex; align-items: center; gap: 12px; }
.ref-pick:empty { display: none; }
.cast-form .fld { margin-bottom: 16px; }
.form-err { margin: 12px 0; }

/* ---------- éditeur ---------- */
.editor-root { height: calc(100vh - var(--bar) - var(--fake)); overflow: hidden; }
.editor { display: grid; grid-template-rows: var(--tb) minmax(0, 1fr); height: 100%; }
.ed-toolbar { display: grid; grid-template-columns: minmax(120px, max-content) auto 1fr; align-items: center; gap: 24px; padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--studio); }
.ed-id { display: flex; align-items: baseline; gap: 16px; min-width: 0; }
.ep-num { font-family: var(--f-cond); font-size: 28px; line-height: 32px; letter-spacing: .02em; text-transform: uppercase; }
.ed-title { font-family: var(--f-cond); font-size: 20px; line-height: 32px; font-weight: 400; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dirty { display: inline-flex; align-items: center; gap: 8px; color: var(--yellow); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.dirty i { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.verdict { justify-self: start; display: inline-flex; align-items: center; gap: 8px; height: 36px; max-width: 100%; padding: 0 16px; border: 1px solid var(--line); border-radius: 2px; background: transparent; color: var(--muted); font-weight: 600; cursor: default; white-space: nowrap; }
.verdict-ok { color: var(--green); border-color: var(--green); }
.verdict-bad { color: var(--red); border-color: var(--red); cursor: pointer; }
.verdict-warn { color: var(--yellow); border-color: var(--yellow); }
.verdict-s { color: var(--muted); font-weight: 400; }
.ed-actions { display: flex; align-items: center; gap: 12px; justify-self: end; }
.btn.is-dirty:not(:disabled) { box-shadow: 0 0 0 2px var(--studio), 0 0 0 3px var(--yellow); }
.tabs { display: flex; gap: 4px; margin-right: 8px; }
.tab { padding: 6px 12px; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; }
.tab:hover { color: var(--text); }
.tab[aria-current="page"] { color: var(--text); border-bottom-color: var(--text); }

.ed-body { display: grid; grid-template-columns: 124px calc(var(--fh) * 9 / 16 + 32px) minmax(0, 1fr); min-height: 0; }
.ed-body[data-mode="fiche"], .ed-body[data-mode="file"] { grid-template-columns: 124px minmax(0, 1fr); }
.ed-body[data-mode="fiche"] .stage, .ed-body[data-mode="file"] .stage { display: none; }
.strip { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--studio); }
.strip-top { display: grid; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); }
.pill { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; background: transparent; border: 1px solid var(--line); border-radius: 2px; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; cursor: pointer; }
.pill:hover { color: var(--text); border-color: var(--muted); }
.pill[aria-current="true"] { background: var(--text); color: var(--studio); border-color: var(--text); }
.pill.has-err::after { content: "!"; margin-left: auto; color: var(--red); font-weight: 700; }
.strip-list { flex: 1; min-height: 0; overflow: auto; padding: 8px; display: grid; gap: 4px; align-content: start; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.cut { position: relative; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; gap: 0 8px; align-items: start; padding: 6px; background: transparent; border: 1px solid transparent; border-radius: 2px; text-align: left; cursor: pointer; transition: background var(--ease), border-color var(--ease); }
.cut:hover { background: var(--rail); }
.cut[aria-current="true"] { background: var(--rail); border-color: var(--text); }
.cut-thumb { grid-row: 1 / 3; width: 44px; aspect-ratio: 9 / 16; background: var(--plateau); border-radius: 2px; overflow: hidden; display: grid; place-items: center; color: var(--muted); }
.cut-thumb img, .cut-thumb video { width: 100%; height: 100%; object-fit: cover; }
.cut-meta { display: grid; }
.cut-meta b { font-family: var(--f-cond); font-size: 20px; line-height: 24px; font-weight: 400; }
.cut-meta i { font-style: normal; color: var(--muted); font-size: 12px; }
.cut-dots { display: flex; gap: 4px; align-self: end; }
.cut-dots em { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--muted); }
.cut-dots em.on { background: var(--text); border-color: var(--text); }
.cut-flag { display: none; position: absolute; top: 4px; right: 6px; color: var(--red); font-weight: 700; }
.cut.has-err .cut-flag { display: block; }
.cut-add { margin: 8px; height: 32px; display: flex; align-items: center; justify-content: center; gap: 6px; background: transparent; border: 1px dashed var(--line); border-radius: 2px; color: var(--muted); cursor: pointer; }
.cut-add:hover { color: var(--text); border-color: var(--muted); }

.stage { display: flex; flex-direction: column; gap: 12px; padding: 16px; min-height: 0; min-width: 0; }
.stage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-height: 52px; }
.frame-wrap { flex: 1; min-height: 0; display: flex; justify-content: center; }
.frame { height: 100%; aspect-ratio: 9 / 16; max-width: 100%; background: #000; border-radius: 2px; overflow: hidden; position: relative; }
.frame-media { width: 100%; height: 100%; object-fit: contain; background: #000; }
.frame-btn { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.frame-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; text-align: center; background: var(--plateau); border: 1px dashed var(--line); }
.frame-empty p:first-of-type { font-family: var(--f-cond); font-size: 20px; text-transform: uppercase; letter-spacing: .04em; }
.frame-empty .art { width: 80px; height: 75px; }
.stage-actions { display: flex; gap: 8px; flex-wrap: wrap; min-height: 32px; }

.fields { position: relative; overflow-y: auto; min-height: 0; min-width: 0; padding: 0 24px 48px 16px; scrollbar-color: var(--line) transparent; }
.errs { position: sticky; top: 0; z-index: 3; margin: 0 -24px 0 -16px; padding: 12px 24px 12px 16px; max-height: 34vh; overflow: auto; background: var(--studio); border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.errlist { display: grid; gap: 4px; }
.err { display: grid; grid-template-columns: 148px 1fr; gap: 12px; width: 100%; padding: 6px 12px; text-align: left; background: var(--plateau); border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 2px; cursor: pointer; }
.err:hover { background: var(--rail); }
.err-where { font-family: var(--f-cond); font-size: 12px; letter-spacing: .08em; color: var(--red); line-height: 20px; }
.conflict { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--red); border-left-width: 4px; background: var(--plateau); flex-wrap: wrap; }
.conflict .ic { color: var(--red); }
.conflict p { flex: 1; min-width: 200px; font-weight: 600; }
.draft-old { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--yellow); border-left-width: 4px; background: var(--plateau); flex-wrap: wrap; }
.draft-old .ic { color: var(--yellow); }
.draft-old p { flex: 1; min-width: 200px; }
.draft-old .row-actions { margin-top: 0; }
.note-line { color: var(--yellow); font-size: 14px; }
.fbody { padding-top: 8px; }
.fs { padding: 20px 0 8px; border-top: 1px solid var(--line); }
.fs:first-child { border-top: 0; }
.fs-h { font-family: var(--f-cond); font-size: 14px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.counter-live { margin-bottom: 12px; font-family: var(--f-cond); font-size: 20px; letter-spacing: .04em; }
.counter-live .is-over { color: var(--red); }
.av-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.av-btn { display: grid; justify-items: center; gap: 4px; width: 64px; padding: 4px; background: transparent; border: 1px solid transparent; border-radius: 2px; cursor: pointer; opacity: .5; transition: opacity var(--ease), border-color var(--ease); }
.av-btn:hover { opacity: .85; }
.av-btn[aria-pressed="true"] { opacity: 1; border-color: var(--text); }
.av-btn.is-unknown { border-color: var(--red); }
.av-name { font-size: 12px; line-height: 16px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-sep { align-self: center; padding: 0 8px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; border-left: 1px solid var(--line); }
.avatar { display: block; width: 40px; height: 40px; border-radius: 50%; background-color: #cfcfd2; background-image: var(--img); background-repeat: no-repeat; background-size: 320% auto; background-position: 2% 12%; border: 1px solid var(--line); flex: none; }
.avatar-none { display: grid; place-items: center; background: var(--rail); color: var(--text); font-family: var(--f-cond); font-size: 20px; }
.line { padding: 12px; margin-bottom: 8px; background: var(--plateau); border: 1px solid var(--line); border-radius: 2px; display: grid; gap: 8px; }
.line-head { display: flex; align-items: center; gap: 16px; }
.line-n { font-family: var(--f-cond); font-size: 12px; letter-spacing: .1em; color: var(--muted); margin-right: auto; }
.sfx-head, .sfx-row { display: grid; grid-template-columns: 1fr 1fr 32px; gap: 8px; margin-bottom: 8px; align-items: center; }
.sfx-head { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.prompt-text { margin: 0 0 12px; padding: 12px 16px; background: var(--plateau); border: 1px solid var(--line); border-left: 3px solid var(--yellow); border-radius: 2px; color: var(--text); font-size: 12px; line-height: 18px; white-space: pre-wrap; word-break: break-word; max-height: 240px; overflow: auto; }
.danger-zone { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.meta-line { margin-bottom: 16px; color: var(--muted); }
.meta-line b, .meta-line code { color: var(--text); }
.refs-band { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 8px; }
.rb { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 8px; background: var(--plateau); border: 1px solid var(--line); border-radius: 2px; min-width: 0; max-width: 100%; }
.rb-thumb { width: 72px; height: 72px; padding: 0; border: 0; background: #000; border-radius: 2px; overflow: hidden; display: grid; place-items: center; cursor: zoom-in; flex: none; color: var(--muted); }
.rb-thumb img { width: 100%; height: 100%; object-fit: contain; }
.rb-thumb.is-missing { cursor: default; border: 1px dashed var(--red); }
.rb-cap { font-family: var(--f-cond); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rb-cap b { font-weight: 400; color: var(--text); }
.rb-note { margin-top: 4px; font-size: 14px; max-width: 28ch; overflow-wrap: anywhere; }
.rb-note.is-bad { color: var(--red); }
.kw-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.kw { padding: 2px 8px; background: var(--yellow); color: var(--studio); font-family: var(--f-cond); font-size: 14px; letter-spacing: .06em; border-radius: 2px; }
.flash { animation: flash 1.9s ease-out 1; }
@keyframes flash { 0% { box-shadow: 0 0 0 2px var(--yellow); background-color: rgba(255, 230, 0, .16); } 100% { box-shadow: 0 0 0 2px transparent; } }

/* ---------- tournage ---------- */
.file-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; flex-wrap: wrap; }
.readout { display: flex; align-items: center; gap: 16px; padding: 8px 16px; background: var(--plateau); border: 1px solid var(--line); border-radius: 2px; margin-bottom: 16px; flex-wrap: wrap; }
.readout-l { font-family: var(--f-cond); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.readout-v { display: inline-flex; align-items: center; gap: 8px; flex: 1; flex-wrap: wrap; }
.readout .dots i { width: 12px; height: 12px; }
.ok-note { color: var(--text); margin-bottom: 12px; }
.trows { display: grid; gap: 8px; }
.trow { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 12px; background: var(--plateau); border: 1px solid var(--line); border-radius: 2px; }
.trow-thumb { width: 56px; }
.trow-top { display: flex; align-items: center; gap: 12px; }
.trow-top b { font-family: var(--f-cond); font-size: 20px; font-weight: 400; letter-spacing: .04em; }
.reqs { display: grid; gap: 8px; }
.req { padding: 12px 16px; background: var(--plateau); border: 1px solid var(--line); border-radius: 2px; }
.req-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.req-log { margin-top: 6px; color: var(--muted); font-size: 12px; }

/* ---------- lecteur ---------- */
.player { grid-template-rows: var(--tb) minmax(0, 1fr); }
.pl-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; }
.pl-main { display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; gap: 8px; padding: 16px; min-height: 0; }
.pl-frame { height: 100%; aspect-ratio: 9 / 16; max-width: 100%; background: #000; border-radius: 2px; overflow: hidden; }
.pl-video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.pl-bar { display: flex; gap: 16px; align-items: baseline; justify-content: space-between; width: 100%; max-width: calc((100vh - 360px) * 9 / 16 + 8px); }
.pl-which { font-family: var(--f-cond); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tcode { font-family: var(--f-cond); font-size: 20px; letter-spacing: .04em; }
.pl-side { padding: 24px; border-left: 1px solid var(--line); display: grid; gap: 16px; align-content: start; overflow: auto; }
.keys { display: grid; gap: 8px; color: var(--muted); }
.pl-strip { grid-column: 1 / -1; display: flex; gap: 8px; overflow-x: auto; padding: 12px 24px; border-top: 1px solid var(--line); background: var(--studio); }
.pl-item { display: grid; justify-items: center; gap: 4px; width: 64px; flex: none; padding: 4px; background: transparent; border: 1px solid transparent; border-radius: 2px; cursor: pointer; color: var(--muted); }
.pl-item:hover:not(:disabled) { background: var(--rail); }
.pl-item[aria-pressed="true"] { border-color: var(--text); color: var(--text); }
.pl-item:disabled { opacity: .35; cursor: not-allowed; }
.pl-item b { font-family: var(--f-cond); font-size: 14px; font-weight: 400; letter-spacing: .06em; }
.pl-thumb { width: 54px; aspect-ratio: 9 / 16; background: var(--plateau); border-radius: 2px; overflow: hidden; display: grid; place-items: center; }
.pl-thumb video, .pl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.is-dim { opacity: .45; }

/* ---------- cues et post ---------- */
.post-body { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; padding: 24px; overflow: auto; align-items: start; min-height: 0; }
.cues-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.cues-sum { display: flex; align-items: center; gap: 8px; margin: 12px 0 16px; color: var(--muted); }
.rundown { display: grid; }
.rd { display: grid; grid-template-columns: 72px 64px minmax(0, 1fr) auto; gap: 12px; padding: 8px 12px 8px 12px; border-top: 1px solid var(--line); border-left: 3px solid transparent; align-items: baseline; }
.rd-todo { border-left-color: var(--yellow); background: rgba(255, 230, 0, .05); }
.rd-tc { font-family: var(--f-cond); font-size: 16px; letter-spacing: .04em; text-decoration: none; }
.rd-tc:hover { text-decoration: underline; text-underline-offset: 3px; }
.rd-who { font-family: var(--f-cond); font-size: 12px; letter-spacing: .1em; color: var(--muted); }
.rd-main { display: grid; gap: 2px; min-width: 0; }
.rd-sound { font-weight: 600; }
.rd-punch .rd-sound { font-family: var(--f-cond); letter-spacing: .08em; text-transform: uppercase; }
.rd-punch .rd-sound::before { content: "▸ "; color: var(--muted); }
.rd-pos { color: var(--muted); font-size: 12px; }
.rd-rep { color: var(--muted); font-size: 12px; font-style: italic; }
.rd-raw { grid-template-columns: 1fr; color: var(--muted); }
.pblock { margin-bottom: 20px; }
.pblock-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ptext { font-size: 16px; line-height: 24px; padding: 12px 16px; background: var(--studio); border: 1px solid var(--line); border-radius: 2px; }
.ptags { color: var(--yellow); }

/* ---------- Régie (tiroir) ---------- */
.drawer { position: fixed; z-index: 40; top: calc(var(--bar) + var(--fake)); right: 0; bottom: 0; width: min(480px, 100vw); display: flex; flex-direction: column; background: var(--plateau); border-left: 1px solid var(--line); animation: slide 180ms ease-out 1; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.dr-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dr-body { flex: 1; min-height: 0; overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.dr-job { display: grid; gap: 12px; }
.dr-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dr-chrono { font-family: var(--f-cond); font-size: 28px; line-height: 28px; letter-spacing: .04em; }
.dr-label { font-size: 16px; font-weight: 600; }
.dr-fail { padding: 12px 16px; border: 1px solid var(--red); border-left-width: 4px; display: grid; gap: 8px; justify-items: start; }
.dr-hint { color: var(--muted); font-size: 12px; }
.dr-log { margin: 0; min-height: 200px; max-height: 340px; overflow: auto; padding: 12px; background: var(--studio); border: 1px solid var(--line); border-radius: 2px; font-size: 12px; line-height: 18px; white-space: pre-wrap; word-break: break-word; flex: none; }
.dr-h { font-family: var(--f-cond); font-size: 14px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dr-hist { display: grid; gap: 2px; }
.hist-item { display: grid; grid-template-columns: 88px 1fr auto; gap: 8px; width: 100%; padding: 6px 8px; background: transparent; border: 1px solid transparent; border-radius: 2px; text-align: left; cursor: pointer; align-items: baseline; }
.hist-item:hover { background: var(--rail); }
.hist-item.is-sel { border-color: var(--line); background: var(--rail); }
.hist-st { font-family: var(--f-cond); font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.hist-failed, .hist-interrupted { color: var(--red); }
.hist-running { color: var(--text); }
.hist-t { font-size: 12px; color: var(--muted); }

/* ---------- modales, toasts, lightbox ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: rgba(12, 12, 16, .84); }
.modal { width: min(560px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 32px; background: var(--plateau); border: 1px solid var(--line); border-top: 3px solid var(--text); border-radius: 2px; animation: pop 160ms ease-out 1; }
.modal-wide { width: min(760px, 100%); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-kicker { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.modal-title { font-family: var(--f-cond); font-size: 28px; line-height: 32px; font-weight: 400; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 16px; }
.modal-body { display: grid; gap: 12px; }
.mb-what { font-size: 16px; line-height: 24px; }
.mb-cost { font-family: var(--f-cond); font-size: 20px; line-height: 28px; letter-spacing: .03em; padding: 12px 16px; background: var(--studio); border-left: 3px solid var(--text); }
.mb-cost.is-blocked { border-left-color: var(--red); color: var(--red); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.cmdline { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--studio); border: 1px solid var(--line); border-radius: 2px; }
.cmdline code { flex: 1; word-break: break-all; }
.toasts { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { max-width: min(640px, 92vw); padding: 10px 20px; background: var(--rail); border: 1px solid var(--line); border-left: 3px solid var(--text); border-radius: 2px; font-weight: 600; animation: pop 160ms ease-out 1; pointer-events: auto; }
.toast-err { border-left-color: var(--red); }
.toast-warn { border-left-color: var(--yellow); }
.toast.out { opacity: 0; transition: opacity 200ms ease-out; }
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .94); display: grid; }
.lb-stage { display: grid; place-items: center; padding: 56px 32px 32px; min-height: 0; }
.lb-img { max-width: 94vw; max-height: calc(100vh - 96px); object-fit: contain; }
.lb-close { position: absolute; right: 16px; top: 16px; z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 1ms !important; transition-duration: 1ms !important; }
  .tally.is-live .tally-lamp { animation: none; }
}

/* ---------- grands écrans : les champs se répartissent en deux colonnes ---------- */
@media (min-height: 900px) {
  .poster-num { font-size: 64px; }
}
@media (min-width: 1700px) {
  .ed-body[data-mode="clip"] .fbody, .ed-body[data-mode="fiche"] .fbody { column-count: 2; column-gap: 48px; }
  .ed-body[data-mode="clip"] .fs, .ed-body[data-mode="fiche"] .fs { break-inside: avoid; }
  .ed-body[data-mode="clip"] .fs:first-child, .ed-body[data-mode="fiche"] .fs:first-child { border-top: 0; }
  .ed-body[data-mode="clip"] .danger-zone { break-inside: avoid; }
  .pl-item { width: 80px; } .pl-thumb { width: 70px; }
}

/* ---------- épisode suivant : brouillon, Précédemment, Contrôle ---------- */
.verdict { min-width: 0; }
.verdict-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ed-stack { display: grid; gap: 4px; }
.ed-stack .btn { height: 28px; justify-content: flex-start; }
.nx-tb-mid { justify-self: start; font-size: 14px; }
.next-body { display: grid; grid-template-columns: minmax(0, 1fr) 420px; min-height: 0; }
.nx-main { display: flex; flex-direction: column; gap: 12px; padding: 16px 24px; min-height: 0; min-width: 0; overflow: hidden; }
.nx-side { overflow-y: auto; min-height: 0; padding: 16px 24px 48px 16px; border-left: 1px solid var(--line); scrollbar-color: var(--line) transparent; }
.nx-card { padding: 16px 20px; margin-bottom: 16px; background: var(--plateau); border: 1px solid var(--line); border-radius: 2px; break-inside: avoid; }
.nx-card .fs-h { margin: 12px 0 8px; }
.nx-card > .fs-h:first-child { margin-top: 0; }
.nx-banners { display: grid; gap: 8px; flex: none; }
.nx-banners:empty { display: none; }
.nx-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px; background: var(--plateau); border: 1px solid var(--line); border-left: 4px solid var(--text); border-radius: 2px; }
.nx-banner b { font-family: var(--f-cond); font-weight: 400; letter-spacing: .04em; }
.nx-fail { display: grid; gap: 8px; }
.fail-log { margin: 0; padding: 10px 12px; background: var(--studio); border: 1px solid var(--line); border-radius: 2px; color: var(--muted); font-size: 12px; line-height: 18px; white-space: pre-wrap; word-break: break-word; max-height: 180px; overflow: auto; }
.hint-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; flex: none; }
.hint-field { display: grid; gap: 4px; min-width: 0; }
.hint-field .lbl-top { margin: 0; }
.hint-ta { min-height: 56px; max-height: 140px; resize: vertical; }
.hint-row { margin: 0; }
.hint-row .field-err { min-height: 0; font-size: 12px; line-height: 16px; }
.script-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.script-bar { display: flex; align-items: center; gap: 16px; flex: none; }
.script-bar .lbl-top { justify-content: flex-start; gap: 8px; align-items: center; }
.dirty-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.nx-status { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nx-status.is-warn { color: var(--yellow); }
.nx-status.is-bad { color: var(--red); }
.script-bar .counter.is-over, .hint-row .counter.is-over { color: var(--red); }
.script-ed { flex: 1; min-height: 200px; width: 100%; resize: none; padding: 20px 24px; background: var(--plateau); border: 1px solid var(--line); border-radius: 2px; color: var(--text); font-family: var(--f-body); font-size: 16px; line-height: 25.6px; white-space: pre-wrap; overflow-wrap: break-word; tab-size: 2; scrollbar-color: var(--line) transparent; }
.script-ed:hover { border-color: var(--muted); }
.script-ed:focus { border-color: var(--text); outline: none; box-shadow: 0 0 0 1px var(--text); }
.script-ed[readonly] { opacity: .6; }
.script-mirror { position: absolute; left: -9999px; top: 0; visibility: hidden; flex: none; height: auto; min-height: 0; overflow: visible; border: 1px solid transparent; }
.vers { position: relative; margin-left: auto; }
.vers-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 6; width: 340px; max-height: 320px; overflow: auto; display: grid; gap: 8px; padding: 12px 16px; background: var(--plateau); border: 1px solid var(--line); border-top: 3px solid var(--text); border-radius: 2px; }
.vers-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nx-empty { max-width: 760px; padding: 24px 0; display: grid; gap: 4px; justify-items: start; }
.nx-lead { max-width: 62ch; margin: 12px 0 16px; color: var(--muted); font-size: 16px; line-height: 24px; }
.nx-empty .hint-bar { grid-template-columns: minmax(0, 1fr); width: 100%; gap: 12px; justify-items: start; }
.nx-empty .hint-field { width: 100%; }
.nx-empty .hint-ta { min-height: 96px; }
.nx-empty > .hint { margin-top: 8px; }

/* ON AIR : job en cours sur la série */
.onair { display: grid; gap: 12px; padding: 20px 24px; background: var(--plateau); border: 1px solid var(--red); border-left-width: 4px; border-radius: 2px; flex: none; }
.onair-top { display: flex; align-items: center; gap: 12px; }
.onair-lamp { width: 12px; height: 12px; border-radius: 50%; background: var(--red); animation: onair 2s ease-in-out infinite; }
.onair-tag { font-family: var(--f-cond); font-size: 14px; letter-spacing: .1em; color: var(--red); }
.onair-chrono { margin-left: auto; font-family: var(--f-cond); font-size: 28px; line-height: 28px; letter-spacing: .04em; }
.onair-title { font-family: var(--f-cond); font-size: 28px; line-height: 32px; font-weight: 400; text-transform: uppercase; letter-spacing: .03em; }
.onair-line { min-height: 20px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.onair-steps { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.ostep { display: flex; align-items: center; gap: 8px; color: var(--muted); font-family: var(--f-cond); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.ostep-dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--muted); }
.ostep.is-done, .ostep.is-live { color: var(--text); }
.ostep.is-done .ostep-dot { background: var(--text); border-color: var(--text); }
.ostep.is-live .ostep-dot { background: var(--red); border-color: var(--red); }
.ostep.is-warn { color: var(--yellow); }
.ostep.is-warn .ostep-dot { border-color: var(--yellow); background: var(--yellow); }
.ostep-n { font-family: var(--f-body); letter-spacing: 0; text-transform: none; color: var(--yellow); }

/* Précédemment */
.recap-head { margin-bottom: 12px; }
.recap-body { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: start; }
.recap-body:not(:has(.recap-still)) { grid-template-columns: minmax(0, 1fr); }
.recap-still { width: 96px; aspect-ratio: 9 / 16; padding: 0; border: 0; border-radius: 2px; background: #000; overflow: hidden; cursor: zoom-in; }
.recap-img { width: 100%; height: 100%; object-fit: cover; }
.recap-end { display: grid; gap: 6px; justify-items: start; margin-bottom: 4px; }
.recap-q { display: inline-block; padding: 2px 10px; background: var(--yellow); color: var(--studio); font-family: var(--f-cond); font-size: 20px; line-height: 28px; letter-spacing: .03em; text-transform: uppercase; }
.recap-opt { font-family: var(--f-cond); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.threads { display: grid; gap: 6px; }
.threads li { padding-left: 12px; border-left: 2px solid var(--yellow); }
.threads li.is-resolved { color: var(--muted); border-left-color: var(--line); }
.th-state { margin-left: 8px; font-family: var(--f-cond); font-size: 12px; letter-spacing: .1em; color: var(--yellow); }
.threads li.is-resolved .th-state { color: var(--muted); }
.recap-warn { margin-top: 12px; font-size: 14px; color: var(--yellow); }
.recap-warn .chip { margin-right: 6px; }

/* Contrôle du script */
.rep-sum { margin-bottom: 8px; }
.rep-sum b { font-weight: 600; }
.rep-list { display: grid; gap: 2px; margin-bottom: 4px; }
.rep-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; width: 100%; padding: 4px 8px; background: transparent; border: 0; border-left: 3px solid transparent; color: var(--muted); font-size: 14px; text-align: left; cursor: pointer; }
.rep-row:hover { background: var(--rail); }
.rep-row.is-over { border-left-color: var(--red); }
.rep-n { font-family: var(--f-cond); font-size: 14px; letter-spacing: .08em; color: var(--text); }
.rep-row .is-over { color: var(--red); }
.rep-unk { color: var(--red); }
.rep-errs { display: grid; gap: 4px; margin-top: 12px; }
.rep-err { display: block; width: 100%; padding: 6px 12px; text-align: left; background: var(--studio); border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 2px; color: var(--text); font-size: 14px; }
button.rep-err { cursor: pointer; }
button.rep-err:hover { background: var(--rail); }
.rep-ok { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); }

/* Suivi dans la colonne de droite */
.fold { padding: 8px 0; border-top: 1px solid var(--line); }
.fold summary { cursor: pointer; font-family: var(--f-cond); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bible-list { display: grid; gap: 6px; margin-top: 8px; font-size: 14px; }
.bible-list li { padding-left: 12px; border-left: 2px solid var(--line); }
.bible-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; }

/* ---------- Tournage : Lancer les vidéos ---------- */
.launch-note { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: -4px 0 16px; }
.launch-why { color: var(--muted); }
.launch-why.is-bad { color: var(--yellow); }

/* ---------- Suivi de la série ---------- */
.suivi-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; align-items: start; }
.suivi-time { position: relative; display: grid; gap: 16px; padding-left: 28px; }
.suivi-time::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.suivi-block { position: relative; display: grid; gap: 12px; padding: 20px 24px; background: var(--plateau); border: 1px solid var(--line); border-radius: 2px; }
.suivi-block::before { content: ""; position: absolute; left: -28px; top: 26px; width: 14px; height: 14px; border-radius: 50%; background: var(--studio); border: 2px solid var(--muted); }
.suivi-block.is-edited { border-left: 3px solid var(--text); }
.suivi-block.is-edited::before { background: var(--text); border-color: var(--text); }
.suivi-block.is-editing { border-color: var(--text); }
.suivi-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.suivi-head .panel-h { margin-bottom: 0; }
.suivi-id { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.suivi-title { font-family: var(--f-cond); font-size: 20px; line-height: 32px; font-weight: 400; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.suivi-chips { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.suivi-sum { max-width: 72ch; font-size: 16px; line-height: 24px; }
.suivi-block .fs-h { margin: 4px 0 0; }
.facts { display: grid; gap: 6px; }
.fact { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.fact-cat { font-family: var(--f-cond); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.fact-cat.is-none { opacity: .6; }
.suivi-end { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.kw-opt { padding: 2px 8px; border: 1px solid var(--yellow); border-radius: 2px; color: var(--yellow); font-family: var(--f-cond); font-size: 14px; letter-spacing: .06em; }
.suivi-counters { display: flex; flex-wrap: wrap; gap: 16px; }
.counter.is-over { color: var(--red); }
.suivi-state { position: sticky; top: calc(var(--bar) + var(--fake) + 16px); max-height: calc(100vh - var(--bar) - var(--fake) - 32px); overflow: auto; scrollbar-color: var(--line) transparent; }
.suivi-state.is-edited { border-left: 3px solid var(--text); }
.suivi-state .hint { margin-bottom: 16px; }
.st-char { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.st-name { display: block; margin-bottom: 4px; font-family: var(--f-cond); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.suivi-proposal { display: grid; gap: 12px; margin-bottom: 24px; padding: 16px 20px; background: var(--plateau); border: 1px solid var(--yellow); border-left-width: 4px; border-radius: 2px; }
.sp-list { display: grid; gap: 6px; }
.sp-list li { padding-left: 12px; border-left: 2px solid var(--yellow); }
.empty-cost { margin-top: 4px; }
.page > .onair, .page > .note-line { margin-bottom: 16px; }

@media (min-width: 1700px) {
  .next-body { grid-template-columns: minmax(0, 1fr) 780px; }
  /* Grille et non colonnes CSS : dans une hauteur fixe, column-count pousse le surplus dans une 3e colonne hors écran. Précédemment + Contrôle à gauche (.nx-col), Suivi à droite. */
  .nx-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 24px; align-items: start; }
  .suivi-grid { grid-template-columns: minmax(0, 1fr) 560px; }
}

.next-pick { display: grid; gap: 12px; margin-top: 16px; }
.next-pick .fld { margin-bottom: 0; }
.next-pick .state { padding: 24px 0; margin: 0; align-items: flex-start; text-align: left; }

/* ============ Écriture v2 : conseils (non bloquants) ============ */
.advice > summary { cursor: pointer; font-family: var(--f-cond); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); line-height: 20px; margin-bottom: 4px; }
.advice > summary:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.errlist.is-warn .err { border-left-color: var(--yellow); }
.errlist.is-warn .err-where { color: var(--yellow); }
.act-row { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; }
.act-lbl { font-family: var(--f-cond); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.rep-advice { margin-top: 16px; }
.rep-advice-h { font-family: var(--f-cond); font-size: 12px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); }
.rep-errs.is-warn { margin-top: 8px; }
.rep-errs.is-warn .rep-err { border-left-color: var(--yellow); }
.mb-advice { margin-top: 16px; padding: 12px 16px; background: var(--plateau); border: 1px solid var(--line); border-left: 3px solid var(--yellow); border-radius: 2px; }
.mb-advice-h { font-family: var(--f-cond); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); margin-bottom: 8px; }
.mb-advice ul { display: grid; gap: 4px; font-size: 14px; line-height: 20px; }
.mb-advice-more { color: var(--muted); }
.mb-advice .mb-note { margin-top: 8px; }
@media (max-width: 720px) { .act-row { grid-template-columns: 1fr; gap: 4px; } }

/* ============ Publication : Diffusion (onglet de l'épisode) et Calendrier ============ */
.dif-body { overflow-y: auto; min-height: 0; padding: 16px 24px 48px; display: grid; gap: 16px; align-content: start; scrollbar-color: var(--line) transparent; }
.dif-top { display: grid; gap: 8px; }
.dif-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 10px 16px; background: var(--plateau); border: 1px solid var(--line); border-radius: 2px; }
.dif-id { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; min-width: 0; }
.dif-slot { font-family: var(--f-cond); font-size: 20px; line-height: 28px; letter-spacing: .03em; text-transform: uppercase; }
.dif-meta { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dif-acts { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.dif-unmade { display: flex; align-items: center; gap: 16px; padding: 8px 16px; border: 1px dashed var(--line); border-radius: 2px; }
.dif-unmade .art { width: 56px; height: 52px; flex: none; }
.dif-unmade-t { display: grid; gap: 2px; flex: 1; min-width: 0; }
.dif-unmade-t b { font-family: var(--f-cond); font-weight: 400; font-size: 16px; letter-spacing: .04em; text-transform: uppercase; }
.dif-unmade-t span { color: var(--muted); }
.dif-pre { display: grid; gap: 8px; }
.dif-pre-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dif-pre-t { font-family: var(--f-cond); font-size: 20px; line-height: 28px; font-weight: 400; letter-spacing: .04em; text-transform: uppercase; }
.dif-alerts { display: grid; gap: 6px; }
.dif-alert { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 6px 12px; background: var(--plateau); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 2px; }
.dif-alert .ic { color: var(--yellow); }
.dif-alert.is-warn { border-left-color: var(--yellow); }
.dif-alert.is-info { color: var(--muted); }
.dif-bullet { width: 6px; height: 6px; margin: 0 5px; border-radius: 50%; background: var(--muted); }
.dif-alert-a { display: flex; gap: 8px; }
.dif-infos > summary { cursor: pointer; width: fit-content; font-family: var(--f-cond); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 24px; margin-bottom: 6px; }
.dif-infos > summary:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.dif-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.dif-main, .dif-side { min-width: 0; }
.dif-side { display: grid; gap: 16px; }
.dif-plat { padding: 16px 20px 20px; }
.dif-plat-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.dif-seg button { display: inline-flex; align-items: center; gap: 8px; }
.dif-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.dif-plat-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.dif-field { margin-bottom: 16px; }
.dif-field:last-child { margin-bottom: 0; }
.dif-field-h { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; min-height: 32px; }
.dif-field-l { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.dif-count { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.dif-count.is-over { color: var(--red); font-weight: 600; }
.dif-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 22px; padding: 12px 16px; background: var(--studio); border: 1px solid var(--line); border-radius: 2px; max-height: 42vh; overflow: auto; scrollbar-color: var(--line) transparent; }
.dif-text.is-over { border-color: var(--red); }
.dif-text.is-tags { color: var(--yellow); }
.dif-checks { display: grid; gap: 12px; align-content: start; padding-left: 24px; border-left: 1px solid var(--line); }
.dif-checks-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dif-sub { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.dif-prog { font-family: var(--f-cond); font-size: 14px; letter-spacing: .06em; color: var(--muted); }
.dif-checklist { display: grid; gap: 2px; }
.dif-check { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 12px; align-items: start; padding: 6px 8px; margin: 0 -8px; border-radius: 2px; cursor: pointer; }
.dif-check:hover { background: var(--rail); }
.dif-check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--text); }
.dif-check-t { display: grid; gap: 0; min-width: 0; }
.dif-check-s { font-weight: 600; }
.dif-check-v { overflow-wrap: anywhere; }
.dif-check-w { font-size: 12px; line-height: 16px; color: var(--muted); }
.dif-check input:checked + .dif-check-t .dif-check-s { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--muted); }
.dif-pubrow { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; border-radius: 0; }
.dif-cover { display: block; width: min(100%, 200px); aspect-ratio: 9 / 16; margin: 0 auto 12px; padding: 0; border: 1px solid var(--line); border-radius: 2px; background: #000; overflow: hidden; cursor: zoom-in; }
.dif-cover-img { width: 100%; height: 100%; object-fit: cover; }
.dif-cover.img-fail { cursor: default; }
.dif-cover-empty { display: grid; place-content: center; justify-items: center; gap: 8px; background: var(--plateau); border-style: dashed; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; cursor: default; }
.dif-cover-empty .art { width: 72px; height: 68px; }
.dif-cov, .dif-pin, .dif-sp { padding: 16px; }
.dif-cov .fld { margin: 0 0 8px; }
.dif-pin .dif-text { font-size: 14px; line-height: 20px; margin-bottom: 8px; }
.dif-sp-b { font-family: var(--f-cond); font-size: 20px; line-height: 28px; letter-spacing: .03em; text-transform: uppercase; }
.dif-sp-l { display: grid; gap: 6px; margin-top: 12px; }
.dif-sp-l li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; line-height: 16px; }
.dif-cues > summary { cursor: pointer; width: fit-content; font-family: var(--f-cond); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 32px; }
.dif-cues > summary:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.dif-cues[open] > summary { margin-bottom: 8px; }

/* ---------- calendrier ---------- */
.cal-head { display: grid; gap: 12px; }
.cal-head .page-head { margin-bottom: 0; }
.cal-lic { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); }
.cal-lic span:last-child { max-width: 72ch; }
.cal-job { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cal-default { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; border: 1px dashed var(--line); border-radius: 2px; color: var(--muted); }
.cal-stock { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(120px, 240px) auto; align-items: center; gap: 24px; margin: 20px 0 24px; padding: 12px 16px; background: var(--plateau); border: 1px solid var(--line); border-left: 3px solid var(--text); border-radius: 2px; }
.cal-stock.is-low { border-left-color: var(--yellow); }
.cal-stock-t { font-family: var(--f-cond); font-size: 20px; line-height: 28px; letter-spacing: .03em; text-transform: uppercase; }
.cal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; align-items: start; }
.cal-aside { display: grid; gap: 16px; }
.cal-aside-b { display: grid; gap: 16px; }
.cal-rows { display: grid; gap: 8px; }
.cal-row { display: grid; grid-template-columns: 44px minmax(0, 1.2fr) minmax(0, 1fr) auto auto; align-items: center; gap: 8px 16px; padding: 8px 16px 8px 8px; background: var(--plateau); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 2px; }
.cal-row.is-gap { border-left-color: var(--yellow); }
.cal-row.is-next { background: transparent; border-style: dashed; }
.cal-thumb { position: relative; width: 44px; aspect-ratio: 9 / 16; display: grid; place-items: center; background: var(--studio); border-radius: 2px; overflow: hidden; color: var(--muted); }
.cal-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cal-thumb.is-empty { border: 1px dashed var(--line); }
.cal-id { display: grid; min-width: 0; }
.cal-ep { font-family: var(--f-cond); font-size: 20px; line-height: 24px; letter-spacing: .02em; }
.cal-title { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-title.is-muted { font-style: italic; }
.cal-slot { display: grid; gap: 4px; justify-items: start; }
.cal-slot-l { font-family: var(--f-cond); font-size: 16px; letter-spacing: .04em; }
.cal-state { display: grid; gap: 6px; justify-items: start; }
.cal-nets { display: inline-flex; gap: 4px; }
.cal-net { display: inline-grid; place-items: center; min-width: 28px; height: 20px; padding: 0 4px; border: 1px solid var(--line); border-radius: 2px; font-family: var(--f-cond); font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.cal-net.is-on { background: var(--text); border-color: var(--text); color: var(--studio); }
.cal-acts { display: flex; align-items: center; gap: 12px; }
.cal-alerts { grid-column: 2 / -1; display: grid; gap: 2px; color: var(--yellow); font-size: 12px; line-height: 16px; }
.cal-alerts li { display: flex; align-items: center; gap: 8px; }
.cal-alerts .ic { width: 14px; height: 14px; }
.cal-day { width: 36px; height: 36px; display: inline-grid; place-items: center; background: transparent; border: 1px solid var(--line); border-radius: 2px; color: var(--muted); font-family: var(--f-cond); font-size: 16px; cursor: pointer; transition: background var(--ease), color var(--ease), border-color var(--ease); }
.cal-day:hover:not(:disabled) { color: var(--text); border-color: var(--muted); }
.cal-day[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--studio); }
.cal-days { display: flex; gap: 4px; flex-wrap: wrap; }
.cal-set .fld { margin-bottom: 16px; }
.cal-set .two .fld { margin-bottom: 8px; }
.cal-err:empty { display: none; }
.cal-err { margin-bottom: 12px; }
.cal-cad { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; font-family: var(--f-cond); font-size: 16px; letter-spacing: .04em; text-transform: uppercase; }
.cal-prom { display: grid; gap: 6px; margin-bottom: 8px; }
.cal-prom li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 12px; align-items: baseline; }
.cal-prom-e { font-family: var(--f-cond); letter-spacing: .04em; }
.cal-prom-s { color: var(--muted); font-size: 12px; }
.cal-prom-c { grid-column: 2; color: var(--yellow); }
.cal-seasons { display: grid; gap: 6px; margin-top: 12px; }
.cal-seasons li { display: flex; align-items: center; gap: 12px; }
.cal-sea-t { font-family: var(--f-cond); letter-spacing: .04em; }
.cal-seasons .btn { margin-left: auto; }
.state.state-sm { padding: 16px 8px; gap: 8px; }
.state.state-sm .art { width: 72px; height: 68px; }
.state.state-sm .state-title { font-size: 20px; line-height: 24px; }
.state.state-sm .state-text { font-size: 14px; line-height: 20px; }
.cal-kit .fld { margin-bottom: 12px; }
.cal-kit .cal-lic { margin-bottom: 12px; }

@media (min-width: 1700px) {
  .dif-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; }
  .dif-plat { padding: 20px 28px 28px; }
  .dif-plat-body { grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; }
  .dif-text { font-size: 17px; line-height: 26px; }
  .dif-pin .dif-text { font-size: 15px; line-height: 22px; }
  .dif-cover { width: min(100%, 260px); }
  .dif-alerts { grid-template-columns: 1fr 1fr; }
  .cal-grid { grid-template-columns: minmax(0, 1fr) 480px; }
}

/* ---------- production en masse : Flow, file automatique, stock ---------- */
.q-flow-left { font-size: 16px; }
.q-flow-left b { font-family: var(--f-cond); font-weight: 400; font-size: 20px; letter-spacing: .03em; }
.q-gap { display: flex; align-items: center; gap: 8px; color: var(--yellow); }
.q-blocked { display: grid; gap: 8px; padding: 12px 16px; border: 1px solid var(--red); border-left-width: 4px; border-radius: 2px; background: var(--studio); }
.q-blocked-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.acc-fld { margin-bottom: 12px; }
.acc-origin { display: grid; gap: 8px; }
.chip-sm { height: 18px; padding: 0 6px; font-size: 11px; }
.trow-top { flex-wrap: wrap; }
.trow-note { margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--muted); }
.trow-note.is-bad { color: var(--red); }
.req-clips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.req-fails { display: grid; gap: 2px; margin-top: 6px; font-size: 12px; line-height: 16px; color: var(--red); }
.q-bad { display: grid; gap: 6px; margin-bottom: 12px; }

.fa-host { margin-top: 24px; }
.fa { display: grid; gap: 20px; }
.fa-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: start; }
.fa-col { display: grid; gap: 16px; align-content: start; min-width: 0; }
.fa-switch { display: flex; align-items: center; gap: 16px; }
.fa-switch > div { display: grid; gap: 2px; flex: 1; min-width: 0; }
.fa-sw-l { font-family: var(--f-cond); font-size: 20px; line-height: 28px; text-transform: uppercase; letter-spacing: .04em; }
.switch { position: relative; width: 48px; height: 26px; flex: none; padding: 0; background: transparent; border: 1px solid var(--muted); border-radius: 13px; cursor: pointer; transition: border-color var(--ease); }
.switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform var(--ease), background var(--ease); }
.switch.is-on { border-color: var(--text); }
.switch.is-on i { transform: translateX(22px); background: var(--text); }
.switch:disabled { opacity: .4; cursor: not-allowed; }
.fa-hour { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fa-hour label { color: var(--muted); }
.fa-hour .field { width: 120px; }
.fa-susp { display: grid; gap: 8px; justify-items: start; padding: 12px 16px; border: 1px solid var(--yellow); border-left-width: 4px; border-radius: 2px; background: var(--studio); }
.fa-susp-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fa-alerts { display: grid; gap: 6px; color: var(--yellow); }
.fa-alerts li { display: flex; align-items: flex-start; gap: 8px; }
.fa-alerts .ic { width: 14px; height: 14px; margin-top: 3px; }
.fa-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; margin: 0; }
.fa-dl dt { align-self: center; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.fa-dl dd { margin: 0; }
.fa-block { display: grid; gap: 8px; }
.fa-block .fs-h { margin-bottom: 4px; }
.fa-days, .fa-runs { display: grid; gap: 6px; }
.fa-day { display: grid; grid-template-columns: minmax(150px, 200px) minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 8px 12px; background: var(--studio); border: 1px solid var(--line); border-radius: 2px; }
.fa-day-d { font-family: var(--f-cond); letter-spacing: .04em; text-transform: uppercase; }
.fa-day-c { color: var(--muted); overflow-wrap: anywhere; }
.fa-day-n { font-family: var(--f-cond); letter-spacing: .04em; white-space: nowrap; }
.fa-today { margin-left: 8px; }
.fa-run { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; padding: 8px 12px; background: var(--studio); border: 1px solid var(--line); border-radius: 2px; }
.fa-run-t { font-family: var(--f-cond); letter-spacing: .04em; }
.fa-run-x { flex: 1 1 220px; min-width: 0; color: var(--muted); font-size: 12px; line-height: 16px; overflow-wrap: anywhere; }

.stk-strip:empty, .stk-notes:empty { display: none; }
.stk-strip, .stk-notes { margin-bottom: 16px; }
.stk-bar { display: grid; grid-template-columns: 240px minmax(0, 1fr) 340px; gap: 24px 32px; align-items: start; padding: 16px 24px; margin-bottom: 24px; }
.stk-sum { display: grid; gap: 8px; align-content: start; }
.stk-write { display: grid; gap: 8px; justify-items: start; }
.stk-write-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; width: 100%; align-items: start; }
.stk-write .fld, .stk-accept .fld { margin-bottom: 0; }
.stk-hint { min-height: 56px; max-height: 120px; resize: vertical; }
.stk-accept { display: grid; gap: 10px; justify-items: start; }
.stk-accept .fld { width: 100%; }
.stk-why { color: var(--yellow); font-size: 12px; line-height: 16px; }
.stk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.stk-list, .stk-arc-list { display: grid; gap: 8px; }
.stk-link { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 14px 16px; background: var(--plateau); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 2px; }
.stk-link.is-rev { border-left-color: var(--yellow); }
.stk-link.is-hard { border-left-color: var(--red); }
.stk-main { display: grid; gap: 4px; min-width: 0; }
.stk-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stk-title { font-size: 16px; line-height: 24px; font-weight: 600; }
.stk-meta { color: var(--muted); font-size: 12px; line-height: 16px; }
.stk-words { font-size: 12px; line-height: 16px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stk-words .warn { color: var(--yellow); font-weight: 600; }
.stk-tags { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; line-height: 16px; color: var(--muted); }
.stk-tag b { color: var(--text); font-weight: 500; }
.stk-hard { display: grid; gap: 2px; color: var(--red); font-size: 12px; line-height: 16px; }
.stk-acts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.stk-step { display: grid; gap: 4px; padding: 10px 12px; background: var(--studio); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 2px; }
.stk-step.is-written { border-left-color: var(--text); }
.stk-step-h { display: flex; align-items: center; gap: 8px; }
.stk-step-n { font-family: var(--f-cond); font-size: 18px; letter-spacing: .04em; }
.stk-step b { margin-right: 4px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
@media (min-width: 1700px) {
  .stk-bar { grid-template-columns: 280px minmax(0, 1fr) 400px; }
  .stk-grid { grid-template-columns: minmax(0, 1fr) 520px; }
}
.q-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- connexion et compte (rôle serveur) ---------- */
.who { font-family: var(--f-cond); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pc { display: inline-flex; align-items: center; gap: 8px; flex: none; font-family: var(--f-cond); font-size: 11px; line-height: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pc-text { max-width: 170px; }
/* Hébergé : le voyant du PC prend la place de la pastille fal.ai (sans objet pour le collaborateur) et l'en-tête se resserre pour tenir à 1366 px. */
.is-hosted .fal-pill { display: none; }
.is-hosted .bar { gap: 20px; }
.is-hosted .nav a { padding: 6px 8px; }
.is-hosted .bar-right { gap: 12px; }
.pc-lamp { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--muted); flex: none; }
.pc.is-on { color: var(--text); }
.pc.is-on .pc-lamp { background: var(--green); border-color: var(--green); }
.onair.is-wait { border-color: var(--line); }
.onair.is-wait .onair-lamp { background: transparent; border: 1.5px solid var(--muted); animation: none; }
.onair.is-wait .onair-tag { color: var(--muted); }
.login-body { min-width: 0; }
.login { max-width: 360px; margin: 14vh auto 0; padding: 0 16px; display: grid; gap: 24px; }
.login-h { font-family: var(--f-cond); font-size: 28px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; }
.login-form { display: grid; gap: 8px; }
.login-form label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.login-form .btn { margin-top: 12px; }
.login-err { color: var(--red); font-weight: 600; }
.login-note { padding: 12px 16px; border: 1px solid var(--line); border-left: 4px solid var(--yellow); background: var(--plateau); }
