/* Header bar */
#header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background-color: #0f7e8a;
  padding: 10px 20px;
  
  
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  height: 60px; /* Hauteur du header */
}

/* Logo alignement */
#log {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.logo:hover {
  transform: scale(1.1);
}

#header-title {
  flex: 1;
  text-align: center;
  font-size: 30px;
  font-weight: bold;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 20px;
}

.titlelogo {
  background: rgba(240, 248, 255, 0.7);
  color: #333;
  font-size: 12px;
  padding: 8px 15px;
  border: 1px solid #DCDCDC;
  text-decoration: none;
  border-radius: 20px;
  transition: background 0.3s ease;
}

.titlelogo:hover {
  background: rgba(240, 248, 255, 0.9);
}

/* Menu de navigation sous le header */
#navbar {
  display: flex;
  justify-content: center;
  gap: 0px;
  background-color: #0f7e8a;  /* Même couleur que le header */
  padding: 10px 0;
  width: 100%;
  position: fixed;
  top: 80px;  /* Placer juste en dessous du header */
  z-index: 999;  /* Juste en dessous du header */
 left: 0;     /* Aligner à gauche sans espace */
   box-sizing: border-box;
  margin-left: 0;  /* Supprimer tout espace à gauche */
  margin-right: 0; /* Supprimer tout débordement à droite */
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3);
 
}

/* Liens du menu */
.nav-link {
  color: white;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  padding: 10px 15px;
  border-radius: 20px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Effet au survol des liens du menu */
.nav-link:hover {
  background-color: #0056b3;
  color: #ffffff;
}

/* Lien actif */
.nav-link.active {
  background-color: #005a9e;
  color: white;
}

/* Contenu principal */
.container {
  display: flex;
  height: calc(100vh - 160px);  /* Réduit la hauteur pour tenir compte du header et du menu */
  gap: 10px;
  padding: 20px;
  box-sizing: border-box;
  margin-top: 120px;  /* Espacement entre le header, le menu et le contenu */
}

/* Partie gauche : carte */
.left-panel {
  width: 45%;
  display: flex;
  flex-direction: column;
}

/* Partie droite : carte */
.right-panel {
  flex: 1;
  border: 1px solid #ccc;
  position: relative;
}

/* Boutons de bascule */
.switch-group {
  margin-bottom: 10px;
}

.btn-switch {
  margin-right: 8px;
  padding: 6px 12px;
  border: 1px solid #0078d7;
  background: white;
  cursor: pointer;
  border-radius: 4px;
  font-weight: 600;
}

.btn-switch.active {
  background: #0078d7;
  color: white;
}

/* Conteneur des graphiques */
.charts {
  flex: 1;
  overflow-y: auto;
}

#chart {
  height: 450px;
  margin-bottom: 10px;
}

/* Carte Leaflet */
#map {
  height: 100%;
  width: 100%;
  background-color: #ccc;
}

/* Loader */
.loader {
  position: fixed;
  top: 50%;
  left: 50%;
  background: rgba(255, 255, 255, 0.9);
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: bold;
  display: none;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px rgba(0,0,0,0.25);
  z-index: 1000;
}
