/* ========== SECTION SERVICES ========== */

.boxService {
    padding-bottom: 50px;
    background-color: var(--color-gray-background);
}

/* ========== CONTENEUR DE LA GALERIE ========== */

.boxGal {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Options (cartes de service) */
.boxGal .options {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow-x: auto;
    scroll-behavior: smooth;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    height: 400px;
    padding: 0 10px;
    gap: 10px;
}

/* ========== OPTIONS (CARTES INDIVIDUELLES) ========== */

.boxGal .options .option {
    position: relative;
    overflow: hidden;
    min-width: 60px;
    margin: 10px;
    background: var(--optionBackground, var(--defaultBackground, rgb(0, 0, 0)));
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: 0.8s cubic-bezier(0.05, 0.61, 0.41, 0.95);
    box-shadow: 0 4px 6px var(--color-gray-shadow);
    border: 1px solid var(--color-gray-border);
    border-radius: 8px;
    cursor: default;
}

/* Option active (agrandie) */
.option.active {
    flex-grow: 10000;
    transform: scale(1);
    max-width: 600px;
    margin: 0;
    border-radius: 8px;
    background-size: auto 100%;
}

.option:not(.active) {
    flex-grow: 1;
}

/* ========== LABEL (ZONE D’INFORMATION BASSE) ========== */

.label {
    display: flex;
    position: absolute;
    right: 0;
    height: 40px;
    transition: 0.5s cubic-bezier(0.05, 0.61, 0.41, 0.95);
}

/* Positionnement du label selon l’état */
.option.active .label {
    bottom: 20px;
    left: 20px;
}

.option:not(.active) .label {
    bottom: 10px;
    left: 10px;
}

/* ========== ICÔNE ========== */

.icon {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    min-width: 40px;
    max-width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: var(--color-site-item);
    color: var(--color-gray-background);
}

.icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* ========== INFOS DE CHAQUE SERVICE ========== */

.info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: 5px;
    color: var(--color-gray-background);
    font-weight: bold;
}

/* Animation sur le texte de titre */
.option.active .label .info .title {
    left: 0;
    opacity: 1;
    text-shadow: 0 0 10px black;
}

.option:not(.active) .label .info .title {
    left: 20px;
    opacity: 0;
}

/* ========== COMPORTEMENT RESPONSIVE ========== */

/* ===== GALLERY SIMPLE (mobile) ===== */
/* ===== GALLERIE RESPONSIVE MOBILE ===== */

.boxSimpleGallery {
    display: none;
}

.galleryResponsive {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 2vmin;
    padding: 0 14px;
    list-style-type: none;
}

.galleryResponsive li {
    list-style-type: none;
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 50%;
    height: auto;
}

.img-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px var(--color-gray-shadow);
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Légende */
.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    font-size: 0.9rem;
}

.caption img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* ===== MEDIA QUERY ===== */
@media (max-width: 995px) {
    .boxInteractive {
        display: none !important;
    }

    .boxSimpleGallery {
        display: block;
    }

    /* Cacher la version interactive */
    .boxGal {
        display: none;
    }

    /* Afficher la version mobile */
    .boxSimpleGallery {
        display: block;
    }

    .galleryResponsive {
        max-width: 1100px;
        margin: 0 auto;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        padding: 0 10px;
    }

    .galleryResponsive li {
        list-style-type: none;
        flex-grow: 1;
        min-width: 150px;
        flex-basis: calc(50% - 10px);
        height: auto;
    }

    .img-wrapper {
        position: relative;
        width: 100%;
        overflow: hidden;
        border-radius: 8px;
        box-shadow: 0 4px 6px var(--color-gray-shadow);
        border: 1px solid var(--color-gray-border);
        cursor: default;
    }

    .img-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .img-wrapper .label {
        display: flex;
        align-items: center;
        position: absolute;
        bottom: 10px;
        left: 10px;
    }

    .img-wrapper .icon {
        min-width: 40px;
        max-width: 40px;
        height: 40px;
        border-radius: 8px;
        background-color: var(--color-site-item);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .img-wrapper .icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        filter: brightness(0) invert(1);
    }

    .img-wrapper .info {
        color: var(--color-gray-background);
        font-weight: bold;
        font-size: 14px;
        text-align: left;
    }

    .img-wrapper .info p {
        margin: 0;
    }
}

@media (max-width: 550px) {
    .galleryResponsive li {
        flex-basis: 100%;
        min-width: 100%;
        height: 200px;
    }

    .img-wrapper {
        width: 100%;
        height: 100%;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 4px 6px var(--color-gray-shadow);
    }

    .img-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
}
