/* styles.css — Layout vertical avec bannières séparatrices */

/* Variables */
:root {
  --bg: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --panel: #f5f7fb;
  --border: #e5e7eb;
  --primary: #334155;
  --accent: #4e79a7;
  --accent-2: #f28e2b;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Open Sans", Arial, sans-serif;
  line-height: 1.45;
}

/* Conteneur global */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

/* Header */
.site-header {
  text-align: center;
  margin-bottom: 20px;
}
.site-header h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}
.site-header .subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Bannière séparatrice */
.banner {
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  margin: 24px 0 12px;
  border-radius: 6px;
}
.banner h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

/* Section de visualisation */
.viz-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

/* Contrôles */
#map-controls, .chart-controls {
  margin-bottom: 12px;
}
#map-controls label, .chart-controls label {
  margin-right: 10px;
  color: var(--primary);
  font-size: 14px;
}
#map-controls select, #countrySelect, #countrySearch {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
}

/* Carte */
#map {
  width: 100%;
  height: auto;
  display: block;
}
.country {
  transition: fill 0.25s ease, stroke 0.2s ease;
}
.country:hover {
  stroke: #444;
  stroke-width: 0.7;
}

/* Graphique */
#chart {
  min-height: 400px;
  width: 100%;
}

/* Tooltip */
#tooltip {
  position: absolute;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  opacity: 0;
  pointer-events: none;
  font-size: 13px;
  color: var(--text);
  z-index: 9999;
}
#tooltip strong {
  color: var(--primary);
}

/* Bannière pas de données */
#no-data-banner {
  margin: 8px 0;
  color: #b91c1c;
  font-weight: 600;
}

/* Dropdown pays */
.dropdown {
  position: relative;
  display: inline-block;
  margin-top: 10px;
}
.dropdown button {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.dropdown-menu {
  position: absolute;
  background: white;
  border: 1px solid var(--border);
  max-height: 200px;
  overflow-y: auto;
  padding: 5px;
  width: 250px;
  z-index: 1000;
}
.dropdown-menu label {
  display: block;
  cursor: pointer;
  margin-bottom: 4px;
}
