/* ============================================
   WP Video Preview Loop — Styles Frontend
   Version 1.0.0
   ============================================ */

/* ── Conteneur principal ─────────────────── */
.wp-video-wrap {
    position: relative;
    width: 100%;
    max-width: 900px;        /* surchargé par l'attribut shortcode */
    margin: 0 auto;
    aspect-ratio: 9 / 16;   /* surchargé par l'attribut shortcode */
    background: #000;
    border-radius: var(--wpvp-radius, 20px);
    overflow: hidden;
}

/* ── Élément <video> ─────────────────────── */
.wp-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

/* ── Bouton Play (overlay centré) ───────── */
.wp-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: none;
    cursor: pointer;
    transition: opacity 0.25s ease, transform 0.2s ease;
    padding: 0;
}

.wp-video-play:hover {
    transform: scale(1.08);
}

.wp-video-play:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px;
    border-radius: 50%;
}

/* Cacher le bouton quand la vidéo joue */
.wp-video-wrap.playing .wp-video-play {
    opacity: 0;
    pointer-events: none;
}

/* ── Couleurs SVG (via variables CSS injectées) */
.play-circle {
    fill: var(--wpvp-circle, #7c9e73);
    transition: fill 0.2s ease;
}

.play-icon {
    fill: var(--wpvp-triangle, #ffffff);
}

/* ── Effet de survol sur le cercle ──────── */
.wp-video-play:hover .play-circle {
    filter: brightness(1.15);
}

/* ── Responsive mobile ───────────────────── */
@media (max-width: 600px) {
    .wp-video-wrap {
        border-radius: calc(var(--wpvp-radius, 20px) * 0.6);
    }

    .wp-video-play svg {
        width: 55px;
        height: 84px;
    }
}
