/* =========================================================
   Questionnaires Mission Nutrition — Frontend styles
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* ─── Wrapper ────────────────────────────────────────────── */
.mf-quiz-wrap {
    --mf-ink: #172033;
    --mf-muted: #5f6b7a;
    --mf-accent: #1e293b;
    --mf-accent-strong: #0f172a;
    --mf-accent-soft: #e8eef7;
    --mf-secondary: #ec4899;
    --mf-secondary-strong: #db2777;
    --mf-accent-rgb: 30, 41, 59;
    --mf-form-bg-base: #e8eef7;
    --mf-form-bg-soft: #f8fafc;
    --mf-form-bg-rgb: 232, 238, 247;
    --mf-success: #10b981;
    --mf-surface: #ffffff;
    --mf-surface-2: #f4f7fb;
    --mf-border: #d5dfeb;
    --mf-result-dark-bg: var(--mf-accent-strong);
    --mf-result-dark-text: #ffffff;
    --mf-result-light-bg: var(--mf-surface);
    --mf-result-light-text: var(--mf-accent-strong);
    --mf-text-on-light: var(--mf-ink);
    --mf-text-muted-on-light: var(--mf-muted);
    --mf-text-on-dark: var(--mf-result-dark-text);
    --mf-text-muted-on-dark: rgba(255, 255, 255, 0.8);
    font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    max-width: 760px;
    margin: 0 auto;
    color: var(--mf-ink);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.82) 100%),
                radial-gradient(950px 520px at -8% -30%, rgba(var(--mf-form-bg-rgb), 0.54) 0%, transparent 62%),
                radial-gradient(700px 520px at 108% 10%, rgba(var(--mf-accent-rgb), 0.22) 0%, transparent 56%),
                linear-gradient(180deg, var(--mf-form-bg-soft) 0%, #ffffff 100%);
    border: 1px solid var(--mf-border);
    border-radius: 22px;
    padding: clamp(18px, 2.8vw, 30px);
    box-shadow: 0 26px 70px rgba(var(--mf-accent-rgb), 0.16), 0 8px 24px rgba(var(--mf-accent-rgb), 0.09);
    backdrop-filter: blur(6px);
    position: relative;
    overflow: hidden;
}

.mf-quiz-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(var(--mf-form-bg-rgb), 0.18), transparent 40%);
    pointer-events: none;
}

.mf-quiz-wrap::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    pointer-events: none;
}

/* ─── Header ──────────────────────────────────────────────── */
.mf-quiz-header { position: relative; z-index: 1; animation: mfRise .5s ease both; }
.mf-quiz-title {
    font-family: "Plus Jakarta Sans", "Inter", "Segoe UI", sans-serif;
    font-size: clamp(1.6rem, 2.2vw, 2.1rem);
    font-weight: 800;
    color: var(--mf-accent-strong);
    margin-bottom: .4rem;
    letter-spacing: -0.3px;
}
.mf-quiz-description { color: var(--mf-muted); margin-bottom: 1rem; }
.mf-quiz-estimated   {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .85rem;
    color: var(--mf-muted);
    margin-bottom: 1.2rem;
}
.mf-quiz-estimated svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ─── En-tête d'étape (titre + progression) ──────────────── */
.mf-step-header {
    margin-bottom: 1rem;
}
.mf-step-header[hidden] { display: none !important; }
.mf-step-header:not([hidden]) { display: block; }
.mf-step-header-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    gap: 12px;
}
.mf-step-legend-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--mf-accent-strong);
}
.mf-step-header .mf-progress-label {
    font-size: .8rem;
    color: var(--mf-muted);
    text-align: right;
    margin: 0;
    white-space: nowrap;
}
.mf-step-header .mf-progress-bar-wrap {
    height: 8px;
    background: var(--mf-accent-soft);
    border: 1px solid var(--mf-border);
    border-radius: 99px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
    position: relative;
}
.mf-step-header .mf-progress-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, var(--mf-accent) 0%, var(--mf-secondary) 100%);
    border-radius: 99px;
    width: 0%;
    transition: width .35s ease;
}

/* ─── Parties ─────────────────────────────────────────────── */
.mf-quiz-part        { display: none; }
.mf-quiz-part.is-active { display: block; animation: mfStepIn .35s ease both; position: relative; z-index: 1; }

.mf-part-legend {
    font-size: 0;
    font-weight: 700;
    color: var(--mf-accent-strong);
    margin: 0;
    padding: 0;
    border: none;
    height: 0;
    overflow: hidden;
}
.mf-part-description { color: var(--mf-muted); font-size: .88rem; margin-bottom: .6rem; }

