/* GA-Visio — identité GA Community v2 (bleu nuit, cyan, lime ; Plus Jakarta Sans).
   Aucune mise en forme en ligne : la politique de sécurité du contenu les refuse. */

@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("/assets/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("/assets/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ga-navy: #002a50;
  --ga-cyan: #009fe3;
  --ga-cyan-strong: #0076a8;
  --ga-lime: #96c11f;
  --danger: #e5484d;
  --danger-solid: #c53e42;
  --bg: #f3f6fa;
  --surface: #ffffff;
  --border: #e3eaf3;
  --border-strong: #cdd8e6;
  --text: #0e2440;
  --text-2: #3d4f68;
  --text-3: #5f7087;
  --shadow: 0 10px 30px -14px rgba(14, 36, 64, 0.22), 0 1px 3px rgba(14, 36, 64, 0.05);
  --shadow-lg: 0 28px 60px -20px rgba(4, 16, 32, 0.45);
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--ga-cyan) 50%, transparent);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* Monde sombre : salle et écran d'entrée. */
  --night: #04121f;
  --night-2: #0a2036;
  --ink: #eef4fb;
  --ink-2: #a8b9cd;
  --line: rgba(255, 255, 255, 0.1);
  --veil: rgba(255, 255, 255, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.12; letter-spacing: -0.025em; font-weight: 750; }
