/* =========================================================
   LogiCall — par Logiciax
   ========================================================= */

:root {
  --accent: #6d5efc;
  --accent-2: #2fd6c3;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --brand: 'Sora', var(--font);
  --fs: 15px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --rail-w: 72px;
  --side-w: clamp(330px, 30vw, 440px);
  --drawer-w: 380px;
  --danger: #ff5d6c;
  --ok: #22c97a;
  --warn: #f5b142;
  --accent-soft: color-mix(in oklab, var(--accent) 16%, transparent);
  --accent-ink: color-mix(in oklab, var(--accent) 75%, white);
}

:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg: #07090f;
  --rail: #0c0f17;
  --panel: #10131c;
  --panel-2: #151925;
  --panel-3: #1b2030;
  --elev: #1a1f2e;
  --hover: rgba(255, 255, 255, .045);
  --active: rgba(255, 255, 255, .08);
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #eceef6;
  --text-2: #b6bccd;
  --muted: #7f879c;
  --bubble-in: #1a1f2d;
  --bubble-out: color-mix(in oklab, var(--accent) 46%, #121522);
  --bubble-out-text: #fff;
  --meta: rgba(236, 238, 246, .55);
  --meta-out: rgba(255, 255, 255, .7);
  --tick-read: #6ff3ff;
  --wall-bg: #0b0e16;
  --wall-ink: rgba(255, 255, 255, .045);
  --glass: rgba(16, 19, 28, .72);
  --shadow: 0 18px 50px rgba(0, 0, 0, .5);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, .35);
  --quote-bg: rgba(0, 0, 0, .22);
  --accent-ink: color-mix(in oklab, var(--accent) 70%, white);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #e7eaf3;
  --rail: #f6f7fb;
  --panel: #ffffff;
  --panel-2: #f5f6fa;
  --panel-3: #eef0f6;
  --elev: #ffffff;
  --hover: rgba(20, 24, 40, .045);
  --active: rgba(20, 24, 40, .08);
  --line: rgba(20, 24, 40, .08);
  --line-2: rgba(20, 24, 40, .14);
  --text: #131726;
  --text-2: #3e4559;
  --muted: #6b7388;
  --bubble-in: #ffffff;
  --bubble-out: color-mix(in oklab, var(--accent) 17%, #fff);
  --bubble-out-text: #131726;
  --meta: rgba(19, 23, 38, .5);
  --meta-out: rgba(19, 23, 38, .55);
  --tick-read: color-mix(in oklab, var(--accent) 85%, #0aa);
  --wall-bg: #edf0f7;
  --wall-ink: rgba(30, 40, 90, .06);
  --glass: rgba(255, 255, 255, .8);
  --shadow: 0 18px 50px rgba(30, 40, 80, .18);
  --shadow-sm: 0 4px 16px rgba(30, 40, 80, .12);
  --quote-bg: rgba(20, 24, 60, .06);
  --accent-ink: color-mix(in oklab, var(--accent) 85%, black);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: color-mix(in oklab, var(--accent) 45%, transparent); }
a { color: var(--accent-ink); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* ===================== Boutons ===================== */
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-grid; place-items: center;
  color: var(--text-2);
  position: relative; overflow: hidden;
  transition: background .2s, color .2s, transform .2s var(--spring);
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn:active { transform: scale(.9); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 10px; }
.icon-btn.sm .ic { width: 18px; height: 18px; }
.icon-btn.on { color: var(--accent-ink); background: var(--accent-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 12px;
  background: var(--panel-3); color: var(--text);
  font-weight: 600; font-size: 14px;
  border: 1px solid var(--line);
  position: relative; overflow: hidden;
  transition: transform .2s var(--spring), background .2s, box-shadow .2s, filter .2s;
}
.btn .ic { width: 18px; height: 18px; }
.btn:hover { background: var(--active); }
.btn:active { transform: scale(.96); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 60%, var(--accent-2)));
  color: #fff; border-color: transparent;
  box-shadow: 0 8px 24px color-mix(in oklab, var(--accent) 40%, transparent);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: color-mix(in oklab, var(--danger) 16%, transparent); color: var(--danger); border-color: color-mix(in oklab, var(--danger) 30%, transparent); }
.btn.danger:hover { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent-ink); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; pointer-events: none; }

.ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: currentColor; opacity: .18;
  transform: scale(0); animation: ripple .6s var(--ease) forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* ===================== Avatars ===================== */
.avatar {
  --s: 48px;
  width: var(--s); height: var(--s); border-radius: 50%;
  flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--a, #6d5efc), var(--b, #2fd6c3));
  color: #fff; font: 700 calc(var(--s) * .36)/1 var(--brand);
  letter-spacing: .02em; position: relative; overflow: hidden; user-select: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.avatar::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 28% 12%, rgba(255, 255, 255, .3), transparent 55%); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.av-emoji { font-size: calc(var(--s) * .48); line-height: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,.2)); }
.av-logo { width: 60%; height: 60%; color: #fff; position: relative; z-index: 1; }
.av-wrap { position: relative; flex: none; }
.online-dot {
  position: absolute; right: 1px; bottom: 1px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--ok); border: 2.5px solid var(--panel); animation: pop .45s var(--spring);
}
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

.verified { width: 16px; height: 16px; color: var(--accent); vertical-align: -3px; margin-left: 4px; flex: none; }

