/* Nicolas 2027 — design issu de design_handoff_nicolas_2027 (recréé en vanilla). */

:root {
  --serif: Charter, "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;

  --bg: #f6f4ee;
  --surface: #fffefb;
  --soft: #efece2;
  --ink: #211d16;
  --muted: #6d675a;
  --line: #e3ddcf;
  --accent: #23459c;
  --gold: #d7a021;
  --shadow: 0 1px 2px rgba(30, 22, 8, .05);
  --shadow-hover: 0 8px 28px rgba(30, 22, 8, .09);

  --pos-ok: #00795a;  --pos-ok-bg: rgba(0, 158, 115, .13);
  --pos-mid: #96660a; --pos-mid-bg: rgba(230, 159, 0, .16);
  --pos-no: #b04a10;  --pos-no-bg: rgba(213, 94, 0, .13);
  --pos-na: #8a8478;  --pos-na-bg: rgba(120, 113, 100, .10);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #191813;
  --surface: #22201a;
  --soft: #2c2a22;
  --ink: #ece7da;
  --muted: #a49d8c;
  --line: #38352b;
  --accent: #97ade6;
  --gold: #e3b04a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-hover: 0 8px 28px rgba(0, 0, 0, .35);

  --pos-ok: #45d2a6;  --pos-ok-bg: rgba(0, 158, 115, .20);
  --pos-mid: #f0b23e; --pos-mid-bg: rgba(230, 159, 0, .16);
  --pos-no: #ff9257;  --pos-no-bg: rgba(213, 94, 0, .17);
  --pos-na: #9b958a;  --pos-na-bg: rgba(150, 143, 130, .13);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Liseré tricolore (élément signature) ─────────────────────────── */
.liseret {
  height: 4px;
  background: linear-gradient(90deg, #1e3a8a 0, #1e3a8a 33.33%, #f2efe6 33.33%, #f2efe6 66.66%, #c5273a 66.66%, #c5273a 100%);
}
.liseret-court {
  width: 72px; height: 4px; margin: 0 auto;
  background: linear-gradient(90deg, #1e3a8a 0, #1e3a8a 33.33%, var(--line) 33.33%, var(--line) 66.66%, #c5273a 66.66%, #c5273a 100%);
}

/* ── En-tête ──────────────────────────────────────────────────────── */
.entete {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 44px;
  display: flex; align-items: center; gap: 40px;
}
.marque {
  font-family: var(--serif); font-size: 25px; font-weight: 700;
  color: var(--ink); padding: 18px 0; white-space: nowrap;
}
.marque span { color: var(--accent); }
.marque:hover { text-decoration: none; }
nav { display: flex; gap: 28px; flex: 1; }
nav a {
  font-size: 15.5px; font-weight: 500; color: var(--muted);
  padding: 22px 2px 19px; border-bottom: 3px solid transparent;
}
nav a:hover { color: var(--ink); text-decoration: none; }
nav a.actif { color: var(--ink); font-weight: 650; border-bottom-color: var(--accent); }
.btn-theme {
  appearance: none; background: var(--soft); border: 1px solid var(--line);
  border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--muted); padding: 7px 15px; cursor: pointer;
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
}
.btn-theme:hover { color: var(--ink); border-color: var(--muted); }
.btn-theme .icone { font-size: 14px; }

/* ── Conteneurs de vue ────────────────────────────────────────────── */
main { max-width: 1180px; margin: 0 auto; padding: 52px 44px 90px; min-height: 60vh; }
main.vue-proposition { max-width: 1080px; padding-top: 44px; }
main.vue-presentation { max-width: 880px; padding: 84px 44px 110px; }

/* ── Typo commune ─────────────────────────────────────────────────── */
.kicker { margin: 0 0 10px; font-size: 15px; color: var(--muted); }
h1 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 46px; line-height: 1.1; }
.h1-dash { font-size: 58px; line-height: 1.08; letter-spacing: -0.01em; }
.intro { margin: 0; font-size: 16px; color: var(--muted); max-width: 640px; }
.sous-h1 { margin: 14px 0 0; font-size: 16px; color: var(--muted); }

/* ── Cartes-panneaux ──────────────────────────────────────────────── */
.panneau {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 32px 36px 22px;
  box-shadow: var(--shadow);
}
.panneau h2 { margin: 0 0 16px; font-family: var(--serif); font-size: 26px; font-weight: 700; }
.panneau-titre { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 18px; }
.panneau-titre h2 { margin: 0; font-family: var(--serif); font-size: 27px; font-weight: 700; }
.lien-plus { font-size: 15px; font-weight: 600; white-space: nowrap; }

/* ── Tableau de bord ──────────────────────────────────────────────── */
.grille-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 26px 28px; box-shadow: var(--shadow);
}
.stat-val { font-family: var(--serif); font-size: 44px; font-weight: 700; line-height: 1; }
.stat-lib { margin-top: 8px; font-size: 15px; color: var(--muted); }

