/* Opinion Radar — design system partagé pour les pages de démonstration.
   Deux thèmes (politique / marque) via la classe sur <body>. */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --ink: #181b22;
  --muted: #5c6472;
  --faint: #8a93a3;
  --line: #e7e9ee;
  --good: #1f9d6b;
  --good-soft: #e7f6ef;
  --warn: #bd7b15;
  --warn-soft: #fbf2e0;
  --bad: #cf4242;
  --bad-soft: #fae9e9;
  --accent: #2d3e64;
  --accent-soft: #eef1f8;
  --accent-ink: #2d3e64;
  --shadow: 0 1px 2px rgba(20, 25, 40, .04), 0 8px 24px rgba(20, 25, 40, .06);
  --radius: 16px;
  --radius-sm: 10px;
}

/* `.theme-brand` (et non `body.theme-brand`) : scopable à un sous-arbre (ex. le rapport) sans
   teinter le chrome app (sidebar). `<body class="theme-brand">` reste matché. */
.theme-brand {
  --accent: #b9651b;
  --accent-soft: #fbf1e6;
  --accent-ink: #9a5114;
}

/* `.theme-political` : ton « renseignement », sobre — l'accent navy (= défaut :root), posé
   explicitement pour scoper le rapport d'un archétype « personne » (cf. docs/ARCHETYPES.md). */