/* ===================== Splash ===================== */
.splash {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(1200px 700px at 50% 40%, #151a34 0%, #07090f 60%);
  display: grid; place-items: center;
  transition: opacity .6s var(--ease), transform .6s var(--ease), filter .6s;
}
.splash.out { opacity: 0; transform: scale(1.08); filter: blur(6px); pointer-events: none; }
.splash-glow {
  position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: conic-gradient(from 0deg, #8b7bff, #2fd6c3, #5b8cff, #8b7bff);
  filter: blur(110px); opacity: .32; animation: spin 8s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }
.splash-center { position: relative; display: flex; flex-direction: column; align-items: center; }
.splash-logo { width: 112px; height: 112px; overflow: visible; filter: drop-shadow(0 18px 40px rgba(91, 140, 255, .45)); }
.sl-bubble { transform-origin: 32px 32px; animation: logoIn .9s var(--spring) both; }
.sl-l { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s .45s var(--ease) forwards; }
.sl-w1 { stroke-dasharray: 14; stroke-dashoffset: 14; opacity: .92; animation: draw .35s .9s var(--ease) forwards; }
.sl-w2 { stroke-dasharray: 26; stroke-dashoffset: 26; opacity: .55; animation: draw .4s 1.08s var(--ease) forwards; }
@keyframes logoIn { from { transform: scale(0) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.splash-title { margin: 22px 0 4px; font: 800 44px/1 var(--brand); letter-spacing: -.02em; color: #fff; display: flex; }
.splash-title span { display: inline-block; opacity: 0; transform: translateY(18px); animation: rise .5s var(--spring) forwards; }
.splash-title span:nth-child(1) { animation-delay: .55s; } .splash-title span:nth-child(2) { animation-delay: .6s; }
.splash-title span:nth-child(3) { animation-delay: .65s; } .splash-title span:nth-child(4) { animation-delay: .7s; }
.splash-title span:nth-child(5) { animation-delay: .78s; color: #7fb2ff; } .splash-title span:nth-child(6) { animation-delay: .83s; color: #6ccfe0; }
.splash-title span:nth-child(7) { animation-delay: .88s; color: #4fd8cc; } .splash-title span:nth-child(8) { animation-delay: .93s; color: #2fd6c3; }
@keyframes rise { to { opacity: 1; transform: none; } }
.splash-sub { margin: 6px 0 26px; color: #9aa3bb; font-size: 14px; letter-spacing: .04em; opacity: 0; animation: fadeIn .5s 1.05s forwards; }
.splash-sub b { color: #dfe4f5; }
.splash-bar { width: 180px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; opacity: 0; animation: fadeIn .3s 1s forwards; }
.splash-bar i { display: block; height: 100%; width: 40%; border-radius: inherit; background: linear-gradient(90deg, #8b7bff, #2fd6c3); animation: load 1s 1s var(--ease) infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes fadeIn { to { opacity: 1; } }
.splash-foot { position: absolute; bottom: 28px; display: flex; align-items: center; gap: 6px; color: #7f879c; font-size: 13px; opacity: 0; animation: fadeIn .5s 1.2s forwards; }
.splash-foot .ic { width: 15px; height: 15px; }

/* ===================== Onboarding ===================== */
.onboard {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(900px 600px at 20% 10%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 60%),
              radial-gradient(900px 600px at 90% 90%, color-mix(in oklab, var(--accent-2) 16%, transparent), transparent 60%), var(--bg);
  transition: opacity .5s var(--ease);
}
.onboard.out { opacity: 0; pointer-events: none; }
.onboard-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ob-bubble {
  position: absolute; padding: 10px 14px; border-radius: 16px 16px 16px 4px; font-weight: 600; font-size: 14px;
  background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  animation: floaty 7s ease-in-out infinite; opacity: .9;
}
.ob-bubble.out { border-radius: 16px 16px 4px 16px; background: var(--bubble-out); color: var(--bubble-out-text); }
.ob-bubble.b1 { top: 12%; left: 8%; } .ob-bubble.b2 { top: 20%; right: 10%; animation-delay: -2s; }
.ob-bubble.b3 { bottom: 22%; left: 12%; animation-delay: -4s; } .ob-bubble.b4 { bottom: 12%; right: 14%; animation-delay: -1s; }
.ob-bubble.b5 { top: 52%; left: 4%; animation-delay: -3s; } .ob-bubble.b6 { top: 60%; right: 5%; animation-delay: -5s; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-18px) rotate(1.5deg); } }
.onboard-card {
  position: relative; width: min(460px, 100%); padding: 36px 32px 28px; border-radius: 28px;
  background: var(--glass); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--line-2); box-shadow: var(--shadow); text-align: center;
  animation: cardIn .7s var(--spring) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(30px) scale(.94); } to { opacity: 1; transform: none; } }
.onboard-card .ob-step { animation: stepIn .5s var(--ease) both; }
@keyframes stepIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
.ob-logo { width: 84px; height: 84px; margin: 0 auto 14px; animation: logoIn .8s var(--spring) both; filter: drop-shadow(0 14px 30px color-mix(in oklab, var(--accent) 50%, transparent)); }
.onboard-card h1 { font: 800 30px/1.15 var(--brand); margin: 0 0 8px; letter-spacing: -.02em; }
.onboard-card h1 .grad { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.onboard-card p.lead { color: var(--text-2); margin: 0 0 22px; line-height: 1.55; }
.ob-features { display: grid; gap: 10px; margin: 0 0 24px; text-align: left; }
.ob-feat { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); opacity: 0; animation: rise .5s var(--spring) forwards; transform: translateY(12px); }
.ob-feat:nth-child(1) { animation-delay: .15s; } .ob-feat:nth-child(2) { animation-delay: .25s; } .ob-feat:nth-child(3) { animation-delay: .35s; } .ob-feat:nth-child(4) { animation-delay: .45s; }
.ob-feat .fi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
.ob-feat b { display: block; font-size: 14px; } .ob-feat span { font-size: 12.5px; color: var(--muted); }
.ob-dots { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }
.ob-dots i { width: 7px; height: 7px; border-radius: 6px; background: var(--line-2); transition: width .3s var(--ease), background .3s; }
.ob-dots i.on { width: 22px; background: var(--accent); }
.ob-avatar { margin: 4px auto 18px; width: max-content; position: relative; }
.ob-avatar .avatar { transition: background .4s; animation: logoIn .6s var(--spring) both; }
.field { display: block; text-align: left; margin-bottom: 14px; }
.field > span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea.input { height: auto; padding: 12px 14px; resize: vertical; min-height: 80px; line-height: 1.45; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%; position: relative;
  background: linear-gradient(135deg, var(--a), var(--b));
  transition: transform .25s var(--spring), box-shadow .2s;
}
.swatch:hover { transform: scale(1.12); }
.swatch.on { box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--a); }
.swatch.on::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; }

/* ===================== Disposition ===================== */
.app {
  display: grid; grid-template-columns: var(--rail-w) var(--side-w) 1fr;
  height: 100vh; height: 100dvh; position: relative; overflow: hidden;
  opacity: 0;
}
.app.ready { opacity: 1; transition: opacity .5s var(--ease); }
.app.ready .rail { animation: slideR .6s var(--ease) both; }
.app.ready .sidebar { animation: slideR .6s .08s var(--ease) both; }
.app.ready .main { animation: fadeUp .7s .16s var(--ease) both; }
@keyframes slideR { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Rail */
.rail {
  background: var(--rail); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; padding: 14px 0; gap: 10px; z-index: 5;
}
.rail-logo { width: 44px; height: 44px; margin-bottom: 10px; transition: transform .4s var(--spring); cursor: default; }
.rail-logo:hover { transform: rotate(-10deg) scale(1.08); }
.rail-logo svg { width: 100%; height: 100%; }
.rail-nav { position: relative; display: flex; flex-direction: column; gap: 6px; }
.rail-pill {
  position: absolute; left: 0; top: 0; width: 48px; height: 48px; border-radius: 14px;
  background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 25%, transparent);
  transition: transform .45s var(--spring), width .3s, height .3s, opacity .2s; pointer-events: none;
}
.rail-pill::before { content: ""; position: absolute; left: -12px; top: 50%; width: 4px; height: 22px; margin-top: -11px; border-radius: 0 4px 4px 0; background: var(--accent); }
.rail-btn {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  color: var(--muted); position: relative; transition: color .2s, background .2s, transform .2s var(--spring);
}
.rail-btn:hover { color: var(--text); background: var(--hover); }
.rail-btn:active { transform: scale(.9); }
.rail-btn.active { color: var(--accent-ink); }
.rail-btn.active:hover { background: transparent; }
.rail-label { display: none; }
.rail-badge {
  position: absolute; top: 5px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 800; display: none; place-items: center;
  border: 2px solid var(--rail); line-height: 1;
}
.rail-badge.show { display: grid; animation: badgeIn .5s var(--spring); }
.rail-badge.danger { background: var(--danger); }
.rail-dot { position: absolute; top: 9px; right: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-2); border: 2px solid var(--rail); display: none; }
.rail-dot.show { display: block; animation: badgeIn .5s var(--spring); }
@keyframes badgeIn { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
.rail-bottom { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rail-me { width: 40px; height: 40px; border-radius: 50%; margin-top: 6px; transition: transform .25s var(--spring), box-shadow .2s; }
.rail-me:hover { transform: scale(1.08); box-shadow: 0 0 0 3px var(--accent-soft); }
.rail-me .avatar { --s: 40px !important; }
.rail-mobile-only { display: none; }

/* Sidebar */
.sidebar { background: var(--panel); border-right: 1px solid var(--line); position: relative; overflow: hidden; z-index: 3; min-width: 0; }
.view {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  opacity: 0; transform: translateX(-14px); pointer-events: none; visibility: hidden;
  transition: opacity .3s var(--ease), transform .35s var(--ease), visibility 0s .35s;
}
.view.active { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .3s var(--ease), transform .35s var(--ease); }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 10px 22px; gap: 10px; min-height: 68px; }
.side-title { font: 800 23px/1.1 var(--brand); margin: 0; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.side-title .icon-btn { margin-left: -8px; }
.side-actions { display: flex; gap: 2px; }
.search {
  margin: 4px 14px 10px; height: 42px; border-radius: 12px; background: var(--panel-3);
  display: flex; align-items: center; gap: 10px; padding: 0 12px; color: var(--muted);
  border: 1px solid transparent; transition: border-color .2s, background .2s, box-shadow .2s;
}
.search:focus-within { border-color: color-mix(in oklab, var(--accent) 50%, transparent); background: var(--panel-2); box-shadow: 0 0 0 4px var(--accent-soft); color: var(--accent-ink); }
.search .ic { width: 18px; height: 18px; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; color: var(--text); font-size: 14px; }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { filter: grayscale(1); opacity: .6; cursor: pointer; }
.search kbd { font: 600 10.5px var(--font); padding: 3px 6px; border-radius: 6px; background: var(--panel); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }

.chips { display: flex; gap: 6px; padding: 0 14px 10px; position: relative; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  height: 32px; padding: 0 14px; border-radius: 16px; font-weight: 600; font-size: 13px; color: var(--text-2);
  background: var(--panel-3); position: relative; z-index: 1; white-space: nowrap; transition: color .25s, background .2s;
}
.chip:hover { background: var(--active); }
.chip.active { color: var(--accent-ink); background: transparent; }
.chip-pill {
  position: absolute; top: 0; left: 0; height: 32px; border-radius: 16px; background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 35%, transparent);
  transition: transform .4s var(--spring), width .4s var(--spring); z-index: 2; pointer-events: none;
}

.list { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 8px 18px; }
.list-label { padding: 14px 14px 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--accent-ink); }
.list-empty { text-align: center; color: var(--muted); padding: 40px 24px; line-height: 1.6; }
.list-empty .big { font-size: 42px; display: block; margin-bottom: 8px; animation: floaty 4s ease-in-out infinite; }

/* Élément de discussion */
.chat-item {
  display: flex; align-items: center; gap: 13px; padding: 10px 12px; border-radius: 14px; cursor: pointer;
  position: relative; transition: background .18s; user-select: none;
}
.chat-item:hover { background: var(--hover); }
.chat-item.active { background: var(--active); }
.chat-item.active::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--accent); animation: growY .35s var(--spring); }
@keyframes growY { from { transform: scaleY(0); } }
.stagger .chat-item, .stagger .call-item, .stagger .status-item, .stagger .s-card { animation: itemIn .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
@keyframes itemIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.ci-body { flex: 1; min-width: 0; padding: 2px 0; }
.ci-top, .ci-bottom { display: flex; align-items: center; gap: 8px; }
.ci-top { justify-content: space-between; margin-bottom: 3px; }
.ci-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; min-width: 0; }
.ci-name > span { overflow: hidden; text-overflow: ellipsis; }
.ci-time { font-size: 12px; color: var(--muted); flex: none; }
.chat-item.unread .ci-time { color: var(--accent-ink); font-weight: 700; }
.ci-preview { flex: 1; min-width: 0; color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.ci-preview > span.t { overflow: hidden; text-overflow: ellipsis; }
.chat-item.unread .ci-preview { color: var(--text-2); }
.ci-preview .pv-ic { width: 15px; height: 15px; flex: none; }
.ci-preview .ticks .ic { width: 17px; height: 17px; }
.ci-preview .who { color: var(--text-2); font-weight: 600; flex: none; }
.ci-preview .typing { color: var(--accent-ink); font-weight: 600; font-style: normal; display: inline-flex; align-items: center; gap: 6px; }
.ci-preview .draft { color: var(--danger); font-weight: 600; flex: none; }
.ci-icons { display: flex; align-items: center; gap: 4px; color: var(--muted); flex: none; }
.ci-icons .ic { width: 16px; height: 16px; }
.badge {
  min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 800; animation: badgeIn .5s var(--spring);
}
.badge.muted { background: var(--muted); }
.badge.dot { min-width: 12px; width: 12px; height: 12px; padding: 0; }
.ci-menu {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--muted);
  margin-right: -4px; max-width: 0; opacity: 0; overflow: hidden; transition: max-width .2s var(--ease), opacity .2s;
}
.ci-menu .ic { width: 18px; height: 18px; }
.chat-item:hover .ci-menu { max-width: 26px; opacity: 1; }
.ci-menu:hover { background: var(--active); color: var(--text); }
.archived-row { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 14px; cursor: pointer; color: var(--text-2); font-weight: 600; transition: background .2s; }
.archived-row:hover { background: var(--hover); }
.archived-row .arc-ic { width: 48px; display: grid; place-items: center; color: var(--accent-ink); }
.archived-row .count { margin-left: auto; color: var(--accent-ink); font-size: 12.5px; }
mark { background: color-mix(in oklab, var(--warn) 45%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.mini-typing { display: inline-flex; gap: 2px; }
.mini-typing i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: bounce 1.2s infinite; }
.mini-typing i:nth-child(2) { animation-delay: .15s; } .mini-typing i:nth-child(3) { animation-delay: .3s; }

/* ===================== Zone principale ===================== */
.main { position: relative; min-width: 0; overflow: hidden; background: var(--wall-bg); transition: margin-right .45s var(--ease); }
@media (min-width: 1280px) { .app.drawer-open .main { margin-right: var(--drawer-w); } }

/* Accueil vide */
.empty {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 30px; overflow: hidden;
  background: radial-gradient(700px 420px at 50% 32%, color-mix(in oklab, var(--accent) 12%, transparent), transparent 70%), var(--panel-2);
  border-bottom: 6px solid var(--accent);
}
.empty-art { position: relative; width: 300px; height: 230px; display: grid; place-items: center; margin-bottom: 18px; }
.empty-logo { width: 104px; height: 104px; filter: drop-shadow(0 20px 40px color-mix(in oklab, var(--accent) 45%, transparent)); animation: breathe 4s ease-in-out infinite; position: relative; z-index: 2; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.orbit { position: absolute; border-radius: 50%; border: 1.5px dashed var(--line-2); animation: spin linear infinite; }
.orbit span { position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px var(--accent); }
.orbit.o1 { width: 160px; height: 160px; animation-duration: 9s; }
.orbit.o2 { width: 220px; height: 220px; animation-duration: 14s; animation-direction: reverse; }
.orbit.o2 span { background: var(--accent-2); box-shadow: 0 0 18px var(--accent-2); }
.orbit.o3 { width: 290px; height: 290px; animation-duration: 22s; opacity: .6; }
.orbit.o3 span { background: #ff7a9a; box-shadow: 0 0 18px #ff7a9a; width: 9px; height: 9px; }
.empty-chip {
  position: absolute; z-index: 3; padding: 8px 12px; border-radius: 14px; font-size: 12.5px; font-weight: 600;
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-sm); white-space: nowrap; animation: floaty 6s ease-in-out infinite;
}
.empty-chip.c1 { top: 6px; left: -30px; } .empty-chip.c2 { bottom: 30px; right: -36px; animation-delay: -2s; } .empty-chip.c3 { bottom: 4px; left: 0; animation-delay: -4s; }
.empty h2 { font: 800 28px/1.2 var(--brand); margin: 0 0 10px; letter-spacing: -.02em; }
.empty > p { color: var(--muted); max-width: 470px; margin: 0 0 24px; line-height: 1.6; font-size: 14.5px; }
.empty-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.empty-foot { position: absolute; bottom: 24px; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; margin: 0; }
.empty-foot .ic { width: 14px; height: 14px; }

/* Discussion */
.chat { position: absolute; inset: 0; display: flex; flex-direction: column; }
.chat.enter .messages { animation: chatIn .4s var(--ease); }
.chat.enter .chat-head-info { animation: fadeUp .4s var(--ease); }
@keyframes chatIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.chat-head {
  height: 66px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 12px 0 14px;
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid var(--line); z-index: 4; position: relative;
}
.back-btn { display: none; }
.chat-head-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 6px 8px; border-radius: 12px; text-align: left; transition: background .2s; }
.chat-head-info:hover { background: var(--hover); }
.chat-head-text { display: flex; flex-direction: column; min-width: 0; }
.chat-head-name { font-weight: 700; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; }
.chat-head-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; height: 17px; }
.chat-head-sub.live { color: var(--accent-ink); font-weight: 600; }
.chat-head-sub.online { color: var(--ok); }
.chat-head-sub .swap { display: inline-block; animation: subIn .35s var(--ease); }
@keyframes subIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.chat-head-actions { display: flex; align-items: center; gap: 4px; }
.call-group { display: flex; border: 1px solid var(--line-2); border-radius: 14px; padding: 2px; margin-right: 4px; }
.call-group .icon-btn { width: 40px; height: 36px; border-radius: 11px; }

.chat-search {
  display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 0; overflow: hidden; flex: none;
  background: var(--panel); border-bottom: 1px solid transparent; color: var(--muted);
  transition: height .3s var(--ease), border-color .3s;
}
.chat-search.open { height: 52px; border-bottom-color: var(--line); }
.chat-search > .ic { width: 18px; height: 18px; }
.chat-search input { flex: 1; border: 0; background: none; outline: none; color: var(--text); font-size: 14px; height: 36px; }
.cs-count { font-size: 12.5px; white-space: nowrap; }

.pinned-banner {
  display: none; align-items: center; gap: 12px; padding: 8px 16px; background: var(--panel); border-bottom: 1px solid var(--line);
  cursor: pointer; flex: none; z-index: 3; transition: background .2s;
}
.pinned-banner.show { display: flex; animation: slideDown .35s var(--ease); }
.pinned-banner:hover { background: var(--panel-2); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
.pinned-banner .pb-ic { width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.pinned-banner .pb-ic .ic { width: 16px; height: 16px; }
.pinned-banner .pb-body { flex: 1; min-width: 0; }
.pinned-banner b { display: block; font-size: 12px; color: var(--accent-ink); }
.pinned-banner span { display: block; font-size: 13.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.messages-wrap { flex: 1; position: relative; min-height: 0; }
.wallpaper { position: absolute; inset: 0; pointer-events: none; background: var(--wall-bg); }
.wallpaper::before { content: ""; position: absolute; inset: 0; }
.wallpaper.wp-doodle::before { background: var(--wall-ink); -webkit-mask: var(--doodle) 0 0 / 280px repeat; mask: var(--doodle) 0 0 / 280px repeat; }
.wallpaper.wp-dots::before { background-image: radial-gradient(var(--wall-ink) 1.6px, transparent 1.6px); background-size: 22px 22px; filter: contrast(2); }
.wallpaper.wp-aurora { background:
    radial-gradient(60% 50% at 15% 20%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(50% 50% at 85% 80%, color-mix(in oklab, var(--accent-2) 18%, transparent), transparent 70%),
    radial-gradient(40% 40% at 70% 15%, color-mix(in oklab, #ff7a9a 12%, transparent), transparent 70%), var(--wall-bg);
  background-size: 160% 160%; animation: aurora 18s ease-in-out infinite alternate; }
@keyframes aurora { 0% { background-position: 0% 0%; } 100% { background-position: 100% 100%; } }
.wallpaper.wp-gradient { background: linear-gradient(160deg, color-mix(in oklab, var(--accent) 14%, var(--wall-bg)), var(--wall-bg) 55%, color-mix(in oklab, var(--accent-2) 10%, var(--wall-bg))); }
.wallpaper.wp-plain { background: var(--wall-bg); }

.messages { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; padding: 14px 0 18px; scroll-behavior: auto; }
.enc-note {
  max-width: 520px; margin: 6px auto 14px; padding: 10px 14px; border-radius: 12px; text-align: center;
  font-size: 12.5px; line-height: 1.5; color: color-mix(in oklab, var(--warn) 70%, var(--text));
  background: color-mix(in oklab, var(--warn) 12%, var(--panel)); border: 1px solid color-mix(in oklab, var(--warn) 18%, transparent);
  cursor: pointer;
}
.enc-note .ic { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; }
.day-sep { position: sticky; top: 6px; z-index: 2; display: flex; justify-content: center; margin: 14px 0 8px; pointer-events: none; }
.day-sep span {
  padding: 6px 12px; border-radius: 10px; font-size: 12px; font-weight: 600; color: var(--text-2);
  background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--shadow-sm); border: 1px solid var(--line);
}
.unread-sep { display: flex; justify-content: center; margin: 14px 0; background: color-mix(in oklab, var(--accent) 10%, transparent); padding: 6px 0; }
.unread-sep span { font-size: 12px; font-weight: 700; color: var(--accent-ink); padding: 4px 12px; border-radius: 10px; background: var(--panel); }
.sys-msg { display: flex; justify-content: center; margin: 10px 6%; }
.sys-msg span { font-size: 12.5px; color: var(--text-2); background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 6px 12px; border-radius: 10px; text-align: center; border: 1px solid var(--line); line-height: 1.45; }
.sys-msg.pop span { animation: fadeUp .4s var(--ease); }

/* Bulles */
.msg-row { display: flex; align-items: flex-end; gap: 6px; padding: 0 6%; margin-top: 2px; position: relative; }
.msg-row.tail { margin-top: 10px; }
.msg-row.out { justify-content: flex-end; }
.msg-row.has-react { margin-bottom: 14px; }
.msg-av { margin-bottom: 1px; }
.av-space { width: 28px; flex: none; }
.bubble-wrap { max-width: min(66%, 560px); position: relative; display: flex; flex-direction: column; min-width: 0; }
.out .bubble-wrap { align-items: flex-end; }
.msg-row.pop .bubble-wrap { animation: bubbleIn .45s var(--spring) both; }
.in.pop .bubble-wrap { transform-origin: 0 100%; }
.out.pop .bubble-wrap { transform-origin: 100% 100%; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(16px) scale(.6); } to { opacity: 1; transform: none; } }
.bubble {
  position: relative; padding: 6px 9px 7px; border-radius: 16px; background: var(--bubble-in); color: var(--text);
  font-size: var(--fs); line-height: 1.42; box-shadow: 0 1px 1.5px rgba(0, 0, 0, .16);
  overflow-wrap: anywhere; min-width: 92px; max-width: 100%; transition: box-shadow .3s, transform .2s;
}
.out .bubble { background: var(--bubble-out); color: var(--bubble-out-text); }
.in.tail .bubble { border-top-left-radius: 5px; }
.out.tail .bubble { border-top-right-radius: 5px; }
.tail .bubble::before { content: ""; position: absolute; top: 0; width: 9px; height: 13px; background: inherit; }
.in.tail .bubble::before { left: -8px; clip-path: polygon(0 0, 100% 0, 100% 100%); border-top-left-radius: 3px; }
.out.tail .bubble::before { right: -8px; clip-path: polygon(0 0, 100% 0, 0 100%); border-top-right-radius: 3px; }
.sender { font-size: 12.8px; font-weight: 700; margin-bottom: 2px; display: flex; align-items: baseline; gap: 6px; }
.sender small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.text { white-space: normal; }
.text code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: .9em; padding: 1px 5px; border-radius: 5px; background: var(--quote-bg); }
.meta-space { display: inline-block; width: 58px; height: 10px; vertical-align: baseline; }
.out .meta-space { width: 76px; }
.has-star .meta-space { width: 74px; } .out.has-star .meta-space { width: 92px; }
.has-edit .meta-space { width: 112px; } .out.has-edit .meta-space { width: 128px; }
.meta { position: absolute; right: 9px; bottom: 5px; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--meta); white-space: nowrap; line-height: 1; pointer-events: none; }
.out .meta { color: var(--meta-out); }
.meta .meta-star { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.meta .edited { font-style: italic; margin-right: 2px; }
.ticks { display: inline-flex; }
.ticks .ic { width: 17px; height: 17px; stroke-width: 2.2; transition: color .3s; }
.ticks.pending .ic { width: 13px; height: 13px; }
.ticks.read { color: var(--tick-read); }
.ticks.anim .ic { animation: tickPop .5s var(--spring); }
@keyframes tickPop { 0% { transform: scale(.4); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
.jumbo .bubble { background: transparent !important; box-shadow: none; padding: 0 2px 18px; }
.jumbo .bubble::before { display: none; }
.jumbo .jumbo-text { font-size: 48px; line-height: 1.15; }
.jumbo.pop .jumbo-text { display: inline-block; animation: jumboIn .7s var(--spring); }
@keyframes jumboIn { 0% { transform: scale(0) rotate(-20deg); } 60% { transform: scale(1.25) rotate(8deg); } 100% { transform: none; } }
.jumbo .meta { bottom: 0; right: 2px; padding: 3px 6px; border-radius: 8px; background: var(--glass); }
.fwd { display: flex; align-items: center; gap: 4px; font-size: 12px; font-style: italic; color: var(--meta); margin-bottom: 2px; }
.out .fwd { color: var(--meta-out); }
.fwd .ic { width: 14px; height: 14px; }
.deleted { display: inline-flex; align-items: center; gap: 6px; font-style: italic; color: var(--meta); }
.out .deleted { color: var(--meta-out); }
.deleted .ic { width: 15px; height: 15px; }

.bubble-menu {
  position: absolute; top: 3px; right: 3px; width: 26px; height: 22px; border-radius: 8px; display: grid; place-items: center;
  color: var(--meta); opacity: 0; transform: translateY(-3px); transition: opacity .15s, transform .2s;
  background: radial-gradient(circle at 70% 40%, var(--bubble-in) 55%, transparent 80%); z-index: 2;
}
.out .bubble-menu { background: radial-gradient(circle at 70% 40%, var(--bubble-out) 55%, transparent 80%); color: var(--meta-out); }
.bubble-menu .ic { width: 18px; height: 18px; }
.bubble:hover .bubble-menu { opacity: 1; transform: none; }
.react-btn {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); flex: none;
  background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--line);
  opacity: 0; transform: scale(.6); transition: opacity .15s, transform .25s var(--spring), color .2s; align-self: center;
}
.react-btn .ic { width: 18px; height: 18px; }
.out .react-btn { order: -1; }
.msg-row:hover .react-btn { opacity: 1; transform: none; }
.react-btn:hover { color: var(--accent-ink); transform: scale(1.12) !important; }
.reactions {
  position: absolute; bottom: -16px; display: inline-flex; align-items: center; gap: 1px; padding: 2px 7px 2px 5px; border-radius: 14px;
  background: var(--elev); border: 2px solid var(--wall-bg); box-shadow: var(--shadow-sm); font-size: 14px; z-index: 2;
  animation: reactIn .5s var(--spring); cursor: pointer; transition: transform .2s var(--spring);
}
.reactions:hover { transform: scale(1.1); }
.in .reactions { left: 10px; } .out .reactions { right: 10px; }
.reactions em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--text-2); margin-left: 3px; }
.reactions.mine { border-color: color-mix(in oklab, var(--accent) 50%, var(--wall-bg)); }
@keyframes reactIn { 0% { transform: scale(0); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
.msg-row.flash .bubble { animation: flash 1.6s var(--ease); }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent), 0 0 30px color-mix(in oklab, var(--accent) 60%, transparent); transform: scale(1.02); } 100% { box-shadow: 0 1px 1.5px rgba(0,0,0,.16); } }
.msg-row.hit .bubble { box-shadow: 0 0 0 2px color-mix(in oklab, var(--warn) 50%, transparent); }
.msg-row.hit-cur .bubble { box-shadow: 0 0 0 2px var(--warn), 0 0 24px color-mix(in oklab, var(--warn) 50%, transparent); }
.msg-row.removing { animation: removeRow .4s var(--ease) forwards; overflow: hidden; }
@keyframes removeRow { to { opacity: 0; transform: scale(.85); max-height: 0; margin: 0; padding-top: 0; padding-bottom: 0; } }

/* Citation */
.quote {
  display: flex; gap: 8px; align-items: stretch; margin: 2px -3px 5px; padding: 6px 8px 6px 10px; border-radius: 10px;
  background: var(--quote-bg); position: relative; overflow: hidden; cursor: pointer; transition: filter .2s;
}
.quote:hover { filter: brightness(1.1); }
.quote::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--qc); }
.quote-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.quote-body b { font-size: 12.5px; color: var(--qc); }
.quote-body span { font-size: 13px; color: var(--meta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.out .quote-body span { color: var(--meta-out); }
.quote-body .pv-ic { width: 14px; height: 14px; flex: none; }
.quote img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; margin: -2px -4px -2px 0; }

/* Médias */
.media { margin: -3px -6px 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; position: relative; max-width: 330px; background: var(--panel-3); }
.media img { display: block; width: 100%; max-height: 360px; object-fit: cover; transition: transform .5s var(--ease); }
.media:hover img { transform: scale(1.04); }
.media-only .bubble { padding: 4px; }
.media-only .media { margin: 0; }
.media-only .meta { color: #fff; bottom: 9px; right: 11px; z-index: 2; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.media-only .ticks.read { color: #8ff6ff; }
.media-shade { position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(transparent, rgba(0,0,0,.55)); pointer-events: none; }
.caption { padding: 6px 2px 0; }

/* Vocal */
.voice { display: flex; align-items: center; gap: 10px; width: 290px; max-width: 100%; padding: 4px 2px 14px 0; }
.voice-av { position: relative; flex: none; }
.voice-av .mic-badge { position: absolute; right: -4px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; border: 2px solid var(--bubble-in); }
.out .voice-av .mic-badge { border-color: var(--bubble-out); background: var(--ok); }
.voice.played .voice-av .mic-badge { background: var(--muted); }
.voice-av .mic-badge .ic { width: 11px; height: 11px; stroke-width: 2.6; }
.voice-play { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--text-2); transition: transform .2s var(--spring), background .2s; }
.out .voice-play { color: var(--bubble-out-text); }
.voice-play:hover { background: var(--quote-bg); transform: scale(1.08); }
.voice-play .ic { width: 26px; height: 26px; }
.voice-body { flex: 1; min-width: 0; position: relative; }
.wave { display: flex; align-items: center; gap: 2px; height: 30px; cursor: pointer; }
.wave i { flex: 1; min-width: 2px; border-radius: 3px; background: var(--meta); opacity: .55; height: calc(var(--h) * 100%); transition: background .15s, opacity .15s, transform .2s; }
.out .wave i { background: var(--meta-out); }
.wave i.on { background: var(--accent-ink); opacity: 1; }
.out .wave i.on { background: var(--tick-read); }
.voice.playing .wave i.on:last-of-type { transform: scaleY(1.2); }
.voice-info { display: flex; align-items: center; justify-content: space-between; position: absolute; left: 0; right: 0; bottom: -16px; font-size: 11px; color: var(--meta); }
.out .voice-info { color: var(--meta-out); }
.voice-speed { font-size: 10.5px; font-weight: 800; padding: 1px 6px; border-radius: 8px; background: var(--quote-bg); color: inherit; display: none; }
.voice.playing .voice-speed, .voice.paused .voice-speed { display: inline-block; }

/* Fichier */
.file-card { display: flex; align-items: center; gap: 12px; padding: 10px; margin: -2px -4px 4px; border-radius: 12px; background: var(--quote-bg); width: 300px; max-width: 100%; }
.file-ic { width: 42px; height: 50px; border-radius: 8px; display: grid; place-items: center; font: 800 10.5px var(--font); color: #fff; flex: none; position: relative; clip-path: polygon(0 0, 72% 0, 100% 22%, 100% 100%, 0 100%); }
.file-ic.pdf { background: linear-gradient(135deg, #ff6b6b, #e03a52); } .file-ic.doc { background: linear-gradient(135deg, #4f8cff, #2f5ed8); }
.file-ic.xls { background: linear-gradient(135deg, #27c47a, #128a52); } .file-ic.zip { background: linear-gradient(135deg, #f5b142, #e07a1f); }
.file-ic.other { background: linear-gradient(135deg, #8b93a7, #5b6378); }
.file-info { flex: 1; min-width: 0; }
.file-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 12px; color: var(--meta); margin-top: 2px; }
.out .file-meta { color: var(--meta-out); }
.file-dl { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid currentColor; opacity: .7; flex: none; transition: opacity .2s, transform .2s var(--spring); }
.file-dl:hover { opacity: 1; transform: scale(1.08); }
.file-dl .ic { width: 18px; height: 18px; }
.file-dl.done { border-color: var(--ok); color: var(--ok); opacity: 1; }

/* Sondage */
.poll { width: 310px; max-width: 100%; padding: 4px 2px 16px; }
.poll-q { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.poll-hint { font-size: 12px; color: var(--meta); display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.out .poll-hint { color: var(--meta-out); }
.poll-hint .ic { width: 13px; height: 13px; }
.poll-opt { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 4px 10px; width: 100%; text-align: left; padding: 7px 2px; border-radius: 10px; transition: background .2s; }
.poll-opt:hover { background: var(--quote-bg); }
.poll-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--meta); display: grid; place-items: center; transition: all .25s var(--spring); }
.out .poll-radio { border-color: var(--meta-out); }
.poll-opt.mine .poll-radio { background: var(--accent); border-color: var(--accent); }
.out .poll-opt.mine .poll-radio { background: var(--ok); border-color: var(--ok); }
.poll-opt.mine .poll-radio::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); animation: pop .3s var(--spring); }
.poll-t { font-size: 14px; }
.poll-n { font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.poll-voters { display: flex; }
.poll-voters .avatar { --s: 18px !important; margin-left: -6px; border: 1.5px solid var(--bubble-in); font-size: 7px; }
.out .poll-voters .avatar { border-color: var(--bubble-out); }
.poll-bar { grid-column: 2 / 4; height: 6px; border-radius: 4px; background: var(--quote-bg); overflow: hidden; }
.poll-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent-ink); transition: width .7s var(--spring); }
.out .poll-bar i { background: var(--tick-read); }
.poll-foot { text-align: center; font-size: 12.5px; color: var(--meta); padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--line); }
.out .poll-foot { color: var(--meta-out); }

/* Localisation */
.loc { width: 290px; max-width: 100%; margin: -3px -6px 0; border-radius: 12px; overflow: hidden; cursor: pointer; }
.loc-map { position: relative; height: 140px; background: #d9e6d3; overflow: hidden; }
.loc-map svg { width: 100%; height: 100%; display: block; }
.loc-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); color: #fff; animation: pinDrop .7s var(--spring) both; }
.loc-pin .pin-head { width: 38px; height: 38px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--danger); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.loc-pin .pin-head .ic { transform: rotate(45deg); width: 18px; height: 18px; }
.loc-pin::after { content: ""; position: absolute; left: 50%; bottom: -10px; width: 22px; height: 8px; margin-left: -11px; border-radius: 50%; background: rgba(0,0,0,.25); animation: shadowPulse 2s ease-in-out infinite; }
@keyframes pinDrop { from { transform: translate(-50%, -260%); opacity: 0; } to { transform: translate(-50%, -100%); opacity: 1; } }
@keyframes shadowPulse { 50% { transform: scale(1.5); opacity: .5; } }
.loc-live { position: absolute; left: 50%; top: 50%; width: 80px; height: 80px; margin: -40px 0 0 -40px; border-radius: 50%; background: color-mix(in oklab, var(--danger) 30%, transparent); animation: livePulse 2s ease-out infinite; }
@keyframes livePulse { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.loc-info { padding: 9px 10px 18px; }
.loc-info b { display: block; font-size: 14px; } .loc-info span { font-size: 12.5px; color: var(--meta); }
.out .loc-info span { color: var(--meta-out); }

/* Contact partagé */
.contact-card { display: flex; align-items: center; gap: 12px; width: 260px; max-width: 100%; padding: 6px 2px 10px; border-bottom: 1px solid var(--line); }
.contact-card b { display: block; font-size: 14.5px; } .contact-card span { font-size: 12.5px; color: var(--meta); }
.contact-act { display: block; width: 100%; text-align: center; padding: 9px 0 16px; color: var(--accent-ink); font-weight: 700; font-size: 13.5px; }
.out .contact-act { color: var(--tick-read); }

/* Enregistrement d'appel */
.call-rec { display: flex; align-items: center; gap: 12px; padding: 4px 2px 16px; min-width: 220px; cursor: pointer; }
.call-rec-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--quote-bg); flex: none; }
.call-rec-ic .ic { width: 19px; height: 19px; }
.call-rec.missed .call-rec-ic { color: var(--danger); background: color-mix(in oklab, var(--danger) 15%, transparent); }
.call-rec b { display: block; font-size: 14.5px; } .call-rec span { font-size: 12.5px; color: var(--meta); }
.out .call-rec span { color: var(--meta-out); }

/* Indicateur de saisie */
.typing-row .bubble { min-width: 0; padding: 13px 16px; }
.typing-dots { display: flex; gap: 4px; align-items: center; height: 10px; }
.typing-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: bounce 1.3s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay: .16s; } .typing-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-6px); opacity: 1; } }
.rec-ind { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.rec-ind .ic { width: 16px; height: 16px; color: var(--danger); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }

.fab-down {
  position: absolute; right: 22px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--elev); color: var(--text-2); box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  opacity: 0; transform: translateY(20px) scale(.7); pointer-events: none; transition: opacity .25s, transform .35s var(--spring); z-index: 3;
}
.fab-down.show { opacity: 1; transform: none; pointer-events: auto; }
.fab-down:hover { color: var(--accent-ink); }
.fab-count { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; display: none; place-items: center; padding: 0 5px; }
.fab-count.show { display: grid; animation: badgeIn .5s var(--spring); }

