/* ============================================================
   Observatoire Forhia Vol.01 — print-ready stylesheet
   A4 portrait · 210 × 297 mm · marges 22 mm cohérentes
   Charter : night/cobalt/orange/leaf/pink/cream
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800;900&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --night: #050723;
  --cobalt: #1238FF;
  --cobalt-light: #6F8CFF;
  --orange: #FF5B22;
  --leaf: #D6E45C;
  --olive: #A3A83D;
  --pink: #F5A6CF;
  --cream: #FFF7EF;
  --white: #FFFFFF;
  --ink: #050723;
  --muted: #6F7187;
  --line: rgba(5, 7, 35, 0.08);
  --line-strong: rgba(5, 7, 35, 0.18);
  --positive: #2C8A3D;
  --negative: #C4264F;
}

* { box-sizing: border-box; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

html, body {
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 11pt;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

@page {
  size: A4 portrait;
  margin: 0;
}

.page {
  width: 210mm;
  min-height: 297mm;
  padding: 22mm;
  background: var(--cream);
  page-break-after: always;
  page-break-inside: avoid;
  break-after: page;
  position: relative;
  overflow: hidden;
}
.page:last-child { page-break-after: auto; }

/* Pages noires */
.page.night {
  background: var(--night);
  color: var(--white);
}
.page.cobalt {
  background: linear-gradient(135deg, var(--night) 0%, #07105f 50%, var(--cobalt) 100%);
  color: var(--white);
}

/* ===== Typographie ===== */
h1, h2, h3, h4 {
  font-family: Archivo, sans-serif;
  font-weight: 900;
  letter-spacing: -0.015em;
  line-height: 1;
  margin: 0 0 12mm;
  color: inherit;
  word-spacing: 0.02em;
}
h1 { font-size: 48pt; letter-spacing: -0.02em; line-height: 0.98; word-spacing: 0.03em; }
h2 { font-size: 26pt; line-height: 1.08; letter-spacing: -0.015em; }
h3 { font-size: 16pt; letter-spacing: -0.01em; }
h4 { font-size: 12pt; letter-spacing: -0.005em; }

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9pt;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
.night .mono { color: rgba(255,255,255,0.6); }
.cobalt .mono { color: rgba(255,255,255,0.7); }

.kicker {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5pt;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,0.6);
  margin-bottom: 8mm;
}
.night .kicker {
  color: var(--leaf);
  background: rgba(214,228,92,0.1);
  border-color: rgba(214,228,92,0.4);
}
.cobalt .kicker {
  color: var(--leaf);
  background: rgba(255,255,255,0.05);
  border-color: rgba(214,228,92,0.4);
}

p { margin: 0 0 5mm; font-size: 10.5pt; line-height: 1.55; color: inherit; }
p.lead { font-size: 13pt; line-height: 1.45; color: rgba(5,7,35,0.78); }
.night p.lead { color: rgba(255,255,255,0.82); }
.cobalt p.lead { color: rgba(255,255,255,0.85); }

strong { font-weight: 700; }

/* ===== Header / Footer ===== */
.header-bar {
  position: absolute;
  top: 12mm;
  left: 22mm;
  right: 22mm;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8pt;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  padding-bottom: 4mm;
  border-bottom: 1px solid var(--line);
}
.night .header-bar, .cobalt .header-bar { color: rgba(255,255,255,0.5); border-color: rgba(255,255,255,0.12); }

.header-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-family: Archivo, sans-serif;
  font-weight: 900;
  font-size: 11pt;
  letter-spacing: -0.02em;
  text-transform: none;
}
.header-logo .dot { color: var(--orange); }
.night .header-logo, .cobalt .header-logo { color: var(--white); }

.footer-bar {
  position: absolute;
  bottom: 12mm;
  left: 22mm;
  right: 22mm;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8pt;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  padding-top: 4mm;
  border-top: 1px solid var(--line);
}
.night .footer-bar, .cobalt .footer-bar { color: rgba(255,255,255,0.5); border-color: rgba(255,255,255,0.12); }

.page-content {
  margin-top: 18mm;
  margin-bottom: 18mm;
}

