/* RSCL LIVE – thème */
:root {
  --red: #d71920;
  --red-soft: #f18a8e;
  --bg: #09090c;
  --panel: #17171d;
  --field: #0e0e12;
  --line: #383840;
  --text: #f7f7f8;
  --muted: #aaaab2;
  --ok: #8ee0a2;
  --err-bg: #281416;
  --err: #ffb3b6;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--red-soft); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Marque */
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.mark { width: 48px; height: 48px; border-radius: 13px; background: var(--red); color: #fff;
  display: grid; place-items: center; font-size: 25px; flex-shrink: 0; }
.mark.sm { width: 34px; height: 34px; border-radius: 9px; font-size: 17px; }
.brand-name { font-weight: 800; letter-spacing: 3px; }
.brand-sub { color: #999; font-size: 11px; letter-spacing: 3px; }
.tag { color: var(--red-soft); font-size: 12px; letter-spacing: 2px; font-weight: 700; margin: 0 0 6px; }

/* Cartes (connexion, invitation, messages) */
body.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 26px; }
.card h1 { margin: 0 0 8px; font-size: 25px; line-height: 1.25; }
.card p { margin: 10px 0 0; }

form { display: grid; gap: 14px; margin-top: 18px; }
label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
input, select { width: 100%; padding: 12px 13px; border-radius: 10px; border: 1px solid #555;
  background: var(--field); color: var(--text); font: inherit; }
input:focus, select:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: transparent; }
button { padding: 12px 16px; border: 0; border-radius: 12px; background: var(--red); color: #fff;
  font: inherit; font-weight: 700; cursor: pointer; }
button:hover { filter: brightness(1.1); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.big { padding: 15px; font-size: 17px; }
button.ghost { background: #303039; border: 1px solid #50505a; color: var(--text); font-weight: 600; }
button.danger { background: #4b171a; border: 1px solid #7a2a2f; }
button.small { font-size: 13px; padding: 6px 10px; border-radius: 9px; }
.error { background: var(--err-bg); border: 1px solid #66383b; color: var(--err); padding: 10px 12px; border-radius: 10px; }

/* Barre du haut */
.bar { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: #111;
  border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.bar form { margin: 0; display: block; }
.bar button.ghost { padding: 7px 12px; font-size: 14px; }
.spacer { flex: 1; }

/* Lecteur */
.player-wrap { max-width: 1200px; margin: 0 auto; padding: 18px; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 20px; color: var(--muted); background: rgba(0,0,0,.6); pointer-events: none; }
.unmute { position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); }
.status { margin: 12px 2px; font-weight: 700; }
.status.live { color: #ff4a52; }
.status.offline { color: var(--muted); }

/* Studio */
.studio-grid { max-width: 1280px; margin: 0 auto; padding: 18px; display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px;
  display: grid; gap: 14px; align-content: start; }
.panel.wide { grid-column: 1 / -1; }
.panel.dim > :not(.tag):not(h2):not(#invList) { opacity: .55; }
.panel h2 { margin: 0; font-size: 22px; }
.panel p { margin: 0; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.row > label { flex: 1 1 220px; }
.row.nowrap { flex-wrap: nowrap; }
.row.nowrap input { flex: 1; min-width: 0; font-size: 14px; }
.stat { display: inline-block; background: #282830; border-radius: 9px; padding: 8px 11px; color: #ddd; font-size: 13px; }
.stat.on { background: #3a1416; color: #ffb3b6; font-weight: 700; }
.newinvite { border: 1px solid var(--red); border-radius: 13px; padding: 12px; display: grid; gap: 8px; background: #111116; }
.invlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.invlist li { display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border: 1px solid #444; border-radius: 13px; background: #111116; }
.invlist li.empty { border-style: dashed; }
.invlist li > div { flex: 1; min-width: 0; }
.badge { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.badge.available { color: var(--ok); background: #15301f; }
.badge.used { color: #ff9a9a; background: #3a1416; }
.badge.revoked, .badge.expired { color: #aaa; background: #282830; }

.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #f4f4f4; color: #111;
  padding: 11px 16px; border-radius: 12px; max-width: 90%; z-index: 5; font-weight: 600; }
