:root {
  --blue-dark: #1e293b;
  --green: #10b981;
  --green-dark: #059669;
  --gray-light: #f5f5f5;
  --gray-medium: #e0e0e0;
  --gray-dark: #666666;
  --white: #ffffff;
  --shadow: 0 4px 20px rgba(24, 53, 90, 0.1);
  --shadow-lg: 0 8px 40px rgba(24, 53, 90, 0.15);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--blue-dark);
  line-height: 1.6;
  background: var(--white);
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

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

/* Header */
.header {
  background: var(--white);
  padding: 20px 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
}

.header .logo span {
  color: var(--green);
}

.header .nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.btn {
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--green-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--blue-dark);
  border: 2px solid var(--blue-dark);
}

.btn-secondary:hover {
  background: var(--blue-dark);
  color: var(--white);
}

/* Main content */
.main {
  padding: 40px 0;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 20px;
  background: var(--white);
  border: 1px solid var(--gray-medium);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

/* Tableau */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.data-table th,
.data-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid var(--gray-medium);
}

.data-table th {
  background: var(--blue-dark);
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover {
  background: var(--gray-light);
}

/* Cartes */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 25px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.card h2 {
  margin-bottom: 20px;
  font-size: 1.25rem;
  color: var(--blue-dark);
}

/* Gridlayout */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.stat-card {
  text-align: center;
  padding: 25px;
}

.stat-card h3 {
  color: var(--gray-dark);
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--green);
}

.stat-unit {
  font-size: 0.9rem;
  color: var(--gray-dark);
}

/* Leaderboard cards */
.leaderboard-card h2 {
  margin-bottom: 20px;
  font-size: 1.25rem;
  color: var(--blue-dark);
}

/* Chart container */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

/* Carte */
.map-container {
  height: 400px;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Footer */
.footer {
  background: var(--blue-dark);
  color: var(--white);
  padding: 40px 0 20px;
}

.footer .container {
  text-align: center;
}

.footer p {
  opacity: 0.7;
  font-size: 0.9rem;
}

/* Loading & Empty state */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-dark);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state p {
  color: var(--gray-dark);
  margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 992px) {
  .tabs {
    flex-direction: column;
  }
  
  .tab-btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    gap: 15px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .map-container {
    height: 300px;
  }
}