.drop-zone {
  position: absolute; inset: 12px; z-index: 6; border-radius: 22px; border: 2.5px dashed var(--accent);
  background: color-mix(in oklab, var(--accent) 14%, var(--glass)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: none; place-items: center; text-align: center; color: var(--accent-ink);
}
.drop-zone.show { display: grid; animation: fadeIn .2s forwards; opacity: 0; }
.drop-zone .ic { width: 52px; height: 52px; display: block; margin: 0 auto 10px; animation: floaty 2s ease-in-out infinite; }
.drop-zone b { display: block; font: 700 20px var(--brand); } .drop-zone span { font-size: 13px; color: var(--text-2); }

/* Zone de saisie */
.composer-zone { position: relative; flex: none; z-index: 5; }
.composer { display: flex; align-items: flex-end; gap: 6px; padding: 10px 14px 12px; background: var(--panel); border-top: 1px solid var(--line); transition: opacity .2s; }
.composer.hidden-c { display: none; }
.composer > .icon-btn { margin-bottom: 3px; }
.attach-btn .ic { transition: transform .35s var(--spring); }
.attach-btn.open .ic { transform: rotate(135deg); }
.attach-btn.open, #btnEmoji.open { color: var(--accent-ink); background: var(--accent-soft); }
.input-wrap { flex: 1; min-width: 0; background: var(--panel-3); border-radius: 22px; padding: 11px 16px; display: flex; border: 1px solid transparent; transition: border-color .2s, box-shadow .2s, background .2s; }
.input-wrap:focus-within { border-color: color-mix(in oklab, var(--accent) 40%, transparent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--panel-2); }
.input-wrap textarea { flex: 1; min-width: 0; resize: none; border: 0; background: transparent; color: var(--text); font-size: var(--fs); max-height: 150px; line-height: 1.42; outline: none; padding: 0; overflow-y: auto; }
.input-wrap textarea::placeholder { color: var(--muted); }
.send-btn {
  width: 48px; height: 48px; border-radius: 50%; flex: none; display: grid; place-items: center; position: relative; color: #fff;
  background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 55%, var(--accent-2)));
  box-shadow: 0 8px 22px color-mix(in oklab, var(--accent) 45%, transparent); transition: transform .25s var(--spring), box-shadow .25s, filter .2s;
}
.send-btn:hover { transform: scale(1.06); filter: brightness(1.08); }
.send-btn:active { transform: scale(.9); }
.send-btn .ic { position: absolute; width: 23px; height: 23px; transition: transform .4s var(--spring), opacity .2s; }
.send-btn .i-send { transform: translateX(1px); }
.send-btn[data-mode="mic"] .i-send { transform: scale(.2) rotate(-90deg); opacity: 0; }
.send-btn[data-mode="send"] .i-mic { transform: scale(.2) rotate(90deg); opacity: 0; }
.send-btn.shoot .i-send { animation: shoot .45s var(--ease); }
@keyframes shoot { 0% { transform: translateX(1px); } 45% { transform: translate(26px, -10px) scale(.6); opacity: 0; } 46% { transform: translate(-22px, 8px) scale(.6); opacity: 0; } 100% { transform: translateX(1px); opacity: 1; } }

