/* brand.css — Politobserve v3 — "Signal" modern theme
   Cool neutrals, near-black ink, single electric indigo accent.
   Edge-to-edge layout, Geist sans, Instrument Serif italic accents. */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&family=Instrument+Serif:ital@0;1&display=swap');

/* ── Palette ── */
.app, .app.light, .app.dark {
  /* Cool neutrals */
  --bg:           #FAFAFA;
  --paper:        #FAFAFA;
  --paper-2:      #F4F4F5;
  --surface:      #FFFFFF;
  --surface-2:    #F4F4F5;
  --surface-3:    #E4E4E7;
  --ink:          #09090B;
  --ink-1:        #09090B;   /* alias of --ink for legacy callers */
  --ink-2:        #27272A;
  --ink-3:        #71717A;
  /* --ink-4 sert à du vrai texte en 10-12 px (dates, compteurs, notes) :
     contraste ≥ 4,5:1 requis (WCAG 1.4.3) sur --surface (#FFF, 5,0:1) comme
     sur --bg (#FAFAFA, 4,8:1). Ce bloc couvrant aussi .app.dark, la valeur
     vaut pour les deux thèmes. */
  --ink-4:        #6E6E77;
  --line:         #E4E4E7;
  --line-2:       #D4D4D8;

  /* Accent d'interface — bleu-ardoise institutionnel (et non l'indigo
     électrique générique). Sobre, éditorial ; le rouge reste réservé à la
     marque, à la Boussole et aux alertes. Les noms de variables sont
     conservés pour ne pas toucher tous les points d'appel. */
  --indigo:       oklch(45% 0.10 250);
  --indigo-2:     oklch(37% 0.11 250);
  --indigo-soft:  oklch(96% 0.022 250);
  --indigo-line:  oklch(89% 0.045 250);

  /* Secondary semantic (kept restrained) */
  --moss:         oklch(58% 0.13 152);
  --moss-soft:    oklch(95% 0.04 152);
  --clay:         oklch(60% 0.20 28);
  --clay-soft:    oklch(95% 0.04 28);

  --accent:       var(--indigo);
  --accent-ink:   #FFFFFF;
  --link:         var(--indigo);

  --pos:          oklch(58% 0.16 150);
  --neg:          oklch(58% 0.21 28);
  --abs:          #71717A;
  --absent:       #D4D4D8;
  --highlight:    oklch(94% 0.10 95);

  --ff-display:   "Geist", system-ui, -apple-system, sans-serif;
  --ff-sans:      "Geist", system-ui, -apple-system, sans-serif;
  --ff-serif:     "Instrument Serif", Georgia, serif;
  --ff-mono:      "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

body {
  font-family: var(--ff-sans);
  background: var(--bg);
  color: var(--ink);
  font-feature-settings: "ss01" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
}

.app { background: var(--bg); color: var(--ink); overflow-x: clip; }

/* ── Edge-to-edge, no boxed paper frame ── */
.app {
  max-width: 100%;
  margin: 0;
  min-height: 100vh;
  position: relative;
  box-shadow: none;
}
body { background: var(--bg); }
body::before { display: none; }

.shell, .shell-narrow {
  max-width: 1200px !important;
  margin: 0 auto;
  padding: 40px 48px 120px !important;
}

/* ── Topbar — minimal, hairline, no parchment ── */
.topbar {
  background: color-mix(in srgb, var(--bg) 80%, transparent) !important;
  border-bottom: 1px solid var(--line) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  padding: 16px 48px !important;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--ff-sans);
  color: var(--ink);
  cursor: pointer;
}
.brand .dot { display: none !important; }
.brand-mark {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink);
  border-radius: 10px;
  position: relative;
}
.brand-mark svg { width: 17px; height: 17px; color: var(--surface); }
.brand-mark::after { display: none; }
.brand-name {
  display: flex; flex-direction: column; line-height: 1;
}
.brand-name b {
  font-family: var(--ff-sans);
  font-weight: 600; font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-style: normal;
}
/* Wordmark « o-loupe » : le mot porte la typo de marque, le o est une lentille. */
.brand-word {
  display: inline-flex; align-items: center;
  font-family: var(--ff-sans); font-weight: 600; font-size: 19px;
  letter-spacing: -0.02em; color: var(--ink); white-space: nowrap;
}
.brand-word .brand-o {
  width: 1.05em; height: 1.05em; margin: 0 0.02em;
  position: relative; top: 0.04em;
}
.brand-name small {
  font-family: var(--ff-sans);
  font-size: 10px; font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 3px;
}
/* Boussole — bannière CTA en tête de home */
.boussole-cta {
  display: flex; align-items: center; gap: 16px;
  margin: 20px 0 8px;
  padding: 16px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, oklch(97% 0.03 25) 0%, oklch(96% 0.05 20) 100%);
  border: 1px solid oklch(88% 0.08 25);
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease;
}
.boussole-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px -10px rgba(237,41,57,0.35);
}
.boussole-cta-ic {
  flex: 0 0 auto;
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ED2939, #c81e2c);
  color: #fff; font-size: 20px;
}
.boussole-cta-txt { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.boussole-cta-txt strong { font-family: var(--ff-sans); font-size: 15px; font-weight: 700; color: var(--ink); }
.boussole-cta-txt span { font-size: 12.5px; color: var(--ink-2); }
.boussole-cta-go {
  flex: 0 0 auto;
  font-family: var(--ff-sans); font-size: 13px; font-weight: 600;
  color: #fff; background: #ED2939;
  padding: 9px 16px; border-radius: 999px; white-space: nowrap;
}
@media (max-width: 640px) {
  .boussole-cta { flex-wrap: wrap; gap: 12px; }
  .boussole-cta-go { width: 100%; text-align: center; }
}

/* Boussole — CTA accentué dans la topbar (accroche grand public) */
.topbar-cta {
  font-family: var(--ff-sans);
  font-size: 13px; font-weight: 700;
  color: #fff !important;
  background: linear-gradient(135deg, #ED2939 0%, #c81e2c 100%);
  padding: 7px 15px !important;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 10px -2px rgba(237,41,57,0.5);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.topbar-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px -2px rgba(237,41,57,0.6);
  filter: brightness(1.05);
}
.topbar-cta.active { filter: brightness(0.92); }

.topbar-link {
  font-family: var(--ff-sans);
  font-size: 13px; font-weight: 500;
  color: var(--ink-3) !important;
  border-radius: 8px;
  position: relative;
}
.topbar-link:hover {
  color: var(--ink) !important;
  background: var(--surface-2) !important;
}
.topbar-link.active {
  color: var(--ink) !important;
  font-weight: 600;
}
.topbar-link.active::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px; bottom: -2px;
  height: 2px;
  background: #ED2939;
  border-radius: 2px;
}
/* Conteneur des liens de nav. Sur desktop : transparent (display:contents) →
   les liens restent des enfants flex de la topbar, layout inchangé. Sur mobile
   (cf. media query) : devient une rangée défilante horizontalement. */
.topbar-nav { display: contents; }

/* ── Hero — éditorial, fond gravure hémicycle ── */
.hero {
  padding-top: 76px !important; padding-bottom: 40px !important;
  position: relative;
  isolation: isolate;            /* contient les blend-modes des pseudo-éléments */
}
/* La signature « hero » (gravure de l'hémicycle) est reproduite sur l'en-tête de
   FICHE (.profile-head) : toutes les pages la portent, pas seulement l'accueil. */
.profile-head { position: relative; isolation: isolate; padding-top: 8px; }
/* Couche gravure XIXᵉ de l'hémicycle (Paris Musées, domaine public). Le blend
   « multiply » fait disparaître le papier de la gravure : seules les lignes
   d'encre subsistent, fondues dans la page. Masque dégradé : la gravure est
   présente à droite/haut et s'efface vers le texte (bas-gauche). */
.hero::before, .profile-head::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  top: -36px; bottom: 10%;
  right: -32px;                       /* bleed léger dans la gouttière du shell */
  width: min(820px, 62%);
  background: url('/assets/hero-hemicycle.jpg') center right / cover no-repeat;
  mix-blend-mode: multiply;
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(102deg, transparent 0%, transparent 28%, rgba(0,0,0,.85) 64%, #000 100%);
          mask-image: linear-gradient(102deg, transparent 0%, transparent 28%, rgba(0,0,0,.85) 64%, #000 100%);
}
/* La fiche est moins haute → gravure un peu plus discrète et resserrée en haut. */
.profile-head::before { opacity: 0.4; bottom: -8%; }
/* Halo « loupe » — accent rouge discret, derrière le titre. */
.hero::after {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  width: 560px; height: 560px; border-radius: 50%;
  top: -160px; right: 14%;
  background: radial-gradient(circle, rgba(237,41,57,.14), rgba(237,41,57,0) 62%);
}
.app.dark .hero::before, .app.dark .profile-head::before { mix-blend-mode: screen; opacity: 0.16; }
.hero > *, .profile-head > * { position: relative; z-index: 1; }

.hero h1 {
  font-family: var(--ff-sans) !important;
  font-weight: 600 !important;
  letter-spacing: -0.038em !important;
  color: var(--ink) !important;
  font-size: clamp(48px, 7.6vw, 100px) !important;
  line-height: 0.94 !important;
  text-wrap: balance;
  margin: 0 0 26px !important;
}
.hero h1 em {
  font-family: var(--ff-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
}
/* « loupe » : le seul mot accentué en rouge (le concept). Ciblé via le dernier em. */
.hero h1 em:last-of-type { color: #ED2939; }
/* Loupe graphique en transparence DERRIÈRE le mot « politique » : renforce le
   concept « la politique à la loupe ». Dimensionnée en em → suit le clamp du H1.
   z-index négatif dans le contexte d'empilement du H1 : passe sous le texte
   mais reste au-dessus de la gravure de l'hémicycle. */
.hero h1 .loupe-word { position: relative; display: inline-block; }
.hero h1 .loupe-deco {
  position: absolute; z-index: -1; pointer-events: none; overflow: visible;
  width: 1.34em; height: 1.34em;
  left: 44%; top: 50%;
  transform: translate(-50%, -52%) rotate(-9deg);
  opacity: 0.17;
}
.app.dark .hero h1 .loupe-deco { opacity: 0.32; }
.hero p.lede {
  font-family: var(--ff-sans) !important;
  font-size: 17.5px; line-height: 1.5;
  color: var(--ink-2);
  max-width: 540px;
  font-weight: 400;
  margin: 0 0 28px;
}

/* ── Search bar ── */
.search-wrap {
  border: 1px solid var(--line-2) !important;
  background: var(--surface) !important;
  border-radius: 14px !important;
  padding: 6px 6px 6px 20px !important;
  transition: border-color .15s, box-shadow .15s;
  box-shadow: 0 1px 2px rgba(9, 9, 11, 0.04);
}
.search-wrap:focus-within {
  border-color: var(--indigo) !important;
  box-shadow: 0 0 0 4px var(--indigo-soft) !important;
}
.search-wrap svg.search-ic { color: var(--ink-3); }
.search-wrap input {
  font-family: var(--ff-sans);
  font-size: 16px; font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.search-wrap input::placeholder { color: var(--ink-4); }
.search-wrap .kbd {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-3);
  font-family: var(--ff-mono);
  font-size: 11px;
  border-radius: 6px;
}

/* ── Filters ── */
.filter-group {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  color: var(--ink) !important;
  font-family: var(--ff-sans);
  font-weight: 500;
  font-size: 13px;
  transition: border-color .12s, background .12s;
}
.filter-group:hover {
  border-color: var(--ink-3) !important;
  background: var(--surface-2) !important;
}
.filter-group .lab { color: var(--ink-3); }
.filter-group .count {
  background: var(--indigo) !important;
  color: var(--surface) !important;
  font-family: var(--ff-mono);
  font-weight: 500;
}
.filter-pop {
  border-radius: 12px !important;
  border-color: var(--line-2) !important;
  box-shadow: 0 16px 48px -16px rgba(9, 9, 11, 0.18) !important;
}

/* ── Cards (search results) ── */
.card {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  transition: transform .2s cubic-bezier(.2,.7,.3,1), border-color .15s, box-shadow .2s;
}
.card:hover {
  border-color: var(--ink) !important;
  box-shadow: 0 16px 40px -20px rgba(9, 9, 11, 0.22);
  transform: translateY(-2px);
}
.card .name {
  font-family: var(--ff-sans) !important;
  font-weight: 600;
  font-size: 18px !important;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.card .meta { color: var(--ink-3); font-size: 12px; }

/* ── Tabs ── */
.tab {
  font-family: var(--ff-sans) !important;
  font-weight: 500 !important;
  color: var(--ink-3) !important;
  border-bottom: 2px solid transparent !important;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.tab:hover { color: var(--ink-2) !important; }
.tab.active {
  color: var(--ink) !important;
  border-bottom-color: var(--ink) !important;
}
.tab .badge {
  background: var(--surface-2) !important;
  color: var(--ink-3) !important;
  font-family: var(--ff-mono);
  font-weight: 500;
  border-radius: 6px;
  padding: 1px 6px;
}
.tab.active .badge {
  background: var(--ink) !important;
  color: var(--surface) !important;
}

/* ── Profile head ── */
.profile-head h1 {
  font-family: var(--ff-sans) !important;
  font-weight: 600 !important;
  letter-spacing: -0.035em !important;
  color: var(--ink) !important;
  font-size: clamp(36px, 5vw, 60px) !important;
  line-height: 1 !important;
}
.profile-head .photo {
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 2px rgba(9,9,11,0.04),
              0 12px 32px -16px rgba(9, 9, 11, 0.18) !important;
  overflow: hidden;
}
.profile-head .subline { color: var(--ink-3); }
.profile-head .mandate-line {
  font-family: var(--ff-sans);
  font-weight: 500;
  color: var(--ink-2);
}
.profile-head .bio {
  font-family: var(--ff-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* ── Stats strip ── */
.stats-strip {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(9,9,11,0.03);
}
.stat-cell {
  padding: 22px 24px !important;
  border-right: 1px solid var(--line) !important;
}
.stat-cell:last-child { border-right: none !important; }
.stat-cell .val {
  font-family: var(--ff-sans) !important;
  font-weight: 600 !important;
  font-size: 30px !important;
  letter-spacing: -0.035em;
  color: var(--ink);
  font-feature-settings: "tnum" 1, "ss01" 1;
}
.stat-cell .lab {
  font-family: var(--ff-sans);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 10px;
  color: var(--ink-3);
  font-weight: 500;
}

/* ── Section headers ── */
.section-h {
  font-family: var(--ff-sans) !important;
  font-weight: 600 !important;
  font-size: 22px !important;
  letter-spacing: -0.025em;
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding-top: 36px !important;
  margin-top: 40px !important;
}
.section-h .count {
  font-family: var(--ff-mono);
  color: var(--ink-4);
  font-size: 12px;
  font-weight: 400;
  margin-left: 8px;
}

/* ── Buttons ── */
.btn {
  font-family: var(--ff-sans);
  font-weight: 500;
  font-size: 13px;
  border-radius: 10px !important;
  background: var(--surface);
  border: 1px solid var(--line-2);
  color: var(--ink);
  transition: background .12s, border-color .12s, transform .1s;
  padding: 8px 14px;
}
.btn:hover {
  background: var(--surface-2);
  border-color: var(--ink-3);
  color: var(--ink);
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink) !important;
  border-color: var(--ink) !important;
  color: var(--surface) !important;
}
.btn-primary:hover {
  background: var(--indigo) !important;
  border-color: var(--indigo) !important;
}

/* ── Vote / list rows ── */
.vote-row, .list-row {
  border-top: 1px solid var(--line) !important;
  border-bottom: 0 !important;
  transition: background .1s;
}
.vote-row:hover, .list-row:hover { background: var(--surface-2) !important; }
.vote-title, .list-row .title {
  font-family: var(--ff-sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.4;
}
.vote-row .vote-date,
.list-row .date {
  font-family: var(--ff-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-4);
}

/* ── Modal ── */
.modal {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  box-shadow: 0 40px 80px -20px rgba(9, 9, 11, 0.35) !important;
}
.modal h2 {
  font-family: var(--ff-sans) !important;
  font-weight: 600 !important;
  font-size: 26px !important;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.2;
}

/* ── Timeline (prises de position) ── */
.timeline::before { background: var(--line) !important; }
.stmt:hover { background: var(--surface-2); }
.stmt-glyph {
  box-shadow: 0 0 0 4px var(--bg) !important;
  font-family: var(--ff-sans) !important;
  font-weight: 600;
}
.stmt-title {
  font-family: var(--ff-sans) !important;
  font-weight: 500 !important;
  font-size: 18px !important;
  letter-spacing: -0.02em;
  color: var(--ink) !important;
  line-height: 1.35;
}
.stmt-excerpt {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
}
.stmt-date {
  color: var(--ink-4) !important;
  font-family: var(--ff-mono) !important;
}

/* ── Sources / links ── */
.src-link {
  color: var(--indigo) !important;
  font-weight: 500;
  border-bottom-color: var(--indigo-line) !important;
  transition: color .1s, border-color .1s;
}
.src-link:hover {
  color: var(--indigo-2) !important;
  border-bottom-color: var(--indigo) !important;
}
.src-link-strong {
  background: var(--indigo-soft) !important;
  border-color: var(--indigo-line) !important;
  color: var(--indigo-2) !important;
  border-radius: 10px !important;
  font-weight: 500;
}
.src-link-strong:hover {
  background: var(--indigo) !important;
  color: var(--surface) !important;
  border-color: var(--indigo) !important;
}

/* ── Décryptage / Déchiffrage — la valeur éditoriale, mise en avant ──────────
   Déclencheur « loupe » cohérent partout (fiche, scrutins, séances, comparateur,
   lois) + carte premium pour le contenu déplié. */
.dec-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--indigo-line);
  background: var(--indigo-soft);
  color: var(--indigo-2);
  border-radius: 999px;
  padding: 6px 13px 6px 10px;
  font-family: var(--ff-sans); font-size: 12.5px; font-weight: 500;
  line-height: 1; cursor: pointer; white-space: nowrap;
  transition: background .14s, border-color .14s, box-shadow .14s, transform .1s, color .14s;
}
.dec-trigger b { font-weight: 700; }
.dec-trigger .dec-trigger-cta { font-weight: 500; opacity: .72; }
.dec-trigger:hover {
  background: #fff; border-color: var(--indigo); color: var(--indigo-2);
  box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--indigo) 45%, transparent);
  transform: translateY(-1px);
}
.dec-trigger.open { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.dec-trigger.open .dec-trigger-cta { opacity: .85; }

.dec-block {
  margin: 10px 0 12px; padding: 16px 18px;
  border: 1px solid var(--indigo-line);
  border-left: 3px solid var(--indigo);
  border-radius: 12px;
  background:
    radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--indigo) 8%, transparent), transparent 58%),
    var(--surface);
  font-size: 13.5px; line-height: 1.6; color: var(--ink-2);
  box-shadow: 0 1px 2px rgba(9,9,11,0.04);
}
.dec-block-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid var(--indigo-line);
}
.dec-block-badge {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--indigo-2); font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: .06em; font-family: var(--ff-mono);
}
.dec-block-sub { color: var(--ink-3); font-size: 12px; font-style: italic; }

