:root {
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --green: #22c55e;
  --red: #ef4444;
  --gray: #9ca3af;
  --arrowTop: #1e293b;
  --arrowBot: #94a3b8;
  --cardBorder: rgba(15, 23, 42, .10);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.pageHeader{ 
    text-align: center; 
    color: #2c3e50; 
    margin-top: 0;
}
.subtitle { color: var(--muted); font-size: 14px; margin-top: 5px; }

.multiplesGrid {
  display: flex;
  flex-direction: column;
  gap: 25px;
  padding: 10px 40px 50px 40px;
}

.ageCard {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 30px; /* Plus d'espace sur les côtés */
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  width: 100%; /* La carte prend toute la largeur du conteneur */
}

.ageCard h2 {
  margin: 0 0 15px 0;
  font-size: 18px;
  color: #1e293b;
}

/* Répartition 55% Graphe / 45% Légende pour élargir le carré gris */
.cardLayout {
  display: grid;
  /* On fixe le ratio 2/3 (2fr) et 1/3 (1fr) */
  grid-template-columns: 2fr 1fr; 
  gap: 40px; /* Espace entre le graphe et le carré gris */
  align-items: center;
}

svgWrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  /* On enlève les limites de largeur pour que le SVG s'étale */
}

.vizSvg {
  width: 100%; /* Le SVG s'étire pour remplir les 2/3 de la carte */
  height: auto;
}

.cardLegend {
  background: #f1f5f9;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  width: 100%; 
  max-width: 350px; 
}
.badges { display: flex; gap: 10px; margin-bottom: 15px; }
.badge {
  padding: 6px 12px;
  border-radius: 6px;
  background: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.legendSection { margin-bottom: 15px; }
.legendTitle { font-size: 13px; font-weight: 800; color: #475569; margin-bottom: 8px; }

.legendRow {
  display: flex;
  align-items: center;
  margin: 6px 0;
  font-size: 14.5px; /* Texte légèrement plus grand */
  line-height: 1.4;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 10px;
  flex-shrink: 0;
}

@media (max-width: 1000px) {
  .cardLayout { grid-template-columns: 1fr; }
  .cardLegend { padding: 15px; }
}