/* =========================================================
   Video Carousel – styles front-end
   ========================================================= */

/* ── Wrapper global ── */
.vc-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    user-select: none;
    margin: 0 auto;
}

/* ── Zone de défilement ── */
.vc-track-outer {
    overflow: hidden;
    width: 100%;
}

.vc-track {
    display: flex;
    align-items: stretch;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* ── Slide ── */
.vc-slide {
    flex: 0 0 100%;
    min-width: 0;
    padding: 0 4px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Boîte ratio ── */
/*
 * La hauteur est pilotée par la variable CSS --vc-height (défaut 400px),
 * injectée en inline style sur .vc-wrapper depuis le shortcode.
 * La largeur se calcule automatiquement selon le ratio du format.
 */
.vc-ratio-box {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

/* Horizontal → largeur = hauteur × (16/9) */
.vc-ratio-box--horizontal {
    height: var(--vc-height, 400px);
    width: calc(var(--vc-height, 400px) * 16 / 9);
    max-width: 100%; /* repli sur petits écrans */
}

/* Vertical → largeur = hauteur × (9/16) */
.vc-ratio-box--vertical {
    height: var(--vc-height, 400px);
    width: calc(var(--vc-height, 400px) * 9 / 16);
    margin: 0 auto;
}

/* Sur petits écrans : hauteur réduite pour que la vidéo verticale reste visible */
@media (max-width: 480px) {
    .vc-ratio-box--vertical {
        height: min(var(--vc-height, 400px), 70vw * 16 / 9);
        width: calc(min(var(--vc-height, 400px), 70vw * 16 / 9) * 9 / 16);
    }
}

.vc-ratio-box iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ── Titre de la vidéo ── */
.vc-slide__title {
    margin: 10px 0 0;
    font-size: 0.9em;
    color: #333;
    text-align: center;
    font-weight: 600;
}

/* ── Boutons précédent / suivant ── */
.vc-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-size: 1.25rem;
    line-height: 1;

    /* styles imposés */
    height: 2rem;
    width: 2rem;
    padding: 0.5rem 1rem;
    background-color: var(--cs-color-layout-elements-background, #fff);
    color: var(--cs-color-primary, #000);
    border-radius: 0;
    opacity: 0;
    -webkit-transition: 0.25s;
    transition: 0.25s;
    box-shadow: 4px 1px 0px -1px #000000;
    border: 1px solid #000000;
}

/* Apparition des boutons au survol du carrousel */
.vc-wrapper:hover .vc-btn,
.vc-btn:focus {
    opacity: 1;
}

.vc-btn--prev { left: 8px; }
.vc-btn--next { right: 8px; }

.vc-btn:disabled {
    opacity: 0 !important;
    cursor: default;
    pointer-events: none;
}

/* ── Dots de pagination ── */
.vc-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.vc-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #bbb;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}

.vc-dot--active,
.vc-dot:hover {
    background: #0073aa;
    transform: scale(1.3);
}

/* ── État vide ── */
.vc-empty {
    text-align: center;
    color: #777;
    font-style: italic;
    padding: 2em 0;
}