.reply-bar {
  display: none; align-items: center; gap: 10px; padding: 10px 14px 0; background: var(--panel); border-top: 1px solid var(--line);
}
.reply-bar.show { display: flex; animation: slideUp .3s var(--ease); }
.reply-bar + .emoji-panel.open ~ .composer, .reply-bar.show ~ .composer { border-top-color: transparent; }
@keyframes slideUp { from { opacity: 0; transform: translateY(100%); } to { opacity: 1; transform: none; } }
.reply-bar .quote { flex: 1; margin: 0; padding: 8px 12px; background: var(--panel-3); cursor: default; }
.reply-bar .rb-ic { color: var(--accent-ink); flex: none; }

.emoji-panel {
  position: absolute; left: 12px; bottom: calc(100% + 8px); width: min(400px, calc(100% - 24px)); height: 380px;
  background: var(--elev); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(14px) scale(.96); transform-origin: 10% 100%; pointer-events: none;
  transition: opacity .2s, transform .3s var(--spring);
}
.emoji-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.ep-head { padding: 10px 10px 6px; }
.ep-search { width: 100%; height: 36px; border-radius: 10px; border: 0; padding: 0 12px; background: var(--panel-3); outline: none; color: var(--text); }
.ep-tabs { display: flex; gap: 2px; padding: 0 8px 6px; border-bottom: 1px solid var(--line); position: relative; }
.ep-tab { flex: 1; height: 34px; border-radius: 9px; font-size: 18px; filter: grayscale(.8); opacity: .6; transition: all .2s; }
.ep-tab:hover { background: var(--hover); filter: none; opacity: 1; }
.ep-tab.on { filter: none; opacity: 1; background: var(--accent-soft); }
.ep-grid { flex: 1; overflow-y: auto; padding: 4px 8px 10px; }
.ep-cat { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 6px 4px; }
.ep-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); }
.ep-cells button { height: 38px; font-size: 24px; border-radius: 10px; transition: transform .15s var(--spring), background .15s; }
.ep-cells button:hover { background: var(--hover); transform: scale(1.25); }

