/* ─── INFOGRAPHIE.CSS — Jonathan Philippe 2027 ─── */
/* Nécessite common.css chargé avant */

:root {
  --teal: #2a7f7f;
  --teal-light: #3aafaf;
  --cream: #f8f5f0;
  --muted: #666;
  --max-w: 860px;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text);
  line-height: 1.5;
}

/* ─── HERO + STATS → dans common.css ─── */

/* ─── CONTENT ─── */
.content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px 64px;
}

/* ─── SECTIONS ─── */
.section { margin-top: 56px; }

/* section-header, section-num, section-title → dans common.css */
/* Override couleur pour les visuels */
.section-num { color: var(--teal); }
.section-header { border-bottom-color: var(--teal); }

/* ─── STAT ROWS ─── */
.stat-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid #e8e4df;
}

.stat-row:last-child { border-bottom: none; }

.stat-row .sr-num {
  font-family: var(--font-title);
  font-size: 1.6em;
  font-weight: 900;
  color: var(--teal);
  min-width: 90px;
  text-align: right;
  flex-shrink: 0;
}

.stat-row .sr-text {
  font-size: 0.92em;
  color: var(--text);
  line-height: 1.4;
}

.stat-row .sr-source {
  font-size: 0.75em;
  color: var(--muted);
  margin-top: 2px;
}

/* ─── MESURES ─── */
.mesures-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.mesure-card {
  background: white;
  border-left: 3px solid var(--teal);
  padding: 16px 18px;
  font-size: 0.88em;
  line-height: 1.5;
  color: var(--text);
}

.mesure-card strong {
  display: block;
  font-size: 0.78em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  margin-bottom: 6px;
}

/* ─── TABLEAU COMPARATIF ─── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.88em;
}

.compare-table th {
  background: var(--blue);
  color: white;
  padding: 10px 14px;
  text-align: left;
  font-family: var(--font-title);
}

.compare-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #e8e4df;
  vertical-align: top;
}

.compare-table tr:nth-child(even) td { background: white; }
.compare-table td strong { color: var(--accent); }

/* ─── BARRES ─── */
.bar-compare { margin: 20px 0; }

