html,
body {
    overflow-x: hidden;
}

/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ------------- MEDIA MIN-WIDTH 350PX --------------- */
/* ------------------ SUP. OU ÉGALE ------------------ */
/* --------------------------------------------------- */
@media screen and (min-width: 350px) {
    main {
        margin: 330px auto 280px auto;
        width: 90%;
        max-width: 1400px;
    }

    .project {
        margin: 50px auto 250px auto;
        display: flex;
        flex-direction: column;
        max-width: 1200px;

        ul li {
            padding: 0;
            font-size: var(--text-size-mobile);
        }

        strong {
            font-size: var(--text-size-mobile);
        }

        ul {
            margin-top: 40px;
            display: flex;
            flex-direction: column;
        }

        li {
            font-family: "InclusiveSans-Light";
            font-weight: normal;
            font-style: normal;
        }

        h1 {
            margin-bottom: 25px;
            font-family: "InclusiveSans-Light";
            font-weight: normal;
            font-style: normal;
            font-size: var(--heading-size-mobile);
        }
    }

    .description_projet img,
    .gallery img {
        width: 100%;
        height: auto;
        max-width: 900px;
        object-fit: cover;
        display: block;
        margin: 0 auto;
    }

    .description_projet {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 5px;
        overflow: hidden;
    }

    .gallery {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .title_projet {
        display: flex;
        flex-direction: column;
    }

    .description_projet {
        display: flex;
        justify-content: space-between;
        flex-direction: column;
    }

    .previous_next {
        display: flex;
        justify-content: space-between;
    }

    .previous,
    .next {
        a {
            display: flex;
            gap: var(--gutter-width);
            font-size: var(--text-size-mobile);
        }
    }

    .previous,
    .next {
        display: flex;
        align-items: center;
        gap: var(--gutter-width);
        margin-top: 60px;
        margin-bottom: 10px;
    }

    .previous img,
    .next img {
        width: 20px;
    }

    .previous img {
        rotate: 270deg;
    }

    .next img {
        rotate: 90deg;
    }

    #carousel-modal {
        display: none;
    }

    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }

    .zoom-overlay,
    .modal-close {
        display: none;
    }
}


/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ------------- MEDIA MIN-WIDTH 768PX --------------- */
/* ------------------ SUP. OU ÉGALE ------------------ */
/* --------------------------------------------------- */
@media screen and (min-width: 768px) {
    main {
        width: 85%;
    }
}