.mf-question,
.mf-consent-box,
.mf-consent-checkbox-label,
.mf-result-right,
.mf-result-mention,
.mf-section-result-card {
    color: var(--mf-text-on-light);
}

/* ─── Questions ───────────────────────────────────────────── */
.mf-question {
    margin-bottom: .7rem;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(var(--mf-accent-rgb), 0.24);
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.mf-question:focus-within {
    border-color: var(--mf-accent-strong);
    box-shadow: 0 6px 18px rgba(var(--mf-accent-rgb), 0.18);
}
.mf-question-label {
    display: block;
    font-weight: 600;
    margin-bottom: .3rem;
    font-size: .92rem;
    line-height: 1.35;
    color: var(--mf-ink);
}
.mf-required { color: #ef4444; margin-left: 2px; }
.mf-help-text { display: block; color: var(--mf-muted); font-size: .78rem; margin-bottom: .2rem; }

/* Radio groupe */
.mf-radio-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.mf-radio-label { flex: 1; min-width: 60px; }
.mf-radio-label input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.mf-radio-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 7px 6px;
    border: 2px solid rgba(var(--mf-accent-rgb), 0.28);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    text-align: center;
    line-height: 1.2;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}
.mf-radio-btn:hover {
    border-color: var(--mf-accent-strong);
    background: rgba(var(--mf-accent-rgb), 0.10);
}
.mf-radio-label input[type="radio"]:checked + .mf-radio-btn {
    border-color: var(--mf-accent-strong);
    background: linear-gradient(180deg, rgba(var(--mf-accent-rgb), 0.20) 0%, rgba(var(--mf-accent-rgb), 0.12) 100%);
    color: var(--mf-accent-strong);
    box-shadow: 0 0 0 1px rgba(var(--mf-accent-rgb), 0.24), 0 6px 14px rgba(var(--mf-accent-rgb), 0.18);
}
.mf-radio-label input[type="radio"]:focus-visible + .mf-radio-btn {
    outline: 2px solid var(--mf-accent);
    outline-offset: 2px;
}
.mf-radio-text { font-size: .8rem; font-weight: 600; }

/* Checkbox */
.mf-checkbox-group   { display: flex; flex-direction: column; gap: 5px; }
.mf-checkbox-label   { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: .9rem; }
.mf-checkbox-label input { width: 16px; height: 16px; accent-color: var(--mf-accent-strong); }

/* Select */
.mf-select {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid var(--mf-border);
    border-radius: 8px;
    font-size: .9rem;
    background: rgba(255, 255, 255, 0.96);
}
.mf-select:focus { outline: 2px solid var(--mf-accent); border-color: transparent; }

/* Number / Text */
.mf-number, .mf-text {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid var(--mf-border);
    border-radius: 8px;
    font-size: .9rem;
    background: rgba(255, 255, 255, 0.96);
}
.mf-number:focus, .mf-text:focus { outline: 2px solid var(--mf-accent); border-color: transparent; }

/* Erreur question */
.mf-question-error {
    display: block;
    font-size: .75rem;
    color: #dc2626;
    margin-top: 2px;
    min-height: 0;
}
.mf-question-error:empty { display: none; }

/* ─── Navigation ──────────────────────────────────────────── */
.mf-quiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.2rem;
    gap: 10px;
}
.mf-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 24px;
    border-radius: 999px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background .15s, box-shadow .15s, transform .15s;
}
.mf-btn-prev {
    background: var(--mf-accent-strong);
    color: var(--mf-text-on-dark);
    border: 1px solid rgba(255, 255, 255, 0.18);
}
.mf-btn-prev:hover { background: var(--mf-accent); transform: translateY(-1px); }
.mf-btn-next, .mf-btn-submit {
    background: linear-gradient(135deg, var(--mf-accent) 0%, var(--mf-secondary) 100%);
    color: #fff;
    margin-left: auto;
    box-shadow: 0 10px 20px rgba(var(--mf-accent-rgb), 0.2);
}
.mf-btn-next:hover, .mf-btn-submit:hover { transform: translateY(-1px); }
.mf-btn:disabled { opacity: .5; cursor: not-allowed; }
.mf-btn[hidden] { display: none !important; }

/* ─── Erreur globale formulaire ──────────────────────────── */
.mf-form-error {
    margin-top: 1rem;
    padding: 12px 16px;
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    color: #991b1b;
    font-size: .9rem;
}