/* ===== Cover (p1) ===== */
.cover {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22mm;
  background:
    radial-gradient(circle at 90% 10%, rgba(18,56,255,0.6), transparent 35%),
    radial-gradient(circle at 10% 90%, rgba(255,91,34,0.35), transparent 40%),
    var(--night);
  color: var(--white);
}
.cover .logo-block {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Archivo, sans-serif;
  font-weight: 900;
  font-size: 22pt;
  letter-spacing: -0.015em;
}
.cover .logo-mark {
  width: 12mm;
  height: 12mm;
  border-radius: 3mm;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.6), transparent 28%),
    conic-gradient(from 220deg, var(--cobalt), var(--orange), var(--pink), var(--leaf), var(--cobalt));
}
.cover .logo-dot { color: var(--orange); }
.cover h1 {
  font-size: 44pt;
  line-height: 1.02;
  letter-spacing: -0.015em;
  word-spacing: 0.03em;
  max-width: 166mm;
  hyphens: none;
  word-break: keep-all;
}
.cover .cover-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9pt;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--leaf);
}
.cover .cover-sub {
  font-size: 14pt;
  line-height: 1.4;
  color: rgba(255,255,255,0.78);
  max-width: 150mm;
  margin-top: 8mm;
}
.cover .cover-footer {
  display: flex;
  justify-content: space-between;
  align-items: end;
  color: rgba(255,255,255,0.55);
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5pt;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

/* ===== L'essentiel grid p2 ===== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6mm;
  margin-top: 8mm;
}
.stat {
  padding: 6mm;
  border-radius: 4mm;
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 3mm;
}
.stat .stat-num {
  font-family: Archivo, sans-serif;
  font-size: 38pt;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 1mm;
}
.stat .stat-num .pct {
  font-size: 22pt;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.stat .stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8pt;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
.stat .stat-title {
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: 12pt;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.stat .stat-text {
  font-size: 9.5pt;
  line-height: 1.45;
  color: rgba(5,7,35,0.66);
}
.stat .stat-source {
  font-family: 'JetBrains Mono', monospace;
  font-size: 7.5pt;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: auto;
  padding-top: 2mm;
  border-top: 1px solid var(--line);
}
.stat.cobalt-stat .stat-num { color: var(--cobalt); }
.stat.orange-stat .stat-num { color: var(--orange); }
.stat.leaf-stat .stat-num { color: var(--olive); }
.stat.night-stat .stat-num { color: var(--night); }
.stat.pink-stat .stat-num { color: var(--pink); }
.stat.olive-stat .stat-num { color: var(--olive); }

/* ===== Préface ===== */
.preface {
  display: flex;
  flex-direction: column;
  gap: 8mm;
  margin-top: 4mm;
}
.preface p {
  font-size: 11pt;
  line-height: 1.65;
  color: rgba(5,7,35,0.85);
}
.preface .signature {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9pt;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6mm;
}
.preface .signature b {
  color: var(--ink);
  font-family: Archivo, sans-serif;
  font-size: 13pt;
  text-transform: none;
  letter-spacing: -0.01em;
  display: block;
  margin-bottom: 1mm;
}

/* ===== NSS axes (p8) ===== */
.axes {
  display: grid;
  gap: 4mm;
  margin-top: 6mm;
}
.axe-row {
  display: grid;
  grid-template-columns: 38mm 1fr 22mm;
  align-items: center;
  gap: 6mm;
  padding: 5mm;
  background: var(--white);
  border-radius: 3mm;
  border: 1px solid var(--line);
}
.axe-name {
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: 13pt;
  letter-spacing: -0.015em;
}
.axe-bar {
  position: relative;
  height: 6mm;
  background: rgba(5,7,35,0.05);
  border-radius: 999px;
  overflow: hidden;
}
.axe-bar::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line-strong);
}
.axe-bar .fill {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--positive);
  border-radius: 999px;
}
.axe-bar .fill.neg { background: var(--negative); }
.axe-val {
  font-family: Archivo, sans-serif;
  font-weight: 900;
  font-size: 18pt;
  text-align: right;
  letter-spacing: -0.01em;
}
.axe-val.pos { color: var(--positive); }
.axe-val.neg { color: var(--negative); }

