/* getstreamly — panel admin. Reprend la maquette Claude Design (thème sombre, accent vert). */
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/Geist-latin.woff2) format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/GeistMono-latin.woff2) format('woff2'); }

:root {
  --bg: #0A0A0B; --surface: #111113; --surface-2: #18181B; --surface-3: #27272A; --input: #0D0D0F;
  --line: rgba(255,255,255,0.06); --line-2: rgba(255,255,255,0.08); --line-3: rgba(255,255,255,0.10); --line-hover: rgba(255,255,255,0.16);
  --text: #EDEDEF; --text-2: #D4D4D8; --muted: #A1A1AA; --muted-2: #8A8A93; --faint: #71717A;
  --accent: #3DFF8A; --accent-hover: #8CFFB9; --accent-ink: #052E16; --accent-soft: rgba(61,255,138,0.12); --accent-line: rgba(61,255,138,0.25);
  --warn: #FBBF24; --warn-soft: rgba(251,191,36,0.12); --danger: #FF4D4D; --danger-2: #FF6B6B; --danger-soft: rgba(255,77,77,0.12);
  --radius: 14px; --radius-sm: 10px;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14px/1.45 Geist, Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; } a:hover { color: var(--accent-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .muted-2 { color: var(--muted-2); } .faint { color: var(--faint); }
.ok { color: var(--accent); } .warn { color: var(--warn); } .danger { color: var(--danger-2); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 16px; height: 16px; flex: none; }

/* ---------- Mise en page ---------- */
.app { min-height: 100vh; display: flex; background: radial-gradient(1000px 520px at 70% -20%, rgba(61,255,138,0.07), transparent 60%), var(--bg); }
.sidebar { width: 232px; flex: none; position: sticky; top: 0; height: 100vh; background: rgba(17,17,19,0.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--line); padding: 20px 12px; display: flex; flex-direction: column; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); box-shadow: 0 0 18px rgba(61,255,138,0.4); display: grid; place-items: center; color: var(--accent-ink); }
.search-btn { height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--line-2); border-radius: var(--radius-sm); color: var(--muted-2); font-size: 13px; cursor: pointer; text-align: left; }
.search-btn span { flex: 1; }
kbd { font-family: var(--mono); font-size: 11px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.nav a.active { background: rgba(255,255,255,0.06); color: var(--text); }
.nav .count { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 6px; padding: 0 6px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; margin-top: 8px; border-top: 1px solid var(--line); }
.me .meta { display: flex; flex-direction: column; min-width: 0; flex: 1; color: var(--text); }
.me .meta:hover b { color: var(--accent); }
.stat .bottom { min-width: 0; overflow: hidden; }
.stat .bottom .spark { flex: 0 1 96px; min-width: 40px; }
.stat .big { min-width: 0; }
.me .meta b { font-size: 13px; font-weight: 500; } .me .meta span { font-size: 12px; color: var(--muted-2); }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.main { flex: 1; min-width: 0; padding: 28px 40px 56px; display: flex; flex-direction: column; gap: 28px; max-width: 1360px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.page-head h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.025em; }
.page-head .sub { color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--text); } .crumbs b { color: var(--text); font-weight: 500; }
.mobile-top, .tabbar { display: none; }

