/* ==========================================================================
   Sunio — design system partagé (web, Android, iOS)
   ========================================================================== */

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

:root {
  --accent: #FF1A75;
  --accent-ink: #FFFFFF;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-softer: color-mix(in srgb, var(--accent) 8%, transparent);

  --bg: #F4F1F4;
  --bg-elev: #FBFAFB;
  --surface: #FFFFFF;
  --surface-2: #F2EFF3;
  --surface-3: #E8E4EA;
  --border: #E6E1E8;
  --text: #141416;
  --text-2: #4A4A55;
  --muted: #8A8794;
  --overlay: rgba(20, 16, 24, .45);
  --shadow: 0 1px 2px rgba(20, 10, 30, .04), 0 8px 24px rgba(20, 10, 30, .06);
  --shadow-lg: 0 20px 60px rgba(20, 10, 30, .18);

  --verified: #1D9BF0;
  --admin: #8B5CF6;
  --success: #16A34A;
  --warning: #F59E0B;
  --danger: #EF4444;

  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --r-xl: 32px;

  --tabbar-h: 76px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: 'Jakarta', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121113;
    --bg-elev: #161518;
    --surface: #1D1C1F;
    --surface-2: #262529;
    --surface-3: #313035;
    --border: #2C2B30;
    --text: #F6F5F7;
    --text-2: #C9C7CF;
    --muted: #8D8A96;
    --overlay: rgba(0, 0, 0, .6);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121113;
  --bg-elev: #161518;
  --surface: #1D1C1F;
  --surface-2: #262529;
  --surface-3: #313035;
  --border: #2C2B30;
  --text: #F6F5F7;
  --text-2: #C9C7CF;
  --muted: #8D8A96;
  --overlay: rgba(0, 0, 0, .6);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
img { display: block; max-width: 100%; }
svg[class=""] { width: 22px; height: 22px; flex: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: #121113;
  transition: opacity .45s ease, visibility .45s;
}
.splash.is-done { opacity: 0; visibility: hidden; }
.splash__inner { display: grid; justify-items: center; gap: 22px; }
.splash__logo { width: 96px; height: 96px; animation: splash-pop .9s cubic-bezier(.2, .9, .3, 1.3) both; }
.splash__logo path { stroke-dasharray: 120; stroke-dashoffset: 120; animation: splash-draw 1s .25s ease forwards; }
.splash__name { color: #fff; font-size: 34px; font-weight: 800; letter-spacing: -.03em; animation: fade-up .6s .35s both; }
.splash__name span { color: var(--accent); }
.splash__tag { color: #9D9AA5; font-size: 14px; margin-top: -14px; animation: fade-up .6s .5s both; }
.splash__bar { width: 120px; height: 4px; border-radius: 4px; background: #2A2930; overflow: hidden; animation: fade-up .6s .6s both; }
.splash__bar::after { content: ''; display: block; width: 40%; height: 100%; border-radius: 4px; background: var(--accent); animation: bar-slide 1.1s ease-in-out infinite; }
@keyframes splash-pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes splash-draw { to { stroke-dashoffset: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes bar-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* ---------- Loaders ---------- */
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid color-mix(in srgb, currentColor 22%, transparent);
  border-top-color: currentColor;
  animation: spin .7s linear infinite;
  flex: none;
}
.spinner--lg { width: 34px; height: 34px; border-width: 3px; color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
.loader-block { display: grid; place-items: center; padding: 40px 0; color: var(--accent); }
.dots-loader { display: inline-flex; gap: 5px; }
.dots-loader i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: dot 1s infinite ease-in-out; }
.dots-loader i:nth-child(2) { animation-delay: .15s; }
.dots-loader i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: none; opacity: 1; } }
.topline-loader { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 900; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .2s; }
.topline-loader.is-on { opacity: 1; }
.topline-loader::after { content: ''; position: absolute; inset: 0; width: 35%; background: var(--accent); border-radius: 3px; animation: bar-slide 1s ease-in-out infinite; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 10px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skel-card { padding: 16px; display: grid; gap: 10px; }
.skel-row { display: flex; gap: 10px; align-items: center; }

/* ---------- Shell ---------- */
.shell { min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
.content {
  width: 100%; max-width: 640px; margin: 0 auto;
  padding: calc(var(--safe-top) + 8px) 14px calc(var(--tabbar-h) + var(--safe-bottom) + 28px);
  min-width: 0;
}
.sidebar, .rightbar { display: none; }

@media (min-width: 900px) {
  .shell { grid-template-columns: 250px minmax(0, 640px); justify-content: center; gap: 28px; }
  .content { padding: 18px 0 40px; margin: 0; }
  .sidebar {
    display: flex; flex-direction: column; gap: 6px;
    position: sticky; top: 0; height: 100dvh; padding: 22px 0;
  }
  .tabbar { display: none !important; }
}
@media (min-width: 1240px) {
  .shell { grid-template-columns: 250px minmax(0, 640px) 320px; }
  .rightbar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; height: 100dvh; padding: 22px 0; overflow-y: auto; }
}

.brand { display: flex; align-items: center; gap: 12px; padding: 4px 14px 20px; font-weight: 800; font-size: 24px; letter-spacing: -.03em; }
.brand img { width: 40px; height: 40px; border-radius: 12px; }
.brand span { color: var(--accent); }
.side-link {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 999px;
  font-weight: 600; font-size: 16px; color: var(--text-2); transition: background .15s, color .15s;
}
.side-link svg { width: 24px; height: 24px; }
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link.is-active { background: var(--accent-soft); color: var(--accent); }
.side-link .badge-count { margin-left: auto; }
.sidebar .btn--primary { margin-top: 14px; }
.side-me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); }
.side-me .meta { min-width: 0; flex: 1; }

/* ---------- Tab bar mobile (style capture) ---------- */
.tabbar {
  position: fixed; z-index: 50; left: 12px; right: 12px; bottom: calc(10px + var(--safe-bottom));
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 4px;
  padding: 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  max-width: 520px; margin: 0 auto;
}
.tab {
  position: relative; height: 50px; min-width: 50px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; color: var(--muted); transition: all .25s cubic-bezier(.3, .7, .3, 1);
}
.tab svg { width: 23px; height: 23px; }
.tab__icon { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; flex: none; transition: background .25s; }
.tab__label { display: none; font-weight: 700; font-size: 14px; padding-right: 16px; }
.tab.is-active { background: var(--accent-soft); color: var(--accent); flex: 1 1 auto; max-width: 150px; justify-content: flex-start; }
.tab.is-active .tab__icon { background: var(--accent); color: var(--accent-ink); }
.tab.is-active .tab__label { display: inline; }
.tab .dot-count { position: absolute; top: 6px; left: 32px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-top) + 6px) 2px 10px; margin: calc(-1 * var(--safe-top) - 8px) -2px 6px;
  background: linear-gradient(var(--bg) 70%, transparent);
}
@media (min-width: 900px) { .topbar { margin-top: -18px; padding-top: 18px; } }
.topbar__title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__title small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.icon-btn {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); color: var(--text);
  box-shadow: var(--shadow); transition: transform .15s, background .15s;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:active { transform: scale(.94); }
