/* FBroadcastHub — charte FAVORIZ : néons rouge et violet sur fond quasi noir, police Inter. */

@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(fonts/Inter-Regular.ttf); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(fonts/Inter-Medium.ttf); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(fonts/Inter-SemiBold.ttf); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(fonts/Inter-Bold.ttf); }

:root {
  --red: #ff0055;
  --purple: #8a2be2;
  --green: #00ff88;
  --amber: #ffb020;
  --bg: #050509;
  --glow: #1e0a33;
  --panel: #0f0b18;
  --panel-hi: #17101f;
  --rule: #241c33;
  --text: #d7d5e0;
  --muted: #8e8aa0;
  --grey: #5c5870;
  --accent: linear-gradient(90deg, var(--red), var(--purple));
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 0% 0%, rgba(30, 10, 51, 0.9), transparent 60%),
    radial-gradient(900px 600px at 100% 100%, rgba(255, 0, 85, 0.08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; color: #fff; }
h1 { font-size: 26px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* En-tête : FAVORIZ et l'application à gauche, logo du client à droite. */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px;
  background: rgba(5, 5, 9, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 26px; display: block; }
.brand .app { font-weight: 600; font-size: 16px; color: #fff; padding-left: 12px; border-left: 1px solid var(--rule); }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a {
  text-decoration: none; padding: 7px 12px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 14px;
}
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.on { color: #fff; background: var(--panel-hi); }
.spacer { flex: 1; }
.client-logo { height: 34px; max-width: 160px; object-fit: contain; display: block; }
.user { position: relative; }
.user > button {
  display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--rule);
  border-radius: 999px; padding: 5px 12px 5px 5px; cursor: pointer;
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 12px;
}
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; padding: 6px;
  background: var(--panel-hi); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
.menu a, .menu button {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; border: 0; background: none;
  text-decoration: none; cursor: pointer; font-size: 14px;
}
.menu a:hover, .menu button:hover { background: var(--panel); }

main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 80px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.bar { height: 3px; width: 120px; background: var(--accent); border-radius: 3px; margin-top: 12px; }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.panel {
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 20px;
}
.panel > .head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel > .head h2 { flex: 1; }

.card {
  display: block; text-decoration: none; background: var(--panel); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 16px 18px; transition: border-color .15s, transform .15s;
}
a.card:hover { border-color: rgba(138, 43, 226, .6); transform: translateY(-1px); }
.card .title { font-weight: 600; color: #fff; }
.card .meta { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* Listes */
.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-top: 1px solid var(--rule);
}
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .title { color: #fff; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.row { text-decoration: none; border-radius: 8px; }
a.row:hover { background: var(--panel-hi); }
.when { font-variant-numeric: tabular-nums; color: var(--text); min-width: 140px; font-size: 14px; }
.empty { color: var(--muted); padding: 10px 4px; }

/* Étiquettes */
.tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px;
  border-radius: 999px; background: var(--panel-hi); border: 1px solid var(--rule); color: var(--muted); white-space: nowrap;
}
.tag.ok { color: var(--green); border-color: rgba(0, 255, 136, .3); }
.tag.warn { color: var(--amber); border-color: rgba(255, 176, 32, .35); }
.tag.live { color: #fff; background: var(--red); border-color: var(--red); }
.tag.ready { color: #fff; background: rgba(138, 43, 226, .35); border-color: var(--purple); }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px;
  border: 1px solid var(--rule); background: var(--panel-hi); color: var(--text); font-weight: 600; font-size: 14px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--grey); }
.btn.primary { background: var(--accent); border: 0; color: #fff; box-shadow: 0 0 22px rgba(255, 0, 85, .25); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: none; }
.btn.danger { color: var(--red); }
.btn.small { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }

/* Formulaires */
form .fields { display: grid; gap: 14px; }
form .fields.cols { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
input, select, textarea {
  background: #0a0812; border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; width: 100%; font-size: 15px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(138, 43, 226, .2); }
textarea { min-height: 90px; resize: vertical; }
.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.error { color: var(--red); font-size: 14px; margin-top: 10px; }
.hint { color: var(--muted); font-size: 13px; }

/* Modules */
.module {
  position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--rule); text-decoration: none;
}
.module .ico {
  width: 40px; height: 40px; flex: none; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(255, 0, 85, .22), rgba(138, 43, 226, .3)); color: #fff;
}
.module .ico svg { width: 21px; height: 21px; }
.module .name { font-weight: 600; color: #fff; }
.module .desc { color: var(--muted); font-size: 13px; margin-top: 2px; }
.module.off { opacity: .45; }
.module.off .ico { background: var(--panel-hi); color: var(--muted); }
.module .soon { position: absolute; top: 12px; right: 12px; }
.module input[type=checkbox] { width: auto; margin-left: auto; accent-color: var(--red); transform: scale(1.2); }

/* Connexion */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth .box { width: 100%; max-width: 400px; }
.auth .logo { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 26px; }
.auth .logo img { height: 40px; }
.auth .logo .app { font-size: 22px; font-weight: 600; color: #fff; }

/* Fenêtre */
dialog {
  border: 1px solid var(--rule); border-radius: 18px; background: var(--panel-hi); color: var(--text); padding: 0;
  width: min(560px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
dialog::backdrop { background: rgba(3, 3, 7, .7); backdrop-filter: blur(3px); }
dialog .in { padding: 22px 24px; }
dialog h2 { margin-bottom: 16px; }

.link-box { display: flex; gap: 8px; margin-top: 10px; }
.link-box input { font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  background: var(--panel-hi); border: 1px solid var(--rule); border-radius: 12px; padding: 10px 16px; font-weight: 500;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}
.toast.err { border-color: var(--red); color: #fff; }

.logo-preview { height: 56px; max-width: 220px; object-fit: contain; background: #0a0812; border: 1px solid var(--rule); border-radius: 10px; padding: 8px; }

@media (max-width: 720px) {
  .top { padding: 10px 16px; gap: 10px; flex-wrap: wrap; }
  .nav { order: 3; width: 100%; margin-left: 0; }
  .brand .app { display: none; }
  main { padding: 20px 16px 60px; }
  .when { min-width: 0; width: 100%; font-size: 13px; color: var(--muted); }
  .row { flex-wrap: wrap; }
}

/* ------------------------------------------------------------ Conducteur */

a.module.ready { cursor: pointer; border-color: rgba(138, 43, 226, .45); }
a.module.ready:hover { border-color: var(--red); transform: translateY(-1px); }
a.module.ready .soon { color: var(--red); font-size: 20px; font-weight: 700; }

.rd-conn { display: flex; align-items: center; }
.rd-presence { display: flex; gap: 4px; margin-right: 8px; }
.rd-av { width: 30px; height: 30px; font-size: 11px; border: 2px solid var(--bg); }

.rd-sticky { position: sticky; top: 61px; z-index: 5; background: linear-gradient(var(--bg) 85%, transparent); padding-bottom: 4px; }
.rd-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; margin-bottom: 4px; }
.rd-livebar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rd-golive { box-shadow: 0 0 22px rgba(255, 0, 85, .45); }
.rd-auto { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.rd-auto input { width: auto; accent-color: var(--red); }

.rd-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.rd-chip {
  display: flex; flex-direction: column; padding: 7px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--rule);
  min-width: 96px;
}
.rd-chip span { font-size: 11px; color: var(--muted); font-weight: 500; }
.rd-chip b { font-size: 17px; color: #fff; font-variant-numeric: tabular-nums; font-weight: 600; }
.rd-chip.good b { color: var(--green); }
.rd-chip.warn b { color: var(--amber); }
.rd-chip.bad b { color: var(--red); }

.rd-live { margin-bottom: 14px; }
.rd-livebox {
  display: flex; gap: 24px; align-items: center; padding: 16px 22px; border-radius: 16px;
  background: linear-gradient(120deg, rgba(255, 0, 85, .16), rgba(138, 43, 226, .16)); border: 1px solid rgba(255, 0, 85, .55);
  box-shadow: 0 0 34px rgba(255, 0, 85, .18);
}
.rd-livebox.pre { border-color: rgba(138, 43, 226, .6); background: rgba(138, 43, 226, .12); justify-content: space-between; }
.rd-livecol { flex: 1; min-width: 0; }
.rd-livecol.right { flex: none; text-align: right; }
.rd-label { color: var(--muted); font-size: 12px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.rd-livecol.right .rd-label { justify-content: flex-end; }
.rd-cur { font-size: 26px; font-weight: 700; color: #fff; margin: 4px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-big { font-size: 54px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: #fff; letter-spacing: -0.02em; }
.rd-big.warn { color: var(--amber); }
.rd-big.over { color: var(--red); text-shadow: 0 0 18px rgba(255, 0, 85, .6); }
.rd-late { color: var(--red); }
.rd-ahead { color: var(--green); }

/* Tableau (grille CSS, une ligne par séquence) */
.rd-table { border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; background: var(--panel); outline: none; }
.rd-row { display: grid; align-items: stretch; border-top: 1px solid var(--rule); position: relative; min-height: 42px; }
.rd-row:first-child { border-top: 0; }
.rd-head { background: var(--panel-hi); min-height: 34px; }
.rd-head .rd-cell { color: var(--muted); font-size: 11.5px; font-weight: 600; cursor: default; }
.rd-cell {
  padding: 9px 10px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: cell;
  border-right: 1px solid rgba(36, 28, 51, .55); display: flex; align-items: center; gap: 6px; position: relative;
}
.rd-cell:last-child { border-right: 0; }
.rd-item { border-left: 4px solid var(--c); }
.rd-item:hover { background: rgba(23, 16, 31, .7); }
.rd-item .rd-c-title { color: #fff; font-weight: 500; }
.rd-c-num { color: var(--muted); font-variant-numeric: tabular-nums; cursor: grab; }
.rd-grip { opacity: 0; font-size: 11px; letter-spacing: -2px; margin-right: 2px; }
.rd-row:hover .rd-grip { opacity: .6; }
.rd-c-duration, .rd-c-start, .rd-c-tplus { font-variant-numeric: tabular-nums; justify-content: flex-end; }
.rd-c-start, .rd-c-tplus { color: var(--muted); cursor: default; }
.rd-c-notes { color: var(--muted); font-size: 13px; }
.rd-type {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #fff;
  background: color-mix(in srgb, var(--c) 30%, transparent); border: 1px solid color-mix(in srgb, var(--c) 70%, transparent);
  overflow: hidden; text-overflow: ellipsis;
}
.rd-status { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.rd-st-a_monter { color: var(--amber); background: rgba(255, 176, 32, .12); }
.rd-st-monte { color: #9ec5ff; background: rgba(76, 141, 255, .14); }
.rd-st-pad { color: var(--green); background: rgba(0, 255, 136, .1); }
.rd-fixed { color: var(--purple); font-weight: 700; }

.rd-cursor { box-shadow: inset 0 0 0 2px var(--purple); background: rgba(138, 43, 226, .12); }
.rd-sel { background: rgba(138, 43, 226, .14); }
.rd-editing { padding: 0; overflow: visible; z-index: 3; }
.rd-input {
  width: 100%; height: 100%; min-height: 40px; border-radius: 0; border: 0; box-shadow: inset 0 0 0 2px var(--red);
  background: #120d1d; padding: 8px 10px; font-size: 14px;
}
.rd-notes-edit { position: absolute; top: 0; left: 0; right: 0; min-height: 140px; z-index: 4; box-shadow: 0 0 0 2px var(--red), 0 18px 40px rgba(0, 0, 0, .6); }
.rd-fixtoggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: flex; gap: 2px; align-items: center; font-size: 12px; color: var(--purple); }
.rd-fixtoggle input { width: auto; accent-color: var(--purple); }
.rd-other { box-shadow: inset 0 0 0 2px var(--who); }
.rd-other::after {
  content: attr(data-who); position: absolute; top: -1px; right: -1px; background: var(--who); color: #000; font-size: 9px; font-weight: 700;
  padding: 1px 4px; border-radius: 0 0 0 5px;
}
.rd-drop { box-shadow: inset 0 -3px 0 var(--red); }

/* Antenne : séquence en cours, faite, à venir */
.rd-current { background: linear-gradient(90deg, rgba(255, 0, 85, .2), rgba(255, 0, 85, .04)); }
.rd-current .rd-c-num::before { content: "●"; color: var(--red); margin-right: 4px; animation: rd-blink 1.2s infinite; }
.rd-done { opacity: .45; }
@keyframes rd-blink { 50% { opacity: .25; } }

/* Rubriques */
.rd-block {
  display: flex; align-items: center; gap: 10px; padding: 0 14px 0 8px; min-height: 40px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%); border-left: 4px solid var(--c);
}
.rd-fold { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; width: 22px; }
.rd-btitle { flex: 1; font-weight: 700; color: #fff; font-size: 14px; border: 0; }
.rd-bmeta { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

.rd-shortcuts { margin-top: 12px; line-height: 2; }
kbd {
  font-family: Inter, sans-serif; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 5px; background: var(--panel-hi);
  border: 1px solid var(--rule); color: var(--text);
}
.rd-keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13px; align-items: center; }

dialog.rd-wide { width: min(820px, calc(100vw - 32px)); }
.rd-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.rd-preview { background: #0a0812; border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; }
.rd-prow { display: grid; grid-template-columns: 1fr 70px 110px; gap: 10px; padding: 4px 0; font-size: 13px; border-top: 1px solid var(--rule); }
.rd-typehead { display: flex; gap: 12px; padding: 0 4px 6px; }
.rd-typehead span:first-child { width: 46px; }

/* ------------------------------------------------------------ Vue plateau (plein écran) */

body.plateau-mode { overflow: hidden; }
.plateau { height: 100vh; display: flex; flex-direction: column; padding: 3vh 4vw; }
.pl-top { display: flex; align-items: center; gap: 2vw; }
.pl-top img { height: 4vh; }
.pl-name { flex: 1; font-size: 3vh; font-weight: 600; color: var(--muted); }
.pl-clock { font-size: 5vh; font-weight: 600; font-variant-numeric: tabular-nums; color: #fff; }
.pl-main { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 1.5vh; }
.pl-label { font-size: 2.6vh; color: var(--muted); font-weight: 600; }
.pl-type { align-self: flex-start; font-size: 2.4vh; font-weight: 700; color: #fff; padding: .3vh 1.2vh; border-radius: 99px; background: var(--c); }
.pl-type:empty { display: none; }
.pl-title { font-size: 8vh; font-weight: 700; color: #fff; line-height: 1.05; }
.pl-remain { font-size: 22vh; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; color: #fff; letter-spacing: -0.03em; }
.pl-remain.warn { color: var(--amber); }
.pl-remain.over { color: var(--red); text-shadow: 0 0 40px rgba(255, 0, 85, .6); }
.pl-remain.pre { color: var(--purple); }
.pl-bottom { display: flex; justify-content: space-between; gap: 2vw; font-size: 3.4vh; color: var(--text); font-weight: 500; }

/* ------------------------------------------------------------ Impression (PDF) */

.rd-print { display: none; }
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body.printing { background: #fff !important; color: #000; }
  body.printing > :not(.rd-print) { display: none !important; }
  body.printing .rd-print { display: block; font-family: Inter, sans-serif; color: #111; }
  .rd-print-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid #ff0055; padding-bottom: 8px; margin-bottom: 10px; font-size: 11px; color: #444; }
  .rd-print-head img { height: 26px; filter: invert(1); }
  .rd-print-title { font-size: 20px; font-weight: 700; color: #000; }
  .rd-print table { width: 100%; border-collapse: collapse; font-size: 10.5px; }
  .rd-print th { text-align: left; font-size: 9.5px; color: #666; border-bottom: 1px solid #999; padding: 4px 5px; }
  .rd-print td { padding: 4px 5px; border-bottom: 1px solid #ddd; vertical-align: top; }
  .rd-print tr td:first-child { border-left: 4px solid var(--c, #ccc); }
  .rd-print .p-block td { background: #f0eef5; font-weight: 700; font-size: 11px; border-left: 4px solid #8a2be2; }
  .rd-print .p-title { font-weight: 600; }
  .rd-print .p-duration, .rd-print .p-start, .rd-print .p-tplus, .rd-print .p-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
  .rd-print .p-notes { white-space: pre-wrap; color: #333; }
  .rd-print-foot { margin-top: 10px; font-size: 9px; color: #888; }
}

/* ------------------------------------------------------------ Synthés */

.rd-ttl { overflow: hidden; text-overflow: ellipsis; }
.rd-cg {
  margin-left: auto; flex: none; font-size: 11px; font-weight: 700; text-decoration: none; padding: 1px 7px; border-radius: 6px;
  background: rgba(138, 43, 226, .25); color: #d9c2ff; border: 1px solid rgba(138, 43, 226, .55);
}
.rd-cg:hover { background: rgba(138, 43, 226, .45); }

.sy-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.sy-seg { display: flex; gap: 0; }
.sy-seg .btn { border-radius: 0; }
.sy-seg .btn:first-child { border-radius: 8px 0 0 8px; }
.sy-seg .btn:last-child { border-radius: 0 8px 8px 0; }
.btn.on { background: rgba(138, 43, 226, .35); border-color: var(--purple); color: #fff; }
.sy-search { width: 200px; padding: 6px 10px; font-size: 14px; }
.sy-filter { width: auto; padding: 6px 10px; font-size: 14px; }

.sy-main { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(380px, 1.25fr); gap: 18px; align-items: start; }
.sy-list { min-width: 0; }
.sy-main.wide { grid-template-columns: minmax(0, 1.7fr) minmax(340px, 1fr); }
.sy-group { margin-bottom: 14px; }
.sy-group.focus .sy-gtitle { color: #fff; }
.sy-gtitle { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 0 2px 6px; }
.sy-gtitle .btn { margin-left: auto; padding: 1px 9px; }
.sy-card {
  display: block; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--rule); border-radius: 12px;
  padding: 10px 14px; margin-bottom: 6px; cursor: pointer; border-left: 3px solid var(--purple);
}
.sy-card:hover { border-color: var(--grey); border-left-color: var(--purple); }
.sy-card.on { border-color: var(--red); border-left-color: var(--red); background: var(--panel-hi); }
.sy-l1 { font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sy-l2 { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 1em; }
.sy-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 11.5px; color: var(--grey); }
.sy-st { font-weight: 600; font-size: 11.5px; padding: 1px 8px; border-radius: 6px; }
.sy-brouillon { color: var(--muted); background: var(--panel-hi); }
.sy-a_valider { color: var(--amber); background: rgba(255, 176, 32, .12); }
.sy-valide { color: var(--green); background: rgba(0, 255, 136, .1); }
.sy-diffuse { color: #9ec5ff; background: rgba(76, 141, 255, .14); }
.btn.on.sy-a_valider { background: rgba(255, 176, 32, .2); border-color: var(--amber); color: var(--amber); }
.btn.on.sy-valide { background: rgba(0, 255, 136, .14); border-color: var(--green); color: var(--green); }

.sy-editor { position: sticky; top: 76px; background: var(--panel); border: 1px solid var(--rule); border-radius: 16px; padding: 16px; }
.sy-empty { color: var(--muted); padding: 40px 10px; text-align: center; }
.sy-preview {
  position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; margin-bottom: 12px;
  background: repeating-conic-gradient(#14101c 0% 25%, #0c0a12 0% 50%) 50% / 24px 24px; border: 1px solid var(--rule);
}
.sy-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sy-replay { position: absolute; right: 8px; top: 8px; opacity: .8; }
.sy-status { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.sy-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sy-flabel { display: flex; justify-content: space-between; gap: 10px; }
.sy-count { font-variant-numeric: tabular-nums; color: var(--grey); }
.sy-count.over { color: var(--red); font-weight: 700; }

.sy-listhead { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.sy-listhead select { width: auto; }
.sy-tablewrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 12px; background: var(--panel); }
.sy-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sy-table th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 8px 8px; background: var(--panel-hi); white-space: nowrap; }
.sy-table td { border-top: 1px solid var(--rule); padding: 0; }
.sy-table tr.on td { background: rgba(138, 43, 226, .1); }
.sy-cell { border: 0; border-radius: 0; background: transparent; padding: 9px 8px; min-width: 120px; }
.sy-cell:focus { box-shadow: inset 0 0 0 2px var(--purple); background: #120d1d; }
.sy-cell.over { color: var(--red); }
.sy-table td:nth-last-child(-n+2) { padding: 0 8px; white-space: nowrap; }

@media (max-width: 980px) {
  .sy-main { grid-template-columns: 1fr; }
  .sy-editor { position: static; }
}

/* ------------------------------------------------------------ Régies */
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grey); flex: none; }
.dot.on { background: var(--green); box-shadow: 0 0 10px var(--green); }
.regie-cfg { background: #0a0812; border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; font-size: 12px; overflow-x: auto; }
.rd-regie { display: inline-flex; align-items: center; gap: 6px; }
.sy-air { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; padding: 10px; border-radius: 12px; background: rgba(255, 0, 85, .07); border: 1px solid rgba(255, 0, 85, .3); }
.sy-air input { width: 64px; padding: 5px 8px; font-size: 13px; }
.sy-onair { color: #fff; background: var(--red); border-radius: 6px; padding: 1px 7px; font-size: 11px; font-weight: 700; }

/* ------------------------------------------------------------ Prompteur (écriture) */
.pr-list { display: flex; flex-direction: column; gap: 12px; }
.pr-block { font-weight: 700; color: #fff; padding: 8px 14px; border-radius: 10px; border-left: 4px solid var(--c);
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 28%, transparent), transparent 70%); }
.pr-item { background: var(--panel); border: 1px solid var(--rule); border-left: 4px solid var(--c); border-radius: 12px; padding: 10px 14px 12px; }
.pr-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.pr-num { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; min-width: 22px; }
.pr-title { color: #fff; font-weight: 600; }
.pr-who { color: var(--amber); font-size: 12.5px; font-weight: 600; }
.pr-count { margin-left: auto; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pr-count.over { color: var(--red); font-weight: 700; }
.pr-text { min-height: 70px; font-size: 16px; line-height: 1.55; resize: none; overflow: hidden; background: #0a0812; }

/* ------------------------------------------------------------ FPrompt (le prompteur) */
body.fprompt-mode { overflow: hidden; background: #000; }
.fprompt { --fg: #fff; --bg: #000; position: fixed; inset: 0; background: var(--bg); color: var(--fg); overflow: hidden; user-select: none; }
.fprompt[data-theme="yellow"] { --fg: #ffe14a; }
.fprompt[data-theme="black"] { --fg: #000; --bg: #fff; }
.fp-viewport { position: absolute; inset: 0; overflow: hidden; touch-action: none; }
.fp-content { padding: 0 var(--fp-margin); will-change: transform; }
.fp-pad { height: 100vh; }
.fp-item { margin-bottom: calc(var(--fp-size) * 1.6); }
.fp-head { display: flex; gap: .6em; align-items: center; font-size: calc(var(--fp-size) * .38); font-weight: 700; color: var(--c);
  border-top: 3px solid var(--c); padding-top: .4em; margin-bottom: .5em; opacity: .9; }
.noheaders .fp-head { visibility: hidden; height: 0; margin: 0; padding: 0; border: 0; }
.fp-text { font-size: var(--fp-size); line-height: var(--fp-line); font-weight: 600; letter-spacing: .005em; }
.fp-text p { margin: 0 0 .35em; }
.caps .fp-text { text-transform: uppercase; }
.fp-dir { color: var(--amber); font-size: .62em; font-weight: 700; }
.fp-who { color: var(--cyan); }
.fprompt[data-theme="black"] .fp-who { color: #0060c0; }
.fp-line { position: absolute; left: 0; right: 0; height: 0; pointer-events: none; }
.fp-line::before { content: ""; position: absolute; left: 0; top: -18px; border: 18px solid transparent; border-left: 26px solid var(--red); }
.fp-line::after { content: ""; position: absolute; left: 30px; right: 0; top: 0; border-top: 1px dashed rgba(255, 0, 85, .35); }
.fp-controls {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 8px 14px;
  background: rgba(10, 8, 18, .86); border-top: 1px solid var(--rule); color: var(--text); font-size: 14px; opacity: .25; transition: opacity .2s;
}
.fp-controls:hover, .remote .fp-controls { opacity: 1; }
.fp-title { font-weight: 600; color: #fff; }
.fp-progress, .fp-speed { color: var(--muted); font-variant-numeric: tabular-nums; }
.fp-btn { background: var(--panel-hi); border: 1px solid var(--rule); color: #fff; border-radius: 9px; min-width: 40px; height: 36px; font-size: 15px; cursor: pointer; }
.fp-btn.main { background: var(--accent); border: 0; min-width: 56px; }
.fp-conn { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); }
.fp-conn.on { background: var(--green); }
.fp-settings {
  position: absolute; right: 14px; bottom: 60px; width: min(380px, calc(100vw - 28px)); max-height: calc(100vh - 90px); overflow: auto;
  background: var(--panel-hi); border: 1px solid var(--rule); border-radius: 14px; padding: 14px 16px; color: var(--text); font-size: 14px;
}
.fp-settings h3 { margin-bottom: 10px; }
.fp-row { display: grid; grid-template-columns: 1fr 120px 40px; gap: 8px; align-items: center; padding: 4px 0; }
.fp-row input[type=checkbox] { width: auto; justify-self: start; }
.fp-row select { grid-column: span 2; padding: 5px 8px; font-size: 13px; }
.fp-help { color: var(--muted); font-size: 12px; margin: 10px 0; }

/* Télécommande (téléphone) : grands boutons en bas, texte réduit. */
.remote .fp-controls { flex-wrap: wrap; justify-content: center; padding: 12px; gap: 10px; }
.remote .fp-controls .spacer, .remote .fp-title { display: none; }
.remote .fp-btn { min-width: 64px; height: 56px; font-size: 20px; }
.remote .fp-btn.main { min-width: 90px; }
.remote .fp-speed { width: 100%; text-align: center; }
.remote .fp-controls { background: #0a0812; }
.fp-empty { font-size: calc(var(--fp-size) * .45); color: var(--muted); text-align: center; }
