/**
 * Bouton CTA revelant un formulaire, shortcode [kre_cta_form].
 * Le bouton reprend le style des CTA du site (vert KRE, arrondi 10 px).
 */

.kre-cta-form {
    width: 100%;
}

.kre-cta-form--gauche {
    text-align: left;
}

.kre-cta-form--centre {
    text-align: center;
}

.kre-cta-form--droite {
    text-align: right;
}

.kre-cta-form__bouton {
    display: inline-block;
    padding: 0.6em 1.4em;
    background-color: #00a098;
    border: 1px solid #00a098;
    border-radius: 10px;
    color: #ffffff;
    font-family: "futura-pt-bold", "Montserrat", sans-serif;
    font-size: 20px;
    line-height: 1.3;
    cursor: pointer;
    transition:
        background-color 0.2s ease-out,
        color 0.2s ease-out;
}

.kre-cta-form__bouton:hover {
    background-color: #ffffff;
    color: #00a098;
}

.kre-cta-form__bouton:focus-visible {
    outline: 3px solid #00a098;
    outline-offset: 3px;
}

/* L'attribut hidden doit primer sur tout display defini ailleurs. */
.kre-cta-form__bouton[hidden],
.kre-cta-form__panneau[hidden] {
    display: none !important;
}

/* Le formulaire garde son propre alignement, quel que soit celui du bouton. */
.kre-cta-form__panneau {
    text-align: left;
    scroll-margin-top: 120px;
}

.kre-cta-form__panneau--ouvert {
    animation: kre-cta-form-apparition 0.35s ease-out;
}

@keyframes kre-cta-form-apparition {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kre-cta-form__panneau--ouvert {
        animation: none;
    }

    .kre-cta-form__bouton {
        transition: none;
    }
}

/* Mode lien (1.1.0) : le bouton est un lien d'ancre, sans soulignement. */
a.kre-cta-form__bouton,
a.kre-cta-form__bouton:hover {
    text-decoration: none;
}

/* Alerte des formulaires en double, visible uniquement par les editeurs connectes. */
.kre-cta-form-alerte {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 99999;
    max-width: 420px;
    padding: 14px 16px;
    background: #fff4e5;
    border: 2px solid #c02b0a;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    color: #222222;
    font-size: 14px;
    line-height: 1.5;
}

.kre-cta-form-alerte code {
    padding: 1px 4px;
    background: #ffffff;
    border-radius: 3px;
}