/* ##############################################
   MENU DE NAVIGATION
   ############################################## 
*/
body {
  margin: 0;
  padding: 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-image: url('../styles/images/back_day.jpg');
  z-index: -99;
}


h1 {
    position: absolute;
    top: 40%; /* Ajustez cette valeur pour déplacer le titre verticalement */
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    font-size: 48px; 
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 10;
    padding: 20px; /* Ajoutez un peu de marge intérieure */
    background-color: rgba(0, 0, 0, 0.5); /* Couleur de fond avec transparence */
    border-radius: 10px; /* Bords arrondis */
}


.background-img {
  position: relative;
  margin: 0;
  width: 100%;
  min-height: 100vh;
  overflow: hidden; 
}

.background-img::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--bg-image); /* Utilisez une variable CSS pour l'image de fond */
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  filter: blur(3px);
  z-index: -1;
  transition: opacity 0.5s ease;
  opacity: 1;
}


.scroll-down-arrow {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.arrow {
    width: 0;
    height: 0;
    border-left: 15px solid transparent; /* Ajustez la largeur pour contrôler la taille du V */
    border-right: 15px solid transparent; /* Ajustez la largeur pour contrôler la taille du V */
    border-top: 30px solid white; /* Ajustez la hauteur pour contrôler la taille du V */
}

/*###########Bird Section###########*/

#all-bird {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: calc(250px * 5 ); /* Largeur maximale pour afficher cinq cartes d'oiseaux */
    margin: 0 auto; /* Pour centrer le conteneur */
  }
  
.bird-card {
  width: 200px; /* Largeur des cartes d'oiseaux */
  height: 200px;
  margin: 20px; /* Espacement entre les cartes */
  overflow: hidden;
  border: 1px solid #ccc;
  transition: transform 0.3s;
  border-radius: 10px; /* Rendre le cadre rond */
  position: relative; /* Ajout de la position relative pour le contenu de la carte */
  perspective: 1000px; /* Ajout de la perspective pour l'effet 3D */
  backface-visibility: hidden; /* Empêche l'affichage du visage arrière */
  cursor: pointer;
}

.bird-card:hover .bird-card-inner {
  transform: scale(1.05) rotateY(180deg); /* Ajustement pour l'effet de rotation au survol */
}

.bird-card img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ajustement de l'image à la taille du cadre */
  border-radius: 10px; /* Rendre l'image ronde */
  transition: filter 0.4s; /* Temps que le flou apparaisse avec la rotation */
} 

.bird-card:hover img {
  filter: blur(5px); /* Appliquer le flou à l'image au survol */
}

.bird-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.3s;
  transform-style: preserve-3d; /* Conserve la face avant visible pendant la rotation */
  overflow: hidden; /* Assurez-vous que le contenu débordant est masqué */
  margin: 0 auto;
}

.bird-name {
  position: absolute;
  margin-left: -7px;
  margin-top: 5px;
  transform: translate(-50%, -50%) rotateY(180deg) scale(-1, 1); /* Rotation uniquement sur l'axe Y */
  text-align: center;
  backface-visibility: hidden; /* Empêche l'affichage du nom à l'arrière de la carte */
  color: white; /* Couleur du texte */
  font-weight: bold; /* Style du texte */
  font-size: 18px; /* Taille de la police */
  padding: 5px 10px; /* Espacement autour du texte */
  background-color: rgba(0, 0, 0, 0.5); /* Couleur de fond semi-transparente */
  border-radius: 5px; /* Coins arrondis */
  min-width: 110px; /* Largeur minimale du cadre */
}

h2#bird-name {
  transition: 700ms ease;
  text-transform: uppercase;
  font-variation-settings: "wght" 311;
  color: #7871F3;
  font-size: 2.2em;
  font-weight: bold;
  margin: 3 auto;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

h2#bird-name:hover {
  font-variation-settings: "wght" 582; 
  letter-spacing: 3px;
}

.bird-info {
    margin: 0 auto;
    display: none;
    color: #ffffff;
    position: absolute;
    text-align: center;
}

.bird-card:hover .bird-name {
  -moz-transform: scale(-1, 1);
  -webkit-transform: scale(-1, 1);
  -o-transform: scale(-1, 1);
  -ms-transform: scale(-1, 1);
  transform: scale(-1, 1);
  left: 20%; /* Position horizontale au centre */
  top: 30%; /* Position verticale au centre */
  right: 25%;
  display: flex;
  justify-content: center;
}

