/* ==========================================================================
   My Name Form — Styles du formulaire front-end
   ========================================================================== */

/* ── Conteneur principal ──────────────────────────────────────────────────── */
.mnf-wrapper {
    max-width: 480px;
    margin: 2rem auto;
    font-family: inherit;
}

/* ── Formulaire ───────────────────────────────────────────────────────────── */
.mnf-form {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* ── Champs ───────────────────────────────────────────────────────────────── */
.mnf-field {
    margin-bottom: 1.25rem;
}

.mnf-field:last-child {
    margin-bottom: 0;
}

.mnf-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.mnf-required {
    color: #e53e3e;
    margin-left: 2px;
}

.mnf-input {
    display: block;
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 1rem;
    color: #111827;
    background: #f9fafb;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.mnf-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    background: #ffffff;
}

/* Champ en erreur */
.mnf-field--error .mnf-input {
    border-color: #e53e3e;
}

.mnf-field--error .mnf-input:focus {
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.15);
}

/* ── Bouton ───────────────────────────────────────────────────────────────── */
.mnf-btn {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: #4f46e5;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.mnf-btn:hover {
    background: #4338ca;
}

.mnf-btn:active {
    transform: scale(0.98);
}

.mnf-btn:focus-visible {
    outline: 3px solid #4f46e5;
    outline-offset: 3px;
}

/* ── Messages d'erreur ────────────────────────────────────────────────────── */
.mnf-errors {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-left: 4px solid #e53e3e;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    color: #c53030;
    font-size: 0.9rem;
}

.mnf-errors ul {
    margin: 0;
    padding-left: 1.2rem;
}

.mnf-errors li {
    margin-bottom: 0.25rem;
}

.mnf-errors li:last-child {
    margin-bottom: 0;
}

/* ── Message de succès ────────────────────────────────────────────────────── */
.mnf-success {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    color: #166534;
}

.mnf-success__icon {
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

.mnf-success p {
    margin: 0;
    font-size: 0.95rem;
}

/* ── Note champs obligatoires ─────────────────────────────────────────────── */
.mnf-required-note {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #6b7280;
}

/* ── Honeypot : caché visuellement ───────────────────────────────────────── */
.mnf-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    pointer-events: none;
    tab-index: -1;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
    .mnf-form {
        padding: 1.25rem;
    }

    .mnf-wrapper {
        margin: 1rem;
    }
}