.panneau-proches { padding: 34px 38px 26px; margin-top: 28px; }

.rang {
  display: grid; grid-template-columns: 22px minmax(190px, 250px) 1fr 62px 74px;
  align-items: center; gap: 16px; padding: 10px 0;
}
.rang-compact { grid-template-columns: 22px minmax(140px, 200px) minmax(120px, 1fr) 58px 70px; gap: 14px; }
.rang-num { color: var(--muted); font-size: 15px; }
.rang-nom { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.rang-compact .rang-nom { font-size: 14.5px; }
.rang-score { font-size: 17px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.rang-compact .rang-score { font-size: 16.5px; }
.rang-couv { color: var(--muted); font-size: 12.5px; text-align: right; white-space: nowrap; }
.rang-compact .rang-couv { font-size: 12px; }

.pastille { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }

.barre { height: 9px; border-radius: 5px; background: var(--soft); overflow: hidden; }
.barre-remplie { height: 9px; border-radius: 5px; }

.titre-section {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 20px; margin: 52px 0 22px;
}
.titre-section h2 { margin: 0; font-family: var(--serif); font-size: 30px; font-weight: 700; }

/* ── Cartes de proposition ────────────────────────────────────────── */
.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.carte {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 26px 26px 20px; display: flex; flex-direction: column; gap: 12px;
  color: var(--ink); cursor: pointer; box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.carte:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow-hover); }
.carte-entete { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.carte h3 { margin: 0; font-family: var(--serif); font-size: 23px; line-height: 1.22; font-weight: 700; }
.carte-resume { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.carte-pied {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding-top: 12px; border-top: 1px solid var(--line);
}
.carte-pied-droite { display: flex; align-items: center; gap: 10px; }
.compte-positions { font-size: 12.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

.kicker-theme {
  font-size: 12px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.chip-statut { font-size: 12.5px; font-weight: 600; padding: 3px 11px; border-radius: 999px; white-space: nowrap; }

.poids { font-size: 15px; letter-spacing: 2px; white-space: nowrap; }
.poids-plein { color: var(--gold); }
.poids-vide { color: var(--line); }

.jauge { display: flex; gap: 1px; width: 110px; height: 6px; border-radius: 3px; overflow: hidden; background: var(--soft); }
.jauge-seg { height: 6px; }
.seg-aligne { background: var(--pos-ok); }
.seg-partiel { background: var(--pos-mid); }
.seg-oppose { background: var(--pos-no); }
.seg-absent { background: var(--pos-na); }

/* ── Mon programme ────────────────────────────────────────────────── */
.section-theme { margin-top: 52px; }
.section-theme > h2 {
  margin: 0 0 20px; font-family: var(--serif); font-size: 27px; font-weight: 700;
  padding-bottom: 12px; border-bottom: 2px solid var(--ink);
  display: flex; justify-content: space-between; align-items: baseline;
}
.section-theme > h2 .compte { font-family: var(--sans); font-size: 13.5px; font-weight: 500; color: var(--muted); }
.vide { color: var(--muted); font-style: italic; }

/* ── Fiche proposition ────────────────────────────────────────────── */
.fiche-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.retour { font-size: 14.5px; font-weight: 600; }
.btn-partage {
  appearance: none; background: var(--soft); border: 1px solid var(--line);
  border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--muted); padding: 7px 15px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.btn-partage:hover { color: var(--ink); border-color: var(--muted); }
.btn-partage.ok { color: var(--pos-ok); border-color: var(--pos-ok); }
.fiche-meta { display: flex; align-items: center; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.point-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--line); flex: none; }
.fiche-titre { margin: 14px 0 0; font-size: 46px; line-height: 1.12; letter-spacing: -0.01em; max-width: 860px; }
.fiche-lede { margin: 22px 0 0; font-family: var(--serif); font-size: 21px; line-height: 1.5; max-width: 800px; }
.fiche-detail { margin-top: 4px; max-width: 800px; }
.fiche-detail p { margin: 16px 0 0; font-size: 16px; color: var(--muted); line-height: 1.65; }
.fiche-detail ul { margin: 16px 0 0; padding-left: 1.3em; }
.fiche-detail li { font-size: 16px; color: var(--muted); line-height: 1.65; margin-top: 8px; }
.fiche-detail strong { color: var(--ink); }

.chiffrage {
  border-left: 3px solid var(--accent); padding-left: 16px;
  margin: 24px 0 0; max-width: 800px; font-size: 14px; line-height: 1.7; color: var(--muted);
}
.chiffrage strong { color: var(--ink); display: block; }

.panneau-confrontation { padding: 32px 36px 14px; margin-top: 44px; }
.panneau-confrontation h2 { margin: 0 0 6px; font-size: 25px; }
.panneau-confrontation .sous-titre { margin: 0 0 18px; font-size: 14px; color: var(--muted); }

.note {
  margin: 0 0 18px; padding-left: 16px; border-left: 3px solid var(--line);
  font-size: 14px; line-height: 1.7; color: var(--muted); max-width: 800px;
}
.note p { margin: 0; }

.tc-entete, .tc-ligne {
  display: grid; grid-template-columns: minmax(180px, 230px) 122px 1fr minmax(150px, 190px);
  gap: 20px; border-bottom: 1px solid var(--line);
}
.tc-entete {
  padding: 8px 0; font-size: 11.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); font-weight: 600;
}
.tc-ligne { padding: 17px 0; align-items: start; }
.tc-famille { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; line-height: 1.35; }
.badge-position {
  display: inline-flex; align-items: center; gap: 7px; align-self: start;
  font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.tc-citation { margin: 0; font-family: var(--serif); font-size: 16.5px; line-height: 1.5; font-style: italic; }
.tc-citation.vide { color: var(--muted); }
.tc-source { font-size: 13px; color: var(--muted); line-height: 1.5; }
.tc-source a { font-size: 13px; }
.tc-source .source-date { margin-top: 2px; font-size: 12px; }

.pos-aligne { color: var(--pos-ok); background: var(--pos-ok-bg); }
.pos-partiel { color: var(--pos-mid); background: var(--pos-mid-bg); }
.pos-oppose { color: var(--pos-no); background: var(--pos-no-bg); }
.pos-absent { color: var(--pos-na); background: var(--pos-na-bg); }

.legende { display: flex; gap: 10px; padding: 16px 0 12px; flex-wrap: wrap; }
.legende .pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; padding: 4px 13px; border-radius: 999px;
}

/* ── Confrontation ────────────────────────────────────────────────── */
.grille-confront {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(560px, 1fr));
  gap: 24px; align-items: start; margin-top: 36px;
}
.panneau-radar { padding: 30px 26px 22px; }
.panneau-radar h2 { margin: 0; font-size: 24px; }
.panneau-radar .sous-titre { margin: 6px 0 4px; font-size: 13px; color: var(--muted); }
.radar-centre { display: flex; justify-content: center; }

.panneau-heatmap { padding: 34px 38px 22px; margin-top: 24px; }
.panneau-heatmap h2 { margin: 0 0 22px; }

.heat-entete, .heat-ligne {
  display: grid; grid-template-columns: minmax(300px, 1.5fr) repeat(6, 1fr);
  gap: 3px; align-items: stretch;
}
.heat-entete .heat-coin {
  padding: 10px 12px 10px 0; font-size: 11.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); font-weight: 600; align-self: end;
}
.heat-col {
  padding: 10px 4px; display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; align-self: end;
}
.heat-col .pastille { width: 9px; height: 9px; }
.heat-theme {
  background: var(--soft); border-radius: 6px; padding: 9px 14px; margin: 10px 0 3px;
  font-family: var(--serif); font-size: 17px; font-weight: 700;
}
.heat-ligne { margin-top: 3px; }
.heat-titre { padding: 14px 16px 14px 0; display: flex; flex-direction: column; gap: 5px; justify-content: center; }
.heat-titre a { font-size: 15.5px; font-weight: 600; line-height: 1.35; }
.heat-titre .poids { font-size: 13px; }
.heat-case {
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; min-height: 54px;
}

/* ── Présentation (manifeste) ─────────────────────────────────────── */
.manifeste-tete { text-align: center; }
.manifeste-tete .liseret-court { margin-bottom: 30px; }
.manifeste-kicker {
  margin: 0 0 18px; font-size: 13.5px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--muted); font-weight: 600;
}
.manifeste-tete h1 { font-size: 64px; line-height: 1.06; letter-spacing: -0.015em; }
.manifeste-chapeau {
  margin: 26px auto 0; max-width: 620px;
  font-family: var(--serif); font-size: 21px; line-height: 1.55; color: var(--muted);
}
.manifeste-section { margin-top: 84px; }
.manifeste-titre-bloc {
  display: flex; align-items: baseline; gap: 22px;
  border-top: 1px solid var(--line); padding-top: 40px;
}
.manifeste-num {
  font-family: var(--serif); font-size: 54px; font-weight: 700;
  color: var(--line); line-height: 1; flex: none;
}
.manifeste-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.manifeste-meta .kicker-theme { font-size: 12.5px; letter-spacing: .16em; }
.manifeste-meta .poids { font-size: 14px; }
.manifeste-section h2 {
  margin: 0; font-family: var(--serif); font-size: 38px;
  line-height: 1.14; font-weight: 700; letter-spacing: -0.01em;
}
.manifeste-resume { margin: 26px 0 0; font-family: var(--serif); font-size: 21px; line-height: 1.55; }
.manifeste-detail p { margin: 18px 0 0; font-size: 16.5px; line-height: 1.7; color: var(--muted); }
.manifeste-detail ul { margin: 18px 0 0; padding-left: 1.3em; }
.manifeste-detail li { font-size: 16.5px; line-height: 1.7; color: var(--muted); margin-top: 8px; }
.manifeste-detail strong { color: var(--ink); }
.manifeste-positions {
  margin: 24px 0 0; font-size: 14px; line-height: 1.7; color: var(--muted);
  border-left: 3px solid var(--line); padding-left: 16px;
}
.manifeste-cloture { text-align: center; margin-top: 96px; }

