/* Réinitialisation globale pour éviter les espaces indésirables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
}

/* Assurer que le body ne crée pas de défilement horizontal */
body {
    font-family: "Literata", serif;
    color: white;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    /* Empêche le défilement horizontal global */
}

/* Style de la barre de navigation */
.navbar {
    text-decoration: none;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 50px 75px;
    z-index: 10;
    box-sizing: border-box;
}

/* Style des éléments de la barre de navigation */
.logo h1 {
    font-family: "Literata";
    color: white;
    font-weight: 500;
    font-size: 40px;
    line-height: 80%;
}

.logo span {
    font-weight: 200;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 50px;
    align-items: center;
}

.nav-links li a {
    text-decoration: none;
    color: white;
    font-size: 18px;
    padding: 10px 15px;
    transition: background 0.3s ease;
}

.nav-links li a:hover {
    color: rgb(238, 192, 8);
}

/* Style du bouton du menu hamburger */
.nav-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 15; /* Assurer que le bouton hamburger reste au-dessus du menu mobile */
}

.nav-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

/* Menu mobile */
.nav-links {
    display: flex;
    gap: 50px;
}

.nav-links.active {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.267);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px); /* Fond flou */
    z-index: 10;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 1;
    visibility: visible;
}

/* Conteneur principal pour les images */
.background-images-container {
    width: 100vw;
    /* Largeur de l'écran */
    height: 100vh;
    /* Hauteur de l'écran */
    overflow-x: auto;
    /* Activer le défilement horizontal */
    display: flex;
    align-items: center;
    position: relative;
    overflow-y: hidden;
    /* Pas de défilement vertical */
    scroll-behavior: smooth;
    /* Défilement fluide */
}

/* Conteneur des images */
.background-images {
    display: flex;
    height: 100%;
    width: max-content;
    /* Permet au conteneur d'étendre sa largeur selon le contenu */
}

/* Style des images */
.background-images .image {
    flex: 0 0 auto;
    width: calc(100vw / 6);
    /* Largeur fixe pour chaque image */
    height: 100%;
    /* Hauteur de l'écran */
    background-size: cover;
    background-position: center;
    margin-right: 0;
    /* Pas d'espace entre les images */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.5s ease;
    /* Transition fluide pour le changement de largeur */
}

/* Largeur agrandie au survol */
.background-images .image.active {
    width: calc(100vw / var(--photo-count) * 4);
    /* Largeur augmentée de 50% */
}

/* Overlay des images */
.image-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    font-family: "Poppins";
    color: white;
    font-size: 20px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    padding: 50px;
}

.background-images .image:hover .image-overlay {
    opacity: 1;
}

.background-images .image::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

/* Ajustements pour les petits écrans */
@media (max-width: 768px) {

    .navbar {
        padding: 50px 50px;
        /* Réduit le padding pour plus de place */
    }

    .nav-links {
        display: none;
        /* Cacher les liens de navigation en mode mobile */
    }

    .nav-links.active {
        display: flex;
        /* Afficher le menu mobile */
    }

    .nav-toggle {
        display: flex;
        /* Afficher le bouton du menu hamburger en mode mobile */
    }

    .background-images-container {
        /* Ajuster la marge pour compenser la hauteur de la barre de navigation */
        overflow-x: hidden; /* Pas de défilement horizontal */
        overflow-y: visible;
    }

    .background-images {
        flex-direction: column;
    }

    .background-images .image {
        width: 100vw; /* Largeur de l'écran */
        height: calc(100vh / 4);
        transition: height 0.5s ease; /* Transition fluide pour le changement de hauteur */
        flex-shrink: 0; /* Empêche la réduction des images */
    }

    .background-images .image.active {
        height: calc(100vh / var(--photo-count) * 4); /* Hauteur augmentée */
        width: 100%;
    }
}

/* Style pour le bouton de défilement */
.scroll-indicator {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-indicator svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.scroll-indicator:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

@media (max-width: 768px) {
    .scroll-indicator {
        display: none;
        /* Masquer le bouton de défilement sur les petits écrans */
    }
}

/* Boîte de texte sur l'image */
.image-text-container {
    position: absolute;
    bottom: 100px; /* Ajustez en fonction du placement souhaité */
    left: 50px;   /* Ajustez en fonction du placement souhaité */
    max-width: 75%; /* Limiter la largeur de la boîte */
    padding: 20px;
    border-radius: 5px;
    color: white;
    font-family: "Poppins";
    font-size: 18px;
    display: none; /* Caché par défaut */
}

/* Style pour le bouton dans la boîte de texte */
.image-button {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 15px;
    font-size: 16px;
    color: white;
    text-decoration: none;
    background-color: rgba(0, 0, 0, 0.317);
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.image-button:hover {
    color: rgb(255, 216, 0);
}

@media (max-width: 768px) {
    .image-text-container{
        left: 25px;
        font-size: 14px;
    }

    .image-button{
        font-size: 15px;
    }
}