/* ===== Classement sectoriel ===== */
.sectors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5mm;
  margin-top: 4mm;
}
.sector {
  padding: 5mm;
  background: var(--white);
  border-radius: 3mm;
  border: 1px solid var(--line);
  break-inside: avoid;
}
.sector .sector-name {
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: 11pt;
  letter-spacing: -0.015em;
  margin-bottom: 3mm;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.sector .sector-median {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8pt;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 700;
}
.sector ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2mm;
}
.sector li {
  display: grid;
  grid-template-columns: 8mm 1fr auto;
  gap: 3mm;
  align-items: baseline;
  font-size: 10pt;
  padding: 1mm 0;
  border-bottom: 1px solid var(--line);
}
.sector li:last-child { border: 0; }
.sector li .rank {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8pt;
  color: var(--muted);
  font-weight: 700;
}
.sector li .brand-name {
  font-family: Archivo, sans-serif;
  font-weight: 700;
}
.sector li .score {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--cobalt);
}

/* ===== LLM coverage table ===== */
.llm-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 6mm;
  font-size: 10pt;
}
.llm-table th {
  text-align: left;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8pt;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  padding: 3mm 4mm;
  border-bottom: 1px solid var(--line-strong);
  background: rgba(5,7,35,0.02);
}
.llm-table td {
  padding: 4mm;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.llm-table tr:last-child td { border-bottom: 0; }
.llm-table td.name { font-family: Archivo, sans-serif; font-weight: 700; font-size: 11pt; }
.llm-table td.num { font-family: 'JetBrains Mono', monospace; font-weight: 700; }
.llm-table .alert {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 7.5pt;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
  padding: 1mm 2mm;
  border-radius: 2mm;
  background: rgba(255,91,34,0.13);
  color: var(--orange);
  margin-right: 2mm;
}

/* ===== Big stat / hero ===== */
.hero-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4mm;
  padding: 12mm;
  background: var(--white);
  border-radius: 5mm;
  border: 1px solid var(--line);
  margin-top: 8mm;
}
.hero-stat .num {
  font-family: Archivo, sans-serif;
  font-weight: 900;
  font-size: 96pt;
  line-height: 0.92;
  letter-spacing: -0.025em;
  word-spacing: 0;
  color: var(--cobalt);
}
.hero-stat .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9pt;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4mm;
}
.hero-stat .desc {
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: 18pt;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 140mm;
}
.hero-stat.orange .num { color: var(--orange); }
.hero-stat.olive .num { color: var(--olive); }

/* ===== Actions list (p14) ===== */
.actions {
  display: flex;
  flex-direction: column;
  gap: 5mm;
  margin-top: 6mm;
}
.action {
  display: grid;
  grid-template-columns: 14mm 1fr;
  gap: 5mm;
  padding: 5mm 6mm;
  background: var(--white);
  border-radius: 3mm;
  border: 1px solid var(--line);
}
.action .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18pt;
  font-weight: 900;
  color: var(--cobalt);
  line-height: 1;
}
.action h4 {
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: 12pt;
  letter-spacing: -0.015em;
  margin: 0 0 2mm;
}
.action p { font-size: 9.5pt; color: rgba(5,7,35,0.66); margin: 0; line-height: 1.5; }

/* ===== CTA / À propos ===== */
.about {
  margin-top: 10mm;
}
.about p { font-size: 11pt; line-height: 1.6; }
.cta-card {
  margin-top: 10mm;
  padding: 10mm;
  background: var(--cobalt);
  color: var(--white);
  border-radius: 5mm;
}
.cta-card h3 {
  color: var(--white);
  font-size: 20pt;
  margin: 0 0 5mm;
}
.cta-card p { color: rgba(255,255,255,0.88); }
.cta-card .cta-url {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10pt;
  letter-spacing: 0.12em;
  color: var(--leaf);
  margin-top: 6mm;
  font-weight: 700;
}

/* ===== Back cover ===== */
.back-cover {
  background: var(--night);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22mm;
}
.back-cover h2 {
  font-size: 30pt;
  max-width: 150mm;
  color: var(--white);
}
.back-cover .credits {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5pt;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  font-weight: 700;
  line-height: 1.8;
}

/* ===== Source notes ===== */
.source-note {
  margin-top: 6mm;
  padding: 4mm 5mm;
  background: rgba(5,7,35,0.03);
  border-left: 2px solid var(--cobalt);
  font-size: 9pt;
  line-height: 1.5;
  color: var(--muted);
  border-radius: 2mm;
}
.night .source-note, .cobalt .source-note {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
}

