/* Styles pour la carte avec ombrage */

#map {
  height: 70vh;
  width: 100%;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
}

#logo {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 85px;
  z-index: 1000;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  opacity: 0.8;
}

#dateDisplay {
  z-index: 401;
  position: absolute;
  text-transform: capitalize;
  left: 49px;
  top: 23px;
  background-color: rgba(22, 61, 118, 0.8);
  color: white;
  padding: 10px 15px;
  border-radius: 5px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
  font-size: 12px;
}

#postObservation {
  z-index: 401;
  position: absolute;
  text-transform: capitalize;
  left: 49px;
  top: 70px;
  background-color: rgba(22, 61, 118, 0.8);
  color: white;
  padding: 10px 15px;
  border-radius: 5px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
  font-size: 12px;
}

#dateDisplayIframe {
  z-index: 401;
  position: absolute;
  text-transform: capitalize;
  left: 50px;
  top: 75px;
  background-color: rgba(22, 61, 118, 0.8);
  color: white;
  padding: 10px 15px;
  border-radius: 5px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
  font-size: 12px;
}

#postObservationCarte {
  z-index: 401;
  position: absolute;
  text-transform: capitalize;
  left: 50px;
  top: 121px;
  background-color: rgba(22, 61, 118, 0.8);
  color: white;
  padding: 10px 15px;
  border-radius: 5px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
  font-size: 12px;
}

#captureButton {
  margin-left: 14px;
  cursor: pointer;
  align-items: center;
  display: flex;
  justify-content: center;
  margin-right: 10px;
}

.popup-content {
  font-family: Arial, sans-serif;
  font-size: 14px;
}

.popup-content h3 {
  margin: 0;
  padding: 0;
  font-size: 16px;
  color: #333;
}

.popup-content table {
  width: 100%;
  border-collapse: collapse;
}

.popup-content th,
.popup-content td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.popup-content th {
  background-color: #f2f2f2;
  font-weight: bold;
}

.temp-legend {
  display: block;
}

.humidity-legend {
  display: none;
}

.wind-legend {
  display: none;
}

.rainfall-legend {
  display: none;
}

.solar-legend {
  display: none;
}

.visibility-legend {
  display: none;
}

.snow-legend {
  display: none;
}

.observation-legend {
  display: none;
}

.post-observation {
  display: none;
}

.credits {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 401;
  text-transform: capitalize;
  background-color: rgba(22, 61, 118, 0.8);
  color: white;
  padding: 5px;
  border-radius: 5px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
  font-size: 12px;
}

.credits p {
  margin: 0;
  padding: 0;
  font-size: 12px;
}

.leaflet-touch .leaflet-control-attribution {
  display: none;
}

.monthlyRain {
  display: flex;
  justify-content: center;
  font-size: large;
  margin-top: 20px;
}

#monthlyRainTotal {
  font-weight: bold;
}

.legend {
  max-height: 473px;
  width: 162px;
  overflow: auto;
  background: white;
  border: 1px solid #ccc;
  padding: 10px;
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 1000;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: none;
  transition: all 0.3s ease;
}

.legend::-webkit-scrollbar {
  width: 10px;
}

.legend::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.legend::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 10px;
  border: 2px solid #ccc;
}

.legend::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}

.close-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-size: 16px;
  color: #888;
}

.close-icon:hover {
  color: #000;
}

.legend-control {
  background: white;
  border: 1px solid #ccc;
  padding: 2px;
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 1000;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  transition: all 0.3s ease;
}

.toggle-legend {
  position: relative;
  padding: 2px;
  display: flex;
  /* Masqué par défaut */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
}

.toggle-legend i {
  margin-left: 5px;
  color: #888;

  &:hover {
    color: #000;
  }
}

.dataTables_scroll {
  margin: auto;
}

.legend p:nth-of-type(2) {
  display: flex;
  justify-content: center;
}

.legend-text {
  z-index: 10000;
  display: flex;
  position: relative;
}

.legend h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

