/* ==========================================================================
   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);
  /* accent lisible en texte (≥ 4,5:1), calculé dans state.js:applyAccent */
  --accent-text: var(--accent-text-light, var(--accent));

  --bg: #FFFFFF;
  --bg-elev: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F5F3F6;
  --surface-3: #EAE7EC;
  --border: #ECE9EE;
  --text: #141416;
  --text-2: #4A4A55;
  --muted: #6B6876; /* 4,8:1 sur --bg (AA) */
  --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;
  --insider: #F97316;
  --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;
    --accent-text: var(--accent-text-dark, var(--accent));
    --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;
  --accent-text: var(--accent-text-dark, var(--accent));
  --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-text); }
.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-text); }
.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: 2px;
  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: 13.5px; padding-right: 14px; white-space: nowrap; }
.tab.is-active { background: var(--accent-soft); color: var(--accent-text); flex: 0 0 auto; 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-text); }

/* ---------- 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-text); }
.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; display: flex; align-items: center; gap: 6px; }
.section-title svg { width: 15px; height: 15px; }
.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: 5px; min-width: 0; max-width: 100%; font-weight: 700; line-height: 1.2; vertical-align: middle; }
.name-line .handle { font-weight: 500; font-size: .92em; min-width: 0; }
.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); }
.vbadge--insider { color: var(--insider); }
.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-text); 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-text); 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); }

/* ---------- Segmented / onglets internes ---------- */
.segmented { display: flex; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.segmented::-webkit-scrollbar { display: none; }
.segmented button { position: relative; flex: 1 1 auto; height: 42px; padding: 0 10px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; transition: background .2s, color .2s; }
.segmented button.is-active { color: var(--text); }
.segmented button.is-active::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: -1px; width: min(56px, 70%); height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.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-text); }
.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: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 0 10px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--border); font-weight: 700; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip svg { width: 14px; height: 14px; }

/* ---------- 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);
}
.profile-hero > * { position: relative; z-index: 1; }
.profile-hero > .profile-hero__banner { position: absolute; inset: 0; z-index: 0; }
.profile-hero__banner img { width: 100%; height: 100%; object-fit: cover; object-position: center; max-width: none; }
.profile-hero__banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .25) 0%, color-mix(in srgb, var(--accent) 70%, #000) 72%); }
.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 .handle { color: rgba(255, 255, 255, .85); }
.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 8px; }
.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; border: 1px solid var(--border); 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: 8px; align-items: center; padding: 9px 14px; border-radius: 14px; background: color-mix(in srgb, var(--success) 12%, var(--surface)); color: var(--success); font-weight: 700; font-size: 13.5px; margin-bottom: 10px; }
.radar-ok svg { width: 18px; height: 18px; }
/* Carte Radar : en-tête auteur + statut + ligne, titre, texte, votes, barre de type à droite */
.report { position: relative; padding: 22px 30px 18px 26px; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .report { background: #0B0B0C; box-shadow: none; } }
:root[data-theme="dark"] .report { background: #0B0B0C; box-shadow: none; }
.report + .report { margin-top: 14px; }
.report.is-ended { opacity: .62; }
.report::after { content: ''; position: absolute; right: 0; top: 26px; bottom: 26px; width: 9px; border-radius: 9px 0 0 9px; background: var(--tc); }
.report__head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.report__who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.report__who .avatar { width: 28px; height: 28px; font-size: 11px; }
.report__id { display: grid; min-width: 0; line-height: 1.15; }
.report__name { display: flex; align-items: baseline; gap: 5px; min-width: 0; font-size: 15.5px; white-space: nowrap; }
.report__name b { font-weight: 800; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 2.2em; }
/* la durée cède sa place avant le nom */
.report__name span { font-weight: 500; flex: 0 4 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.report__handle { font-size: 12.5px; font-weight: 700; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report__status { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 11px 0 8px; border-radius: 999px; font-size: 15px; font-weight: 700; color: #fff; background: #D24B12; }
.report__status svg { width: 14px; height: 14px; }
.report__status--ok { background: #1E9B1E; }
.report__status--review { background: #E2A100; color: #141416; }
.report__status--off { background: var(--surface-3); color: var(--text-2); }
.report__line { flex: none; display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 6px; margin-left: 8px; border-radius: 9px; background: var(--lc, #888); color: #fff; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.report__line.is-long { font-size: 18px; }
.report__title { margin: 18px 0 0; font-size: 25px; line-height: 1.12; font-weight: 800; letter-spacing: -.025em; overflow-wrap: anywhere; }
.report__body { margin: 8px 0 0; font-size: 17.5px; line-height: 1.22; font-weight: 500; white-space: pre-wrap; overflow-wrap: anywhere; }
.report__img { margin-top: 12px; border-radius: 16px; max-height: 260px; width: 100%; object-fit: cover; }
.report__acts { display: flex; align-items: center; gap: 18px; margin: 16px 0 0 -10px; }
.rc-act { height: 34px; padding: 0 10px; border-radius: 9px; display: inline-flex; align-items: center; gap: 10px; font-size: 16.5px; font-weight: 500; color: var(--text); }
.rc-act svg { width: 25px; height: 25px; }
.rc-act--yes.is-on { background: #0F4D0F; color: #fff; }
.rc-act--no.is-on { background: #C2560A; color: #fff; }
.report__acts .icon-btn { margin-left: auto; color: var(--muted); }
@media (max-width: 520px) {
  .report { padding: 18px 22px 14px 18px; border-radius: 20px; }
  .report::after { top: 20px; bottom: 20px; width: 7px; }
  .report__name { font-size: 14px; }
  .report__handle { font-size: 12px; }
  .report__status { height: 22px; font-size: 13px; padding: 0 9px 0 7px; }
  .report__line { min-width: 36px; height: 36px; font-size: 22px; margin-left: 4px; border-radius: 8px; }
  .report__line.is-long { font-size: 15px; }
  .report__title { font-size: 21px; margin-top: 14px; }
  .report__body { font-size: 15.5px; }
  .report__acts { gap: 8px; margin-top: 12px; }
  .rc-act { font-size: 15px; gap: 8px; }
  .rc-act svg { width: 22px; height: 22px; }
}
.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: 20px; color: #fff; padding: 10px 0; }
.podium__p:nth-child(1) .podium__block { height: 54px; background: #A8A9B4; }
.podium__p:nth-child(2) .podium__block { height: 76px; background: var(--accent); }
.podium__p:nth-child(3) .podium__block { height: 42px; background: #C98A5B; }
.podium .avatar--xl { width: 76px; height: 76px; }
.podium .avatar--lg { width: 56px; height: 56px; }
.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-text); background: var(--accent-softer); }

/* ---------- Modale / sheet ---------- */
.modal-root { position: fixed; inset: 0; z-index: 650; 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-text); }
.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, var(--bg-a, .94)); display: grid; place-items: center; animation: fade-in .2s;
  touch-action: none; overscroll-behavior: contain; user-select: none; -webkit-user-select: none; transition: opacity .18s; }
.lightbox.is-out { opacity: 0; }
.lightbox img { max-width: 100vw; max-height: 100dvh; object-fit: contain; transform-origin: 50% 50%; will-change: transform; -webkit-user-drag: none; pointer-events: none; }
.lightbox .icon-btn { position: absolute; background: rgba(255, 255, 255, .15); color: #fff; box-shadow: none; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lightbox__close { top: calc(var(--safe-top) + 12px); right: 12px; }
.lightbox__nav { top: 50%; margin-top: -23px; }
.lightbox__nav.is-prev { left: 12px; } .lightbox__nav.is-next { right: 12px; }
.lightbox__nav[hidden] { display: none; }
@media (pointer: coarse) { .lightbox__nav { display: none; } }
.lightbox__count { position: absolute; bottom: calc(var(--safe-bottom) + 18px); left: 50%; transform: translateX(-50%); color: #fff; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .15); }
html.is-locked, html.is-locked body { overflow: hidden; overscroll-behavior: none; }
@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-text); }
.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-text); }
.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-text); 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; }
}

/* ---------- Comportement « natif » ---------- */
html { touch-action: manipulation; }
body { overflow-x: clip; }
/* iOS zoome sur les champs < 16 px : on l'évite sur écran tactile */
@media (pointer: coarse) { input, textarea, select, .composer textarea { font-size: 16px !important; } }
html.native, html.native body { overscroll-behavior: none; }
html.native body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html.native input, html.native textarea, html.native [contenteditable] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
html.native img { -webkit-user-drag: none; }
/* transitions d'écrans (app et site) */
.view-enter.view-push { animation: view-push .32s cubic-bezier(.22, .9, .3, 1); }
.view-enter.view-pop { animation: view-pop .3s cubic-bezier(.22, .9, .3, 1); }
.view-enter.view-tab { animation: view-tab .22s ease-out; }
@keyframes view-push { from { opacity: 0; transform: translateX(42px); } }
@keyframes view-pop { from { opacity: 0; transform: translateX(-34px); } }
@keyframes view-tab { from { opacity: 0; transform: scale(.985); } }
@media (prefers-reduced-motion: reduce) { .view-enter, .view-push, .view-pop, .view-tab { animation: none !important; } }
html { overflow-x: clip; }

/* ---------- Clavier virtuel : --kb = hauteur du clavier ---------- */
:root { --kb: 0px; }
@media (max-width: 699px) {
  .sheet { bottom: var(--kb); max-height: calc(100dvh - var(--safe-top) - 24px - var(--kb)); transition: transform .32s cubic-bezier(.2, .9, .3, 1), bottom .25s ease, max-height .25s ease; }
  .kb-open .sheet { padding-bottom: 0; border-radius: 30px 30px 0 0; }
}
@media (max-width: 899px) {
  .chat { height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 16px - var(--kb)); transition: height .25s ease; }
  .kb-open .chat { height: calc(100dvh - var(--safe-top) - 16px - var(--kb)); }
}

/* ---------- Repost & citation ---------- */
.repost-wrap + .repost-wrap, .repost-wrap + .post, .post + .repost-wrap { margin-top: 12px; }
.repost-head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); padding: 0 0 6px 18px; }
.repost-head svg { width: 16px; height: 16px; }
.act--repost.is-on { color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); }
.act--repost.is-on svg { fill: none; }
.quote-card { display: grid; gap: 6px; margin-top: 10px; padding: 12px; border: 1.5px solid var(--border); border-radius: 18px; }
.quote-card__body { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.quote-card img { border-radius: 12px; max-height: 200px; width: 100%; object-fit: cover; }
@media (max-width: 520px) {
  .post__actions { gap: 4px; flex-wrap: nowrap; }
  .act { padding: 0 8px; height: 36px; gap: 4px; font-size: 13px; }
  .act svg { width: 18px; height: 18px; }
  .act--icon { width: 34px; padding: 0; }
}

/* ==========================================================================
   Tablette / iPadOS (iPad mini 6 portrait : 744 px, paysage : 1133 px)
   Portrait : barre latérale compacte (icônes) à la place de la barre d'onglets.
   Paysage (≥ 900 px) : mise en page ordinateur.
   ========================================================================== */
@media (min-width: 700px) and (max-width: 899px) {
  .shell { grid-template-columns: 88px minmax(0, 640px); justify-content: center; gap: 20px; padding-right: 20px; }
  .content { padding: calc(var(--safe-top) + 12px) 0 calc(var(--safe-bottom) + 32px); margin: 0; }
  .tabbar, .fab { display: none !important; }
  .sidebar {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    position: sticky; top: 0; height: 100dvh; padding: calc(var(--safe-top) + 16px) 0 calc(var(--safe-bottom) + 16px);
  }
  .sidebar .brand { padding: 4px 0 14px; }
  .sidebar .brand div, .side-link span:not(.badge-count), .side-me .meta { display: none; }
  .side-link { width: 56px; height: 56px; padding: 0; justify-content: center; position: relative; }
  .side-link .badge-count { position: absolute; top: 4px; right: 2px; margin: 0; }
  .sidebar .btn--primary { width: 56px; height: 56px; padding: 0; margin-top: 10px; font-size: 0; gap: 0; }
  .sidebar .btn--primary svg { width: 26px; height: 26px; }
  .side-me { padding: 4px; border-radius: 50%; }
  .no-tabbar .content { padding-bottom: calc(var(--safe-bottom) + 12px); }
}
@media (min-width: 700px) {
  /* fenêtres centrées : on les remonte au-dessus du clavier virtuel */
  .kb-open .sheet { top: calc(var(--safe-top) + 16px); transform: translate(-50%, 0); max-height: calc(100dvh - var(--kb) - var(--safe-top) - 32px); }
  .chat { height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 24px - var(--kb)); }
  .profile-hero { margin-top: 0; padding-top: 18px; }
}
@media (min-width: 900px) and (max-width: 1239px) {
  .shell { grid-template-columns: 230px minmax(0, 640px); gap: 24px; padding: 0 20px; }
  .sidebar { padding-top: calc(var(--safe-top) + 22px); padding-bottom: calc(var(--safe-bottom) + 16px); }
  .content { padding-top: calc(var(--safe-top) + 18px); }
}