/* ─── Consentement ────────────────────────────────────────── */
.mf-consent-box {
    background: var(--mf-result-light-bg);
    border: 1.5px solid var(--mf-border);
    border-radius: 14px;
    padding: 20px;
    margin: 1rem 0;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    color: var(--mf-text-on-light);
}

/* Consentement actif: fond sombre + texte clair */
.mf-quiz-part.mf-consent-step.is-active .mf-consent-box {
    background: var(--mf-accent-strong);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}
.mf-quiz-part.mf-consent-step.is-active .mf-consent-title,
.mf-quiz-part.mf-consent-step.is-active .mf-consent-field label,
.mf-quiz-part.mf-consent-step.is-active .mf-consent-label {
    color: #fff;
}

/* Consentement: appliquer les couleurs au bloc sans forcer tout le fieldset */
.mf-consent-box,
.mf-consent-box .mf-consent-title,
.mf-consent-box .mf-consent-field label,
.mf-consent-box .mf-consent-label {
    color: var(--mf-text-on-light);
}

/* Résultats : couleurs normales sur fond clair */
.mf-result-title {
    color: var(--mf-accent-strong);
}
.mf-result-message {
    color: var(--mf-ink);
}
.mf-consent-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--mf-accent-strong);
    margin: 0 0 1.2rem 0;
    font-family: "Plus Jakarta Sans", "Inter", "Segoe UI", sans-serif;
}
.mf-consent-field {
    margin-bottom: 16px;
}
.mf-consent-field label {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--mf-ink);
}
.mf-required-star {
    color: #ef4444;
    margin-left: 2px;
}
.mf-consent-field input[type="email"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1.5px solid var(--mf-border);
    border-radius: 10px;
    font-size: .95rem;
    font-family: inherit;
    color: var(--mf-text-on-light);
    background: var(--mf-surface);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.mf-consent-field input[type="email"]::placeholder {
    color: var(--mf-text-muted-on-light);
}
.mf-consent-field input[type="email"]:focus {
    outline: none;
    border-color: var(--mf-accent);
    box-shadow: 0 0 0 3px rgba(var(--mf-accent-rgb), 0.18);
}
.mf-consent-field input[type="email"]:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}
.mf-consent-field .mf-question-error {
    display: block;
    color: #ef4444;
    font-size: .8rem;
    margin-top: 6px;
    min-height: 1.2em;
}
.mf-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .9rem;
    cursor: pointer;
    line-height: 1.5;
    color: var(--mf-text-on-light);
}
.mf-consent-checkbox-label {
    margin-top: 8px;
    padding: 10px 12px;
    background: var(--mf-surface);
    border-radius: 8px;
    border: 1px solid var(--mf-border);
    transition: background 0.2s;
}
.mf-consent-checkbox-label:hover {
    background: var(--mf-surface-2);
}
.mf-quiz-part.mf-consent-step.is-active .mf-consent-checkbox-label {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}
.mf-quiz-part.mf-consent-step.is-active .mf-consent-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.14);
}
.mf-consent-checkbox {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
    accent-color: var(--mf-accent-strong);
    cursor: pointer;
}
.mf-send-email-checkbox {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
    accent-color: var(--mf-accent);
    cursor: pointer;
}

/* Email toujours lisible: fond blanc + texte foncé */
.mf-quiz-part.mf-consent-step.is-active .mf-consent-field input[type="email"] {
    background: #fff;
    color: var(--mf-accent-strong);
    border-color: rgba(255, 255, 255, 0.35);
}
.mf-quiz-part.mf-consent-step.is-active .mf-consent-field input[type="email"]::placeholder {
    color: #64748b;
}

/* ─── Zone résultats ──────────────────────────────────────── */
.mf-quiz-result {
    animation: mfFadeIn .4s ease;
}
@keyframes mfFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ─── Layout des résultats ──────────────────────────────────────────────── */
.mf-result-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
    .mf-result-layout {
        grid-template-columns: 180px 1fr;
        gap: 1.5rem;
    }
}

/* Permettre aux résultats mode "section" (titre + message) d'occuper toute la largeur */
.mf-result-layout.mf-result-layout--single {
    grid-template-columns: 1fr;
}