.bar-item {
  display: grid;
  grid-template-columns: 160px 1fr 80px;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.bar-label {
  font-size: 0.85em;
  font-weight: 600;
  text-align: right;
  color: var(--text);
}

.bar-track {
  background: #e8e4df;
  height: 28px;
  border-radius: 2px;
  overflow: hidden;
}

.bar-fill { height: 100%; border-radius: 2px; }
.bar-fill.red { background: #c0392b; }
.bar-fill.teal { background: var(--teal); }

.bar-pct {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.1em;
}

.bar-pct.red { color: #c0392b; }
.bar-pct.teal { color: var(--teal); }

/* ─── COMPARAISON CARDS ─── */
.compare-wrap { position: relative; width: 100%; margin: 20px 0 0; }

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0;
}

.compare-card {
  padding: 24px;
  border-radius: 4px;
}

.compare-card.bad { background: #fff; border: 2px solid #ddd; }
.compare-card.good { background: var(--blue); color: white; }

.compare-card .c-num {
  font-family: var(--font-title);
  font-size: 2.4em;
  font-weight: 900;
  line-height: 1;
  display: block;
  margin-bottom: 4px;
}

.compare-card.bad .c-num { color: var(--accent); }
.compare-card.good .c-num { color: var(--teal-light); }

.compare-card .c-label {
  font-size: 0.85em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: block;
}

.compare-card.bad .c-label { color: var(--muted); }
.compare-card.good .c-label { color: rgba(255,255,255,0.6); }

.compare-card .c-text { font-size: 0.9em; line-height: 1.5; }
.compare-card.bad .c-text { color: var(--text); }
.compare-card.good .c-text { color: rgba(255,255,255,0.85); }

.vs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 1.4em;
  font-weight: 900;
  color: var(--muted);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  background: var(--cream);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #ddd;
}

/* ─── BARRES EMPILÉES ─── */
.stacked-bar { display:flex; height:36px; border-radius:2px; overflow:hidden; margin:12px 0; }
.stacked-bar .segment { display:flex; align-items:center; justify-content:center; color:white; font-size:0.75em; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:0 4px; }
.stacked-legend { display:flex; flex-wrap:wrap; gap:12px 16px; margin:8px 0; font-size:0.82em; }
.stacked-legend span { display:flex; align-items:center; gap:6px; }
.stacked-legend .dot { width:10px; height:10px; border-radius:2px; display:inline-block; flex-shrink:0; }
@media (max-width:600px) {
  .stacked-bar .segment { font-size:0.62em; padding:0 2px; min-width:0; }
  .stacked-bar .segment-sm { font-size:0; padding:0; }
  .stacked-legend { font-size:0.75em; gap:6px 12px; }
  .stacked-legend span { gap:4px; }
}

/* ─── MINI-BARRES (éducation multi-colonnes) ─── */
.edu-row { display:grid; grid-template-columns:120px 1fr 1fr 1fr; gap:8px; align-items:center; margin-bottom:14px; }
.edu-row .country { font-size:0.85em; font-weight:600; text-align:right; color:var(--text); }
.edu-row .mini-bar { display:flex; align-items:center; gap:6px; }
.edu-row .mini-track { background:#e8e4df; height:18px; border-radius:2px; overflow:hidden; flex:1; }
.edu-row .mini-fill { height:100%; border-radius:2px; }
.edu-row .mini-val { font-size:0.75em; font-weight:700; white-space:nowrap; min-width:58px; }
.edu-header { display:grid; grid-template-columns:120px 1fr 1fr 1fr; gap:8px; margin-bottom:10px; }
.edu-header span { font-size:0.72em; font-weight:700; text-transform:uppercase; letter-spacing:0.08em; color:var(--muted); text-align:center; }
@media (max-width:600px) {
  .edu-row, .edu-header { display:none; }
  .edu-mobile { display:block !important; }
}
.edu-mobile { display:none; }

/* ─── NOTE CHIFFRÉE (sous les barres) ─── */
.bar-note { display:flex; align-items:baseline; gap:12px; margin:8px 0 0; font-size:0.88em; }
.bar-note .bar-note-num { font-family:var(--font-title); font-weight:900; color:var(--teal); font-size:1.2em; }
.bar-note .bar-note-text { color:var(--text); }
@media (max-width:600px) { .bar-note { margin-left:0; font-size:0.82em; } }

/* ─── CITATION ─── */
.citation {
  background: var(--blue);
  color: white;
  padding: 32px 40px;
  margin: 40px 0 0;
}

.citation p {
  font-family: var(--font-title);
  font-size: 1.15em;
  font-style: italic;
  line-height: 1.6;
}

/* ─── NAVIGATION BAS ─── */
.nav-bas { background: #f3f9f9; padding: 32px 24px; }

.nav-bas-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.nav-bas a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9em;
  border-bottom: 1px solid var(--teal);
  padding-bottom: 2px;
}

.nav-bas a:hover { color: var(--blue); border-bottom-color: var(--blue); }

/* ─── FOOTER ─── */
footer {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.85em;
  border-top: 1px solid #e0e0e0;
}

footer a { color: var(--teal); text-decoration: none; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .compare { grid-template-columns: 1fr; gap: 0; }
  .vs {
    position: static;
    transform: none;
    margin: -12px auto;
    z-index: 10;
  }
}

@media (max-width: 600px) {
  .mesures-grid { grid-template-columns: 1fr; }
  .bar-item { grid-template-columns: 100px 1fr 65px; }
  .bar-label { font-size: 0.78em; }
  .bar-pct { font-size: 0.9em; white-space: nowrap; }
  .content { padding: 0 20px 48px; }
}

@media print {
  .hero, .stats, .citation { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
