:root {
  --bg: #f8f9fc;
  --card: #ffffff;
  --text: #1a1a2e;
  --primary: #2563eb;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #e2e8f0;
  --light: #f1f5f9;
  --shadow: 0 4px 12px rgba(0,0,0,0.05);
  --orange: #f97316;
  --red-dark: #b91c1c;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
  padding: 1rem;
}

.container { max-width: 1200px; margin: 0 auto; }

/* TROIS COMPTEURS (Maastricht, Hors Bilan, Total) */
.triple-counter {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.counter-box {
  text-align: center;
  padding: 2rem 1rem;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  position: relative;
  overflow: hidden;
}

.counter-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
}

.counter-maastricht {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}
.counter-maastricht::before { background: #60a5fa; }

.counter-horsbilan {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
}
.counter-horsbilan::before { background: #fb923c; }

.counter-total {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: white;
}
.counter-total::before { background: #fca5a5; }

.counter-label {
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.counter-value {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin: 0.8rem 0;
  font-family: 'Courier New', monospace;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.counter-rate {
  font-size: 0.95rem;
  opacity: 0.85;
  font-weight: 600;
}

.counter-ratio {
  font-size: 0.85rem;
  margin-top: 0.6rem;
  opacity: 0.8;
}

.main-title {
  text-align: center;
  margin: 2rem 0 1.5rem;
}

.main-title h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #2563eb, #dc2626);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.status-bar {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); padding: 0.9rem 1.2rem; border-radius: 14px;
  margin-bottom: 1.8rem; font-size: 0.95rem; flex-wrap: wrap; gap: 1rem;
  box-shadow: var(--shadow);
}
.live-dot { width: 10px; height: 10px; background: var(--success); border-radius: 50%; animation: blink 2s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

.grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.3rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.card h3 { color: var(--primary); margin-bottom: 0.7rem; font-size: 1.05rem; font-weight: 600; }
.value { font-size: 1.8rem; font-weight: 700; color: var(--text); }
.unit { font-size: 0.85rem; color: #64748b; margin-left: 0.3rem; }

/* SECTION EXPLICATIONS LUDIQUES */
.explications {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #fbbf24;
  border-radius: 20px;
  padding: 2rem;
  margin: 3rem 0;
  box-shadow: 0 10px 30px rgba(251, 191, 36, 0.2);
}

.explications h2 {
  font-size: 1.8rem;
  color: #92400e;
  margin-bottom: 1.5rem;
  text-align: center;
  font-family: 'Poppins', sans-serif;
}

.expl-section {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.expl-section h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.emoji {
  font-size: 1.8rem;
}

.expl-maastricht { border-left: 4px solid #3b82f6; }
.expl-horsbilan { border-left: 4px solid #f97316; }
.expl-total { border-left: 4px solid #dc2626; }

.expl-content {
  font-size: 1rem;
  line-height: 1.8;
  color: #374151;
}

.expl-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.expl-list li {
  padding: 0.6rem 0.8rem;
  margin: 0.5rem 0;
  background: var(--light);
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.expl-list li::before {
  content: "?";
  color: var(--primary);
  font-weight: bold;
  font-size: 1.2rem;
}

.highlight {
  background: #fef3c7;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  color: #92400e;
}

.comparison-box {
  background: #f0fdf4;
  border: 2px dashed #10b981;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}

.comparison-box strong {
  font-size: 1.4rem;
  color: #065f46;
}

.influence-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}
.influence-table th, .influence-table td {
  border: 1px solid var(--border);
  padding: 0.8rem;
  text-align: left;
}
.influence-table th { background: var(--primary); color: white; }
.influence-table tr:nth-child(even) { background: var(--light); }
.influence-table .impact { font-weight: 600; color: var(--danger); }

.charts {
  display: grid;
  gap: 1.8rem;
  margin-top: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.chart-container {
  background: var(--card);
  padding: 1.4rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.disclaimer {
  background: #fee2e2;
  border: 2px solid #dc2626;
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  margin: 2.2rem 0;
  font-size: 0.92rem;
  color: #7f1d1d;
  box-shadow: var(--shadow);
}

.sources {
  font-size: 0.85rem;
  color: #64748b;
  text-align: center;
  margin-top: 2.5rem;
}
.sources a { color: var(--primary); text-decoration: none; font-weight: 500; }

footer {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #94a3b8;
  font-size: 0.88rem;
  margin-top: 3rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .triple-counter {
    grid-template-columns: 1fr;
  }
  .counter-value { font-size: 2rem; }
  .explications { padding: 1.5rem; }
  .expl-section h3 { font-size: 1.1rem; }
}