/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ------------- MEDIA MIN-WIDTH 1000PX --------------- */
/* ------------------ SUP. OU ÉGALE ------------------ */
/* --------------------------------------------------- */
@media screen and (min-width: 1000px) {
    main {
        margin: 230px auto 150px auto;
        width: 80%;
    }

    .project {
        margin: 20px auto 30px auto;
        width: 80%;
    }

    .previous a,
    .next a,
    .project ul li,
    .project strong {
        font-size: var(--text-size-desktop);
    }

    .project h1 {
        font-size: var(--heading-size-desktop);
    }

    .previous,
    .next {
        margin-top: 30px;
    }

    /* swiper */
    .gallery {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .thumbnail-item {
        cursor: pointer;
        transition: opacity 0.3s ease;
    }

    .thumbnail-item:hover {
        opacity: 0.8;
    }

    .thumbnail-item img {
        width: 100%;
        height: auto;
        display: block;
    }

    /* Style pour la modale */
    .modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 20;
        width: 100%;
        height: 100%;
        background-color: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .modal-content {
        position: relative;
        max-width: 700px;
        width: auto;
        display: flex;
        flex-direction: column;
        margin: 0 100px;
    }

    /* Style pour le nouveau carousel */
    .custom-carousel {
        position: relative;
        width: 100%;
        overflow: hidden;
    }

    .custom-carousel-inner {
        display: flex;
        transition: transform 0.5s ease;
    }

    .custom-carousel-slide {
        min-width: 100%;
    }

    .custom-carousel-slide img {
        width: 100%;
        height: auto;
        display: block;
    }

    /* Style pour les boutons de navigation */
    .custom-carousel-button {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        border: none;
        padding: 10px;
        cursor: pointer;
        z-index: 10;
        background-color: transparent;
    }

    .custom-carousel-button.custom-prev {
        left: -140px;
    }

    .custom-carousel-button.custom-next {
        right: -140px;
    }

    .custom-carousel-button:hover {
        background-color: transparent !important;
        color: inherit !important;
    }

    /* Style pour le compteur */
    .custom-carousel-counter {
        color: black;
        font-size: 16px;
        font-family: 'InclusiveSans-Light', sans-serif;
        z-index: 10;
        margin-top: 5px;
    }

    .modal-close {
        width: 100%;
        max-width: 700px;
        display: flex;
        justify-content: flex-end;
        padding-bottom: 10px;
        box-sizing: border-box;
    }

    .modal-close img {
        width: 15px;
        rotate: 270deg;
    }

    .modal-close a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
    }

    /* Style pour le Swiper */
    .carousel-swiper {
        width: 100%;
        height: 100%;
        position: relative;
    }

    .swiper-slide {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        height: auto;
    }

    .swiper-slide img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        margin: auto;
    }

    .custom-prev img,
    .custom-next img {
        width: 20px;
        height: auto;
    }

    .custom-prev img {
        transform: rotate(270deg);
    }

    .custom-next img {
        transform: rotate(90deg);
    }

    .modal.active {
        display: flex !important;
    }

    .modal.active .swiper-counter {
        display: flex !important;
        justify-content: flex-end;
    }

    .project {
        li {
            width: 300px;
        }
    }

    /* Zoom */
    .zoom-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(255, 255, 255, 0.9);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 2000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        cursor: zoom-out;
    }

    .zoom-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .zoomed-image {
        max-width: 85%;
        max-height: 85%;
        object-fit: contain;
        transition: transform 0.3s ease;
        cursor: zoom-in;
    }

    .zoom-overlay.active .zoomed-image {
        transform: scale(1);
    }

    .zoom-close {
        position: absolute;
        top: 20px;
        right: 20px;
        cursor: pointer;
        width: 40px;
        height: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: rgba(0, 0, 0, 0.5);
        border-radius: 50%;
        box-sizing: border-box;
    }

    .close-icon {
        width: 20px;
        height: 20px;
    }

    .zoom-navigation {
        position: absolute;
        bottom: 20px;
        left: 0;
        right: 0;
        display: flex;
        justify-content: center;
        gap: 100px;
    }

    .zoom-prev,
    .zoom-next {
        background-color: rgba(0, 0, 0, 0.5);
        color: white;
        border: none;
        padding: 6px 10px;
        cursor: pointer;
        border-radius: 4px;
        font-size: 16px;
        transition: background-color 0.3s ease;
    }

    .zoom-prev:hover,
    .zoom-next:hover,
    .zoom-close:hover {
        background-color: rgba(255, 255, 255, 0.3);
        color: black;
    }

    .custom-carousel-slide img {
        cursor: zoom-in;
    }

    .zoom-counter {
        position: absolute;
        bottom: 2px;
        color: white;
        font-size: 14px;
        background-color: rgba(0, 0, 0, 0.5);
        padding: 5px 10px;
        border-radius: 15px;
    }

}


/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ------------- MEDIA MIN-WIDTH 1200PX --------------- */
/* ------------------ SUP. OU ÉGALE ------------------ */
/* --------------------------------------------------- */
@media screen and (min-width: 1200px) {
    main {
        margin: 145px auto 100px auto;
        width: 85%;
    }

    .project {
        margin: 20px auto 60px auto;

        ul {
            margin-top: 0;
        }
    }

    .description_projet {
        display: flex;
        justify-content: space-between;
    }

    .text_projet {
        display: flex;
        gap: 100px;
    }

    .gallery {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
}


/* --------------------------------------------------- */
/* --------------------------------------------------- */
/* ------------- MEDIA MIN-WIDTH 1500PX --------------- */
/* ------------------ SUP. OU ÉGALE ------------------ */
/* --------------------------------------------------- */
@media screen and (min-width: 1500px) {
    main {
        width: 90%;
    }

    .project {
        margin: 20px auto 125px auto;
        width: 90%;
    }

    .text_projet {
        gap: 300px;
    }

    .modal-content {
        max-width: 920px;
    }

    .modal-close {
        max-width: 920px;
    }
}