:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #080c14;
  --panel: #121927;
  --text: #f4f7fb;
  --muted: #9aa6b8;
  --accent: #ef4444;
  --line: #263145;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top, #172033 0, var(--bg) 50%); color: var(--text); }
a { color: inherit; }
.centered { display: grid; place-items: center; padding: 20px; }
.login-card { width: min(430px, 100%); padding: 34px; background: rgba(18,25,39,.96); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 80px rgba(0,0,0,.45); }
.login-card h1 { margin: 14px 0 8px; }
.login-card p { color: var(--muted); }
.ball-mark { display: inline-flex; padding: 7px 10px; border-radius: 999px; background: var(--accent); font-weight: 800; letter-spacing: .08em; font-size: 12px; }
label { display: block; margin: 24px 0 8px; font-weight: 700; }
input { width: 100%; padding: 14px 15px; border: 1px solid #38465f; border-radius: 12px; background: #0b111d; color: var(--text); font-size: 18px; }
button, .link-button { border: 0; border-radius: 12px; background: #f4f7fb; color: #111827; padding: 12px 17px; font-weight: 800; cursor: pointer; text-decoration: none; }
form button { width: 100%; margin-top: 16px; }
.error { color: #fca5a5 !important; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(16px, 4vw, 56px); border-bottom: 1px solid var(--line); background: rgba(8,12,20,.86); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.topbar h1 { font-size: clamp(20px, 3vw, 30px); margin: 0; }
.topbar p { margin: 4px 0 0; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-weight: 800; }
.status span { width: 10px; height: 10px; border-radius: 50%; background: #64748b; }
.status.online span { background: #22c55e; box-shadow: 0 0 14px #22c55e; }
.status.offline { color: var(--muted); }
.viewer-shell { width: min(1500px, 100%); margin: 0 auto; padding: clamp(12px, 3vw, 32px); }
.video-frame { position: relative; background: #000; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; aspect-ratio: 16/9; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.offline-panel { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 20px; background: linear-gradient(135deg, rgba(7,12,21,.92), rgba(19,29,45,.88)); }
.offline-panel[hidden] { display: none; }
.offline-panel span { color: var(--muted); }
.viewer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.viewer-actions span { color: var(--muted); margin-left: auto; }
footer { color: var(--muted); text-align: center; padding: 10px 20px 28px; }
.admin-grid { width: min(1100px, 100%); margin: 0 auto; padding: 28px; display: grid; gap: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.panel h2 { margin-top: 0; }
.copy-row { display: flex; gap: 10px; align-items: stretch; }
.copy-row code { flex: 1; overflow-wrap: anywhere; padding: 14px; background: #090f19; border: 1px solid var(--line); border-radius: 10px; }
.hint { color: var(--muted); }
dl div { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
dt { color: var(--muted); }
@media (max-width: 650px) {
  .topbar { align-items: flex-start; }
  .copy-row { flex-direction: column; }
  .viewer-actions span { width: 100%; margin-left: 0; }
}

/* HomeStream v1.8 — régie multi-événements */
.header-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.secondary-button { background:#25334a; color:#e7efff; }
.danger-button { background:#692b36; color:#fff; }
.admin-grid { width:min(1260px,100%); grid-template-columns:repeat(2,minmax(0,1fr)); }
.full-span { grid-column:1/-1; }
.active-event-panel { background:linear-gradient(145deg,#14243a,#121927); }
.eyebrow { font-weight:800; letter-spacing:.11em; color:#80c4ff; font-size:12px; }
.event-form label { font-size:13px; margin:12px 0 7px; color:#dbe8fa; }
.event-form input, .secret-row input { font-size:15px; min-width:0; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.event-form button { width:auto; }
.secret-row { display:flex; gap:8px; align-items:stretch; }
.secret-row input { flex:1; }
.event-list { display:grid; gap:18px; }
.event-card { border:1px solid #2c3850; border-radius:15px; padding:18px; background:#0c1421; }
.event-selected { border-color:#3d8abb; }
.event-heading { display:flex; gap:12px; flex-wrap:wrap; align-items:center; margin-bottom:8px; }
.event-heading strong { font-size:19px; }
.event-live { color:#c8f9d7; background:#17613d; border-radius:8px; padding:5px 9px; font-size:11px; font-weight:800; }
.event-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:16px; }
.event-actions form { margin:0; }
.event-form > button { margin-top:14px; }
@media (max-width:800px) { .admin-grid { grid-template-columns:1fr; padding:14px; } .full-span { grid-column:auto; } .form-grid { grid-template-columns:1fr; } }
@media (max-width:490px) { .secret-row { flex-wrap:wrap; } .secret-row input { flex-basis:100%; } .header-actions { margin-top:10px; } }
