* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Header and navigation bar*/
header{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 100px;
    align-items: center;
}

.navbar{
    padding: 10px 20px;
    background-color: #ffffff;
}

.logo {
    font-size: 2rem;
    height: 50px;
}

.logo:hover {
    cursor: default;
}

.navbar-nav{
    gap: 2rem;
    list-style: none;
    font-size: 1.5rem;
}

.nav-item{
    margin: 0 50px;
}

.nav-link{
    font-family: "Jacques Francois", serif;
    position: relative;
    transition: all 300ms ease;
    text-decoration-color: #ffffff;
    white-space: nowrap;
}

.nav-link::after{
    content: "";
    position: absolute;
    height: 2px;
    left: 0;
    bottom: 0;
    width: 0;
    background: #000000;
    transition: width .2s;
}

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

.btn-mode{
    border: none;
    background-color: #ffffff;
}

.bi-moon{
    width: 25px;
    height: 25px;
    fill: currentColor;
}

/* section */
section{
    min-height: 100vh;
    max-width: 100vw;
    padding: 5% 9% 5%;
    align-items: center;  
}

/* Home */
.home{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8%;
}

.title, typing-text{
    white-space: nowrap;
}

span{
    color: #808080;
}



.btn{
    flex-grow: 1;;
    white-space: nowrap;
    background-color: #ffffff;
    border-radius: 4rem;
    font-size: 1em;
    color: #000000;
    letter-spacing: 0.3rem;
    font-weight: 600;
    border: 1px solid #000000;
    transition: 0.3s ease;
    cursor: pointer;
}

.btn:hover{
    transform: scale3d(1.03);
    background-color: #000000;
    color: #ffffff;
    box-shadow: 0 0 25px #000000;
}

#socials-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    gap: 1rem;
    height: 40px;
}

.typing-text span{
    position: relative;
}

.typing-text span::before{
    content: "software Developer";
    color: #808080;
    animation: words 20s infinite;
}

@keyframes words{
    0%, 25% {
        content: "Web Developer";
    }
    26%, 50% {
        content: "Web Designer";
    }
    51%, 75% {
        content: "Developper";
    }
    76%, 100% {
        content: "Freelancer";
    }
}

/* About */
.pic-container {
    flex: 1;
    background: white;
    border-radius: 2rem;
    border: rgb(53, 53, 53) 0.1rem solid;
    border-color: rgb(163, 163, 163);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 500px;
}


.icon {
    height: 100%;
    max-height: 50px;
    cursor: pointer;
    fill: currentColor;
}

.text{
    align-items: center;
    text-align: justify;
}

/* Project*/
#projects {
    position: relative;
}

.details-container {
    flex: 1;
    padding: 1.5rem;
    border-radius: 2rem;
    border: rgb(53, 53, 53) 0.1rem solid;
    border-color: rgb(163, 163, 163);
    background: rgb(250, 250, 250);
}

.project-title {
    margin: 1rem;
    color: black;
}

/* CONTACT */
#contact {
    display: flex;
    justify-content: center;
    flex-direction: column;
    height: 70vh;
}

.contact-info-upper-container {
    display: flex;
    justify-content: center;
    border-radius: 2rem;
    border: rgb(53, 53, 53) 0.1rem solid;
    border-color: rgb(163, 163, 163);
    background: (250, 250, 250);
    margin: 2rem auto;
    padding: 0.5rem;
}

.contact-info-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem;
}

.contact-text {
    margin: auto 0;
    font-size: larger;
}

.contact-link{
    text-decoration-line: none;
    color: #000000;
    align-items: center;
}

.contact-link:hover{
    color: #000000;
    text-decoration-line: underline;
}

.contact-icon {
    cursor: default;
    width: 40px;
}

.email-icon {
    height: 2.5rem;
}

/* DARK MODE */
/* Dark Mode Styles */
body.dark-mode {
    background-color: #1e1e1e; /* Couleur de fond sombre */
    color: #ffffff; /* Couleur du texte clair */
}