/* ── Pied de page ─────────────────────────────────────────────────── */
.pied {
  border-top: 1px solid var(--line); padding: 26px 44px;
  display: flex; justify-content: space-between; gap: 20px;
  font-size: 13px; color: var(--muted);
}

.vide-page { text-align: center; padding: 60px 0; }

/* ── Responsive (secondaire) ──────────────────────────────────────── */
@media (max-width: 900px) {
  .entete { padding: 0 24px; gap: 20px; flex-wrap: wrap; }
  main { padding-left: 24px; padding-right: 24px; }
  .h1-dash { font-size: 42px; }
  h1 { font-size: 36px; }
  .manifeste-tete h1 { font-size: 44px; }
  .grille-stats { grid-template-columns: 1fr; }
  .grille-confront { grid-template-columns: 1fr; }
  .rang, .rang-compact { grid-template-columns: 22px 1fr 62px; }
  .rang .barre, .rang-couv { display: none; }
  .defile { overflow-x: auto; }
  .defile > * { min-width: 720px; }
  .tc-entete, .tc-ligne { grid-template-columns: minmax(140px, 180px) 110px 1fr; }
  .tc-source { grid-column: 2 / -1; }
  .pied { padding: 20px 24px; }
}

@media print {
  .liseret, .entete, .pied, .btn-theme, .btn-partage { display: none; }
  body { background: #fff; }
  main.vue-presentation { max-width: none; padding: 0; }
}