.icon-btn--ghost { background: transparent; box-shadow: none; }
.icon-btn--sm { width: 36px; height: 36px; }
.icon-btn--sm svg { width: 18px; height: 18px; }
.pill-btn {
  height: 46px; padding: 0 16px 0 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); box-shadow: var(--shadow); font-weight: 700; font-size: 17px;
}
.pill-btn svg { width: 22px; height: 22px; }
.pill-btn.has-unread svg { color: var(--accent); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 999px;
  font-weight: 700; font-size: 15px; white-space: nowrap;
  background: var(--surface-2); color: var(--text);
  transition: transform .12s, filter .15s, background .15s, opacity .15s;
}
.btn svg { width: 20px; height: 20px; }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn.is-loading { opacity: .65; pointer-events: none; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { filter: brightness(1.06); }
.btn--soft { background: var(--accent-soft); color: var(--accent); }
.btn--outline { background: transparent; border: 1.5px solid var(--border); }
.btn--danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.btn--block { width: 100%; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn--lg { height: 56px; font-size: 17px; padding: 0 28px; }
.btn .spinner { width: 18px; height: 18px; }
.fab {
  position: fixed; z-index: 45; right: 18px; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 18px);
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: transform .15s;
}
.fab svg { width: 28px; height: 28px; }
.fab:active { transform: scale(.92); }
@media (min-width: 900px) { .fab { display: none; } }

/* ---------- Cartes & listes ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.card--pad { padding: 18px; }
.card + .card { margin-top: 12px; }
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 6px 10px; }
.stack { display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.bold { font-weight: 700; }
.center { text-align: center; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.divider { height: 1px; background: var(--border); margin: 12px 0; }

.list-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: var(--r); transition: background .15s; width: 100%; text-align: left;
}
.list-item:hover { background: var(--surface-2); }
.list-item .chev { color: var(--muted); width: 18px; height: 18px; }
.list-item svg.lead { width: 22px; height: 22px; color: var(--text-2); flex: none; }

/* ---------- Avatars & badges ---------- */
.avatar {
  position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface-3); display: grid; place-items: center; overflow: hidden;
  font-weight: 800; color: #fff; font-size: 16px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--xs { width: 28px; height: 28px; font-size: 11px; }
.avatar--sm { width: 36px; height: 36px; font-size: 13px; }
.avatar--lg { width: 64px; height: 64px; font-size: 22px; }
.avatar--xl { width: 104px; height: 104px; font-size: 34px; border-radius: 28px; }
.name-line { display: inline-flex; align-items: center; gap: 4px; min-width: 0; font-weight: 700; }
.name-line .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vbadge { width: 17px; height: 17px; flex: none; }
.vbadge--verified { color: var(--verified); }
.vbadge--admin { color: var(--admin); }
.handle { color: var(--muted); font-weight: 500; }
.fs-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 800; background: var(--surface-2); color: var(--text-2);
}
.fs-chip.hi { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.fs-chip.lo { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.badge-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800;
}
.dot-count { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
.role-tag { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--admin) 16%, transparent); color: var(--admin); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Line pill (ligne de transport) ---------- */
.line-pill {
  display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 7px;
  border-radius: 8px; font-weight: 800; font-size: 13px; color: #fff; background: var(--lc, #888);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .15); flex: none;
}
.line-pill[data-mode="metro"], .line-pill[data-mode="tram"] { border-radius: 50%; min-width: 26px; padding: 0; }
.line-pill[data-mode="metro"].wide, .line-pill[data-mode="tram"].wide { border-radius: 13px; padding: 0 7px; }
.line-pill--lg { min-width: 36px; height: 36px; font-size: 15px; }
.cluster-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text-2); padding: 3px 9px 3px 7px; border-radius: 999px; background: var(--surface-2); max-width: 100%; }
.cluster-tag::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--cc, var(--accent)); flex: none; }

