/* Header principal */
header {
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    z-index: 3;
    justify-content: space-between;
    /* Pour espacer les éléments de chaque côté du header */
}

/* Bouton hamburger */
#hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    z-index: 5;
    margin-left: auto;
    transition: none;
    animation: none;
}

/* Style du logo */
header img {
    max-height: 50px;
    /* Hauteur maximale pour s'assurer qu'il ne soit pas trop grand */
    max-width: 150px;
    /* Largeur maximale appropriée pour mobile */
    height: auto;
    /* Maintient les proportions */
}

/* Menu overlay en plein écran */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    /* Prend toute la largeur */
    height: 100vh;
    /* Prend toute la hauteur */
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    /* Placez-le derrière le bouton mais devant le contenu */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Affiche l'overlay lorsque ouvert */
.overlay.ouvrir {
    opacity: 1;
    visibility: visible;
}

/* Navigation pour mobile */
.nav_header {
    display: none;
    /* Masqué sur mobile, affiché par le bouton hamburger */
    flex-direction: column;
    gap: 20px;
    text-align: center;
}

.nav_header_mobile{
    display: flex;
    /* Masquer sur mobile (géré par le bouton hamburger) */
    flex-direction: column;
    gap: 20px;
    text-align: center;
}

/* Lien de navigation */
.nav_header a {
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
}

.nav_header_mobile a {
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
}

/* Animation des lignes du bouton hamburger */
svg line {
    stroke: white;
    transition: 0.3s;
}

/* Animation des lignes du bouton hamburger pour l'ouverture/fermeture */
.tourne1 {
    transform: rotate(45deg) translate(5px, -6px);
}

.tourne2 {
    transform: rotate(-45deg) translate(-12px, -1px);
}

.supprimer {
    opacity: 0;
}

/* Effet de scroll sur le header */
.scrolled {
    background-color:#fff;
}

.scrolled .nav_header a{
    color:#000 !important
}

.nav_header a:last-child{
    color:#FFF !important
}

/* Media query pour tablette (768px) */
@media screen and (min-width: 768px) {

    /* Header complet sur tablette et desktop */
    header {
        justify-content: space-between;
        padding: 15px 30px;
        backdrop-filter: blur(10px);
    }

    /* Masquer le bouton hamburger */
    #hamburger-btn {
        display: none;
    }

    /* Style du logo sur tablette */
    header img {
        max-height: 60px;
        /* Augmente légèrement la taille sur tablette */
        max-width: 180px;
    }

    /* Navigation sur tablette */
    .nav_header {
        display: flex;
        flex-direction: row;
        gap: 30px;
        align-items: center;
    }

    /* Lien de navigation */
    .nav_header a {
        font-size: 1rem;
        font-weight: 500;
        color: #FFF;
        text-decoration: none;
        transition: color 0.3s ease;
    }
    
    .nav_header a:last-child {
        background:linear-gradient(60deg, #c98853, #d5b763 80%, #c98853);
        padding: 0.85rem 2rem;
    }

    /* Masquer l'overlay sur tablette */
    .overlay {
        display: none;
    }
}

/* Media query pour desktop (1024px et plus) */
@media screen and (min-width: 1024px) {

    /* Styles du header sur desktop */
    header {
        padding: 10px 20px;
    }

    /* Masquer le bouton hamburger */
    #hamburger-btn {
        display: none;
    }

    /* Navigation sur desktop */
    nav {
        display: flex;
        gap: 20px;
        align-items: center;
    }

    nav a {
        color: white;
        font-size: 1rem;
        text-decoration: none;
        padding: 8px 12px;
        transition: color 0.3s ease;
    }
}