@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg: #0a0a0c;
  --surface: #141418;
  --surface-2: #1c1c22;
  --surface-3: #26262e;
  --border: rgba(255,255,255,.07);
  --border-strong: rgba(255,255,255,.13);
  --text: #f4f4f6;
  --muted: #8f8f9c;
  --faint: #62626e;
  --accent: #f61e3c;
  --accent-2: #ff5a72;
  --accent-ink: #fff;
  --like: #f61e3c;
  --repost: #19cf86;
  --blue: #1d9bf0;
  --r-sm: 12px; --r: 18px; --r-lg: 22px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f2f4;
  --surface-3: #e7e8eb;
  --border: rgba(10,12,20,.09);
  --border-strong: rgba(10,12,20,.16);
  --text: #15171c;
  --muted: #5e6470;
  --faint: #9aa0ad;
  --accent: #e5102e;
  --accent-2: #e5102e;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 8% 32%, rgba(246,30,60,.08), transparent 55%),
    radial-gradient(1000px 600px at 96% 92%, rgba(246,30,60,.10), transparent 55%);
}
:root[data-theme="light"] body::before { opacity: .5; }
a { color: inherit; text-decoration: none; }
.boot { padding: 60px; text-align: center; color: var(--muted); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 20px; }

button { font-family: inherit; cursor: pointer; border: none; color: inherit; }
.btn { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 10px 20px;
  font-weight: 700; font-size: 14px; letter-spacing: -.01em; box-shadow: 0 8px 22px -10px var(--accent);
  transition: filter .15s ease, transform .1s ease; display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; box-shadow: none; cursor: default; }
.btn svg { width: 17px; height: 17px; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong);
  border-radius: 999px; padding: 7px 18px; font-weight: 700; font-size: 13.5px; transition: all .15s ease; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-ghost.active { background: var(--text); color: var(--bg); border-color: var(--text); }
input, textarea { width: 100%; background: var(--surface-2); border: 1px solid transparent; color: var(--text);
  border-radius: 14px; padding: 12px 15px; font-family: inherit; font-size: 15px; outline: none; transition: border-color .15s ease; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus { border-color: var(--border-strong); }
textarea { resize: none; min-height: 52px; line-height: 1.5; }
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 14px 0 6px; }

/* ---------- Avatars ---------- */
.avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: var(--surface-3); display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; overflow: hidden; font-size: 16px; letter-spacing: -.02em; user-select: none; }
.avatar.sm { width: 34px; height: 34px; font-size: 13px; }
.avatar.lg { width: 92px; height: 92px; font-size: 34px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 34px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { width: 44px; height: 44px; border-radius: 13px; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 23px; box-shadow: 0 8px 24px -8px var(--accent); }
.brand h1 { font-size: 26px; margin: 0; letter-spacing: -.035em; font-weight: 800; }
.brand h1 .r { color: var(--accent); }
.auth-card .brand { justify-content: center; }
.tagline { text-align: center; color: var(--muted); font-size: 14px; margin: 14px 0 26px; }
.auth-card .btn { width: 100%; justify-content: center; margin-top: 22px; padding: 13px; font-size: 15px; border-radius: 14px; }
.auth-switch { text-align: center; margin-top: 20px; color: var(--muted); font-size: 13.5px; }
.auth-switch a { cursor: pointer; font-weight: 700; color: var(--accent); }
.err { background: rgba(246,30,60,.12); border: 1px solid rgba(246,30,60,.35); color: var(--accent-2); padding: 10px 13px; border-radius: 11px; font-size: 13px; margin-top: 16px; }

/* ---------- Coquille 3 colonnes ---------- */
.shell { display: grid; grid-template-columns: 276px minmax(0,1fr) 340px; gap: 0; max-width: 1360px; margin: 0 auto; min-height: 100vh; }

/* ----- Sidebar ----- */
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 20px 16px; gap: 6px; overflow-y: auto; }
.sidebar .brand { padding: 8px 10px 16px; }
.sidebar .brand .logo { width: 40px; height: 40px; font-size: 21px; }
.sidebar .brand h1 { font-size: 23px; }
.navitem { display: flex; align-items: center; gap: 15px; padding: 12px 16px; border-radius: 999px; color: var(--text);
  font-weight: 600; font-size: 16px; cursor: pointer; transition: background .14s ease; position: relative; }