/* Colonne gauche : Score Card */
.mf-result-left {
    display: flex;
    justify-content: center;
}
.mf-result-score-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.2rem 1rem;
    background: linear-gradient(135deg, var(--mf-result-dark-bg) 0%, var(--mf-accent) 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(var(--mf-accent-rgb), 0.18);
    text-align: center;
    color: var(--mf-result-dark-text);
}
.mf-result-score-card,
.mf-result-score-card * {
    color: var(--mf-text-on-dark);
}
.mf-result-score-card .mf-score-value,
.mf-result-score-card .mf-score-max,
.mf-result-score-card .mf-result-score-label {
    color: var(--mf-text-on-dark);
}
.mf-result-icon-large {
    font-size: 2.4rem;
    line-height: 1;
    margin-bottom: .6rem;
}
.mf-result-score-number {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}
.mf-score-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--mf-accent-strong);
    line-height: 1;
    font-family: "Plus Jakarta Sans", "Inter", "Segoe UI", sans-serif;
}
.mf-score-max {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--mf-text-muted-on-dark);
}
.mf-result-score-label {
    font-size: 1rem;
    color: var(--mf-text-muted-on-dark);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Colonne droite : Titre et message */
.mf-result-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.mf-result-title {
    font-size: 2rem;
    font-weight: 800;
    font-family: "Plus Jakarta Sans", "Inter", "Segoe UI", sans-serif;
    color: var(--mf-accent-strong);
    margin-bottom: 1rem;
    line-height: 1.3;
}
.mf-result-message {
    line-height: 1.7;
    font-size: 1.05rem;
    color: var(--mf-ink);
}

/* ─── Boutons d'action ────────────────────────────────────────────────── */
.mf-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
    justify-content: center;
}
@media (min-width: 768px) {
    .mf-result-actions {
        justify-content: flex-start;
    }
}
.mf-result-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 32px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}
.mf-btn-primary {
    background: linear-gradient(135deg, var(--mf-accent) 0%, var(--mf-secondary) 100%);
    color: #fff !important;
    box-shadow: 0 12px 24px rgba(var(--mf-accent-rgb), 0.25);
}
.mf-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(var(--mf-accent-rgb), 0.3);
}
.mf-btn-secondary {
    background: var(--mf-surface);
    color: var(--mf-accent) !important;
    border: 2px solid var(--mf-accent);
    box-shadow: 0 8px 16px rgba(var(--mf-accent-rgb), 0.08);
}
.mf-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(var(--mf-accent-rgb), 0.12);
    background: var(--mf-accent-soft);
}
.mf-btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.mf-btn-success {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: #fff !important;
}

/* ─── Tableau des sections ────────────────────────────────────────────── */
.mf-section-scores {
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--mf-result-dark-bg);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--mf-result-dark-text);
}
.mf-section-scores,
.mf-section-scores * {
    color: var(--mf-text-on-dark);
}
.mf-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--mf-text-on-dark);
}
.mf-section-table {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.mf-section-bar-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.mf-section-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: .9rem;
    font-weight: 600;
    color: var(--mf-text-on-dark);
}
.mf-section-name {
    color: var(--mf-text-on-dark);
}
.mf-section-points {
    color: var(--mf-text-on-dark);
    font-weight: 700;
}
.mf-section-bar-track {
    height: 14px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 99px;
    overflow: hidden;
}
.mf-section-bar-fill {
    height: 100%;
    background: #e11d48;
    border-radius: 99px;
    transition: width .6s ease;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.3);
}

/* Carte de section (mode section) : clair sur fond sombre de section-scores */
.mf-section-result-card {
    background: var(--mf-result-light-bg);
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 14px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}
.mf-section-result-card,
.mf-section-result-card * {
    color: var(--mf-text-on-light);
}
.mf-section-result-card .mf-section-bar-label,
.mf-section-result-card .mf-section-name,
.mf-section-result-card .mf-section-points,
.mf-section-result-card .mf-result-title,
.mf-section-result-card .mf-result-message {
    color: var(--mf-text-on-light);
}
.mf-section-result-card .mf-section-bar-track {
    background: var(--mf-accent-soft);
}

