/* Fichier : style.css */

/* =========================================================
   BASE NAVBAR (DESKTOP)
========================================================= */

.blog-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    position: relative;
    width: 100%;
    z-index: 99995;
    box-sizing: border-box; /* S'assure que le padding ne casse pas la largeur */
}

/* L'astuce flex: 1 partage l'espace équitablement, centrant le nav-brand */
.nav-left {
    display: flex;
    align-items: center;
    gap: 25px;
    flex: 1; 
    justify-content: flex-start;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 25px;
    flex: 1;
    justify-content: flex-end;
}

.nav-brand {
    /* La position absolute a été supprimée pour éviter le chevauchement */
    text-align: center;
    padding: 0 20px; /* Marge de sécurité entre le texte et les boutons */
}

.nav-brand a {
    display: block;
    white-space: nowrap; /* Gardé sur grand écran */
    text-decoration: none;
    color: #fff; /* À adapter selon ton thème */
    font-weight: bold;
}

.text-rose {
    color: #ff007f; /* Exemple, à adapter selon ta charte graphique */
}

.nav-social-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
}

.hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 100000;
}

.hamburger-btn span {
    display: block;
    width: 28px;
    height: 3px;
    margin: 6px auto;
    background-color: #fff;
    border-radius: 4px;
    transition: all 0.3s ease-in-out;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 99990;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =========================================================
   ADAPTATION PC PORTABLES (Jusqu'à 1440px)
   Correction du bug : adaptation de la taille et autorisation de retour à la ligne
========================================================= */
@media screen and (max-width: 1440px) {
    .nav-brand a { 
        font-size: clamp(12px, 1.4vw, 16px); 
        white-space: normal; /* CRUCIAL : Si l'écran est trop petit, le texte passe sur 2 lignes */
        line-height: 1.3;
    }
    
    /* On laisse un peu plus de flexibilité aux boutons de droite */
    .nav-left { flex: 0.5; gap: 15px; }
    .nav-right { flex: 1.5; gap: 15px; }
    
    .nav-link { font-size: 0.8rem; }
    .blog-nav { padding: 10px 20px; }
}

/* =========================================================
   ADAPTATION TABLETTES / MOBILE (MENU BURGER - Max 992px)
========================================================= */
@media screen and (max-width: 992px) {
    .nav-brand {
        flex: 1;
        text-align: left;
        padding-left: 0;
    }

    .hamburger-btn {
        display: block;
    }

    /* Remise à zéro du flex 1 pour le format mobile */
    .nav-left, .nav-right {
        flex: none; 
        position: fixed;
        right: -350px; /* Cachés hors écran */
        width: 300px;
        max-width: 80vw;
        background: #0b0c10;
        display: flex;
        flex-direction: column;
        align-items: center;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 99995;
    }

    .nav-left {
        top: 0;
        height: 35vh;
        justify-content: flex-end;
        padding-bottom: 25px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-right {
        top: 35vh;
        height: 65vh;
        justify-content: flex-start;
        padding-top: 25px;
        gap: 20px;
    }

    /* FORCAGE DE L'AFFICHAGE AU CLIC */
    .nav-left.active, .nav-right.active {
        right: 0 !important;
    }

    /* Animation du bouton Burger */
    .hamburger-btn.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger-btn.active span:nth-child(2) { opacity: 0; }
    .hamburger-btn.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
}
