/* Conteneur principal pour les moments */
.moments-container {
    display: none; /* Masque le conteneur au départ */
    width: 100%; /* Prend toute la largeur disponible */
    height: calc(100vh - 242px); /* Ajuste la hauteur pour que cela prenne tout l'écran moins la partie supérieure */
    display: flex; /* Affiche les éléments en flex */
    overflow: hidden; /* Empêche le débordement vertical */
    
}

/* Frise chronologique (Timeline) à gauche */
.moments-timeline {
    width: 15%; /* Prend 20% de la largeur */
    height: 100%; /* Prend toute la hauteur du conteneur */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Positionne la première date en bas et la date du jour en haut */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Légère ombre pour séparer le banner */
    max-width: 15em;
}

/* Style des dates dans la timeline */
.timeline-date {
    text-align: center;
    font-size: 1.5em;
    color: #000000;
    font-family: 'Satisfy', cursive;
    padding-left: 5px;
    padding-right: 5px;
}

.timeline-date:first-child {
    padding-top: 20px;
}

.timeline-date:last-child {
    padding-bottom: 20px;
    margin-top: 10px;
}

/* Galerie de photos à droite */
.moments-medias {
    width: 90%; /* Prend 80% de la largeur */
    padding: 10px; /* Ajoute un peu de padding */
    overflow-y: scroll; /* Permet de scroller verticalement pour l'infinite scroll */
    display: flex;
    flex-wrap: wrap; /* Permet d'organiser les médias en plusieurs lignes */
    gap: 10px; /* Espace entre les médias */
    height: 100%; /* Prend toute la hauteur du conteneur */
}

.timeline-arrow {
    width: 2px; /* Largeur de la flèche (ligne) */
    background-color: #787878; /* Couleur de la flèche */
    height: 100%; /* Prend tout l'espace entre les deux dates */
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 10%;
}

.timeline-arrow::after {
    content: "";
    display: block;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid #787878; /* Couleur de la flèche */
    position: absolute;
    bottom: -10px; /* Place la flèche juste en haut de la ligne */
    left: 50%;
    transform: translateX(-50%);
}

.timeline-infos-group{
    height: 100%; /* Prend toute la hauteur du conteneur */
    display: flex;
    align-items: flex-start; /* Aligne les éléments en haut */
    position: relative;
    padding: 10px;
}



.timeline-momentsCount h1, p {
    margin: 0;
    text-align: center;
}

.timeline-pictureCount h1, p {
    margin: 0;
    text-align: center;
}

.timeline-videoCount h1, p {
    margin: 0;
    text-align: center;
}

.medias-arrow {
    width: 3px; /* Largeur de la flèche (ligne) */
    background-color: #9b9b9b; /* Couleur de la flèche */
    height: 100%; /* Prend tout l'espace entre les deux dates */
    position: relative;
    align-items: center;
    position: fixed;
    left: 50%;
}

.medias-arrow::after {
    content: "";
    display: block;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 12px solid #9b9b9b; /* Couleur de la flèche */
    position: absolute;
    top: -10px; /* Place la flèche juste en haut de la ligne */
    left: 50%;
    transform: translateX(-50%);
}

.media-wrapper {
    margin-left: 25%;

}

.media-wrapper:last-child {
    margin-bottom: 50px;
}

.media-wrapper,
.media-moments {
    pointer-events: auto;
}

.media-moments {
    width: 25em;
    height: 20em;
    object-fit: cover;
}

.media-moments:hover {
    opacity: 0.9;
    transform: scale(1.02); /* Agrandit légèrement l'image */
    transition-duration: 0.5s;
}

.media-description {
    padding: 100px;
    font-size: 2em;
    font-family: 'Satisfy', cursive;
}

.media-description p {
    padding: 5px;
}

.media-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-media {
    max-width: 95%;
    max-height: 90%;
    width: auto;
    height: auto;
    position: absolute;
    border-radius: 10px;
}

#modal-video {
    max-height: 90%;
}

.close-modal {
    position: absolute;
    top: 50px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 1001; /* Assurez-vous que c'est plus élevé que les éléments de la vidéo/image */
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 80%;
    max-height: 80%;
}

/* Styles de la modale */
.modal {
    position: fixed;
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(0,0,0,0.8);
  }
  
  .modal-content {
    max-width: 80%;
    max-height: 80%;
  }
  
  /* Flèches de navigation */
  .arrow {
    position: absolute;
    top: 50%;
    font-size: 2em;
    color: white;
    cursor: pointer;
    user-select: none;
    transform: translateY(-50%);
  }
  
  .left-arrow {
    left: 10px;
  }
  
  .right-arrow {
    right: 10px;
  }
  
  .arrow:hover {
    color: #ccc;
  }


  .comment-icon {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 24px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.comment-icon:hover {
    background-color: rgba(255, 255, 255, 0.8);
    color: black;
}

.comment-box {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    min-height: 100px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px;
    border-radius: 10px;
    z-index: 1001;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-family: 'Quicksand', sans-serif;
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }
  
  .comment-date {
    font-weight: bold;
    font-size: 16px;
  }
    
  .comment-description {
    font-size: 16px;
    margin-top: 10px;
  }
  

@media (min-height: 100px) {
    .timeline-infos {
        position: absolute; /* Positionne les textes en position absolue */
        top: 50%; /* Centre verticalement au milieu de la flèche */
        transform: translateY(-50%); /* Centre précisément au milieu */
        display: flex;
        flex-direction: column;
        gap: 10px; /* Espace entre les éléments */
        margin-left: 20%;
        font-size: 0.75em;
        font-weight: bold;
    }
  }


  @media (min-height: 600px) {
    .timeline-infos {
        position: absolute; /* Positionne les textes en position absolue */
        top: 50%; /* Centre verticalement au milieu de la flèche */
        transform: translateY(-50%); /* Centre précisément au milieu */
        display: flex;
        flex-direction: column;
        gap: 30px; /* Espace entre les éléments */
        margin-left: 20%;
        font-size: 1em;
        font-weight: bold;
    }
  }

  @media (min-height: 800px) {
    .timeline-infos {
        position: absolute; /* Positionne les textes en position absolue */
        top: 50%; /* Centre verticalement au milieu de la flèche */
        transform: translateY(-50%); /* Centre précisément au milieu */
        display: flex;
        flex-direction: column;
        gap: 50px; /* Espace entre les éléments */
        margin-left: 20%;
        font-size: 1.5em;
        font-weight: bold;
    }
}
  

/* Pour les écrans de petite taille */
@media (min-width: 100px) {
    .moments-timeline {
      display: none;
    }

  }

  /* Pour les écrans de petite taille */
@media (min-width: 800px) {
    .moments-timeline {
      display: flex;
    }
  }
  
  /* Pour les écrans plus grands */
  @media (min-width: 1100px) {
    .moments-timeline {
        display: flex;
      }
      .timeline-infos {
        font-size: 1.5em;
    }
  }

  @media (max-width: 600px) {
    .moments-medias {
        width: 90%;
        padding: 10px;
        overflow-y: scroll;
        display: block;
        gap: 10px;
        height: 100%;
    }
    .media-wrapper {
        margin-left: 0;
    }
    .media-description {
        padding: 0;
        font-size: 20px;
    }
    .media-moments {
        width: 22em;
        height: 10em;
    }
    .moments-container {
        height: 100%;
    }

  }