/* Fond global et conteneur */
.vigilance-container {
  background-color: #eef2f7;
  padding: 25px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #1a3a5a;
}

/* Titre principal */
.vigilance-container h2 {
  color: #002b5c;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

/* Section du haut : Dates */
.meteo-controls-top {
  background: #fff;
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.date-label {
  font-weight: bold;
  color: #444;
}

/* Layout principal : Tableau à gauche, Carte à droite */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 25px;
  align-items: start;
}

/* Carte Blanche pour les sections */
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  padding: 15px;
}

/* --- TABLEAU TYPE CAPTURE --- */
.vigilance-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  /* Espace entre les lignes */
}

.vigilance-table tr {
  background: #f8fbff;
  border: 1px solid #dce7f2;
}

.vigilance-table td {
  padding: 15px;
  border-top: 1px solid #dce7f2;
  border-bottom: 1px solid #dce7f2;
}

.vigilance-table td:first-child {
  border-left: 1px solid #dce7f2;
  border-radius: 8px 0 0 8px;
  width: 60px;
  text-align: center;
}

.vigilance-table td:last-child {
  border-right: 1px solid #dce7f2;
  border-radius: 0 8px 8px 0;
}

.pheno-icon-cell i {
  font-size: 24px;
  color: #555;
}

.pheno-name {
  font-weight: bold;
  color: #004085;
  display: block;
  margin-bottom: 4px;
}

.zone-list {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}

.validity-text {
  font-size: 11px;
  color: #002b5c;
  font-style: italic;
  margin-top: 5px;
  display: block;
}

/* Indicateur de couleur à gauche de la ligne */
.level-indicator {
  width: 50px;
  height: 100%;
  border-radius: 4px;
}

/* --- CARTE ET FILTRES --- */
.map-section {
  position: relative;
  height: 600px;
  border-radius: 12px;
}

#map {
  height: 100% !important;
  border-radius: 12px;
  background-color: #fff !important;
}

/* Filtres flottants sur la carte */
#meteo-filters {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 15px;
  border-radius: 50px;
  display: flex;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-dynamic,
#reset-phenos,
#reset-levels {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s;
}

.btn-dynamic.active {
  border-color: #007bff;
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
}

/* Légendes en bas */
.legends-container.card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 25px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
}

.legend-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
}

.sq {
  width: 35px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 3px;
}

.leaflet-bottom .leaflet-right {
  display: none !important;
}

.filter-group .phenos i {
  font-size: 24px;
  color: #004085;
}

.date-buttons {
  display: flex;
  gap: 10px;
}

.date-btn {
  padding: 10px 18px;
  border: 1px solid #d1d9e6;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: 0.3s;
  font-size: 14px;
}

.date-btn.active {
  background: #003366;
  color: white;
  border-color: #003366;
  box-shadow: 0 4px 10px rgba(0, 51, 102, 0.2);
}

.leaflet-bottom.leaflet-right {
  display: none !important;
}

.sq.red {
  background-color: #ff3300;
}
.sq.orange {
  background-color: #ffcc00;
}

.sq.yellow {
  background-color: #ffff00;
}

.sq.green {
  background-color: #33cc33;
}

/* Style général du tableau */
#meteo-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

#meteo-table td {
  border: 1px solid #d1d9e4;
  padding: 12px;
  vertical-align: middle;
  background-color: #f0f4f9;
}

.row-header td {
  border-bottom: none;
}

.icon-wrapper {
  background: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #444;
}

.level-box {
  width: 45px;
  height: 45px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.1);
}

.cell-title strong {
  color: #1a2b49;
  font-size: 14px;
}

.cell-validity {
  color: #1a2b49;
  font-size: 12px;
  line-height: 1.4;
}

.zone-text {
  color: #1a2b49;
  font-weight: bold;
  font-size: 13px;
}

.cell-icon, .cell-level {
  width: 70px;
  text-align: center;
}

.city-label-map span {
  font-size: 11px;
  font-weight: bold;
  color: #000;
  text-shadow: 1px 1px 0px #fff;
  white-space: nowrap;
}

.map-loading::after {
  content: "";
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(25, 25, 25, 0.5);
  z-index: 9999;
}

.map-loading::before {
  width: 60px;
  height: 60px;
  border: 4px solid #a5a7a9;
  border-top-color: rgb(0, 55, 114);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: fixed;
  content: "";
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(180deg); }
  100% { transform: rotate(360deg); }
}
.leaflet-interactive {
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.5)) !important;
}
/**Font Family **/
.leaflet-container {
  font-family: 'Ubuntu-Medium' !important;
}

html[dir="rtl"] .leaflet-container {
  font-family: 'Cairo', sans-serif !important;
  font-weight: 500 !important;
}
html[dir="rtl"] .city-label-map {
  margin-left: -73px !important;
  margin-top: -3px !important;
}
@media(max-width: 600px) {
  #map {
    background-color: transparent !important;
  }
}