/* ============================================================
   WLR Contact Forms — CSS Front
   ============================================================ */

/* ── Wrapper ────────────────────────────────────────────────── */
.wlr-cf-wrapper {
    max-width: 640px;
    margin: 2rem auto;
    font-family: inherit;
}

/* ── Message retour ─────────────────────────────────────────── */
.wlr-cf-response {
    padding: 1rem 1.25rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: .95rem;
    line-height: 1.5;
}
.wlr-cf-response.is-success {
    background: #edfaef;
    border: 1px solid #52b469;
    color: #1a5c2a;
}
.wlr-cf-response.is-error {
    background: #fef2f2;
    border: 1px solid #e05252;
    color: #7a1c1c;
}

/* ── Champs ─────────────────────────────────────────────────── */
.wlr-cf-field {
    margin-bottom: 1.25rem;
    position: relative;
}
.wlr-cf-field label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .35rem;
    color: #222;
}
.wlr-cf-required {
    color: #c0392b;
    margin-left: 2px;
}

/* ── Inputs / Textarea / Select ─────────────────────────────── */
.wlr-cf-input,
.wlr-cf-textarea,
.wlr-cf-select {
    display: block;
    width: 100%;
    padding: .625rem .875rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1.5px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #111;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}
.wlr-cf-input:focus,
.wlr-cf-textarea:focus,
.wlr-cf-select:focus {
    outline: none;
    border-color: #1a1a2e;
    box-shadow: 0 0 0 3px rgba(26, 26, 46, .12);
}
.wlr-cf-input.is-invalid,
.wlr-cf-textarea.is-invalid,
.wlr-cf-select.is-invalid {
    border-color: #e05252;
    box-shadow: 0 0 0 3px rgba(224, 82, 82, .12);
}
.wlr-cf-textarea {
    resize: vertical;
    min-height: 120px;
}
.wlr-cf-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .875rem center;
    padding-right: 2.5rem;
}

/* ── Aide ───────────────────────────────────────────────────── */
.wlr-cf-help {
    display: block;
    font-size: .8rem;
    color: #666;
    margin-top: .3rem;
}

/* ── Erreur inline ──────────────────────────────────────────── */
.wlr-cf-field-error {
    display: block;
    font-size: .8rem;
    color: #c0392b;
    margin-top: .3rem;
    min-height: 1rem;
}

/* ── Calcul anti-bot ────────────────────────────────────────── */
.wlr-cf-math-challenge {
    background: #f8f8fb;
    border: 1px solid #e0e0ec;
    border-radius: 4px;
    padding: .875rem 1rem;
    margin-bottom: 1.25rem;
}
.wlr-cf-math-challenge label {
    font-weight: 600;
    font-size: .9rem;
    color: #333;
    display: block;
    margin-bottom: .5rem;
}
.wlr-cf-math-challenge input[type="number"] {
    width: 100px;
    padding: .5rem .75rem;
    border: 1.5px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

/* ── Bouton submit ──────────────────────────────────────────── */
.wlr-cf-submit-wrap {
    margin-top: 1.5rem;
}
.wlr-cf-submit {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: #1a1a2e;
    color: #fff;
    border: none;
    padding: .75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 4px;
    cursor: pointer;
    transition: background .2s, transform .1s;
}
.wlr-cf-submit:hover  { background: #2e2e52; }
.wlr-cf-submit:active { transform: scale(.98); }
.wlr-cf-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* ── Spinner ────────────────────────────────────────────────── */
.wlr-cf-btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wlr-spin .7s linear infinite;
}
@keyframes wlr-spin {
    to { transform: rotate(360deg); }
}

/* ── Mention RGPD ───────────────────────────────────────────── */
.wlr-cf-rgpd-notice {
    font-size: .78rem;
    color: #777;
    margin-top: 1rem;
    line-height: 1.5;
}
.wlr-cf-rgpd-notice a {
    color: #555;
    text-decoration: underline;
}

/* ── Honeypot (invisible) ───────────────────────────────────── */
.wlr-cf-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}
