/* ==========================================================================
   v3-fo-lightbox
   Les tailles des boutons sont en cqw (% de la largeur de la lightbox) pour
   rester calées sur le visuel quelle que soit la taille d'affichage.
   Desktop : maquette 1400 x 1000 / Mobile : maquette 640 x 1000
   ========================================================================== */

.fsep-lb {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.fsep-lb[hidden] {
    display: none;
}

/* fond : voile + flou gaussien, en fondu */
.fsep-lb__backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(10, 24, 56, .45);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity .35s ease;
}

.fsep-lb.is-open .fsep-lb__backdrop {
    opacity: 1;
}

/* boîte */
.fsep-lb__dialog {
    position: relative;
    width: min(92vw, 840px, calc((100vh - 32px) * 1.4));
    width: min(92vw, 840px, calc((100svh - 32px) * 1.4));
    aspect-ratio: 1400 / 1000;
    container-type: inline-size;
    overflow: hidden;
    border-radius: 12px;
    background-color: #123274;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
    opacity: 0;
    transform: translateY(16px) scale(.97);
    transition: opacity .35s ease, transform .35s cubic-bezier(.2, .8, .2, 1);
}

.fsep-lb__dialog:focus {
    outline: none;
}

.fsep-lb.is-open .fsep-lb__dialog {
    opacity: 1;
    transform: none;
}

.fsep-lb__picture,
.fsep-lb__img {
    display: block;
    width: 100%;
    height: 100%;
}

.fsep-lb__img {
    object-fit: cover;
}

/* croix de fermeture */
.fsep-lb__close {
    position: absolute;
    top: clamp(8px, 1.6cqw, 16px);
    right: clamp(8px, 1.6cqw, 16px);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(34px, 5cqw, 44px);
    height: clamp(34px, 5cqw, 44px);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, .92);
    color: #123274;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
    transition: background-color .2s ease, color .2s ease;
}

.fsep-lb__close svg {
    width: 45%;
    height: 45%;
}

.fsep-lb__close:hover {
    background-color: #123274;
    color: #fff;
}

.fsep-lb__close:focus-visible {
    outline: 3px solid #E84E0F;
    outline-offset: 2px;
}

/* boutons : bas-gauche, côte à côte */
.fsep-lb__ctas {
    position: absolute;
    left: 3.86%;
    bottom: 14.5%;
    display: flex;
    flex-wrap: nowrap;
    gap: 2.93cqw;
}

.fsep-lb .fsep-lb__btn {
    --lb-bg: #E84E0F;
    --lb-color: #fff;
    --lb-border: #E84E0F;

    display: inline-flex;
    align-items: center;
    gap: 1.5cqw;
    box-sizing: border-box;
    min-width: 31cqw;
    height: 6.8cqw;
    padding: 0 2.8cqw 0 3.4cqw;
    border: max(1px, .16cqw) solid var(--lb-border);
    border-radius: 999px;
    background-color: var(--lb-bg);
    color: var(--lb-color);
    font-family: inherit;
    font-size: max(12px, 2.5cqw);
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.fsep-lb .fsep-lb__btn:hover,
.fsep-lb .fsep-lb__btn:focus,
.fsep-lb .fsep-lb__btn:active {
    color: var(--lb-color);
    text-decoration: none;
}

.fsep-lb .fsep-lb__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
}

.fsep-lb .fsep-lb__btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

/* libellé centré entre le bord gauche et la flèche (cf. maquette) */
.fsep-lb__label {
    flex: 1 1 auto;
    text-align: center;
}

/* type */
.fsep-lb .fsep-lb__btn--contour {
    background-color: transparent;
}

/* forme */
.fsep-lb .fsep-lb__btn--arrondi {
    border-radius: 1.1cqw;
}

.fsep-lb .fsep-lb__btn--carre {
    border-radius: 0;
}

/* flèche */
.fsep-lb__arrow {
    flex: none;
    width: 2.5cqw;
    height: 2.5cqw;
    transition: transform .2s ease;
}

.fsep-lb .fsep-lb__btn:hover .fsep-lb__arrow {
    transform: translateX(4px);
}

.fsep-lb .fsep-lb__btn--no-arrow {
    padding: 0 3.5cqw;
}

/* page figée pendant l'ouverture */
html.fsep-lb-open {
    overflow: hidden;
}

html.fsep-lb-open #hubspot-messages-iframe-container {
    visibility: hidden !important;
}

/* --------------------------------------------------------------------------
   Mobile : visuel 640 x 1000, boutons empilés en bas (bouton 1 en dessous)
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {

    .fsep-lb__dialog {
        width: min(92vw, 440px, calc((100vh - 32px) * .64));
        width: min(92vw, 440px, calc((100svh - 32px) * .64));
        aspect-ratio: 640 / 1000;
    }

    .fsep-lb__ctas {
        left: 5.94%;
        bottom: 5.3%;
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 2.3cqw;
    }

    .fsep-lb .fsep-lb__btn {
        gap: 2.5cqw;
        min-width: 43cqw;
        height: max(36px, 9.7cqw);
        padding: 0 3.9cqw 0 2.8cqw;
        font-size: max(13px, 3.55cqw);
    }

    .fsep-lb .fsep-lb__btn--arrondi {
        border-radius: 1.8cqw;
    }

    .fsep-lb .fsep-lb__btn--no-arrow {
        padding: 0 5cqw;
    }

    .fsep-lb__arrow {
        width: 3.4cqw;
        height: 3.4cqw;
    }
}

@media (prefers-reduced-motion: reduce) {

    .fsep-lb__backdrop,
    .fsep-lb__dialog,
    .fsep-lb__close,
    .fsep-lb .fsep-lb__btn,
    .fsep-lb__arrow {
        transition: none;
    }
}
