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);
    }
}

.about-me {
    background-color: #924DBF;
    color: #5e268a;
    padding: 40px 20px;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    margin-top: -30px; /* Ajuste pour chevaucher visuellement la barre de navigation */
    position: relative;
    z-index: 2;
    overflow: hidden;
    animation: fadeInUp 1s ease-in-out;
}

.about-me h2 {
    font-size: 50px;
    margin-bottom: 20px;
    animation: slideInFromLeft 1s ease-in-out;
}

.about-me p {
    font-size: 26px;
    line-height: 1.6;
    margin-left: 40px;
    animation: fadeIn 1.5s ease-in-out;
}

.projects {
    background-color: #7338A0;
    color: #0F0529;
    padding: 40px 20px;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    margin-top: -40px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    animation: fadeInUp 1s ease-in-out;
}

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

.projects h2 a {
    color: #0F0529 !important; /* Augmente la spécificité et force la couleur noire */
    text-decoration: none; /* Supprime le soulignement par défaut */
}

.projects h2 a:hover {
    text-decoration: underline; /* Ajoute un soulignement au survol */
}



.project h3 {
    font-size: 32px;
    margin-bottom: 10px;
    animation: fadeIn 1.5s ease-in-out;
}

.project .links h3 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 */
}

.project h3 a {
    color: inherit; /* Hérite de la couleur du texte parent */
    text-decoration: none; /* Supprime le soulignement par défaut */
}

.project h3 a:hover {
    text-decoration: underline; /* Ajoute un soulignement au survol */
}


.project p {
    font-size: 26px;
    line-height: 1.6;
    margin-left: 40px;
    animation: fadeIn 1.5s ease-in-out;
}

.image-gallery {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 0;
    width: 100%;
    margin-top: -40px;
    position: relative;
    z-index: 0;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    overflow: hidden;
    animation: fadeInUp 1s ease-in-out;
}

.image-container {
    position: relative;
    flex: 1;
    height: 400px;
    overflow: hidden;
    width: 100%;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    animation: fadeIn 2s ease-in-out;
}

.color-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(115, 56, 160, 0.5);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.button-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.projects-button {
    background-color: #924DBF;
    color: #0F0529;
    border: none;
    padding: 20px 40px;
    font-size: 30px;
    border-radius: 30px;
    cursor: pointer;
    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;
}

.projects-button:hover {
    background-color: #7338A0;
    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;
        padding: 10px 15px;
    }

    .navbar .logo {
        font-size: 40px; /* Taille réduite pour s'adapter */
    }

    .navbar .links {
        flex-direction: column;
        gap: 15px;
        margin-left: 0;
        text-align: center;
    }

    .navbar .links a {
        font-size: 20px; /* Taille de texte réduite */
    }

    .about-me, .projects {
        padding: 20px 10px; /* Moins d'espace sur les côtés */
        text-align: center;
    }

    .about-me h2, .projects h2 {
        font-size: 30px;
    }

    .about-me p, .project p {
        font-size: 18px;
        margin-left: 0; /* Supprime le décalage */
    }

    .image-gallery {
        flex-direction: column; /* Empile les images en colonne */
    }

    .image-container {
        height: 250px; /* Hauteur réduite */
    }

    .projects-button {
        font-size: 20px;
        padding: 10px 20px;
    }
}

@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;
    }
}

@media (max-width: 768px) {
    .about-me, .projects {
        padding: 20px; /* Réduction des marges */
        text-align: center;
    }

    .about-me h2, .projects h2 {
        font-size: 28px; /* Ajustement des titres */
    }

    .about-me p, .projects p {
        font-size: 18px; /* Réduction de la taille du texte */
    }

    .project h3 {
        font-size: 22px; /* Ajustement des titres des projets */
    }
}

@media (max-width: 768px) {
    .image-gallery {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .image-container {
        width: 100%;
        height: auto; /* Ajustement automatique de la hauteur */
    }

    .image-container img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .button-container {
        position: relative;
        top: -30px; /* Remonte encore plus le bouton */
        text-align: center;
        width: 100%;
    }

    .projects-button {
        font-size: 24px; /* Taille du texte augmentée */
        padding: 20px 40px; /* Plus de padding pour un meilleur confort tactile */
        margin-top: 10px; /* Ajuste l’espace autour */
        width: 80%; /* Largeur du bouton augmentée */
        margin-left: auto;
        margin-right: auto;
    }
}

