/* ==========================================================================
   1. HEADER GLOBAL (DESKTOP)
   ========================================================================== */
.site-header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--nav-background) !important;
    border-bottom: 0.2px solid var(--nav-background); 
    padding: 3% 0 1% 0;
    z-index: 10000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.site-header a {
    color: var(--main-text) !important;
    transition: color 0.3s ease;
}

.site-header.scrolled {
    background-color: var(--main-background) !important;
    border-bottom: 1px solid var(--placeholder);
}

.header-container {
    width: 94%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- LOGO (IMAGE + TEXTE) --- */
.logo-text {
    text-transform: uppercase;
    font-size: large;
    font-weight: 600;
}

.site-logo a {
    display: flex;           
    align-items: center;    
    font-family: var(--font-title);
    font-size: 115%; 
    color: white !important;
    font-weight: 800;
    text-decoration: none;
    gap: 1%;               
}

.logo-text:hover {
    color: var(--secondary-title) !important;
}

.custom-logo-img {
    width: 3.5%;            
    height: auto;
    display: block;
}

/* --- NAVIGATION --- */
#menu-menu-principal li a {
    color: var(--main-text) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

#menu-menu-principal li a:hover {
    color: var(--secondary-title) !important;
}

.main-navigation {
    flex: 1;               
    display: flex;         
    justify-content: flex-end;        
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4%; 
    justify-content: flex-end;
    flex-wrap: nowrap;
    width: 100%;  
}

.nav-menu li a {
    font-family: var(--font-title);
    text-transform: uppercase;
    font-size: 95%; 
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;   
}

@media (min-width: 769px) {
    /* ICI : On cache le burger sur ordinateur */
    .menu-toggle {
        display: none !important;
    }

    .nav-menu {
        display: flex;
        list-style: none;
        gap: 4vh;
    }

    .nav-menu li a {
        font-family: var(--font-title);
        text-transform: uppercase;
        font-weight: 600;
        text-decoration: none;
        color: var(--main-text) !important;
        font-size: 1.8vh;
    }
}

/* ==========================================================================
   2. BOUTON BURGER (GLOBAL) - GESTION CADRE & CROIX
   ========================================================================== */
   .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.8vh;
    width: 5vh !important; 
    height: 5vh !important;
    background: transparent;
    cursor: pointer;
    z-index: 10001;
    position: relative;
    border: 2px solid var(--secondary-title) !important;
    transition: all 0.3s ease-in-out;
}

.menu-toggle .bar {
    width: 70%;
    height: 0.35vh;
    background-color: var(--secondary-title);
    transition: all 0.3s ease-in-out;
    display: block;
}

/* --- LOGIQUE DE LA CROIX (SANS CADRE) --- */
body.menu-opened .menu-toggle {
    border-color: transparent !important; /* Supprime le cadre orange au clic */
    transform: rotate(180deg);
}

body.menu-opened .menu-toggle .bar {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%; /* Branches de la croix */
}

body.menu-opened .menu-toggle .bar:nth-child(1) {
    /* Centrage absolu + rotation */
    transform: translate(-50%, -50%) rotate(45deg);
}

body.menu-opened .menu-toggle .bar:nth-child(2) {
    opacity: 0;
}

body.menu-opened .menu-toggle .bar:nth-child(3) {
    /* Centrage absolu + rotation inverse */
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* ==========================================================================
   4. RESPONSIVE MOBILE (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .site-header
    {
        padding: 3%;
    }

    .logo-text {
        display: none !important;
    }

    .custom-logo-img {
        width: 6vh !important;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 98%);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease-in-out;
        z-index: 9999;
    }

    body.menu-opened .main-navigation {
        opacity: 1;
        visibility: visible;
    }

    /* Menu vertical */
    .nav-menu {
        flex-direction: column;
        list-style: none;
        width: 80%;
        gap: 5vh;
    }

    .nav-menu li a {
        color: white !important;
        font-size: 3.5vh;
        text-decoration: none;
        font-family: var(--font-title);
        border-left: 3px solid var(--secondary-title);
        padding-left: 5%;
        display: block;
    }

    /* Empêche le scroll du site quand le menu est ouvert */
    body.menu-opened {
        overflow: hidden;
    }
}