/* Styles du formulaire de contact (composant www/contact) */

.contact-form__radios {
    border: 0;
    padding: 0;
    margin: 0 0 1.5rem;
}

.contact-form__radios legend {
    width: auto;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .75rem;
}

.contact-form__radios .custom-control {
    padding-top: .2rem;
    padding-bottom: .2rem;
}

.contact-form__radios .custom-control-label {
    cursor: pointer;
}

/* Champ téléphone intl-tel-input en pleine largeur */
.contact-form .iti {
    display: block;
}

.contact-form .iti__flag-container + input,
.contact-form .iti input[type="tel"] {
    width: 100%;
}

/* Case à cocher de consentement (checkbox personnalisée) */
.contact-form__consent {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    cursor: pointer;
    font-weight: 400;
    text-transform: none;
}

.contact-form__consent input[type="checkbox"] {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.contact-form__checkmark {
    flex: 0 0 auto;
    position: relative;
    height: 18px;
    width: 18px;
    margin-top: .1rem;
    background-color: #fff;
    border: 1px solid #234;
    border-radius: .125rem;
}

.contact-form__checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.contact-form__consent input[type="checkbox"]:checked ~ .contact-form__checkmark {
    background-color: #234;
}

.contact-form__consent input[type="checkbox"]:checked ~ .contact-form__checkmark::after {
    display: block;
}

.contact-form__consent input[type="checkbox"]:focus-visible ~ .contact-form__checkmark {
    box-shadow: 0 0 0 2px rgba(34, 51, 68, .25);
}

/* Messages d'erreur de validation par champ */
.contact-form .form__field.is-invalid,
.contact-form .iti--laravel-tel-input.is-invalid {
    border-color: #dc3545;
}

.contact-form__field-error {
    display: block;
    margin-top: .25rem;
    font-size: .875rem;
    color: #dc3545;
}
