/* CF7 Custom Tags – Front-end styles v1.0.1 */

/* Le span wpcf7-form-control-wrap est géré par CF7, on s'appuie dessus */
.wpcf7-form-control-wrap:has(.cf7ct-field) {
    display: inline-block;
    width: 100%;
    position: relative;
}

.cf7ct-field {
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ── État invalide ─────────────────────────────────────────── */
.cf7ct-field.cf7ct-invalid,
.cf7ct-field.wpcf7-not-valid {
    border-color: #d63638 !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(214, 54, 56, 0.18);
}

/* ── Message d'erreur (structure CF7 native : .wpcf7-not-valid-tip) ── */
.wpcf7-not-valid-tip.cf7ct-tip {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #d63638;
    font-style: italic;
    animation: cf7ct-fadein 0.18s ease;
}

@keyframes cf7ct-fadein {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── État valide ───────────────────────────────────────────── */
.cf7ct-field.cf7ct-valid:not(.wpcf7-not-valid) {
    border-color: #00a32a !important;
    box-shadow: 0 0 0 2px rgba(0, 163, 42, 0.14);
}