/* ── Program tab ── */
.program-head {
  background: var(--ink) !important;
  border: 1px solid var(--ink) !important;
  color: var(--surface) !important;
  border-radius: 16px !important;
}
.program-head .program-meta,
.program-head .program-elec,
.program-head .program-year { color: rgba(255,255,255,0.65) !important; }
.program-head .program-title {
  color: var(--surface) !important;
  font-family: var(--ff-sans) !important;
  font-weight: 600 !important;
  font-size: 32px !important;
  letter-spacing: -0.035em;
  font-style: normal;
}
.program-head .program-title em {
  font-family: var(--ff-serif);
  font-style: italic;
  font-weight: 400;
  color: oklch(78% 0.18 264);
}
.program-head .src-link-strong {
  background: rgba(255,255,255,0.12) !important;
  color: var(--surface) !important;
  border-color: rgba(255,255,255,0.18) !important;
}
.program-head .src-link-strong:hover {
  background: var(--indigo) !important;
  border-color: var(--indigo) !important;
}
.program-theme {
  font-family: var(--ff-sans) !important;
  color: var(--ink-3) !important;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px !important;
  font-weight: 500;
}
.promise {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
}
.pst-pos     { background: var(--moss-soft) !important; color: oklch(40% 0.13 152) !important; }
.pst-mid     { background: oklch(95% 0.08 95) !important; color: oklch(45% 0.13 70) !important; }
.pst-neg     { background: var(--clay-soft) !important; color: oklch(42% 0.18 28) !important; }
.pst-neutral { background: var(--surface-2) !important; color: var(--ink-3) !important; border: 1px solid var(--line) !important; }

