/* Règles pour masquer la version mobile sur desktop */
@media screen and (min-width: 1201px) {
    .mobile-version {
        display: none !important;
    }
    .desktop-version {
        display: block !important;
    }
}

/* Règles pour masquer la version desktop sur mobile */
@media screen and (max-width: 1200px) {
    .desktop-version {
        display: none !important;
    }
    .mobile-version {
        display: block !important;
    }
    body {
        overflow-y: auto !important;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden
}

/* NAVIGATION */ 

.mobile_navbar {
    background: #fff;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

.mobile_navbar__container {
    display: flex;
    justify-content: space-between;
    height: 80px;
    z-index: 1;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    border-bottom: 2px solid black;
}

#mobile_navbar__logo {
    color: #000;
    display: flex;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    font-size: 2rem;
    font-weight: 600;
}

.mobile_navbar__menu {
    display: flex;
    align-items: center;
    list-style: none;
    text-align: center;
}

.mobile_navbar__links {
    color: #757575;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0 30px;
    height: 100%;
}

.mobile_navbar__btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 1rem;
    width: 100%;
}

.mobile_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;
}

.mobile_button:hover {
    background: #d1d1d1;
    transition: all 0.3s ease;
}

.mobile_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: 1200px) {
    .mobile_navbar__container {
        display: flex;
        justify-content: flex-start;
        height: 80px;
        z-index: 1;
        max-width: 1200px;
        padding: 0px;
    }

    .mobile_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: 40vh;
        z-index: -1;
        background: #131313;
    }

    .mobile_navbar__menu.active {
        background: #ededed;
        top: 100%;
        opacity: 1;
        transition: all 0.5s ease;
        z-index: 99;
        height: 40vh;
        font-size: 1.2rem;
    }

    #mobile_navbar__logo {
        padding-left: 25px;
    }

    .mobile_navbar__toggle .bar {
        width: 25px;
        height: 3px;
        margin: 5px auto;
        transition: all 0.3s ease-in-out;
        background: #000;
    }

    .mobile_navbar__item {
        width: 100%;
    }

    .mobile_navbar__links {
        text-align: left;
        padding: 2rem;
        width: 100%;
        display: table;
    }

    #mobile_mobile-menu {
        position: absolute;
        top: 20%;
        right: 5%;
        transform: translate(5%,20%);
    }

    .mobile_navbar__btn {
        padding-bottom: 2rem;
    }

    .mobile_button {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 80%;
        height: 40px;
        margin: 0;
    }

    .mobile_navbar__toggle .bar {
        display: block;
        cursor: pointer;
    }

    #mobile_mobile-menu.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    #mobile_mobile-menu.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    #mobile_mobile-menu.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Hero Section CSS */

.mobile_contenu {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.mobile_main {
    background-color: #f9f9f9;
    position: relative;
    z-index: 1;
    flex: 1;
    padding-bottom: 20px;
}

.mobile_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: #f9f9f9;
    z-index: 1;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box; /* Ensure padding is included in the width */
}

.mobile_main__content h1 {
    margin-top: 50px;
}
.mobile_main__content h2 {
    font-weight: 500;
    padding: 20px;
}

.mobile_main__content p {
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 200;
    color: #000;
    padding: 1rem;
}

.mobile_main__projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
}

.mobile_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;
}

.mobile_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;
}


.mobile_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;
}

.mobile_project__spec img:hover {
    transform: scale(1.03); /* Agrandit légèrement l'image lors du survol */
}

.mobile_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 */
}

.mobile_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 */
}

.mobile_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 */
}

.mobile_project__spec img.enlarged + .overlay {
    display: block; /* Affiche le fond lorsque l'image est agrandie */
}

.mobile_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;
}

.mobile_project:hover {
    transform: scale(1.05);
}

.mobile_project a {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

.mobile_project__image {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.mobile_project__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.mobile_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;
}

.mobile_project__image:hover .mobile_project__overlay {
    opacity: 1;
}

.mobile_project__overlay h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.mobile_project__overlay p {
    font-size: 1rem;
    margin-bottom: 20px;
}

.mobile_project__overlay button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    background-color: #000;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.mobile_project__overlay button:hover {
    background-color: #d1d1d1;
}

.mobile_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;
}

.mobile_overlay.active {
    display: flex;
}

.mobile_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;
}

.mobile_close-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.mobile_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;
}

.mobile_nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.mobile_left-btn {
    left: 70px;
}

.mobile_right-btn {
    right: 70px;
}


.mobile_main__content--text {
    max-width: 1500px;
    text-align: justify;
}

.mobile_main__content--text p {
    padding: 10px;
}

.mobile_main__content--cv {
    max-width: 1500px;
    text-align: justify;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 10px;
    font-size: 1rem;
}

.mobile_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: 1200px) {
    .mobile_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;
    }

    .mobile_main__content {
        text-align: center;
        margin-bottom: 4rem;
    }

    .mobile_main__content h1 {
        font-size: 2.5rem;
        margin-top: 2rem;
    }

    .mobile_main__content h2 {
        font-size: 3rem;
    }

    .mobile_main__content p {
        margin-top: 1rem;
        font-size: 1rem;
        margin-left: 10px;
        margin-right: 10px;
    }
}

@media screen and (max-width: 1200px) {
    .mobile_main__content--text,
    .mobile_main__content--cv {
        text-align: left; /* Centre le texte */
        font-size: 10px; /* Réduit la taille de la police */
    }

    .mobile_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: 1200px) {
    .mobile_main__content h1 {
        font-size: 2rem;
        margin-top: 3rem;
    }

    .mobile_main__content h2 {
        font-size: 1.5rem;
    }

    .mobile_main__content p {
        margin-top: 2rem;
        font-size: 1rem;
    }
}

@media screen and (max-width: 1200px) {
    .mobile_project__spec img {
        width: 100%;
        height: auto;
    }

    .mobile_project__spec img.enlarged {
        width: 300px;
        height: auto;
        object-fit: contain;
        top: 50%;
        left: 50%;
        transform: none;
        transform: translate(-50%, -50%);
        z-index: 1005;
    }

    .mobile_overlay {
        display: none; /* Masque l'overlay par défaut en mode téléphone */
        z-index: 1004;
    }

    .mobile_overlay.active {
        display: flex; /* Affiche l'overlay uniquement lorsqu'il est actif */
        z-index: 1004;
    }

    .mobile_close-btn {
        top: 100px;
        right: 20px;
        z-index: 1006;
    }

    .mobile_nav-btn {
        top: 50%;
        transform: translateY(-50%);
        z-index: 1006;
    }

    .mobile_left-btn {
        left: 20px;
    }

    .mobile_right-btn {
        right: 20px;
    }
}