.attach-menu {
  position: absolute; left: 58px; bottom: calc(100% + 8px); padding: 8px; min-width: 230px;
  background: var(--elev); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(12px) scale(.95); transform-origin: 0 100%; pointer-events: none;
  transition: opacity .2s, transform .3s var(--spring);
}
.attach-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.am-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 12px; font-weight: 600; font-size: 14px; transition: background .15s; }
.am-item:hover { background: var(--hover); }
.am-item .am-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; transition: transform .25s var(--spring); }
.am-item:hover .am-ic { transform: scale(1.12) rotate(-6deg); }
.am-item .am-ic .ic { width: 19px; height: 19px; }
.attach-menu.open .am-item { animation: amIn .4s var(--spring) both; }
.attach-menu.open .am-item:nth-child(2) { animation-delay: .03s; } .attach-menu.open .am-item:nth-child(3) { animation-delay: .06s; }
.attach-menu.open .am-item:nth-child(4) { animation-delay: .09s; } .attach-menu.open .am-item:nth-child(5) { animation-delay: .12s; }
.attach-menu.open .am-item:nth-child(6) { animation-delay: .15s; }
@keyframes amIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.recorder {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 12px; padding: 10px 14px 12px;
  background: var(--panel); border-top: 1px solid var(--line); opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity .25s, transform .3s var(--ease);
}
.recorder.show { opacity: 1; pointer-events: auto; transform: none; }
.rec-cancel:hover { color: var(--danger); }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--danger); animation: recPulse 1.2s infinite; flex: none; }
@keyframes recPulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--danger) 60%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 40px; }
.rec-wave { flex: 1; height: 34px; display: flex; align-items: center; justify-content: flex-end; gap: 2px; overflow: hidden; mask: linear-gradient(90deg, transparent, #000 20%); -webkit-mask: linear-gradient(90deg, transparent, #000 20%); }
.rec-wave i { width: 3px; flex: none; border-radius: 3px; background: var(--accent-ink); animation: barIn .2s var(--ease); }
@keyframes barIn { from { transform: scaleY(0); } }
.rec-hint { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

.blocked-bar { display: none; padding: 14px; text-align: center; background: var(--panel); border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.blocked-bar.show { display: block; }
.blocked-bar button { color: var(--accent-ink); font-weight: 700; }

/* ===================== Volet d'infos ===================== */
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: var(--drawer-w); max-width: 100%; z-index: 20;
  background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .45s var(--ease), box-shadow .3s; box-shadow: none;
}
.drawer.open { transform: none; box-shadow: var(--shadow); }
@media (min-width: 1280px) { .drawer.open { box-shadow: none; } }
.drawer-head { display: flex; align-items: center; gap: 10px; height: 66px; padding: 0 12px; border-bottom: 1px solid var(--line); flex: none; }
.drawer-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.drawer-body { flex: 1; overflow-y: auto; padding-bottom: 30px; background: var(--panel-2); }
.profile-hero { text-align: center; padding: 30px 20px 22px; background: var(--panel); position: relative; overflow: hidden; }
.profile-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 110px; background: linear-gradient(135deg, var(--a), var(--b)); opacity: .22; filter: blur(30px); }
.profile-hero .avatar { margin: 0 auto 14px; animation: logoIn .6s var(--spring) both; box-shadow: 0 16px 40px rgba(0,0,0,.3), inset 0 0 0 1px rgba(255,255,255,.14); }
.profile-hero h2 { margin: 0 0 4px; font: 700 22px/1.25 var(--brand); display: flex; align-items: center; justify-content: center; position: relative; }
.profile-hero p { margin: 0; color: var(--muted); font-size: 14px; position: relative; }
.hero-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; position: relative; }
.hero-act { width: 86px; padding: 12px 6px 10px; border-radius: 14px; border: 1px solid var(--line-2); display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--accent-ink); transition: background .2s, transform .2s var(--spring); }
.hero-act:hover { background: var(--accent-soft); transform: translateY(-2px); }
.d-card { background: var(--panel); margin-top: 10px; padding: 16px 20px; }
.d-card h4 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.d-card p { margin: 0; font-size: 14.5px; line-height: 1.5; }
.d-card .sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.d-row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.d-row-head h4 { margin: 0; }
.d-row-head span { font-size: 13px; color: var(--muted); }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.media-grid button { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--panel-3); }
.media-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.media-grid button:hover img { transform: scale(1.1); }
.media-grid .doc-thumb { display: grid; place-items: center; font-weight: 800; font-size: 12px; color: #fff; width: 100%; height: 100%; }
.d-list { padding: 6px 0; }
.d-item { display: flex; align-items: center; gap: 16px; width: 100%; padding: 12px 20px; text-align: left; font-size: 14.5px; transition: background .15s; }
.d-item:hover { background: var(--hover); }
.d-item > .ic { color: var(--muted); }
.d-item .d-txt { flex: 1; min-width: 0; }
.d-item .d-txt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.4; }
.d-item .d-val { color: var(--muted); font-size: 13px; }
.d-item.danger, .d-item.danger > .ic { color: var(--danger); }
.member { display: flex; align-items: center; gap: 12px; padding: 9px 20px; transition: background .15s; cursor: pointer; }
.member:hover { background: var(--hover); }
.member .m-txt { flex: 1; min-width: 0; }
.member b { display: block; font-size: 14.5px; font-weight: 600; }
.member span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.member .tag { font-size: 11px; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); padding: 3px 8px; border-radius: 8px; }

/* Interrupteur */
.switch { width: 42px; height: 24px; border-radius: 12px; background: var(--line-2); position: relative; flex: none; transition: background .25s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .35s var(--spring); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(18px); }

/* ===================== Appels (liste) ===================== */
.call-link { display: flex; align-items: center; gap: 14px; padding: 12px; margin: 4px 0 6px; border-radius: 14px; cursor: pointer; transition: background .2s; }
.call-link:hover { background: var(--hover); }
.call-link .cl-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 6px 18px color-mix(in oklab, var(--accent) 40%, transparent); flex: none; }
.call-link b { display: block; font-size: 15px; } .call-link span { font-size: 13px; color: var(--muted); }
.quick-dial { display: flex; gap: 14px; overflow-x: auto; padding: 6px 8px 12px; scrollbar-width: none; }
.quick-dial::-webkit-scrollbar { display: none; }
.qd { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 64px; flex: none; font-size: 12px; font-weight: 600; color: var(--text-2); }
.qd .av-wrap { transition: transform .25s var(--spring); }
.qd:hover .av-wrap { transform: translateY(-3px) scale(1.05); }
.qd span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qd .qd-badge { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; border: 2px solid var(--panel); }
.qd .qd-badge .ic { width: 11px; height: 11px; }
.call-item { display: flex; align-items: center; gap: 13px; padding: 10px 12px; border-radius: 14px; transition: background .18s; cursor: pointer; }
.call-item:hover { background: var(--hover); }
.call-item .ci-body { flex: 1; min-width: 0; }
.call-item .ci-name { font-size: 15px; }
.call-item.missed .ci-name { color: var(--danger); }
.call-item .call-meta { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; }
.call-item .call-meta .ic { width: 15px; height: 15px; }
.call-item .call-meta .ic.in { color: var(--ok); } .call-item .call-meta .ic.out { color: var(--accent-ink); } .call-item .call-meta .ic.miss { color: var(--danger); }
.call-item .call-acts { display: flex; gap: 2px; }
.call-item .call-acts .icon-btn { color: var(--accent-ink); }

/* ===================== Statuts (liste) ===================== */
.status-item { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 14px; cursor: pointer; transition: background .18s; }
.status-item:hover { background: var(--hover); }
.status-item .s-txt { flex: 1; min-width: 0; }
.status-item b { display: block; font-size: 15px; }
.status-item span { font-size: 13px; color: var(--muted); }
.ring-wrap { position: relative; width: 56px; height: 56px; display: grid; place-items: center; flex: none; }
.ring-wrap .avatar { --s: 46px !important; }
.ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring-svg circle { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; transition: stroke .3s; }
.ring-svg circle.seen { stroke: var(--line-2); }
.status-item:hover .ring-svg { animation: spinOnce .8s var(--ease); }
@keyframes spinOnce { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
.add-badge { position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; border: 2.5px solid var(--panel); z-index: 2; }
.add-badge .ic { width: 12px; height: 12px; stroke-width: 3; }
.status-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; padding: 6px 6px 12px; }
.s-card { aspect-ratio: 9/14; border-radius: 16px; overflow: hidden; position: relative; cursor: pointer; transition: transform .3s var(--spring); }
.s-card:hover { transform: translateY(-4px) scale(1.02); }
.s-card .s-bg { position: absolute; inset: 0; background-size: cover; background-position: center; display: grid; place-items: center; padding: 10px; text-align: center; color: #fff; font-weight: 700; font-size: 12px; line-height: 1.3; }
.s-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 50%, rgba(0,0,0,.6)); }
.s-card .s-who { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 2; color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-card .ring-wrap { position: absolute; top: 8px; left: 8px; width: 38px; height: 38px; z-index: 2; }
.s-card .ring-wrap .avatar { --s: 30px !important; }
.s-card .ring-svg circle { stroke: #fff; } .s-card .ring-svg circle.seen { stroke: rgba(255,255,255,.4); }

/* ===================== Importants ===================== */
.star-item { padding: 12px; border-radius: 14px; cursor: pointer; transition: background .18s; }
.star-item:hover { background: var(--hover); }
.star-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.star-head b { color: var(--text); font-size: 13px; }
.star-head .ic { width: 14px; height: 14px; }
.star-head time { margin-left: auto; }
.star-bubble { display: inline-block; max-width: 100%; padding: 8px 12px; border-radius: 4px 14px 14px 14px; background: var(--panel-3); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.star-bubble.out { background: var(--bubble-out); color: var(--bubble-out-text); }
.star-bubble .ic { width: 14px; height: 14px; vertical-align: -2px; }

/* ===================== Paramètres ===================== */
.settings { padding: 0 12px 30px; }
.me-card { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 20px; margin: 4px 0 14px; position: relative; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); }
.me-card::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 220px; height: 220px; border-radius: 50%; background: linear-gradient(135deg, var(--a), var(--b)); filter: blur(60px); opacity: .25; }
.me-card .avatar { cursor: pointer; transition: transform .3s var(--spring); }
.me-card .avatar:hover { transform: scale(1.06) rotate(-4deg); }
.me-info { flex: 1; min-width: 0; position: relative; }
.me-info .me-name { font: 700 19px/1.2 var(--brand); display: flex; align-items: center; gap: 6px; }
.me-info .me-about { color: var(--muted); font-size: 13.5px; margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.me-info .edit-ic { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; color: var(--muted); }
.me-info .edit-ic:hover { color: var(--accent-ink); background: var(--accent-soft); }
.me-info .edit-ic .ic { width: 14px; height: 14px; }
.me-info input { width: 100%; height: 34px; border-radius: 9px; border: 1px solid var(--accent); background: var(--panel); padding: 0 10px; outline: none; color: var(--text); box-shadow: 0 0 0 3px var(--accent-soft); }
.s-group { background: var(--panel-2); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 12px; overflow: hidden; }
.s-group-title { display: flex; align-items: center; gap: 10px; padding: 14px 16px 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--accent-ink); }
.s-group-title .ic { width: 16px; height: 16px; }
.s-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; width: 100%; text-align: left; transition: background .15s; font-size: 14.5px; }
button.s-row:hover { background: var(--hover); }
.s-row + .s-row { border-top: 1px solid var(--line); }
.s-row .s-lbl { flex: 1; min-width: 0; }
.s-row .s-lbl small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.s-row .s-val { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 4px; }
.s-row .s-val .ic { width: 16px; height: 16px; }
.s-row.col { flex-direction: column; align-items: stretch; }
.s-row.danger { color: var(--danger); }
.seg { display: flex; padding: 3px; border-radius: 12px; background: var(--panel-3); position: relative; }
.seg button { flex: 1; height: 34px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); position: relative; z-index: 1; transition: color .25s; display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button .ic { width: 16px; height: 16px; }
.seg button.on { color: var(--text); }
.seg .seg-pill { position: absolute; top: 3px; bottom: 3px; border-radius: 9px; background: var(--panel); box-shadow: var(--shadow-sm); transition: transform .4s var(--spring), width .4s var(--spring); }
.accents { display: flex; gap: 10px; flex-wrap: wrap; }
.accent-dot { width: 32px; height: 32px; border-radius: 50%; background: var(--c); position: relative; transition: transform .25s var(--spring), box-shadow .2s; }
.accent-dot:hover { transform: scale(1.15); }
.accent-dot.on { box-shadow: 0 0 0 3px var(--panel-2), 0 0 0 5px var(--c); }
.accent-dot.on::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; }
.walls { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.wall-opt { aspect-ratio: 3/4; border-radius: 12px; position: relative; overflow: hidden; border: 2px solid var(--line); transition: transform .25s var(--spring), border-color .2s; }
.wall-opt:hover { transform: translateY(-3px); }
.wall-opt.on { border-color: var(--accent); }
.wall-opt .wallpaper { position: absolute; inset: 0; }
.wall-opt span { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font-size: 10.5px; font-weight: 700; color: var(--text-2); z-index: 1; }
.wall-opt i { position: absolute; z-index: 1; height: 8px; border-radius: 4px; }
.wall-opt i.a { top: 14px; left: 6px; width: 50%; background: var(--bubble-in); }
.wall-opt i.b { top: 28px; right: 6px; width: 45%; background: var(--bubble-out); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), var(--panel-3) var(--p, 50%)); outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); cursor: pointer; transition: transform .2s var(--spring); }
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); cursor: pointer; }
.fs-preview { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: 10px; }
.fs-preview .a1 { font-size: 12px; color: var(--muted); } .fs-preview .a2 { font-size: 18px; color: var(--muted); font-weight: 700; }
.fs-sample { margin-top: 10px; padding: 8px 12px; border-radius: 4px 14px 14px 14px; background: var(--bubble-in); font-size: var(--fs); display: inline-block; border: 1px solid var(--line); }
.s-select { height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel); padding: 0 10px; color: var(--text); outline: none; }
.about-card { text-align: center; padding: 22px 16px 18px; }
.about-card svg { width: 54px; height: 54px; margin-bottom: 8px; }
.about-card b { display: block; font: 800 18px var(--brand); }
.about-card span { font-size: 12.5px; color: var(--muted); }