h2 { font-size: 18px; line-height: 1.25; letter-spacing: -0.01em; font-weight: 700; }
h3 { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: inherit; opacity: 0.7; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: var(--ga-cyan-strong); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.muted { color: var(--text-3); font-size: 14px; }
.fine { font-size: 13px; }
.lead { color: var(--text-2); font-size: 17px; max-width: 54ch; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ga-cyan-strong); }
.empty { color: var(--text-3); font-size: 14px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; letter-spacing: 0.02em; }
.lucide { flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Mise en page générale ---------- */
.page { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px clamp(16px, 3vw, 40px); }
.topbar-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.topbar-name { margin-right: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ga-navy); border-radius: 12px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #fff; background: linear-gradient(135deg, var(--ga-navy), var(--ga-cyan)); }
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
.center { flex: 1; display: grid; place-items: center; padding: 24px 16px; min-height: 60dvh; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow); padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------- Boutons et champs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: 999px;
  border: 1px solid transparent; font-weight: 650; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 140ms var(--ease), border-color 140ms var(--ease), transform 140ms var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-primary { background: var(--ga-cyan-strong); color: #fff; }
.btn-primary:hover { background: #00638d; }
.btn-secondary { background: var(--surface); color: var(--ga-navy); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--ga-navy); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: color-mix(in srgb, var(--ga-navy) 7%, transparent); }
/* Sur fond sombre. */
.btn-quiet { background: var(--veil); color: var(--ink); }
.btn-quiet:hover { background: rgba(255, 255, 255, 0.16); }
.btn-danger { background: var(--danger-solid); color: #fff; }
.btn-lg { min-height: 54px; padding: 12px 28px; font-size: 16px; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 13px; }
.btn.danger { color: #ff9aa0; }
.btn.armed { background: var(--danger-solid); color: #fff; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; border: 0; background: transparent; color: inherit; cursor: pointer; flex: none; }
.icon-btn:hover { background: color-mix(in srgb, currentColor 16%, transparent); }
.icon-btn.solid { background: var(--ga-cyan-strong); color: #fff; width: 44px; height: 44px; }
.icon-btn.accept { background: var(--ga-lime); color: var(--ga-navy); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.field input, .field select { min-height: 46px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 16px; font-weight: 400; color: var(--text); width: 100%; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 14px; background: color-mix(in srgb, var(--ga-cyan) 10%, #fff); color: var(--ga-navy); }
.notice-danger { background: color-mix(in srgb, var(--danger) 10%, #fff); color: #8f2b2f; }
.notice-warning { background: color-mix(in srgb, #f59e0b 14%, #fff); color: #6f4705; }

/* ---------- Connexion ---------- */
.login, .home-page {
  background:
    radial-gradient(900px 480px at 96% -8%, #d9efff 0%, transparent 62%),
    radial-gradient(760px 460px at -8% 104%, #ecf7d6 0%, transparent 58%), var(--bg);
}
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(100%, 460px); }
.dev-login { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ---------- Accueil ---------- */
.home { width: min(100%, 980px); margin: 0 auto; padding: clamp(24px, 7vh, 72px) clamp(16px, 3vw, 40px) 56px; display: flex; flex-direction: column; gap: clamp(32px, 6vh, 56px); }
.intro { display: flex; flex-direction: column; gap: 18px; }
.intro h1 { font-size: clamp(34px, 5.4vw, 60px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; }
.accent { background: linear-gradient(95deg, var(--ga-navy) 0%, var(--ga-cyan) 55%, #6fa80f 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.launch {
  display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-top: 10px; padding: 10px; border-radius: 26px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.launch-form { display: flex; align-items: center; gap: 8px; flex: 1 1 320px; min-width: 0; }
.launch-form input { flex: 1; min-width: 0; min-height: 46px; padding: 8px 16px; border: 0; border-radius: 999px; background: transparent; font-size: 16px; }
.launch-form input::placeholder { color: var(--text-3); }
.launch-form input:focus-visible { background: var(--bg); }
.launch-or { color: var(--text-3); font-size: 13px; padding: 0 2px; }
.recent { display: flex; flex-direction: column; gap: 12px; }
.meeting-row { padding: 14px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.meeting-main { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.meeting-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 240px; text-decoration: none; color: inherit; border-radius: 10px; }
.meeting-text:hover .meeting-title { color: var(--ga-cyan-strong); }
.meeting-title { overflow-wrap: anywhere; }
.meeting-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.presence { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px 16px; }
.presence-list { display: flex; flex-direction: column; gap: 6px; }
.presence-list li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.presence-name { font-weight: 600; overflow-wrap: anywhere; }
.ended { width: min(100%, 520px); display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }

/* ---------- Médias ---------- */
.media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.media.mirror { transform: scaleX(-1); }
.media.contain { object-fit: contain; }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; font-weight: 750; font-size: 15px; flex: none; }
.tint-0 { background: #0076a8; } .tint-1 { background: #3764e5; } .tint-2 { background: #6858e9; }
.tint-3 { background: #b84d35; } .tint-4 { background: #557811; } .tint-5 { background: #0a7c7b; }
.glass {
  background: rgba(10, 30, 52, 0.66); -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); color: var(--ink);
}
.status { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--ga-lime); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(150, 193, 31, 0.55); } 50% { box-shadow: 0 0 0 9px rgba(150, 193, 31, 0); } }

/* ---------- Avant d'entrer (monde sombre : on est déjà presque dans la salle) ---------- */
.lobby { background: radial-gradient(1100px 620px at 78% -10%, #0e3355 0%, transparent 62%), var(--night); color: var(--ink); }
.lobby .brand { color: #fff; }
.lobby .muted { color: var(--ink-2); }
.lobby .eyebrow { color: #5cc8f5; }
.lobby .btn-ghost { color: var(--ink-2); }
.lobby .btn-ghost:hover { background: var(--veil); }
.lobby-main {
  flex: 1; width: min(100%, 1120px); margin: 0 auto; padding: 8px clamp(16px, 3vw, 40px) 48px;
  display: grid; gap: clamp(24px, 5vw, 64px); grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: center;
}
.preview { position: relative; aspect-ratio: 16 / 10; border-radius: 28px; overflow: hidden; background: var(--night-2); box-shadow: var(--shadow-lg); display: grid; place-items: center; border: 1px solid var(--line); }
.preview-off { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--ink-2); }
.preview-off .avatar { width: 96px; height: 96px; font-size: 34px; }
.preview-bar { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 999px; background: rgba(4, 18, 31, 0.6); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--line); }
.meter { display: flex; align-items: flex-end; gap: 3px; height: 22px; padding-left: 4px; }
.meter span { width: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.22); transition: background 90ms linear; }
.meter span:nth-child(1) { height: 30%; } .meter span:nth-child(2) { height: 48%; } .meter span:nth-child(3) { height: 66%; }
.meter span:nth-child(4) { height: 84%; } .meter span:nth-child(5) { height: 100%; }
.meter span.on { background: var(--ga-lime); }
.meter.muted { opacity: 0.4; }
.lobby-side { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; min-width: 0; }
.lobby-side h1 { font-size: clamp(28px, 3.6vw, 42px); overflow-wrap: anywhere; }
.waiting-card { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 18px 20px; border-radius: 20px; background: var(--veil); border: 1px solid var(--line); }

/* ---------- Salle ---------- */
.room {
  --pad-top: 62px; --pad-bottom: 96px; --panel-w: 0px;
  position: fixed; inset: 0; overflow: hidden; color: var(--ink);
  background: radial-gradient(1200px 700px at 50% -20%, #0d2c4a 0%, transparent 60%), var(--night);
}
.room.with-panel { --panel-w: 376px; }
/* Sans geste, les commandes s'effacent et l'image prend toute la place. */
.room.idle { --pad-top: 12px; --pad-bottom: 12px; cursor: none; }
.chrome { transition: opacity 260ms var(--ease), transform 260ms var(--ease); }
.room.idle .chrome { opacity: 0; }
.room.idle .chrome:focus-within { opacity: 1; }
.room-top { position: absolute; top: 0; left: 0; right: var(--panel-w); z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; min-width: 0; }
.room.idle .room-top { transform: translateY(-8px); }
.room-id { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.room-title { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.room-time { color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; flex: none; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--veil); color: var(--ink-2); cursor: pointer; font-size: 13px; flex: none; }
.chip:hover { color: var(--ink); background: rgba(255, 255, 255, 0.14); }

.stage {
  position: absolute; inset: 0; padding: var(--pad-top) calc(var(--panel-w) + 12px) var(--pad-bottom) 12px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-height: 0;
  transition: padding 320ms var(--ease);
}
.tiles { --cols: 1; position: relative; display: grid; gap: 10px; min-height: 0; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); }
.tiles[data-count="2"], .tiles[data-count="3"], .tiles[data-count="4"] { --cols: 2; }
.tiles[data-count="5"], .tiles[data-count="6"], .tiles[data-count="7"], .tiles[data-count="8"], .tiles[data-count="9"] { --cols: 3; }
.tiles[data-count="10"], .tiles[data-count="11"], .tiles[data-count="12"] { --cols: 4; }
.tile { position: relative; border-radius: 20px; overflow: hidden; min-height: 0; min-width: 0; display: grid; place-items: center; background: radial-gradient(120% 120% at 50% 0%, #12314f 0%, var(--night-2) 70%); }
/* Anneau de parole : dessiné à l'intérieur, donc jamais rogné. */
.tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 0 transparent; transition: box-shadow 160ms var(--ease); }
.tile.speaking::after { box-shadow: inset 0 0 0 3px var(--ga-cyan), inset 0 0 28px rgba(0, 159, 227, 0.35); }
.tile.hand-up::after { box-shadow: inset 0 0 0 3px var(--ga-lime); }
.tile-off .avatar { width: clamp(56px, 13vmin, 120px); height: clamp(56px, 13vmin, 120px); font-size: clamp(20px, 4.6vmin, 42px); }
.tile-label { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 20px); padding: 4px 10px; border-radius: 999px; background: rgba(4, 16, 32, 0.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 13px; font-weight: 600; color: #fff; }
.tile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-muted { display: inline-flex; color: #ff9aa0; }
.tile-hand { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ga-lime); color: var(--ga-navy); }
.tile-pin { position: absolute; top: 10px; left: 10px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(4, 16, 32, 0.6); color: #fff; opacity: 0; transition: opacity 140ms var(--ease); }
.tile:hover .tile-pin, .tile-pin:focus-visible, .tile-pin[aria-pressed="true"] { opacity: 1; }
.tile-pin[aria-pressed="true"] { background: var(--ga-cyan); color: #04213a; }
.tile-reactions { position: absolute; left: 14px; bottom: 46px; display: flex; gap: 4px; pointer-events: none; }
.reaction { font-size: 36px; line-height: 1; animation: rise 4s ease-out forwards; }
@keyframes rise { 0% { transform: translateY(12px) scale(0.6); opacity: 0; } 12% { transform: translateY(0) scale(1); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-72px) scale(1); opacity: 0; } }

/* Seul : rien à épingler. */
.stage[data-layout="solo"] .tile-pin { display: none; }
/* À deux : l'autre en grand, soi-même en vignette. */
.stage[data-layout="duo"] .tiles { display: block; }
.stage[data-layout="duo"] .tile { position: absolute; inset: 0; }
.stage[data-layout="duo"] .tile.me { inset: auto 16px 16px auto; width: clamp(150px, 19vw, 270px); height: auto; aspect-ratio: 16 / 10; z-index: 2; border: 1px solid rgba(255, 255, 255, 0.16); box-shadow: var(--shadow-lg); border-radius: 16px; }
.stage[data-layout="duo"] .tile.me .tile-pin, .stage[data-layout="duo"] .tile.me .tile-label { display: none; }
.stage[data-layout="duo"] .tile.me .avatar { width: 48px; height: 48px; font-size: 18px; }
/* Focus : un écran ou une personne au centre, les autres en bandeau. */
.stage[data-layout="focus"] { grid-template-columns: minmax(0, 1fr) 208px; }
.focus { position: relative; min-height: 0; min-width: 0; border-radius: 20px; overflow: hidden; background: #000; display: grid; }
.focus > .tile { border-radius: 0; }
.stage[data-layout="focus"] .tiles { --cols: 1; grid-auto-rows: 124px; align-content: start; overflow-y: auto; scrollbar-width: none; }
.stage[data-layout="focus"] .tiles:empty { display: none; }

.invite { position: absolute; left: calc((100% - var(--panel-w)) / 2); bottom: calc(var(--pad-bottom) + 28px); transform: translateX(-50%); z-index: 3; width: min(calc(100% - 32px), 420px); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 22px; border-radius: 24px; text-align: center; }
.invite-title { font-size: 18px; font-weight: 750; }
.invite-text { color: var(--ink-2); font-size: 14px; }

.knock { position: absolute; top: calc(var(--pad-top) + 10px); left: calc((100% - var(--panel-w)) / 2); transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 8px 8px 8px 12px; border-radius: 999px; max-width: calc(100% - 24px); font-size: 14px; animation: drop 320ms var(--ease); }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -10px); } }
.stack { display: inline-flex; }
.stack .avatar { width: 28px; height: 28px; font-size: 11px; border: 2px solid #0b2238; }
.stack .avatar + .avatar { margin-left: -10px; }
.knock-text { font-weight: 600; }
.hint { position: absolute; left: calc((100% - var(--panel-w)) / 2); bottom: 104px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 14px; white-space: nowrap; animation: drop 240ms var(--ease); }
kbd { font: inherit; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: rgba(255, 255, 255, 0.16); border: 1px solid var(--line); }

/* Barre de commandes flottante */
.dock { position: absolute; left: calc((100% - var(--panel-w)) / 2); bottom: 18px; transform: translateX(-50%); z-index: 8; display: flex; align-items: center; gap: 8px; padding: 9px; border-radius: 999px; }
.room.idle .dock { transform: translate(-50%, 14px); }
.dock-sep { width: 1px; height: 26px; background: var(--line); margin: 0 2px; }
.ctl { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; background: var(--veil); color: var(--ink); transition: background 140ms var(--ease), transform 140ms var(--ease); }
.ctl:hover { background: rgba(255, 255, 255, 0.18); }
.ctl:active { transform: scale(0.94); }
.ctl.off { background: var(--danger-solid); color: #fff; }
.ctl.active { background: var(--ga-cyan); color: #04213a; }
.ctl.leave { background: var(--danger-solid); color: #fff; width: 62px; border-radius: 999px; }
.ctl.leave:hover { background: #a93237; }
/* Infobulle : nom de la commande et raccourci clavier. */
[data-tip]::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translate(-50%, 4px); padding: 5px 10px; border-radius: 8px; background: #061726; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 120ms var(--ease), transform 120ms var(--ease); }
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.chip[data-tip]::after { bottom: auto; top: calc(100% + 8px); left: auto; right: 0; transform: none; }
.count { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; font-weight: 750; background: var(--ga-lime); color: var(--ga-navy); }
.count.neutral { background: #24486f; color: var(--ink); }
.popover-anchor { position: relative; display: flex; }
.reactions-menu, .leave-menu { position: absolute; bottom: calc(100% + 16px); left: 50%; transform: translateX(-50%); z-index: 9; display: flex; gap: 2px; padding: 6px; border-radius: 999px; animation: drop 180ms var(--ease); }
.reactions-menu button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; font-size: 24px; cursor: pointer; transition: transform 120ms var(--ease); }
.reactions-menu button:hover { transform: scale(1.25); }
.leave-menu { left: auto; right: 0; transform: none; flex-direction: column; gap: 6px; padding: 10px; border-radius: 20px; }
@keyframes drop-right { from { opacity: 0; } }
.leave-menu { animation-name: drop-right; }

/* Panneau latéral */
.panel { display: none; }
.with-panel .panel { position: absolute; top: 12px; right: 12px; bottom: 12px; width: 364px; z-index: 7; display: flex; flex-direction: column; min-height: 0; border-radius: 24px; overflow: hidden; }
.panel-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 12px 8px 20px; }
.panel-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 4px 20px 18px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #24486f transparent; }
.panel .empty { color: var(--ink-2); }
.panel-footer { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.chat { padding-bottom: 14px; overflow: hidden; }
.chat-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; scrollbar-width: none; }
.chat-message { align-self: flex-start; max-width: 88%; display: flex; flex-direction: column; gap: 3px; }
.chat-meta { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--ink-2); padding: 0 6px; }
.chat-meta strong { color: var(--ink); font-size: 13px; }
.chat-message p { padding: 8px 13px; border-radius: 6px 18px 18px 18px; background: var(--veil); overflow-wrap: anywhere; white-space: pre-wrap; font-size: 15px; }
.chat-message.mine { align-self: flex-end; align-items: flex-end; }
.chat-message.mine p { border-radius: 18px 6px 18px 18px; background: var(--ga-cyan-strong); color: #fff; }
.chat-message.mine .chat-meta strong { display: none; }
.chat-form { display: flex; gap: 8px; align-items: center; }
.chat-form input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--veil); font-size: 16px; color: var(--ink); }
.chat-form input::placeholder { color: var(--ink-2); }
.people ul { display: flex; flex-direction: column; gap: 4px; }
.person { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 8px; margin: 0 -8px; border-radius: 14px; }
.person:hover { background: rgba(255, 255, 255, 0.05); }
.person.speaking .avatar { box-shadow: 0 0 0 2px var(--ga-cyan); }
.person-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; flex: 1 1 120px; }
.person-name { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; min-width: 0; }
.person > .person-name { flex: 1 1 120px; }
.person-meta { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.talk { appearance: none; -webkit-appearance: none; width: 120px; max-width: 100%; height: 3px; border: 0; border-radius: 2px; background: var(--line); overflow: hidden; display: block; }
.talk::-webkit-progress-bar { background: var(--line); }
.talk::-webkit-progress-value { background: var(--ga-cyan); border-radius: 2px; }
.talk::-moz-progress-bar { background: var(--ga-cyan); border-radius: 2px; }
.person-state { display: flex; gap: 6px; align-items: center; }
.person-state .hand { color: var(--ga-lime); display: inline-flex; }
.person-state .muted-mic { color: #ff9aa0; display: inline-flex; }
/* Les actions d'organisateur n'apparaissent qu'au survol ou au clavier : la liste reste calme. */
.person { position: relative; }
.person-actions {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: flex; gap: 4px; align-items: center; padding: 4px;
  border-radius: 999px; background: #143352; box-shadow: -14px 0 14px -6px #0c2340; opacity: 0; pointer-events: none; transition: opacity 140ms var(--ease);
}
.person:hover .person-actions, .person:focus-within .person-actions { opacity: 1; pointer-events: auto; }
.person-actions.always { position: static; transform: none; padding: 0; background: none; box-shadow: none; opacity: 1; pointer-events: auto; }
.waiting { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 18px; background: rgba(150, 193, 31, 0.12); border: 1px solid rgba(150, 193, 31, 0.32); }
.waiting-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.toast { position: fixed; left: 50%; bottom: 108px; transform: translateX(-50%); z-index: 20; display: flex; align-items: center; gap: 10px; max-width: min(92vw, 520px); padding: 10px 10px 10px 16px; border-radius: 16px; background: #0b2238; color: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: 14px; }
.audio-sink { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Petits écrans ---------- */
@media (max-width: 820px) {
  .lobby-main { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 24px; }
  .lobby-side { align-items: stretch; }
  .preview { aspect-ratio: 4 / 3; }
  .topbar-name { display: none; }
  .launch { border-radius: 22px; }
  .launch-or { display: none; }
  .room { --pad-top: 54px; --pad-bottom: 84px; }
  .room.with-panel { --panel-w: 0px; }
  /* Le panneau devient une feuille glissante au-dessus de la réunion. */
  .with-panel .panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: min(74dvh, 640px); border-radius: 24px 24px 0 0; z-index: 15; padding-bottom: env(safe-area-inset-bottom); }
  .dock { left: 8px; right: 8px; bottom: calc(10px + env(safe-area-inset-bottom)); transform: none; justify-content: space-between; gap: 4px; padding: 7px; }
  .room.idle .dock { transform: translateY(14px); }
  .dock-sep { display: none; }
  .ctl { width: 42px; height: 42px; }
  .ctl.leave { width: 50px; }
  [data-tip]::after { display: none; }
  .room-top { padding: 10px 12px; }
  .stage { padding-left: 8px; padding-right: 8px; gap: 8px; }
  .tiles { gap: 8px; }
  .tiles[data-count="2"] { --cols: 1; }
  .tiles[data-count="5"], .tiles[data-count="6"] { --cols: 2; }
  .tiles[data-count="10"], .tiles[data-count="11"], .tiles[data-count="12"] { --cols: 3; }
  .stage[data-layout="duo"] .tile.me { inset: 10px 10px auto auto; width: 104px; aspect-ratio: 3 / 4; }
  .stage[data-layout="focus"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 96px; }
  .stage[data-layout="focus"] .tiles { grid-auto-flow: column; grid-auto-columns: 132px; grid-template-columns: none; grid-auto-rows: 96px; overflow: auto hidden; }
  .hint { bottom: 92px; white-space: normal; width: max-content; max-width: calc(100% - 24px); }
  .toast { bottom: 96px; }
}

/* Écrans tactiles : pas de survol, donc les commandes restent visibles. */
@media (hover: none) {
  .room.idle { --pad-top: 62px; --pad-bottom: 96px; cursor: auto; }
  .room.idle .chrome { opacity: 1; }
  .room.idle .room-top { transform: none; }
  .room.idle .dock { transform: translateX(-50%); }
  .tile-pin { opacity: 0.85; }
  /* Sans survol, les actions se rangent sous le nom, toujours visibles. */
  .person-actions { position: static; transform: none; padding: 0 0 0 50px; background: none; box-shadow: none; opacity: 1; pointer-events: auto; flex-basis: 100%; }
  .person-actions.always { padding: 0; flex-basis: auto; }
}
@media (hover: none) and (max-width: 820px) {
  .room.idle { --pad-top: 54px; --pad-bottom: 84px; }
  .room.idle .dock { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
