@media screen and (max-width:600px) {

    .oaka-woo-custom-gallery__item,
    .oaka-woo-custom-gallery__item iframe {
        height: 220px !important;
    }

    .mfp-content.oaka-has-video,
    .mfp-content.oaka-has-video iframe {
        height: 220px !important;
        width: 100% !important;
    }

    .carousel-nav>div {
        opacity: 1!important;
    }
}

/* Quand aucune galerie n'est affichee mais que des videos sont */
#video-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    margin-bottom: 60px;
}

.video-wrapper {
    aspect-ratio: 16 / 9;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.video-wrapper.is-short {
    /* max-width: 360px; */
    max-height: 640px;
    margin: 0 auto;
    aspect-ratio: 9 / 16;
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Pour les shorts : hauteur fixe de l'iframe */
.video-wrapper.is-short iframe {
    height: 640px;
    /* fixe la hauteur pour shorts */
    max-height: 90vh;
    /* pas plus que 90% hauteur écran */
}

/* Carousel : cacher tous sauf actif */
.carousel-item {
    display: none;
}

.carousel-item.active {
    display: block;
    max-height: 640px;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
    /* pour éviter d’interférer en dehors des boutons */
    padding: 0 10px;
    z-index: 10;
    transition: padding 0.3s ease;
}

.carousel-nav>div {
    opacity: 0;
    pointer-events: auto;
    /* pour que seuls les boutons soient cliquables */
    cursor: pointer;
    user-select: none;
    background: transparent;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'TaFontPerso', sans-serif;
    font-size: 40px;
    transition: all 0.3s ease;
}

#video-container:hover .carousel-nav>div {
    opacity: 1;
}
#video-container:hover .carousel-nav {
    padding: 0 20px;
}

.carousel-nav div#prev-video {
    font-family: 'ETmodules';
}

.carousel-nav div#next-video {
    font-family: 'ETmodules';
}