* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden
}

/* NAVIGATION */ 

.navbar {
    background: #fff;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar__container {
    display: flex;
    justify-content: space-between;
    height: 80px;
    z-index: 1;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;

}

#navbar__logo {
    color: #000;
    display: flex;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    font-size: 2rem;
    font-weight: 600;
}

.navbar__menu {
    display: flex;
    align-items: center;
    list-style: none;
    text-align: center;
}

.navbar__item {
    height: 80px;
}

.navbar__links {
    color: #757575;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0 1rem;
    height: 100%;
}

.navbar__btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 1rem;
    width: 100%;
}

.button {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    padding: 10px 20px;
    height: 100%;
    width: 100%;
    border: none;
    outline: none;
    border-radius: 4px;
    background: #000;
    color: white;
}

.button:hover {
    background: #d1d1d1;
    transition: all 0.3s ease;
}

.navbar__links:hover {
    color: #d1d1d1;
    transition: all 0.3s ease;
}
/*
.navbar__logo:hover {
    cursor: url("../images/cursor-white.png") 8 8, auto;
}*/

@media screen and (max-width: 960px) {
    .navbar__container {
        display: flex;
        justify-content: flex-start;
        height: 80px;
        z-index: 1;
        max-width: 1300px;
        padding: 0 10px;
    }

    .navbar__menu {
        display: grid;
        justify-content: flex-start;
        grid-template-columns: auto;
        margin: 0;
        width: 100%;
        position: absolute;
        top: -1000px;
        opacity: 0;
        transition: all 0.5s ease;
        height: 50vh;
        z-index: -1;
        background: #131313;
    }

    .navbar__menu.active {
        background: #ededed;
        top: 100%;
        opacity: 1;
        transition: all 0.5s ease;
        z-index: 99;
        height: 50vh;
        font-size: 1.2rem;
    }

    #navbar__logo {
        padding-left: 25px;
    }

    .navbar__toggle .bar {
        width: 25px;
        height: 3px;
        margin: 5px auto;
        transition: all 0.3s ease-in-out;
        background: #000;
    }

    .navbar__item {
        width: 100%;
    }

    .navbar__links {
        text-align: left;
        padding: 2rem;
        width: 100%;
        display: table;
    }

    #mobile-menu {
        position: absolute;
        top: 20%;
        right: 5%;
        transform: translate(5%,20%);
    }

    .navbar__btn {
        padding-bottom: 2rem;
    }

    .button {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 80%;
        height: 40px;
        margin: 0;
    }

    .navbar__toggle .bar {
        display: block;
        cursor: pointer;
    }

    #mobile-menu.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    #mobile-menu.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    #mobile-menu.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Hero Section CSS */

.contenu {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main {
    background-color: #fff;
    position: relative;
    z-index: 1;
    flex: 1;
    padding-bottom: 20px;
}

.main__container {
    display: flex;
    flex-direction: column;
    align-items: left;
    justify-content: center;
    margin: 0 auto;
    height: auto; /* Change to auto to allow content to determine height */
    background-color: #fff;
    z-index: 1;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box; /* Ensure padding is included in the width */
}

.main__content h1 {
    margin-top: 50px;
}
.main__content h2 {
    font-weight: 500;
    padding: 20px;
}

.main__content p {
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 200;
    color: #000;
    padding: 1rem;
}

.main__projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
}



.project__spec {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin: 0 auto; /* Supprime la marge à droite */
    position: relative; /* Assure que l'overlay est positionné correctement */
    min-height: 75vh;
    width: 100%;
    justify-content: left;
    box-sizing: border-box;
    padding: 2rem;
}

.project__spec p {
    grid-column: 1 / -1; /* Permet au texte de prendre toute la largeur disponible */
    margin-bottom: 5px; /* Réduit l'espace en bas du texte */
    text-align: justify;
    color: #757575;
    max-width: 1500px;
}


.project__spec img {
    width: 100%; /* Assure que les images prennent toute la largeur disponible dans leur colonne */
    height: auto; /* Conserve le ratio d'aspect des images */
    cursor: pointer; /* Change le curseur pour indiquer que l'image est cliquable */
    transition: transform 0.3s ease; /* Ajoute une transition pour l'agrandissement */
    padding: 0; /* Supprime le padding */
    margin: 0; /* Supprime la marge à gauche */
    object-fit: cover; /* Assure que l'image couvre toute la largeur disponible */
    width: 100%;
    height: 100%;
    text-align: left;
    transition: transform 0.3s ease;
    position: relative;
}


