/*
 * Formulaires olivier-lafay.com.
 * Couleurs et typographie du kit Elementor, definies sur le <body> (pas sur :root) :
 * toujours avec une valeur de repli.
 */

.ol-formulaire {
    --ol-accent: var(--e-global-color-accent, #066aab);
    --ol-bord: rgba(0, 0, 0, 0.25);
    --ol-erreur: #d63637;
    /* !important : Astra annule max-width sur tout enfant direct du contenu des pages
       « page builder » (.ast-page-builder-template .entry-content > *, specificite 0,3,0). */
    max-width: 720px !important;
    font-family: var(--e-global-typography-text-font-family, inherit), sans-serif;
}

.ol-formulaire__introduction {
    margin: 0 0 1.5em;
}

.ol-champ {
    margin: 0 0 1.25em;
    padding: 0;
    border: 0;
    min-width: 0;
}

.ol-champ[hidden] {
    display: none;
}

.ol-champ__label {
    display: block;
    margin: 0 0 0.4em;
    padding: 0;
    font-weight: 600;
}

.ol-champ__requis {
    color: var(--ol-erreur);
}

.ol-formulaire input[type="text"],
.ol-formulaire input[type="email"],
.ol-formulaire input[type="tel"],
.ol-formulaire select,
.ol-formulaire textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.6em 0.75em;
    border: 1px solid var(--ol-bord);
    border-radius: 3px;
    background: #fff;
    color: rgba(0, 0, 0, 0.8);
    font: inherit;
}

.ol-formulaire input:focus,
.ol-formulaire select:focus,
.ol-formulaire textarea:focus {
    outline: 2px solid var(--ol-accent);
    outline-offset: 1px;
}

.ol-champ__colonnes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75em;
}

@media (max-width: 480px) {
    .ol-champ__colonnes {
        grid-template-columns: 1fr;
    }
}

.ol-champ__sous-label,
.ol-champ__aide {
    display: block;
    margin: 0.3em 0 0;
    color: rgba(0, 0, 0, 0.55);
    font-size: 0.875em;
}

.ol-champ__option {
    display: flex;
    gap: 0.5em;
    align-items: flex-start;
    margin: 0 0 0.35em;
    font-weight: normal;
    cursor: pointer;
}

.ol-champ__option input {
    flex: none;
    margin: 0.3em 0 0;
}

.ol-formulaire .ol-champ--invalide input,
.ol-formulaire .ol-champ--invalide select,
.ol-formulaire .ol-champ--invalide textarea {
    border-color: var(--ol-erreur);
}

.ol-champ__erreur,
.ol-formulaire__alerte {
    margin: 0.35em 0 0;
    color: var(--ol-erreur);
    font-size: 0.875em;
}

.ol-formulaire__alerte {
    margin: 0 0 1em;
    font-size: 1em;
}

/* Champ piege : hors de l'ecran plutot que display:none, que certains robots detectent. */
.ol-formulaire__piege {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.ol-formulaire__envoyer {
    display: block;
    width: 100%;
    padding: 0.8em 1.5em;
    border: 0;
    border-radius: 20px;
    background: var(--ol-accent);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.ol-formulaire__envoyer:hover,
.ol-formulaire__envoyer:focus-visible {
    filter: brightness(1.1);
}

.ol-formulaire__envoyer[disabled] {
    opacity: 0.6;
    cursor: wait;
}

.ol-formulaire__confirmation {
    max-width: 720px !important;
    padding: 1em 1.25em;
    border-left: 4px solid var(--e-global-color-accent, #066aab);
    background: rgba(0, 0, 0, 0.04);
}
