nav.main-menu {
    position: absolute; top: 0; width: 100%; z-index: 110;
    transition: opacity var(--nav-speed) ease;
}

.main-pages {
    padding: 20px 26px; display: flex; align-items: center; box-sizing: border-box;
}

.nav-links { display: flex; gap: 6px; align-items: center; }



.nav-links a {
    color: white !important; text-decoration: none; padding: 5px 12px;
    border-radius: 10px; font-size: 0.95rem; transition: opacity 0.3s;
}

.nav-links a.navbar-disabled {
    opacity: .5;
    pointer-events: none;
}

/* CORRECTION : Padding 10px 12px */
.nav-button {
    border: 1px solid white;
    margin-left: 4px !important;
    padding: 10px 12px !important; 
    line-height: 1 !important; /* Pour éviter que le line-height hérité ne casse tout */
}

.push-container { flex: 2; }

/* --- LOGO --- */
.logo-container {
    display: flex;
    align-items: center;
    margin-right: 18px;
}

.logo-container img {
    height: 27px;
    /* Force le logo en blanc pur, peu importe sa couleur d'origine */
    filter: brightness(0) invert(1); 
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo-container img:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

/* On s'assure que le lien du logo n'a pas de bordure ou de fond */
.logo-container a {
    padding: 0 !important;
    background: none !important;
}


/* CORRECTION : Alignement du profil et du toggle */
.profile-container {
    display: flex;
    align-items: center; /* Centre verticalement les icônes entre elles */
    gap: 20px;
}

#theme-toggle {
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 0; /* Élimine l'espace fantôme sous l'icône */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-img {
    width: 35px; height: 35px; border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.5); object-fit: cover;
}








/* ==========================================================
   MENU BURGER & OVERLAY (MOBILE)
   ========================================================== */
.hamburger {
    display: none; flex-direction: column; cursor: pointer; gap: 6px; margin-left: 20px;
}

.hamburger span {
    width: 25px; height: 2px; background-color: white; transition: all 0.3s ease;
}

/* Animation de la croix au clic */
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* L'écran plein format du menu */
.mobile-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background-color: var(--bg-page); z-index: 100;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.4s ease, background-color var(--transition-speed) ease;
}

.mobile-overlay.active { opacity: 1; pointer-events: auto; }

/* Les liens dans le menu mobile */
.mobile-overlay .nav-links {
    display: flex; flex-direction: column; gap: 20px; align-items: center; font-size: 1.5rem;
}

/* ==========================================================
   RESPONSIVE (TABLETTES & MOBILES)
   ========================================================== */
@media (max-width: 1024px) {
    .main-pages > .nav-links a { padding: 2px 8px; font-size: 0.9rem; }
}

@media (max-width: 768px) {
    .main-pages > .nav-links { display: none; } /* On cache les liens en haut */
    .hamburger { display: flex; } /* On affiche le bouton burger */
}