/**
 * S-BEE ONE – Video Grid (Moments Appréciés)
 * CSS totalement indépendant + modal lightbox
 */

/* === RESET === */
.sbee-video-grid,
.sbee-video-grid *,
.sbee-video-grid *::before,
.sbee-video-grid *::after {
    box-sizing: border-box;
}

/* === WRAPPER === */
.sbee-video-grid {
    width: 100%;
    padding: 60px 40px;
    text-align: center;
    background: #fff;
}

/* === TITRE === */
.sbee-video-grid .sbee-vg-title {
    font-family: 'Raleway', sans-serif !important;
    font-size: 38px !important;
    font-weight: 700 !important;
    color: var(--sbee-vg-title, #BB9B34) !important;
    text-align: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

/* === SOUS-TITRE === */
.sbee-video-grid .sbee-vg-subtitle {
    font-family: 'Raleway', sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: var(--sbee-vg-sub, #09357C) !important;
    text-align: center !important;
    max-width: 760px !important;
    margin: 0 auto 48px auto !important;
    padding: 0 !important;
    line-height: 1.6 !important;
}

/* === GRILLE === */
.sbee-video-grid .sbee-vg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

/* === CARTE VIDÉO === */
.sbee-video-grid .sbee-vg-item {
    display: flex;
    flex-direction: column;
    gap: 14px;
    cursor: pointer;
}

/* === MINIATURE === */
.sbee-video-grid .sbee-vg-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111;
}

.sbee-video-grid .sbee-vg-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: brightness(0.85);
}

.sbee-video-grid .sbee-vg-item:hover .sbee-vg-thumb img {
    transform: scale(1.05);
    filter: brightness(0.7);
}

/* === BOUTON PLAY === */
.sbee-video-grid .sbee-vg-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.25s ease;
    z-index: 2;
}

.sbee-video-grid .sbee-vg-play svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.35));
}

.sbee-video-grid .sbee-vg-item:hover .sbee-vg-play {
    transform: translate(-50%, -50%) scale(1.12);
}

/* === LABEL === */
.sbee-video-grid .sbee-vg-label {
    font-family: 'Raleway', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--sbee-vg-label, #333);
    text-align: left;
    line-height: 1.4;
    padding: 10px 12px;
    border-left: 1px solid rgba(35, 66, 247, 0.10);
    border-right: 1px solid rgba(35, 66, 247, 0.10);
    border-bottom: 1px solid rgba(35, 66, 247, 0.10);
    margin-top: -8px;
}

/* =====================================================
   MODAL LIGHTBOX
   ===================================================== */

.sbee-vg-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sbee-vg-modal:not([hidden]) {
    opacity: 1;
    pointer-events: all;
}

/* Overlay sombre */
.sbee-vg-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 10, 25, 0.88);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

/* Boîte intérieure */
.sbee-vg-modal-inner {
    position: relative;
    z-index: 1;
    width: 90vw;
    max-width: 960px;
    transform: translateY(24px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    opacity: 0;
}

.sbee-vg-modal:not([hidden]) .sbee-vg-modal-inner {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Ratio 16:9 pour l'iframe */
.sbee-vg-modal-video {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 32px 80px rgba(0,0,0,0.6);
}

.sbee-vg-modal-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Bouton fermer */
.sbee-vg-modal-close {
    position: absolute;
    top: -48px;
    right: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

.sbee-vg-modal-close:hover {
    opacity: 1;
    transform: scale(1.15) rotate(90deg);
}

.sbee-vg-modal-close svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* === RESPONSIVE TABLETTE === */
@media (max-width: 768px) {
    .sbee-video-grid {
        padding: 48px 24px;
    }

    .sbee-video-grid .sbee-vg-title {
        font-size: 28px !important;
    }

    .sbee-video-grid .sbee-vg-subtitle {
        font-size: 15px !important;
        margin-bottom: 32px !important;
    }

    .sbee-video-grid .sbee-vg-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .sbee-vg-modal-inner {
        width: 95vw;
    }
}

/* === RESPONSIVE MOBILE === */
@media (max-width: 480px) {
    .sbee-video-grid {
        padding: 36px 16px;
    }

    .sbee-video-grid .sbee-vg-title {
        font-size: 22px !important;
    }

    .sbee-vg-modal-close {
        top: -44px;
    }
}