.project__spec img:hover {
    transform: scale(1.03); /* Agrandit légèrement l'image lors du survol */
}

.project__spec img.enlarged {
    position: fixed; /* Fixe l'image par rapport à la fenêtre */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centre l'image */
    width: auto; /* Prend 75% de la largeur de la fenêtre */
    height: 75vh; /* Conserve le ratio d'aspect de l'image */
    z-index: 1002; /* Assure que l'image est au-dessus de tout le reste */
    object-fit: contain; /* Conserve le ratio d'aspect de l'image */
}

.video-preview {
    width: 100%; /* Assure que la vidéo prend toute la largeur disponible */
    margin: 20px 0; /* Ajoute un espace autour de la vidéo */
    display: block; /* Assure que la vidéo est un élément de bloc */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Ajoute une ombre légère */
}


.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Fond semi-transparent */
    z-index: 1001; /* Assure que le fond est en dessous de l'image agrandie */
    display: none; /* Masque le fond par défaut */
}

.project__spec img.enlarged + .overlay {
    display: block; /* Affiche le fond lorsque l'image est agrandie */
}



.project {
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
    height: 100%;
    text-align: left;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.project:hover {
    transform: scale(1.05);
}

.project a {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

.project__image {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.project__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.project__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    text-align: left;
}

.project__image:hover .project__overlay {
    opacity: 1;
}

.project__overlay h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.project__overlay p {
    font-size: 1rem;
    margin-bottom: 20px;
}

.project__overlay button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    background-color: #000;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.project__overlay button:hover {
    background-color: #d1d1d1;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 999;
    display: none;
    justify-content: center;
    align-items: center;
}

.overlay.active {
    display: flex;
}

.close-btn {
    position: absolute;
    top: 100px;
    right: 70px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    background-color: #d1d1d1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #fff;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.left-btn {
    left: 70px;
}

.right-btn {
    right: 70px;
}




.main__content--text {
    max-width: 1500px;
    text-align: justify;
}

.main__content--text p {
    padding: 10px;
}

.main__content--cv {
    max-width: 1500px;
    text-align: justify;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 10px;
    font-size: 1rem;
}

.main__content--cv p {
    max-width: 1500px;
    text-align: justify;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 10px;
    font-size: 16px;
    font-weight: 300;
}

/* Mobile responsive */
@media screen and (max-width: 960px) {
    .main__container {
        display: grid;
        grid-template-columns: auto;
        align-items: center;
        justify-self: center;
        width: 100%;
        margin: 0 auto;
        height: auto; /* Change to auto to allow content to determine height */
        padding: 0 10px;
    }

    .main__content {
        text-align: center;
        margin-bottom: 4rem;
    }

    .main__content h1 {
        font-size: 2.5rem;
        margin-top: 2rem;
    }

    .main__content h2 {
        font-size: 3rem;
    }

    .main__content p {
        margin-top: 1rem;
        font-size: 1rem;
        margin-left: 10px;
        margin-right: 10px;
    }
}

@media screen and (max-width: 600px) {
    .main__content--text,
    .main__content--cv {
        text-align: left; /* Centre le texte */
        font-size: 10px; /* Réduit la taille de la police */
    }

    .main__content--cv p {
        font-size: 10px; /* Réduit encore la taille de la police pour les paragraphes dans .main__content--cv */
    }

}

@media screen and (max-width: 600px) {
    .main__content h1 {
        font-size: 2rem;
        margin-top: 3rem;
    }

    .main__content h2 {
        font-size: 1.5rem;
    }

    .main__content p {
        margin-top: 2rem;
        font-size: 1rem;
    }
}

@media screen and (max-width: 600px) {
    .project__spec img {
        width: 100%;
        height: auto;
    }

    .project__spec img.enlarged {
        width: 300px;
        height: auto;
        object-fit: contain;
        top: 50%;
        left: 50%;
        transform: none;
        transform: translate(-50%, -50%);
        z-index: 1005;
    }

    .overlay {
        display: none; /* Masque l'overlay par défaut en mode téléphone */
        z-index: 1004;
    }

    .overlay.active {
        display: flex; /* Affiche l'overlay uniquement lorsqu'il est actif */
        z-index: 1004;
    }

    .close-btn {
        top: 100px;
        right: 20px;
        z-index: 1006;
    }

    .nav-btn {
        top: 50%;
        transform: translateY(-50%);
        z-index: 1006;
    }

    .left-btn {
        left: 20px;
    }

    .right-btn {
        right: 20px;
    }
}

/*Footer css*/

.footer__container {
    background-color: #ededed;
    padding: 0 20px; /* Réduit le padding vertical */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centre le contenu verticalement */
    align-items: center; /* Centre le contenu horizontalement */
    position: relative;
    z-index: 2;
    width: 100%;
    box-sizing: border-box;
    margin-top: auto;
}

#footer__logo {
    color: #757575;
    display: flex;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    font-size: 2rem;
    margin-bottom: 1rem; /* Ajoute un espace en bas du logo */
}

