/* ===== The Paradise — thème ===== */
:root {
  --bg: #0d0a1a;
  --bg-2: #141027;
  --panel: #1a1533;
  --panel-2: #221c40;
  --line: rgba(255, 255, 255, .08);
  --text: #f3f0ff;
  --muted: #a49cc7;
  --violet: #8b6cff;
  --rose: #ff5fa2;
  --gold: #ffb547;
  --green: #33d6a6;
  --red: #ff5a6e;
  --grad: linear-gradient(135deg, var(--violet), var(--rose) 55%, var(--gold));
  --radius: 16px;
  --shadow: 0 20px 50px rgba(0, 0, 0, .35);
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f3ff;
  --bg-2: #ede8ff;
  --panel: #ffffff;
  --panel-2: #f3efff;
  --line: rgba(40, 20, 90, .1);
  --text: #1c1536;
  --muted: #6c6390;
  --shadow: 0 20px 50px rgba(70, 40, 160, .12);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--rose); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* ===== Logo ===== */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; color: var(--text); }
.logo img { width: 38px; height: 38px; filter: drop-shadow(0 6px 14px rgba(255, 95, 162, .35)); }
.logo .word span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== Boutons & champs ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 11px 18px; cursor: pointer; font-weight: 600;
  background: var(--panel-2); color: var(--text); transition: transform .12s, filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 24px rgba(255, 95, 162, .28); }
.btn-ghost { background: transparent; border: 1px solid var(--line); }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .85rem; border-radius: 9px; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 12px; background: transparent; }
.btn-icon:hover { background: var(--panel-2); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.input, select.input, textarea.input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-2); outline: none; transition: border .15s, box-shadow .15s;
}
.input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139, 108, 255, .2); }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.error { color: var(--red); font-size: .9rem; min-height: 1.2em; margin: 6px 0; }