/* ===== Screen preview only ===== */
@media screen {
  body { background: #e9e9ee; padding: 20px 0; }
  .page {
    margin: 12px auto;
    box-shadow: 0 14px 40px rgba(0,0,0,0.18);
  }
}

/* ===================================================================== */
/* VOL.02 — ajouts (citations partageables, carte Index GME, glossaire)  */
/* ===================================================================== */

/* Bloc citation (screenshot-able, partage social) */
.quote {
  margin-top: 8mm; padding: 11mm; border-radius: 5mm;
  background: linear-gradient(135deg, var(--night) 0%, #07105f 62%, var(--cobalt) 100%);
  color: var(--white);
}
.quote p {
  font-family: Archivo, sans-serif; font-weight: 800; font-size: 21pt;
  line-height: 1.18; letter-spacing: -0.02em; color: var(--white); margin: 0;
}
.quote .quote-cite {
  font-family: 'JetBrains Mono', monospace; font-size: 8pt; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--leaf); margin-top: 6mm; font-weight: 700;
}

/* Carte Index GME (le score de référence Forhia) */
.gme-card {
  margin-top: 8mm; padding: 10mm; border-radius: 5mm;
  background: var(--white); border: 1px solid var(--line-strong);
}
.gme-card .gme-lenses { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; margin-top: 6mm; }
.gme-lens { background: rgba(18,56,255,0.04); border: 1px solid var(--line); border-radius: 3mm; padding: 5mm; }
.gme-lens .lens-label {
  font-family: 'JetBrains Mono', monospace; font-size: 8pt; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--cobalt); font-weight: 700;
}
.gme-lens h4 { font-family: Archivo, sans-serif; font-weight: 800; font-size: 13pt; margin: 2mm 0; letter-spacing: -0.01em; }
.gme-lens p { font-size: 9pt; line-height: 1.5; color: rgba(5,7,35,0.66); margin: 0; }
.gme-formula {
  font-family: 'JetBrains Mono', monospace; font-size: 10pt; letter-spacing: 0.04em;
  color: var(--cobalt); margin-top: 6mm; font-weight: 700;
}

/* Glossaire */
.glossary { display: grid; grid-template-columns: 1fr 1fr; gap: 0 9mm; margin-top: 5mm; }
.term { padding: 4mm 0; border-top: 1px solid var(--line); }
.term dt { font-family: Archivo, sans-serif; font-weight: 800; font-size: 10.5pt; letter-spacing: -0.01em; color: var(--cobalt); }
.term dd { margin: 1.5mm 0 0; font-size: 9pt; line-height: 1.5; color: rgba(5,7,35,0.72); }

/* Tableau d'honneur compact */
.honor { display: grid; grid-template-columns: 1fr 1fr; gap: 3mm 5mm; margin-top: 5mm; }
.honor-row {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 3mm;
  padding: 3mm 4mm; background: var(--white); border: 1px solid var(--line); border-radius: 2.5mm;
}
.honor-row .h-sector { font-family: 'JetBrains Mono', monospace; font-size: 7.5pt; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 0.5mm; }
.honor-row .h-brand { font-family: Archivo, sans-serif; font-weight: 800; font-size: 11pt; letter-spacing: -0.01em; }
.honor-row .h-score { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 12pt; color: var(--cobalt); }

/* ===== Responsive mobile (partage social) ===== */
@media (max-width: 820px) {
  body { background: var(--cream); padding: 0; }
  .page { width: 100%; min-height: 0; padding: 26px 18px; margin: 0; box-shadow: none !important; border-bottom: 1px solid var(--line); }
  .cover { min-height: 88vh; }
  .cover h1 { font-size: 30pt; max-width: 100%; }
  .cover .cover-sub { font-size: 12pt; }
  h2 { font-size: 24pt; }
  .stats-grid, .sectors, .glossary, .gme-card .gme-lenses, .honor { grid-template-columns: 1fr; }
  .hero-stat { padding: 26px; }
  .hero-stat .num { font-size: 58pt; }
  .hero-stat .desc { font-size: 15pt; }
  .quote { padding: 26px; }
  .quote p { font-size: 16pt; }
  .axe-row { grid-template-columns: 1fr auto; gap: 3mm; }
  .action { grid-template-columns: 10mm 1fr; }
  .back-cover { padding: 26px 18px; }
  .back-cover h2 { font-size: 24pt; }
}
