.wpcf7 {
    --rosee-form-erreur: var(--rosee-danger);
}

.wpcf7 fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.wpcf7 fieldset legend {
    display: none;
}

.wpcf7 fieldset:last-of-type {
    margin-bottom: var(--wp--preset--spacing--small);
}

.wpcf7 legend {
    padding: 0;
    margin-bottom: var(--wp--preset--spacing--small);
    font-family: var(--wp--preset--font-family--title);
    font-size: var(--wp--preset--font-size--large);
    line-height: 1.1;
}

.wpcf7 .hidden-fields-container {
    margin: 0;
}

.wpcf7 .rosee-form-obligatoires {
    font-size: var(--wp--preset--font-size--small);
    margin-bottom: var(--wp--preset--spacing--small);
}

.wpcf7 label {
    display: block;
    margin-bottom: var(--wp--preset--spacing--x-small);
}

.wpcf7 label span[aria-hidden="true"] {
    color: var(--rosee-danger);
}

.wpcf7 .wpcf7-form-control-wrap {
    display: block;
    margin-top: var(--wp--preset--spacing--x-small);
}

/* --------------------------------------------------------------------------
   2. CHAMPS
   -------------------------------------------------------------------------- */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 input[type="date"],
.wpcf7 select,
.wpcf7 textarea,
.wp-block-search__input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--small);
    line-height: 1.4;
    color: var(--wp--preset--color--noir);

    background-color: var(--wp--preset--color--blanc);
    border: 1px solid var(--wp--preset--color--noir);
    border-radius: 8px;
    padding: var(--wp--preset--spacing--x-small);
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 input[type="date"],
.wp-block-search__input {
    border-radius: 999px;
}

.wpcf7 textarea {
    min-height: 12rem;
    resize: vertical;
}


.wpcf7-checkbox {
    line-height: 1.3 !important;
}

.wpcf7-checkbox .wpcf7-list-item,
.wpcf7-radio .wpcf7-list-item,
.wpcf7-acceptance .wpcf7-list-item {
    margin-left: 0;
    display: flex;
    flex-direction: column;
}



.wpcf7-checkbox label, .wpcf7-radio label, .wpcf7-acceptance label {
    display: inline-flex;
    align-items: center;
    gap: var(--wp--preset--spacing--x-small);
}

.wpcf7-checkbox input, .wpcf7-radio input, .wpcf7-acceptance input {
    width: 1.65rem;
    height: 1.65rem;
    margin: 0;
}

.wpcf7 ::placeholder {
    color: var(--wp--preset--color--noir);
    opacity: 0.65;
}

/* --------------------------------------------------------------------------
   3. FOCUS — WCAG 2.4.7 / RGAA 7.6
   Un formulaire est l'endroit où la navigation au clavier est la plus
   critique : l'anneau n'est jamais supprimé, et il est nettement visible.
   -------------------------------------------------------------------------- */
.wpcf7 input:focus-visible,
.wpcf7 select:focus-visible,
.wpcf7 textarea:focus-visible,
.wp-block-search__input:focus-visible {
    outline: 3px solid var(--wp--preset--color--noir);
    outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   4. ERREURS — RGAA 3.1 : jamais la couleur seule
   L'épaississement de la bordure double le signal chromatique, et CF7 affiche
   déjà un message textuel relié au champ (aria-invalid + .wpcf7-not-valid-tip).
   -------------------------------------------------------------------------- */
.wpcf7 .wpcf7-not-valid {
    border-width: 2px;
    border-color: var(--rosee-form-erreur);
}

.wpcf7 .wpcf7-not-valid-tip {
    color: var(--rosee-form-erreur);
    font-size: var(--wp--preset--font-size--small);
    font-weight: 600;
    margin-top: var(--wp--preset--spacing--x-small);
}

.wpcf7 form .wpcf7-response-output {
    margin: var(--wp--preset--spacing--small) 0 0;
    padding: var(--wp--preset--spacing--x-small);
    border-radius: 8px;
    border-width: 2px;
    font-weight: 600;
}

.wpcf7 form > p {
    margin: 0 0 var(--wp--preset--spacing--small);
}

.wpcf7 form > p:last-of-type {
    margin-bottom: 0;
}

.wp-block-search__inside-wrapper {
    flex-direction: column;
    align-items: center;
    gap: var(--wp--preset--spacing--x-small);

    @media (min-width: 577px) {
        flex-direction: row;
    }
}


input[type="submit"] {
    border-radius: 999px;
}