.gender-pick { display: flex; gap: 8px; }
.gender-pick input { display: none; }
.gender-pick label {
  flex: 1; text-align: center; padding: 10px 6px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); font-weight: 600; font-size: .9rem;
}
.gender-pick input:checked + label { border-color: transparent; background: var(--grad); color: #fff; }

/* ===== Page d'accueil ===== */
.landing { min-height: 100%; position: relative; overflow-x: hidden; }
.landing::before, .landing::after {
  content: ''; position: fixed; width: 520px; height: 520px; border-radius: 50%; filter: blur(120px); opacity: .35; z-index: 0; pointer-events: none;
}
.landing::before { background: var(--violet); top: -160px; left: -140px; }
.landing::after { background: var(--rose); bottom: -200px; right: -160px; }
.landing > * { position: relative; z-index: 1; }
.topnav { display: flex; align-items: center; justify-content: space-between; padding: 22px 6vw; }
.topnav nav { display: flex; gap: 8px; align-items: center; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; padding: 30px 6vw 70px; max-width: 1300px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.05; margin: 0 0 18px; letter-spacing: -.03em; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: var(--muted); font-size: 1.15rem; line-height: 1.6; max-width: 540px; }
.live { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; margin-bottom: 22px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(51, 214, 166, .2); flex: none; }
.stats { display: flex; gap: 34px; margin-top: 32px; }
.stats b { display: block; font-size: 1.8rem; }
.stats span { color: var(--muted); font-size: .9rem; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 28px; }
.tabs { display: flex; background: var(--bg-2); padding: 5px; border-radius: 14px; margin-bottom: 22px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 10px; cursor: pointer; color: var(--muted); font-weight: 600; }
.tabs button.active { background: var(--panel); color: var(--text); box-shadow: 0 4px 12px rgba(0, 0, 0, .15); }
.card small.note { display: block; color: var(--muted); font-size: .8rem; margin-top: 12px; text-align: center; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 0 6vw 70px; max-width: 1300px; margin: 0 auto; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.feature .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: var(--panel-2); margin-bottom: 14px; }
.feature h3 { margin: 0 0 6px; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }
footer.site { border-top: 1px solid var(--line); padding: 26px 6vw; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: .88rem; }

/* ===== Chat ===== */
.app { display: grid; grid-template-columns: 270px 1fr 280px; grid-template-rows: 64px 1fr; height: 100vh; height: 100dvh; }
.app-header { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.app-header .spacer { flex: 1; }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; }
.sidebar { background: var(--bg-2); border-right: 1px solid var(--line); overflow-y: auto; padding: 16px 12px; }
.sidebar.right { border-right: 0; border-left: 1px solid var(--line); }
.side-title { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin: 14px 8px 8px; display: flex; justify-content: space-between; align-items: center; }
.side-title:first-child { margin-top: 0; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; cursor: pointer; transition: background .12s; }
.list-item:hover { background: var(--panel); }
.list-item.active { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--rose); }
.list-item .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--panel); flex: none; }
.list-item .meta { flex: 1; min-width: 0; }
.list-item .name { font-weight: 600; font-size: .94rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .sub { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--panel); color: var(--muted); }
.pill.hot { background: var(--rose); color: #fff; }

.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; position: relative; font-size: .9rem; }
.avatar.lg { width: 84px; height: 84px; font-size: 2rem; }
.avatar .on { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--green); border: 2px solid var(--bg-2); }
.g-h { color: #4fb3ff; } .g-f { color: #ff5fa2; } .g-x { color: #c3b8ff; }
.badge { font-size: .65rem; font-weight: 800; padding: 2px 6px; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; vertical-align: middle; }
.badge.admin { background: var(--grad); color: #fff; }
.badge.moderator { background: var(--green); color: #082a20; }
.badge.guest { background: var(--panel-2); color: var(--muted); }

.filters { display: flex; gap: 6px; margin: 0 4px 10px; }
.filters button { flex: 1; border: 1px solid var(--line); background: transparent; border-radius: 9px; padding: 6px; cursor: pointer; font-size: .8rem; color: var(--muted); font-weight: 600; }
.filters button.active { background: var(--panel-2); color: var(--text); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.room-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.room-head h2 { margin: 0; font-size: 1.1rem; }
.room-head p { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.announce { margin: 12px 20px 0; padding: 10px 14px; border-radius: 12px; background: linear-gradient(135deg, rgba(139, 108, 255, .18), rgba(255, 95, 162, .18)); border: 1px solid rgba(255, 95, 162, .3); font-size: .9rem; }
.messages { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 2px; }
.msg { display: flex; gap: 10px; padding: 6px 8px; border-radius: 12px; position: relative; }
.msg:hover { background: rgba(255, 255, 255, .03); }
.msg.mention { background: rgba(255, 181, 71, .1); box-shadow: inset 3px 0 0 var(--gold); }
.msg .body { min-width: 0; flex: 1; }
.msg .who { font-weight: 700; cursor: pointer; font-size: .92rem; }
.msg .time { color: var(--muted); font-size: .72rem; margin-left: 6px; }
.msg .text { word-wrap: break-word; overflow-wrap: anywhere; line-height: 1.45; white-space: pre-wrap; }
.msg .del { position: absolute; right: 8px; top: 6px; display: none; }
.msg:hover .del { display: inline-flex; }
.sys { text-align: center; color: var(--muted); font-size: .8rem; padding: 4px; }
.sys.broadcast { color: var(--gold); font-weight: 600; font-size: .9rem; }

.bubble-row { display: flex; margin: 3px 0; }
.bubble-row.mine { justify-content: flex-end; }
.bubble { max-width: 72%; padding: 9px 14px; border-radius: 18px; background: var(--panel); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble-row.mine .bubble { background: var(--grad); color: #fff; border-bottom-right-radius: 6px; }
.bubble-row:not(.mine) .bubble { border-bottom-left-radius: 6px; }
.bubble .time { display: block; font-size: .68rem; opacity: .7; margin-top: 3px; text-align: right; }

.typing { height: 20px; padding: 0 22px; color: var(--muted); font-size: .8rem; font-style: italic; }
.composer { display: flex; gap: 10px; padding: 12px 16px 16px; align-items: flex-end; position: relative; }
.composer .input { resize: none; max-height: 140px; min-height: 46px; border-radius: 14px; }
.emoji-panel { position: absolute; bottom: 70px; left: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 10px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; box-shadow: var(--shadow); z-index: 10; }
.emoji-panel button { border: 0; background: transparent; font-size: 1.3rem; cursor: pointer; border-radius: 8px; padding: 4px; }
.emoji-panel button:hover { background: var(--panel-2); }

/* ===== Modales ===== */
.modal-back { position: fixed; inset: 0; background: rgba(5, 3, 15, .6); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto; }
.modal h3 { margin-top: 0; }
.profile-head { text-align: center; }
.profile-head .avatar { margin: 0 auto 12px; }
.profile-head h3 { margin: 0 0 4px; }
.profile-head p { margin: 0; color: var(--muted); }
.bio { background: var(--bg-2); border-radius: 12px; padding: 12px; margin: 16px 0; color: var(--muted); font-size: .92rem; white-space: pre-wrap; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions .btn { flex: 1 1 45%; }
.staff-actions { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.staff-actions h4 { margin: 0 0 10px; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.toasts { position: fixed; top: 76px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--rose); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); max-width: 320px; animation: slide .25s ease; font-size: .9rem; cursor: pointer; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }

.mobile-only { display: none; }
.drawer-back { display: none; }

/* ===== Admin ===== */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-layout aside { background: var(--bg-2); border-right: 1px solid var(--line); padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-layout aside .logo { margin: 0 8px 24px; }
.admin-layout main { padding: 28px 32px; min-width: 0; }
.admin-layout h1 { margin: 0 0 6px; font-size: 1.7rem; }
.admin-layout .subtitle { color: var(--muted); margin: 0 0 24px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 24px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.kpi span { color: var(--muted); font-size: .85rem; }
.kpi b { display: block; font-size: 2rem; margin-top: 4px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin-bottom: 20px; }
.panel h2 { margin: 0 0 14px; font-size: 1.1rem; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.toolbar .input { max-width: 280px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
td .btn { margin: 2px; }
.status-on { color: var(--green); font-weight: 600; }
.status-ban { color: var(--red); font-weight: 600; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switch input { width: 20px; height: 20px; accent-color: var(--rose); }
.bar { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 14px; color: var(--muted); font-size: .9rem; }
.empty { color: var(--muted); text-align: center; padding: 30px; }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .app { grid-template-columns: 240px 1fr; }
  .sidebar.right { position: fixed; right: 0; top: 64px; bottom: 0; width: 290px; z-index: 50; transform: translateX(100%); transition: transform .2s; }
  .sidebar.right.open { transform: none; box-shadow: var(--shadow); }
  .mobile-users { display: inline-grid !important; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar.left { position: fixed; left: 0; top: 64px; bottom: 0; width: 280px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.left.open { transform: none; box-shadow: var(--shadow); }
  .mobile-only { display: inline-grid; }
  .drawer-back.show { display: block; position: fixed; inset: 64px 0 0 0; background: rgba(0, 0, 0, .4); z-index: 40; }
  .me-chip .me-name { display: none; }
  .hero { grid-template-columns: 1fr; gap: 30px; padding: 10px 16px 50px; }
  .topnav { padding: 16px; }
  .features { grid-template-columns: 1fr 1fr; padding: 0 16px 50px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-layout aside { position: static; height: auto; display: flex; flex-wrap: wrap; gap: 4px; padding: 12px; }
  .admin-layout aside .logo { width: 100%; margin-bottom: 8px; }
  .admin-layout aside .list-item { flex: 1 1 auto; }
  .admin-layout main { padding: 20px 16px; }
  .bubble { max-width: 88%; }
}
@media (max-width: 480px) {
  .features { grid-template-columns: 1fr; }
  .stats { gap: 22px; }
  .card { padding: 20px; }
}

/* ===== Salons des membres ===== */
.sidebar.left { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.side-scroll { flex: 1; overflow-y: auto; padding: 16px 12px; }
.side-title .btn-sm { padding: 3px 10px; font-size: .72rem; letter-spacing: 0; text-transform: none; }
.side-empty { padding: 6px 10px; color: var(--muted); font-size: .84rem; }
.voice-pill { background: rgba(51, 214, 166, .15); color: var(--green); margin-right: 4px; }
.icon-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-pick button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); font-size: 1.2rem; cursor: pointer; }
.icon-pick button.active { border-color: transparent; background: var(--grad); }
.switch small.help { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.switch { cursor: pointer; }
.people-list { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; }
.person { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: var(--bg-2); }
.person .avatar { width: 28px; height: 28px; font-size: .8rem; }

/* ===== Vocal ===== */
.voice-bar { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(51, 214, 166, .08), transparent); flex-wrap: wrap; }
.voice-label { font-weight: 700; font-size: .85rem; color: var(--green); }
.voice-people { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.voice-chip { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--panel); border: 2px solid transparent; font-size: .85rem; font-weight: 600; transition: border-color .1s, box-shadow .1s; }
.voice-chip .avatar { width: 26px; height: 26px; font-size: .75rem; }
.voice-chip.speaking { border-color: var(--green); box-shadow: 0 0 0 3px rgba(51, 214, 166, .25); }
.voice-chip.muted { opacity: .7; }
.voice-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 2px; }
.voice-x:hover { color: var(--red); }
.voice-ctrl { display: flex; gap: 6px; }

/* ===== Lecteur radio ===== */
.player { border-top: 1px solid var(--line); padding: 12px; background: var(--panel); }
.player-top { display: flex; align-items: center; gap: 8px; }
.player-top .meta { flex: 1; min-width: 0; }
.player-top .name { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-top .sub { font-size: .75rem; color: var(--muted); }
.player-top .btn-icon { width: 34px; height: 34px; }
.player-art { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; background: var(--panel-2); flex: none; }
.player-art.on { background: var(--grad); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255, 95, 162, .18); } }
.volume { width: 100%; margin-top: 8px; accent-color: var(--rose); }
.stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.station { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; text-align: center; }
.station:hover { border-color: var(--violet); }
.station.active { background: var(--grad); color: #fff; border-color: transparent; }
.station-ico { font-size: 1.6rem; }
.station small { color: var(--muted); font-size: .72rem; }
.station.active small { color: rgba(255, 255, 255, .85); }
.room-radio-note { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); margin-bottom: 12px; font-size: .9rem; }
.modal { max-width: 480px; }
@media (max-width: 760px) {
  .room-head { flex-wrap: wrap; padding: 10px 14px; }
  .voice-bar { padding: 8px 14px; }
}

/* ===== Profils personnalisés ===== */
.avatar { background: var(--avbg, #8b6cff); box-sizing: border-box; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar.frame-neon { box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 4px var(--accent), 0 0 14px var(--accent); }
.avatar.frame-gold { box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 4px #f5c542, 0 0 12px rgba(245, 197, 66, .6); }
.avatar.frame-ice { box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 4px #7dd3fc, 0 0 14px rgba(125, 211, 252, .7); }
.avatar.frame-fire { box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 4px #ff7a00, 0 0 14px #ff3d00; animation: fire 1.2s ease-in-out infinite alternate; }
@keyframes fire { to { box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 4px #ffb547, 0 0 20px #ff3d00; } }
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.avatar.frame-rainbow {
  border: 3px solid transparent;
  background: linear-gradient(var(--avbg), var(--avbg)) padding-box,
    conic-gradient(from var(--ang), #ff4d4d, #ffb547, #f2e94e, #33d6a6, #4fb3ff, #8b6cff, #ff5fa2, #ff4d4d) border-box;
  animation: spinang 3s linear infinite;
}
@keyframes spinang { to { --ang: 360deg; } }

.uname { font-weight: 700; }
.fx-gradient { background: linear-gradient(90deg, var(--c), #ff5fa2, #ffb547); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
.fx-glow { text-shadow: 0 0 6px var(--c), 0 0 14px var(--c); }
.fx-rainbow, .fx-gold { background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: shine 3s linear infinite; }
.fx-rainbow { background-image: linear-gradient(90deg, #ff4d4d, #ffb547, #f2e94e, #33d6a6, #4fb3ff, #8b6cff, #ff5fa2, #ff4d4d); }
.fx-gold { background-image: linear-gradient(90deg, #b8860b, #ffe08a, #f5c542, #fff3c4, #b8860b); }
@keyframes shine { to { background-position: 200% center; } }

/* Carte de profil */
.modal.profile-modal { max-width: 440px; padding: 0; overflow-x: hidden; }
.pcard { --accent: #ff5fa2; }
.pbanner { height: 130px; border-radius: 24px 24px 0 0; }
.pbody { padding: 0 24px 6px; text-align: center; }
.pavatar { margin-top: -46px; display: flex; justify-content: center; }
.pavatar .avatar { width: 92px; height: 92px; font-size: 2.2rem; outline: 5px solid var(--panel); }
.pavatar .avatar.frame { outline: none; }
.pname { margin-top: 12px; font-size: 1.35rem; }
.pname .uname { font-weight: 800; }
.pstatus { display: inline-block; margin-top: 8px; padding: 5px 12px; border-radius: 999px; background: var(--bg-2); font-size: .88rem; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.pinfo { color: var(--muted); font-size: .9rem; margin-top: 8px; }
.psection { text-align: left; margin-top: 16px; }
.psection h5 { margin: 0 0 8px; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.pbio { background: var(--bg-2); border-radius: 12px; padding: 12px; font-size: .92rem; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; border-left: 3px solid var(--accent); }
.ptags { display: flex; flex-wrap: wrap; gap: 6px; }
.ptag { display: inline-flex; align-items: center; gap: 4px; padding: 5px 11px; border-radius: 999px; font-size: .82rem; font-weight: 600; background: color-mix(in srgb, var(--accent, #ff5fa2) 18%, transparent); border: 1px solid color-mix(in srgb, var(--accent, #ff5fa2) 45%, transparent); }
.ptag.game::before { content: '🎮'; }
.ptag button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0 0 0 2px; }
.psocials { display: flex; flex-wrap: wrap; gap: 6px; }
.psocial { padding: 6px 12px; border-radius: 10px; font-size: .82rem; font-weight: 700; color: #fff; background: var(--s); border: 0; cursor: pointer; text-decoration: none; }
.psince { color: var(--muted); font-size: .78rem; margin: 18px 0 8px; }
.pactions { padding: 8px 24px 24px; }

/* Éditeur */
.modal.editor-modal { max-width: 960px; padding: 0; }
.editor { display: grid; grid-template-columns: 380px 1fr; min-height: 0; }
.editor-preview { background: var(--bg-2); border-radius: 24px 0 0 24px; padding: 18px; border-right: 1px solid var(--line); }
.editor-preview .pcard { background: var(--panel); border-radius: 24px; position: sticky; top: 0; }
.preview-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.editor-form { padding: 24px; min-width: 0; }
.editor-form .tabs { flex-wrap: wrap; }
.editor-body { min-height: 300px; }
.editor-save { margin-top: 18px; position: sticky; bottom: -1px; background: var(--panel); padding-top: 10px; }
.help { color: var(--muted); font-size: .78rem; }
.choice-row { display: flex; flex-wrap: wrap; gap: 6px; }
.choice { border: 1px solid var(--line); background: var(--bg-2); border-radius: 10px; padding: 7px 11px; cursor: pointer; font-size: .88rem; }
.choice.active { border-color: var(--rose); box-shadow: 0 0 0 2px rgba(255, 95, 162, .3); }
.banner-swatch { display: block; width: 56px; height: 22px; border-radius: 6px; }
.frame-choice { display: inline-flex; align-items: center; gap: 8px; }
.frame-choice .avatar { width: 28px; height: 28px; font-size: .75rem; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; }
.swatch.active { outline: 2px solid var(--text); outline-offset: 2px; }
.color-input { width: 40px; height: 32px; border: 0; background: none; cursor: pointer; padding: 0; }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); }
.tag-input input { flex: 1; min-width: 140px; border: 0; background: transparent; outline: none; padding: 4px; }
@media (max-width: 860px) {
  .editor { grid-template-columns: 1fr; }
  .editor-preview { border-radius: 24px 24px 0 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .editor-preview .pcard { position: static; }
}

/* ===== Notifications ===== */
.notif-wrap { position: relative; }
#notifBtn { position: relative; }
.notif-count { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg-2); }
.notif-panel { position: absolute; right: 0; top: 48px; width: 360px; max-width: calc(100vw - 24px); max-height: 70vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); z-index: 120; padding: 8px; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 10px; }
.notif-desktop { display: block; width: 100%; text-align: left; border: 1px dashed var(--violet); background: rgba(139, 108, 255, .08); color: var(--text); border-radius: 12px; padding: 10px; margin-bottom: 8px; cursor: pointer; font-size: .82rem; }
.notif-list { display: flex; flex-direction: column; gap: 2px; }
.notif-item { display: flex; gap: 10px; padding: 10px; border-radius: 12px; cursor: pointer; }
.notif-item:hover { background: var(--panel-2); }
.notif-item.unread { background: rgba(255, 95, 162, .08); }
.notif-item.important .notif-ico { background: rgba(255, 90, 110, .15); }
.notif-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-2); flex: none; font-size: 1.1rem; }
.notif-item .meta { min-width: 0; flex: 1; }
.notif-title { font-weight: 700; font-size: .9rem; }
.notif-text { color: var(--muted); font-size: .82rem; margin-top: 2px; line-height: 1.4; }
.notif-time { color: var(--muted); font-size: .72rem; margin-top: 4px; }

/* Grande fenêtre de sanction */
.sanction { text-align: center; --sc: var(--rose); }
.sanction-ico { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 2.2rem; background: color-mix(in srgb, var(--sc, var(--rose)) 18%, transparent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--sc, var(--rose)) 10%, transparent); }
.sanction h3 { margin: 0 0 8px; }
.sanction p { color: var(--muted); line-height: 1.5; margin: 6px 0; }
.sanction-timer { margin: 12px auto 4px; display: inline-block; padding: 8px 16px; border-radius: 999px; background: var(--bg-2); font-weight: 800; font-variant-numeric: tabular-nums; color: var(--gold); }
.sanction-time { font-size: .78rem; }
.sanction-rules { display: inline-block; margin-top: 8px; font-size: .85rem; }

/* Bandeau "muet" au-dessus de la zone d'écriture */
.mute-banner { display: flex; align-items: center; gap: 12px; margin: 0 16px 6px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 181, 71, .12); border: 1px solid rgba(255, 181, 71, .4); font-size: .9rem; }
.mute-banner > span { font-size: 1.4rem; }
.composer textarea:disabled { opacity: .55; cursor: not-allowed; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Accueil : message après expulsion / bannissement */
.exit-card { text-align: center; margin-bottom: 16px; border-color: rgba(255, 90, 110, .4); }
.exit-card h3 { margin: 0 0 6px; }
.exit-card p { margin: 4px 0; color: var(--muted); }

/* ===== Super-admin, pages, liens ===== */
.badge.superadmin { background: linear-gradient(135deg, #ffd76a, #ff9f1c 50%, #ff5fa2); color: #2a1600; box-shadow: 0 0 10px rgba(255, 190, 60, .45); }
.nav-link.active { background: var(--panel-2); }
a.feature-link { color: inherit; transition: transform .15s, border-color .15s; }
a.feature-link:hover { transform: translateY(-3px); border-color: var(--rose); }
.page-wrap { max-width: 860px; margin: 0 auto; padding: 10px 16px 60px; }
.page-content { padding: 36px 40px; line-height: 1.7; }
.page-content h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.15; margin: 0 0 18px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-content h2 { margin: 28px 0 8px; font-size: 1.2rem; }
.page-content ul { padding-left: 22px; margin: 8px 0; }
.page-content li { margin: 6px 0; }
.page-content li::marker { color: var(--rose); }
.page-content p { margin: 10px 0; }
.page-back { text-align: center; margin-top: 22px; }
.side-links { display: flex; flex-wrap: wrap; gap: 6px; padding: 16px 4px 4px; border-top: 1px solid var(--line); margin-top: 16px; }
.side-links a, .side-links button { font-size: .82rem; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.mobile-only-inline { display: none; }
.send-ico { display: none; }
.rich-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rich-preview { background: var(--bg-2); border-radius: 12px; padding: 16px 20px; max-height: 440px; overflow-y: auto; }
.grad-preview { margin-top: 12px; height: 54px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; color: #fff; font-weight: 700; }
.save-bar { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 40%); text-align: right; }

/* ===== Fond d'écran des salons ===== */
.main.has-bg { background: linear-gradient(rgba(13, 10, 26, .74), rgba(13, 10, 26, .84)), var(--room-bg) center / cover no-repeat; }
:root[data-theme="light"] .main.has-bg { background: linear-gradient(rgba(246, 243, 255, .78), rgba(246, 243, 255, .88)), var(--room-bg) center / cover no-repeat; }
.main.has-bg .room-head { background: color-mix(in srgb, var(--bg) 65%, transparent); backdrop-filter: blur(8px); }
.bg-preview { height: 110px; border-radius: 12px; background: var(--bg-2) center / cover no-repeat; display: grid; place-items: center; color: var(--muted); font-size: .85rem; border: 1px dashed var(--line); }

/* ===== Vidéo dans les salons ===== */
.video-grid { display: grid; gap: 8px; padding: 10px 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); max-height: 46%; overflow-y: auto; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .25); flex: none; }
.vtile { position: relative; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; cursor: pointer; }
.vtile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.vtile.mine video { transform: scaleX(-1); }
.vtile.big { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.vtile-name { position: absolute; left: 8px; bottom: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .78rem; padding: 3px 8px; border-radius: 999px; }

/* ===== Écran d'appel ===== */
body.in-call { overflow: hidden; }
.call-screen { position: fixed; inset: 0; z-index: 300; background: radial-gradient(circle at 30% 20%, #2a1f55, #0b0816 70%); display: flex; align-items: center; justify-content: center; color: #fff; }
.call-remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; background: #000; }
.call-screen.remote-video .call-remote { display: block; }
.call-screen.remote-video .call-avatar { display: none; }
.call-avatar { text-align: center; position: relative; z-index: 1; padding: 0 20px; }
.call-avatar .avatar { width: 120px; height: 120px; font-size: 3rem; margin: 0 auto 18px; animation: callpulse 2s infinite; }
@keyframes callpulse { 0%, 100% { box-shadow: 0 0 0 8px rgba(255, 255, 255, .06), 0 0 0 18px rgba(255, 255, 255, .03); } 50% { box-shadow: 0 0 0 16px rgba(255, 255, 255, .08), 0 0 0 32px rgba(255, 255, 255, .03); } }
.call-avatar h2 { margin: 0 0 6px; font-size: 1.6rem; }
.call-status { color: rgba(255, 255, 255, .75); margin: 0; }
.call-top { position: absolute; top: calc(14px + env(safe-area-inset-top)); left: 16px; right: 16px; display: flex; justify-content: space-between; z-index: 2; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.call-timer { font-variant-numeric: tabular-nums; }
.call-local { position: absolute; right: 16px; top: calc(56px + env(safe-area-inset-top)); width: min(28vw, 200px); aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px; transform: scaleX(-1); border: 2px solid rgba(255, 255, 255, .3); z-index: 2; background: #000; }
.call-controls { position: absolute; bottom: calc(28px + env(safe-area-inset-bottom)); left: 0; right: 0; display: flex; justify-content: center; gap: 16px; z-index: 2; }
.call-btn { width: 60px; height: 60px; border-radius: 50%; border: 0; font-size: 1.45rem; cursor: pointer; background: rgba(255, 255, 255, .18); color: #fff; backdrop-filter: blur(8px); transition: filter .15s; display: grid; place-items: center; }
.call-btn:hover { filter: brightness(1.15); }
.call-btn.off { background: rgba(255, 255, 255, .88); }
.call-btn.hang { background: #ff3b4f; }
.call-btn.accept { background: #22c55e; }
.ring-back { z-index: 310; }
.ring-card { text-align: center; max-width: 340px; }
.ring-card h3 { margin: 0 0 4px; font-size: 1.4rem; }
.ring-card p { color: var(--muted); margin: 0; }
.ring-avatar .avatar { margin: 0 auto 14px; animation: callpulse 1.5s infinite; }
.ring-actions { display: flex; justify-content: center; gap: 22px; margin-top: 22px; }

/* ===== Adaptation téléphone / tablette ===== */
html, body { overflow-x: hidden; }
body { -webkit-tap-highlight-color: transparent; }
@media (hover: none) { .msg .del { display: inline-flex; opacity: .7; } }

@media (max-width: 1100px) {
  .room-head { flex-wrap: wrap; }
}

@media (max-width: 760px) {
  .app { grid-template-rows: calc(56px + env(safe-area-inset-top)) 1fr; }
  .app-header { gap: 2px; padding: env(safe-area-inset-top) 6px 0; }
  .sidebar.left, .sidebar.right, .drawer-back.show { top: calc(56px + env(safe-area-inset-top)); }
  .sidebar.left, .sidebar.right { width: min(86vw, 320px); }
  .logo { font-size: 1.1rem; gap: 8px; }
  .logo img { width: 32px; height: 32px; }
  .desk-only { display: none !important; }
  .mobile-only-inline { display: inline-block; }
  .lbl { display: none; }
  .send-ico { display: inline; }
  .send-btn { width: 46px; height: 46px; padding: 0; flex: none; }
  .btn-icon { width: 40px; height: 40px; }
  .me-chip { padding: 3px; }
  .room-head { padding: 8px 10px; gap: 6px; flex-wrap: nowrap; }
  .room-head > .list-item { display: none; }
  .room-head h2 { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .room-head p { font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .room-head .btn-sm { padding: 7px 10px; }
  .messages { padding: 10px 8px; }
  .msg { padding: 5px 4px; gap: 8px; }
  .msg .avatar { width: 30px; height: 30px; }
  .composer { padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); gap: 6px; }
  .composer .btn-icon { flex: none; }
  .input, select.input, textarea.input, .tag-input input { font-size: 16px; } /* évite le zoom automatique sur iPhone */
  .emoji-panel { left: 8px; right: 8px; bottom: 62px; }
  .typing { padding: 0 12px; height: 18px; }
  .voice-bar { padding: 8px 10px; gap: 8px; }
  .voice-label { display: none; }
  .voice-chip .vname { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .voice-ctrl { width: 100%; justify-content: center; }
  .video-grid { padding: 8px; grid-template-columns: repeat(2, 1fr); max-height: 42%; }
  .video-grid[data-count="1"] { grid-template-columns: 1fr; }
  .announce { margin: 8px 8px 0; }
  .mute-banner { margin: 0 8px 6px; }
  .player { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }

  /* Fenêtres en "tiroir" depuis le bas de l'écran */
  .modal-back { place-items: end center; padding: 0; }
  .modal { max-width: 100% !important; width: 100%; border-radius: 22px 22px 0 0; max-height: 92dvh; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); animation: sheet .22s ease; }
  .modal.profile-modal, .modal.editor-modal { padding: 0 0 env(safe-area-inset-bottom); }
  .pbanner { border-radius: 22px 22px 0 0; height: 110px; }
  .pbody, .pactions { padding-left: 16px; padding-right: 16px; }
  .editor-preview { border-radius: 22px 22px 0 0; padding: 12px; }
  .editor-preview .psection, .editor-preview .psince { display: none; }
  .editor-preview .pbanner { height: 80px; }
  .editor-form { padding: 16px; }
  .ring-back { place-items: center; padding: 16px; }
  .ring-back .modal { border-radius: 24px; }
  .actions .btn { flex: 1 1 calc(50% - 8px); }
  .tabs button { padding: 8px 4px; font-size: .84rem; }

  .toasts { left: 8px; right: 8px; top: calc(62px + env(safe-area-inset-top)); }
  .toast { max-width: none; }
  .notif-panel { position: fixed; left: 8px; right: 8px; top: calc(60px + env(safe-area-inset-top)); width: auto; max-height: 75dvh; }

  .call-btn { width: 58px; height: 58px; }
  .call-local { width: 30vw; top: calc(52px + env(safe-area-inset-top)); }

  /* Accueil & pages */
  .nav-link span { display: none; }
  .topnav nav { gap: 6px; }
  .hero h1 { font-size: 2.1rem; }
  .stats b { font-size: 1.4rem; }
  .page-content { padding: 22px 18px; }
  .rich-editor { grid-template-columns: 1fr; }

  /* Admin */
  .admin-layout aside { flex-wrap: nowrap; overflow-x: auto; position: sticky; top: 0; z-index: 20; padding: 8px; gap: 4px; }
  .admin-layout aside .logo, .admin-layout aside .side-title { display: none; }
  .admin-layout aside .list-item { flex: none; padding: 7px 10px; }
  .admin-layout aside .list-item .ico { width: 28px; height: 28px; }
  .admin-layout h1 { font-size: 1.4rem; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi b { font-size: 1.5rem; }
  .toolbar .input { max-width: none; flex: 1 1 100%; }
  .panel { padding: 14px; }
  th, td { padding: 8px 6px; }
}
@media (max-width: 420px) {
  .app-header .logo .word { display: none; }
  .features { grid-template-columns: 1fr; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }

/* ===== Logs (admin) ===== */
.log-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.live-dot { color: var(--green); font-size: .82rem; font-weight: 700; animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: .4; } }
.log-list { display: flex; flex-direction: column; gap: 6px; }
.log-row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border-left: 3px solid var(--line); }
.log-row.fresh { animation: fresh 2.5s ease; }
@keyframes fresh { from { background: rgba(255, 95, 162, .2); } }
.log-row.cat-moderation { border-left-color: var(--red); }
.log-row.cat-messages { border-left-color: var(--gold); }
.log-row.cat-accounts { border-left-color: var(--green); }
.log-row.cat-rooms { border-left-color: var(--violet); }
.log-row.cat-voice { border-left-color: #4fb3ff; }
.log-row.cat-reports { border-left-color: var(--rose); }
.log-time { color: var(--muted); font-size: .78rem; padding-top: 2px; }
.log-main { min-width: 0; }
.log-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.log-tag { font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--panel-2); }
.log-actor { border: 0; background: none; padding: 0; font-weight: 700; color: var(--text); cursor: pointer; }
.log-actor:hover { color: var(--rose); text-decoration: underline; }
.log-ip { font-family: ui-monospace, monospace; font-size: .72rem; color: var(--muted); background: var(--panel); padding: 1px 6px; border-radius: 6px; }
.log-details { margin-top: 4px; font-size: .9rem; overflow-wrap: anywhere; }
.log-deleted { margin-top: 6px; }
.log-quote { margin-top: 4px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 181, 71, .08); border: 1px dashed rgba(255, 181, 71, .45); white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; }
.log-img { margin-top: 6px; max-width: 160px; max-height: 110px; border-radius: 10px; object-fit: cover; display: block; }

/* ===== Mode fantôme ===== */
#ghostBtn.active { background: rgba(195, 184, 255, .2); box-shadow: 0 0 0 2px #c3b8ff inset; animation: ghostfloat 2.5s ease-in-out infinite; }
@keyframes ghostfloat { 50% { box-shadow: 0 0 0 2px #c3b8ff inset, 0 0 14px rgba(195, 184, 255, .7); } }
.ghost-banner { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: linear-gradient(90deg, rgba(195, 184, 255, .16), transparent); border-bottom: 1px solid rgba(195, 184, 255, .3); font-size: .9rem; flex: none; }
.ghost-ico { font-size: 1.6rem; }
.list-item.is-ghost { opacity: .6; }

/* ===== Dictée & messages vocaux ===== */
.composer { flex-wrap: nowrap; }
#dictateBtn.active { background: rgba(255, 90, 110, .18); box-shadow: 0 0 0 2px var(--red) inset; animation: blink 1.2s infinite; }
.rec-bar { position: absolute; inset: 0; display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--bg); z-index: 5; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); animation: blink 1s infinite; flex: none; }
.rec-dot.sending { background: var(--violet); }
.rec-time { font-weight: 800; font-variant-numeric: tabular-nums; }
.rec-hint { flex: 1; color: var(--muted); font-size: .85rem; }
.audio-msg { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; margin-top: 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); max-width: 100%; }
.bubble .audio-msg { background: transparent; border: 0; padding: 0; margin: 0; }
.ap-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; cursor: pointer; flex: none; font-size: .95rem; }
.bubble-row.mine .ap-btn { background: rgba(255, 255, 255, .25); }
.ap-wave { display: flex; align-items: center; gap: 2px; height: 28px; width: 150px; cursor: pointer; }
.ap-wave i { flex: 1; border-radius: 2px; background: color-mix(in srgb, var(--muted) 55%, transparent); min-height: 3px; }
.ap-wave i.on { background: var(--rose); }
.bubble-row.mine .ap-wave i { background: rgba(255, 255, 255, .45); }
.bubble-row.mine .ap-wave i.on { background: #fff; }
.ap-time { font-size: .78rem; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 34px; }
.bubble-row.mine .ap-time { color: rgba(255, 255, 255, .85); }
@media (max-width: 760px) {
  .composer.empty .send-btn { display: none; }
  .composer:not(.empty) .rec-btn { display: none; }
  .ap-wave { width: 110px; }
  .log-row { grid-template-columns: 1fr; gap: 4px; }
  .ghost-banner { padding: 8px 10px; }
  .ghost-banner .help { display: none; }
  .rec-bar { padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
  .rec-hint { display: none; }
  .rec-bar .btn-primary { margin-left: auto; }
}

/* ===== Thèmes de fête ===== */
.season-badge { font-size: .9em; margin-left: -4px; animation: badgebob 3s ease-in-out infinite; display: inline-block; }
@keyframes badgebob { 50% { transform: translateY(-3px) rotate(-8deg); } }
.season-fx { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.season-fx span { position: absolute; top: -40px; opacity: .85; will-change: transform; }
.season-fx.snow span { animation: fall linear infinite; }
.season-fx.float span { top: auto; bottom: -40px; animation: rise linear infinite; opacity: .6; }
@keyframes fall { to { transform: translate(var(--drift), 110vh) rotate(360deg); } }
@keyframes rise { 0% { transform: translate(0, 0); } 50% { transform: translate(var(--drift), -55vh); } 100% { transform: translate(0, -115vh); } }
.season-greet { display: inline-block; margin: 0 0 14px; padding: 8px 16px; border-radius: 999px; background: var(--grad); color: #fff; font-weight: 700; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
.season-banner { display: flex; align-items: center; gap: 8px; margin: 10px 16px 0; padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--grad); color: #fff; font-weight: 700; flex: none; }
.season-banner .btn-icon { color: #fff; width: 32px; height: 32px; }
:root[data-season="automne-hiver"] { --bg: #0f0b0a; --bg-2: #18110e; --panel: #221813; --panel-2: #2e2019; }
:root[data-season="noel"] { --bg: #08130f; --bg-2: #0c1b15; --panel: #11241c; --panel-2: #183026; }
:root[data-season="nouvel-an"] { --bg: #07071a; --bg-2: #0c0c26; --panel: #131337; --panel-2: #1c1c48; }
:root[data-season="saint-valentin"] { --bg: #170812; --bg-2: #1f0b18; --panel: #2a1022; --panel-2: #36152c; }
:root[data-theme="light"][data-season] { --bg: #f6f3ff; --bg-2: #ede8ff; --panel: #ffffff; --panel-2: #f3efff; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.theme-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg-2); cursor: pointer; color: var(--text); }
.theme-card[style] { background: linear-gradient(135deg, color-mix(in srgb, var(--t1) 30%, var(--bg-2)), color-mix(in srgb, var(--t2) 25%, var(--bg-2))); }
.theme-card.active { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(255, 95, 162, .25); }
.theme-ico { font-size: 1.8rem; }
.theme-card small { color: var(--muted); font-size: .72rem; }

/* Confettis */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 400; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; font-style: normal; font-size: 22px; animation: confetti linear forwards; }
@keyframes confetti { to { transform: translate(var(--x), 105vh) rotate(var(--r)); opacity: .9; } }

/* ===== Anniversaires ===== */
.uname-wrap { white-space: nowrap; }
.bday-cake { display: inline-block; animation: badgebob 2s ease-in-out infinite; }
.pbday { margin-top: 10px; display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--grad); color: #fff; font-weight: 700; font-size: .88rem; }
.bday-item .meta { cursor: pointer; }
.bday-big { font-size: 4rem; animation: badgebob 1.6s ease-in-out infinite; }
.bday-modal h3 { font-size: 1.4rem; }

/* ===== Mode fantôme : signature ===== */
.ghost-sign { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ghost-sign .choice { padding: 5px 10px; font-size: .8rem; }

/* ===== « est en train d'écrire… » ===== */
.typing { height: 26px; display: flex; align-items: center; gap: 8px; padding: 0 22px; opacity: 0; transition: opacity .2s; font-style: normal; }
.typing.on { opacity: 1; }
.typing-dots { display: inline-flex; gap: 3px; padding: 6px 9px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--rose); animation: tdot 1.2s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.typing-text { font-size: .8rem; color: var(--muted); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item.is-typing .sub::before { content: '✍️ écrit… · '; color: var(--rose); font-weight: 600; }

@media (max-width: 760px) {
  .season-banner { margin: 8px 8px 0; font-size: .85rem; }
  .typing { padding: 0 10px; height: 24px; }
  .ghost-banner { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .season-fx, .confetti { display: none; } }
.bday-cake { margin-left: 3px; }
.app ~ .season-fx span, body .app + .season-fx span { opacity: .45; }

/* ===== Fonds de salon (image, GIF, vidéo, fonds animés) ===== */
.main { position: relative; isolation: isolate; }
.main > .room-bg { position: absolute; inset: 0; z-index: -1; }
.room-bg { overflow: hidden; pointer-events: none; background-size: cover; background-position: center; }
.room-bg video { width: 100%; height: 100%; object-fit: cover; display: block; }
.main > .room-bg::after { content: ''; position: absolute; inset: 0; background: rgba(13, 10, 26, .6); }
:root[data-theme="light"] .main > .room-bg::after { background: rgba(246, 243, 255, .72); }
.main.has-room-bg .room-head { background: color-mix(in srgb, var(--bg) 60%, transparent); backdrop-filter: blur(8px); }
.room-bg i { position: absolute; display: block; }
@keyframes bgshift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes spin { to { transform: rotate(360deg); } }
.preset-aurore { background: linear-gradient(125deg, #3a1c71, #d76d77, #ffaf7b, #1fa2ff, #12d8fa, #3a1c71); background-size: 400% 400%; animation: bgshift 22s ease infinite; }
.preset-aurore i:nth-child(1) { inset: -30%; background: radial-gradient(circle at 30% 40%, rgba(51, 214, 166, .35), transparent 45%); animation: spin 30s linear infinite; }
.preset-etoiles { background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%); }
.preset-etoiles i { inset: 0; background-image: radial-gradient(1.6px 1.6px at 20px 30px, #fff, transparent), radial-gradient(1.2px 1.2px at 120px 80px, #fff, transparent), radial-gradient(2px 2px at 220px 150px, #ffe9a8, transparent), radial-gradient(1px 1px at 300px 60px, #fff, transparent), radial-gradient(1.4px 1.4px at 80px 190px, #cfe3ff, transparent); background-size: 340px 230px; animation: twinkle 4s ease-in-out infinite alternate; }
.preset-etoiles i:nth-child(2) { background-size: 260px 180px; background-position: 70px 40px; animation-duration: 6s; animation-delay: -2s; }
.preset-etoiles i:nth-child(3) { background-image: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), transparent); width: 120px; height: 2px; top: 20%; left: -20%; transform: rotate(-25deg); animation: shooting 7s ease-in infinite; }
@keyframes twinkle { from { opacity: .35; } to { opacity: 1; } }
@keyframes shooting { 0%, 80% { left: -20%; top: 10%; opacity: 0; } 82% { opacity: 1; } 100% { left: 110%; top: 55%; opacity: 0; } }
.preset-galaxie { background: #0a0418; }
.preset-galaxie i:nth-child(1) { inset: -60%; background: conic-gradient(from 0deg, #1a0533, #4b1d8f, #c02aa1, #1a0533, #0b3a6e, #1a0533); filter: blur(50px); animation: spin 45s linear infinite; }
.preset-galaxie i:nth-child(2) { inset: 0; background-image: radial-gradient(1.4px 1.4px at 50px 60px, #fff, transparent), radial-gradient(1px 1px at 170px 120px, #fff, transparent); background-size: 230px 170px; animation: twinkle 5s infinite alternate; }
.preset-vagues { background: linear-gradient(#050a1f, #0c1e4a); }
.preset-vagues i { left: -50%; width: 200%; height: 200%; bottom: -165%; border-radius: 43%; background: rgba(79, 179, 255, .18); animation: spin 16s linear infinite; }
.preset-vagues i:nth-child(2) { bottom: -170%; background: rgba(255, 95, 162, .14); animation-duration: 22s; }
.preset-vagues i:nth-child(3) { bottom: -175%; background: rgba(139, 108, 255, .2); animation-duration: 28s; }
.preset-bulles { background: linear-gradient(160deg, #0b486b, #1a7fa0 60%, #3fb6c6); }
.preset-bulles i { inset: 0; background-image: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .5), rgba(255, 255, 255, .08) 60%, transparent 62%); background-size: 60px 60px; background-repeat: space; opacity: .35; animation: bubbles 14s linear infinite; }
.preset-bulles i:nth-child(2) { background-size: 34px 34px; animation-duration: 9s; opacity: .25; }
.preset-bulles i:nth-child(3) { background-size: 90px 90px; animation-duration: 20s; opacity: .2; }
@keyframes bubbles { from { background-position: 0 0; } to { background-position: 40px -600px; } }
.preset-pluie { background: linear-gradient(#0d1b2a, #1b263b); }
.preset-pluie i { inset: 0; background-image: linear-gradient(100deg, transparent 0 48%, rgba(174, 194, 224, .35) 49% 51%, transparent 52%); background-size: 22px 90px; animation: rain .6s linear infinite; }
.preset-pluie i:nth-child(2) { background-size: 37px 130px; animation-duration: .9s; opacity: .6; }
.preset-pluie i:nth-child(3) { background-size: 53px 160px; animation-duration: 1.2s; opacity: .4; }
@keyframes rain { from { background-position: 0 0; } to { background-position: -20px 160px; } }
.preset-coucher { background: linear-gradient(180deg, #2b1055, #7597de 30%, #ff9a8b 60%, #ff6a88 80%, #ff99ac); background-size: 100% 300%; animation: bgshift 25s ease-in-out infinite; }
.preset-coucher i:nth-child(1) { width: 200px; height: 200px; border-radius: 50%; left: calc(50% - 100px); bottom: 10%; background: radial-gradient(circle, #ffe29f, #ff9f43 60%, transparent 70%); animation: sunset 25s ease-in-out infinite; }
@keyframes sunset { 50% { transform: translateY(80px) scale(1.1); } }
.preset-feu { background: radial-gradient(ellipse at bottom, #3a0d00, #120400 70%); }
.preset-feu i { left: 20%; right: 20%; bottom: -20%; height: 80%; border-radius: 50% 50% 0 0; background: radial-gradient(ellipse at bottom, rgba(255, 170, 0, .7), rgba(255, 70, 0, .4) 40%, transparent 70%); filter: blur(20px); animation: flicker 1.8s ease-in-out infinite alternate; }
.preset-feu i:nth-child(2) { left: 5%; right: 45%; animation-duration: 2.4s; opacity: .7; }
.preset-feu i:nth-child(3) { left: 50%; right: 5%; animation-duration: 2.1s; opacity: .7; }
@keyframes flicker { 0% { transform: scaleY(1) translateX(0); } 50% { transform: scaleY(1.15) translateX(-8px); } 100% { transform: scaleY(.92) translateX(6px); } }
.bg-preview { position: relative; height: 120px; display: grid; place-items: center; }
.bg-none { position: relative; color: var(--muted); }
.bg-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bg-preset { border: 2px solid var(--line); border-radius: 12px; padding: 0; overflow: hidden; background: none; cursor: pointer; color: var(--text); }
.bg-preset.active { border-color: var(--rose); }
.bg-preset .room-bg { display: block; position: relative; height: 54px; }
.bg-preset small { display: block; padding: 4px; font-size: .72rem; }

/* ===== Sourdine personnelle ===== */
.list-item.is-muted { opacity: .55; }
.mute-left { color: var(--gold); font-weight: 600; }
.muted-msg { cursor: pointer; font-style: italic; }
.muted-msg:hover { color: var(--text); }

/* ===== Mini-jeux ===== */
body.hub-open { overflow: hidden; }
.games-hub { position: fixed; inset: 0; z-index: 200; background: rgba(5, 3, 15, .65); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.gh-card { width: 100%; max-width: 860px; height: min(92dvh, 820px); background: var(--panel); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.gh-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.gh-head h2 { margin: 0; font-size: 1.25rem; }
.gh-body { flex: 1; overflow-y: auto; padding: 16px 18px 24px; }
.gh-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.gh-bar b { font-size: 1.1rem; }
.gh-info { margin-left: auto; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.game-grid.small { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.game-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); cursor: pointer; transition: transform .12s, border-color .12s; }
.game-card:hover { transform: translateY(-2px); border-color: var(--rose); }
.gc-ico { font-size: 2rem; }
.game-card small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.gc-stat { margin-top: auto; padding-top: 6px; font-size: .75rem; color: var(--gold); font-weight: 600; }
.game-area { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.center { text-align: center; }
.game-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: color-mix(in srgb, var(--panel) 92%, transparent); border-radius: 18px; padding: 20px; z-index: 5; animation: sheet .25s ease; }
.game-over.inline { position: static; background: none; padding: 10px 0 0; }
.go-ico { font-size: 3.2rem; }
.game-over h3 { margin: 6px 0; }
.go-rec { color: var(--gold); font-weight: 700; }
.lb { display: flex; flex-direction: column; gap: 6px; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--bg-2); }
.lb-row.me { box-shadow: inset 3px 0 0 var(--rose); }
.lb-rank { width: 28px; text-align: center; font-weight: 800; }
.lb-score { margin-left: auto; color: var(--muted); font-weight: 600; }
/* Serpent */
.snake-cv { border-radius: 14px; touch-action: none; border: 1px solid var(--line); max-width: 100%; }
.dpad { display: grid; grid-template-columns: repeat(3, 56px); gap: 6px; }
.pad-btn { height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font-size: 1.1rem; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .dpad { display: none; } }
/* Démineur */
.mine-grid { display: grid; gap: 3px; width: min(100%, 400px); }
.mine-cell { aspect-ratio: 1; border: 0; border-radius: 6px; background: var(--panel-2); color: var(--text); font-weight: 800; font-size: clamp(.8rem, 3.5vw, 1.05rem); cursor: pointer; padding: 0; user-select: none; -webkit-user-select: none; }
.mine-cell:hover { filter: brightness(1.2); }
.mine-cell.open { background: var(--bg-2); cursor: default; }
.mine-cell.boom { background: rgba(255, 90, 110, .3); }
/* Memory */
.memory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: min(100%, 400px); perspective: 800px; }
.mem-card { position: relative; aspect-ratio: 1; border: 0; background: none; padding: 0; cursor: pointer; transform-style: preserve-3d; transition: transform .35s; }
.mem-card span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 12px; backface-visibility: hidden; font-size: clamp(1.4rem, 7vw, 2.2rem); }
.mem-back { background: var(--grad); color: #fff; }
.mem-front { background: var(--bg-2); transform: rotateY(180deg); border: 1px solid var(--line); }
.mem-card.flip { transform: rotateY(180deg); }
.mem-card.done .mem-front { box-shadow: 0 0 0 2px var(--green) inset; }
/* Pendu */
.pendu-lives { font-size: 1.3rem; letter-spacing: 2px; }
.pendu-word { font-size: clamp(1.4rem, 6vw, 2.2rem); font-weight: 800; letter-spacing: 4px; margin: 10px 0; text-align: center; word-break: break-all; }
.pendu-kb { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; width: min(100%, 520px); }
.pendu-kb button { height: 42px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font-weight: 700; cursor: pointer; padding: 0; }
.pendu-kb button.good { background: var(--green); color: #062; border-color: transparent; }
.pendu-kb button.bad { opacity: .3; }
/* Taquin */
.taquin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(100%, 320px); }
.taq-tile { aspect-ratio: 1; border: 0; border-radius: 14px; background: var(--grad); color: #fff; font-size: 2rem; font-weight: 800; cursor: pointer; }
.taq-tile.empty { background: var(--bg-2); cursor: default; }
/* Réflexes */
.reflex-zone { width: min(100%, 520px); height: 300px; border: 0; border-radius: 22px; background: var(--panel-2); color: var(--text); font-size: 1.4rem; font-weight: 800; cursor: pointer; transition: background .1s; }
.reflex-zone.wait { background: #c0392b; color: #fff; }
.reflex-zone.go { background: #27ae60; color: #fff; }
.reflex-zone.early { background: var(--gold); color: #2a1600; }
/* Quiz */
.quiz-box { width: min(100%, 560px); }
.quiz-q { font-size: 1.2rem; font-weight: 700; text-align: center; margin: 8px 0 12px; }
.quiz-timer { height: 6px; border-radius: 99px; background: var(--bg-2); overflow: hidden; margin-bottom: 14px; }
.quiz-timer i { display: block; height: 100%; width: 100%; background: var(--grad); }
.quiz-timer i.run { width: 0; transition: width var(--qt, 10s) linear; }
.quiz-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiz-choice { padding: 14px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font-weight: 600; cursor: pointer; font-size: .95rem; }
.quiz-choice:hover:not(:disabled) { border-color: var(--violet); }
.quiz-choice.good { background: var(--green); color: #052; border-color: transparent; }
.quiz-choice.bad { background: var(--red); color: #fff; border-color: transparent; }
.quiz-choice.dim { opacity: .45; }
.quiz-choice.picked { border-color: var(--rose); box-shadow: 0 0 0 2px var(--rose) inset; }
.quiz-other { font-size: .75rem; opacity: .85; }
/* Parties à deux */
.vs-head { display: flex; align-items: center; justify-content: center; gap: 16px; width: 100%; }
.vs-player { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 14px; border-radius: 14px; min-width: 110px; border: 2px solid transparent; }
.vs-player.turn { border-color: var(--rose); background: color-mix(in srgb, var(--rose) 10%, transparent); }
.vs-player b { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-x { font-weight: 800; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.vs-board { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.vs-foot { min-height: 24px; color: var(--muted); font-weight: 600; text-align: center; width: 100%; }
.ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(100%, 330px); }
.ttt-cell { aspect-ratio: 1; border: 0; border-radius: 16px; background: var(--bg-2); font-size: 2.6rem; cursor: pointer; color: var(--text); }
.ttt-cell:disabled { cursor: default; }
.ttt-cell.win { background: color-mix(in srgb, var(--green) 35%, var(--bg-2)); }
.c4 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; width: min(100%, 440px); padding: 8px; border-radius: 16px; background: #2547a8; }
.c4-cell { aspect-ratio: 1; border-radius: 50%; border: 0; background: var(--bg); cursor: pointer; padding: 0; transition: background .2s; }
.c4-cell:disabled { cursor: default; }
.c4-cell.p0 { background: #ff4d5e; }
.c4-cell.p1 { background: #ffd23f; }
.c4-cell.last { box-shadow: 0 0 0 3px #fff inset; }
.c4-cell.win { box-shadow: 0 0 0 4px var(--green) inset, 0 0 12px var(--green); }
.rps { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.rps-btn { width: 104px; height: 120px; border-radius: 20px; border: 2px solid var(--line); background: var(--bg-2); color: var(--text); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.rps-btn span { font-size: 2.6rem; }
.rps-btn small { text-transform: capitalize; color: var(--muted); }
.rps-btn.picked { border-color: var(--rose); background: color-mix(in srgb, var(--rose) 14%, var(--bg-2)); }
.rps-hist { display: flex; flex-direction: column; gap: 6px; width: min(100%, 340px); }
.rps-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 14px; border-radius: 10px; background: var(--bg-2); font-size: 1.3rem; }
.rps-row b { font-size: .85rem; }
.rps-row.last { box-shadow: 0 0 0 2px var(--violet) inset; }
.frappe-count { font-size: 1.3rem; font-weight: 800; }
.frappe-text { width: min(100%, 620px); padding: 14px 16px; border-radius: 14px; background: var(--bg-2); font-size: 1.15rem; line-height: 1.6; user-select: none; -webkit-user-select: none; }
.frappe-text .ok { color: var(--green); }
.frappe-text .ko { background: rgba(255, 90, 110, .35); border-radius: 3px; }
.frappe-input { width: min(100%, 620px); font-size: 16px; }
.frappe-bars { width: min(100%, 620px); display: flex; flex-direction: column; gap: 8px; }
.frappe-bar { display: grid; grid-template-columns: 90px 1fr 60px; align-items: center; gap: 10px; font-size: .85rem; }
@media (max-width: 760px) {
  .games-hub { padding: 0; place-items: stretch; }
  .gh-card { max-width: none; height: 100dvh; border-radius: 0; border: 0; }
  .gh-head { padding: calc(10px + env(safe-area-inset-top)) 12px 10px; }
  .gh-body { padding: 12px 12px calc(20px + env(safe-area-inset-bottom)); }
  .game-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .game-card { padding: 12px; }
  .gc-ico { font-size: 1.6rem; }
  .pendu-kb { grid-template-columns: repeat(7, 1fr); }
  .reflex-zone { height: 240px; }
  .quiz-choices { grid-template-columns: 1fr; }
  .vs-player { min-width: 0; padding: 6px 8px; }
  .vs-player b { max-width: 90px; font-size: .85rem; }
  .bg-presets { grid-template-columns: repeat(2, 1fr); }
  .frappe-bar { grid-template-columns: 60px 1fr 46px; }
}
/* Les fenêtres et notifications passent au-dessus de la section jeux */
body.hub-open .modal-back { z-index: 260; }
.toasts { z-index: 280; }
.main > .room-bg[class*="preset-"]::after { background: rgba(13, 10, 26, .32); }
:root[data-theme="light"] .main > .room-bg[class*="preset-"]::after { background: rgba(246, 243, 255, .55); }

/* ===== Salons permanents / temporaires ===== */
:root { --room-perm: #4fb3ff; --room-temp: #ffb547; }
.room-perm { color: var(--room-perm); }
.room-temp { color: var(--room-temp); }
#headTitle.room-perm, #headTitle.room-temp { font-weight: 800; }
.room-legend { display: flex; gap: 14px; padding: 8px 10px 0; font-size: .75rem; color: var(--muted); }
.room-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.dot-perm { background: var(--room-perm); }
.dot-temp { background: var(--room-temp); }
.room-type { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.room-type-card { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg-2); color: var(--text); cursor: pointer; }
.room-type-card small { color: var(--muted); font-size: .75rem; }
.room-type-card.perm b { color: var(--room-perm); }
.room-type-card.temp b { color: var(--room-temp); }
.room-type-card.active.perm { border-color: var(--room-perm); }
.room-type-card.active.temp { border-color: var(--room-temp); }
.room-type-card:disabled { opacity: .5; cursor: not-allowed; }
.room-color-preview { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-weight: 700; }
.side-title .btn-sm:not(.btn-primary) { padding: 3px 10px; font-size: .72rem; letter-spacing: 0; text-transform: none; }
.backup-ok { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(51, 214, 166, .12); border: 1px solid rgba(51, 214, 166, .4); display: flex; flex-direction: column; gap: 4px; }
.admin-layout aside .logo { font-size: 1.12rem; white-space: nowrap; }

/* ===== Menu de mon compte ===== */
.user-menu-wrap { position: relative; }
.user-menu { position: absolute; right: 0; top: 52px; width: 250px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 8px; z-index: 130; animation: sheet .15s ease; }
.um-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.um-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 10px; background: none; color: var(--text); cursor: pointer; font-size: .92rem; text-align: left; }
.um-item:hover { background: var(--panel-2); }
.um-item span { width: 22px; text-align: center; }
.um-item.danger { color: var(--red); font-weight: 700; }
.um-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.side-links .logout-link { color: var(--red); border-color: rgba(255, 90, 110, .4); }
@media (max-width: 760px) { .user-menu { position: fixed; right: 8px; top: calc(60px + env(safe-area-inset-top)); width: min(280px, calc(100vw - 16px)); } }

/* ===== Douane ===== */
.customs-banner { background: linear-gradient(90deg, rgba(79, 179, 255, .16), transparent); border-bottom-color: rgba(79, 179, 255, .35); }
.verify-btn { flex: none; padding: 4px 8px; background: rgba(51, 214, 166, .18); }

/* ===== Espace staff ===== */
.staff-wrap { max-width: 460px; margin: 0 auto; padding: 10px 16px 60px; }
.staff-card { text-align: left; }
.staff-card h1 { text-align: center; margin: 0 0 6px; }
.staff-ico { font-size: 3rem; text-align: center; }
.staff-me { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--bg-2); margin: 14px 0; }
.code-input { font-family: ui-monospace, monospace; letter-spacing: 1px; text-transform: uppercase; font-size: 16px; }
.code-show { font-family: ui-monospace, monospace; font-size: 1rem; padding: 8px 12px; border-radius: 10px; background: var(--bg-2); letter-spacing: 1px; }
.staff-foot { margin-top: 16px; }

/* ===== Neige (thèmes Hiver et Noël) ===== */
.season-fx .flake { position: absolute; top: -12px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, .8); animation: fall linear infinite; }
:root[data-season="hiver"] { --bg: #070d1a; --bg-2: #0b1426; --panel: #111d35; --panel-2: #172744; }
:root[data-theme="light"][data-season="hiver"] .season-fx .flake { background: #8fb8ff; box-shadow: 0 0 6px rgba(91, 140, 255, .6); }

/* ===== Volume (appels et vocal) ===== */
.vol-row { display: flex; align-items: center; gap: 8px; }
.vol-range { flex: 1; accent-color: var(--rose); min-width: 0; }
.vol-val { min-width: 48px; text-align: right; font-variant-numeric: tabular-nums; }
.vol-person { padding: 8px 10px; border-radius: 12px; background: var(--bg-2); margin-bottom: 6px; }
.vol-who { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-weight: 600; }
.vol-who .avatar { width: 26px; height: 26px; font-size: .75rem; }
.call-volume { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 2; width: min(340px, calc(100vw - 32px)); padding: 8px 14px; border-radius: 999px; background: rgba(0, 0, 0, .45); backdrop-filter: blur(8px); color: #fff; }
.call-volume .vol-val { color: #fff; }

/* ===== Médias partagés ===== */
.chat-photo { display: block; max-width: min(320px, 100%); max-height: 320px; border-radius: 14px; margin-top: 6px; cursor: zoom-in; object-fit: cover; background: var(--bg-2); }
.bubble.photo { padding: 6px; }
.bubble.photo .chat-photo { margin: 0; max-width: min(280px, 70vw); }
.bubble .chat-embed, .bubble .link-card { max-width: min(320px, 70vw); }
.chat-video { display: block; max-width: min(360px, 100%); max-height: 300px; border-radius: 14px; margin-top: 6px; background: #000; }
.chat-embed { position: relative; width: min(420px, 100%); aspect-ratio: 16 / 9; margin-top: 6px; border-radius: 14px; overflow: hidden; background: #000; cursor: pointer; }
.chat-embed.short { width: min(240px, 100%); aspect-ratio: 9 / 16; }
.chat-embed img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .9; }
.chat-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.embed-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 44px; border-radius: 12px; background: rgba(255, 0, 0, .9); color: #fff; display: grid; place-items: center; font-size: 1.3rem; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); }
.chat-embed:hover .embed-play { background: #ff0000; }
.embed-src { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(0, 0, 0, .65); color: #fff; font-size: .74rem; font-weight: 700; }
.embed-label { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font-weight: 700; }
.chat-spotify { display: block; width: min(420px, 100%); height: 152px; border: 0; border-radius: 14px; margin-top: 6px; }
.chat-spotify.tall { height: 352px; }
.link-card { display: flex; gap: 10px; width: min(420px, 100%); margin-top: 6px; border-radius: 14px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.link-card.loading { height: 0; border: 0; margin: 0; }
.link-card img { width: 96px; min-height: 80px; object-fit: cover; flex: none; }
.lc-body { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 8px 0; min-width: 0; }
.link-card img + .lc-body { padding-left: 0; }
.link-card .lc-body:first-child { padding-left: 12px; }
.lc-body small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.lc-body b { font-size: .9rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lc-body span { font-size: .8rem; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(0, 0, 0, .9); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; }
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 12px; object-fit: contain; }
.lb-cap { color: #fff; max-width: 600px; text-align: center; }
.lb-actions { display: flex; gap: 8px; }
.photo-preview { display: block; max-width: 100%; max-height: 45vh; margin: 0 auto; border-radius: 14px; }
.main.dropping::before { content: '📷 Dépose ta photo ici'; position: absolute; inset: 8px; z-index: 50; border: 3px dashed var(--rose); border-radius: 18px; background: rgba(13, 10, 26, .75); display: grid; place-items: center; font-size: 1.3rem; font-weight: 800; color: #fff; }
.modal.gallery-modal { max-width: 760px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.gallery-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
.gallery-list { display: flex; flex-direction: column; gap: 12px; }
.gallery-item { padding: 8px; border-radius: 12px; background: var(--bg-2); }
@media (max-width: 760px) {
  #attachBtn { flex: none; }
  .composer.empty #attachBtn { display: inline-grid; }
  .chat-embed, .chat-spotify, .link-card { width: 100%; }
}

/* =====================================================================
   Réajustement téléphone & tablette
   ===================================================================== */
.side-title { white-space: nowrap; gap: 8px; }
.side-title .btn-sm { flex: none; }
.composer .input { min-width: 0; flex: 1 1 auto; }
.composer textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- Tablettes (paysage et portrait) --- */
@media (max-width: 1100px) {
  .drawer-back.show { display: block; position: fixed; inset: 64px 0 0 0; background: rgba(0, 0, 0, .4); z-index: 40; }
  .sidebar.right { width: 320px; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .app { grid-template-columns: 270px 1fr; }
}
/* Tablette en portrait : le chat prend toute la largeur, les salons s'ouvrent avec ☰ */
@media (min-width: 761px) and (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar.left { position: fixed; left: 0; top: 64px; bottom: 0; width: 330px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.left.open { transform: none; box-shadow: var(--shadow); }
  .mobile-only { display: inline-grid; }
  .room-head { flex-wrap: nowrap; }
  .room-head h2, .room-head p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bubble { max-width: 80%; }
  .admin-layout { grid-template-columns: 210px 1fr; }
  .admin-layout main { padding: 22px 20px; }
}

/* --- Téléphones --- */
@media (max-width: 760px) {
  .drawer-back.show { top: calc(56px + env(safe-area-inset-top)); }

  /* En-tête : boutons compacts, pas de badge "Invité" coincé */
  .app-header { gap: 0; padding-left: 4px; padding-right: 6px; }
  .app-header .btn-icon { width: 38px; height: 38px; font-size: 1.05rem; }
  .me-chip { border: 0; background: none; padding: 0; margin-left: 2px; }
  .me-chip .badge { display: none; }
  .me-chip .avatar { width: 36px; height: 36px; }

  /* Bandeaux : une seule ligne, discrets */
  .season-banner { margin: 6px 8px 0; padding: 4px 4px 4px 12px; font-size: .78rem; font-weight: 600; border-radius: 12px; }
  .season-banner > :not(.btn-icon) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
  .season-banner .btn-icon { width: 26px; height: 26px; flex: none; }
  .announce, .ghost-banner { font-size: .84rem; }

  /* Zone de saisie : la place pour écrire d'abord */
  .composer { gap: 4px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); align-items: flex-end; }
  .composer .btn-icon { width: 36px; height: 40px; padding: 0; font-size: 1.1rem; background: none; border-color: transparent; }
  .composer .input { min-height: 42px; padding: 10px 12px; border-radius: 20px; line-height: 1.3; }
  .composer:not(.empty) #dictateBtn, .composer:not(.empty) #attachBtn { display: none; }
  .composer .send-btn { width: 42px; height: 42px; border-radius: 50%; }
  .emoji-panel { bottom: 58px; }

  /* Menu du compte */
  .user-menu { max-height: calc(100dvh - 80px); overflow-y: auto; }
  .um-item { padding: 12px 10px; font-size: 1rem; }

  /* Éditeur de profil : barre d'enregistrement qui ne cache plus le contenu */
  .editor-form { padding-bottom: 8px; }
  .editor-save { padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 16px -8px rgba(0, 0, 0, .45); }
  .editor-body { min-height: 0; }

  /* Admin : tableaux transformés en fiches lisibles */
  table.cards-on-mobile, table.cards-on-mobile tbody, table.cards-on-mobile tr, table.cards-on-mobile td { display: block; width: 100%; }
  table.cards-on-mobile thead { display: none; }
  table.cards-on-mobile tr { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; }
  table.cards-on-mobile td { border: 0; padding: 4px 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
  table.cards-on-mobile td[data-label]::before { content: attr(data-label); flex: 0 0 82px; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
  table.cards-on-mobile td:first-child::before { display: none; }
  table.cards-on-mobile td:first-child { padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
  table.cards-on-mobile td:empty { display: none; }
  table.cards-on-mobile td .btn-sm { padding: 7px 10px; }
  .table-wrap { overflow-x: visible; }
  .toolbar { flex-wrap: wrap; }
  .toolbar select.input { max-width: none !important; flex: 1 1 100%; }
}
@media (max-width: 380px) {
  .app-header .btn-icon { width: 34px; }
  .composer .btn-icon { width: 32px; }
}

/* ===== Connexion à l'espace admin ===== */
.admin-layout.locked { grid-template-columns: 1fr; }
.admin-layout.locked main { display: grid; place-items: start center; padding-top: 10vh; }
.admin-login { width: 100%; max-width: 420px; }
.admin-login h1 { text-align: center; margin: 4px 0 6px; }
.admin-login .input { font-size: 16px; }
@media (max-width: 760px) { .admin-layout { grid-template-rows: auto 1fr; align-content: start; } }

/* ===== Salon Karaoké ===== */
.karaoke-bar { flex: none; margin: 10px 16px 0; padding: 10px; border-radius: 18px; background: linear-gradient(135deg, rgba(255, 95, 162, .16), rgba(139, 108, 255, .16)); border: 1px solid rgba(255, 95, 162, .35); display: flex; flex-direction: column; gap: 8px; }
.k-stage { display: flex; align-items: center; gap: 12px; min-width: 0; }
.k-stage.mine { animation: kglow 1.6s ease-in-out infinite alternate; border-radius: 14px; }
@keyframes kglow { to { box-shadow: 0 0 0 3px rgba(255, 181, 71, .5); } }
.k-thumb { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; flex: none; background: var(--bg-2); }
.k-now { flex: 1; min-width: 0; }
.k-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--gold); }
.k-title { font-size: .88rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-actions { display: flex; gap: 6px; flex: none; }
.k-video { position: relative; width: 100%; max-width: 720px; margin: 0 auto; aspect-ratio: 16 / 9; max-height: 45vh; border-radius: 14px; overflow: hidden; background: #000; }
.k-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.k-bottom { display: flex; align-items: center; gap: 8px; min-width: 0; }
.k-queue { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; align-items: center; scrollbar-width: none; }
.k-queue::-webkit-scrollbar { display: none; }
.k-qlabel { font-size: .75rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.k-chip { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis; font-size: .8rem; padding: 4px 10px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.k-chip.mine { border-color: var(--rose); }
.k-x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 0 0 2px; }
.k-x:hover { color: var(--red); }
.k-pick { flex: none; }
.k-search { display: flex; gap: 8px; margin-bottom: 10px; }
.k-search .input { flex: 1; min-width: 0; }
.k-results { display: flex; flex-direction: column; gap: 6px; max-height: 42vh; overflow-y: auto; margin-bottom: 10px; }
.k-result { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; background: var(--bg-2); }
.k-result img { width: 88px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex: none; }
.k-rmeta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.k-rmeta b { font-size: .86rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.k-rmeta small { color: var(--muted); font-size: .75rem; }
.k-catlabel { font-weight: 700; margin: 4px 0 6px; }
.k-catalog details { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-bottom: 6px; background: var(--bg-2); }
.k-catalog summary { cursor: pointer; font-weight: 600; }
.k-songs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bot-av { background: linear-gradient(135deg, #ffb547, #ff5fa2) !important; display: grid; place-items: center; font-size: 1.1rem; }
.bot-msg .text { white-space: pre-line; }
.badge.bot { background: rgba(255, 181, 71, .2); color: var(--gold); }
@media (max-width: 760px) {
  .karaoke-bar { margin: 6px 8px 0; padding: 8px; gap: 6px; }
  .k-thumb { width: 64px; }
  .k-actions .btn-sm { padding: 6px 9px; }
  .k-pick { padding: 6px 10px; font-size: .78rem; }
  .k-video { max-height: 32vh; }
}
/* DJ Bot (salon Musique) */
.karaoke-bar.music { background: linear-gradient(135deg, rgba(79, 179, 255, .16), rgba(139, 108, 255, .16)); border-color: rgba(79, 179, 255, .4); }
.karaoke-bar.music .k-label { color: #4fb3ff; }
.k-title-main { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-video.mini { height: 1px; max-height: 1px; aspect-ratio: auto; opacity: .01; margin: 0; }
.k-stage-box, .k-video-box { min-width: 0; }
.k-video-box:empty { display: none; }
@media (max-width: 760px) {
  .k-stage { flex-wrap: wrap; row-gap: 6px; }
  .k-now { flex: 1 1 0; }
  .k-actions { width: 100%; }
  .k-actions .btn { flex: 1; }
}

/* ===== Logo ===== */
.logo img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(56, 220, 230, .35)); }
.hero-logo { display: block; width: min(340px, 70%); height: auto; margin: 0 0 18px -8px; filter: drop-shadow(0 12px 40px rgba(56, 220, 230, .3)); }
@media (max-width: 760px) {
  .logo img { width: 38px; height: 38px; }
  .hero-logo { width: min(260px, 72vw); margin: 0 auto 14px; }
}
@media (max-width: 760px) { .app-header .logo img { width: 44px; height: 44px; } }

/* ===== Badge « Validé » à côté de la photo ===== */
.avatar .v-tick { position: absolute; top: -3px; right: -4px; width: 15px; height: 15px; border-radius: 50%; background: #1d9bf0; color: #fff; font-size: 9px; font-weight: 900; line-height: 1; display: grid; place-items: center; border: 2px solid var(--bg-2); box-sizing: content-box; z-index: 1; }
.avatar.lg .v-tick { width: 24px; height: 24px; font-size: 14px; top: 0; right: 0; border-width: 3px; }
.verify-btn.refuse { margin-left: 2px; }

/* ===== Salon TV ===== */
.karaoke-bar.tv-bar { background: linear-gradient(135deg, rgba(51, 214, 166, .14), rgba(79, 179, 255, .14)); border-color: rgba(51, 214, 166, .4); }
.tv-bar .k-label { color: var(--green); }
.tv-logo { object-fit: contain !important; background: rgba(255, 255, 255, .9) !important; padding: 4px; box-sizing: border-box; }
.tv-noimg { display: grid; place-items: center; font-size: 1.4rem; background: var(--panel) !important; width: 88px; aspect-ratio: 16 / 9; border-radius: 8px; flex: none; }
.tv-video video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.tv-filters { display: flex; gap: 8px; margin-bottom: 10px; }
.tv-filters > * { flex: 1; min-width: 0; }
.tv-list { max-height: 50vh; }
.tv-item { border: 1px solid var(--line); color: var(--text); cursor: pointer; text-align: left; font: inherit; }
.tv-item:hover { border-color: var(--green); }
.tv-item img { object-fit: contain; background: rgba(255, 255, 255, .9); padding: 3px; box-sizing: border-box; }
@media (max-width: 760px) { .tv-filters { flex-direction: column; } }
.tv-fail { margin-top: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 181, 71, .12); border: 1px dashed rgba(255, 181, 71, .5); font-size: .84rem; line-height: 1.5; }

/* ===== Badges de la douane : 🎙️ voix et 📷 caméra ===== */
.dbadges { display: inline-flex; gap: 3px; margin-left: 4px; vertical-align: middle; }
.dbadge { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font-size: .72rem; background: var(--panel-2); border: 1px solid var(--line); filter: grayscale(1); opacity: .55; }
.dbadge.ok { filter: none; opacity: 1; background: rgba(51, 214, 166, .18); border-color: var(--green); }
.verify-btn.on, .btn-ok { background: rgba(51, 214, 166, .18) !important; border-color: var(--green) !important; color: var(--text); }
/* Badge V (photo vérifiée) et vérification des photos */
.dbadge.vphoto { font-weight: 900; font-size: .7rem; color: var(--muted); font-family: inherit; }
.dbadge.vphoto.ok { color: #fff; background: #1d9bf0; border-color: #1d9bf0; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.photo-card { margin: 0; }
.photo-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.photo-compare img, .photo-none { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; display: grid; place-items: center; background: var(--bg-2); color: var(--muted); }
.photo-new { outline: 3px solid var(--gold); cursor: zoom-in; }
#userList .verify-btn { padding: 4px 6px; min-width: 0; font-size: .8rem; flex: none; }
/* Alertes pendant un appel (capture d'écran, caméra allumée) */
.call-notice { position: absolute; left: 50%; top: calc(16px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 5; padding: 10px 16px; border-radius: 999px; background: rgba(0, 0, 0, .75); color: #fff; font-weight: 700; font-size: .9rem; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; animation: sheet .2s ease; }
/* Écoute du vocal sans micro */
.voice-listeners { font-size: .78rem; color: var(--muted); align-self: center; white-space: nowrap; }
.voice-listening { font-size: .82rem; font-weight: 700; color: var(--green); align-self: center; margin-right: 4px; }
.voice-unlock { width: 100%; animation: blink 1.2s infinite; }
.conn-bad, .conn-wait { font-size: .8rem; }
.turn-warn { border-color: rgba(255, 181, 71, .6); background: rgba(255, 181, 71, .1); }
.conn-relay { font-size: .8rem; }

/* ===== Couleurs de l'équipe : Modo 1 bleu clair, Modo 2 bleu foncé, Modo 3 orange, admins en rouge ===== */
.badge.moderator.mod1 { background: #7cc8ff; color: #06263d; }
.badge.moderator.mod2 { background: #2457c5; color: #fff; }
.badge.moderator.mod3 { background: #ff8a1f; color: #2a1200; }
.badge.admin { background: #e5384d; color: #fff; }
.badge.superadmin { background: linear-gradient(135deg, #ff4d5e, #c5162d); color: #fff; box-shadow: 0 0 10px rgba(229, 56, 77, .5); }

/* Bandeau « Modération en ligne » en haut du chat */
.team-bar { display: flex; align-items: center; gap: 8px; padding: 6px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); font-size: .82rem; flex: none; overflow-x: auto; scrollbar-width: none; white-space: nowrap; cursor: pointer; }
.team-bar::-webkit-scrollbar { display: none; }
.team-bar .tb-title { font-weight: 800; color: var(--muted); }
.team-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 3px; border-radius: 999px; background: var(--panel); border: 1px solid var(--tc, var(--line)); font-weight: 700; }
.team-chip .avatar { width: 20px; height: 20px; font-size: .6rem; }
.team-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tc); }
.team-bar .tb-more { margin-left: auto; color: var(--rose); font-weight: 700; }
/* Fenêtre « Équipe de modération » */
.team-group h4 { margin: 14px 0 6px; display: flex; align-items: center; gap: 8px; }
.team-group h4 .sw { width: 12px; height: 12px; border-radius: 4px; background: var(--tc); }
.team-group .powers { font-size: .78rem; color: var(--muted); margin: -2px 0 6px; }
.team-person { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; background: var(--bg-2); margin-bottom: 4px; cursor: pointer; }
.team-person .st { margin-left: auto; font-size: .76rem; color: var(--muted); }
.team-person .st.on { color: var(--green); }
.apply-box { margin-top: 16px; padding: 12px; border-radius: 14px; border: 1px dashed var(--line); background: var(--bg-2); }
@media (max-width: 760px) { .team-bar { padding: 5px 10px; font-size: .78rem; } .team-bar .tb-title .lbl2 { display: none; } }
.app-card.pending { border-color: rgba(255, 181, 71, .6); }
.app-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; }
.app-status { margin-left: auto; font-weight: 700; font-size: .85rem; }
.app-field small { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; font-weight: 700; }
.app-field p { margin: 2px 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.diag summary { cursor: pointer; font-weight: 800; }
.diag-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.diag-row:first-of-type { margin-top: 10px; }
.diag-ico { flex: none; }
/* Nombre de connectés sur le bouton 👥 (téléphone) et dans la douane */
#toggleRight { position: relative; }
.online-badge { background: var(--green) !important; color: #052a1f !important; }
.customs-online { display: block; margin: 4px 0; padding: 0; border: 0; background: none; color: var(--green); font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; text-align: left; }
.verify-steps { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: var(--bg-2); font-size: .92rem; }
/* Barre « tu es en vocal dans un autre salon » */
.voice-mini { display: flex; align-items: center; gap: 8px; padding: 6px 12px; flex: none; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(51, 214, 166, .16), transparent); }
.voice-mini .vm-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; animation: blink 1.6s infinite; }
.voice-mini .vm-where { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: .88rem; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0; }
.voice-mini .vm-where small { color: var(--muted); }
/* Signature du créateur du site */
.signature { color: var(--muted); font-size: .82rem; }
.signature b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
footer.site .signature { width: 100%; text-align: center; padding-top: 8px; border-top: 1px dashed var(--line); }
.um-sig { text-align: center; padding: 8px 6px 2px; font-size: .74rem; }
.admin-sig { padding: 18px 12px 6px; text-align: center; font-size: .76rem; line-height: 1.5; }
@media (max-width: 760px) { .admin-layout aside .admin-sig { display: none; } }

/* ===== Caméras en bande compacte (ne mangent plus la zone de discussion) ===== */
.video-grid { display: flex; gap: 8px; padding: 8px 12px; max-height: none; overflow-x: auto; overflow-y: hidden; align-items: center; scrollbar-width: thin; }
.video-grid .vtile { flex: none; height: 130px; aspect-ratio: 4 / 3; width: auto; border-radius: 12px; }
.video-grid .vtile.mine { height: 100px; opacity: .95; }
.video-grid .vtile.big { height: min(40vh, 340px); aspect-ratio: 4 / 3; grid-column: auto; }
.video-grid .vtile-name { left: 6px; bottom: 6px; font-size: .72rem; padding: 2px 7px; }
.vgrid-toggle { flex: none; align-self: flex-start; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 10px; padding: 4px 10px; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.video-grid.collapsed { padding: 5px 12px; background: transparent; }
@media (max-width: 760px) {
  .video-grid { padding: 6px 8px; gap: 6px; max-height: none; }
  .video-grid .vtile { height: 92px; }
  .video-grid .vtile.mine { height: 72px; }
  .video-grid .vtile.big { height: min(32vh, 240px); }
  .video-grid[data-count="1"] { grid-template-columns: none; }
}

/* Barre du vocal : les pseudos ne sont jamais recouverts ; s'il manque de place, les boutons passent à la ligne */
.voice-bar { row-gap: 8px; }
.voice-people { flex: 1 1 220px; min-width: 160px; }
.voice-chip { flex: none; max-width: 100%; }
.voice-chip .vname { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-ctrl { flex-wrap: wrap; margin-left: auto; justify-content: flex-end; }
@media (max-width: 760px) { .voice-people { min-width: 0; flex-basis: 100%; } .voice-ctrl { margin-left: 0; justify-content: center; } }

/* ===== Caméras détachables et déplaçables ===== */
.vt-btn { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 8px; border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: .85rem; cursor: pointer; display: grid; place-items: center; z-index: 2; opacity: .85; }
.vt-btn:hover { opacity: 1; background: rgba(0, 0, 0, .75); }
.vt-resize { display: none; }
.video-float { position: fixed; inset: 0; pointer-events: none; z-index: 70; }
.vtile.floating { position: fixed; height: auto; aspect-ratio: 4 / 3; pointer-events: auto; cursor: grab; touch-action: none; box-shadow: 0 12px 34px rgba(0, 0, 0, .55); border: 2px solid rgba(255, 255, 255, .25); border-radius: 14px; }
.vtile.floating.mine video { transform: scaleX(-1); }
.vtile.floating.dragging { cursor: grabbing; opacity: .9; box-shadow: 0 18px 44px rgba(0, 0, 0, .7); }
.vtile.floating .vt-resize { display: block; position: absolute; right: 0; bottom: 0; width: 24px; height: 24px; cursor: nwse-resize; z-index: 2;
  background: linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, .7) 50%, rgba(255, 255, 255, .7) 60%, transparent 60%, transparent 72%, rgba(255, 255, 255, .7) 72%, rgba(255, 255, 255, .7) 82%, transparent 82%); }
.video-grid .vtile:not(.floating) { cursor: pointer; }
@media (hover: hover) { .video-grid .vtile:not(.floating) { cursor: grab; } }
/* Boutons − / + des caméras détachées */
.vt-zoom { display: none; }
.vtile.floating .vt-zoom { display: flex; gap: 4px; position: absolute; top: 5px; left: 5px; z-index: 2; }
.vt-zoom .vt-btn { position: static; font-size: 1rem; font-weight: 800; line-height: 1; }
/* Qui regarde ma caméra */
.vt-eye { position: absolute; left: 5px; top: 5px; z-index: 3; border: 0; border-radius: 999px; padding: 2px 8px; background: rgba(0, 0, 0, .6); color: #fff; font: inherit; font-size: .74rem; font-weight: 700; cursor: pointer; }
.vtile.floating .vt-eye { top: auto; bottom: 30px; }
.cv-person { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 12px; background: var(--bg-2); margin-bottom: 5px; }
.cv-title { margin: 14px 0 6px; font-size: .9rem; }