/* ===================== Appel (plein écran) ===================== */
.call {
  position: fixed; inset: 0; z-index: 60; color: #fff; display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; pointer-events: none; transform: scale(1.04); transition: opacity .35s var(--ease), transform .45s var(--ease);
  background: #05060a;
}
.call.open { opacity: 1; pointer-events: auto; transform: none; }
.call.minimized { opacity: 0; pointer-events: none; transform: scale(.4) translateY(-60%); }
.call-bg { position: absolute; inset: 0; overflow: hidden; }
.call-bg .blob { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .55; animation: blob 14s ease-in-out infinite alternate; }
.call-bg .b1 { background: var(--a); top: -20vmax; left: -15vmax; }
.call-bg .b2 { background: var(--b); bottom: -25vmax; right: -15vmax; animation-delay: -5s; }
.call-bg .b3 { background: var(--accent); top: 30%; left: 40%; width: 40vmax; height: 40vmax; opacity: .3; animation-delay: -9s; }
@keyframes blob { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8vmax, 6vmax) scale(1.15); } 100% { transform: translate(-6vmax, 4vmax) scale(.9); } }
.call-bg::after { content: ""; position: absolute; inset: 0; background: rgba(5, 6, 12, .35); }
.call-top { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; }
.call-enc { display: flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255,255,255,.75); background: rgba(255,255,255,.1); padding: 7px 12px; border-radius: 20px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.call-enc .ic { width: 14px; height: 14px; }
.call-top .icon-btn { color: #fff; background: rgba(255,255,255,.1); }
.call-top .icon-btn:hover { background: rgba(255,255,255,.2); }
.call-quality { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.8); }
.call-quality .bars { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.call-quality .bars i { width: 3px; border-radius: 2px; background: #6dffb0; }
.call-quality .bars i:nth-child(1) { height: 4px; } .call-quality .bars i:nth-child(2) { height: 7px; } .call-quality .bars i:nth-child(3) { height: 10px; } .call-quality .bars i:nth-child(4) { height: 12px; }
.call-stage { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; }
.call-avatar-wrap { position: relative; width: 170px; height: 170px; display: grid; place-items: center; margin-bottom: 28px; }
.call-avatar-wrap .avatar { position: relative; z-index: 2; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); animation: callRing 2.4s var(--ease) infinite; }
.ring.r2 { animation-delay: .8s; } .ring.r3 { animation-delay: 1.6s; }
@keyframes callRing { from { transform: scale(.85); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
.call.connected .ring { animation: none; opacity: 0; }
.call.connected .call-avatar-wrap::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 3px solid rgba(109, 255, 176, .7); animation: speak 1.6s ease-in-out infinite; }
@keyframes speak { 0%, 100% { transform: scale(1); opacity: .9; } 30% { transform: scale(1.06); opacity: .5; } 60% { transform: scale(1.02); opacity: .8; } }
.call-name { font: 700 32px/1.2 var(--brand); margin: 0 0 8px; letter-spacing: -.01em; text-shadow: 0 4px 20px rgba(0,0,0,.3); }
.call-state { margin: 0; font-size: 15px; color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; min-height: 22px; }
.call-state .dots::after { content: ""; animation: dots 1.4s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.remote-video { position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity .6s; overflow: hidden; }
.call.video.connected .remote-video { opacity: 1; }
.call.video.connected .call-avatar-wrap { opacity: 0; transform: scale(.6); transition: all .5s var(--ease); }
.call.video.connected .call-stage { justify-content: flex-start; padding-top: 0; }
.call.video.connected .call-name { font-size: 22px; }
.rv-scene { position: absolute; inset: -5%; background-size: cover; background-position: center; animation: camDrift 12s ease-in-out infinite alternate; filter: saturate(1.1); }
@keyframes camDrift { 0% { transform: scale(1.05) translate(0, 0); } 100% { transform: scale(1.12) translate(-2%, 1.5%); } }
.rv-person { position: absolute; left: 50%; bottom: -4%; width: min(56vh, 70vw); aspect-ratio: 1; transform: translateX(-50%); animation: personBob 4s ease-in-out infinite; }
.rv-person .head { position: absolute; left: 50%; top: 4%; width: 42%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: linear-gradient(135deg, var(--a), var(--b)); display: grid; place-items: center; font: 800 calc(min(56vh, 70vw) * .12) var(--brand); color: rgba(255,255,255,.9); box-shadow: inset -10px -14px 30px rgba(0,0,0,.25); }
.rv-person .body { position: absolute; left: 50%; bottom: 0; width: 86%; height: 48%; transform: translateX(-50%); border-radius: 48% 48% 0 0; background: linear-gradient(160deg, var(--b), var(--a)); filter: brightness(.75); }
@keyframes personBob { 0%, 100% { transform: translateX(-50%) rotate(-1deg); } 50% { transform: translateX(-50%) translateY(-1.5%) rotate(1.5deg); } }
.rv-grain { position: absolute; inset: 0; background: radial-gradient(transparent 50%, rgba(0,0,0,.5)); }
.rv-tag { position: absolute; left: 22px; bottom: 120px; padding: 6px 12px; border-radius: 10px; background: rgba(0,0,0,.4); font-size: 13px; font-weight: 600; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; align-items: center; gap: 6px; }
.rv-tag .ic { width: 14px; height: 14px; }
.self-view {
  position: absolute; right: 22px; bottom: 118px; width: 200px; aspect-ratio: 3/4; border-radius: 18px; overflow: hidden; z-index: 4;
  background: #111; box-shadow: 0 16px 40px rgba(0,0,0,.5); border: 2px solid rgba(255,255,255,.18); cursor: grab; touch-action: none;
  opacity: 0; transform: scale(.6); transition: opacity .4s, transform .5s var(--spring); display: grid; place-items: center;
}
.self-view.dragging { cursor: grabbing; transition: none; }
.call.video .self-view { opacity: 1; transform: none; }
.self-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.self-view .sv-label { position: absolute; left: 8px; bottom: 8px; font-size: 11px; font-weight: 700; background: rgba(0,0,0,.45); padding: 3px 8px; border-radius: 8px; z-index: 2; }
.self-view.cam-off video { display: none; }
.tiles { position: absolute; inset: 80px 22px 120px; z-index: 2; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); grid-auto-rows: 1fr; }
.tile { border-radius: 20px; position: relative; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in oklab, var(--a) 50%, #111), color-mix(in oklab, var(--b) 40%, #111)); border: 2px solid transparent; transition: border-color .3s, transform .3s; animation: tileIn .5s var(--spring) both; }
@keyframes tileIn { from { opacity: 0; transform: scale(.8); } }
.tile.speaking { border-color: #6dffb0; box-shadow: 0 0 30px rgba(109,255,176,.3); }
.tile .tile-name { position: absolute; left: 12px; bottom: 10px; font-size: 13px; font-weight: 600; background: rgba(0,0,0,.4); padding: 4px 10px; border-radius: 8px; display: flex; align-items: center; gap: 6px; }
.tile .tile-name .ic { width: 13px; height: 13px; }
.tile .avatar { transition: transform .3s; }
.tile.speaking .avatar { animation: speakAv 1s ease-in-out infinite; }
@keyframes speakAv { 50% { transform: scale(1.06); } }
.call.group-call .call-avatar-wrap, .call.group-call .call-name, .call.group-call .call-state { display: none; }
.call.group-call:not(.connected) .call-avatar-wrap, .call.group-call:not(.connected) .call-name, .call.group-call:not(.connected) .call-state { display: grid; }
.call.group-call:not(.connected) .call-name, .call.group-call:not(.connected) .call-state { display: block; }
.call.group-call:not(.connected) .tiles { display: none; }
.call-controls { position: relative; z-index: 5; display: flex; justify-content: center; gap: 14px; padding: 18px 20px 30px; }
.cc { width: 62px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; color: rgba(255,255,255,.85); }
.cc .cc-ic { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.14); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.12); transition: background .2s, transform .25s var(--spring), color .2s; }
.cc:hover .cc-ic { background: rgba(255,255,255,.24); transform: translateY(-3px); }
.cc:active .cc-ic { transform: scale(.9); }
.cc.on .cc-ic { background: #fff; color: #111; }
.cc.end .cc-ic { background: var(--danger); border-color: transparent; box-shadow: 0 10px 30px color-mix(in oklab, var(--danger) 50%, transparent); }
.cc.end:hover .cc-ic { background: #ff3b4e; transform: translateY(-3px) rotate(-8deg); }
.cc.accept .cc-ic { background: var(--ok); border-color: transparent; box-shadow: 0 10px 30px color-mix(in oklab, var(--ok) 50%, transparent); animation: acceptBounce 1.4s var(--ease) infinite; }
@keyframes acceptBounce { 0%, 100% { transform: translateY(0); } 15% { transform: translateY(-10px) rotate(-12deg); } 30% { transform: translateY(0) rotate(8deg); } 45% { transform: rotate(0); } }
.cc.big .cc-ic { width: 68px; height: 68px; }
.call-incoming-actions { display: flex; justify-content: center; gap: 70px; padding: 0 20px 44px; position: relative; z-index: 5; }
.call-msg-reply { position: relative; z-index: 5; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 0 20px 20px; }
.call-msg-reply button { padding: 8px 14px; border-radius: 18px; background: rgba(255,255,255,.12); font-size: 13px; font-weight: 600; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background .2s; }
.call-msg-reply button:hover { background: rgba(255,255,255,.22); }
.call.ending { opacity: 0; transform: scale(.96); transition: opacity .4s, transform .4s; }

.call-mini {
  position: fixed; top: 14px; left: 50%; z-index: 61; transform: translate(-50%, -150%); display: flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 8px; border-radius: 30px; background: var(--ok); color: #fff; font-weight: 700; font-size: 13.5px;
  box-shadow: 0 12px 30px color-mix(in oklab, var(--ok) 45%, transparent); transition: transform .45s var(--spring);
}
.call-mini.show { transform: translate(-50%, 0); }
.call-mini .avatar { --s: 30px !important; }
.call-mini .cm-wave { display: flex; gap: 2px; align-items: center; height: 14px; }
.call-mini .cm-wave i { width: 3px; border-radius: 2px; background: #fff; animation: eq 1s ease-in-out infinite; }
.call-mini .cm-wave i:nth-child(2) { animation-delay: .2s; } .call-mini .cm-wave i:nth-child(3) { animation-delay: .4s; } .call-mini .cm-wave i:nth-child(4) { animation-delay: .1s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }

/* ===================== Visionneuse de statuts ===================== */
.story { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; background: rgba(4, 5, 9, .96); opacity: 0; pointer-events: none; transition: opacity .3s; }
.story.open { opacity: 1; pointer-events: auto; }
.story-card { position: relative; height: min(92vh, 860px); aspect-ratio: 9/16; max-width: 100vw; border-radius: 22px; overflow: hidden; background: #111; box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: storyIn .45s var(--spring); user-select: none; }
@keyframes storyIn { from { opacity: 0; transform: scale(.85) translateY(30px); } }
.story-card.swap { animation: storySwap .4s var(--ease); }
@keyframes storySwap { from { opacity: .3; transform: scale(.96); } }
.story-bars { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 4; }
.story-bars span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
.story-bars i { display: block; height: 100%; width: 0; background: #fff; border-radius: inherit; }
.story-head { position: absolute; top: 24px; left: 12px; right: 8px; display: flex; align-items: center; gap: 10px; z-index: 4; color: #fff; }
.story-head .avatar { --s: 38px !important; }
.story-head .sh-txt { flex: 1; min-width: 0; }
.story-head b { display: block; font-size: 14.5px; } .story-head span { font-size: 12px; opacity: .75; }
.story-head .icon-btn { color: #fff; }
.story-head .icon-btn:hover { background: rgba(255,255,255,.15); }
.story-content { position: absolute; inset: 0; display: grid; place-items: center; padding: 60px 30px; text-align: center; background-size: cover; background-position: center; }
.story-content.kenburns { animation: kb 6s ease-out forwards; }
@keyframes kb { from { transform: scale(1); } to { transform: scale(1.12); } }
.story-text { color: #fff; font: 700 30px/1.3 var(--brand); text-shadow: 0 4px 20px rgba(0,0,0,.25); animation: fadeUp .6s var(--ease); white-space: pre-wrap; overflow-wrap: anywhere; }
.story-text.serif { font-family: Georgia, 'Times New Roman', serif; font-style: italic; }
.story-text.mono { font-family: ui-monospace, Consolas, monospace; font-size: 26px; }
.story-caption { position: absolute; left: 0; right: 0; bottom: 84px; padding: 12px 20px; text-align: center; color: #fff; font-weight: 600; font-size: 16px; background: linear-gradient(transparent, rgba(0,0,0,.5)); z-index: 3; }
.story-shade { position: absolute; inset: 0 0 auto 0; height: 120px; background: linear-gradient(rgba(0,0,0,.5), transparent); z-index: 3; pointer-events: none; }
.story-tap { position: absolute; top: 80px; bottom: 80px; width: 35%; z-index: 3; cursor: pointer; }
.story-tap.l { left: 0; } .story-tap.r { right: 0; width: 65%; }
.story-reply { position: absolute; left: 12px; right: 12px; bottom: 16px; display: flex; gap: 8px; z-index: 4; }
.story-reply input { flex: 1; height: 48px; border-radius: 24px; border: 1.5px solid rgba(255,255,255,.4); background: rgba(0,0,0,.25); color: #fff; padding: 0 18px; outline: none; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.story-reply input::placeholder { color: rgba(255,255,255,.7); }
.story-reply input:focus { border-color: #fff; }
.story-reply .send-btn { width: 48px; height: 48px; }
.story-quick { position: absolute; left: 0; right: 0; bottom: 74px; display: flex; justify-content: center; gap: 8px; z-index: 4; }
.story-quick button { font-size: 26px; transition: transform .2s var(--spring); }
.story-quick button:hover { transform: scale(1.3) translateY(-4px); }
.story-views { position: absolute; left: 0; right: 0; bottom: 20px; display: flex; justify-content: center; align-items: center; gap: 6px; color: #fff; font-size: 13.5px; font-weight: 600; z-index: 4; }
.story-views .ic { width: 18px; height: 18px; }
.story-nav { position: absolute; top: 50%; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #fff; z-index: 2; transition: background .2s, transform .2s var(--spring); }
.story-nav:hover { background: rgba(255,255,255,.25); transform: scale(1.1); }
.story-nav.prev { left: calc(50% - min(92vh, 860px) * 9 / 32 - 74px); }
.story-nav.next { right: calc(50% - min(92vh, 860px) * 9 / 32 - 74px); }
.story-nav.prev .ic { transform: rotate(180deg); }
.story-close { position: absolute; top: 18px; right: 18px; color: #fff; z-index: 5; }
.story-heart { position: absolute; left: 50%; top: 50%; font-size: 90px; z-index: 6; pointer-events: none; animation: heartBurst .9s var(--ease) forwards; }
@keyframes heartBurst { 0% { transform: translate(-50%, -50%) scale(0); opacity: 0; } 30% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; } 100% { transform: translate(-50%, -150%) scale(1); opacity: 0; } }

/* Compositeur de statut */
.status-compose { position: relative; height: 420px; border-radius: 18px; display: grid; place-items: center; padding: 30px; text-align: center; transition: background .4s; overflow: hidden; }
.status-compose textarea { width: 100%; background: transparent; border: 0; outline: none; resize: none; color: #fff; text-align: center; font: 700 28px/1.3 var(--brand); text-shadow: 0 3px 14px rgba(0,0,0,.2); }
.status-compose textarea::placeholder { color: rgba(255,255,255,.65); }
.status-compose textarea.serif { font-family: Georgia, serif; font-style: italic; }
.status-compose textarea.mono { font-family: ui-monospace, Consolas, monospace; font-size: 24px; }
.sc-tools { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.sc-bg { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; transition: transform .2s var(--spring); }
.sc-bg:hover { transform: scale(1.15); }
.sc-bg.on { border-color: var(--text); }

/* ===================== Visionneuse d'images ===================== */
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(4, 5, 9, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: opacity .3s; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lb-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; color: #fff; }
.lb-head .lb-txt { flex: 1; min-width: 0; }
.lb-head b { display: block; font-size: 14.5px; } .lb-head span { font-size: 12.5px; opacity: .7; }
.lb-head .icon-btn { color: #fff; } .lb-head .icon-btn:hover { background: rgba(255,255,255,.15); }
.lb-stage { flex: 1; display: grid; place-items: center; overflow: hidden; padding: 10px 20px 20px; }
.lb-stage img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.6); cursor: zoom-in; transition: transform .45s var(--ease); animation: lbIn .45s var(--spring); }
.lb-stage img.zoom { transform: scale(1.8); cursor: zoom-out; }
@keyframes lbIn { from { opacity: 0; transform: scale(.7); } }
.lb-caption { text-align: center; color: #fff; padding: 0 20px 24px; font-size: 15px; }

/* ===================== Modales ===================== */
.modal-wrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 6, 12, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.modal {
  position: relative; width: min(440px, 100%); max-height: min(86vh, 760px); display: flex; flex-direction: column;
  background: var(--elev); border: 1px solid var(--line-2); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden;
  opacity: 0; transform: translateY(24px) scale(.94); transition: opacity .25s, transform .4s var(--spring);
}
.modal.wide { width: min(560px, 100%); }
.modal-wrap.open .modal-backdrop { opacity: 1; }
.modal-wrap.open .modal { opacity: 1; transform: none; }
.modal-wrap.closing .modal { transform: translateY(14px) scale(.97); opacity: 0; transition: opacity .2s, transform .25s; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 16px 10px 22px; }
.modal-head h3 { margin: 0; font: 700 18px/1.2 var(--brand); }
.modal-body { padding: 4px 22px 18px; overflow-y: auto; }
.modal-text { color: var(--text-2); line-height: 1.55; margin: 0 0 6px; font-size: 14.5px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pick-list { margin: 8px -10px 0; max-height: 46vh; overflow-y: auto; }
.pick { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; cursor: pointer; transition: background .15s; width: 100%; text-align: left; }
.pick:hover { background: var(--hover); }
.pick .p-txt { flex: 1; min-width: 0; }
.pick b { display: block; font-size: 14.5px; font-weight: 600; }
.pick span { font-size: 12.5px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick .check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; transition: all .25s var(--spring); flex: none; }
.pick.on .check { background: var(--accent); border-color: var(--accent); }
.pick.on .check::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.pick .p-acts { display: flex; gap: 2px; }
.pick .p-acts .icon-btn { color: var(--accent-ink); }
.pick-special .p-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); flex: none; }
.sel-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sel-chip { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 16px; background: var(--accent-soft); font-size: 12.5px; font-weight: 600; animation: pop .3s var(--spring); }
.sel-chip .avatar { --s: 24px !important; }
.poll-edit .opt-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; animation: fadeUp .3s var(--ease); }
.poll-edit .opt-row .input { height: 42px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; cursor: pointer; font-size: 14px; }
.photo-preview { border-radius: 16px; overflow: hidden; background: var(--panel-3); display: grid; place-items: center; max-height: 50vh; margin-bottom: 12px; }
.photo-preview img { max-width: 100%; max-height: 50vh; display: block; }
.photo-strip { display: flex; gap: 6px; margin-bottom: 10px; overflow-x: auto; }
.photo-strip img { width: 54px; height: 54px; object-fit: cover; border-radius: 10px; border: 2px solid transparent; cursor: pointer; }
.photo-strip img.on { border-color: var(--accent); }
.cam-box { position: relative; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 4/3; display: grid; place-items: center; color: #aaa; }
.cam-box video, .cam-box img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.cam-box video { transform: scaleX(-1); }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam-flash.go { animation: camFlash .5s ease-out; }
@keyframes camFlash { 0% { opacity: .9; } 100% { opacity: 0; } }
.shortcuts { display: grid; gap: 2px; }
.shortcut { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.shortcut kbd { font: 600 12px var(--font); padding: 4px 8px; border-radius: 7px; background: var(--panel-3); border: 1px solid var(--line-2); border-bottom-width: 2px; margin-left: 3px; }
.info-ticks { display: grid; gap: 10px; margin-top: 12px; }
.info-ticks div { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--panel-2); }
.info-ticks .ticks .ic { width: 20px; height: 20px; }
.info-ticks b { display: block; font-size: 14px; } .info-ticks span { font-size: 12.5px; color: var(--muted); }
.react-list .pick { cursor: default; }
.react-list .r-emo { font-size: 22px; }
.react-tabs { display: flex; gap: 6px; margin-bottom: 6px; }
.react-tabs span { padding: 6px 10px; border-radius: 10px; background: var(--panel-3); font-size: 14px; font-weight: 700; }
.enc-code { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; font: 600 15px ui-monospace, Consolas, monospace; text-align: center; letter-spacing: .08em; }
.enc-code span { padding: 8px 0; border-radius: 8px; background: var(--panel-3); }
.qr { width: 170px; height: 170px; margin: 6px auto 0; padding: 10px; background: #fff; border-radius: 14px; display: grid; grid-template-columns: repeat(21, 1fr); }
.qr i { background: #111; } .qr i.w { background: transparent; }

/* ===================== Menu contextuel ===================== */
.ctx {
  position: fixed; z-index: 85; min-width: 220px; padding: 6px; border-radius: 16px;
  background: var(--elev); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  opacity: 0; transform: scale(.9); pointer-events: none; transition: opacity .15s, transform .25s var(--spring);
}
.ctx.open { opacity: 1; transform: none; pointer-events: auto; }
.ctx-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; text-align: left; transition: background .12s; }
.ctx-item:hover { background: var(--hover); }
.ctx-item .ic { width: 18px; height: 18px; color: var(--muted); }
.ctx-item.danger, .ctx-item.danger .ic { color: var(--danger); }
.ctx-item kbd { margin-left: auto; font: 600 11px var(--font); color: var(--muted); }
.ctx-sep { height: 1px; background: var(--line); margin: 5px 8px; }
.ctx.open .ctx-item { animation: ctxIn .3s var(--ease) both; }
.ctx.open .ctx-item:nth-child(2) { animation-delay: .02s; } .ctx.open .ctx-item:nth-child(3) { animation-delay: .04s; } .ctx.open .ctx-item:nth-child(4) { animation-delay: .06s; }
.ctx.open .ctx-item:nth-child(5) { animation-delay: .08s; } .ctx.open .ctx-item:nth-child(6) { animation-delay: .1s; } .ctx.open .ctx-item:nth-child(n+7) { animation-delay: .12s; }
@keyframes ctxIn { from { opacity: 0; transform: translateX(-6px); } }
.ctx-react { display: flex; gap: 2px; padding: 4px 4px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ctx-react button { width: 36px; height: 36px; font-size: 21px; border-radius: 50%; transition: transform .2s var(--spring), background .15s; }
.ctx-react button:hover { transform: scale(1.3); background: var(--hover); }

.react-pop {
  position: fixed; z-index: 86; display: flex; align-items: center; gap: 2px; padding: 5px 6px; border-radius: 30px;
  background: var(--elev); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(10px) scale(.8); pointer-events: none; transition: opacity .15s, transform .3s var(--spring);
}
.react-pop.open { opacity: 1; transform: none; pointer-events: auto; }
.react-pop button { width: 42px; height: 42px; border-radius: 50%; font-size: 26px; display: grid; place-items: center; transition: transform .2s var(--spring), background .15s; }
.react-pop.open button { animation: rpIn .4s var(--spring) both; }
.react-pop.open button:nth-child(2) { animation-delay: .03s; } .react-pop.open button:nth-child(3) { animation-delay: .06s; }
.react-pop.open button:nth-child(4) { animation-delay: .09s; } .react-pop.open button:nth-child(5) { animation-delay: .12s; }
.react-pop.open button:nth-child(6) { animation-delay: .15s; } .react-pop.open button:nth-child(7) { animation-delay: .18s; }
@keyframes rpIn { from { opacity: 0; transform: translateY(14px) scale(.4); } }
.react-pop button:hover { transform: scale(1.35) translateY(-5px); }
.react-pop button.mine { background: var(--accent-soft); }
.react-pop .rp-more { font-size: 0; color: var(--muted); background: var(--panel-3); width: 36px; height: 36px; margin-left: 2px; }
.react-pop .rp-more .ic { width: 18px; height: 18px; }

/* ===================== Notifications ===================== */
.toasts { position: fixed; top: 16px; right: 16px; z-index: 95; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 14px; max-width: 360px;
  background: var(--elev); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 13.5px; font-weight: 600;
  animation: toastIn .45s var(--spring); pointer-events: auto;
}
.toast .ic { width: 18px; height: 18px; color: var(--accent-ink); }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px) scale(.9); } }
.notif { width: 340px; padding: 12px 14px; align-items: flex-start; cursor: pointer; position: relative; overflow: hidden; transition: transform .2s; }
.notif:hover { transform: translateX(-4px); }
.notif .n-txt { flex: 1; min-width: 0; }
.notif .n-app { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.notif .n-app svg { width: 14px; height: 14px; }
.notif b { display: block; font-size: 14px; }
.notif p { margin: 2px 0 0; font-weight: 500; color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.notif p .pv-ic { width: 14px; height: 14px; }
.notif .n-prog { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); animation: nprog 5s linear forwards; }
@keyframes nprog { from { width: 100%; } to { width: 0; } }
.notif .n-close { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); opacity: 0; transition: opacity .2s; }
.notif:hover .n-close { opacity: 1; }
.notif .n-close .ic { width: 14px; height: 14px; }

.tooltip {
  position: fixed; z-index: 99; padding: 6px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; pointer-events: none;
  background: var(--text); color: var(--panel); opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .2s var(--ease); white-space: nowrap;
}
.tooltip.show { opacity: 1; transform: none; }

/* ===================== Responsive ===================== */
@media (max-width: 1100px) {
  :root { --side-w: 340px; }
}
@media (max-width: 860px) {
  :root { --rail-w: 0px; --drawer-w: 100%; }
  .app { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .rail {
    grid-row: 2; flex-direction: row; justify-content: space-around; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid var(--line); height: auto; z-index: 6;
  }
  .rail-logo, .rail-bottom { display: none; }
  .rail-nav { flex-direction: row; width: 100%; justify-content: space-around; gap: 0; }
  .rail-btn { width: 64px; height: 54px; display: flex; flex-direction: column; gap: 2px; align-items: center; justify-content: center; }
  .rail-btn .ic { width: 22px; height: 22px; }
  .rail-label { display: block; font-size: 10.5px; font-weight: 700; }
  .rail-mobile-only { display: flex; }
  .rail-pill { width: 64px; height: 54px; }
  .rail-pill::before { display: none; }
  .rail-badge { top: 2px; right: 10px; }
  .rail-dot { top: 6px; right: 18px; }
  .sidebar { grid-row: 1; border-right: 0; }
  .main { position: fixed; inset: 0; z-index: 30; transform: translateX(100%); transition: transform .4s var(--ease); }
  body.chat-open .main { transform: none; }
  .app.ready .main { animation: none; }
  .back-btn { display: inline-grid; }
  .empty { display: none; }
  .call-group .icon-btn { width: 36px; }
  .chat-head { padding: 0 6px; gap: 2px; }
  .chat-head-info { padding: 6px 4px; gap: 10px; }
  #btnSearchChat { display: none; }
  .msg-row { padding: 0 3%; }
  .bubble-wrap { max-width: 82%; }
  .react-btn { display: none; }
  .drawer { position: fixed; z-index: 40; }
  .self-view { width: 120px; bottom: 130px; right: 14px; }
  .call-controls { gap: 8px; }
  .cc { width: 56px; } .cc .cc-ic { width: 52px; height: 52px; }
  .story-card { height: 100%; border-radius: 0; width: 100%; aspect-ratio: auto; }
  .story-nav { display: none; }
  .toasts { left: 12px; right: 12px; align-items: stretch; }
  .notif { width: auto; }
  .tiles { inset: 70px 10px 130px; grid-template-columns: repeat(2, 1fr); }
  .emoji-panel { left: 8px; width: calc(100% - 16px); }
  .attach-menu { left: 8px; }
}

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

/* ===================== Compléments ===================== */
.ci-preview .t .pv-ic, .star-bubble .pv-ic, .pinned-banner .pv-ic { width: 15px; height: 15px; vertical-align: -3px; margin-right: 3px; }
.ci-preview .t { display: inline; }
[data-theme="dark"] .loc-map svg { filter: invert(.88) hue-rotate(180deg) brightness(.95) saturate(.8); }
.d-item .switch { margin-left: auto; }
.chat-head-info .av-wrap .online-dot { width: 12px; height: 12px; border-color: var(--panel); }
.modal-head h3 .ic { width: 20px; height: 20px; vertical-align: -4px; margin-right: 4px; color: var(--accent-ink); }
.notif .avatar { --s: 42px; }
.pick-special { gap: 12px; }
.member .pick-special { display: contents; }
.member .pick-special .p-ic { width: 42px; height: 42px; }
.s-row .switch { margin-left: auto; }


/* =========================================================
   Style sobre + compte officiel + panel admin
   ========================================================= */
:root { --font: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; --brand: var(--font); --spring: cubic-bezier(.2, .8, .2, 1); --accent-2: var(--accent); }
.avatar { background: var(--a, #2f6fed); box-shadow: none; font-weight: 600; letter-spacing: 0; }
.avatar::after { display: none; }
.btn.primary, .send-btn { background: var(--accent); box-shadow: none; }
.btn { border-radius: 8px; } .icon-btn, .rail-btn, .rail-pill { border-radius: 8px; }
.chat-item, .call-item, .status-item, .archived-row, .star-item { border-radius: 8px; }
.side-title { font-weight: 700; font-size: 20px; letter-spacing: 0; }
.splash { background: var(--bg); } .splash-logo { width: 72px; height: 72px; filter: none; }
.splash-title { font-size: 28px; font-weight: 700; letter-spacing: 0; } .splash-title span { color: var(--text) !important; }
.splash-sub b { color: inherit; } .splash-bar { display: none; }
.onboard { background: var(--bg); }
.onboard-card { border-radius: 12px; background: var(--panel); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; text-align: left; }
.onboard-card h1 { font-size: 22px; font-weight: 700; letter-spacing: 0; } .ob-logo { width: 48px; height: 48px; margin: 0 0 14px; filter: none; }
.ob-avatar { margin-left: 0; }
.empty { background: var(--panel-2); border-bottom: 0; } .empty-art { width: auto; height: auto; margin-bottom: 14px; }
.empty-logo { width: 64px; height: 64px; filter: none; animation: none; }
.empty h2 { font-size: 20px; font-weight: 600; letter-spacing: 0; }
.list-empty .big { display: none; }
.bubble { border-radius: 10px; } .modal { border-radius: 12px; } .ctx { border-radius: 10px; }
.input-wrap { border-radius: 10px; } .search, .chip, .chip-pill { border-radius: 8px; }
.s-group, .me-card { border-radius: 10px; } .me-card::before, .profile-hero::before { display: none; }
.modal-head h3, .call-name, .profile-hero h2, .me-info .me-name { font-weight: 600; letter-spacing: 0; }
.call-bg .blob { display: none; } .call-bg { background: #14161c; }
.stagger .chat-item, .stagger .call-item, .stagger .status-item, .stagger .s-card { animation: none; }
.msg-row.pop .bubble-wrap { animation: fadeUp .18s ease both; }
.send-btn.shoot .i-send, .ticks.anim .ic, .jumbo.pop .jumbo-text { animation: none; }
.app.ready .rail, .app.ready .sidebar, .app.ready .main { animation: none; }
.call-link .cl-ic, .pick-special .p-ic { background: var(--accent); box-shadow: none; }

.vbadge { display: inline-flex; flex: none; }
.verified { color: #1d9bf0; width: 17px; height: 17px; }

.admin { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--panel-2); overflow: hidden; }
.adm-head { height: 66px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 24px; background: var(--panel); border-bottom: 1px solid var(--line); }
.adm-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.adm-body { flex: 1; overflow-y: auto; padding: 20px 24px 40px; max-width: 900px; width: 100%; }
.adm-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 16px; margin-bottom: 14px; }
.adm-card h3 { margin: 12px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.adm-card > textarea, .adm-card > .adm-chips, .adm-card > .adm-add { margin: 8px 0 12px; }
.adm-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.adm-row + .adm-row { border-top: 1px solid var(--line); }
.adm-row > div:first-of-type { flex: 1; min-width: 0; }
.adm-row b { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 4px; }
.adm-row small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.4; }
.adm-user { justify-content: flex-start; flex-wrap: wrap; }
.adm-user > .avatar + div { flex: 1; }
.adm-acts { display: flex; gap: 6px; flex-wrap: wrap; flex: none !important; }
.adm-acts .btn, .adm-tools .btn, .adm-add .btn { height: 34px; padding: 0 12px; font-size: 13px; }
.adm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.adm-stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.adm-stat b { display: block; font-size: 26px; font-weight: 600; } .adm-stat span { font-size: 12.5px; color: var(--muted); }
.adm-seg { display: flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; flex: none !important; }
.adm-seg button { padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.adm-seg button + button { border-left: 1px solid var(--line-2); }
.adm-seg button.on { background: var(--accent); color: #fff; }
.adm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: 6px; background: var(--panel-3); font-size: 13px; }
.adm-chip button { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 4px; color: var(--muted); }
.adm-chip button:hover { background: var(--active); color: var(--danger); } .adm-chip .ic { width: 13px; height: 13px; }
.adm-add { display: flex; gap: 8px; } .adm-add .input { height: 34px; } .adm-add .btn { flex: none; }
.adm-nums { display: flex; gap: 8px; flex: none !important; } .adm-num { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); flex: none; }
.adm-num .input { width: 76px; height: 34px; padding: 0 8px; }
.adm-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.adm-empty { color: var(--muted); font-size: 13.5px; padding: 10px 0; margin: 0; }
.adm-test { display: flex; flex-direction: column; gap: 4px; font-size: 13px; margin-bottom: 12px; color: var(--muted); }
.adm-test .ok { color: var(--ok); } .adm-test .ko { color: var(--danger); }
.adm-log { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.adm-log:first-child { border-top: 0; } .adm-log.new { box-shadow: inset 3px 0 0 var(--accent); margin-left: -16px; padding-left: 13px; }
.al-main { flex: 1; min-width: 0; } .al-top { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--muted); }
.al-top b { color: var(--text); font-weight: 600; } .al-top time { margin-left: auto; flex: none; }
.adm-log p { margin: 4px 0 6px; font-size: 14px; overflow-wrap: anywhere; }
.al-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.al-tags span { font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 4px; background: var(--panel-3); }
.al-tags .act.block { background: color-mix(in oklab, var(--danger) 18%, transparent); color: var(--danger); }
.al-tags .act.mask { background: color-mix(in oklab, var(--warn) 20%, transparent); color: var(--warn); }
.al-tags small { color: var(--muted); font-size: 12px; } .al-acts { display: flex; gap: 2px; flex: none; }
.adm-ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; background: var(--panel-3); color: var(--text-2); flex: none; }
.adm-note { color: var(--muted); font-size: 12.5px; line-height: 1.5; padding: 14px 12px; margin: 0; }
button.switch { cursor: pointer; }
@media (max-width: 860px) { body.admin-open .main { transform: none; } .adm-head { padding: 0 8px; } .adm-body { padding: 14px 12px 30px; } .adm-row { flex-wrap: wrap; } }
.swatch { background: var(--a); }

.auth-err { color: var(--danger); font-size: 13px; min-height: 18px; margin: 0 0 10px; }

#remoteVid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.remote-video.real .rv-scene, .remote-video.real .rv-person, .remote-video.real .rv-grain { display: none; }
.remote-video.novideo { opacity: 0 !important; }
.call.video.connected:has(.remote-video.novideo) .call-avatar-wrap { opacity: 1; transform: none; }

/* ===================== Badges ===================== */
.adm-user > .avatar { flex: none !important; }
.ubadges { display: inline-flex; align-items: center; gap: 3px; margin-left: 5px; flex: none; vertical-align: middle; }
.ubadge { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 5px; background: var(--bc); color: #fff; flex: none; }
.ubadge .ic { width: 11px; height: 11px; stroke-width: 2.4; }
.ubadges.full { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.ubadges.full .ubadge { width: auto; height: 24px; padding: 0 9px 0 7px; display: inline-flex; gap: 5px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: color-mix(in oklab, var(--bc) 18%, transparent); color: color-mix(in oklab, var(--bc) 70%, var(--text)); border: 1px solid color-mix(in oklab, var(--bc) 40%, transparent); }
.ubadges.full .ubadge .ic { width: 13px; height: 13px; }
.profile-hero .ubadges.full { justify-content: center; position: relative; margin-top: 12px; }
.adm-row b + .ubadges.full { margin: 6px 0 4px; }
.adm-badges { flex: 1 1 100% !important; order: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 4px; }
.adm-badges > span { font-size: 12px; color: var(--muted); margin-right: 4px; }
.ubadge-toggle { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px 0 8px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); border: 1px dashed var(--line-2); }
.ubadge-toggle .ic { width: 13px; height: 13px; }
.ubadge-toggle:hover { color: var(--text); border-color: var(--bc); }
.ubadge-toggle.on { background: color-mix(in oklab, var(--bc) 18%, transparent); color: color-mix(in oklab, var(--bc) 70%, var(--text)); border: 1px solid color-mix(in oklab, var(--bc) 45%, transparent); }
