/* ==========================================================
   iRiS — INSCRIPTION FLOTTANTE
   ========================================================== */


/* ----------------------------------------------------------
   CONTENEUR WPBAKERY
   ---------------------------------------------------------- */

.iris-registration-host {
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

.iris-registration-host > .wpb_column,
.iris-registration-host .vc_column_container,
.iris-registration-host .vc_column-inner,
.iris-registration-host .wpb_wrapper,
.iris-registration-host .wpb_content_element,
.iris-registration-host .wpb_text_column {
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}


/* ----------------------------------------------------------
   POSITIONNEMENT

   Sur ordinateur, le bouton est placé à gauche du bouton
   existant de retour en haut de page.
   ---------------------------------------------------------- */

html body .iris-registration-float {
    --iris-registration-primary: #287d83;
    --iris-registration-accent: #d9665b;

    position: fixed !important;
    right: 108px !important;
    bottom: calc(28px + env(safe-area-inset-bottom)) !important;
    z-index: 9990 !important;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;

    width: min(440px, calc(100vw - 145px));
    max-width: 440px;
    margin: 0 !important;
    padding: 0 !important;

    color: #344b55;
    font-family: inherit;
    pointer-events: none;
}


/* ----------------------------------------------------------
   BOUTON FLOTTANT COMPACT
   ---------------------------------------------------------- */

.iris-registration-float__launcher {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;
    min-height: 52px;
    margin: 0;
    padding: 4px;

    border: 0;
    border-radius: 12px;
    background: var(--iris-registration-accent);
    box-shadow: 0 7px 24px rgba(29, 72, 77, 0.24);

    color: #fff;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.05;
    text-align: center;
    text-transform: none;
    white-space: normal;

    cursor: pointer;
    pointer-events: auto;
    appearance: none;
    -webkit-appearance: none;

    transition:
        filter 160ms ease,
        transform 160ms ease,
        box-shadow 160ms ease;
}

.iris-registration-float__launcher:hover {
    color: #fff;
    filter: brightness(0.92);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(29, 72, 77, 0.3);
}

.iris-registration-float__launcher:focus-visible {
    color: #fff;
    outline: 3px solid rgba(255, 255, 255, 0.95);
    outline-offset: 3px;
}

/* Le panneau remplace entièrement le bouton quand il est ouvert. */
.iris-registration-float.is-open .iris-registration-float__launcher {
    display: none;
}


/* ----------------------------------------------------------
   PANNEAU DES SESSIONS
   ---------------------------------------------------------- */

.iris-registration-float__panel {
    position: relative;
    display: block;

    width: 100%;
    margin: 0;
    padding: 22px;

    border: 1px solid rgba(40, 125, 131, 0.2);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 35px rgba(29, 72, 77, 0.22);
    pointer-events: auto;
}

.iris-registration-float__panel[hidden] {
    display: none !important;
}

.iris-registration-float.is-open .iris-registration-float__panel {
    transform-origin: right bottom;
    animation: iris-registration-panel-open 240ms cubic-bezier(0.22, 0.8, 0.28, 1);
}

@keyframes iris-registration-panel-open {
    0% {
        opacity: 0;
        transform: scale(0.16);
    }

    70% {
        opacity: 1;
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .iris-registration-float.is-open .iris-registration-float__panel {
        animation: none;
    }
}

.iris-registration-float__close {
    position: absolute;
    top: 7px;
    right: 10px;

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

    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;

    border: 0;
    background: transparent;
    color: var(--iris-registration-primary);

    font-family: Arial, sans-serif;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.iris-registration-float__label {
    display: block;
    margin: 0 34px 10px 0;
    padding: 0;

    color: var(--iris-registration-primary);
    font-family: "bauerbodonistd", Georgia, serif;
    font-size: 21px;
    font-style: italic;
    font-weight: 400;
    line-height: 1.2;
    text-transform: none;
}

.iris-registration-float__select {
    display: block;

    width: 100%;
    min-height: 48px;
    margin: 0 0 14px;
    padding: 8px 38px 8px 12px;

    border: 1px solid #bdd5d7;
    border-radius: 8px;
    background: #fff;
    color: #344b55;

    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    text-transform: none;
}

.iris-registration-float__submit {
    display: block;

    width: 100%;
    margin: 0;
    padding: 12px 18px;

    border: 0;
    border-radius: 999px;
    background: var(--iris-registration-accent);

    color: #fff !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    text-transform: none;
}

.iris-registration-float__submit:hover,
.iris-registration-float__submit:focus-visible {
    color: #fff !important;
    filter: brightness(0.91);
}

.iris-registration-float__select:focus-visible,
.iris-registration-float__close:focus-visible,
.iris-registration-float__submit:focus-visible {
    outline: 3px solid var(--iris-registration-primary);
    outline-offset: 3px;
}


/* ----------------------------------------------------------
   ABSENCE DE SESSION
   ---------------------------------------------------------- */

.iris-registration-float--empty {
    width: min(260px, calc(100vw - 145px));
}

.iris-registration-float__empty-link {
    display: block;
    width: 100%;
    margin: 0;
    padding: 14px 18px;

    border-radius: 18px;
    background: var(--iris-registration-primary);
    box-shadow: 0 6px 24px rgba(29, 72, 77, 0.24);

    color: #fff !important;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-decoration: none !important;
    pointer-events: auto;
}


/* ----------------------------------------------------------
   MOBILE

   Le bouton passe au-dessus de la flèche afin que le panneau
   conserve une largeur confortable.
   ---------------------------------------------------------- */

@media (max-width: 767px) {
    html body .iris-registration-float {
        right: 12px !important;
        bottom: calc(88px + env(safe-area-inset-bottom)) !important;

        width: calc(100vw - 24px);
        max-width: none;
    }

    .iris-registration-float__launcher {
        width: 52px;
        height: 52px;
        min-height: 52px;

        border-radius: 12px;
        font-size: 13.5px;
    }

    .iris-registration-float__panel {
        max-height: min(440px, calc(100vh - 180px));
        padding: 18px;

        border-radius: 14px;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .iris-registration-float__select {
        font-size: 16px;
    }

    .iris-registration-float--empty {
        width: calc(100vw - 24px);
    }
}