.footer__links {
    width: 100%;
    display: flex;
    justify-content: center; /* Centre les liens horizontalement */
    flex-direction: row; /* Aligne les liens horizontalement */
    align-items: center; /* Centre les liens verticalement */
}

.footer__links--wrapper {
    display: flex;
    flex-direction: row; /* Aligne les wrappers horizontalement */
    align-items: flex-start; /* Centre les wrappers verticalement */
    justify-content: space-around; /* Espacement entre les wrappers */
    width: 100%;
}

.footer__links--wrapper h1 {
    font-weight: 400;
    font-size: 2rem;
    justify-content: center; /* Centre le titre horizontalement */
    text-align: center; /* Centre le texte du titre */
}

.footer__links--items {
    display: flex;
    flex-direction: column;
    align-items: left; /* Centre les éléments horizontalement */
    margin: 10px 20px; /* Réduit les marges verticales et horizontales */
    text-align: left; /* Centre le texte des éléments */
    width: auto; /* Ajuste la largeur automatiquement */
    box-sizing: border-box;
}

.footer__links--items h2 {
    margin-bottom: 16px;
}

.footer__links--items > h2 {
    color: #757575;
}

.footer__links--items a {
    color: #757575;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.footer__links--items a:hover {
    color: #d1d1d1;
    transition: 0.3s ease-out;
}

/* Social Icons */
.social__icons--link {
    color: #757575;
    font-size: 24px;
    margin: 10px;
}

.social__icons--link:hover {
    color: #d1d1d1;
    transition: 0.3s ease-out;
}

.social__media {
    background-color: #ededed;
    padding: 1rem 0; /* Réduit le padding vertical */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centre le contenu verticalement */
    align-items: center; /* Centre le contenu horizontalement */
    width: 100%; /* Occupe toute la largeur de la fenêtre */
    box-sizing: border-box;
    margin-top: auto;
}

.social__media--wrap {
    display: flex;
    justify-content: space-between; /* Espacement entre les éléments */
    align-items: center; /* Centre les éléments verticalement */
    width: 100%; /* Occupe toute la largeur de la fenêtre */
    padding: 0 50px; /* Ajoute un padding horizontal pour éviter que le contenu ne touche les bords */
    box-sizing: border-box;
}

.social__icons {
    display: flex;
    justify-content: center; /* Centre les icônes horizontalement */
    align-items: center; /* Centre les icônes verticalement */
    width: auto; /* Ajuste la largeur automatiquement */
}

.social__logo {
    color: #d1d1d1;
    justify-self: flex-start;
    margin-left: 0; /* Supprime la marge à gauche */
    cursor: pointer;
    text-decoration: none;
    font-size: 2rem;
    display: flex;
    align-items: center;
    margin-bottom: 0; /* Supprime la marge en bas */
}

.website__right {
    color: #757575;
    text-align: center; /* Centre le texte */
    margin-top: 10px; /* Ajoute un espace en haut du texte */
}

@media screen and (max-width: 960px) {
    .social__media--wrap {
        flex-direction: column; /* Aligne les éléments en colonne pour les écrans plus petits */
        padding: 0; /* Supprime le padding horizontal */
    }

    .social__icons {
        margin-top: 10px; /* Ajoute un espace en haut des icônes */
    }

    .social__logo {
        margin-bottom: 10px; /* Ajoute un espace en bas du logo */
    }
}

@media screen and (max-width: 600px) {
    .footer__container {
        flex-direction: column;
        align-items: center;
        padding: 0 10px;
    }

    .footer__links--wrapper {
        flex-direction: column;
        align-items: center;
    }

    .footer__links--items {
        margin: 10px 0;
        text-align: center;
    }

    .social__media--wrap {
        flex-direction: column;
        align-items: center;
    }

    .social__icons {
        margin-top: 10px;
    }

    .social__logo {
        margin-bottom: 10px;
    }
}