/* =========================================
   Mailchimp Elementor Forms — Frontend CSS
   ========================================= */

.mef-form-wrap {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-sizing: border-box;
    position: relative;
}

/* Garantir l'interactivité des éléments du formulaire
   (certains thèmes ou builders appliquent pointer-events:none) */
.mef-form input,
.mef-form select,
.mef-form textarea,
.mef-form button,
.mef-form label,
.mef-form .mef-checkbox-label,
.mef-form .mef-submit-btn {
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

/* ─── Animations ─────────────────────── */

.mef-anim-fade-in  { animation: mef-fade-in .5s ease both; }
.mef-anim-slide-up { animation: mef-slide-up .5s ease both; }
.mef-anim-zoom-in  { animation: mef-zoom-in .4s ease both; }

@keyframes mef-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes mef-zoom-in {
    from { opacity: 0; transform: scale(.96); }
    to   { opacity: 1; transform: scale(1); }
}

/* ─── Header ─────────────────────────── */

.mef-form-header { margin-bottom: 28px; }
.mef-header-divider { border: 0; border-top: 1px solid #e0e0e0; margin: 20px 0 24px; }

/* ─── 2-column layout ─────────────────── */

.mef-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.mef-row .mef-field { margin-bottom: 0; }

@media (max-width: 540px) {
    .mef-row { grid-template-columns: 1fr; }
    .mef-row .mef-field { margin-bottom: 18px; }
}

/* ─── Button width variants ───────────── */

.mef-btn-full .mef-submit-btn  { width: 100%; }
.mef-btn-auto .mef-submit-btn  { width: auto; }
.mef-form-footer { display: flex; }

/* ─── btn-icon spacing ────────────────── */

.mef-btn-icon--before { margin-right: 8px; }
.mef-btn-icon--after  { margin-left: 8px; }

/* ─── Titles ─────────────────────────── */

.mef-form-title {
    margin: 0 0 10px;
    font-size: 1.6em;
    font-weight: 700;
    line-height: 1.3;
}

.mef-form-description {
    margin: 0 0 28px;
    opacity: .75;
    line-height: 1.6;
}

/* ─── Fields ─────────────────────────── */

.mef-field {
    margin-bottom: 18px;
}

.mef-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: .9em;
}

.mef-required {
    color: #e03030;
    margin-left: 3px;
}

.mef-field input[type="text"],
.mef-field input[type="email"],
.mef-field input[type="tel"],
.mef-field input[type="url"],
.mef-field input[type="number"],
.mef-field input[type="date"],
.mef-field select {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    background: #f7f7f7;
    color: #1a1a1a;
    transition: border-color .2s, box-shadow .2s, background .2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    cursor: text;
    display: block;
    height: 48px;
}

.mef-field input:focus,
.mef-field select:focus {
    outline: none;
    border-color: #0057ff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 87, 255, 0.12);
}

.mef-field input.mef-error {
    border-color: #e03030;
    box-shadow: 0 0 0 3px rgba(224, 48, 48, 0.10);
}

/* ─── Checkbox RGPD ──────────────────── */

.mef-field--checkbox {
    margin-top: 8px;
}

.mef-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 400 !important;
    font-size: .88em;
    line-height: 1.5;
    color: #555;
}

.mef-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    accent-color: #0057ff;
    cursor: pointer;
}

/* ─── Submit button ──────────────────── */

.mef-form-footer {
    margin-top: 24px;
}

.mef-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 28px;
    background: #0057ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .1s, box-shadow .2s;
    box-shadow: 0 4px 14px rgba(0, 87, 255, 0.25);
    letter-spacing: .02em;
    -webkit-appearance: none;
    appearance: none;
}

.mef-submit-btn:hover {
    background: #0040cc;
    box-shadow: 0 6px 20px rgba(0, 87, 255, 0.35);
}

.mef-submit-btn:active {
    transform: scale(.98);
}

.mef-submit-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

/* ─── Loader spinner ─────────────────── */

.mef-btn-loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mef-spin .7s linear infinite;
}

.mef-is-loading .mef-btn-loader {
    display: inline-block;
}

@keyframes mef-spin {
    to { transform: rotate(360deg); }
}

/* ─── Messages ───────────────────────── */

.mef-message {
    margin-top: 16px;
    padding: 13px 18px;
    border-radius: 8px;
    font-size: .95em;
    font-weight: 500;
    display: none;
    animation: mef-fade-in .3s ease;
}

.mef-message.mef-success {
    display: block;
    background: #edfaf3;
    color: #1a7a4a;
    border: 1px solid #a8e6c5;
}

.mef-message.mef-error {
    display: block;
    background: #fff0f0;
    color: #b52020;
    border: 1px solid #f5b3b3;
}

@keyframes mef-fade-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Success state ──────────────────── */

.mef-form.mef-submitted .mef-form-fields,
.mef-form.mef-submitted .mef-form-footer {
    display: none;
}

.mef-form-success-full {
    text-align: center;
    padding: 30px 10px;
    animation: mef-fade-in .4s ease;
}

.mef-form-success-full .mef-success-icon {
    font-size: 3em;
    display: block;
    margin-bottom: 14px;
}
