/* ==========================================================
   POPUP GLOBALE
   ========================================================== */

body.site-popup-open {
    overflow: hidden;
}


/* Container */

.site-popup {
    position: fixed;
    z-index: 99999;

    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .3s ease,
        visibility .3s ease;
}


/* Overlay */

.site-popup__backdrop {
    position: absolute;
    inset: 0;

    background: rgba(1, 0, 50, .78);

    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);

    cursor: pointer;
}


/* Fenêtre */

.site-popup__dialog {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 760px;

    max-height: calc(100dvh - 80px);

    padding: 64px;

    overflow-y: auto;
    overflow-x: hidden;

    background: #fff;

    border: 1px solid rgba(22, 43, 145, .10);
    border-radius: 28px;

    box-shadow:
        0 30px 80px rgba(1, 0, 50, .22),
        0 5px 20px rgba(1, 0, 50, .08);

    opacity: 0;

    transform:
        translateY(24px)
        scale(.97);

    transition:
        opacity .35s ease,
        transform .45s cubic-bezier(.2, .8, .2, 1);
}


/* Petit détail graphique */

.site-popup__dialog::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 6px;

    background: linear-gradient(
        90deg,
        #162b91 0%,
        #263fb3 55%,
        #010032 100%
    );
}


/* Apparition */

.site-popup.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.site-popup.is-visible .site-popup__dialog {
    opacity: 1;

    transform:
        translateY(0)
        scale(1);
}


/* ==========================================================
   CROIX
   ========================================================== */

.site-popup__close {
    position: absolute;
    z-index: 10;

    top: 24px;
    right: 24px;

    width: 44px;
    height: 44px;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #e7e7ea;
    border-radius: 100%;

    background: #fff;

    cursor: pointer;

    transition:
        background-color .3s ease,
        border-color .3s ease,
        transform .3s ease;
}

.site-popup__close span {
    position: absolute;

    width: 16px;
    height: 2px;

    background: #010032;

    transition: background-color .3s ease;
}

.site-popup__close span:first-child {
    transform: rotate(45deg);
}

.site-popup__close span:last-child {
    transform: rotate(-45deg);
}

.site-popup__close:hover {
    background: #162b91;
    border-color: #162b91;

    transform: rotate(5deg);
}

.site-popup__close:hover span {
    background: #fff;
}


/* ==========================================================
   CONTENU WYSIWYG
   ========================================================== */

.site-popup__content {
    position: relative;
    z-index: 2;
}


/* Titres */

.site-popup__content h1,
.site-popup__content h2 {
    max-width: 620px;

    margin-top: 0;
    margin-bottom: 24px;

    color: #010032;
}

.site-popup__content h3,
.site-popup__content h4 {
    color: #010032;
}


/* Paragraphes */

.site-popup__content p:last-child {
    margin-bottom: 0;
}


/* Images WYSIWYG */

.site-popup__content img {
    display: block;

    max-width: 100%;
    height: auto;

    margin: 24px 0;

    border-radius: 16px;
}


/* Listes */

.site-popup__content ul {
    margin: 20px 0;
    padding-left: 24px;

    list-style: disc;
}

.site-popup__content ol {
    margin: 20px 0;
    padding-left: 24px;
}

.site-popup__content li {
    margin-bottom: 8px;

    font-family: inherit;
    line-height: 1.6;
}


/* Séparateur */

.site-popup__content hr {
    height: 1px;

    margin: 32px 0;

    border: 0;

    background: #e5e5e8;
}


/* ==========================================================
   DECORATIONS
   ========================================================== */

.site-popup__decoration {
    position: absolute;

    border-radius: 100%;

    pointer-events: none;
}

.site-popup__decoration--one {
    top: -100px;
    right: -90px;

    width: 220px;
    height: 220px;

    background: rgba(22, 43, 145, .055);
}

.site-popup__decoration--two {
    right: 110px;
    bottom: -120px;

    width: 170px;
    height: 170px;

    background: rgba(1, 0, 50, .035);
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 767px) {

    .site-popup {
        padding: 20px;
        align-items: center;
    }

    .site-popup__dialog {
        max-height: calc(100dvh - 40px);

        padding:
            64px
            28px
            36px;

        border-radius: 22px;
    }

    .site-popup__close {
        top: 18px;
        right: 18px;

        width: 40px;
        height: 40px;
    }

    .site-popup__content h1,
    .site-popup__content h2 {
        margin-bottom: 18px;
    }

}


@media (max-width: 450px) {

    .site-popup {
        padding: 12px;
    }

    .site-popup__dialog {
        max-height: calc(100dvh - 24px);

        padding:
            60px
            22px
            30px;

        border-radius: 18px;
    }

}