/* ---------- Nom, @pseudo et badges en éclipse ---------- */
.badges { display: inline-flex; align-items: center; flex: none; }
.badges .vb { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; line-height: 0; }
.badges .vbadge { display: block; width: 17px; height: 17px; }
/* ordre : vérifié devant, puis Admin, puis Insider */
.badges .vb { position: relative; }
.badges .vb--verified { z-index: 3; }
.badges .vb--admin { z-index: 2; }
.badges .vb--insider { z-index: 1; }
.badges .vb + .vb { margin-left: -7px; }
/* liseré de la couleur du fond pour l'effet éclipse */
.badges .vb:has(+ .vb) .vbadge { filter: drop-shadow(1.5px 0 0 var(--surface)) drop-shadow(-.5px 0 0 var(--surface)); }
.auth .badges .vbadge, .story-viewer .badges .vbadge { filter: none; }
.profile-hero .badges .vbadge { width: 24px; height: 24px; }
.profile-hero .badges .vb { background: #fff; padding: 1px; }
.profile-hero .badges .vb + .vb { margin-left: -10px; }
.profile-hero .badges .vbadge { filter: none; }
.profile-hero .vbadge { border-radius: 50%; }

/* ---------- Circulation (train) jointe ---------- */
.train-list { display: grid; gap: 8px; margin-top: 12px; }
.train-list:empty { display: none; }
.train-card { padding: 12px 14px; border-radius: 20px; background: var(--surface-2); border: 1.5px solid var(--border); }
.train-card__head { display: flex; align-items: center; gap: 10px; }
.train-card__ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.train-card__ico svg { width: 19px; height: 19px; }
.train-card__num { font-weight: 800; font-size: 16px; letter-spacing: .02em; }
.train-card__route { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; }
.train-card__stop { display: grid; min-width: 0; flex: 1; }
.train-card__stop b { font-size: 18px; font-weight: 800; }
.train-card__head .small::first-letter { text-transform: uppercase; }
.train-card__stop span { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.train-card__stop.end { text-align: right; }
.train-card__line { display: flex; align-items: center; gap: 4px; color: var(--muted); flex: 0 1 80px; margin-top: 12px; }
.train-card__line i { flex: 1; height: 2px; border-radius: 2px; background: var(--surface-3); }
.train-card__line svg { width: 18px; height: 18px; flex: none; }

/* ---------- Profil : bannière plein cadre, actions en icônes, méta ---------- */
.profile-actions { display: flex; flex-wrap: nowrap; gap: 8px; margin-top: 12px; align-items: center; }
.p-act { height: 40px; min-width: 40px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: rgba(255, 255, 255, .22); color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; flex: none; transition: transform .12s; }
.p-act svg { width: 20px; height: 20px; }
.p-act:active { transform: scale(.94); }
.p-act.is-white { background: #fff; color: var(--accent-text-light, var(--accent)); }
.p-act--text { padding: 0 16px; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; opacity: .92; }
.profile-meta span { display: inline-flex; align-items: center; gap: 5px; }
.profile-meta svg { width: 15px; height: 15px; }

/* ---------- Pages légales & bandeau cookies ---------- */
.legal-page { min-height: 100dvh; background: var(--bg); }
.legal-page__inner { max-width: 760px; margin: 0 auto; padding: calc(var(--safe-top) + 24px) 20px calc(var(--safe-bottom) + 40px); }
.legal-page h1 { font-size: 30px; letter-spacing: -.02em; margin: 22px 0 6px; }
.legal { font-size: 15px; color: var(--text-2); }
.legal h2 { font-size: 18px; color: var(--text); margin: 24px 0 8px; }
.legal p, .legal li { margin: 0 0 8px; }
.legal ul { padding-left: 20px; margin: 0 0 8px; }
.legal a, .legal .link { color: var(--accent-text); font-weight: 600; }
.legal__date { font-size: 13px; color: var(--muted); }
.legal code { font-size: 12.5px; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.legal-table th, .legal-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 18px; font-size: 13px; color: var(--muted); justify-content: center; }
.legal-links a, .legal-links button { color: inherit; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.legal-links--dark { color: #8F8C98; margin-top: 14px; }
.legal-links--small { justify-content: flex-start; margin-top: 6px; }
.cookie-banner {
  position: fixed; z-index: 600; left: 12px; right: 12px; bottom: calc(12px + var(--safe-bottom)); max-width: 640px; /* sous les fenêtres (650) */ margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 16px; border-radius: 22px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); border: 1px solid var(--border); animation: toast-in .35s cubic-bezier(.2, .9, .3, 1.2);
}
.cookie-banner__text { flex: 1 1 280px; font-size: 13.5px; }
.cookie-banner__text p { margin: 4px 0 0; color: var(--text-2); }
.cookie-banner__btns { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 899px) { body:has(.tabbar) .cookie-banner { bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 10px); } }

/* ==========================================================================
   Interface allégée : onglets, filtres, Radar, barre d'onglets
   ========================================================================== */
.chip-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.chips--active:empty, .chips--active[hidden] { display: none; }
/* barre d'outils : onglets + bouton filtres sur une ligne */
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.toolbar .segmented { flex: 1; margin-bottom: 0; }
.filter-btn { flex: none; height: 34px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); font-size: 13px; font-weight: 700; color: var(--text-2); }
.filter-btn svg { width: 16px; height: 16px; }
.filter-btn b { min-width: 18px; height: 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; display: none; place-items: center; padding: 0 5px; }
.filter-btn.is-on { border-color: var(--accent); color: var(--accent-text); }
.filter-btn.is-on b { display: inline-grid; }
.pill-select-wrap { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 4px 0 12px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); min-width: 0; }
.pill-select-wrap svg { width: 15px; height: 15px; flex: none; }
.pill-select { border: 0; outline: 0; background: transparent; font-size: 13px; font-weight: 700; padding: 0 22px 0 0; height: 100%; max-width: 160px; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 10px) 52%, calc(100% - 6px) 52%; background-size: 4px 4px; background-repeat: no-repeat; }
@media (pointer: coarse) { .pill-select { font-size: 16px !important; } }


/* accueil : zone de rédaction plus légère */
.content > .view-enter > button.card.card--pad.row { padding: 10px 12px; margin-bottom: 10px !important; box-shadow: none; border: 1px solid var(--border); }

@media (max-width: 360px) { .tab.is-active .tab__label { display: none; } }

/* chargement des images : fond animé jusqu'à l'affichage */
.media-grid button, .report__img, .quote-card img, .avatar img, .profile-hero__banner img { 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; }
img.is-loaded { animation: none; background: none; }

/* ---------- Support ---------- */
details.faq { border-top: 1px solid var(--border); }
details.faq:first-child { border-top: 0; }
details.faq summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 13px 16px; font-weight: 700; font-size: 14.5px; cursor: pointer; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary svg { width: 18px; height: 18px; color: var(--muted); transition: transform .2s; flex: none; }
details.faq[open] summary svg { transform: rotate(180deg); }
.faq__a { padding: 0 16px 14px; color: var(--text-2); font-size: 14px; white-space: pre-wrap; }
.ticket-msg { padding: 12px 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.ticket-msg.is-staff { background: var(--accent-softer); border: 1px solid var(--accent-soft); }
.ticket-msg__body { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.toolbar .pill-select-wrap { flex: 0 1 auto; min-width: 0; }
.toolbar .pill-select { min-width: 0; max-width: 100%; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }

/* ==========================================================================
   Aide & support (v2)
   ========================================================================== */
.btn--white { background: #fff; color: var(--accent-text-light, var(--accent)); }
.support-hero {
  position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px;
  padding: 20px; border-radius: var(--r-xl); color: #fff; margin-bottom: 4px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #7C3AED));
}
.support-hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.support-hero > * { position: relative; z-index: 1; }
.support-hero h2 { margin: 0; font-size: 21px; letter-spacing: -.01em; }
.support-hero p { margin: 4px 0 0; font-size: 14px; opacity: .92; }
.support-hero__ico { width: 52px; height: 52px; border-radius: 17px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; flex: none; }
.support-hero__ico svg { width: 28px; height: 28px; }
.support-hero .btn { flex: 1 1 100%; }
@media (min-width: 560px) { .support-hero .btn { flex: 0 0 auto; } }
.faq__ico { width: 18px !important; height: 18px !important; color: var(--accent-text) !important; transform: none !important; }
.faq-empty { display: flex; gap: 10px; align-items: center; padding: 14px; border-radius: var(--r); background: var(--surface); color: var(--muted); font-size: 14px; }
.faq-empty svg { width: 20px; height: 20px; flex: none; }

.ticket-list { overflow: hidden; }
.ticket-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; transition: background .15s; }
.ticket-row + .ticket-row { border-top: 1px solid var(--border); }
.ticket-row:hover { background: var(--surface-2); }
.ticket-row__ico, .ticket__ico, .cat-opt__ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-text); }
.ticket-row__ico svg, .ticket__ico svg, .cat-opt__ico svg { width: 20px; height: 20px; }

/* assistant en 2 étapes */
.wizard-progress { display: flex; gap: 8px; margin: 2px 0 8px; }
.wizard-progress span { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); padding-bottom: 8px; border-bottom: 3px solid var(--surface-3); transition: all .3s; }
.wizard-progress span b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 12px; color: var(--text-2); transition: all .3s; }
.wizard-progress span.is-on { color: var(--text); border-color: var(--accent); }
.wizard-progress span.is-on b { background: var(--accent); color: var(--accent-ink); }
.cat-grid { display: grid; gap: 8px; }
.cat-opt, .cat-chosen { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--border); transition: border-color .15s, transform .12s, background .15s; }
.cat-opt:hover { border-color: var(--accent); }
.cat-opt:active { transform: scale(.98); }
.cat-opt.is-active { border-color: var(--accent); background: var(--accent-softer); }
.cat-opt__txt { display: grid; flex: 1; min-width: 0; }
.cat-opt__txt b { font-size: 14.5px; }
.cat-opt__txt small { color: var(--muted); font-size: 12.5px; }
.cat-opt .chev { width: 18px; height: 18px; color: var(--muted); }
.hint svg { width: 14px; height: 14px; vertical-align: -2px; }