.legend div {
  margin: 2px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.temp-legend p,
.wind-legend p,
.humidity-legend p,
.rainfall-legend p,
.solar-legend p,
.visibility-legend p,
.snow-legend p {
  display: flex;
  justify-content: center;
}

.legend .circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.legend .small-circle {
  width: 12px;
  height: 12px;
}

.legend .large-circle {
  width: 30px;
  height: 30px;
  background-color: #163d76;
  /* Couleur des clusters */
}

.legend .medium-circle {
  width: 20px;
  height: 20px;
  background-color: #2f83ff;
  margin: 0px 14px 0px 5px;
  /* Couleur des stations */
}

.legend .label {
  margin-left: 5px;
}

.legend .container-temp {
  display: block;
  margin-left: 9px;
}

/* Style pour réduire la taille du titre */
h1 {
  font-size: 1.5rem;
  /* Réduction de la taille du titre */
  font-weight: bold;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  align-items: center;
}

.form-group label {
  margin: auto 10px auto 0;
  /* Espacement entre le label et le menu déroulant */
}

.form-group select {
  flex-grow: 1;
  /*Prend la place restante */
}

.wind-icon {
  position: relative;
  width: 30px;
  height: 30px;
}

.leaflet-tooltip.temp-label {
  background-color: transparent;
  /* Rendre le fond transparent */
  border: none;
  /* Enlever la bordure */
  color: white;
  /* Ou toute autre couleur qui contraste bien */
  font-weight: bold;
  font-size: 12px;
  text-align: center;
  padding: 0;
  /* Retirer le padding pour que le texte soit bien centré */
  box-shadow: none;
  /* Retirer l'ombre par défaut */
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
    1px 1px 0 #000;
  /* Bordure noire autour du texte */
}

.dataTables_wrapper
  .dataTables_scroll
  div.dataTables_scrollBody
  > table
  > tbody
  > tr
  > td {
  background-color: #717e8b;
}

@media (max-width: 800px) {
  #logo {
    display: none;
  }
}

/* Styles pour les écrans de petite taille */
@media (max-width: 600px) {
  .legend {
    padding: 8px;
    font-size: 12px;
    /* Réduit la taille du texte de la légende */
    bottom: 10px;
    left: 10px;
    width: auto;
    max-width: 90%;
  }

  .legend h4 {
    font-size: 14px;
    /* Réduit la taille du titre */
  }

  .legend div {
    font-size: 12px;
    /* Réduit la taille du texte des éléments de légende */
  }

  .legend .circle {
    width: 15px;
    height: 15px;
    font-size: 10px;
  }

  .legend .small-circle {
    width: 10px;
    height: 10px;
  }

  .legend .large-circle {
    width: 20px;
    height: 20px;
  }

  .legend .medium-circle {
    width: 15px;
    height: 15px;
  }

  .close-icon {
    font-size: 14px;
  }

  .form-group {
    flex-direction: column;
  }

  .form-group select {
    font-size: small;
  }

  #dateDisplayIframe {
    top: 77px;
  }

  #filter-container {
    top: 11px !important;
    padding: 5px !important;
  }

  #logo {
    display: none;
  }
}

/* Styles pour les écrans très petits, comme les téléphones en portrait */
@media (max-width: 400px) {
  .legend {
    padding: 6px;
    font-size: 10px;
    /* Réduit encore plus la taille du texte de la légende */
    bottom: 10px;
    left: 10px;
    width: auto;
    max-width: 95%;
    max-height: 472px;
  }

  .legend h4 {
    font-size: 12px;
    /* Réduit la taille du titre */
  }

  .legend div {
    font-size: 10px;
    /* Réduit la taille du texte des éléments de légende */
  }

  .legend .circle {
    width: 12px;
    height: 12px;
    font-size: 8px;
  }

  .legend .small-circle {
    width: 8px;
    height: 8px;
  }

  .legend .large-circle {
    width: 15px;
    height: 15px;
  }

  .legend .medium-circle {
    width: 12px;
    height: 12px;
  }

  .close-icon {
    font-size: 12px;
  }
  #logo {
    display: none;
  }
}
