body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background-color: #924DBF;
    color: #5e268a;
    overflow-x: hidden; /* Empêche le débordement horizontal */
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: #a772d3;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    position: relative;
    z-index: 3;
    animation: fadeInDown 1s ease-in-out;
}

.navbar .logo {
    font-size: 70px;
    font-weight: bold;
    color: #924DBF;
    text-decoration: none;
    border-bottom: 2px solid transparent; /* Soulignement transparent par défaut */
    padding-bottom: 5px; /* Espace pour le soulignement */
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

.navbar .logo:hover {
    color: #7338A0;
    border-bottom: 2px solid #7338A0; /* Soulignement au survol */
}

.navbar .links {
    display: flex;
    gap: 30px;
    margin-left: auto;
}

.navbar .links a {
    color: #924DBF;
    text-decoration: none;
    font-size: 35px;
    font-weight: bold;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 2px solid transparent; /* Soulignement transparent par défaut */
    padding-bottom: 5px; /* Espace pour le soulignement */
}

.navbar .links a:hover {
    color: #7338A0;
    border-bottom: 2px solid #7338A0; /* Soulignement au survol */
}

.navbar .links a.active {
    color: #7338A0;
    border-bottom: 2px solid #7338A0; /* Soulignement pour l'élément actif */
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.projects-section {
    padding: 40px 20px;
    text-align: center;
    animation: fadeInUp 1s ease-in-out;
}

.projects-section h2 {
    font-size: 50px;
    margin-bottom: 40px;
    animation: slideInFromLeft 1s ease-in-out;
}

.button-container {
    display: flex;
    flex-direction: row; /* Disposition horizontale */
    justify-content: center; /* Centre les boutons horizontalement */
    gap: 20px;
    flex-wrap: wrap; /* Permet aux boutons de passer à la ligne suivante si nécessaire */
}

.project-button {
    background-color: #7338A0;
    color: #0F0529;
    border: none;
    padding: 20px;
    font-size: 30px;
    border-radius: 30px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: fadeIn 1s ease-in-out;
    width: 300px; /* Largeur fixe pour tous les boutons */
    text-align: center; /* Centre le texte dans le bouton */
}

.project-button:hover {
    background-color: #5e268a;
    transform: scale(1.05);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 15px;
    }

    .navbar .logo {
        font-size: 40px; /* Réduction de la taille du logo */
    }

    .navbar .links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        width: 100%;
    }

    .navbar .links a {
        font-size: 20px; /* Ajustement des liens */
        padding: 10px 0;
        width: 100%;
        text-align: center;
        background-color: rgba(255, 255, 255, 0.1); /* Légère couleur de fond */
        border-radius: 10px;
    }
}