/* une demande : cadre unique */
.ticket { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow); overflow: hidden; }
.ticket__head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 10px; }
.ticket__title { margin: 0; font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
.stepper { list-style: none; margin: 0; padding: 6px 16px 16px; display: flex; border-bottom: 1px solid var(--border); }
.stepper__step { flex: 1; position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; }
.stepper__step + .stepper__step::before { content: ''; position: absolute; top: 13px; right: 50%; width: 100%; height: 3px; background: var(--surface-3); z-index: 0; transition: background .4s; }
.stepper__step.is-done::before, .stepper__step.is-current::before { background: var(--accent); }
.stepper__dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); transition: all .3s; }
.stepper__dot svg { width: 14px; height: 14px; }
.stepper__step.is-done .stepper__dot { background: var(--accent); color: var(--accent-ink); }
.stepper__step.is-current .stepper__dot { background: var(--accent); color: var(--accent-ink); animation: step-pulse 1.6s ease-in-out infinite; }
.stepper__label { font-size: 11px; font-weight: 700; color: var(--muted); line-height: 1.2; max-width: 80px; }
.stepper__step.is-current .stepper__label, .stepper__step.is-done .stepper__label { color: var(--text); }
@keyframes step-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 0%, transparent); transform: scale(1.06); } }
.ticket__thread { display: flex; flex-direction: column; gap: 10px; padding: 16px; max-height: 56dvh; overflow-y: auto; background: var(--bg-elev); }
.tmsg { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; animation: item-in .3s both; }
.tmsg.is-right { align-self: flex-end; flex-direction: row-reverse; }
.tmsg__av { width: 28px; height: 28px; border-radius: 9px; flex: none; }
.tmsg__bubble { padding: 10px 13px; border-radius: 18px 18px 18px 6px; background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.tmsg.is-right .tmsg__bubble { border-radius: 18px 18px 6px 18px; background: var(--accent); color: var(--accent-ink); }
.tmsg.is-staff:not(.is-right) .tmsg__bubble { border: 1.5px solid var(--accent-soft); }
.tmsg__meta { font-size: 11.5px; opacity: .75; margin-bottom: 3px; }
.tmsg__body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.tmsg.is-right .tmsg__body a { color: inherit; text-decoration: underline; }
.quick-replies { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px 0; scrollbar-width: none; }
.quick-replies .chip { flex: none; }
.ticket__reply { display: flex; align-items: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.ticket__reply textarea { flex: 1; border: 1.5px solid var(--border); border-radius: 22px; padding: 11px 14px; background: var(--bg-elev); resize: none; outline: none; min-height: 44px; max-height: 160px; }
.ticket__reply textarea:focus { border-color: var(--accent); }
.ticket__close { display: flex; align-items: center; gap: 6px; margin: 0 16px 14px; color: var(--success); font-weight: 700; }
.ticket__close svg { width: 16px; height: 16px; }
.staff-panel { margin-top: 12px; }
.staff-panel__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.staff-panel__meta span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.staff-panel__meta svg { width: 14px; height: 14px; flex: none; }

/* ==========================================================================
   Animations (toute l'app)
   ========================================================================== */
@keyframes item-in { from { opacity: 0; transform: translateY(10px); } }
.anim-in { animation: item-in .35s cubic-bezier(.2, .8, .3, 1) both; }
.feed > *, .ticket-list > *, .settings-group > *, .card > .rank-row, .cluster-card, .report, .conv, .mod-item, .stat {
  animation: item-in .35s cubic-bezier(.2, .8, .3, 1) both;
}
.feed > :nth-child(2), .ticket-list > :nth-child(2), .settings-group > :nth-child(2), .card > .rank-row:nth-child(2) { animation-delay: .04s; }
.feed > :nth-child(3), .ticket-list > :nth-child(3), .settings-group > :nth-child(3), .card > .rank-row:nth-child(3) { animation-delay: .08s; }
.feed > :nth-child(4), .ticket-list > :nth-child(4), .settings-group > :nth-child(4), .card > .rank-row:nth-child(4) { animation-delay: .12s; }
.feed > :nth-child(5), .ticket-list > :nth-child(5), .settings-group > :nth-child(5), .card > .rank-row:nth-child(5) { animation-delay: .16s; }
.feed > :nth-child(n+6), .ticket-list > :nth-child(n+6), .settings-group > :nth-child(n+6) { animation-delay: .2s; }
@media (hover: hover) {
  .post, .report, .cluster-card, .ticket-row, .stat { transition: transform .18s ease, box-shadow .18s ease; }
  .post:hover, .report:hover, .cluster-card:hover, .stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
}
.act, .rc-act, .chip, .icon-btn, .p-act, .side-link { transition: transform .12s ease, background .15s, color .15s; }
.act:active, .rc-act:active, .chip:active, .p-act:active { transform: scale(.92); }
.act.is-on svg, .rc-act.is-on svg { animation: pop .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { 40% { transform: scale(1.35); } }
.badge-count, .dot-count { animation: pop .4s cubic-bezier(.3, 1.6, .5, 1); }
.tab__icon { transition: background .25s, transform .25s; }
.tab.is-active .tab__icon { animation: pop .4s cubic-bezier(.3, 1.6, .5, 1); }
details.faq[open] .faq__a { animation: item-in .25s ease both; }
@media (prefers-reduced-motion: reduce) { .stepper__step.is-current .stepper__dot { animation: none; } }

/* ==========================================================================
   Console de modération (plein écran)
   ========================================================================== */
.adm { --nav-w: 264px; min-height: 100dvh; background: var(--bg); display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); }
.adm-nav { position: sticky; top: 0; height: 100dvh; overflow-y: auto; padding: calc(var(--safe-top) + 18px) 14px calc(var(--safe-bottom) + 14px); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.adm-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 14px; }
.adm-brand img { width: 38px; height: 38px; border-radius: 11px; }
.adm-brand b { display: block; font-size: 18px; letter-spacing: -.02em; }
.adm-brand small { color: var(--muted); font-size: 12px; font-weight: 600; }
.adm-nav__group { display: grid; gap: 2px; margin-top: 8px; }
.adm-nav__title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 6px 10px; }
.adm-nav__link { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 13px; font-weight: 600; font-size: 14.5px; color: var(--text-2); transition: background .15s, color .15s; }
.adm-nav__link svg { width: 20px; height: 20px; flex: none; }
.adm-nav__link:hover { background: var(--surface-2); color: var(--text); }
.adm-nav__link.is-active { background: var(--accent-soft); color: var(--accent-text); }
.adm-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; font-size: 11.5px; font-weight: 800; background: color-mix(in srgb, var(--warning) 22%, transparent); color: color-mix(in srgb, var(--warning) 75%, var(--text)); }
.adm-count.is-hot { background: var(--danger); color: #fff; animation: pop .4s; }
.adm-nav__foot { margin-top: auto; display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border); }
.adm-me { display: flex; align-items: center; gap: 10px; padding: 6px 10px; }
.adm-main { min-width: 0; display: flex; flex-direction: column; }
.adm-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: calc(var(--safe-top) + 14px) 28px 14px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.adm-top__title { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.adm-top__icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); flex: none; }
.adm-top__icon svg { width: 22px; height: 22px; }
.adm-top h1 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.adm-top p { margin: 1px 0 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-search { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); width: 260px; }
.adm-search svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.adm-search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; }
.adm-live { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--success); white-space: nowrap; padding: 0 10px; height: 32px; border-radius: 999px; background: color-mix(in srgb, var(--success) 12%, transparent); }
.adm-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: live 1.6s ease-in-out infinite; }
@keyframes live { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 60%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
.icon-btn.spin svg { animation: spin .6s linear; }
.adm-menu { display: none; }
.adm-scrim { display: none; }
.adm-body { padding: 22px 28px 48px; max-width: 1320px; width: 100%; }
.adm-body > .segmented, .adm-body > .chips { max-width: 760px; }

.adm-alert { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); margin-bottom: 16px; background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); }
.adm-alert > svg { width: 22px; height: 22px; color: var(--danger); flex: none; }
.adm-alert > div { flex: 1; font-size: 14px; }
.adm-section-title { display: flex; align-items: center; gap: 8px; margin: 22px 2px 10px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.adm-section-title svg { width: 16px; height: 16px; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.kpi { --tone: var(--muted); position: relative; padding: 14px 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); border-top: 3px solid var(--tone); display: grid; gap: 2px; overflow: hidden; }
.kpi.tone-accent { --tone: var(--accent); } .kpi.tone-info { --tone: #0EA5E9; } .kpi.tone-success { --tone: var(--success); }
.kpi.tone-warning { --tone: var(--warning); } .kpi.tone-danger { --tone: var(--danger); } .kpi.tone-neutral { --tone: var(--surface-3); }
.kpi__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.kpi__ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 15%, transparent); }
.kpi.tone-neutral .kpi__ico { color: var(--text-2); background: var(--surface-2); }
.kpi__ico svg { width: 18px; height: 18px; }
.kpi__val { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.kpi__label { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi__delta { font-size: 11.5px; font-weight: 700; color: var(--muted); text-align: right; }
.kpi__delta.up { color: var(--success); } .kpi__delta.down { color: var(--danger); }

.queue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.queue { --q: var(--success); display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); border-left: 5px solid var(--q); transition: transform .15s; }
.queue:hover { transform: translateY(-2px); }
.queue.is-warn { --q: var(--warning); } .queue.is-hot { --q: var(--danger); }
.queue__ico { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; color: var(--q); background: color-mix(in srgb, var(--q) 15%, transparent); flex: none; }
.queue__ico svg { width: 23px; height: 23px; }
.queue b { font-size: 26px; font-weight: 800; line-height: 1; }
.queue.is-hot .queue__ico { animation: step-pulse 1.6s ease-in-out infinite; }

.adm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.adm-card { padding: 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); min-width: 0; animation: item-in .35s both; }
.adm-card.span-2 { grid-column: span 2; }
.adm-card__head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.adm-card__head > svg { width: 18px; height: 18px; color: var(--accent-text); }
.legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; }
.chart__plot { display: flex; align-items: flex-end; gap: 6px; height: calc(var(--h) + 22px); }
.chart__col { flex: 1; display: grid; grid-template-rows: var(--h) 22px; min-width: 0; }
.chart__stack { display: flex; align-items: flex-end; gap: 2px; justify-content: center; }
.chart__stack i { flex: 1; max-width: 22px; min-height: 2px; border-radius: 5px 5px 2px 2px; opacity: .9; transform-origin: bottom; animation: grow .6s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes grow { from { transform: scaleY(0); } }
.chart__x { font-size: 11px; color: var(--muted); text-align: center; padding-top: 4px; white-space: nowrap; overflow: hidden; }
.hbars { display: grid; gap: 9px; }
.hbar { display: grid; grid-template-columns: 92px 1fr 30px; align-items: center; gap: 8px; font-size: 13px; }
.hbar__label { color: var(--text-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar__track { height: 9px; border-radius: 9px; background: var(--surface-2); overflow: hidden; }
.hbar__track i { display: block; height: 100%; border-radius: 9px; animation: grow-x .6s cubic-bezier(.2, .8, .3, 1) both; transform-origin: left; }
@keyframes grow-x { from { transform: scaleX(0); } }
.hbar b { text-align: right; }
.state-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.state-row + .state-row { border-top: 1px solid var(--border); }
.state-row__ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.state-row__ico svg { width: 17px; height: 17px; }
.state-row__ico.ok { color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); }
.state-row__ico.bad { color: var(--danger); background: color-mix(in srgb, var(--danger) 13%, transparent); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stats a { display: grid; gap: 2px; padding: 12px; border-radius: 14px; background: var(--surface-2); text-align: center; }
.mini-stats b { font-size: 24px; font-weight: 800; }
.mini-stats span { font-size: 12px; color: var(--muted); font-weight: 600; }
.c-danger { color: var(--danger); } .c-warning { color: var(--warning); } .c-info { color: #0EA5E9; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.adm-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 4px; border-radius: 10px; }
.adm-row + .adm-row { border-top: 1px solid var(--border); }
button.adm-row:hover { background: var(--surface-2); }
.adm-row__ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.adm-row__ico svg { width: 15px; height: 15px; }
.adm .mod-item, .adm .settings-group, .adm .card { box-shadow: var(--shadow); }

@media (max-width: 1180px) { .adm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .adm-search { display: none; } }
@media (max-width: 900px) {
  .adm { grid-template-columns: 1fr; }
  .adm-nav { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-100%); transition: transform .28s cubic-bezier(.2, .8, .3, 1); box-shadow: var(--shadow-lg); }
  .adm.nav-open .adm-nav { transform: none; }
  .adm-scrim { position: fixed; inset: 0; z-index: 55; background: var(--overlay); }
  .adm.nav-open .adm-scrim { display: block; }
  .adm-menu { display: grid; }
  .adm-top { padding: calc(var(--safe-top) + 10px) 14px 10px; gap: 8px; }
  .adm-top__icon { display: none; }
  .adm-top h1 { font-size: 18px; }
  .adm-live span { display: none; }
  .adm-live { padding: 0 9px; }
  .adm-body { padding: 16px 14px calc(var(--safe-bottom) + 32px); }
  .adm-grid { grid-template-columns: 1fr; }
  .adm-card.span-2 { grid-column: auto; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi__val { font-size: 24px; }
  .kpi__delta { display: none; }
}
.mail-pref { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-top: 12px; }

/* ---------- Présentation (tour) : couleurs du thème clair / sombre ---------- */
.tour { position: fixed; inset: 0; z-index: 640; background: var(--bg); color: var(--text); overflow: hidden;
  display: flex; flex-direction: column; padding: calc(var(--safe-top) + 14px) 22px calc(var(--safe-bottom) + 18px); animation: fade-in .35s ease both; }
.tour.is-out { opacity: 0; transform: scale(.98); transition: opacity .3s, transform .3s; }
.tour > :not(.tour__glow) { position: relative; }
.tour__glow { position: absolute; inset: -20% -30% auto; height: 70%; pointer-events: none;
  background: radial-gradient(40% 50% at 30% 40%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
              radial-gradient(35% 45% at 75% 55%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
  filter: blur(10px); animation: tour-glow 14s ease-in-out infinite alternate; }
@keyframes tour-glow { to { transform: translate3d(6%, 4%, 0) rotate(8deg) scale(1.08); } }

.tour__top { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 560px; margin: 0 auto; min-height: 36px; }
.tour__dots { flex: 1; display: flex; align-items: center; gap: 0; }
.tour__dot { position: relative; flex: none; width: 10px; height: 10px; padding: 0; border-radius: 999px; background: var(--surface-3); transition: width .4s cubic-bezier(.3, 1.4, .5, 1), background .3s; }
.tour__dot + .tour__dot { margin-left: 18px; }
.tour__dot + .tour__dot::before { content: ''; position: absolute; right: 100%; top: 50%; width: 18px; height: 2px; margin-top: -1px; background: var(--surface-3); transition: background .3s; }
.tour__dot::after { content: ''; position: absolute; inset: -10px -6px; } /* zone tactile */
.tour__dot.is-done, .tour__dot.is-on { background: var(--accent); }
.tour__dot.is-done + .tour__dot::before, .tour__dot.is-done + .tour__dot.is-on::before { background: var(--accent); }
.tour__dot.is-on { width: 28px; box-shadow: 0 0 0 4px var(--accent-soft); }
.tour__skip { color: var(--muted); font-weight: 700; font-size: 14px; padding: 8px 4px; transition: opacity .25s; }
.is-hidden { opacity: 0; pointer-events: none; }

.tour__art { flex: 1; display: grid; place-items: center; min-height: 0; width: 100%; max-width: 560px; margin: 0 auto; }
.tour-art { position: relative; width: min(100%, 360px); }
.tour-art--stack { display: flex; flex-direction: column; gap: 12px; }
.tour-art--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tour-art > *, .tour-art .tour-chip, .tour-art .tour-follow, .tour-art .tour-toast { animation: tour-in .6s cubic-bezier(.2, .9, .3, 1.15) var(--d, 0s) both; }
@keyframes tour-in { from { opacity: 0; transform: translate3d(calc(var(--dir, 1) * 26px), 14px, 0) scale(.94); } }

.tour-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 14px; box-shadow: var(--shadow); }
.tour-card b { display: block; font-size: 15px; line-height: 1.25; }
.tour-card small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

/* 1. Accueil */
.tour-art--hero { height: 250px; display: grid; place-items: center; }
.tour-logo { position: relative; width: 108px; height: 108px; border-radius: 32px; overflow: hidden; box-shadow: 0 22px 60px color-mix(in srgb, var(--accent) 40%, transparent);
  animation: tour-pop .8s cubic-bezier(.3, 1.6, .5, 1) .05s both, float 4.5s ease-in-out .9s infinite !important; }
.tour-logo img { width: 100%; height: 100%; display: block; }
@keyframes tour-pop { from { opacity: 0; transform: scale(.4) rotate(-14deg); } }
.tour-halo { position: absolute; left: 50%; top: 50%; width: 108px; height: 108px; margin: -54px; border-radius: 34px; border: 2px solid var(--accent);
  animation: tour-halo 2.8s ease-out .6s infinite !important; opacity: 0; }
.tour-halo--2 { animation-delay: 2s !important; }
@keyframes tour-halo { 0% { opacity: .5; transform: scale(1); } 100% { opacity: 0; transform: scale(2.3); border-radius: 60px; } }
.tour-chip { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); }
.tour-chip svg { width: 16px; height: 16px; flex: none; color: var(--accent-text); }
.tour-art--hero .tour-chip { position: absolute; }
.tour-art--hero .tour-chip.c1 { top: 8px; left: 0; }
.tour-art--hero .tour-chip.c2 { top: 46%; right: 0; }
.tour-art--hero .tour-chip.c3 { bottom: 10px; left: 8%; }
.tour-art--hero .tour-chip > * { animation: none; }
.tour-art--hero .tour-chip.c1 svg { color: var(--warning); } .tour-art--hero .tour-chip.c3 svg { color: var(--success); }

/* 2. Clusters */
.tour-cluster { display: flex; align-items: center; gap: 12px; }
.tour-cluster__logo { width: 46px; height: 46px; border-radius: 15px; flex: none; display: grid; place-items: center; background: var(--cc); color: #fff; font-weight: 800; font-size: 12px; }
.tour-follow { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: var(--accent); color: var(--accent-ink); flex: none; }
.tour-follow svg { width: 14px; height: 14px; }
.tour-art .tour-follow { animation-name: tour-pop-s; animation-duration: .5s; }
@keyframes tour-pop-s { from { opacity: 0; transform: scale(.3); } 60% { transform: scale(1.12); } }

/* 3. Radar */
.tour-report__type { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; color: var(--danger); }
.tour-report__type svg { width: 18px; height: 18px; }
.tour-report .row { gap: 8px; align-items: center; }
.tour-report p { margin: 10px 0 12px; font-size: 14.5px; line-height: 1.45; color: var(--text-2); }
.tour-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); padding: 4px 9px; border-radius: 999px; }
.tour-live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: live 1.6s ease-in-out infinite; box-shadow: 0 0 0 0 currentColor; }
.tour-vote { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 11px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 13px; }
.tour-vote b { display: inline; font-size: 13px; font-variant-numeric: tabular-nums; min-width: 1.2em; }
.tour-vote svg { width: 15px; height: 15px; }
.tour-vote.is-on { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.tour-vote.is-on svg { animation: tour-thumb 1.2s ease-in-out .5s 3; transform-origin: 50% 80%; }
@keyframes tour-thumb { 30% { transform: rotate(-16deg) scale(1.2); } 60% { transform: none; } }
.tour-toast { align-self: center; display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: color-mix(in srgb, var(--success) 14%, var(--surface)); color: var(--success); border: 1px solid color-mix(in srgb, var(--success) 30%, transparent); }
.tour-toast svg { width: 16px; height: 16px; }

/* 4. Score de Fiabilité */
.tour-fs { display: flex; align-items: center; gap: 16px; }
.tour-ring { --v: 0; width: 72px; height: 72px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--success) calc(var(--v) * 1%), var(--surface-3) 0); }
.tour-ring b { width: 56px; height: 56px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tour-row { justify-content: center; gap: 10px; flex-wrap: wrap; }
.tour-row .tour-chip.inline svg { color: var(--success); }
.tour-row .tour-chip.inline + .tour-chip.inline svg { color: var(--warning); }

/* 5. Partage */
.tour-tile { display: flex; flex-direction: column; min-height: 128px; }
.tour-tile__ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); margin-bottom: auto; }
.tour-tile__ico svg { width: 22px; height: 22px; animation: tour-wiggle 3.2s ease-in-out calc(var(--d) + 1s) infinite; }
@keyframes tour-wiggle { 0%, 82%, 100% { transform: none; } 88% { transform: rotate(-12deg) scale(1.1); } 94% { transform: rotate(8deg); } }
.tour-tile b { margin-top: 14px; }