.theme-political {
  --accent: #2d3e64;
  --accent-soft: #eef1f8;
  --accent-ink: #2d3e64;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -.01em; }
.brand .brand-mark { width: 24px; height: 24px; flex: none; display: block; }
.brand .demo-badge {
  font-size: 11px; font-weight: 600; color: var(--faint);
  border: 1px solid var(--line); border-radius: 20px; padding: 2px 8px; margin-left: 4px;
}
.nav { margin-left: auto; display: flex; gap: 6px; }
.nav a {
  font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none;
  padding: 6px 12px; border-radius: 20px; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--accent-soft); color: var(--accent-ink); }

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--surface) 0%, var(--accent-soft) 100%);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 48px;
}
.hero .wrap { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.kicker {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-ink);
}
.hero h1 {
  font-size: 34px; line-height: 1.18; letter-spacing: -.02em; margin: 14px 0 12px;
  max-width: 19ch;
}
.hero p.lede { font-size: 16px; color: var(--muted); max-width: 46ch; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chip {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; font-size: 13px; color: var(--muted);
}
.chip b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Gauge */
.gauge { text-align: center; }
.gauge svg { display: block; }
.gauge .score-num { font-size: 30px; font-weight: 800; fill: var(--ink); }
.gauge .score-den { font-size: 13px; font-weight: 600; fill: var(--faint); }
.gauge .label { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.gauge .rank { margin-top: 2px; font-size: 13px; color: var(--accent-ink); font-weight: 700; }

/* Sections */
section.block { padding: 40px 0; border-bottom: 1px solid var(--line); }
.sec-kicker { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.sec-title { font-size: 21px; letter-spacing: -.01em; margin: 6px 0 22px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card h3 { font-size: 15px; margin-bottom: 14px; }
.card .sub { font-size: 13px; color: var(--muted); margin-bottom: 16px; }

/* Attribute tags */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 20px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}
.tag.neg { background: var(--warn-soft); border-color: transparent; color: var(--warn); }

/* Sentiment meter */
.meter { margin-top: 18px; }
.meter .meter-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.meter .track { height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; }
.meter .fill { height: 100%; border-radius: 6px; background: var(--good); }

/* Verbatim */
.quote {
  margin-top: 18px; padding: 14px 16px; background: var(--surface-2);
  border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0;
}
.quote p { font-style: italic; font-size: 14px; color: var(--ink); }
.quote cite { display: block; margin-top: 8px; font-style: normal; font-size: 12px; font-weight: 600; color: var(--faint); }

/* Tone indicator */
.tone { margin-top: 16px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.tone .badge-half { font-weight: 700; color: var(--warn); }

/* Share of voice bars */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 96px 1fr 42px; align-items: center; gap: 12px; }
.bar-row .name { font-size: 13px; font-weight: 600; color: var(--muted); text-align: right; }
.bar-row.you .name { color: var(--accent-ink); }
.bar-row .bar-track { height: 22px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.bar-row .bar-fill { height: 100%; background: #c7cdd8; border-radius: 6px; }
.bar-row.you .bar-fill { background: var(--accent); }
.bar-row .val { font-size: 13px; font-weight: 700; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
/* Présence par angle : labels multi-mots (≠ noms courts de part de voix) → colonne large, à gauche. */
.bars.by-angle .bar-row { grid-template-columns: minmax(140px, 40%) 1fr 44px; }
.bars.by-angle .name { text-align: left; }
.bars.by-angle .name .tag { margin-left: 6px; }

.callout {
  margin-top: 18px; padding: 14px 16px; border-radius: 12px;
  background: var(--accent-soft); font-size: 14px; color: var(--accent-ink); font-weight: 600;
  display: flex; gap: 10px; align-items: flex-start;
}
.callout .flag { flex: none; }

/* Terrain / occasion columns */
.col { border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.col .col-top { height: 4px; }
.col.good .col-top { background: var(--good); }
.col.warn .col-top { background: var(--warn); }
.col.bad .col-top { background: var(--bad); }
.col .col-body { padding: 18px 20px; }
.col .col-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; margin-bottom: 14px; }
.col.good .col-label { color: var(--good); }
.col.warn .col-label { color: var(--warn); }
.col.bad .col-label { color: var(--bad); }
.col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.col li { font-size: 14px; color: var(--ink); padding-left: 16px; position: relative; }
.col li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.col li small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* Tipping point */
.tip-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tip-card { border-radius: var(--radius); padding: 18px 20px; border: 1px solid var(--line); background: var(--surface); }
.tip-card.in { border-left: 4px solid var(--good); }
.tip-card.out { border-left: 4px solid var(--bad); }
.tip-card .q { font-size: 15px; color: var(--ink); margin-bottom: 12px; }
.tip-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.tip-badge.in { background: var(--good-soft); color: var(--good); }
.tip-badge.out { background: var(--bad-soft); color: var(--bad); }
.tip-note { margin-top: 18px; font-size: 15px; color: var(--ink); }
.tip-note b { color: var(--accent-ink); }

/* Fact-check / risk list */
.facts { display: flex; flex-direction: column; gap: 12px; }
.fact { display: flex; gap: 14px; padding: 16px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.fact .src { flex: none; font-size: 12px; font-weight: 700; color: var(--muted); width: 74px; }
.fact .txt { font-size: 14px; color: var(--ink); }
.fact.alert { background: var(--bad-soft); border-color: transparent; }
.fact.alert .src { color: var(--bad); }
.fact.alert .txt b { color: var(--bad); }

/* Actions */
.actions { counter-reset: a; display: flex; flex-direction: column; gap: 12px; }
.action { display: flex; gap: 16px; align-items: flex-start; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.action::before {
  counter-increment: a; content: counter(a);
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: 14px;
  display: grid; place-items: center;
}
.action p { font-size: 14px; color: var(--ink); }

.frame-note { font-size: 13px; color: var(--muted); margin-bottom: 18px; max-width: 60ch; }

/* Footer */
footer { padding: 32px 0 64px; }
footer .wrap { font-size: 12.5px; color: var(--faint); }
footer .disclaimer { padding: 14px 16px; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .tip-pair { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
}

/* ==========================================================================
   SYSTÈME WEB — ajouts post-maquettes (app + public). Tokens & esthétique
   hérités ci-dessus. Source de vérité : DESIGN.md. Rendu vivant : /styleguide.
   ========================================================================== */

/* Boutons (les maquettes étaient statiques : aucun bouton n'était défini) */
.btn { display:inline-flex; align-items:center; gap:8px; font-size:14px; font-weight:600;
  padding:9px 16px; border-radius:var(--radius-sm); border:1px solid transparent;
  cursor:pointer; text-decoration:none; transition:background .15s, border-color .15s, filter .15s; }
.btn-primary { background:var(--accent); color:#fff; }
.btn-primary:hover { filter:brightness(1.07); }
.btn-ghost { background:var(--surface); border-color:var(--line); color:var(--ink); }
.btn-ghost:hover { background:var(--surface-2); }
.btn-sm { padding:6px 12px; font-size:13px; }
.btn-danger { background:var(--bad); color:#fff; }
.btn-danger:hover { filter:brightness(1.07); }
.site-header .cta-group { display:flex; gap:10px; align-items:center; margin-left:14px; }

/* ---- Shell APP : sidebar calme + contenu ---- */
.app { display:grid; grid-template-columns:248px 1fr; min-height:100vh; }
.app-sidebar { background:var(--surface); border-right:1px solid var(--line); padding:16px 12px;
  display:flex; flex-direction:column; gap:2px; }
.app-sidebar .brand { padding:6px 10px 14px; }
.app-nav-label { font-size:11px; font-weight:700; letter-spacing:.07em; text-transform:uppercase;
  color:var(--faint); padding:14px 10px 4px; }
.app-nav-item { display:flex; align-items:center; justify-content:space-between; gap:8px;
  font-size:14px; font-weight:600; color:var(--muted); text-decoration:none;
  padding:8px 10px; border-radius:var(--radius-sm); }
.app-nav-item:hover { background:var(--surface-2); color:var(--ink); }
.app-nav-item.active { background:var(--accent-soft); color:var(--accent-ink); }
.app-nav-item .pill { font-size:12px; font-weight:700; }
.app-main { padding:28px 32px; max-width:1040px; }
.app-spacer { margin-top:auto; }
/* Sidebar app : pill de présence, bloc compte, pied (langue + déconnexion). */
.app-nav-item .pill { color:var(--faint); font-variant-numeric:tabular-nums; }
.app-nav-item.add { color:var(--accent-ink); }
.app-account { border-top:1px solid var(--line); margin-top:8px; padding:12px 10px 4px; font-size:13px; color:var(--muted); }
.app-account .email { color:var(--ink); font-weight:600; word-break:break-word; }
.app-foot { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:6px 10px; }
.app-foot .lang-switch { margin:0; }
.app-foot form { margin:0; }

/* ---- Carte radar (liste / accueil app) ---- */
.radar-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(230px,1fr)); gap:16px; }
.radar-card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  padding:18px 20px; box-shadow:var(--shadow); text-decoration:none; color:inherit; display:block;
  transition:border-color .15s; }
.radar-card:hover { border-color:var(--accent); }
.radar-card .rc-name { font-size:15px; font-weight:700; }
.radar-card .rc-row { display:flex; align-items:center; justify-content:space-between; margin-top:12px; }
.radar-card .rc-score { font-size:26px; font-weight:800; font-variant-numeric:tabular-nums; }
.rc-trend { font-size:13px; font-weight:700; }
.rc-trend.up { color:var(--good); } .rc-trend.down { color:var(--bad); } .rc-trend.flat { color:var(--faint); }

/* ---- Sparkline ---- */
.spark { display:inline-block; vertical-align:middle; }
.spark polyline { fill:none; stroke:var(--accent); stroke-width:2; stroke-linejoin:round; stroke-linecap:round; }

/* ---- Mesure en cours (run timeline + coût live) ---- */
.run { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  padding:24px; box-shadow:var(--shadow); }
.run-steps { display:flex; margin:20px 0 16px; }
.run-step { flex:1; text-align:center; position:relative; font-size:12.5px; color:var(--muted); }
.run-step .dot { width:16px; height:16px; border-radius:50%; background:var(--line);
  margin:0 auto 8px; position:relative; z-index:1; }
.run-step.done .dot { background:var(--good); }
.run-step.active .dot { background:var(--accent); box-shadow:0 0 0 4px var(--accent-soft); }
.run-step::before { content:""; position:absolute; top:7px; left:-50%; width:100%; height:2px; background:var(--line); }
.run-step:first-child::before { display:none; }
.run-step.done::before, .run-step.active::before { background:var(--good); }
.run-models { display:flex; flex-wrap:wrap; gap:8px; font-size:13px; color:var(--muted); margin:8px 0 16px; }
.run-cost { display:flex; justify-content:space-between; font-size:13px; color:var(--muted);
  border-top:1px solid var(--line); padding-top:14px; }
.run-cost b { color:var(--ink); font-variant-numeric:tabular-nums; }

/* ---- "Ce qui a bougé" (monitoring) ---- */
.changed { display:flex; flex-direction:column; gap:10px; }
.changed-row { display:grid; grid-template-columns:20px 1fr auto; gap:10px; align-items:baseline; font-size:14px; }
.changed-row .ar { font-weight:800; }
.changed-row.up .ar { color:var(--good); } .changed-row.down .ar { color:var(--bad); } .changed-row.flat .ar { color:var(--faint); }
.changed-row .val { font-variant-numeric:tabular-nums; color:var(--muted); }

/* ---- État vide (chaleur + action principale) ---- */
.empty { text-align:center; padding:40px 20px; max-width:520px; margin:0 auto; }
.empty h3 { font-size:18px; margin-bottom:8px; }
.empty p { color:var(--muted); margin-bottom:18px; }

/* ---- Public : observatoire (classement AEO-friendly) ---- */
.ranking { width:100%; border-collapse:collapse; background:var(--surface);
  border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
.ranking th, .ranking td { text-align:left; padding:11px 14px; border-bottom:1px solid var(--line); font-size:14px; }
.ranking tr:last-child td { border-bottom:none; }
.ranking th { font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--faint); }
.ranking td.rank { font-weight:800; color:var(--accent-ink); width:44px; }
.ranking td.num { text-align:right; font-variant-numeric:tabular-nums; }
.methodo { font-size:13px; color:var(--muted); background:var(--surface-2);
  border:1px dashed var(--line); border-radius:12px; padding:14px 16px; }
.claim-cta { background:var(--accent-soft); border-radius:var(--radius); padding:20px 24px;
  display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.claim-cta p { color:var(--accent-ink); font-weight:600; }

/* ---- Badge embeddable ---- */
.badge-embed { display:inline-flex; align-items:center; gap:8px; background:var(--surface);
  border:1px solid var(--line); border-radius:10px; padding:8px 12px; font-size:13px; box-shadow:var(--shadow); }
.badge-embed .dot { width:10px; height:10px; border-radius:50%; background:var(--accent); }
.badge-embed b { font-variant-numeric:tabular-nums; }

/* ---- Page /styleguide (dev) ---- */
.sg-section { padding:30px 0; border-bottom:1px solid var(--line); }
.sg-section > h2 { font-size:13px; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:var(--faint); margin-bottom:18px; }
.swatches { display:flex; flex-wrap:wrap; gap:14px; }
.swatch { width:118px; font-size:12px; }
.swatch .chip-color { height:46px; border-radius:10px; border:1px solid var(--line); margin-bottom:6px; }
.swatch code { font-size:11px; color:var(--muted); }
.sg-row { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }

/* ---- Responsive app : la sidebar devient une barre supérieure compacte ---- */
@media (max-width:820px) {
  .app { grid-template-columns:1fr; }
  .app-sidebar { flex-direction:row; align-items:center; flex-wrap:nowrap; gap:4px;
    overflow-x:auto; padding:8px 10px;
    border-right:none; border-bottom:1px solid var(--line); }
  /* En ligne, chaque item garde sa taille : sinon le bloc compte (email + word-break)
     s'effondre à quelques px de large et s'empile sur des centaines de px de haut. */
  .app-sidebar > * { flex:none; }
  .app-sidebar .brand { padding:6px 8px; white-space:nowrap; }
  .app-nav-item { white-space:nowrap; padding:8px 10px; }
  /* En barre : label de section, ressort et bloc compte (email) n'ont pas leur place. */
  .app-sidebar .app-nav-label, .app-spacer, .app-account { display:none; }
  .app-foot { gap:10px; padding:6px 8px; }
  /* Marges latérales resserrées : 64px de padding mangent un écran de 390px. */
  .app-main { padding:20px 16px; }
}

/* ---- Responsive : contenu de rapport sur petit écran (app + page publique) ---- */
@media (max-width:560px) {
  .wrap { padding:0 16px; }
  section.block { padding:28px 0; }
  .card { padding:18px 16px; }
}

/* Polish : le brand est un lien — pas de soulignement, couleur d'encre. */
.site-header .brand { color: var(--ink); text-decoration: none; }
.site-header .nav a, .site-header .cta-group a { text-decoration: none; }

/* ── Auth (Phase 1) : formulaires inscription / connexion ─────────────────── */
.auth-wrap { display:flex; justify-content:center; }
.auth-card { width:100%; max-width:420px; }
.form { display:flex; flex-direction:column; gap:14px; margin-top:4px; }
.field { display:flex; flex-direction:column; gap:6px; }
.field > span { font-size:13px; font-weight:600; color:var(--muted); }
.field input, .field textarea, .field select {
  font:inherit; font-size:14px; color:var(--ink); background:var(--surface);
  border:1px solid var(--line); border-radius:var(--radius-sm); padding:10px 12px; outline:none;
  width:100%; box-sizing:border-box; }
.field textarea { resize:vertical; line-height:1.5; min-height:44px; }
/* Carte d'édition (ex. moments) : rythme vertical régulier entre les groupes de champs. */
.moment { display:flex; flex-direction:column; gap:14px; }
.field input::placeholder, .field textarea::placeholder { color:var(--muted); opacity:.7; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color:var(--accent); box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.form .btn { margin-top:4px; justify-content:center; }
.form-error { background:color-mix(in srgb, var(--bad) 10%, transparent); color:var(--bad);
  border:1px solid color-mix(in srgb, var(--bad) 30%, transparent);
  border-radius:var(--radius-sm); padding:9px 12px; font-size:13px; margin-bottom:6px; }
.form-alt { margin-top:16px; font-size:13px; color:var(--muted); }
.form-alt a { color:var(--accent); font-weight:600; }

/* Séparateur « ou » (entre le formulaire mot de passe et le bouton Google). */
.or-sep { display:flex; align-items:center; gap:12px; margin:18px 0 14px; color:var(--muted);
  font-size:12px; text-transform:uppercase; letter-spacing:.05em; }
.or-sep::before, .or-sep::after { content:""; flex:1; height:1px; background:var(--line); }
/* Bouton Google : ghost pleine largeur, logo G multicolore à gauche. */
.btn-google { width:100%; justify-content:center; }
.btn-google .g-logo { flex:none; }

/* ── Saisie à puces (concurrents) + cases de langue ───────────────────────── */
.chips-edit { display:flex; flex-wrap:wrap; gap:8px; align-items:center; cursor:text;
  border:1px solid var(--line); border-radius:var(--radius-sm); padding:8px; background:var(--surface); }
.chips-edit:focus-within { border-color:var(--accent);
  box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.chip-tag { display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600;
  background:var(--accent-soft); color:var(--accent-ink); border-radius:20px; padding:4px 6px 4px 12px; }
.chip-tag .chip-x { border:none; background:transparent; color:var(--accent-ink); cursor:pointer;
  font-size:16px; line-height:1; padding:0 2px; border-radius:50%; }
.chip-tag .chip-x:hover { background:color-mix(in srgb, var(--accent) 22%, transparent); }
/* L'input de saisie ne suit PAS le style large `.field input` (pas de bordure, largeur auto). */
.chips-edit .chip-add { flex:1; min-width:140px; width:auto; border:none; box-shadow:none;
  padding:4px; background:transparent; }
.chips-edit .chip-add:focus { border:none; box-shadow:none; }

.lang-choices { display:flex; flex-wrap:wrap; gap:10px; }
.lang-choice { display:inline-flex; align-items:center; gap:8px; cursor:pointer; font-size:14px;
  border:1px solid var(--line); border-radius:var(--radius-sm); padding:9px 14px; background:var(--surface);
  transition:border-color .12s, background .12s; }
.lang-choice input { width:auto; }
.lang-choice:has(input:checked) { border-color:var(--accent); background:var(--accent-soft);
  color:var(--accent-ink); font-weight:600; }

/* ── Onglet Enjeux : éditeur de moments ───────────────────────────────────── */
.moments-head { display:flex; align-items:baseline; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.moments-list { display:flex; flex-direction:column; gap:12px; margin:8px 0 4px; }
.moment.card { padding:16px 18px; border-left:3px solid var(--accent-soft);
  transition:border-color .12s, box-shadow .12s; }
.moment.card:hover { border-left-color:var(--accent); }
.moment .m-head { display:flex; align-items:flex-start; gap:14px; }
.m-index { flex:none; width:26px; height:26px; border-radius:50%; background:var(--accent-soft);
  color:var(--accent-ink); font-weight:800; font-size:13px; display:grid; place-items:center;
  font-variant-numeric:tabular-nums; margin-top:1px; }
.m-body { flex:1; min-width:0; }
/* Angle que sert la situation (lien Angles ↔ Situations, cf. docs/ANGLES.md). */
.m-angle { display:inline-flex; align-items:baseline; gap:6px; margin-bottom:8px; font-size:12px;
  font-weight:700; color:var(--accent-ink); background:var(--accent-soft); border-radius:20px;
  padding:3px 11px; max-width:100%; }
.m-angle-k { text-transform:uppercase; font-size:10px; letter-spacing:.06em; opacity:.65; }
.m-summary { margin:0; font-size:15px; color:var(--ink); line-height:1.45; }
.m-meta { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.m-chip { font-size:12px; font-weight:600; padding:3px 10px; border-radius:20px; max-width:100%;
  background:var(--surface-2); border:1px solid var(--line); color:var(--muted); }
.m-chip.aud { background:var(--accent-soft); border-color:transparent; color:var(--accent-ink); }
.m-meta-empty { font-size:12.5px; color:var(--faint); font-style:italic; }
/* Compteur de sondes liées à l'enjeu : lien en bas à droite de la carte (→ onglet Sondes filtré). */
.m-foot { margin-top:12px; text-align:right; }
.m-sondes { font-size:13px; font-weight:700; color:var(--accent-ink); text-decoration:none; }
.m-sondes:hover { text-decoration:underline; }
.m-actions { flex:none; display:flex; align-items:center; gap:4px; }
/* En édition : on masque le résumé lecture seule (situation + chips), seul le formulaire reste ;
   les actions (Fermer / Supprimer) restent calées à droite. */
.moment.editing .m-body, .moment.editing .m-foot { display:none; }
.moment.editing .m-actions { margin-left:auto; }
.m-remove { border:none; background:none; color:var(--faint); font-size:13px; font-weight:600;
  cursor:pointer; padding:6px 10px; border-radius:8px; transition:color .12s, background .12s; }
.m-remove:hover { color:var(--bad); background:var(--bad-soft); }
/* Formulaire d'édition déplié : rythme régulier + séparateur du résumé (l'espace au-dessus
   vient du gap:14px de `.moment`). */
.moment-edit:not([hidden]) { display:flex; flex-direction:column; gap:12px;
  padding-top:14px; border-top:1px solid var(--line); }

/* ── Liste des radars : carte cliquable + icône de suppression en coin ─────── */
.radar-card { position: relative; }
.radar-card-link { display: block; text-decoration: none; color: inherit; }
.radar-card-link h3 { padding-right: 28px; }   /* place pour l'icône en haut à droite */
.radar-del { position: absolute; top: 10px; right: 10px; margin: 0; }
.radar-del-btn { display: grid; place-items: center; width: 28px; height: 28px; border: none;
  background: transparent; color: var(--faint); cursor: pointer; border-radius: 8px; opacity: .55;
  transition: opacity .12s, color .12s, background .12s; }
.radar-card:hover .radar-del-btn, .radar-del-btn:focus-visible { opacity: 1; }
.radar-del-btn:hover { color: var(--bad); background: var(--bad-soft); }

/* Popup modale de confirmation (<dialog> natif) — remplace confirm(). */
/* Centrage explicite : le reset global `* { margin:0 }` annule le `margin:auto` que le navigateur
   applique par défaut au <dialog> → on recentre via inset:0 + margin:auto + height:fit-content. */
.modal { position: fixed; inset: 0; margin: auto; height: fit-content;
  max-width: 420px; width: calc(100% - 32px); max-height: calc(100% - 32px); overflow: auto;
  border: none; padding: 0; border-radius: var(--radius); box-shadow: var(--shadow);
  background: var(--surface); color: var(--ink); }
.modal::backdrop { background: rgba(20, 25, 40, .45); backdrop-filter: blur(2px); }
.modal[open] { animation: modal-in .14s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-card { margin: 0; padding: 22px 24px; }
.modal-title { margin: 0 0 8px; font-size: 17px; }
.modal-msg { margin: 0 0 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Récap des angles mesurés (en tête de l'onglet Situations, après profilage). */
.angles-summary { margin-bottom: 18px; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface-2); }
.angles-summary-head { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.a-summary-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Onglet Situations : écran « Choisir les angles » (avant profilage, cf. docs/ANGLES.md) ── */
.angles-list { display:flex; flex-direction:column; gap:10px; margin:8px 0 4px; }
.angle.card { display:flex; align-items:flex-start; gap:14px; padding:14px 16px;
  border-left:3px solid var(--accent-soft); transition:border-color .12s, opacity .12s; }
.angle.card:hover { border-left-color:var(--accent); }
.angle .a-sel { flex:none; width:18px; height:18px; margin-top:2px; accent-color:var(--accent); cursor:pointer; }
.angle:not(:has(.a-sel:checked)) { opacity:.55; }            /* angle non retenu → grisé */
.angle.risk { border-left-color:var(--warn); }
.a-main { flex:1; min-width:0; }
.a-label { margin:0; font-size:15px; font-weight:600; color:var(--ink); line-height:1.4; }
.a-meta { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.a-chip { font-size:12px; font-weight:600; padding:3px 10px; border-radius:20px; max-width:100%;
  background:var(--surface-2); border:1px solid var(--line); color:var(--muted); }
.a-chip.enjeu { background:var(--accent-soft); border-color:transparent; color:var(--accent-ink); }
.a-chip.risk-chip { background:color-mix(in srgb, var(--warn) 14%, transparent);
  border-color:transparent; color:var(--warn); }
.a-edit:not([hidden]) { margin-top:10px; }
.a-edit .a-label-input { width:100%; box-sizing:border-box; font-size:14px;
  border:1px solid var(--line); border-radius:var(--radius-sm); padding:9px 12px; outline:none; }
.a-edit .a-label-input:focus { border-color:var(--accent);
  box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.a-actions { flex:none; display:flex; align-items:center; gap:4px; }
.a-remove { border:none; background:none; color:var(--faint); font-size:13px; font-weight:600;
  cursor:pointer; padding:6px 10px; border-radius:8px; transition:color .12s, background .12s; }
.a-remove:hover { color:var(--bad); background:var(--bad-soft); }

/* Bannière de filtre (onglet Sondes filtré sur un enjeu). */
.filter-banner { display:flex; align-items:center; justify-content:space-between; gap:16px;
  flex-wrap:wrap; background:var(--accent-soft); color:var(--accent-ink); border-radius:var(--radius-sm);
  padding:12px 16px; font-size:14px; }
.filter-banner strong { color:var(--accent-ink); }

/* ── Onglet Prompts : éditeur (édition/suppression inline) + lien mesures ─────── */
.prompts-list { list-style:none; display:flex; flex-direction:column; }
.prompt-card { border-top:1px solid var(--line); padding:12px 0; }
.prompt-card.deleted { display:none; }
.prompt-view { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.prompt-text { flex:1; min-width:0; font-size:14px; line-height:1.5; }
.prompt-actions { flex:none; display:flex; align-items:center; gap:6px; white-space:nowrap; }
.prompt-remove { border:none; background:none; color:var(--faint); font-size:13px; font-weight:600;
  cursor:pointer; padding:6px 10px; border-radius:8px; transition:color .12s, background .12s; }
.prompt-remove:hover { color:var(--bad); background:var(--bad-soft); }
.prompt-mesures { font-size:13px; font-weight:700; color:var(--accent-ink); text-decoration:none; }
.prompt-mesures:hover { text-decoration:underline; }
.prompt-edit { margin-top:10px; }
.prompt-edit .prompt-input { width:100%; box-sizing:border-box; font:inherit; font-size:14px;
  color:var(--ink); background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius-sm); padding:10px 12px; resize:vertical; line-height:1.5; }
.prompt-edit .prompt-input:focus { outline:none; border-color:var(--accent);
  box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }

/* ── Vue mesures d'un prompt : une carte par modèle, texte brut ───────────────── */
.measure-card { margin-top:14px; }
.measure-head { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:10px; }
/* Réponse dépliée : le nom du modèle reste épinglé sous la situation + le prompt en scrollant. */
#measures-all .measure-card.expanded .measure-head { position:sticky;
  top:calc(var(--sit-h, 44px) + var(--prompt-h, 0px)); z-index:1;
  background:var(--surface); box-shadow:0 6px 6px -6px rgba(20,25,40,.10); }
.measure-model { font-size:13px; font-weight:800; color:var(--ink); }
.measure-tags { display:flex; flex-wrap:wrap; gap:6px; }
/* Réponse rendue en markdown (prose compacte). */
.measure-text.md { font-size:14px; line-height:1.6; color:var(--ink); }
.measure-text.md p { margin:0 0 10px; }
.measure-text.md p:last-child, .measure-text.md ul:last-child, .measure-text.md ol:last-child { margin-bottom:0; }
.measure-text.md ul, .measure-text.md ol { margin:0 0 10px 22px; display:flex; flex-direction:column; gap:4px; }
.measure-text.md h3, .measure-text.md h4, .measure-text.md h5, .measure-text.md h6 { font-size:14px; margin:12px 0 6px; }
.measure-text.md strong { color:var(--ink); }
.measure-text.md code { font-size:13px; background:var(--surface-2); border:1px solid var(--line);
  border-radius:6px; padding:1px 5px; }
/* Replié : on borne la hauteur et on estompe le bas (mask) ; « Voir plus » lève la limite. */
.measure-text.clamped { max-height:8.4em; overflow:hidden;
  -webkit-mask-image:linear-gradient(180deg, #000 65%, transparent);
  mask-image:linear-gradient(180deg, #000 65%, transparent); }
.measure-toggle { margin-top:8px; border:none; background:none; color:var(--accent-ink);
  font-size:13px; font-weight:700; cursor:pointer; padding:0; }
.measure-toggle:hover { text-decoration:underline; }
/* Surlignage des mentions dans les réponses : marque (accent) vs concurrents (ambre). */
mark.mark-target, mark.mark-competitor { padding:0 3px; border-radius:4px; font-weight:600; }
mark.mark-target { background:color-mix(in srgb, var(--accent) 22%, transparent); color:var(--accent-ink); }
mark.mark-competitor { background:var(--warn-soft); color:var(--warn); }
.measure-legend { font-size:13px; color:var(--muted); margin:14px 0 0; display:flex;
  align-items:center; gap:8px; flex-wrap:wrap; }
.measure-prompt { font-size:13px; color:var(--muted); font-style:italic; margin:0 0 10px;
  border-left:3px solid var(--line); padding-left:12px; }
/* Barre de filtres rapides de la vue Réponses (filtrage client). */
.measure-filters { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin:16px 0 4px; }
.measure-filters select { font:inherit; font-size:13px; color:var(--ink); background:var(--surface);
  border:1px solid var(--line); border-radius:var(--radius-sm); padding:7px 10px; cursor:pointer; }
.measure-filters select:focus { outline:none; border-color:var(--accent); }
.f-count { font-size:13px; color:var(--muted); font-variant-numeric:tabular-nums; margin-left:auto; }
/* Groupement Situation → Prompt → réponses (vue Réponses). En-têtes COLLANTS : en scrollant, la
   situation reste en haut et le prompt juste en dessous (fond opaque = couleur de page). */
.resp-situation { margin-top:28px; }
.resp-sit-title { position:sticky; top:0; z-index:3; background:var(--bg);
  font-size:15px; font-weight:700; color:var(--ink); margin:0; padding:12px 0 8px;
  border-bottom:1px solid var(--line); box-shadow:0 6px 6px -6px rgba(20,25,40,.12); }
.resp-prompt { margin-top:16px; }
/* `top` = hauteur réelle de l'en-tête de situation (variable car libellés multi-lignes), posée par
   JS sur `.resp-situation` → le prompt (multi-lignes possible) se cale dessous sans être recouvert. */
.resp-prompt-text { position:sticky; top:var(--sit-h, 44px); z-index:2; background:var(--bg);
  font-size:14px; font-weight:600; color:var(--accent-ink); margin:0; padding:8px 0; }
.resp-prompt .measure-card { margin-top:10px; }

/* ── Sélecteur de langue (i18n) ───────────────────────────────────────────── */
.lang-switch { display:inline-flex; gap:6px; align-items:center; font-size:12px; font-weight:600;
  margin-right:4px; }
.lang-switch a { color:var(--muted); text-decoration:none; padding:2px 4px; border-radius:6px; }
.lang-switch a:hover { color:var(--ink); background:var(--surface-2); }
.lang-switch .lang-active { color:var(--accent); padding:2px 4px; }

/* ── Revue des sondes : barre d'actions collante (liste longue) ───────────── */
.review-actions { gap:12px; margin-top:24px; position:sticky; bottom:0;
  background:linear-gradient(180deg, transparent, var(--bg) 30%); padding:16px 0 12px; }

/* Ligne de sonde entièrement cliquable (le <label> bascule la case). Survol + état rejeté. */
.review-sonde { transition: background .12s; }
.review-sonde:hover { background: var(--surface-2); }
.review-sonde .sonde-text { transition: color .12s, opacity .12s; }
.review-sonde:has(input[name="reject"]:checked) { background: var(--bad-soft); }
.review-sonde:has(input[name="reject"]:checked) .sonde-text {
  text-decoration: line-through; color: var(--muted); opacity: .6; }

/* ── Rapport : rendu prose du markdown ────────────────────────────────────── */
.report { line-height:1.65; }
.report h1 { font-size:24px; margin:0 0 14px; letter-spacing:-.01em; }
.report h2 { font-size:19px; margin:28px 0 10px; padding-top:18px; border-top:1px solid var(--line); }
.report h3 { font-size:15px; margin:20px 0 8px; }
.report p { margin:0 0 12px; }
.report ul, .report ol { margin:0 0 14px 22px; display:flex; flex-direction:column; gap:6px; }
.report strong { color:var(--ink); }
.report code { font-size:13px; background:var(--surface-2); border:1px solid var(--line);
  border-radius:6px; padding:1px 5px; }
.report table { width:100%; border-collapse:collapse; margin:8px 0 18px; font-size:14px; }
.report th, .report td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--line); }
.report th { color:var(--muted); font-weight:600; }
.report tr td:not(:first-child), .report tr th:not(:first-child) { text-align:right; font-variant-numeric:tabular-nums; }
.report blockquote { margin:0 0 14px; padding:8px 14px; border-left:3px solid var(--accent);
  color:var(--muted); background:var(--surface-2); border-radius:0 8px 8px 0; }

/* ── Onglets de la fiche radar (config / enjeux / sondes / mesures / rapport) ─ */
.tabs { display:flex; gap:2px; flex-wrap:wrap; border-bottom:1px solid var(--line);
  margin:18px 0 26px; }
.tabs a { padding:10px 16px; font-size:14px; font-weight:600; color:var(--muted);
  text-decoration:none; border-bottom:2px solid transparent; margin-bottom:-1px;
  transition:color .15s, border-color .15s; }
.tabs a:hover { color:var(--ink); }
.tabs a.active { color:var(--ink); border-bottom-color:var(--accent); }
.tabs a .tab-dot { display:inline-block; width:6px; height:6px; border-radius:50%;
  background:var(--accent); margin-left:6px; vertical-align:middle; }

/* ── Bannière d'avertissement (ex. profil obsolète après édition de la config) ─ */
.notice { display:flex; gap:12px; align-items:flex-start; justify-content:space-between;
  flex-wrap:wrap; background:var(--warn-soft); border:1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  color:var(--warn); border-radius:var(--radius-sm); padding:12px 16px; font-size:14px; margin:0 0 22px; }
.notice p { color:var(--warn); font-weight:600; margin:0; }
.notice .btn { flex:none; }

/* ── Observatoire électoral (cf. docs/OBSERVATOIRE.md) — sections multi-entités symétriques ─ */

/* ③ Divergences */
.obs-diverge { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:14px; margin-top:14px; }
.obs-dv { border:1px solid var(--line); border-radius:var(--radius); background:var(--surface);
  box-shadow:var(--shadow); padding:14px 16px; border-left:4px solid var(--accent); }
.obs-dv--divisé { border-left-color:var(--warn); }
.obs-dv--dissensus-fort { border-left-color:var(--bad); }
.obs-dv--consensus { border-left-color:var(--good); }
.obs-dv--tous-esquivent { border-left-color:var(--faint); }   /* tous esquivent ≠ consensus */

/* Bandeau verdict (haut de page observatoire) : 2-3 tuiles chiffres-chocs. */
.obs-verdict { margin:8px 0 30px; padding:18px 20px; border-radius:14px;
  background:var(--accent-soft); border:1px solid var(--line); }
.obs-verdict-kicker { font-size:12px; font-weight:700; letter-spacing:.04em; text-transform:uppercase;
  color:var(--accent-ink); margin-bottom:12px; }
.obs-verdict-tiles { display:grid; grid-template-columns:repeat(auto-fit, minmax(190px, 1fr)); gap:20px; }
.obs-vtile { display:flex; flex-direction:column; gap:5px; }
.obs-vnum { font-size:34px; font-weight:800; line-height:1; color:var(--ink); font-variant-numeric:tabular-nums; }
.obs-vlab { font-size:13px; color:var(--muted); line-height:1.35; }
.obs-vlab em { font-style:normal; color:var(--faint); }

/* Faible effectif : ligne estompée + badge (honnêteté statistique, cf. revue de page). */
.is-low-n { opacity:.5; }
.low-n-badge { font-size:11px; font-weight:700; color:var(--faint);
  text-transform:uppercase; letter-spacing:.03em; }
.obs-dv-top { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-bottom:10px; }
.obs-dv-theme { font-size:15px; font-weight:800; color:var(--ink); }
.obs-dv-lab { font-size:11px; font-weight:700; color:var(--faint); text-transform:uppercase; letter-spacing:.04em; }
.obs-dv-picks { display:flex; flex-direction:column; gap:14px; }
.obs-pick { font-size:13px; color:var(--muted); }
.obs-pick b { color:var(--accent-ink); }
/* ③ « groupé par candidat » : un avatar par candidat distinct + les modèles qui l'ont désigné. */
.obs-cand-row { display:flex; align-items:center; gap:10px; width:100%; }
button.obs-cand-row { background:none; border:none; padding:0; margin:0; cursor:pointer; text-align:left; font:inherit; }
.obs-cand-name { font-size:14px; font-weight:700; color:var(--accent-ink); }
.obs-cand-n { font-size:12px; font-weight:600; color:var(--faint); }
.obs-cand-row .obs-chev { margin-left:auto; }
.obs-cand-models { margin-left:46px; margin-top:3px; font-size:12px; color:var(--muted); }
.obs-cand-abstained { margin-top:4px; padding-top:9px; border-top:1px dashed var(--line); font-size:12px; color:var(--faint); }

/* ④ Heatmap */
.obs-heat-wrap { overflow-x:auto; }
.obs-heat { width:100%; border-collapse:separate; border-spacing:0 6px; }
.obs-heat th { font-size:12px; font-weight:700; color:var(--muted); padding:0 8px 8px; text-align:center; }
.obs-heat th.row-h { text-align:left; }
.obs-heat td { text-align:center; padding:4px 6px; vertical-align:middle; }
.obs-heat td.row-l { text-align:left; font-size:14px; color:var(--ink); white-space:nowrap; font-weight:600; }
.obs-pip { display:inline-block; width:16px; height:16px; border-radius:50%; border:2px solid var(--accent); vertical-align:middle; }
.obs-pip--full { background:var(--accent); }
.obs-pip--half { background:linear-gradient(90deg, var(--accent) 50%, transparent 50%); }
.obs-pip--empty { background:transparent; opacity:.35; }
.obs-pct { display:block; font-size:12px; font-weight:700; color:var(--ink); font-variant-numeric:tabular-nums; margin-top:2px; }
.obs-n { display:block; font-size:10px; color:var(--faint); }
.obs-legend { margin-top:14px; display:flex; gap:18px; font-size:13px; color:var(--muted); flex-wrap:wrap; }
.obs-legend span { display:inline-flex; align-items:center; gap:7px; }

/* ⑥ Tonalité */
.obs-tones { display:flex; flex-direction:column; gap:8px; margin-top:14px; }
.obs-tone { display:grid; grid-template-columns:160px 1fr; gap:14px; align-items:center; }
.obs-tone-who { font-size:14px; font-weight:700; color:var(--ink); text-align:right; }
.obs-tone-who em { font-weight:500; font-style:normal; color:var(--faint); font-size:11px; }
.obs-tone-split { display:flex; height:24px; border-radius:7px; overflow:hidden; border:1px solid var(--line); }
.obs-tone-split .obs-seg { display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:#fff; min-width:0; }
.obs-seg.fav { background:var(--good); } .obs-seg.neu { background:#aeb5c2; } .obs-seg.cri { background:var(--bad); }
.obs-tone-legend { display:flex; gap:18px; font-size:12.5px; color:var(--muted); margin-top:12px; }
.obs-tone-legend span { display:inline-flex; align-items:center; gap:6px; }
.obs-tone-legend i { width:11px; height:11px; border-radius:3px; display:inline-block; }

@media (max-width:680px) { .obs-tone { grid-template-columns:110px 1fr; } }

/* Assistant de création d'observatoire : rangée scrutin (type · pays · date · tour) */
.scrutin-row { display:flex; gap:10px; flex-wrap:wrap; }
.scrutin-row select, .scrutin-row input { flex:1 1 auto; min-width:120px; }

/* ── Observatoire — enrichissements (verbatims, slips, dissensus, détail cellule, CTA) ── */
/* ② Bulletins (slips) */
.obs-ballots { display:flex; flex-direction:column; gap:6px; margin-top:14px; }
.obs-ballot { display:grid; grid-template-columns:150px 20px 1fr; align-items:center; gap:10px; }
.obs-ballot-model { font-size:13px; font-weight:700; color:var(--ink); text-align:right; }
.obs-ballot-arrow { color:var(--faint); text-align:center; }
.obs-slip { border:1px solid var(--line); border-left:4px solid var(--accent); border-radius:10px;
  background:var(--accent-soft); padding:10px 14px; font-size:14px; display:flex; align-items:center; gap:10px; box-shadow:var(--shadow); }
.obs-slip .who { font-weight:700; color:var(--accent-ink); }
.obs-slip .note { margin-left:auto; font-size:12px; color:var(--faint); white-space:nowrap; }
/* ③ Indice de dissensus (barres) */
.obs-dissensus { display:flex; flex-direction:column; gap:4px; margin:14px 0 22px; }
.obs-ds-row { display:grid; grid-template-columns:150px 1fr 120px; align-items:center; gap:14px; }
.obs-ds-row .t { font-size:13px; font-weight:600; color:var(--ink); text-align:right; }
.obs-ds-track { height:8px; border-radius:6px; background:var(--line); position:relative; }
.obs-ds-dot { position:absolute; top:50%; transform:translate(-50%,-50%); width:14px; height:14px; border-radius:50%; border:2px solid var(--surface); }
.obs-ds-lab { font-size:12px; font-weight:700; }
.obs-ds--consensus { color:var(--good); } .obs-ds-dot.obs-ds--consensus { background:var(--good); }
.obs-ds--divisé { color:var(--warn); } .obs-ds-dot.obs-ds--divisé { background:var(--warn); }
.obs-ds--dissensus-fort { color:var(--bad); } .obs-ds-dot.obs-ds--dissensus-fort { background:var(--bad); }
.obs-ds--tous-esquivent { color:var(--faint); }   /* pas de point : aucun modèle ne s'est prononcé */
/* Verbatims dépliables (divergences, tonalité) */
.obs-toggle { display:flex; align-items:center; gap:6px; width:100%; background:transparent; border:0; padding:4px 0; cursor:pointer; text-align:left; font:inherit; color:inherit; }
.obs-pick { font-size:13px; }
.obs-pick b, .obs-toggle b { color:var(--accent-ink); }
.obs-pick-flat { font-size:13px; color:var(--muted); }
.obs-chev { color:var(--faint); font-size:11px; transition:transform .15s; }
.obs-toggle[aria-expanded="true"] .obs-chev { transform:rotate(180deg); }
.obs-drawer[hidden] { display:none; }
.obs-drawer { padding:4px 0 8px; }
.obs-ev { font-size:13px; font-style:italic; color:var(--ink); background:var(--surface-2); border-left:3px solid var(--accent); border-radius:0 8px 8px 0; padding:9px 12px; margin-bottom:8px; }
.obs-ev.cri { border-left-color:var(--bad); }
.obs-ev cite { display:block; font-style:normal; font-size:11px; color:var(--faint); margin-top:5px; }
/* ④ Cellule cliquable + détail */
.obs-pip-btn { background:transparent; border:0; padding:5px 6px; cursor:pointer; border-radius:9px; line-height:1.1; }
.obs-pip-btn:hover { background:var(--surface-2); }
.obs-pip-btn.sel { background:var(--accent-soft); box-shadow:0 0 0 1px var(--accent); }
#obs-cell-detail { margin-top:16px; }
.obs-cd-placeholder { font-size:13px; color:var(--faint); font-style:italic; }
.obs-cd-card { border:1px solid var(--line); border-radius:14px; background:var(--surface); box-shadow:var(--shadow); padding:16px 20px; }
.obs-cd-head { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.obs-cd-cand { font-size:16px; font-weight:800; }
.obs-cd-theme { font-size:13px; color:var(--faint); }
.obs-cd-strength { margin-left:auto; font-size:12px; font-weight:700; padding:3px 11px; border-radius:20px; }
.obs-cd-strength.full { background:var(--accent); color:#fff; } .obs-cd-strength.half { background:var(--accent-soft); color:var(--accent-ink); } .obs-cd-strength.empty { background:var(--surface-2); color:var(--faint); }
.obs-cd-stats { display:flex; gap:24px; align-items:baseline; font-size:14px; color:var(--ink); margin-bottom:10px; }
.obs-cd-stats b { color:var(--accent-ink); }
.obs-cd-n { color:var(--faint); font-size:12px; }
.obs-cd-models { font-size:13px; color:var(--muted); margin-bottom:10px; }
.obs-cd-models b { color:var(--accent-ink); }
/* ⑥ Tonalité : ligne = bouton toggle */
.obs-tone-item { margin-bottom:2px; }
.obs-tone-row { display:grid; grid-template-columns:160px 1fr 16px; gap:14px; align-items:center; width:100%; background:transparent; border:0; padding:5px 0; cursor:pointer; font:inherit; }
.obs-tone-row[aria-expanded="true"] .obs-chev { transform:rotate(180deg); }
/* ⑧ « ce que ce n'est PAS » + prompts */
.obs-notlist { list-style:none; display:flex; flex-direction:column; gap:9px; margin-top:8px; }
.obs-notlist li { font-size:14px; color:var(--ink); padding-left:24px; position:relative; }
.obs-notlist li::before { content:"✕"; position:absolute; left:0; color:var(--bad); font-weight:800; }
.obs-prompts { display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.obs-prompt-line { font-family:ui-monospace,Menlo,Consolas,monospace; font-size:13px; color:var(--ink); background:var(--surface-2); border:1px solid var(--line); border-radius:8px; padding:8px 12px; }
/* ⑨ CTA */
.obs-claim { background:var(--accent); color:#fff; border-radius:var(--radius); padding:24px 26px; display:grid; grid-template-columns:1fr auto; gap:20px; align-items:center; }
.obs-claim h3 { color:#fff; margin-bottom:6px; }
.obs-claim p { font-size:14px; color:rgba(255,255,255,.85); max-width:52ch; }
.obs-claim .btn { background:#fff; color:var(--accent-ink); font-weight:700; white-space:nowrap; }
/* ⑤ Par profil d'électeur (Inc 3a) */
.obs-personas { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:16px; margin-top:14px; }
.obs-persona { border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); box-shadow:var(--shadow); padding:18px 20px; }
.obs-persona-who { font-size:14px; font-weight:800; color:var(--ink); }
.obs-persona-who em { font-weight:500; font-style:normal; color:var(--faint); font-size:11px; }
.obs-persona-lab { font-size:11px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--faint); margin:12px 0 8px; }
.obs-persona-list { list-style:none; display:flex; flex-direction:column; gap:6px; margin:0 0 10px; }
.obs-persona-list li { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:14px; color:var(--ink); padding-left:14px; position:relative; }
.obs-persona-list li::before { content:""; position:absolute; left:0; top:8px; width:6px; height:6px; border-radius:50%; background:var(--accent); }
.obs-persona-pct { font-size:12px; font-weight:700; color:var(--accent-ink); font-variant-numeric:tabular-nums; }
.obs-persona-frame { font-size:12px; color:var(--muted); margin-bottom:10px; }
.obs-persona-frame b { color:var(--accent-ink); }

/* ⑤b Bascules causales de persona (Inc 3b) */
.obs-flips { display:flex; flex-direction:column; gap:14px; margin-top:14px; }
.obs-flip { border:1px solid var(--line); border-left:4px solid var(--bad); border-radius:var(--radius); background:var(--surface); box-shadow:var(--shadow); padding:16px 20px; }
.obs-flip-q { font-size:14px; font-style:italic; color:var(--ink); margin-bottom:12px; }
.obs-flip-model { font-style:normal; font-weight:700; color:var(--faint); font-size:12px; }
.obs-flip-personas { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:12px; }
.obs-flip-persona { background:var(--surface-2); border-radius:10px; padding:12px 14px; }
/* Stratifié pour un alignement net : profil (label) puis le candidat (avatar + nom) sur sa ligne. */
.obs-flip-who { font-size:12px; color:var(--muted); line-height:1.35; margin-bottom:8px; }
.obs-flip-pick { display:flex; align-items:center; gap:8px; font-size:14px; font-weight:700; color:var(--accent-ink); }
.obs-flip-vb { font-size:12px; font-style:italic; color:var(--muted); margin-top:8px; }

@media (max-width:680px) {
  .obs-ballot { grid-template-columns:116px 16px 1fr; }
  .obs-ds-row { grid-template-columns:110px 1fr 90px; }
  .obs-claim { grid-template-columns:1fr; }
}

/* Sur téléphone, la rangée « modèle → candidat » ne tient pas en colonnes : le « slip »
   (avatar + nom + note `nowrap` « ressort sur X% ») impose une largeur min qui déborde l'écran.
   On empile : le modèle sur sa ligne, le slip pleine largeur en dessous (et qui peut wrapper). */
@media (max-width:560px) {
  .obs-ballot { grid-template-columns:1fr; gap:3px; }
  .obs-ballot > * { min-width:0; }
  .obs-ballot-model { text-align:left; }
  .obs-ballot-arrow { display:none; }
  .obs-slip { flex-wrap:wrap; }
  /* ⑥ tonalité : même resserrement que ③ pour la colonne « qui ». */
  .obs-tone-row { grid-template-columns:120px 1fr 16px; }
}

/* ── Barre de publication d'un rapport (page publique /o/<slug>) ── */
.publish-bar { margin:0 0 22px; }
.publish-live, .publish-cta { display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  border:1px solid var(--line); border-radius:var(--radius-sm); padding:12px 16px; background:var(--surface-2); font-size:14px; }
.publish-live a { color:var(--accent-ink); font-weight:600; }
.publish-dot { width:8px; height:8px; border-radius:50%; background:var(--good); display:inline-block; }
.publish-copy { background:transparent; border:1px solid var(--line); border-radius:6px; padding:2px 8px;
  font-size:12px; cursor:pointer; color:var(--muted); margin-left:6px; }
.publish-copy:hover { background:var(--surface); }
.publish-warn { font-size:12px; color:var(--warn); margin-top:4px; }

/* ── Avatars d'entité (cible / concurrents / candidats) — image uploadée ou repli initiales ── */
.entity-avatar { display:inline-block; vertical-align:middle; border-radius:50%; object-fit:cover;
  border:1px solid var(--line); background:var(--surface-2); flex:none; }
/* Repli : pastille colorée déterministe (teinte via --hue, posée inline par la macro `avatar`). */
.entity-initials { display:inline-flex; align-items:center; justify-content:center;
  color:#fff; font-weight:700; line-height:1; letter-spacing:.02em; border:none;
  background:hsl(var(--hue, 210) 42% 46%); }

/* Identité de la cible en tête du rapport. */
.entity-id { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.entity-id-name { font-size:15px; font-weight:700; color:var(--ink); }

/* Encart « panel d'entités » : la liste des entités mesurées (candidats / cible+concurrents). */
.entity-grid { display:flex; flex-wrap:wrap; gap:16px 20px; margin-top:16px; }
.entity-chip { display:flex; flex-direction:column; align-items:center; gap:8px; width:92px; text-align:center; }
.entity-chip-name { font-size:13px; font-weight:600; color:var(--ink); line-height:1.25; }
.entity-chip.is-target .entity-chip-name { color:var(--accent-ink); }
.entity-chip.is-target .entity-avatar { box-shadow:0 0 0 3px var(--accent-soft), 0 0 0 4px var(--accent); }

/* Part de voix avec avatars : grille à 4 colonnes (avatar | nom | barre | valeur). */
.bars.sov .bar-row { grid-template-columns:44px minmax(86px,26%) 1fr 42px; }
.bars.sov .name { text-align:left; }

/* Identité de candidat (heatmap, tonalité observatoire). */
.obs-cand { display:inline-flex; align-items:center; gap:8px; }
.obs-tone-who { display:inline-flex; align-items:center; gap:8px; }
.obs-slip .entity-avatar { margin-right:7px; }

/* Section « Visuels des entités » (onglet Config). */
.entity-img-list { list-style:none; display:flex; flex-direction:column; gap:10px; margin-top:14px; }
.entity-img-row { display:flex; align-items:center; gap:14px; padding:10px 12px;
  border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--surface-2); }
.entity-img-name { font-weight:600; color:var(--ink); flex:1 1 auto; }
.entity-img-name .tag { font-style:normal; font-size:11px; font-weight:600; color:var(--accent-ink);
  background:var(--accent-soft); padding:1px 7px; border-radius:999px; margin-left:6px; }
.entity-img-actions { display:flex; align-items:center; gap:8px; flex:none; }
.entity-img-actions form { margin:0; }
.file-pick { cursor:pointer; }
.file-pick input[type=file] { position:absolute; width:0; height:0; opacity:0; }
