* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #333;
    color: #fff;
    padding: 1rem 4rem; /* Ajout de padding pour un espacement aux extrémités */
    transition: background-color 0.3s;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    padding-right: 1rem; /* Espace entre le logo et les liens */
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 20px; /* Augmente l'espace entre les liens */
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #f0a500;
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px;
    transition: all 0.3s;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 0;
        right: 0;
        height: 100vh;
        background-color: #333;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        padding-top: 2rem; /* Espace en haut pour le menu sur mobile */
    }

    .burger {
        display: block; /* Affiche le menu burger sur mobile */
    }

    .nav-active {
        transform: translateX(0); /* Affiche le menu */
    }

    .nav-links li {
        margin: 15px 0; /* Ajoute de l'espace entre les liens sur mobile */
    }

    /* Animation du menu burger */
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .toggle .line2 {
        opacity: 0;
    }
    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

/* Classe ajoutée lorsque la page défile */
.scrolled {
    background-color: #333; /* Changez cette couleur selon vos préférences */
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