/* 6. Règles */
.tour-rule { display: flex; align-items: center; gap: 12px; }
.tour-rule__ico { width: 40px; height: 40px; border-radius: 13px; flex: none; display: grid; place-items: center; }
.tour-rule__ico svg { width: 22px; height: 22px; }
.tour-rule.ok .tour-rule__ico { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.tour-rule.bad { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
.tour-rule.bad .tour-rule__ico { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.tour-art .tour-rule.bad { animation: tour-in .6s cubic-bezier(.2, .9, .3, 1.15) var(--d) both, tour-shake .5s ease 1s 1; }
@keyframes tour-shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }

/* Texte et boutons */
.tour__content { width: 100%; max-width: 560px; margin: 0 auto; padding: 10px 0 22px; }
.tour__content.is-in > * { animation: tour-text .5s cubic-bezier(.2, .8, .3, 1) both; }
.tour__content.is-in > :nth-child(2) { animation-delay: .08s; }
@keyframes tour-text { from { opacity: 0; transform: translateY(12px); } }
.tour__title { font-size: clamp(26px, 7vw, 34px); line-height: 1.1; margin: 0 0 10px; letter-spacing: -.025em; }
.tour__text { color: var(--text-2); font-size: 15.5px; line-height: 1.55; margin: 0; min-height: 4.65em; }
.tour__foot { display: flex; gap: 10px; width: 100%; max-width: 560px; margin: 0 auto; }
.tour__foot .btn { height: 54px; border-radius: 18px; }
.tour__prev { width: 54px; height: 54px; flex: none; border-radius: 18px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--text); transition: opacity .25s; }
.tour__prev svg { width: 22px; height: 22px; }
@media (min-width: 900px) { .tour { justify-content: center; } .tour__art { flex: 0 0 auto; min-height: 320px; margin: 40px auto 10px; } }
@media (max-height: 680px) { .tour__art { transform: scale(.86); } .tour__text { min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .tour *, .tour { animation: none !important; transition: none !important; } }
body:has(> .tour) .cookie-banner { display: none; }

.is-leaving { opacity: 0; transform: translateY(-6px); transition: opacity .25s, transform .25s; }

/* ---------- Tirer pour actualiser ---------- */
.ptr { position: fixed; z-index: 120; left: 50%; top: calc(var(--safe-top) + 8px); width: 40px; height: 40px; margin-left: -20px; border-radius: 50%;
  background: var(--surface); box-shadow: var(--shadow, 0 6px 20px rgba(0, 0, 0, .18)); display: grid; place-items: center; color: var(--accent);
  transform: translateY(calc(var(--pull, 0) * 1px - 60px)) rotate(calc(var(--pull, 0) * 4deg)); opacity: calc(var(--pull, 0) / 70); pointer-events: none; }
.ptr svg { width: 20px; height: 20px; }
.ptr.is-ready { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.ptr.is-loading { transform: translateY(16px); opacity: 1; transition: transform .2s; }
.ptr.is-loading svg { animation: spin .8s linear infinite; }
.ptr.is-done { transform: translateY(-60px); opacity: 0; transition: transform .3s, opacity .3s; }

/* ---------- Double authentification ---------- */
.otp-head { display: flex; gap: 14px; align-items: flex-start; }
.otp-head b { display: block; font-size: 16px; margin-bottom: 2px; }
.otp-head p { margin: 0; }
.otp-icon { width: 46px; height: 46px; flex: none; border-radius: 15px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.otp-icon svg { width: 24px; height: 24px; }
.otp-icon.is-ok { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.otp-input { font-size: 26px; font-weight: 800; letter-spacing: .32em; text-align: center; font-variant-numeric: tabular-nums; height: 60px; }
.otp-input::placeholder { letter-spacing: .32em; opacity: .35; }
.qr-wrap { display: grid; place-items: center; }
.qr { width: 196px; height: 196px; border-radius: 14px; image-rendering: pixelated; shape-rendering: crispEdges; }
.secret-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; justify-content: center; text-align: center; }
.secret-key code { font-size: 13px; font-weight: 700; letter-spacing: .04em; word-break: break-all; padding: 6px 10px; background: var(--surface-2); border-radius: 10px; }
.recovery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.recovery-grid code { font-size: 15px; font-weight: 700; text-align: center; padding: 10px; background: var(--surface-2); border-radius: 12px; letter-spacing: .05em; user-select: all; }
.security-hero { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 18px; background: color-mix(in srgb, var(--warning, #F59E0B) 12%, var(--surface)); }
.security-hero > svg { width: 30px; height: 30px; flex: none; color: var(--warning, #F59E0B); }
.security-hero.is-on { background: color-mix(in srgb, var(--success) 12%, var(--surface)); }
.security-hero.is-on > svg { color: var(--success); }
.security-hero b { display: block; } .security-hero p { margin: 2px 0 0; color: var(--muted); }
.adm-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.adm-gate__card { max-width: 440px; display: grid; gap: 14px; justify-items: center; text-align: center; }
.adm-gate__card .otp-icon { width: 64px; height: 64px; border-radius: 20px; }
.adm-gate__card h1 { margin: 6px 0 0; font-size: 24px; }
.adm-gate__card p { margin: 0; line-height: 1.5; }
.adm-gate__card .btn { width: 100%; }
.secret-key code { max-width: 100%; white-space: normal; }
.sheet__body .stack > * { min-width: 0; }

/* ---------- Accessibilité : zones tactiles ≥ 44 px sans changer le visuel ---------- */
@media (pointer: coarse) {
  :is(button, a).chip, .rc-act, .filter-btn, .icon-btn--sm, .term button { position: relative; }
  :is(button, a).chip::after, .rc-act::after, .filter-btn::after, .icon-btn--sm::after, .term button::after { content: ''; position: absolute; inset: -7px -2px; }
  .icon-btn--sm::after, .term button::after { inset: -8px; }
}

/* ---------- Écran « Quoi de neuf » (après une mise à jour) ---------- */
.whatsnew { padding-bottom: 4px; }
.whatsnew .dialog-title { font-size: 22px; line-height: 1.2; letter-spacing: -.02em; margin-bottom: 14px; }
.whatsnew__body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); font-size: 15.5px; line-height: 1.55; }
.whatsnew__body a { color: var(--accent-text); font-weight: 600; }

/* ---------- Badge Insider : pop-up après l'inscription ---------- */
.insider { text-align: center; }
.insider-card { display: flex; align-items: center; gap: 14px; margin: 2px 0 16px; padding: 18px; border-radius: 24px; background: var(--accent); color: #fff; text-align: left; }
.insider-card .avatar { border: 3px solid rgba(255, 255, 255, .35); }
.insider-card__id { display: grid; gap: 2px; min-width: 0; }
.insider-card__name { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 19px; }
.insider-card__name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insider-card__handle { font-size: 13px; opacity: .85; }
.insider-card .badges .vb { background: #fff; padding: 1px; }
.insider-card .badges .vb + .vb { margin-left: -10px; }
.insider-card .badges .vbadge { width: 24px; height: 24px; filter: none; }
.insider-card .vb--insider { animation: pop .6s .25s cubic-bezier(.3, 1.6, .5, 1) both; }
.insider-tag { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 999px; background: var(--insider); color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.insider__mail { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--surface-2); text-align: left; font-size: 14px; }
.insider__mail svg { width: 22px; height: 22px; flex: none; color: var(--accent-text); }
.insider__mail p { margin: 0; }
.insider__help { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.tour-art--hero .tour-chip { animation: tour-in .6s cubic-bezier(.2, .9, .3, 1.15) var(--d) both, float 5s ease-in-out calc(var(--d) + .7s) infinite; }
.tour__prev { transition: opacity .25s, width .3s, margin .3s; overflow: hidden; }
.tour__prev.is-hidden { width: 0; margin-right: -10px; border-width: 0; }

/* ---------- Boutons ronds à compteur (messagerie, notifications) : forme fixe ---------- */
.icon-btn--count { position: relative; }
.icon-btn__count { position: absolute; top: -2px; right: -2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; line-height: 19px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.icon-btn__count[hidden] { display: none; }
.tab .dot-count { position: absolute; top: 10px; right: calc(50% - 16px); }

/* ---------- Accueil : stories qui se rangent dans la barre du haut ---------- */
.home .topbar { position: sticky; }
.home .stories-wrap { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .42s cubic-bezier(.3, .8, .3, 1), opacity .3s, transform .42s cubic-bezier(.3, .8, .3, 1); transform-origin: 50% 0; }
.home .stories-wrap > .stories { min-height: 0; overflow-y: hidden; }
.home.is-collapsed .stories-wrap { grid-template-rows: 0fr; opacity: 0; transform: translateY(-18px) scale(.92); pointer-events: none; }
.stories-mini { position: absolute; left: 50%; top: calc(var(--safe-top) + 6px + 23px); display: flex; align-items: center; padding: 3px; border-radius: 999px;
  transform: translate(-50%, -50%) scale(.6); opacity: 0; pointer-events: none; transition: opacity .25s, transform .35s cubic-bezier(.3, 1.4, .5, 1); }
@media (min-width: 900px) { .stories-mini { top: calc(18px + 23px); } }
.stories-mini .avatar { width: 34px; height: 34px; font-size: 13px; border: 2px solid var(--bg); box-shadow: 0 0 0 2px var(--accent);
  position: relative; z-index: calc(3 - var(--k)); transform: translateX(calc(var(--k) * 10px)) scale(.5); opacity: 0; transition: transform .4s cubic-bezier(.3, 1.4, .5, 1), opacity .25s; transition-delay: calc(var(--k) * 60ms); }
.stories-mini .avatar + .avatar { margin-left: -12px; }
.home.is-collapsed .stories-mini:not(.is-empty) { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; }
.home.is-collapsed .stories-mini .avatar { transform: none; opacity: 1; }

/* ---------- Radar : accès au classement ---------- */
.leadz-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 12px; border-radius: var(--r); color: var(--text);
  background: linear-gradient(110deg, color-mix(in srgb, var(--warning) 18%, var(--surface)) 0%, var(--surface) 70%); border: 1px solid color-mix(in srgb, var(--warning) 28%, var(--border)); }
.leadz-banner b { display: block; font-size: 15px; }
.leadz-banner small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.leadz-banner__ico { width: 40px; height: 40px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--warning); color: #fff; }
.leadz-banner__ico svg { width: 22px; height: 22px; }
.leadz-banner .chev { width: 18px; height: 18px; color: var(--muted); }
.leadz-banner:active { transform: scale(.98); }

/* ---------- Profil façon réseau social : pleine largeur, sections à plat ---------- */
.pf-view { margin: 0 -14px; }
@media (min-width: 700px) { .pf-view { margin: 0; } }
.pf { position: relative; background: var(--bg); }
.pf__banner { position: relative; height: calc(var(--safe-top) + 150px); margin-top: calc(-1 * var(--safe-top) - 8px);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #2a0a1a)); overflow: hidden; }
@media (min-width: 700px) { .pf__banner { margin-top: 0; height: 190px; border-radius: 0 0 0 0; } }
.pf__banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf__nav { position: absolute; inset: calc(var(--safe-top) + 8px) 12px auto; display: flex; justify-content: space-between; }
@media (min-width: 700px) { .pf__nav { top: 12px; } }
.icon-btn--glass { background: rgba(10, 8, 14, .38); color: #fff; box-shadow: none; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); width: 40px; height: 40px; }
.icon-btn--glass svg { width: 20px; height: 20px; }
.pf__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 0 16px; margin-top: -44px; }
.pf__avatar .avatar { width: 92px; height: 92px; font-size: 34px; border: 4px solid var(--bg); background-color: var(--surface-2); }
.pf .profile-actions { margin: 0 0 4px; }
.pf .p-act { height: 38px; min-width: 38px; background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.pf .p-act--text { padding: 0 16px; font-weight: 700; font-size: 14.5px; }
.pf .p-act.is-white { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.pf__id { padding: 10px 16px 0; }
.pf__id h1 { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 6px; min-width: 0; }
.pf__id h1 > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf__handle { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.pf__follows { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); }
.pf .role-tag { font-size: 11.5px; }
.pf__bio { margin: 10px 16px 0; white-space: pre-wrap; line-height: 1.45; color: var(--text); }
.pf__bio a { color: var(--accent-text); }
.pf__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 10px 16px 0; color: var(--muted); font-size: 14px; }
.pf__meta span { display: inline-flex; align-items: center; gap: 5px; }
.pf__meta svg { width: 16px; height: 16px; }
.pf__stats { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 10px 16px 14px; color: var(--muted); font-size: 14px; border-bottom: 1px solid var(--border); }
.pf__stats b { color: var(--text); font-weight: 800; }
.pf__stats a:active { opacity: .7; }
.pf-view > .fs-gauge { margin: 0; border-radius: 0; box-shadow: none; background: var(--bg); padding: 14px 16px; border-bottom: 1px solid var(--border); }
.pf__mod { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.pf-view > .icon-tabs { margin: 0 0 12px; position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding-top: var(--safe-top); }
@media (min-width: 700px) { .pf-view > .icon-tabs { padding-top: 0; } }
.pf-view > div:last-child { padding: 0 14px; }
@media (min-width: 700px) { .pf-view > div:last-child { padding: 0; } }
.pf .badges .vbadge { width: 20px; height: 20px; }
/* profil : boutons compacts, compteurs discrets, score de fiabilité en une ligne */
.pf .profile-actions { gap: 6px; }
.pf .p-act { height: 34px; min-width: 34px; padding: 0 8px; }
.pf .p-act svg { width: 17px; height: 17px; }
.pf .p-act--text { padding: 0 14px; font-size: 13.5px; }
.pf__stats { font-size: 13.5px; gap: 2px 14px; padding-bottom: 10px; border-bottom: 0; }
.pf__fs { display: flex; align-items: center; gap: 8px; padding: 0 16px 14px; font-size: 14px; border-bottom: 1px solid var(--border); }
.pf__ring { --v: 50; width: 22px; height: 22px; flex: none; border-radius: 50%;
  background: radial-gradient(closest-side, var(--bg) 62%, transparent 64%), conic-gradient(var(--fsc) calc(var(--v) * 1%), var(--surface-3) 0); }
.pf__fs b { font-weight: 800; }
.pf__fs-level { font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; color: var(--fsc); background: color-mix(in srgb, var(--fsc) 13%, transparent); }

/* ---------- Barre d'onglets : fixée en bas, pleine largeur, icônes seules ---------- */
:root { --tabbar-h: 56px; }
.tabbar { left: 0; right: 0; bottom: 0; max-width: none; margin: 0; height: calc(var(--tabbar-h) + var(--safe-bottom)); padding: 0 6px var(--safe-bottom);
  border-radius: 0; border: 0; border-top: 1px solid var(--border); box-shadow: none; gap: 0; justify-content: space-around;
  background: color-mix(in srgb, var(--bg) 90%, transparent); }
.tab { flex: 1 1 0; height: var(--tabbar-h); min-width: 0; border-radius: 0; background: none !important; }
.tab .tab__label, .tab.is-active .tab__label { display: none; }
.tab__icon { width: 44px; height: 36px; border-radius: 12px; background: none !important; }
.tab svg { width: 25px; height: 25px; }
.tab.is-active { color: var(--accent-text); flex: 1 1 0; }
.tab.is-active .tab__icon { color: var(--accent-text); }
.tab.is-active svg { stroke-width: 2.4; }
.tab .dot-count { top: 12px; right: calc(50% - 15px); left: auto; }
.content { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 20px); }
.fab { bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px); }

/* ---------- Notifications compactes, texte seul ---------- */
.notif { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; margin: 0 -14px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 14.5px; line-height: 1.35; }
.notif .avatar { width: 40px; height: 40px; font-size: 15px; flex: none; }
.notif .name-line { font-size: 14.5px; }
.notif .small { font-size: 13px; margin-top: 2px; }
.notif.is-unread { background: var(--accent-softer); }
.notif:active { background: var(--surface-2); }
@media (min-width: 700px) { .notif { margin: 0; } }

/* ---------- Barre d'écriture : ordinateur seulement ---------- */
.compose-bar { display: none; }
@media (min-width: 900px) {
  .compose-bar { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; text-align: left; color: var(--muted); border-bottom: 1px solid var(--border); }
  .compose-bar > svg { width: 22px; height: 22px; color: var(--accent-text); }
}

/* ---------- Publications à plat, séparées par un filet (façon Twitter) ---------- */
.post { background: transparent; border-radius: 0; box-shadow: none; padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.post + .post, .post + .loader-block, .feed > * + *, .repost-wrap + .repost-wrap, .repost-wrap + .post, .post + .repost-wrap { margin-top: 0; }
.feed { margin: 0 -14px; border-top: 1px solid var(--border); }
@media (min-width: 700px) { .feed { margin: 0; } }
.repost-wrap { border-bottom: 1px solid var(--border); padding-top: 10px; }
.repost-wrap > .post { border-bottom: 0; padding-top: 4px; }
.repost-head { padding-left: 16px; padding-bottom: 0; }
.post:hover, .report:hover { transform: none; box-shadow: none; }
@media (hover: hover) { .post:hover { background: color-mix(in srgb, var(--surface) 55%, transparent); } }
.post .act { background: transparent; }
.post .act:hover { background: var(--surface-2); }
.home .stories-wrap { border-bottom: 0; }
.feed > .notif { margin: 0; }

/* mode clair : fond blanc, les encadrés de la colonne de droite se détachent par un filet */
.rb-card, .rightbar .card { border: 1px solid var(--border); box-shadow: none; }
.notif__text b { font-weight: 800; }
.notif__text .badges { display: inline-flex; vertical-align: -3px; margin: 0 2px 0 3px; }
.notif__text .badges .vbadge { width: 16px; height: 16px; }

/* site (pas les apps) : la barre de recherche de la colonne de droite ne s'écrase plus et se détache du fond blanc */
html:not(.native) .rightbar > * { flex-shrink: 0; }
html:not(.native) .rightbar .searchbar { height: 46px; background: var(--surface-2); box-shadow: none; border: 1px solid transparent; transition: border-color .15s, background .15s; }
html:not(.native) .rightbar .searchbar:hover { border-color: var(--border); }
html:not(.native) .rightbar .searchbar:focus-within { background: var(--bg); border-color: var(--accent); }
html:not(.native) .sidebar > * { flex-shrink: 0; }
html:not(.native) .sidebar { overflow-y: auto; scrollbar-width: none; }
html:not(.native) .sidebar .btn--primary { min-height: 50px; }

/* ==========================================================================
   Console de modération : composants sobres et homogènes
   ========================================================================== */
.mu-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; font-size: 14px; font-weight: 600;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.mu-btn svg { width: 17px; height: 17px; }
.mu-btn:hover { background: var(--surface-2); }
.mu-btn:active { transform: scale(.97); }
.mu-btn.is-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.mu-btn.is-primary:hover { filter: brightness(1.06); }
.mu-btn.is-danger { background: var(--danger); color: #fff; border-color: transparent; }
.mu-btn.is-danger-outline { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.mu-btn.is-danger-outline:hover { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.mu-btn.is-block { width: 100%; height: 42px; }
.mu-link { font-size: 13px; font-weight: 600; color: var(--accent-text); padding: 2px 0; }
.mu-link.is-danger { color: var(--danger); }
.mu-link:hover { text-decoration: underline; }

.sheet--mod .sheet__body { padding-top: 4px; }
.mu { display: grid; gap: 14px; }
.mu-head { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.mu-head .avatar { width: 60px; height: 60px; flex: none; }
.mu-head__id { flex: 1; min-width: 0; }
.mu-head h2 { margin: 0; font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 6px; min-width: 0; }
.mu-head__sub { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin-top: 1px; }
.mu-role { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--admin) 14%, transparent); color: var(--admin); }
.mu-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mu-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--text-2); }
.mu-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mu-pill.is-ok { color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); }
.mu-pill.is-warn { color: #B45309; background: color-mix(in srgb, var(--warning) 16%, transparent); }
.mu-pill.is-bad { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
@media (max-width: 560px) { .mu-head { flex-wrap: wrap; } .mu-head > .mu-btn { width: 100%; } }

.mu-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.mu-fact { padding: 11px 14px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 0 -1px -1px 0; min-width: 0; }
.mu-fact__label { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 3px; }
.mu-fact__value { font-size: 14px; font-weight: 600; display: flex; min-width: 0; }
.mu-fact__value code { font-size: 13px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-weight: 500; }
.mu-fact__actions { display: flex; gap: 12px; margin-top: 4px; }

.mu-panel { border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: grid; gap: 12px; background: var(--surface); }
.mu-panel__title { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 800; }
.mu-panel__title svg { width: 18px; height: 18px; color: var(--muted); }
.mu-panel.is-danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.mu-panel.is-danger .mu-panel__title, .mu-panel.is-danger .mu-panel__title svg { color: var(--danger); }
.mu-panel .textarea { min-height: 64px; }

.mu-seg { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface-2); padding: 3px; }
.mu-seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.mu-seg button svg { width: 16px; height: 16px; }
.mu-seg button.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.mu-seg button.is-danger.is-active { color: var(--danger); }
.mu-durations { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.mu-durations .mu-fact__label { margin: 0 6px 0 0; }
.mu-durations button { height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-2); }
.mu-durations button.is-active { border-color: var(--accent); color: var(--accent-text); background: var(--accent-softer); }
.mu-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.mu-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.mu-actions { display: flex; justify-content: flex-end; gap: 8px; }
.mu-callout { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--warning) 12%, transparent); font-size: 13.5px; }
.mu-callout > svg { width: 18px; height: 18px; color: #B45309; }

.mu-fs { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.mu-fs__score { display: flex; align-items: baseline; gap: 3px; color: var(--fsc); }
.mu-fs__score b { font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.mu-fs__score span { font-size: 13px; color: var(--muted); }
.mu-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mu-num { width: 84px; height: 36px; padding: 0 10px; border-radius: 10px; }

.mu-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.mu-panel__title + .mu-row { border-top: 0; padding-top: 0; }
.mu-row b { display: block; font-size: 14px; }
.mu-row small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.mu-row__ico { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); color: var(--text-2); }
.mu-row__ico svg { width: 18px; height: 18px; }
.mu-row.is-link { width: 100%; text-align: left; padding: 8px 0; }
.mu-row.is-link:hover { background: var(--surface-2); }
.mu-list .mu-row:first-child { border-top: 0; }

.mu-timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--border); display: grid; gap: 14px; }
.mu-timeline li { position: relative; }
.mu-timeline li::before { content: ''; position: absolute; left: -22px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); box-shadow: 0 0 0 3px var(--surface); }
.mu-timeline li.tone-bad::before { background: var(--danger); } .mu-timeline li.tone-warn::before { background: var(--warning); } .mu-timeline li.tone-ok::before { background: var(--success); }
.mu-timeline__head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.mu-timeline__head span { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.mu-quote { margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13.5px; white-space: pre-wrap; }

/* boutons et cartes du reste de la console, alignés sur le même style */
.adm .btn, .sheet--mod .btn { border-radius: 10px; font-weight: 600; }
.adm .btn--sm { height: 34px; padding: 0 12px; font-size: 13.5px; }
.adm .mod-item { border: 1px solid var(--border); box-shadow: none; border-radius: 14px; }
.adm .mod-actions { gap: 8px; }
.adm .chip { border-radius: 8px; }
.adm .segmented { border-radius: 10px; }
.mu-row .chev { width: 18px; height: 18px; flex: none; color: var(--muted); }
.mu-row .avatar { flex: none; }

/* ---------- Canaux et Team Sunio ---------- */
.ch-avatar { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #2a0a1a)); color: #fff; font-weight: 800; }
.ch-avatar img { object-fit: cover; }
.ch-tag { display: inline-flex; align-items: center; gap: 3px; height: 18px; padding: 0 6px; margin-left: 6px; border-radius: 6px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
  background: color-mix(in srgb, var(--verified) 14%, transparent); color: var(--verified); vertical-align: 2px; }
.ch-tag svg { width: 11px; height: 11px; }
.conv__name { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; min-width: 0; }
.conv__kind { width: 15px; height: 15px; color: var(--muted); flex: none; }
.conv--broadcast .avatar { border-radius: 18px; }
.ch-head { gap: 10px; text-align: left; min-width: 0; }
.ch-head .avatar { border-radius: 11px; }
.ch-head__name { font-size: 16px; font-weight: 800; display: flex; align-items: center; }
.ch-thread { display: flex; flex-direction: column; gap: 6px; }
.ch-row { display: flex; align-items: flex-end; gap: 8px; animation: item-in .3s ease both; }
.ch-row .avatar { flex: none; border-radius: 11px; }
.ch-msg { position: relative; max-width: min(82%, 520px); padding: 10px 14px 20px; border-radius: 18px 18px 18px 6px; background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.45; }
.ch-msg img { display: block; max-width: calc(100% + 20px); max-height: 320px; margin: -4px -10px 6px; border-radius: 14px; object-fit: cover; cursor: zoom-in; }
.ch-msg__time { position: absolute; right: 12px; bottom: 5px; font-size: 11px; color: var(--muted); }
.ch-foot { padding: 10px 2px calc(var(--safe-bottom) + 6px); }
.ch-foot--ro { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: calc(var(--safe-bottom) + 6px); border-radius: 14px; background: var(--surface-2); color: var(--muted); font-size: 13.5px; }
.ch-foot--ro > svg { width: 18px; height: 18px; flex: none; }
.ch-foot--ro span { flex: 1; }
.composer__send { background: var(--accent) !important; color: var(--accent-ink) !important; }
.composer .icon-btn.is-on { color: var(--accent-text); }
.ch-info__head { display: grid; justify-items: center; gap: 6px; text-align: center; }
.ch-info__head .avatar { border-radius: 30px; }
.ch-info__head h2 { margin: 6px 0 0; font-size: 21px; display: flex; align-items: center; }
.ch-info__desc { margin: 0; text-align: center; color: var(--text-2); white-space: pre-wrap; }
.ch-edit__avatar .avatar { border-radius: 26px; }
.btn--danger-soft { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }
.ch-discover { margin-top: 18px; }
.ch-discover__row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.ch-card { flex: none; width: 128px; display: grid; justify-items: center; gap: 4px; padding: 14px 10px; border: 1px solid var(--border); border-radius: 16px; text-align: center; }
.ch-card .avatar { border-radius: 18px; margin-bottom: 4px; }
.ch-card b { font-size: 13.5px; max-width: 100%; }
.ch-card small { font-size: 12px; color: var(--muted); }
.mu-team { display: grid; gap: 10px; }
.mu-team__msg { display: grid; gap: 4px; justify-items: start; }
.mu-team__msg .mu-timeline__head { width: 100%; }
.mu-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; cursor: zoom-in; }
.mu-inline .input { flex: 1; min-width: 160px; height: 36px; border-radius: 10px; }
.conv .row--between { gap: 8px; flex-wrap: nowrap; }
.conv .row--between > .small { white-space: nowrap; flex: none; }
.conv__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; }
.conv__name .ch-tag { flex: none; }

/* barre d'onglets : l'icône reste centrée, onglet actif ou non */
.tab, .tab.is-active { justify-content: center; gap: 0; padding: 0; max-width: none; flex: 1 1 0; }
.tab__icon, .tab.is-active .tab__icon { margin: 0; animation: none; }
.tab.is-active .tab__icon svg { animation: pop .35s cubic-bezier(.3, 1.6, .5, 1); }

/* profil : pas d'espace vide au-dessus des onglets (la marge de la barre d'état ne sert qu'une fois collés en haut) */
.pf-view > .icon-tabs { padding-top: 0; top: var(--safe-top); }

/* ==========================================================================
   Échelle typographique plus légère et marges homogènes (gouttière 16 px)
   ========================================================================== */
:root { --gutter: 16px; }
body { font-size: 14.5px; }
.content { padding-left: var(--gutter); padding-right: var(--gutter); }
@media (min-width: 700px) { .content { padding-left: 0; padding-right: 0; } }
.feed, .pf-view { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }
.stories { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
@media (min-width: 700px) { .feed, .pf-view, .stories { margin-left: 0; margin-right: 0; } }
.post { padding: 12px var(--gutter) 8px; }
.notif { padding: 11px var(--gutter); }

/* titres et navigation */
.topbar__title { font-size: 21px; }
.topbar__title small { font-size: 12.5px; }
.brand { font-size: 21px; }
.side-link { font-size: 15px; padding: 10px 14px; gap: 12px; }
.side-link svg { width: 21px; height: 21px; }
.sidebar .btn--lg { height: 46px; font-size: 15px; }
.btn--lg { height: 50px; font-size: 15.5px; }
.btn { font-size: 14px; }
.section-title { font-size: 12px; }
.sheet__head h2 { font-size: 18px; }
.dialog-title { font-size: 18px; }
.empty h3 { font-size: 16.5px; }

/* publications */
.post__body { font-size: 14.5px; line-height: 1.45; margin-top: 6px; }
.post__who .sub { font-size: 12.5px; }
.post .name-line { font-size: 14.5px; }
.post__head .avatar { width: 40px; height: 40px; }
.act { height: 32px; padding: 0 9px; font-size: 13px; }
.act svg { width: 17px; height: 17px; }
.quote-card__body { font-size: 13.5px; }
.train-card__stop b { font-size: 16px; }
.pf__id h1 { font-size: 20px; }
.rb-card h3 { font-size: 15.5px; }

/* Radar : cartes plus sobres, avec de vraies marges */
.feed:has(> .report), .feed:has(> .is-skeleton), #radar-list .feed { margin-left: 0; margin-right: 0; border-top: 0; }
.feed > .report + .report { margin-top: 10px; }
.report { padding: 14px 20px 10px 16px; border-radius: 18px; border: 1px solid var(--border); box-shadow: none; }
.report::after { top: 16px; bottom: 16px; width: 5px; }
.report__name { font-size: 14px; }
.report__handle { font-size: 12px; }
.report__status { height: 22px; font-size: 12px; padding: 0 9px 0 7px; }
.report__status svg { width: 12px; height: 12px; }
.report__line { min-width: 32px; height: 32px; font-size: 17px; border-radius: 8px; }
.report__line.is-long { font-size: 13px; }
.report__title { font-size: 17px; line-height: 1.2; margin-top: 10px; letter-spacing: -.015em; }
.report__body { font-size: 14.5px; line-height: 1.4; margin-top: 4px; font-weight: 400; color: var(--text-2); }
.report__acts { gap: 6px; margin-top: 8px; }
.rc-act { font-size: 13.5px; gap: 6px; }
.rc-act svg { width: 19px; height: 19px; }
.leadz-banner { padding: 10px 12px; }
.leadz-banner b { font-size: 14px; }
.leadz-banner small { font-size: 12px; }
.leadz-banner__ico { width: 34px; height: 34px; border-radius: 11px; }
.leadz-banner__ico svg { width: 19px; height: 19px; }
@media (min-width: 900px) {
  .report__title { font-size: 18px; }
  .report__body { font-size: 14.5px; }
}
.desktop-only.btn--block { height: 42px; font-size: 14.5px; }

/* logos importés : pictogrammes de lignes et logos de réseaux */
.line-icon { display: inline-block; height: 24px; width: auto; max-width: 64px; object-fit: contain; vertical-align: middle; flex: none; }
.line-icon--lg { height: 34px; max-width: 90px; }
.orbit__bubble .line-icon { height: 22px; }
.report__line-icon { flex: none; height: 32px; width: auto; max-width: 72px; object-fit: contain; margin-left: 4px; }
.cluster-logo.has-img { background: #fff; padding: 5px; border: 1px solid var(--border); }
.cluster-logo.has-img img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ==========================================================================
   Ajustements (nov. 2026)
   ========================================================================== */
/* colonne de droite : défilement conservé, barre masquée */
.rightbar { scrollbar-width: none; -ms-overflow-style: none; }
.rightbar::-webkit-scrollbar { display: none; }

/* « Tes clusters » : icône du réseau devant le nom */
.trend--cluster { align-items: center; gap: 10px; }
.trend--cluster .cluster-logo { width: 30px; height: 30px; border-radius: 9px; font-size: 9px; }
.trend--cluster .cluster-logo.has-img { padding: 3px; }
.trend--cluster > b { min-width: 0; }
.trend--cluster > span { flex: none; }

/* Badge Associate (sarcelle) : gestion des clusters */
:root { --associate: #14B8A6; }
.vbadge--associate { color: var(--associate); }
.badges .vb--associate { z-index: 1; }
.badges .vb--insider { z-index: 0; }

/* mobile : publications moins collées aux bords */
@media (max-width: 699px) {
  .post { padding: 16px 20px 14px; }
  .repost-wrap > .post { padding-top: 6px; }
}

/* Statut de présence (façon Discord) : pastille en bas à droite de l'avatar */
.avatar.has-presence { overflow: visible; }
.avatar.has-presence img { border-radius: inherit; }
.presence { --ps: max(10px, 28%); position: absolute; right: -1px; bottom: -1px; width: var(--ps); height: var(--ps); border-radius: 50%; box-sizing: content-box; border: 2.5px solid var(--bg); background: #23A55A; overflow: hidden; pointer-events: none; }
.avatar--xl .presence { right: 3px; bottom: 3px; border-width: 4px; --ps: 22px; }
.presence[data-p="idle"] { background: #F0B232; }
.presence[data-p="idle"]::after { content: ''; position: absolute; width: 62%; height: 62%; left: -8%; top: -8%; border-radius: 50%; background: var(--bg); }
.presence[data-p="dnd"] { background: #F23F43; }
.presence[data-p="dnd"]::after { content: ''; position: absolute; left: 22%; right: 22%; top: 50%; height: 22%; transform: translateY(-50%); border-radius: 3px; background: var(--bg); }
.presence[data-p="offline"] { background: #80848E; }
.presence[data-p="offline"]::after { content: ''; position: absolute; inset: 27%; border-radius: 50%; background: var(--bg); }
.post .presence, .rb-card .presence, .sheet .presence { border-color: var(--surface); }
.presence-menu { display: grid; gap: 4px; }
.presence-menu button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; text-align: left; font-weight: 700; }
.presence-menu button:hover, .presence-menu button.is-active { background: var(--surface-2); }
.presence-menu button small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.presence-menu .presence { position: relative; right: auto; bottom: auto; border-color: var(--surface); flex: none; --ps: 12px; }
.presence-menu .is-active::after { content: '✓'; margin-left: auto; color: var(--accent-text); }
.side-me { cursor: pointer; }
.pf__avatar--me { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 28px; -webkit-tap-highlight-color: transparent; }
.pf__avatar--me:active .avatar { transform: scale(.97); }


/* accueil, connexion, inscription : animations d'entrée et transitions */
.auth-push { animation: auth-push .42s cubic-bezier(.22, .9, .3, 1) both; }
.auth-pop { animation: auth-pop .38s cubic-bezier(.22, .9, .3, 1) both; }
@keyframes auth-push { from { opacity: 0; transform: translateX(48px); } }
@keyframes auth-pop { from { opacity: 0; transform: translateX(-40px); } }

.auth__inner > .row, .auth__inner > h1, .auth__inner > .auth__lead, .auth-form > *, .auth__inner > div:last-child { animation: auth-rise .55s cubic-bezier(.22, .9, .3, 1) both; }
.auth__inner > .row { animation-delay: .05s; }
.auth__inner > h1 { animation-delay: .12s; }
.auth__inner > .auth__lead { animation-delay: .18s; }
.auth-form > :nth-child(1) { animation-delay: .24s; } .auth-form > :nth-child(2) { animation-delay: .3s; }
.auth-form > :nth-child(3) { animation-delay: .36s; } .auth-form > :nth-child(4) { animation-delay: .42s; }
.auth-form > :nth-child(5) { animation-delay: .48s; } .auth-form > :nth-child(n+6) { animation-delay: .54s; }
.auth__inner > div:last-child { animation-delay: .6s; }
@keyframes auth-rise { from { opacity: 0; transform: translateY(16px); } }
.auth__inner > .row img { animation: auth-logo .7s cubic-bezier(.3, 1.5, .5, 1) .1s both; }
@keyframes auth-logo { from { opacity: 0; transform: scale(.4) rotate(-12deg); } }
.auth-back { transition: transform .15s, background .2s; }
.auth-back:active { transform: scale(.9); }
.auth .input { transition: border-color .2s, box-shadow .25s, background .2s; }
.auth .input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); background: #232229; }
.auth .btn { transition: transform .12s, filter .2s, background .2s; }
.auth .btn:active { transform: scale(.97); }
.auth .btn--primary:hover { filter: brightness(1.08); }
.shake { animation: shake .45s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes shake { 15%, 85% { transform: translateX(-2px); } 30%, 70% { transform: translateX(4px); } 45%, 55% { transform: translateX(-6px); } }

.auth__aside > * { animation: auth-rise .7s cubic-bezier(.22, .9, .3, 1) both; }
.auth__aside > :nth-child(2) { animation-delay: .1s; } .auth__aside > :nth-child(3) { animation-delay: .2s; } .auth__aside > :nth-child(4) { animation-delay: .3s; }
.aside-feats li { animation: auth-rise .6s cubic-bezier(.22, .9, .3, 1) both; }
.aside-feats li:nth-child(1) { animation-delay: .3s; } .aside-feats li:nth-child(2) { animation-delay: .4s; } .aside-feats li:nth-child(3) { animation-delay: .5s; }

.auth__title.slide-in > * { display: inline-block; animation: word-in .6s cubic-bezier(.22, .9, .3, 1) calc(var(--i, 0) * 70ms) both; }
.auth__title.slide-in > br { display: initial; animation: none; }
@keyframes word-in { from { opacity: 0; transform: translateY(.45em) rotate(2deg); filter: blur(4px); } }
.auth__lead.slide-in { animation: auth-rise .55s cubic-bezier(.22, .9, .3, 1) .25s both; }
.orbit.slide-in { animation: orbit-in .6s cubic-bezier(.22, .9, .3, 1) both; }
.orbit.slide-in.from-prev { animation-name: orbit-in-prev; }
@keyframes orbit-in { from { opacity: 0; transform: translateX(40px) scale(.94); } }
@keyframes orbit-in-prev { from { opacity: 0; transform: translateX(-40px) scale(.94); } }
.orbit.slide-in .orbit__core { animation: auth-logo .8s cubic-bezier(.3, 1.5, .5, 1) .1s both; }
.orbit.slide-in .orbit__bubble { animation: bubble-in .55s cubic-bezier(.3, 1.4, .5, 1) both, float 5s ease-in-out infinite; }
.orbit.slide-in .orbit__bubble:nth-of-type(4) { animation-delay: .35s, 1s; }
.orbit.slide-in .orbit__bubble:nth-of-type(5) { animation-delay: .5s, 1.6s; }
.orbit.slide-in .orbit__bubble:nth-of-type(6) { animation-delay: .65s, 2.2s; }
@keyframes bubble-in { from { opacity: 0; transform: scale(.4) translateY(10px); } }
.welcome-ctas > * { animation: auth-rise .6s cubic-bezier(.22, .9, .3, 1) both; }
.welcome-ctas > :nth-child(1) { animation-delay: .45s; } .welcome-ctas > :nth-child(2) { animation-delay: .55s; }
.pager i { transition: width .35s cubic-bezier(.3, 1.4, .5, 1), background .3s; }

@media (prefers-reduced-motion: reduce) {
  .auth-push, .auth-pop, .auth *, .auth__title.slide-in > *, .orbit.slide-in, .orbit.slide-in * { animation: none !important; }
}
.birth-field { display: grid; grid-template-columns: .8fr 1.3fr 1fr; gap: 8px; }
.auth .select { background: #1D1C20; border-color: #2E2D33; color: #fff; }
.age-refused { justify-items: center; text-align: center; padding: 24px 0; }
.age-refused p { margin: 0; color: #C9C6CF; font-size: 15px; }
.age-refused__ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: #26252A; color: #fff; }
.age-refused__ico svg { width: 26px; height: 26px; }
.birth-field { grid-template-columns: minmax(92px, .9fr) 1.4fr minmax(96px, 1fr); }

/* ==========================================================================
   Étape 0 : navigation et lisibilité (nov. 2026)
   ========================================================================== */
.mobile-only { display: inline-flex; }
@media (min-width: 900px) { .mobile-only { display: none !important; } }

/* barre du haut des onglets : photo (menu) à gauche, recherche + notifications à droite */
.topbar__actions { display: flex; align-items: center; gap: 6px; flex: none; }
.topbar__actions > span { display: inline-flex; }
.topbar-me { position: relative; flex: none; width: 40px; height: 40px; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.topbar-me .avatar { width: 36px; height: 36px; margin: 2px; }
.topbar-me__menu { position: absolute; left: -3px; bottom: -2px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text); border: 2px solid var(--bg); }
.topbar-me__menu svg { width: 11px; height: 11px; }
.topbar-me .presence { display: none; }
.topbar-me:active { transform: scale(.94); }

/* bouton + unique */
.fab--create[hidden] { display: none !important; }
@media (min-width: 900px) { .fab--create { display: none !important; } }
.create-menu { display: grid; gap: 6px; }
.create-item { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: var(--surface-2); text-align: left; width: 100%; }
.create-item:active { transform: scale(.98); }
.create-item b { display: block; font-size: 15.5px; }
.create-item small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; line-height: 1.35; }
.create-item__ico { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--ci) 16%, transparent); color: var(--ci); }
.create-item__ico svg { width: 22px; height: 22px; }
.create-item .chev { color: var(--muted); width: 18px; height: 18px; }

/* barre latérale : rubrique « Plus » */
.side-title { margin: 14px 14px 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
@media (max-width: 1279px) and (min-width: 900px) { .side-title { display: none; } }

/* menu ☰ : rubriques groupées, chacune avec une phrase d'explication */
.drawer-me { display: flex; align-items: center; gap: 10px; padding: 6px 4px 14px; }
.drawer-status { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 700; }
.drawer-status .presence { position: relative; right: auto; bottom: auto; --ps: 10px; border-color: var(--surface-2); }
.drawer-status svg { width: 14px; height: 14px; color: var(--muted); }
.drawer-group { margin-bottom: 10px; }
.drawer-group__title { margin: 6px 6px 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.drawer-item { align-items: center; }
.drawer-item b { display: block; font-weight: 700; }
.drawer-item small { display: block; font-weight: 500; font-size: 12.5px; color: var(--muted); margin-top: 1px; }

/* profil : boutons avec libellé */
.p-act--labeled { width: auto; padding: 0 14px; gap: 7px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.p-act--labeled svg { width: 18px; height: 18px; }
/* trop de boutons pour tenir à côté de la photo : ils passent sur leur propre ligne, en dessous */
.pf__head { flex-wrap: wrap; }
.pf .profile-actions { flex-wrap: wrap; justify-content: flex-end; flex: 1 1 auto; min-width: 0; }
@media (max-width: 520px) {
  .pf .profile-actions { order: 3; flex-basis: 100%; justify-content: flex-start; margin: 10px 0 0; }
}

/* Mes trajets */
.tj-legend { display: flex; align-items: center; gap: 6px; margin: 2px 2px 12px; flex-wrap: wrap; }
.tj-legend .sev { margin-left: 6px; }
.tj-legend .sev:first-child { margin-left: 0; }
.tj-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px; margin-bottom: 12px; }
.tj-group__head { display: flex; align-items: center; gap: 12px; padding: 2px 2px 10px; }
.tj-group__head b { display: block; }
.tj-group__head small { display: block; color: var(--muted); font-size: 12.5px; }
.tj-group__head .cluster-logo { width: 38px; height: 38px; border-radius: 12px; font-size: 10px; }
.tj-group__head .chev { color: var(--muted); width: 18px; height: 18px; }
.tj-lines { display: grid; gap: 4px; }
.tj-line { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 10px; border-radius: 12px; background: var(--surface-2); }
.tj-line.is-bad { background: color-mix(in srgb, #F59E0B 12%, var(--surface-2)); }
.tj-line__state { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 13px; font-weight: 700; }
.tj-line__state.muted { font-weight: 500; }
.tj-legend .sev, .tj-line .sev { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.sev-0 { background: var(--success); }

/* présentation de la nouvelle navigation */
.nav-intro__row { display: flex; gap: 12px; align-items: flex-start; text-align: left; }
.nav-intro__row b { display: block; }
.nav-intro__row small { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; }
.nav-intro__ico { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent-text); }
.nav-intro__ico svg { width: 20px; height: 20px; }

/* barre d'onglets : le nom sous chaque icône (on sait toujours où l'on va) */
.tab, .tab.is-active { flex-direction: column; gap: 1px; position: relative; }
.tab__icon, .tab.is-active .tab__icon { height: 28px; }
.tab .tab__label, .tab.is-active .tab__label { display: block; padding: 0; font-size: 10.5px; font-weight: 600; letter-spacing: .01em; line-height: 1.1; color: var(--muted); }
.tab.is-active .tab__label { color: var(--accent-text); font-weight: 800; }
.tab .dot-count { position: absolute; top: 6px; left: calc(50% + 8px); }

/* ==========================================================================
   Étape 1 : Mes trajets (nov. 2026)
   ========================================================================== */
.tj-intro { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px dashed var(--border); margin-bottom: 8px; }
.tj-intro__ico { width: 46px; height: 46px; flex: none; border-radius: 15px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.tj-intro__ico svg { width: 24px; height: 24px; }
.tj-intro b { display: block; font-size: 15.5px; }
.tj-intro p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.tj-intro > .grow { flex: 1 1 220px; }
.tj-intro .btn { flex: 1 1 100%; }
@media (min-width: 560px) { .tj-intro .btn { flex: none; } }

.tj-trip { padding: 12px 12px 12px 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); margin-bottom: 10px; cursor: pointer; display: grid; gap: 8px; }
.tj-trip.is-warn { border-color: color-mix(in srgb, var(--warning) 55%, var(--border)); }
.tj-trip.is-bad { border-color: color-mix(in srgb, var(--danger) 60%, var(--border)); }
.tj-trip__head { display: flex; align-items: center; gap: 8px; }
.tj-trip__head b { display: block; font-size: 15.5px; }
.tj-trip__head small { display: block; color: var(--muted); font-size: 12.5px; }
.tj-trip__head .icon-btn.is-on { color: var(--accent-text); }
.tj-trip__route { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; min-width: 0; }
.tj-trip__route span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tj-trip__route svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.tj-trip__lines, .tj-pills, .tj-chosen { display: flex; flex-wrap: wrap; gap: 6px; }
.tj-state { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); }
.tj-state.is-ok { color: var(--success); }
.tj-state.is-warn { color: var(--warning); }
.tj-state.is-bad { color: var(--danger); }
.tj-state .sev { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.tj-chip { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 8px 0 4px; border-radius: 12px; background: var(--surface-2); font-weight: 700; font-size: 13px; border: 2px solid transparent; }
.tj-chip.is-bad { background: color-mix(in srgb, var(--warning) 16%, var(--surface-2)); color: var(--warning); }
.tj-chip.is-on { border-color: var(--accent); }
.tj-chip svg { width: 14px; height: 14px; }
.tj-add { width: 100%; height: 46px; border-radius: 14px; border: 1px dashed var(--border); color: var(--accent-text); font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 6px; }

.tj-form .field > span { font-weight: 700; }
.tj-station { position: relative; }
.tj-station__box { display: flex; align-items: center; gap: 8px; }
.tj-station__box > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.tj-station__box .input { flex: 1; min-width: 0; }
.tj-results { display: grid; gap: 2px; margin-top: 6px; padding: 4px; border-radius: 14px; background: var(--surface-2); max-height: 260px; overflow-y: auto; }
.tj-result { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; text-align: left; width: 100%; }
.tj-result:hover, .tj-result:focus-visible { background: var(--surface-3); }
.tj-result__lines { display: flex; gap: 3px; flex: none; }
.tj-result__lines .line-pill, .tj-result__lines .line-icon { transform: scale(.85); }
.tj-days { display: flex; gap: 6px; }
.tj-days button { flex: 1; height: 40px; border-radius: 12px; background: var(--surface-2); font-weight: 800; }
.tj-days button.is-on { background: var(--accent); color: var(--accent-ink); }
.tj-alert { padding: 10px 0 0; }

/* Info trafic officielle (PRIM) */
.tj-official { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-text); flex: none; }
.tj-official svg { width: 13px; height: 13px; }
.tj-trip__info { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 13px; color: var(--muted); line-height: 1.35; }
.tj-trip__info svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--accent-text); }
.tj-trip__info span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
button.tj-line { width: 100%; text-align: left; }
.tj-line__name { display: grid; min-width: 0; }
.tj-line__name small { color: var(--muted); font-size: 12px; font-weight: 500; }
button.tj-chip { cursor: pointer; }
.tj-dis { padding: 12px; border-radius: 14px; background: var(--surface-2); border-left: 4px solid var(--sv, var(--muted)); display: grid; gap: 4px; }
.tj-dis.is-future { opacity: .75; }
.tj-dis__head { display: flex; gap: 8px; align-items: flex-start; }
.tj-dis__head b { font-size: 14.5px; line-height: 1.3; }
.tj-dis__tag { flex: none; font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--surface-3); }
.tj-dis__msg { margin: 4px 0 0; font-size: 13.5px; line-height: 1.45; white-space: pre-line; }
.tj-official-banner { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; margin-bottom: 10px; border-radius: 16px; text-align: left; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); }
.tj-official-banner > svg:first-child { width: 22px; height: 22px; color: var(--accent-text); flex: none; }
.tj-official-banner b { display: block; }
.tj-official-banner small { display: block; color: var(--muted); font-size: 13px; }
.tj-official-banner .chev { color: var(--muted); width: 18px; height: 18px; }

/* ==========================================================================
   Étape 2 : badges, séries, saisons (nov. 2026)
   ========================================================================== */
.medal { --m1: #CD7F32; --m2: #8A5523; width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--m1) 70%, #fff), var(--m1) 45%, var(--m2)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--m1) 35%, transparent), inset 0 -3px 6px rgba(0,0,0,.25); }
.medal svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.medal--silver { --m1: #B8C1CC; --m2: #6B7785; }
.medal--gold { --m1: #F2C94C; --m2: #A67C00; }
.medal.is-locked { filter: grayscale(1); opacity: .35; }
.medal .line-pill, .medal .line-icon { transform: scale(.85); }
.bk-head { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 10px; }
.bk-stat { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 10px 6px; text-align: center; }
.bk-stat b { display: block; font-size: 19px; }
.bk-stat small { color: var(--muted); font-size: 11.5px; }
.bk-help { margin: 0 2px 6px; }
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.bk-badge { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 14px 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.bk-badge b { font-size: 13.5px; line-height: 1.25; }
.bk-badge small { font-size: 12px; color: var(--muted); line-height: 1.3; }
.bk-badge.is-locked b { color: var(--muted); }
.bk-progress { width: 80%; height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; margin-top: 2px; }
.bk-progress i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.pf-badges { display: flex; align-items: center; gap: 10px; margin: 10px 16px 0; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.pf-badges__medals { display: flex; }
.pf-badges__medals .medal { width: 30px; height: 30px; box-shadow: 0 0 0 2px var(--surface); }
.pf-badges__medals .medal + .medal { margin-left: -8px; }
.pf-badges__medals .medal svg { width: 15px; height: 15px; }
.pf-streak { flex: none; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, #F97316 16%, transparent); color: #F97316; font-size: 13px; }
.pf-badges .chev { width: 18px; height: 18px; color: var(--muted); }
.season-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; margin-bottom: 10px; background: color-mix(in srgb, #F2C94C 14%, var(--surface)); border: 1px solid color-mix(in srgb, #F2C94C 40%, var(--border)); }
.season-banner > svg { width: 24px; height: 24px; color: #D4A20B; flex: none; }
.season-banner b { display: block; }
.season-banner small { color: var(--muted); font-size: 13px; }
.season-past { margin: -2px 0 12px; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.season-past summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.season-past__row { display: grid; gap: 6px; padding: 10px 0 2px; border-top: 1px solid var(--border); margin-top: 10px; }

/* Étapes 3 à 5 : Communauté, invitations, année */
.chal { padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); margin-bottom: 14px; display: grid; gap: 8px; }
.chal__tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--accent-text); text-transform: uppercase; letter-spacing: .04em; }
.chal__tag svg { width: 16px; height: 16px; }
.chal h2 { margin: 0; font-size: 21px; }
.chal p { margin: 0; color: var(--muted); }
.ev { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 8px; }
.ev__date { width: 48px; flex: none; text-align: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); padding: 6px 0; }
.ev__date b { display: block; font-size: 19px; line-height: 1; }
.ev__date small { font-size: 11px; text-transform: uppercase; }
.ev b { display: block; }
.ev p { margin: 4px 0 0; font-size: 13.5px; }
.yr { display: grid; gap: 14px; }
.yr__lead { font-size: 17px; font-weight: 700; margin: 4px 0 0; }
.yr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.yr-tile { padding: 16px 12px; border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--surface)), var(--surface)); border: 1px solid var(--border); }
.yr-tile b { display: block; font-size: 26px; }
.yr-tile small { color: var(--muted); }
.yr__line { margin: 0; }

/* Barre latérale : « Plus » rétractable, profil + cloche, menus façon Discord */
.side-toggle { display: flex; align-items: center; justify-content: space-between; width: calc(100% - 16px); background: none; border: 0; cursor: pointer; padding: 6px 6px; border-radius: 10px; }
.side-toggle:hover { background: var(--surface); }
.side-toggle svg { width: 16px; height: 16px; transition: transform .2s; }
.side-toggle.is-open svg { transform: rotate(180deg); }

.side-more[hidden] { display: none !important; }
.side-me-wrap { margin-top: auto; display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); }
.side-me-wrap .side-me { margin-top: 0; flex: 1; min-width: 0; box-shadow: none; background: none; border: 0; text-align: left; color: inherit; padding: 4px; }
.side-me-wrap .side-me:hover { background: var(--surface-2); }
.side-bell { position: relative; flex: none; }
.side-bell .badge-count { position: absolute; top: -2px; right: -2px; }
.sidebar .side-me-wrap .side-me .meta { min-width: 0; }
.side-pop { position: fixed; z-index: 60; max-height: 70vh; overflow-y: auto; padding: 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 18px 50px rgba(0,0,0,.45); animation: pop .18s ease both; }
.side-pop hr { border: 0; border-top: 1px solid var(--border); margin: 6px 4px; }
.side-pop__me { display: flex; gap: 10px; align-items: center; padding: 8px 8px 10px; }
.side-pop__title { padding: 6px 10px 4px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.side-pop__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 10px; font-weight: 600; text-align: left; background: none; border: 0; color: inherit; cursor: pointer; }
.side-pop__item:hover, .side-pop__item.is-active { background: var(--surface-2); }
.side-pop__item svg { width: 18px; height: 18px; }
.side-pop__item .presence { position: relative; right: auto; bottom: auto; --ps: 10px; border-color: var(--surface); }
.side-pop--notif { width: 360px !important; }
.side-pop__notif { display: flex; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.side-pop__notif:hover { background: var(--surface-2); }
.side-pop__notif.is-unread { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.side-pop__all { justify-content: space-between; color: var(--accent-text); }
.home-seg { margin: 0 0 10px; }

/* correctifs : cloche sur la même ligne que le profil ; « Plus » présenté comme un lien */
.sidebar .side-me-wrap { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; align-items: center; gap: 4px; padding: 6px 8px 6px 6px; border-radius: 999px; }
.sidebar .side-me-wrap .side-me { flex: 1 1 auto; width: auto; display: flex; align-items: center; gap: 10px; border-radius: 999px; margin: 0; }
.sidebar .side-me-wrap .side-bell { flex: 0 0 auto; width: 40px; height: 40px; }
.sidebar .side-toggle { display: flex !important; align-items: center; gap: 12px; width: 100%; margin: 6px 0 2px; padding: 10px 14px; font-size: 15px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--muted); }
.sidebar .side-toggle span { display: inline !important; flex: 1; text-align: left; }
.sidebar .side-toggle svg { width: 20px; height: 20px; }
.sidebar .side-more .side-link { padding-left: 26px; }

/* le « + » d'ajout de story reste au-dessus de la photo */
.story-add { z-index: 2; right: -4px; bottom: -4px; }

/* menus du profil / notifications : apparition légère ; « Créer » collé au-dessus du profil ; « Plus » aligné */
.side-pop { animation: side-pop-in .16s ease-out both; }
@keyframes side-pop-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sidebar > .btn--primary { margin-top: auto; margin-bottom: 12px; }
.sidebar .side-me-wrap { margin-top: 0; }
.sidebar .side-more .side-link { padding-left: 14px; }
