/* ============================================================
   Video Lightbox Elementor — Frontend CSS
   Auteur: Tsima Tsimiavona
   ============================================================ */

/* ---- Wrapper ---- */
.vle-video-wrapper {
    display: block;
    width: 720px;
    max-width: 100%;
    margin: 0 auto;
    line-height: 0;
}

/* ---- Trigger link ---- */
.vle-lightbox-trigger {
    display: block;
    position: relative;
    text-decoration: none;
    overflow: hidden;
    border-radius: 6px;
    /* Ratio 16:9 */
    aspect-ratio: 16 / 9;
    background: #111;
    /* Bordure vidéo */
    border: 3px solid #1e6bbd;
    box-shadow: 0 0 0 1px rgba(30,107,189,.25), 0 6px 28px rgba(0,0,0,.28);
    transition: border-color .25s, box-shadow .25s;
}

.vle-lightbox-trigger:hover {
    border-color: #2d86e8;
    box-shadow: 0 0 0 1px rgba(45,134,232,.4), 0 8px 36px rgba(0,0,0,.35);
}

/* ---- Poster image ---- */
.vle-poster-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease, filter .35s ease;
}

.vle-lightbox-trigger:hover .vle-poster-img {
    transform: scale(1.04);
    filter: brightness(.82);
}

.vle-poster-placeholder {
    width: 100%;
    height: 100%;
    background: #1a1a2e;
}

/* ---- Play button ---- */
.vle-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 72px;
    height: 72px;
    pointer-events: none;
    transition: transform .25s ease;
    filter: drop-shadow(0 4px 18px rgba(0,0,0,.55));
}

.vle-play-btn svg {
    width: 100%;
    height: 100%;
}

.vle-lightbox-trigger:hover .vle-play-btn {
    transform: translate(-50%, -50%) scale(1.15);
}

/* ---- Video badge ---- */
.vle-video-badge {
    position: absolute;
    bottom: 10px;
    left: 12px;
    background: rgba(30,107,189,.88);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    pointer-events: none;
    backdrop-filter: blur(4px);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1;
}

.vle-video-badge svg {
    width: 10px;
    height: 10px;
    fill: #fff;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .vle-video-wrapper {
        width: 100%;
    }
    .vle-play-btn {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 480px) {
    .vle-play-btn {
        width: 46px;
        height: 46px;
    }
    .vle-video-badge {
        font-size: 10px;
        padding: 3px 8px;
        bottom: 7px;
        left: 8px;
    }
}

/* ============================================================
   LIGHTBOX OVERLAY
   ============================================================ */

.vle-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0,0,0,.88);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.vle-overlay.vle-open {
    display: flex;
    animation: vleOverlayIn .22s ease;
}

@keyframes vleOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---- Lightbox inner ---- */
.vle-lightbox-inner {
    position: relative;
    width: 100%;
    max-width: 960px;
    animation: vleLightboxIn .28s cubic-bezier(.22,.61,.36,1);
}

@keyframes vleLightboxIn {
    from { transform: scale(.88); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* ---- Video container 16:9 ---- */
.vle-lightbox-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,.7);
}

.vle-lightbox-video-wrap video,
.vle-lightbox-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ---- Close button ---- */
.vle-close-btn {
    position: absolute;
    top: -44px;
    right: 0;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,.15);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, transform .2s;
    padding: 0;
}

.vle-close-btn:hover {
    background: rgba(255,255,255,.3);
    transform: scale(1.1);
}

.vle-close-btn svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

/* ---- Responsive lightbox ---- */
@media (max-width: 640px) {
    .vle-overlay {
        padding: 12px;
        align-items: center;
    }
    .vle-close-btn {
        top: -40px;
        right: 0;
        width: 32px;
        height: 32px;
    }
}