.navbar.dark-mode {
    background-color: #1e1e1e; /* Couleur de fond de la barre de navigation sombre */
}

.nav-link.dark-mode {
    color: #ffffff; /* Couleur des liens en mode sombre */
}

.nav-link.dark-mode::after{
    background: #ffffff;
}

.btn-mode.dark-mode {
    background-color: #1e1e1e; /* Couleur de fond des boutons sombre */
    color: #ffffff; /* Couleur du texte des boutons clair */
}

.btn.dark-mode {
    background-color: #1e1e1e; /* Couleur de fond des boutons sombre */
    color: #ffffff; /* Couleur du texte des boutons clair */
    border: 1px solid #ffffff; /* Bordure blanche pour les boutons */
}

.btn:hover.dark-mode{
    background-color: #ffffff;
    color: #000000;
    box-shadow: 0 0 25px #ffffff;
}

.typing-text.dark-mode span::after {
    background-color: #1e1e1e;
}

footer.dark-mode {
    background-color: #1e1e1e; /* Couleur de fond du pied de page sombre */
    color: #ffffff; /* Couleur du texte du pied de page clair */
}

.details-container.dark-mode {
    background: #1e1e1e; /* Couleur de fond des détails en mode sombre */
    border-color: #ffffff; /* Bordure blanche pour les détails */
}

.pic-container.dark-mode {
    background: #1e1e1e; /* Couleur de fond des détails en mode sombre */
    border-color: #ffffff; /* Bordure blanche pour les détails */
}

.about-containers.dark-mode{
    background-color: #1e1e1e;
}

.project-title.dark-mode {
    color: #ffffff; /* Couleur du titre du projet en mode sombre */
}

.typing-text span::before.dark-mode {
    color: #ffffff; /* Couleur du texte en mode sombre */
}

span.dark-mode {
    color: #b0b0b0; /* Couleur des spans en mode sombre */
}

.contact-link.dark-mode{
    color: #ffffff;
}

.icon.dark-mode {
    color:#ffffff;
}

.navbar-toggler.dark-mode{
    background-color: #343a40; /* Couleur de fond pour le mode sombre */
    border: 1px solid #495057; 
}

/* Responsive part */
@media (max-width: 1000px){
    body{
        margin-top: 100px;
    }

    .nav-item{
        margin: 0;
    }

    .nav-link{
        width: fit-content;
    }

    .nav-link::after{
        content: "";
        position: absolute;
        height: 2px;
        left: 0;
        bottom: 0;
        width: 0;
        background: #000000;
        transition: width .2s;
    }
    
    .nav-link:hover::after{
        width: 100%;
    }

    .home{
        flex-direction: column;
    }

    .row-about{
        flex-direction: column;
    }

    .details-container {
        flex-direction: column; /* Empile les éléments verticalement */
    }
}

@media (max-width: 768px) {
    .nav-item{
        margin: 0;
    }

    .nav-link{
        width: fit-content;
    }

    .nav-link::after{
        content: "";
        position: absolute;
        height: 2px;
        left: 0;
        bottom: 0;
        width: 0;
        background: #000000;
        transition: width .2s;
    }
    
    .nav-link:hover::after{
        width: 100%;
    }

    .btn-container {
        display: flex;
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
}

@media(max-width:468px){
    .nav-item{
        margin: 0;
    }

    .nav-link{
        width: fit-content;
    }

    .nav-link::after{
        content: "";
        position: absolute;
        height: 2px;
        left: 0;
        bottom: 0;
        width: 0;
        background: #000000;
        transition: width .2s;
    }
    
    .nav-link:hover::after{
        width: 100%;
    }

    .home-content h1{
        text-align: center;
    }

    .typing-text{
        white-space: nowrap;
        text-align: center;
    }

    .article-container img{
        width: 100%;
    }

    .contact-info-upper-container{
        flex-direction: column;
        align-items: starts;
    }
}