.factonvideos-home {
    margin: 30px 0;
}

.factonvideos-title {
    margin-bottom: 20px;
}

/* ---- Grille de vignettes verticales (Shorts 9:16) ---- */
.factonvideos-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.factonvideos-card {
    position: relative;
    width: 240px;
    max-width: 46%;
    aspect-ratio: 9 / 16;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    background-color: #000;
    background-size: cover;
    background-position: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    transition: transform .2s ease, box-shadow .2s ease;
}

.factonvideos-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .35));
}

.factonvideos-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .28);
}

.factonvideos-card:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* Bouton play */
.factonvideos-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 62px;
    height: 62px;
    margin: -31px 0 0 -31px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    transition: background .2s ease, transform .2s ease;
}

.factonvideos-card:hover .factonvideos-play {
    background: rgba(230, 33, 23, .9);
    transform: scale(1.06);
}

.factonvideos-play::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent #fff;
}

/* ---- Modal plein ecran fond noir ---- */
.factonvideos-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .92);
}

.factonvideos-modal.is-open {
    display: flex;
}

.factonvideos-modal-inner {
    position: relative;
    width: min(95vw, calc(90vh * 9 / 16));
    aspect-ratio: 9 / 16;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}

.factonvideos-modal-inner iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.factonvideos-close {
    position: absolute;
    top: 18px;
    right: 22px;
    z-index: 2;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 28px;
    line-height: 44px;
    cursor: pointer;
    transition: background .2s ease;
}

.factonvideos-close:hover {
    background: rgba(255, 255, 255, .25);
}

/* Fallback si aspect-ratio non supporte (vieux navigateurs) */
@supports not (aspect-ratio: 1) {
    .factonvideos-card {
        height: 0;
        padding-top: 177.78%;
    }
    .factonvideos-modal-inner {
        width: 360px;
        height: 640px;
    }
}
