/* Header and Navigation Styles */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    color: #121212d1;
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all var(--transition-medium);
}

.nav {
    height: 70px;
}

/* Conteneur de la barre de navigation */
.nav-container {
    display: flex;
    align-items: center;
    /* Pousse le premier élément (logo) à gauche et le reste à droite */
    justify-content: space-between;
    height: 100%;

    /* 1. Prend toute la largeur de l'écran */
    width: 100%;
    /* 2. Ajoute un petit espace sur les côtés pour éviter que le contenu ne colle au bord */
    padding: 0 1rem;
    /* 3. S'assure qu'il n'y a pas de marges externes qui pourraient le centrer */
    margin: 0;
}

/* Styles du Logo */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    /* S'assure que le logo est le premier élément à gauche */
    margin-right: auto;
}

/* Placeholder pour l'image du logo */
.logo-placeholder {
    width: 40px;
    height: 40px;
    background-image: url("../resources/img/LogoVPP.png");
    background-size: contain;
    background-repeat: no-repeat;
    /* Ajouté pour s'assurer que l'image ne se répète pas */
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}


.logo-text {
    font-size: 1.7rem;
    font-weight: bold;
    color: var(--text-primary);
}

/* Desktop Navigation Menu */
.nav-menu {
    font-family: 'Quicksand', sans-serif;
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    /* CHANGEMENT ICI : Valeur spécifique et très grande pour la police */
    font-size: large;
}

.nav-link {
    position: relative;
    color: var(--text-secondary);
    font-weight: bold;
    padding: 0.5rem 0;
    transition: color var(--transition-fast);
    text-decoration: none;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Active link indicator */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-medium);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Menu Toggle Button */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: all var(--transition-medium);
    border-radius: 2px;
}

/* Mobile Menu Toggle Animation */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Tablet and Mobile Styles */
@media (max-width: 768px) {
    .logo-text {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--background-white);
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        box-shadow: var(--shadow-medium);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-medium);
        border-top: 1px solid var(--border-color);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        border-bottom: 1px solid var(--border-color);
        transition: all var(--transition-fast);
    }

    .nav-link:hover {
        background-color: var(--background-gray);
        padding-left: 2rem;
    }

    .nav-link::after {
        display: none;
    }

    /* Remove border from last item */
    .nav-menu li:last-child .nav-link {
        border-bottom: none;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.75rem;
    }

    .logo-placeholder {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

/* Header scroll effect */

/* Smooth scrolling offset for fixed header */
html {
    scroll-padding-top: 70px;
}

/* Focus styles for navigation accessibility */
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.nav-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .header {
        background-color: #121212;
        border-bottom: 2px solid black;
    }

    .nav-link {
        color: black;
    }

    .nav-link:hover {
        background-color: black;

    }
}