/* ---------- Stories ---------- */
.stories { display: flex; gap: 14px; overflow-x: auto; padding: 4px 4px 14px; margin: 0 -14px 4px; padding-inline: 14px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story-bubble { display: grid; justify-items: center; gap: 6px; width: 74px; flex: none; }
.story-ring { position: relative; width: 70px; height: 70px; border-radius: 50%; padding: 3px; background: conic-gradient(from 210deg, var(--accent), #FFB547, var(--accent)); }
.story-ring.is-seen { background: var(--surface-3); }
.story-ring .avatar { width: 100%; height: 100%; border: 3px solid var(--bg); }
.story-ring--add { background: transparent; border: 2px dashed var(--surface-3); }
.story-add { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; border: 3px solid var(--bg); box-shadow: var(--shadow); }
.story-add svg { width: 13px; height: 13px; }
.story-bubble span { font-size: 13px; font-weight: 600; color: var(--text-2); max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.story-viewer { position: fixed; inset: 0; z-index: 600; background: #000; display: flex; flex-direction: column; }
.story-viewer__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.story-viewer__top { position: relative; z-index: 2; padding: calc(var(--safe-top) + 10px) 12px 30px; background: linear-gradient(rgba(0, 0, 0, .55), transparent); color: #fff; }
.story-progress { display: flex; gap: 4px; margin-bottom: 12px; }
.story-progress i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.story-progress i b { display: block; height: 100%; width: 0; background: #fff; }
.story-viewer__caption { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 40px 18px calc(var(--safe-bottom) + 24px); color: #fff; font-size: 16px; font-weight: 600; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); }
.story-viewer__nav { position: absolute; inset: 0; z-index: 1; display: flex; }
.story-viewer__nav button { flex: 1; }
.story-viewer .icon-btn { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; }

/* ---------- Posts ---------- */
.post { padding: 16px 16px 12px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.post + .post, .post + .loader-block, .feed > * + * { margin-top: 12px; }
.post__head { display: flex; gap: 10px; align-items: center; }
.post__who { min-width: 0; flex: 1; display: grid; }
.post__who .sub { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); min-width: 0; }
.post__body { margin: 10px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; }
.post__body a.tag, .post__body a.mention, .rich a { color: var(--accent); font-weight: 600; }
.post__body a.link, .rich a.link { text-decoration: underline; }
.post__meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.post__reply-to { font-size: 13px; color: var(--muted); margin-top: 2px; }
.post__review { margin-top: 10px; display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--warning) 13%, transparent); color: color-mix(in srgb, var(--warning) 75%, var(--text)); font-size: 13px; font-weight: 600; }
.post__review svg { width: 18px; height: 18px; flex: none; }
.media-grid { display: grid; gap: 4px; margin-top: 12px; border-radius: 20px; overflow: hidden; }
.media-grid.n2, .media-grid.n4 { grid-template-columns: 1fr 1fr; }
.media-grid.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.media-grid.n3 > :first-child { grid-row: span 2; }
.media-grid button { display: block; background: var(--surface-2); aspect-ratio: 4 / 3; }
.media-grid.n1 button { aspect-ratio: auto; max-height: 520px; }
.media-grid img { width: 100%; height: 100%; object-fit: cover; }
.media-grid.n1 img { max-height: 520px; object-fit: cover; }
.post__actions { display: flex; align-items: center; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.act {
  height: 38px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); color: var(--text-2); font-weight: 700; font-size: 14px; transition: background .15s, color .15s, transform .12s;
}
.act svg { width: 19px; height: 19px; }
.act:active { transform: scale(.94); }
.act.is-on { color: var(--accent); background: var(--accent-soft); }
.act.is-on svg { fill: currentColor; }
.act--useful.is-on { color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); }
.act--notuseful.is-on { color: var(--danger); background: color-mix(in srgb, var(--danger) 13%, transparent); }
.act--icon { width: 38px; padding: 0; justify-content: center; }
.post__actions .push { margin-left: auto; }
.thread-line { margin: -4px 0 -4px 37px; width: 2px; height: 18px; background: var(--border); }

/* Hero (style carte live de la capture) */
.hero-card { position: relative; border-radius: var(--r-xl); overflow: hidden; background: var(--surface-2); }
.hero-card img { width: 100%; aspect-ratio: 4 / 4.2; object-fit: cover; }
.hero-chip { position: absolute; top: 14px; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.hero-chip--live { left: 14px; background: var(--accent); color: #fff; }
.hero-chip--live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.hero-chip--count { right: 14px; background: rgba(255, 255, 255, .22); color: #fff; backdrop-filter: blur(8px); }

/* ---------- Segmented / onglets internes ---------- */
.segmented { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; }
.segmented::-webkit-scrollbar { display: none; }
.segmented button { flex: 1 0 auto; height: 40px; padding: 0 16px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; transition: background .2s, color .2s; }
.segmented button.is-active { background: var(--accent); color: var(--accent-ink); }
.icon-tabs { display: flex; justify-content: space-around; border-bottom: 1px solid var(--border); margin: 8px 0 14px; }
.icon-tabs button { flex: 1; display: grid; justify-items: center; gap: 4px; padding: 12px 0; color: var(--muted); font-size: 12px; font-weight: 700; position: relative; }
.icon-tabs button svg { width: 24px; height: 24px; }
.icon-tabs button.is-active { color: var(--accent); }
.icon-tabs button.is-active::after { content: ''; position: absolute; left: 22%; right: 22%; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 12px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.chip.is-active { background: var(--text); color: var(--bg); }
.chip svg { width: 16px; height: 16px; }

/* ---------- Profil (style capture) ---------- */
.profile-hero {
  position: relative; border-radius: var(--r-xl); padding: 18px 18px 20px; color: #fff; overflow: hidden;
  background: var(--accent);
  margin-top: calc(-1 * var(--safe-top) - 8px); padding-top: calc(var(--safe-top) + 14px);
}
@media (min-width: 900px) { .profile-hero { margin-top: 0; padding-top: 18px; } }
.profile-hero__banner { position: absolute; inset: 0; opacity: .35; }
.profile-hero__banner img { width: 100%; height: 100%; object-fit: cover; }
.profile-hero > * { position: relative; }
.profile-hero .icon-btn { background: rgba(255, 255, 255, .2); color: #fff; box-shadow: none; }
.profile-hero__top { display: flex; justify-content: space-between; margin-bottom: 18px; }
.profile-hero__id { display: flex; gap: 14px; align-items: center; }
.profile-hero__id .avatar { border: 3px solid rgba(255, 255, 255, .3); background: rgba(0, 0, 0, .15); }
.profile-hero h1 { margin: 0; font-size: 25px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.profile-hero h1 .vbadge { width: 22px; height: 22px; filter: drop-shadow(0 0 0 #fff); }
.profile-hero .vbadge--verified, .profile-hero .vbadge--admin { background: #fff; border-radius: 50%; padding: 1px; }
.profile-hero .handle { color: rgba(255, 255, 255, .85); }
.profile-hero__btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.profile-hero__btns .btn { height: 38px; background: rgba(255, 255, 255, .22); color: #fff; padding: 0 18px; font-size: 14px; }
.profile-hero__btns .btn--white { background: #fff; color: var(--accent); }
.profile-hero__bio { margin: 14px 0 0; white-space: pre-wrap; color: rgba(255, 255, 255, .95); }
.profile-hero__bio a { color: #fff; text-decoration: underline; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 18px; }
.profile-stats > * { text-align: center; padding: 0 4px; position: relative; color: #fff; }
.profile-stats > * + *::before { content: ''; position: absolute; left: 0; top: 10%; bottom: 10%; width: 1px; background: rgba(255, 255, 255, .3); }
.profile-stats b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.profile-stats span { font-size: 12.5px; opacity: .9; }
.fs-gauge { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-top: 14px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.fs-ring { --v: 50; width: 58px; height: 58px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--fsc, var(--accent)) calc(var(--v) * 1%), var(--surface-3) 0); }
.fs-ring b { width: 46px; height: 46px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 17px; font-weight: 800; }
.cluster-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.cluster-row .cluster-tag { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---------- Radar ---------- */
.network-status { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 12px; }
.network-status::-webkit-scrollbar { display: none; }
.ns-item { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-size: 13px; font-weight: 700; }
.ns-item .sev { width: 8px; height: 8px; border-radius: 50%; }
.sev-1 { background: var(--warning); }
.sev-2 { background: #F97316; }
.sev-3 { background: var(--danger); }
.radar-ok { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r); background: color-mix(in srgb, var(--success) 12%, var(--surface)); color: var(--success); font-weight: 700; margin-bottom: 12px; }
.radar-ok svg { width: 22px; height: 22px; }
.report { padding: 14px 16px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); border-left: 5px solid var(--tc, var(--accent)); }
.report + .report { margin-top: 10px; }
.report.is-ended { opacity: .62; }
.report__head { display: flex; align-items: center; gap: 10px; }
.report__type { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; color: var(--tc); }
.report__type svg { width: 18px; height: 18px; }
.report__station { font-weight: 700; margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.report__station svg { width: 16px; height: 16px; color: var(--muted); }
.report__body { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.report__img { margin-top: 10px; border-radius: 16px; max-height: 300px; width: 100%; object-fit: cover; }
.report__foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.status-tag { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); color: var(--muted); }
.status-tag--live { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.status-tag--review { background: color-mix(in srgb, var(--warning) 16%, transparent); color: color-mix(in srgb, var(--warning) 70%, var(--text)); }
.status-tag--ok { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.type-opt { display: grid; justify-items: center; gap: 6px; padding: 12px 4px; border-radius: var(--r); background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--text-2); border: 2px solid transparent; }
.type-opt svg { width: 24px; height: 24px; color: var(--tc); }
.type-opt.is-active { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 12%, var(--surface)); color: var(--text); }
.rule-box { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--text); font-size: 13px; }
.rule-box svg { width: 20px; height: 20px; color: var(--danger); flex: none; margin-top: 1px; }
.rule-box b { color: var(--danger); }
.live-warn { font-size: 13px; font-weight: 700; padding: 8px 12px; border-radius: 10px; }
.live-warn--block { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.live-warn--review { background: color-mix(in srgb, var(--warning) 16%, transparent); color: color-mix(in srgb, var(--warning) 70%, var(--text)); }
.line-picker { display: flex; flex-wrap: wrap; gap: 6px; max-height: 190px; overflow-y: auto; padding: 2px; }
.line-picker button { border-radius: 10px; padding: 2px; border: 2px solid transparent; }
.line-picker button.is-active { border-color: var(--text); }
.sev-picker { display: flex; gap: 8px; }
.sev-picker button { flex: 1; height: 42px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.sev-picker button.is-active { background: var(--text); color: var(--bg); }
.sev-picker .sev { width: 9px; height: 9px; border-radius: 50%; }

/* ---------- Messagerie ---------- */
.conv { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r); width: 100%; text-align: left; }
.conv:hover { background: var(--surface); }
.conv__last { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv.is-unread .conv__last { color: var(--text); font-weight: 700; }
.chat { display: flex; flex-direction: column; height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 16px); }
@media (min-width: 900px) { .chat { height: calc(100dvh - 40px); } }
.chat__msgs { flex: 1; overflow-y: auto; padding: 6px 2px 12px; display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); white-space: pre-wrap; overflow-wrap: anywhere; align-self: flex-start; border-bottom-left-radius: 6px; position: relative; }
.bubble.mine { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-left-radius: 20px; border-bottom-right-radius: 6px; }
.bubble.mine a { color: inherit; text-decoration: underline; }
.bubble.deleted { font-style: italic; opacity: .6; }
.bubble img { border-radius: 14px; margin: -4px -8px 4px; max-width: calc(100% + 16px); max-height: 300px; object-fit: cover; }
.bubble.pending { opacity: .6; }
.msg-time { font-size: 11px; color: var(--muted); align-self: center; margin: 10px 0 4px; }
.msg-seen { font-size: 11px; color: var(--muted); align-self: flex-end; margin-right: 6px; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 8px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.composer textarea { flex: 1; border: 0; outline: 0; background: transparent; resize: none; max-height: 140px; padding: 10px 6px; min-height: 42px; }

/* ---------- Leadz ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 10px; margin: 6px 0 18px; }
.podium__p { display: grid; justify-items: center; gap: 6px; text-align: center; min-width: 0; }
.podium__p .avatar { border: 3px solid var(--surface); box-shadow: var(--shadow); }
.podium__block { width: 100%; border-radius: 18px 18px 8px 8px; display: grid; place-items: center; font-weight: 800; font-size: 24px; color: #fff; padding: 10px 0; }
.podium__p:nth-child(1) .podium__block { height: 70px; background: #A8A9B4; }
.podium__p:nth-child(2) .podium__block { height: 98px; background: var(--accent); }
.podium__p:nth-child(3) .podium__block { height: 54px; background: #C98A5B; }
.podium__name { font-weight: 700; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.rank-row + .rank-row { border-top: 1px solid var(--border); }
.rank-n { width: 28px; font-weight: 800; color: var(--muted); text-align: center; flex: none; }
.rank-score { font-weight: 800; font-size: 16px; }
.rank-score.neg { color: var(--danger); }
.rank-score.pos { color: var(--success); }

/* ---------- Formulaires ---------- */
.field { display: grid; gap: 6px; }
.field > span, .field-label { font-weight: 700; font-size: 13px; color: var(--text-2); padding-left: 4px; }
.input, .textarea, .select {
  width: 100%; border-radius: 16px; border: 1.5px solid var(--border); background: var(--surface);
  padding: 13px 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-softer); }
.textarea { resize: vertical; min-height: 100px; }
.input-group { position: relative; }
.input-group .input { padding-right: 48px; }
.input-group button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.hint { font-size: 12.5px; color: var(--muted); padding-left: 4px; }
.error-text { font-size: 13px; color: var(--danger); font-weight: 600; padding-left: 4px; }
.checkbox { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.checkbox input { appearance: none; width: 24px; height: 24px; flex: none; border-radius: 8px; border: 2px solid var(--surface-3); display: grid; place-items: center; margin: 0; transition: all .15s; }
.checkbox input:checked { background: var(--accent); border-color: var(--accent); }
.checkbox input:checked::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { appearance: none; width: 100%; height: 100%; margin: 0; border-radius: 999px; background: var(--surface-3); transition: background .2s; cursor: pointer; }
.switch input:checked { background: var(--accent); }
.switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; pointer-events: none; }
.switch:has(input:checked)::after { transform: translateX(20px); }
.counter { font-size: 12px; color: var(--muted); font-weight: 600; }
.counter.over { color: var(--danger); }

/* ---------- Palette d'accent ---------- */
.palette { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { width: 44px; height: 44px; border-radius: 50%; background: var(--c); position: relative; box-shadow: inset 0 0 0 3px color-mix(in srgb, #000 10%, transparent); transition: transform .15s; }
.swatch.is-active { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--c); }
.swatch:active { transform: scale(.9); }
.swatch--custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); overflow: hidden; }
.swatch--custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.theme-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-opt { display: grid; justify-items: center; gap: 8px; padding: 14px 6px; border-radius: var(--r); background: var(--surface-2); font-weight: 700; font-size: 13px; border: 2px solid transparent; }
.theme-opt svg { width: 26px; height: 26px; }
.theme-opt.is-active { border-color: var(--accent); color: var(--accent); background: var(--accent-softer); }

/* ---------- Modale / sheet ---------- */
.modal-root { position: fixed; inset: 0; z-index: 500; pointer-events: none; }
.backdrop { position: fixed; inset: 0; background: var(--overlay); opacity: 0; transition: opacity .25s; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1; pointer-events: auto;
  max-height: calc(100dvh - var(--safe-top) - 24px); display: flex; flex-direction: column;
  background: var(--bg-elev); border-radius: 30px 30px 0 0; box-shadow: var(--shadow-lg);
  transform: translateY(100%); transition: transform .32s cubic-bezier(.2, .9, .3, 1);
  padding-bottom: var(--safe-bottom);
}
.sheet__grip { width: 42px; height: 5px; border-radius: 5px; background: var(--surface-3); margin: 10px auto 2px; flex: none; }
.sheet__head { display: flex; align-items: center; gap: 10px; padding: 8px 16px 10px; flex: none; }
.sheet__head h2 { margin: 0; font-size: 20px; font-weight: 800; flex: 1; letter-spacing: -.01em; }
.sheet__body { overflow-y: auto; padding: 4px 18px 20px; overscroll-behavior: contain; }
.sheet__foot { padding: 10px 18px 16px; flex: none; border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: center; }
.modal-open .backdrop { opacity: 1; }
.modal-open .sheet { transform: none; }
@media (min-width: 700px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: min(560px, calc(100vw - 40px)); max-height: min(86dvh, 820px); border-radius: 30px; transform: translate(-50%, -46%) scale(.97); opacity: 0; transition: transform .25s, opacity .2s; }
  .sheet--wide { width: min(860px, calc(100vw - 40px)); }
  .modal-open .sheet { transform: translate(-50%, -50%); opacity: 1; }
  .sheet__grip { display: none; }
}
.dialog-icon { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; margin: 6px auto 12px; background: var(--accent-soft); color: var(--accent); }
.dialog-icon svg { width: 32px; height: 32px; }
.dialog-title { text-align: center; font-size: 20px; font-weight: 800; margin: 0 0 6px; }
.dialog-text { text-align: center; color: var(--text-2); margin: 0 0 18px; }
.menu { display: grid; gap: 2px; }
.menu button { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r); font-weight: 600; text-align: left; }
.menu button:hover { background: var(--surface-2); }
.menu button svg { width: 22px; height: 22px; color: var(--text-2); }
.menu button.danger, .menu button.danger svg { color: var(--danger); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 700; background: rgba(0, 0, 0, .92); display: grid; place-items: center; animation: fade-in .2s; }
.lightbox img { max-width: 100vw; max-height: 100dvh; object-fit: contain; }
.lightbox .icon-btn { position: absolute; top: calc(var(--safe-top) + 12px); right: 12px; background: rgba(255, 255, 255, .15); color: #fff; }
@keyframes fade-in { from { opacity: 0; } }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 800; left: 50%; transform: translateX(-50%); top: calc(var(--safe-top) + 12px); display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 18px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); animation: toast-in .35s cubic-bezier(.2, .9, .3, 1.2); pointer-events: auto; }
.toast svg { width: 20px; height: 20px; flex: none; }
.toast--error svg { color: var(--danger); }
.toast--success svg { color: var(--success); }
.toast.is-out { opacity: 0; transform: translateY(-10px); transition: all .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-16px) scale(.96); } }

/* ---------- Empty states ---------- */
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty__icon { width: 76px; height: 76px; border-radius: 26px; margin: 0 auto 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty__icon svg { width: 36px; height: 36px; }
.empty h3 { margin: 0 0 6px; color: var(--text); font-size: 18px; }
.empty p { margin: 0 auto 16px; max-width: 330px; }

/* ---------- Auth / Onboarding (style écran 1 de la capture) ---------- */
.auth { min-height: 100dvh; display: flex; flex-direction: column; background: #121113; color: #fff; position: relative; overflow: clip; }
.auth__inner { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 480px; margin: 0 auto; padding: calc(var(--safe-top) + 28px) 24px calc(var(--safe-bottom) + 24px); position: relative; z-index: 1; }
.auth__title { font-size: clamp(42px, 12vw, 58px); line-height: 1.02; font-weight: 800; letter-spacing: -.04em; margin: 18px 0 0; }
.auth__title em { font-style: normal; color: var(--accent); }
.auth__lead { color: #B9B6C0; font-size: 16px; max-width: 300px; margin: 14px 0 0; }
.auth__art { flex: 1; min-height: 200px; position: relative; display: grid; place-items: center; margin: 12px 0; }
.auth__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth .btn { background: #26252A; color: #fff; }
.auth .btn--primary { background: var(--accent); }
.auth .input { background: #1D1C20; border-color: #2E2D33; color: #fff; }
.auth .input:focus { border-color: var(--accent); }
.auth .field > span { color: #C9C6CF; }
.auth .hint, .auth .muted { color: #8F8C98; }
.auth a.link { color: var(--accent); font-weight: 700; }
.auth-form { display: grid; gap: 14px; margin-top: 26px; }
.auth-back { width: 46px; height: 46px; border-radius: 50%; background: #26252A; display: grid; place-items: center; color: #fff; }
.auth-back svg { width: 22px; height: 22px; }
.pager { display: flex; gap: 6px; padding: 8px 12px; border-radius: 999px; background: #1F1E22; }
.pager i { width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 35%, #333); transition: all .25s; }
.pager i.on { background: var(--accent); width: 22px; border-radius: 6px; }
.nav-pair { display: flex; border-radius: 999px; background: #1F1E22; padding: 4px; gap: 4px; }
.nav-pair button { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.nav-pair button svg { width: 24px; height: 24px; }
.nav-pair button.go { background: var(--accent); }
.nav-pair button:disabled { opacity: .35; }
.orbit { position: relative; width: min(300px, 78vw); aspect-ratio: 1; }
.orbit__ring { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .18); animation: spin 40s linear infinite; }
.orbit__ring:nth-child(2) { inset: 18%; animation-duration: 28s; animation-direction: reverse; border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.orbit__core { position: absolute; inset: 34%; border-radius: 34%; background: var(--accent); display: grid; place-items: center; box-shadow: 0 20px 60px color-mix(in srgb, var(--accent) 50%, transparent); }
.orbit__core img { width: 70%; }
.orbit__bubble { position: absolute; padding: 8px 12px; border-radius: 16px; background: #fff; color: #111; font-size: 12.5px; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); display: flex; gap: 6px; align-items: center; animation: float 4s ease-in-out infinite; white-space: nowrap; }
.orbit__bubble .line-pill { width: 22px; min-width: 22px; height: 22px; font-size: 11px; }
@keyframes float { 50% { transform: translateY(-8px); } }
.onb-step-title { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 16px 0 6px; }
.onb-step-title em { font-style: normal; color: var(--accent); }
.charter { background: #1D1C20; border-radius: 22px; padding: 4px 18px; max-height: 46dvh; overflow-y: auto; margin: 16px 0; font-size: 14px; color: #D6D3DC; }
.charter h3 { color: #fff; font-size: 15px; margin: 16px 0 6px; }
.charter p, .charter li { margin: 0 0 8px; }
.charter .forbidden { border-left: 3px solid var(--accent); padding-left: 12px; color: #fff; }
.cluster-pick { display: grid; gap: 10px; margin-top: 16px; }
.cp-region { border-radius: 22px; background: #1D1C20; overflow: hidden; }
.cp-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; text-align: left; }
.cp-dot { width: 40px; height: 40px; border-radius: 14px; background: var(--cc); display: grid; place-items: center; font-weight: 800; font-size: 11px; color: #fff; flex: none; }
.cp-check { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #3A3940; display: grid; place-items: center; flex: none; }
.cp-check.on { background: var(--accent); border-color: var(--accent); }
.cp-check svg { width: 16px; height: 16px; color: #fff; }
.cp-children { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; }
.cp-child { padding: 8px 12px; border-radius: 999px; background: #2A292F; font-size: 13px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.cp-child.on { background: var(--accent); color: #fff; }
.cp-child small { opacity: .7; }

/* Onboarding / settings sur thème clair dans l'app */
.settings-group { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.settings-group .list-item { border-radius: 0; }
.settings-group .list-item + .list-item { border-top: 1px solid var(--border); }

/* ---------- Clusters ---------- */
.cluster-card { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); width: 100%; text-align: left; }
.cluster-card + .cluster-card { margin-top: 8px; }
.cluster-logo { width: 46px; height: 46px; border-radius: 15px; background: var(--cc); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; letter-spacing: -.02em; text-align: center; line-height: 1.05; padding: 2px; overflow: hidden; }
.cluster-hero { border-radius: var(--r-xl); padding: 20px; color: #fff; background: var(--cc); margin-bottom: 14px; }
.cluster-hero h1 { margin: 6px 0 2px; font-size: 26px; letter-spacing: -.02em; }
.lines-grid { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Admin ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.stat { padding: 14px 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.stat span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat.alert b { color: var(--accent); }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 70px; padding: 10px 14px; }
.spark i { flex: 1; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; opacity: .85; }
.mod-item { padding: 14px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); }
.mod-item + .mod-item { margin-top: 10px; }
.mod-quote { margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.mod-terms { display: flex; flex-wrap: wrap; gap: 6px; }
.mod-terms span { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--warning) 18%, transparent); }
.mod-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.table-wrap { overflow-x: auto; }
.crisis { border: 2px solid color-mix(in srgb, var(--danger) 40%, transparent); }
.term-list { display: flex; flex-wrap: wrap; gap: 6px; }
.term { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.term.block { background: color-mix(in srgb, var(--danger) 13%, transparent); }
.term button { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.term button svg { width: 14px; height: 14px; }

.announcement { display: flex; gap: 10px; align-items: center; padding: 12px 14px; margin-bottom: 12px; border-radius: var(--r); background: var(--accent-soft); color: var(--text); font-weight: 600; font-size: 14px; }
.announcement svg { width: 20px; height: 20px; color: var(--accent); flex: none; }

/* Rightbar */
.rb-card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px; }
.rb-card h3 { margin: 0 0 10px; font-size: 17px; }
.trend { display: flex; justify-content: space-between; padding: 8px 4px; border-radius: 10px; font-weight: 700; }
.trend:hover { background: var(--surface-2); }
.trend span { color: var(--muted); font-weight: 500; font-size: 13px; }
.searchbar { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 50px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); }
.searchbar input { flex: 1; border: 0; outline: 0; background: transparent; height: 100%; }
.searchbar svg { width: 20px; height: 20px; color: var(--muted); }

/* View transitions */
.view-enter { animation: view-in .28s cubic-bezier(.2, .8, .3, 1); }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Écrans plein écran (conversation) */
.no-tabbar .tabbar { display: none; }
.no-tabbar .content { padding-bottom: calc(var(--safe-bottom) + 8px); }
.kb-open .tabbar, .kb-open .fab { display: none; }
.btn--ghost { background: transparent; }
.desktop-only { display: none !important; }
@media (min-width: 900px) { .desktop-only { display: flex !important; } }
.onb-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; max-width: 480px; margin: 0 auto; padding: 30px 24px calc(var(--safe-bottom) + 18px); background: linear-gradient(transparent, #121113 38%); }
.onb-content { padding-bottom: 110px; }

/* ---------- Connexion / inscription / onboarding sur grand écran ---------- */
.auth__aside { display: none; }
.welcome-grid { display: flex; flex-direction: column; flex: 1; }
.aside-title { font-size: clamp(40px, 4.4vw, 64px); line-height: 1.02; font-weight: 800; letter-spacing: -.04em; margin: 0; }
.aside-title em { font-style: normal; color: var(--accent); }
.aside-lead { color: #B9B6C0; font-size: 18px; max-width: 420px; margin: 16px 0 0; }
.aside-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.aside-feats li { display: flex; gap: 14px; align-items: flex-start; }
.aside-feats b { font-size: 16px; }
.aside-feats p { margin: 3px 0 0; color: #A9A6B1; font-size: 14px; max-width: 380px; }
.aside-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }
.aside-foot { margin: 0; color: #7E7B86; font-size: 13px; font-weight: 600; }

@media (min-width: 960px) {
  /* Accueil : texte à gauche, illustration à droite */
  .auth__inner--wide { max-width: 1240px; padding: 36px 56px 40px; }
  .welcome-grid {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 64px; align-content: center;
    grid-template-areas: "title art" "lead art" "foot art" "ctas art";
  }
  .welcome-grid .auth__title { grid-area: title; align-self: end; font-size: clamp(56px, 5.6vw, 84px); }
  .welcome-grid .auth__lead { grid-area: lead; font-size: 19px; max-width: 460px; }
  .welcome-grid .auth__art { grid-area: art; margin: 0; }
  .welcome-grid .orbit { width: min(520px, 40vw); }
  .welcome-grid .auth__foot { grid-area: foot; justify-content: flex-start; gap: 20px; margin-top: 32px; }
  .welcome-grid .welcome-ctas { grid-area: ctas; display: flex; gap: 12px; max-width: 520px; margin-top: 24px !important; }
  .welcome-grid .welcome-ctas .btn { flex: 1; }

  /* Formulaires : panneau de présentation à gauche, formulaire à droite */
  .auth--split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(460px, 1fr); }
  .auth--split .auth__aside {
    display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
    position: sticky; top: 16px; height: calc(100dvh - 32px); margin: 16px 0 16px 16px; padding: 44px 52px;
    border-radius: 32px; overflow: hidden;
    background: radial-gradient(120% 80% at 0% 100%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 60%), #1A191D;
  }
  .auth--split .auth__inner { max-width: 560px; padding: 48px 56px; justify-content: center; }
  .auth--split .auth__inner > .row img { display: none; }
  .auth--split .auth-form { margin-top: 32px; }

  /* Onboarding : la colonne de droite défile, la navigation reste visible en bas */
  .auth__inner--scroll { height: 100dvh; overflow-y: auto; justify-content: flex-start !important; padding-bottom: 0 !important; }
  .auth__inner--scroll .onb-content { padding-bottom: 24px; }
  .auth__inner--scroll .onb-foot { position: sticky; left: auto; right: auto; max-width: none; margin: auto -56px 0; padding: 30px 56px 28px; }
  .auth__inner--scroll .charter { max-height: 52dvh; }
}
