/* ============================================================
   JellyParty — thème commun (accueil, console hôte, room)
   ============================================================ */
:root {
  --bg: #08080c;
  --bg2: #0e0e15;
  --surface: rgba(255,255,255,.045);
  --surface2: rgba(255,255,255,.08);
  --surface3: rgba(255,255,255,.12);
  --line: rgba(255,255,255,.08);
  --line2: rgba(255,255,255,.16);
  --txt: #f2f2f7;
  --muted: #9b9cb0;
  --dim: #6c6d80;
  --accent: #8b5cf6;
  --accent-2: #ec4899;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #d946ef 55%, #ec4899 100%);
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --red: #e50914;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px rgba(0,0,0,.55);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--txt); font-family: var(--font); -webkit-font-smoothing: antialiased; }
input, button, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: rgba(139,92,246,.45); }

/* Fond « ambiance salle de cinéma » */
.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.ambient::before, .ambient::after { content: ''; position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(110px); opacity: .22; }
.ambient::before { background: #7c3aed; top: -25vmax; left: -15vmax; }
.ambient::after { background: #db2777; bottom: -30vmax; right: -20vmax; opacity: .16; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.3px; text-decoration: none; }
.logo .mark { width: 32px; height: 32px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 6px 20px rgba(217,70,239,.35); }
.logo .mark svg { width: 18px; height: 18px; fill: #fff; margin-left: 2px; }
.logo .word span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: var(--radius-sm); padding: 10px 16px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; transition: transform .12s, filter .15s, background .15s, border-color .15s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(217,70,239,.25); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { background: var(--surface2); color: var(--txt); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface3); border-color: var(--line2); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { padding: 14px 22px; font-size: 16px; border-radius: 12px; }
.btn svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }

/* Champs */
.field { width: 100%; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 14px; color: var(--txt); outline: none; transition: border-color .15s, background .15s, box-shadow .15s; }
.field::placeholder { color: var(--dim); }
.field:focus { border-color: rgba(139,92,246,.7); background: rgba(255,255,255,.07); box-shadow: 0 0 0 3px rgba(139,92,246,.18); }
select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%239b9cb0'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 20px; padding-right: 34px; }
select.field option { background: #16161f; }

/* Cartes / verre */
.glass { background: rgba(20,20,30,.6); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }

/* Avatars */
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0; text-transform: uppercase; }

/* Pastille d'état */
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 99px; background: var(--surface2); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); font-weight: 500; }
.pill .led { width: 7px; height: 7px; border-radius: 50%; background: var(--err); box-shadow: 0 0 0 3px rgba(248,113,113,.18); }
.pill.ok .led { background: var(--ok); box-shadow: 0 0 0 3px rgba(52,211,153,.18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(52,211,153,.05); } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: rgba(24,24,34,.95); border: 1px solid var(--line2); padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 200; box-shadow: var(--shadow); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Barres de défilement discrètes */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.muted { color: var(--muted); }
.fade-in { animation: fadeIn .35s ease-out both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