/* ─── Recommandations ──────────────────────────────────────────────────── */
.mf-recommendations { margin-top: 2rem; }
.mf-recommendations h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.2rem; color: var(--mf-accent-strong); }
.mf-rec-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}
.mf-rec-card {
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 1.2rem 1.4rem;
    background: linear-gradient(135deg, var(--mf-result-dark-bg) 0%, var(--mf-accent) 100%);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
    transition: transform .2s ease, box-shadow .2s ease;
    color: var(--mf-result-dark-text);
}
.mf-rec-card,
.mf-rec-card * {
    color: var(--mf-text-on-dark);
}
.mf-rec-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
}
.mf-rec-card-link {
    text-decoration: none;
    cursor: pointer;
}
.mf-rec-card-link:hover {
    border-color: var(--mf-surface);
}
.mf-rec-card-title { font-weight: 700; font-size: .95rem; color: var(--mf-text-on-dark); }
.mf-rec-card-desc  { font-size: .85rem; color: var(--mf-text-muted-on-dark); flex: 1; line-height: 1.5; }
.mf-rec-card-btn {
    align-self: flex-start;
    padding: 8px 16px;
    background: var(--mf-accent);
    color: #fff !important;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
    display: inline-block;
}
.mf-rec-card-link .mf-rec-card-btn {
    pointer-events: none; /* Le lien parent gère le clic */
}
.mf-rec-card-link:hover .mf-rec-card-btn { 
    background: var(--mf-accent-strong); 
}
.mf-rec-card-btn:hover { background: var(--mf-accent-strong); }

/* ─── Mention ──────────────────────────────────────────────────────────── */
.mf-result-mention {
    margin-top: 2rem;
    padding: 1rem 1.2rem;
    background: #ffffff !important;
    border: 1px solid var(--mf-border);
    border-left: 3px solid var(--mf-accent);
    border-radius: 10px;
    font-size: .85rem;
    color: var(--mf-accent-strong) !important;
    font-style: italic;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}
.mf-result-mention,
.mf-result-mention * { color: var(--mf-accent-strong) !important; }
.mf-result-mention svg {
    vertical-align: middle;
    width: 14px;
    margin-right: 4px;
    color: var(--mf-accent-strong) !important;
}

/* ─── Spinner ─────────────────────────────────────────────── */
.mf-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid var(--mf-accent-soft);
    border-top-color: var(--mf-accent-strong);
    border-radius: 50%;
    animation: mfSpin .7s linear infinite;
    vertical-align: middle;
}
@keyframes mfSpin { to { transform: rotate(360deg); } }

/* ─── Erreur message ──────────────────────────────────────── */
.mf-error {
    color: #ef4444;
    font-size: .9rem;
    padding: 12px 16px;
    background: #fef2f2;
    border-radius: 10px;
    border-left: 3px solid #ef4444;
}

/* ─── Bouton Commencer ───────────────────────────────────── */
.mf-quiz-start-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    animation: mfRise .5s ease both;
}
.mf-btn-start-quiz {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, var(--mf-accent) 0%, var(--mf-secondary) 100%);
    color: #fff;
    box-shadow: 0 14px 28px rgba(var(--mf-accent-rgb), 0.28);
    transition: transform .2s ease, box-shadow .2s ease;
}
.mf-btn-start-quiz:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(var(--mf-accent-rgb), 0.36);
}
.mf-btn-start-quiz:active { transform: translateY(0); }
.mf-btn-start-icon {
    width: 20px;
    height: 20px;
    transition: transform .2s ease;
}
.mf-btn-start-quiz:hover .mf-btn-start-icon { transform: translateX(3px); }

/* État caché/visible du formulaire */
.mf-quiz-form[hidden],
.mf-progress-bar-wrap[hidden],
.mf-progress-label[hidden],
.mf-quiz-start-wrap[hidden] {
    display: none !important;
}
.mf-quiz-form:not([hidden]),
.mf-progress-bar-wrap:not([hidden]),
.mf-progress-label:not([hidden]) {
    animation: mfRise .3s ease both;
}

@keyframes mfRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes mfStepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .mf-quiz-wrap {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 8px;
        border-radius: 12px;
        box-shadow: none;
    }
    .mf-quiz-header { padding: 0 0 1rem 0; }
    .mf-question {
        padding: 10px;
        margin-bottom: 1rem;
        box-shadow: 0 4px 8px rgba(15, 23, 42, 0.04);
    }
    .mf-radio-group    { gap: 6px; }
    .mf-radio-btn      { padding: 8px 5px; }
    .mf-radio-points   { font-size: 1rem; }
    .mf-btn            { padding: 10px 16px; font-size: .88rem; }
    .mf-rec-cards      { grid-template-columns: 1fr; }
    .mf-progress-bar-wrap { margin-bottom: 6px; }
    .mf-progress-label { margin-bottom: 1rem; }
    .mf-part-legend { font-size: 1.1rem; margin-bottom: .2rem; }
    .mf-quiz-nav { margin-top: 1.2rem; gap: 8px; }
    .mf-consent-box { padding: 12px; }
    .mf-quiz-title { font-size: clamp(1.4rem, 5vw, 2.1rem); }
}