/* ── Alignment / charts ── */
.align-card, .vote-chart {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
}
.bars-row .bar {
  background: var(--indigo) !important;
  border-radius: 4px;
}
.bars-bar { border-radius: 4px !important; }

/* ── Chips & tags ── */
.tag {
  background: var(--surface-2) !important;
  color: var(--ink-3) !important;
  font-family: var(--ff-mono);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 500;
}

/* ── Divider ── */
.divider { background: var(--line) !important; }

/* ── Tweaks panel ── */
.tp-panel {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  font-family: var(--ff-sans);
  box-shadow: 0 24px 60px -20px rgba(9, 9, 11, 0.25);
}
.tp-title {
  color: var(--ink) !important;
  font-family: var(--ff-sans) !important;
  font-weight: 600 !important;
  font-style: normal;
  font-size: 18px !important;
  letter-spacing: -0.02em;
}

/* ── Back link ── */
.back {
  font-family: var(--ff-sans);
  font-weight: 500;
  font-size: 13px;
  color: var(--ink-3);
  border-radius: 8px;
}
.back:hover {
  background: var(--surface-2);
  color: var(--ink);
}

/* ── Autocomplete ── */
.ac {
  border-radius: 14px !important;
  border-color: var(--line-2) !important;
  box-shadow: 0 16px 48px -16px rgba(9, 9, 11, 0.18) !important;
}
.ac-row .ac-name {
  font-family: var(--ff-sans);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* ── Mobile ── */
@media (max-width: 720px) {
  .topbar { padding: 12px 16px !important; }
  .brand-name b { font-size: 17px; }
  .brand-name small { font-size: 9px; }
  .brand-mark { width: 28px; height: 28px; border-radius: 8px; }
  .brand-mark svg { width: 15px; height: 15px; }
  .shell, .shell-narrow { padding: 20px 18px 80px !important; }
  .hero { padding-top: 28px !important; }
  .hero h1 { font-size: clamp(36px, 11vw, 52px) !important; }
  .hero p.lede { font-size: 15px; }
  /* Gravure du hero/fiche : un peu plus discrète et recadrée sur petit écran */
  .hero::before, .profile-head::before { width: 78vw !important; opacity: 0.32 !important; top: -16px !important; }
  .hero::after { right: -10% !important; }
  /* Footer : colonnes empilées sur mobile */
  .footer-cols { grid-template-columns: 1fr 1fr !important; gap: 24px !important; }
  .section-h { font-size: 19px !important; padding-top: 24px !important; margin-top: 24px !important; }
  .card .name { font-size: 17px !important; }
  .profile-head h1 { font-size: 32px !important; }
  .stat-cell { padding: 16px 14px !important; }
  .stat-cell .val { font-size: 22px !important; }
  .stmt-title { font-size: 16px !important; }
  .modal h2 { font-size: 22px !important; }
  .program-head .program-title { font-size: 24px !important; }

  /* Topbar : la nav devient une rangée défilante horizontalement (2ᵉ ligne),
     plutôt que de déborder ou de s'empiler sur plusieurs lignes. */
  .topbar-nav {
    display: flex; flex: 1 1 100%;
    gap: 2px; margin-top: 2px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .topbar-nav::-webkit-scrollbar { display: none; }
  .topbar-link { flex: 0 0 auto; font-size: 12px !important; padding: 7px 10px !important; }
  .topbar-cta { font-size: 12px !important; padding: 7px 13px !important; }
}

/* ── Très petits écrans ── */
@media (max-width: 480px) {
  .shell, .shell-narrow { padding: 16px 14px 72px !important; }
  /* Footer : une seule colonne */
  .footer-cols { grid-template-columns: 1fr !important; gap: 16px !important; }
  /* Hero : la loupe reste lisible mais resserrée */
  .hero h1 .loupe-deco { opacity: 0.14; }
}