.navitem:hover { background: var(--surface-2); }
.navitem.active { background: linear-gradient(100deg, var(--accent), #c10f27); color: #fff; font-weight: 700; box-shadow: 0 10px 26px -12px var(--accent); }
.navitem svg { width: 23px; height: 23px; flex-shrink: 0; }
.navitem .badge { margin-left: auto; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.navitem.active .badge { background: #fff; color: var(--accent); }
.sidebar .btn.publier { margin: 14px 8px 8px; justify-content: center; padding: 14px; font-size: 16px; border-radius: 16px; }
.join-card { margin: 8px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.join-card .jbolt { width: 34px; height: 34px; border-radius: 10px; background: rgba(246,30,60,.15); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.join-card h4 { margin: 0 0 6px; font-size: 15px; letter-spacing: -.01em; }
.join-card p { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.join-card .btn-ghost { width: 100%; text-align: center; }
.sfoot { margin-top: auto; padding: 14px 12px 4px; font-size: 11.5px; color: var(--faint); line-height: 1.7; }

/* ----- Colonne centrale ----- */
.content { min-width: 0; padding: 0 0 60px; }
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(14px); display: flex; align-items: center; gap: 18px; padding: 14px 10px; }
.search-wrap { flex: 1; position: relative; display: flex; align-items: center; }
.search-ico { position: absolute; left: 20px; color: var(--faint); display: flex; pointer-events: none; }
.search-ico svg { width: 19px; height: 19px; }
.search { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 13px 20px 13px 50px; font-size: 15px; }
.search:focus { border-color: var(--border-strong); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-icon { width: 46px; height: 46px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--text); transition: background .14s ease; position: relative; }
.topbar-icon:hover { background: var(--surface-2); }
.topbar-icon svg { width: 21px; height: 21px; }
.topbar-icon .dot { position: absolute; top: 8px; right: 8px; min-width: 17px; height: 17px; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid var(--bg); }
.prof-pill { display: flex; align-items: center; gap: 9px; padding: 6px 14px 6px 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-weight: 600; }
.prof-pill:hover { background: var(--surface-2); }
.prof-pill .chev { color: var(--muted); font-size: 11px; }

.feed { padding: 6px 12px 0; }

/* ----- Carte générique ----- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; }

/* ----- Composer ----- */
.composer-card { padding: 18px 20px; margin-bottom: 18px; }
.composer { display: flex; gap: 14px; }
.composer .grow { flex: 1; }
.composer textarea { border: none; background: transparent; min-height: 46px; font-size: 18px; padding: 10px 0; }
.composer-bar { display: flex; align-items: center; gap: 4px; margin-top: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
.cbtn { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; transition: all .14s ease; }
.cbtn:hover { background: var(--surface-2); color: var(--accent); }
.cbtn svg { width: 19px; height: 19px; }
.composer-bar .btn { margin-left: auto; }
.img-preview { margin-top: 12px; position: relative; display: inline-block; }
.img-preview img { max-height: 260px; border-radius: 16px; display: block; }
.img-preview .x { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); color: #fff; border-radius: 50%; width: 30px; height: 30px; }

/* ----- Posts ----- */
.post { padding: 18px 20px; margin-bottom: 16px; animation: rise .3s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.post .head { display: flex; gap: 12px; align-items: flex-start; }
.post .hmeta { flex: 1; min-width: 0; }
.post .line1 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.post .name { font-weight: 700; letter-spacing: -.01em; cursor: pointer; }
.post .name:hover { text-decoration: underline; }
.post .verif { color: var(--blue); display: inline-flex; }
.post .verif svg { width: 16px; height: 16px; }
.post .handle { color: var(--muted); font-size: 14px; }
.post .dot-sep { color: var(--faint); }
.post .time { color: var(--muted); font-size: 14px; }
.post .more { margin-left: auto; color: var(--faint); background: transparent; width: 32px; height: 32px; border-radius: 999px; font-size: 18px; }
.post .more:hover { background: var(--surface-2); color: var(--text); }
.post .body { margin: 8px 0 0; white-space: pre-wrap; word-break: break-word; font-size: 15.5px; line-height: 1.55; }
.post .photo { margin-top: 12px; }
.post .photo img { width: 100%; border-radius: 16px; display: block; border: 1px solid var(--border); }
.post .actions { display: flex; align-items: center; gap: 4px; margin-top: 14px; }
.act { background: transparent; color: var(--muted); font-weight: 500; font-size: 13.5px; padding: 8px 12px; border-radius: 999px;
  display: flex; align-items: center; gap: 8px; transition: all .14s ease; }
.act svg { width: 19px; height: 19px; }
.ico { display: inline-flex; align-items: center; }
.act:hover { color: var(--text); background: var(--surface-2); }
.act.like:hover, .act.like.on { color: var(--like); }
.act.like.on svg { fill: var(--like); stroke: var(--like); }
.act.repost:hover, .act.repost.on { color: var(--repost); }
.act.comment:hover { color: var(--blue); }
.act.spacer { margin-left: auto; }
.react-wrap { position: relative; }
.react-pop { position: absolute; bottom: calc(100% + 8px); left: 0; display: flex; gap: 2px; padding: 5px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.6);
  opacity: 0; visibility: hidden; transform: translateY(6px) scale(.92); transform-origin: bottom left; transition: all .16s ease; z-index: 8; }
.react-wrap:hover .react-pop { opacity: 1; visibility: visible; transform: none; }
.rp { font-size: 22px; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: transform .12s ease; }
.rp:hover { transform: scale(1.3) translateY(-3px); }
.comments { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 14px; }
.comment { display: flex; gap: 10px; margin-bottom: 12px; }
.comment .bubble { background: var(--surface-2); border-radius: 14px; padding: 8px 13px; }
.comment .bubble .name { font-weight: 700; font-size: 13px; }
.comment .bubble .txt { font-size: 14px; }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }

/* ----- Emoji picker ----- */
.emoji-wrap { position: relative; display: inline-flex; }
.emoji-pop { position: absolute; bottom: calc(100% + 10px); left: 0; width: 300px; max-height: 210px; overflow-y: auto;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 10px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.6); z-index: 40; }
.ep { font-size: 21px; width: 100%; aspect-ratio: 1; border-radius: 9px; background: transparent; display: flex; align-items: center; justify-content: center; }
.ep:hover { background: var(--surface-2); }

/* ----- Colonne droite ----- */
.rail { padding: 18px 16px 40px; display: flex; flex-direction: column; gap: 18px; }
.rail .card { padding: 6px 4px; }
.rail h3 { display: flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 800; letter-spacing: -.02em; margin: 0; padding: 14px 16px 6px; }
.rail h3 .fire { color: var(--accent); display: inline-flex; }
.rail h3 .seeall { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--accent); cursor: pointer; }
.trend { display: flex; gap: 12px; align-items: center; padding: 10px 16px; cursor: pointer; transition: background .14s ease; }
.trend:hover { background: var(--surface-2); }
.trend .rank { color: var(--faint); font-weight: 700; width: 14px; }
.trend .tmeta .tag { font-weight: 700; font-size: 15px; }
.trend .tmeta .cnt { color: var(--muted); font-size: 12.5px; }
.sugg { display: flex; gap: 12px; align-items: center; padding: 10px 16px; }
.sugg .smeta { flex: 1; min-width: 0; }
.sugg .smeta .sn { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 5px; cursor: pointer; }
.sugg .smeta .sh { color: var(--muted); font-size: 13px; }

.empty { color: var(--muted); text-align: center; padding: 48px 16px; font-size: 14px; }

/* ----- Panels (profil / recherche / vues simples) ----- */
.panel { padding: 18px 20px 60px; }
.panel .phead { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.panel .phead .ttl { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.prof-top { padding: 22px; text-align: center; margin-bottom: 16px; }
.prof-top .nm { font-weight: 800; font-size: 24px; letter-spacing: -.02em; margin-top: 14px; }
.prof-top .bio { color: var(--muted); margin-top: 6px; }
.prof-top .stats { display: flex; justify-content: center; gap: 30px; margin-top: 16px; }
.prof-top .stats b { font-weight: 700; } .prof-top .stats span { color: var(--muted); }
.prof-top .pbtns { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }

/* ---------- Visionneuse de story ---------- */
.story-viewer { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.95); display: flex; align-items: center; justify-content: center; }
.sv-inner { position: relative; width: 100%; max-width: 420px; height: 100%; max-height: 92vh; }
.sv-bars { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 3; }
.sv-bar { flex: 1; height: 3px; background: rgba(255,255,255,.3); border-radius: 3px; overflow: hidden; }
.sv-bar-fill { height: 100%; width: 0; background: #fff; }
.sv-bar-fill.done { width: 100%; }
.sv-bar-fill.active { width: 100%; animation: svfill 5s linear; }
@keyframes svfill { from { width: 0; } to { width: 100%; } }
.sv-head { position: absolute; top: 24px; left: 14px; right: 14px; display: flex; align-items: center; gap: 10px; z-index: 3; color: #fff; }
.sv-name { font-weight: 700; font-size: 14px; } .sv-time { font-size: 12px; opacity: .8; }
.sv-close { margin-left: auto; background: transparent; color: #fff; font-size: 20px; }
.sv-img { width: 100%; height: 100%; object-fit: contain; border-radius: 14px; }
.sv-zone { position: absolute; top: 0; bottom: 0; width: 40%; z-index: 2; cursor: pointer; }
.sv-zone.left { left: 0; } .sv-zone.right { right: 0; }

/* ---------- Messagerie ---------- */
.msgr-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.msgr { width: 100%; max-width: 820px; height: 82vh; max-height: 640px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 22px; display: flex; flex-direction: column; overflow: hidden; }
.msgr-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.msgr-head .sv-close { color: var(--muted); }
.msgr-body { flex: 1; display: grid; grid-template-columns: 290px 1fr; min-height: 0; }
.msgr-convos { border-right: 1px solid var(--border); overflow-y: auto; }
.msgr-title { padding: 16px 20px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 700; }
.convo { display: flex; gap: 11px; align-items: center; padding: 11px 16px; cursor: pointer; transition: background .14s ease; }
.convo:hover { background: var(--surface-2); }
.convo .cmeta { min-width: 0; }
.convo .cn { font-weight: 700; font-size: 14px; }
.convo .cl { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.msgr-thread { display: flex; flex-direction: column; min-height: 0; }
.thread-head { display: flex; align-items: center; gap: 11px; padding: 14px 18px; border-bottom: 1px solid var(--border); font-weight: 700; }
.msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 7px; }
.bub { max-width: 72%; padding: 9px 14px; border-radius: 20px; font-size: 14.5px; word-break: break-word; line-height: 1.4; }
.bub.mine { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.bub.theirs { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 6px; }
.thread-form { display: flex; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--border); align-items: center; }
.thread-form input { border-radius: 999px; }

/* ---------- Paramètres ---------- */
.set-sec { margin-bottom: 16px; }
.set-sec .card { padding: 4px 2px; }
.set-sec h4 { margin: 0 0 6px; padding: 4px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 700; }
.srow { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-top: 1px solid var(--border); }
.srow:first-of-type { border-top: none; }
.srow .sinfo { flex: 1; min-width: 0; }
.srow .sinfo .st { font-weight: 600; font-size: 15px; }
.srow .sinfo .sd { color: var(--muted); font-size: 13px; margin-top: 2px; }
.switch { width: 48px; height: 28px; border-radius: 999px; background: var(--surface-3); position: relative; cursor: pointer; transition: background .16s ease; flex-shrink: 0; }
.switch.on { background: var(--accent); }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .16s ease; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch.on .knob { transform: translateX(20px); }
.set-profile { display: flex; gap: 16px; align-items: center; padding: 18px; }
.set-profile .grow { flex: 1; }

/* ---------- Explorer (grille façon Instagram) ---------- */
.explore-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.etile { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 10px; cursor: pointer; background: var(--surface-2); }
.etile img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.etile:hover img { transform: scale(1.06); }
.etile .eover { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; display: flex; align-items: center; justify-content: center; gap: 20px; color: #fff; font-weight: 700; font-size: 15px; transition: opacity .16s ease; }
.etile:hover .eover { opacity: 1; }
.post-modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.72); display: flex; align-items: center; justify-content: center; padding: 24px; }
.pm-inner { width: 100%; max-width: 560px; position: relative; }
.pm-inner .post { max-height: 90vh; overflow-y: auto; }
.pm-close { position: absolute; top: -16px; right: -16px; z-index: 2; background: var(--surface); border: 1px solid var(--border-strong); width: 38px; height: 38px; border-radius: 50%; color: var(--text); font-size: 16px; }

/* ---------- Notifications ---------- */
.notif { display: flex; gap: 13px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--border); cursor: pointer; transition: background .14s ease; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.notif .nic { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 16px; }
.notif .ntxt { flex: 1; min-width: 0; font-size: 14.5px; }
.notif .ntxt b { font-weight: 700; }
.notif .ntime { color: var(--faint); font-size: 12.5px; }

/* ---------- Page Messages ---------- */
.messages { display: grid; grid-template-columns: 330px 1fr; height: calc(100vh - 88px); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; margin: 6px 12px; background: var(--surface); }
.messages .mcol { border-right: 1px solid var(--border); overflow-y: auto; }
.messages .mhead { padding: 18px 18px 10px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.messages .mthread { display: flex; flex-direction: column; min-height: 0; }
.messages .mthread .empty { margin: auto; }

/* ---------- Appels vocal / vidéo ---------- */
.call-overlay { position: fixed; inset: 0; z-index: 120; background: #0a0a0c; display: flex; flex-direction: column; }
.call-remote { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.call-remote video { width: 100%; height: 100%; object-fit: cover; }
.call-info { position: absolute; top: 28px; left: 0; right: 0; text-align: center; color: #fff; z-index: 2; }
.call-info .cn { font-size: 23px; font-weight: 800; letter-spacing: -.02em; }
.call-info .cs { color: rgba(255,255,255,.72); margin-top: 4px; font-size: 14px; }
.call-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-align: center; }
.call-local { position: absolute; bottom: 110px; right: 20px; width: 150px; height: 200px; border-radius: 16px; overflow: hidden; border: 2px solid rgba(255,255,255,.18); background: #111; z-index: 3; }
.call-local video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.call-controls { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 28px; }
.call-btn { width: 62px; height: 62px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 25px; color: #fff; background: rgba(255,255,255,.14); transition: background .14s, transform .1s; }
.call-btn:hover { background: rgba(255,255,255,.26); }
.call-btn:active { transform: scale(.94); }
.call-btn.hang { background: var(--accent); }
.call-btn.off { background: #fff; color: #111; }

.incoming-call { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 130; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 18px; padding: 15px 20px; display: flex; align-items: center; gap: 14px;
  box-shadow: 0 24px 64px -20px rgba(0,0,0,.8); min-width: 350px; animation: rise .25s ease both; }
.incoming-call .ic-meta { flex: 1; min-width: 0; }
.incoming-call .ic-meta .icn { font-weight: 700; }
.incoming-call .ic-meta .ics { color: var(--muted); font-size: 13px; }
.ic-actions { display: flex; gap: 10px; }
.ic-accept, .ic-reject { width: 46px; height: 46px; border-radius: 50%; color: #fff; font-size: 19px; display: flex; align-items: center; justify-content: center; }
.ic-accept { background: var(--repost); }
.ic-reject { background: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .shell { grid-template-columns: 76px minmax(0,1fr) 300px; } .sidebar .brand h1, .navitem span, .join-card, .sfoot, .sidebar .btn.publier span { display: none; } .navitem { justify-content: center; } .sidebar .btn.publier { padding: 14px; } }
@media (max-width: 880px) { .shell { grid-template-columns: 76px minmax(0,1fr); } .rail { display: none; } }
@media (max-width: 600px) { .shell { grid-template-columns: 1fr; } .sidebar { display: none; } .msgr-body { grid-template-columns: 1fr; } }