/*########## Cadre informations oiseaux ##########*/

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  text-align: center;
  margin: 0 auto;
}

.modal-content {
  font-family: Arial, sans-serif;
  /* background-image: url('../styles/images/fond-tableau-oiseau.PNG'); /* Ajout de l'image de fond */
  background-color: #D0E9EB;
  opacity: 0.9;
  background-size: cover; /* Ajustement de la taille de l'image pour couvrir tout le cadre */
  background-repeat: no-repeat; /* Empêche la répétition de l'image */
  background-position: center; /* Centre l'image horizontalement et verticalement */
  margin: 4% auto; 
  padding: 10px 30px; /* Ajustez la marge intérieure pour plus d'espace */
  border: 1px solid #888;
  width: 70%; /* Utilisez la largeur de l'écran */
  height: 71%; /* Utilisez la hauteur de l'écran */
  overflow-y: auto;
  overflow-x: hidden; /* Masquer la barre de défilement horizontale */
  border-radius: 30px; /* Coins arrondis */
}

/* For WebKit-based browsers (Chrome, Safari) */
.modal-content::-webkit-scrollbar {
  width: 15px; /* Adjust scrollbar width */
  border-radius: 30px; /* Same as container border-radius */
}

.modal-content::-webkit-scrollbar-thumb {
  background-color: rgba(116, 116, 116, 0.5);
  border-radius: 10px; /* Same as container border-radius */
}

.modal-content::-webkit-scrollbar-track {
  border-radius: 10px; /* Same as container border-radius */
}


#bird-description {
  background-color: rgba(120, 113, 243, 0.1);
  border-color: rgba(120, 113, 243, 1);
  border-width: 20px;
  border-radius: 10px;
  padding: 20px;
  display: flex;
}

#bird-table {
  background-color: rgba(120, 113, 243, 0.1);
  border-color: rgba(120, 113, 243, 1);
  border-width: 20px;
  border-radius: 10px;
  padding: 20px;
  display: flex;
}

.bird-image {
  flex: 1; 
  margin-right: 10px;
  margin: auto auto;
}

.bird-image img {
  width: 80%;
  height: auto;
}

.bird-text {
  flex: 2; 
  padding: 15px;
  line-height: 1.25;
  font-family: Arial, sans-serif;
  font-size: 13px;
  text-align: justify;
  font-style: italic;
  letter-spacing: 0.5px;
  margin: auto auto;
}

.rectangle2 {
  width: 56%;
  background-color: transparent;
  border: 1px solid rgb(85, 80, 172);
  border-radius: 5px;
  margin: auto auto;
  margin-right: 7%;
}

.rectangle2 table {
  border-collapse: collapse; /* Fusionner les bordures de cellule */
}

.rectangle2 td {
  border-bottom: 1px solid rgb(85, 80, 172);
  padding: 10px;
  text-align: center;
  min-height: 48px;
  word-wrap: break-word;
  white-space: pre-wrap;
  font-size: 1em; /* Taille de police de base */
  margin-right: 10px;
}

.rectangle2 td:first-child {
  width: 30%;
  background-color: rgba(120, 113, 243, 0.1);
  border-top: 1px solid rgb(85, 80, 172);
  border-bottom: 1px solid rgb(85, 80, 172);
  border-right: 1px solid rgb(85, 80, 172);
  font-weight: bold;
  word-wrap: break-word;
  white-space: pre-wrap;
  line-height: 1.25;
  font-family: Arial, sans-serif;
  font-size: 16px;
  text-align: center;
  letter-spacing: 0.5px;
  margin: auto auto;
}

.rectangle2 td:not(:first-child) {
  width: 70%; /* Largeur des autres colonnes (colonne de droite) */
  border-top: 1px solid rgb(85, 80, 172);/* Bordure supérieure de la cellule de droite */
  border-bottom: 1px solid rgb(85, 80, 172);/* Bordure inférieure de la cellule de droite */
  border-left: none; /* Supprimer la bordure gauche de la cellule de droite */
  padding: 15px;
  line-height: 1.25;
  font-family: Arial, sans-serif;
  font-size: 14px;
  text-align: center;
  letter-spacing: 0.5px;
  margin: auto auto;
}

.rectangle2 td:last-child {
  width: 0; /* Supprimer la largeur de la dernière colonne (pour éviter les problèmes d'affichage) */
}

/* Styles spécifiques pour la première ligne */
.rectangle2 tr:first-child td {
  border-top: none; /* Supprimer la bordure du haut de la première ligne */
  border-right: none;
}