/* ---------- Boutons, champs ---------- */
.btn { height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-3); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 500;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; transition: border-color .15s, background .15s; }
.btn:hover { border-color: var(--line-hover); background: #151518; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border: none; font-weight: 600; box-shadow: 0 0 24px rgba(61,255,138,0.25); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--danger-2); border-color: rgba(255,77,77,0.35); background: rgba(255,77,77,0.06); }
.btn.danger:hover { background: var(--danger-soft); border-color: rgba(255,77,77,0.55); }
.btn.solid-danger { background: #E5484D; border: none; color: #fff; font-weight: 600; }
.btn.solid-danger:hover { background: #F25B60; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { height: 44px; font-size: 14px; padding: 0 18px; }
.btn.block { width: 100%; }
.btn.icon { width: 36px; padding: 0; }
.btn.sm.icon { width: 30px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.hint { font-size: 12px; color: var(--muted-2); }
.input, select.input, textarea.input { height: 40px; width: 100%; padding: 0 12px; border-radius: var(--radius-sm); background: var(--input); border: 1px solid var(--line-3); color: var(--text); font-size: 14px; }
textarea.input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.input.mono { font-family: var(--mono); font-size: 13px; }
.input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(61,255,138,0.6); box-shadow: 0 0 0 3px rgba(61,255,138,0.12); }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
.prefixed { position: relative; } .prefixed .input { padding-left: 34px; } .prefixed > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-2); font-family: var(--mono); font-size: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.switch { position: relative; width: 44px; height: 26px; border-radius: 13px; background: var(--surface-3); border: none; cursor: pointer; flex: none; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=color] { width: 100%; height: 40px; padding: 4px; border-radius: var(--radius-sm); background: var(--input); border: 1px solid var(--line-3); }

/* ---------- Cartes ---------- */
.card { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); }
.card.pad { padding: 20px; }
.card.glow { border-color: var(--accent-line); background: linear-gradient(180deg, rgba(61,255,138,0.05), transparent 60%), var(--surface); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { font-size: 15px; font-weight: 600; }
.card-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.section-title h2 { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.tile { background: rgba(255,255,255,0.02); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.tile .k { font-size: 12px; color: var(--muted); }
.tile .v { font-family: var(--mono); font-size: 15px; margin-top: 4px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 12px; min-height: 116px; }
.stat .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; }
.stat .bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.stat .big { font-family: var(--mono); font-size: 28px; font-weight: 500; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.stat .big small { font-size: 13px; color: var(--muted-2); letter-spacing: 0; margin-left: 4px; }
.chip { font-family: var(--mono); font-size: 11px; border-radius: 6px; padding: 2px 7px; border: 1px solid var(--line-3); color: var(--muted); background: rgba(255,255,255,0.03); white-space: nowrap; }
.chip.ok { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.chip.warn { color: var(--warn); border-color: rgba(251,191,36,0.3); background: var(--warn-soft); }
.chip.danger { color: var(--danger-2); border-color: rgba(255,77,77,0.3); background: var(--danger-soft); }
.spark { display: block; overflow: visible; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 6px; padding: 2px 8px; white-space: nowrap; border: 1px solid var(--line-3); }
.badge.live { color: var(--accent); border-color: var(--accent-line); background: rgba(5,46,22,0.6); font-family: var(--mono); }
.badge.plan { color: var(--text-2); background: rgba(255,255,255,0.03); font-weight: 500; }
.badge.lock { color: var(--muted); font-weight: 500; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; display: inline-block; }
.dot.ok { background: var(--accent); } .dot.warn { background: var(--warn); } .dot.danger { background: var(--danger); } .dot.info { background: var(--faint); }
.dot.pulse { animation: gsPulse 1.8s ease-out infinite; }
@keyframes gsPulse { 0% { box-shadow: 0 0 0 0 rgba(61,255,138,0.6); } 70% { box-shadow: 0 0 0 7px rgba(61,255,138,0); } 100% { box-shadow: 0 0 0 0 rgba(61,255,138,0); } }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.status.live { color: var(--accent); font-weight: 600; font-family: var(--mono); background: rgba(5,46,22,0.6); border: 1px solid var(--accent-line); border-radius: 6px; padding: 2px 8px; }
.status.suspended { color: var(--danger-2); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; color: var(--text); border: 1px solid var(--line-3); }
.avatar.lg { width: 58px; height: 58px; font-size: 18px; }

/* ---------- Lives ---------- */
.lives { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.live-card { overflow: hidden; display: flex; flex-direction: column; }
.thumb { position: relative; aspect-ratio: 16 / 9; background: radial-gradient(120% 120% at 30% 0%, rgba(61,255,138,0.16), transparent 60%), #0d1210; border-bottom: 1px solid var(--line); overflow: hidden; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .tl { position: absolute; top: 10px; left: 10px; } .thumb .bl { position: absolute; bottom: 10px; left: 10px; font-size: 11.5px; color: var(--text-2); text-shadow: 0 1px 2px #000; }
.thumb .br { position: absolute; bottom: 10px; right: 10px; font-family: var(--mono); font-size: 12px; background: rgba(5,5,6,0.6); border-radius: 6px; padding: 2px 7px; }
.live-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.who { display: flex; align-items: center; gap: 12px; }
.who .n { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.who .n b { font-weight: 600; font-size: 14px; color: var(--text); } .who .n span { font-size: 12.5px; color: var(--muted); }
.metric-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric { background: rgba(255,255,255,0.02); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.metric .k { font-size: 12px; color: var(--muted); } .metric .v { font-family: var(--mono); font-size: 15px; } .metric .v small { color: var(--muted-2); font-size: 11px; margin-left: 4px; }
.bars { display: flex; gap: 4px; align-items: flex-end; height: 18px; }
.bars i { flex: 1; height: 100%; border-radius: 3px; background: var(--accent); }
.bars i.warn { background: var(--warn); } .bars i.off { background: var(--surface-3); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty b { color: var(--text); font-weight: 600; font-size: 15px; }

/* ---------- Serveur / activité ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.two-col > * { min-width: 0; }
.slots { display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px; }
.slots i { height: 12px; border-radius: 3px; background: var(--surface-3); } .slots i.on { background: var(--accent); box-shadow: 0 0 8px rgba(61,255,138,0.35); }
.meter { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; } .meter > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.meter.warn > i { background: var(--warn); } .meter.danger > i { background: var(--danger); }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; } .kv span:last-child { font-family: var(--mono); color: var(--text-2); }
.feed { display: flex; flex-direction: column; }
.feed .row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13px; }
.feed .row:first-child { border-top: none; }
.feed .row .m { flex: 1; min-width: 0; color: var(--text-2); } .feed .row .t { font-family: var(--mono); font-size: 12px; color: var(--muted-2); white-space: nowrap; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
table.t td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: none; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: rgba(255,255,255,0.02); }
table.t .r { text-align: right; } table.t td.num, table.t th.num { text-align: right; font-family: var(--mono); }
.tabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); flex-wrap: wrap; }
.tabs button { height: 30px; border: none; background: transparent; color: var(--muted); border-radius: 8px; padding: 0 12px; cursor: pointer; font-weight: 500; font-size: 13px; display: inline-flex; gap: 8px; align-items: center; }
.tabs button .n { font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.tabs button.on { background: rgba(255,255,255,0.07); color: var(--text); }
.toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.search { position: relative; min-width: 260px; } .search .input { padding-left: 34px; } .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }
.keycell { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.menu { position: fixed; z-index: 60; min-width: 200px; background: #141417; border: 1px solid var(--line-3); border-radius: 12px; padding: 6px; box-shadow: 0 20px 50px rgba(0,0,0,0.6); }
.menu button { width: 100%; text-align: left; height: 34px; border: none; background: transparent; border-radius: 8px; padding: 0 10px; cursor: pointer; display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--text-2); }
.menu button:hover { background: rgba(255,255,255,0.05); color: var(--text); } .menu button.danger { color: var(--danger-2); } .menu hr { border: none; border-top: 1px solid var(--line); margin: 4px 0; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* ---------- Fiche streamer ---------- */
.profile { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.profile .id { display: flex; gap: 16px; align-items: center; min-width: 0; }
.profile h1 { font-size: 24px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.chart-card .metrics { display: flex; gap: 28px; flex-wrap: wrap; }
.chart-card .metrics div { display: flex; flex-direction: column; gap: 2px; } .chart-card .metrics span { font-size: 12px; color: var(--muted); }
.chart-card .metrics b { font-family: var(--mono); font-size: 18px; font-weight: 500; } .chart-card .metrics b small { font-size: 11px; color: var(--muted-2); margin-left: 4px; }
.chart { width: 100%; height: 240px; display: block; }
.chart text { fill: #71717A; font-family: var(--mono); font-size: 11px; }
.legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--muted); margin-top: 8px; } .legend i { display: inline-block; width: 14px; height: 2px; background: var(--accent); vertical-align: middle; margin-right: 6px; }
.legend i.dash { background: repeating-linear-gradient(90deg, var(--warn) 0 4px, transparent 4px 7px); }
.copy-row { display: flex; align-items: center; gap: 8px; background: var(--input); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 6px 6px 6px 12px; }
.copy-row code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-row { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; }
.link-row .top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; } .link-row .top b { font-weight: 500; display: flex; align-items: center; gap: 8px; }
.link-row .top span { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------- OBS ---------- */
.obs-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.program { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: radial-gradient(100% 100% at 50% 0%, rgba(61,255,138,0.12), transparent 70%), #0B0F0D; border: 1px solid var(--line-2); display: grid; place-items: center; }
.program img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.program .tag { position: absolute; top: 12px; left: 12px; font-family: var(--mono); font-size: 11.5px; background: rgba(5,5,6,0.7); border-radius: 6px; padding: 3px 8px; }
.program .res { position: absolute; bottom: 12px; right: 12px; font-family: var(--mono); font-size: 11.5px; background: rgba(5,5,6,0.7); border-radius: 6px; padding: 3px 8px; }
.scenes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.scene { overflow: hidden; cursor: pointer; display: flex; flex-direction: column; text-align: left; padding: 0; color: inherit; }
.scene.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 30px rgba(61,255,138,0.15); }
.scene .pv { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(160deg, #1E2F3F, #0D0D0F); display: grid; place-items: center; font-weight: 600; color: var(--text-2); font-size: 15px; overflow: hidden; }
.scene .pv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene .pv .badge { position: absolute; top: 8px; left: 8px; background: var(--accent); color: var(--accent-ink); border: none; font-size: 10.5px; letter-spacing: .04em; }
.scene .pv .badge.pre { background: var(--warn); }
.scene .ft { padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.scene .ft b { display: block; font-weight: 600; } .scene .ft span { font-size: 12px; color: var(--muted); }
.scene.new { border-style: dashed; display: grid; place-items: center; min-height: 160px; color: var(--muted); background: transparent; }
.switch-log .row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; color: var(--text-2); } .switch-log .row span:last-child { font-family: var(--mono); color: var(--muted-2); font-size: 12px; }

/* ---------- Éditeur de scènes ---------- */
.editor { display: grid; grid-template-columns: 224px minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.scene-list { padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.scene-list .h { font-size: 11.5px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; padding: 4px 8px 8px; }
.scene-list button { text-align: left; border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.scene-list button:hover { background: rgba(255,255,255,0.03); } .scene-list button.on { border-color: var(--accent-line); background: var(--accent-soft); }
.scene-list button b { display: block; font-weight: 600; } .scene-list button span { font-size: 12px; color: var(--muted); }
.stage-wrap { padding: 14px; }
.stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #12101c; border: 1px dashed var(--line-3); border-radius: 8px; overflow: hidden; user-select: none; }
.stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.stage .box { position: absolute; border: 1px dashed rgba(255,255,255,0.25); cursor: move; }
.stage .box:hover { border-color: rgba(255,255,255,0.5); }
.stage .box.sel { border: 2px solid var(--accent); box-shadow: 0 0 18px rgba(61,255,138,0.4); }
.stage .box .lbl { position: absolute; top: -1px; left: -1px; font-size: 10px; background: rgba(5,5,6,0.8); padding: 1px 5px; border-radius: 0 0 4px 0; white-space: nowrap; color: var(--text-2); }
.stage .box .grip { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; background: var(--accent); border-radius: 3px; cursor: nwse-resize; display: none; }
.stage .box.sel .grip { display: block; }
.sources { display: flex; flex-direction: column; gap: 6px; }
.source { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,0.015); cursor: pointer; }
.source:hover { border-color: var(--line-3); } .source.sel { border-color: var(--accent-line); background: var(--accent-soft); }
.source .ic { width: 28px; height: 28px; border-radius: 7px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.source b { flex: 1; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .source .kind { font-size: 12px; color: var(--muted); }
.source.off b { color: var(--faint); text-decoration: line-through; }
.props { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Modales, toasts, palette ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 480px; background: #121214; border: 1px solid var(--line-3); border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,0.7); animation: gsIn .18s ease-out; max-height: calc(100vh - 32px); overflow: auto; }
.modal.wide { max-width: 640px; }
.modal .mh { padding: 20px 22px 0; } .modal .mh h3 { font-size: 17px; font-weight: 600; } .modal .mh p { color: var(--muted); margin: 6px 0 0; }
.modal .mb { padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal .mf { padding: 0 22px 20px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
@keyframes gsIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.toasts { position: fixed; z-index: 70; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 40px); }
.toast { background: #17171A; border: 1px solid var(--line-3); border-left: 3px solid var(--accent); border-radius: 10px; padding: 10px 14px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); animation: gsIn .18s ease-out; max-width: 420px; }
.toast.error { border-left-color: var(--danger); } .toast.warn { border-left-color: var(--warn); }
.palette { max-width: 560px; align-self: start; margin-top: 12vh; }
.palette .input { height: 48px; border: none; border-bottom: 1px solid var(--line-2); border-radius: 16px 16px 0 0; background: transparent; font-size: 15px; box-shadow: none !important; }
.palette .list { max-height: 50vh; overflow: auto; padding: 6px; }
.palette .item { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; cursor: pointer; color: var(--text-2); }
.palette .item.on, .palette .item:hover { background: rgba(255,255,255,0.06); color: var(--text); } .palette .item span { margin-left: auto; font-size: 12px; color: var(--muted-2); }
.secret { font-family: var(--mono); font-size: 13px; word-break: break-all; background: var(--input); border: 1px solid var(--accent-line); border-radius: 10px; padding: 12px; color: var(--accent); }
.notice { border: 1px solid var(--line-3); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--text-2); background: rgba(255,255,255,0.02); display: flex; gap: 10px; }
.notice.warn { border-color: rgba(251,191,36,0.3); background: var(--warn-soft); } .notice.ok { border-color: var(--accent-line); background: var(--accent-soft); }
.notice.danger { border-color: rgba(255,77,77,0.3); background: var(--danger-soft); }
.loading { display: grid; place-items: center; padding: 80px; color: var(--muted); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-3); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.logs { font-family: var(--mono); font-size: 12px; line-height: 1.6; background: var(--input); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px; max-height: 60vh; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.logs .e { color: var(--danger-2); } .logs .w { color: var(--warn); } .logs time { color: var(--faint); margin-right: 8px; }

/* ---------- Connexion ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(900px 500px at 50% -10%, rgba(61,255,138,0.09), transparent 60%), radial-gradient(700px 400px at 100% 100%, rgba(61,255,138,0.04), transparent 60%), var(--bg); }
.auth-inner { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.auth .brand { font-size: 20px; } .auth .brand-mark { width: 34px; height: 34px; border-radius: 9px; }
.auth-card { width: 100%; padding: 32px; border-radius: 16px; background: rgba(17,17,19,0.85); border: 1px solid var(--line-3); box-shadow: 0 30px 80px rgba(0,0,0,0.5); display: flex; flex-direction: column; gap: 22px; }
.auth-card h1 { font-size: 21px; font-weight: 600; } .auth-card p { margin: 6px 0 0; color: var(--muted); }
.passkey-art { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent); margin: 0 auto; }
.auth-foot { display: flex; gap: 18px; align-items: center; font-size: 12.5px; color: var(--muted-2); flex-wrap: wrap; justify-content: center; }
.auth-err { color: var(--danger-2); font-size: 13px; text-align: center; min-height: 18px; }

/* ---------- Réglages ---------- */
.settings-section { scroll-margin-top: 20px; }
.dns-row td:first-child { font-family: var(--mono); font-size: 13px; }

/* ---------- Mobile ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .obs-grid, .two-col { grid-template-columns: 1fr; }
  .editor { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .main { padding: 8px 16px 96px; gap: 22px; }
  .mobile-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 0 0; }
  .mobile-top .brand { padding: 0; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: rgba(10,10,11,0.92); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line-2); padding: 8px 4px calc(8px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); padding: 4px 0; }
  .tabbar a.active { color: var(--accent); }
  .tabbar svg { width: 20px; height: 20px; }
  .page-head h1 { font-size: 24px; }
  .stat .big { font-size: 24px; }
  .stat { min-height: 0; padding: 14px; gap: 10px; }
  .stat .top { flex-wrap: wrap; font-size: 12.5px; }
  .stat .top .chip { display: none; }
  .stat .bottom { flex-direction: column; align-items: flex-start; }
  .stat .bottom .spark { max-width: 100%; }
  .stat .big small { display: block; margin: 4px 0 0; }
  .lives { grid-template-columns: 1fr; }
  .live-card.compact { flex-direction: row; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .search { min-width: 0; width: 100%; }
  .hide-m { display: none !important; }
  table.t th, table.t td { padding: 10px 12px; }
  .card.pad { padding: 16px; }
  .chart { height: 180px; }
  .slots { grid-template-columns: repeat(10, 1fr); }
  .toasts { left: 16px; right: 16px; bottom: 86px; }
  .invite-row { grid-template-columns: 1fr !important; }
  .profile .actions { width: 100%; } .profile .actions .btn { flex: 1; }
  .obs-grid .program { border-radius: 10px; }
}