/* Styles spécifiques pour la dernière ligne */
.rectangle2 tr:last-child td {
  border-bottom: none; /* Supprimer la bordure du bas de la dernière ligne */
}

.bird-additional-info {
  margin: auto auto;
  display: flex;
  margin-top: 10%;
}

#bird-habitat-cell {
  width: 75%;
  padding: 10px;
  line-height: 1.25;
  font-family: Arial, sans-serif;
  font-size: 13px;
  text-align: justify;
  font-style: italic;
  letter-spacing: 0.5px;
  margin: auto auto;
}

#bird-description-cell {
  width: 75%;
  padding: 10px;
  line-height: 1.25;
  font-family: Arial, sans-serif;
  font-size: 13px;
  text-align: justify;
  font-style: italic;
  letter-spacing: 0.5px;
  margin: auto auto;
}

.icon {
  width: 50px;
  height: 50px;
  margin-top: 5%;
}


.close {
  color: #aaa;
  float: right;
  align-items: right;
  font-size: 42px;
  margin-left: 33%;
  font-weight: bold;
  position:fixed;
  cursor: pointer;
  z-index: 10;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}


/* Style du bouton de lecture */
.play-button {
  background-color: rgb(85, 80, 172);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 30%;
  cursor: pointer;
}

/* Style de la barre de progression */
.progress-bar {
  background-color: #ddd;
  height: 10px;
  width: 100%;
  margin-top: 10px;
  border-radius: 100px;
}

/* Style de la barre de progression remplie */
.progress-filled {
  background-color: #1DB954;
  height: 100%;
  width: 0; /* Ajusté dynamiquement avec JavaScript */
  border-radius: 100px;
}

/* Style de la durée de l'audio */
.duration {
  margin-top: 5px;
}

/* Adaptation aux téléphones */
@media screen and (max-width: 768px) {
  .rectangle2 td:not(:first-child) {
    font-size: 0.8em; /* Réduire la taille de police pour les écrans plus petits, sauf pour la première colonne */
  }

  .rectangle2 td:first-child {
    font-size: 1em; /* Taille de police de base pour la première colonne */
  }

  .modal-content {
    width: 90%; /* Ajuste la largeur pour les petits écrans */
    padding: 10px; /* Réduit l'espacement sur tous les côtés pour les petits écrans */
  }

  #bird-description {
    display: block;
  }

  #bird-table {
    display: block;
  }

  .rectangle2 {
    width: 100%;
    margin-top: 5%;
  }

  .rectangle2 table {
    width: 100%;
  }
}


/*### Style d'introduction ###*/
.introduction {
  padding: 20px;
  background-color: rgba(247, 247, 247, 0.8); /* Fond transparent légèrement grisé */
  border-radius: 10px;
  margin: 0 auto 20px auto; /* Centre le cadre horizontalement */
  width: 98%; /* Utilise 95% de la largeur de la page */
  max-width: 88%; /* Définit une largeur maximale */
}

.introduction h2 {
  color: #333;
}

.introduction p {
  margin-bottom: 15px;
  line-height: 1.6;
}

.highlights {
  margin-top: 20px;
}

.highlights h3 {
  color: #666;
}

.highlights ul {
  list-style-type: disc;
  padding-left: 20px;
}

.highlights li {
  margin-bottom: 8px;
}

/* Observation des oiseaux */

.bird-observation-section {
  padding: 20px;
  background-color: rgba(247, 247, 247, 0.8); /* Fond transparent légèrement grisé */
  border-radius: 10px;
  margin: 0 auto 20px auto; /* Centre le cadre horizontalement */
  width: 98%; /* Utilise 95% de la largeur de la page */
  max-width: 88%; /* Définit une largeur maximale */
}

.bird-observation-section h2 {
  margin-top: 0;
  color: #333;
}

.bird-observation-section ul {
  list-style: none;
  padding: 0;
}

.bird-observation-section li {
  margin-bottom: 20px;
}

.bird-observation-section h3 {
  color: #4CAF50;
}

/* Styles spécifiques pour les autres lieux d'observation */
.other-observation-locations {
  margin-top: 40px;
}

.other-observation-locations h3 {
  color: #4CAF50;
}

.other-observation-locations ul {
  list-style-type: none;
  padding: 0;
}

.other-observation-locations li {
  margin-bottom: 10px;
  font-style: italic;
  color: #666;
}

.other-observation-locations li:before {
  content: "•";
  margin-right: 5px;
}