/* ============================================================
   tests-espace.css — Pages « Test de niveau » (Test_6e … Test_tle)
   À charger APRÈS index.css, theme-base.css et index-espace.css
   (et après le <style> propre à chaque page).
   Le test devient une mission d'essai en 3 cibles :
   même console que l'échantillon de l'accueil, aucune logique changée.
   ============================================================ */

/* ---------- Intro : briefing ---------- */
body.page-test .test-intro { max-width: 600px; margin-top: 36px; }
body.page-test .test-intro-eyebrow {
    font-family: var(--hud); font-size: 11px; font-weight: 700; letter-spacing: .2em;
    color: var(--neon); background: rgba(34, 211, 238, .08);
    border: 1px solid rgba(34, 211, 238, .3); box-shadow: none;
}
body.page-test .test-intro-title {
    font-family: var(--hud); font-weight: 900; letter-spacing: .01em; line-height: 1.2;
    color: #fff; text-shadow: 0 0 26px rgba(34, 211, 238, .18);
}
body.page-test .test-intro-title span {
    background: linear-gradient(90deg, var(--gold), #ffb347);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 0 12px rgba(245, 200, 66, .35));
}
body.page-test .test-intro-sub { color: var(--muted); font-weight: 700; }

/* ---------- Console ---------- */
body.page-test .demo-widget { max-width: 600px; width: 92%; margin: 26px auto 56px; }
body.page-test .demo-widget-header {
    background: linear-gradient(90deg, rgba(34, 211, 238, .16), rgba(34, 211, 238, .03));
    border-bottom: 1px solid rgba(34, 211, 238, .25);
    border-radius: 18px 18px 0 0;
    padding: 14px 18px 12px;
}
body.page-test .demo-widget-eyebrow {
    font-family: var(--hud); font-size: 10px; font-weight: 700; letter-spacing: .18em;
    color: var(--neon); background: rgba(5, 8, 22, .45);
    border: 1px solid rgba(34, 211, 238, .35);
}
body.page-test .demo-widget-title { font-family: var(--hud); font-size: 1rem; letter-spacing: .04em; color: #fff; }
body.page-test .demo-widget-title span { color: var(--gold); }
body.page-test .test-counter {
    font-family: var(--hud); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
    color: #0B1A4A; background: linear-gradient(180deg, #ffd85a, #f5a623);
    border: 0; box-shadow: 0 3px 0 #a86a0a; padding: 4px 14px; margin-top: 10px;
}

/* Question : lisible avant tout (pas de majuscules forcées sur les maths) */
body.page-test .dw-question { font-size: 20px; }
body.page-test .vec, body.page-test .test-lim, body.page-test .test-frac-inline { color: #fff; }

/* Figures SVG (tracés sombres d'origine) → écran clair, comme l'axe de l'accueil */
body.page-test .test-schema svg {
    background: #f4f7ff; border-radius: 12px; padding: 8px;
    box-shadow: 0 0 0 1px rgba(34, 211, 238, .35), 0 0 22px rgba(34, 211, 238, .12);
    box-sizing: border-box;
}
/* Tableaux de valeurs : grille néon */
body.page-test .test-tableau th, body.page-test .test-tableau td {
    border-color: rgba(34, 211, 238, .55); color: #fff;
}
body.page-test .test-tableau th { background: rgba(34, 211, 238, .12); color: var(--neon); }
body.page-test .test-cell-q { color: var(--gold); }
body.page-test .test-calc, body.page-test .test-op { color: #fff; }
body.page-test .test-frac-n { border-bottom-color: #fff; }

/* Menus déroulants + champs doubles */
body.page-test .test-select,
body.page-test .test-double-row input {
    background: rgba(5, 8, 22, .75); color: #fff; font-weight: 800;
    border: 1.5px solid rgba(34, 211, 238, .45); border-radius: 12px;
    box-shadow: inset 0 0 14px rgba(34, 211, 238, .08);
}
body.page-test .test-select:focus,
body.page-test .test-double-row input:focus { border-color: var(--neon); box-shadow: 0 0 0 3px rgba(34, 211, 238, .18); }
body.page-test .test-select option { background: #0e1638; color: #fff; }
body.page-test .test-double-row input::placeholder { color: #6b7ab0; }
body.page-test .test-double-label,
body.page-test .test-monotonie-label { color: #fff; }
body.page-test .test-select2-label { color: var(--neon); }
body.page-test .test-vector, body.page-test .test-expr-preview { color: #fff; }

/* Champ de réponse + Vérifier sur la même ligne */
body.page-test .dw-input-row input { flex: 1 1 220px; min-width: 0; }
body.page-test .dw-input-row .dw-btn-verify { flex: 0 0 auto; }

/* Verdict : la correction contient des maths → casse et police normales */
body.page-test .dw-feedback {
    font-family: 'Nunito', Arial, sans-serif; font-size: 15px; font-weight: 800;
    letter-spacing: 0; text-transform: none; border-radius: 12px; margin-top: 14px;
}

/* Progression : 3 cibles */
body.page-test .test-step-dot { background: rgba(5, 8, 22, .7); border: 1px solid rgba(34, 211, 238, .35); height: 9px; width: 46px; }
body.page-test .test-step-dot.active { background: var(--neon); box-shadow: 0 0 10px rgba(34, 211, 238, .7); }
body.page-test .test-step-dot.done { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 8px rgba(62, 240, 138, .5); }

/* ---------- Écran résultat : rapport de mission ---------- */
body.page-test .test-result-score { font-family: var(--hud); color: #fff; }
body.page-test .test-result-score span { color: var(--gold); text-shadow: 0 0 18px rgba(245, 200, 66, .45); }
body.page-test .test-result-label { font-family: var(--hud); font-size: 11px; letter-spacing: .24em; color: var(--neon); }
body.page-test .test-result-msg { color: #fff; }
body.page-test .test-result-sub { color: var(--muted); }
body.page-test .test-recap-item {
    background: rgba(5, 8, 22, .55); border: 1px solid rgba(34, 211, 238, .25); color: #fff;
}
body.page-test .test-recap-item.ok { border-color: rgba(62, 240, 138, .45); }
body.page-test .test-recap-item.ko { border-color: rgba(255, 77, 109, .45); }
body.page-test .test-recap-item.ok .test-recap-mark { background: var(--ok); color: #0B1A4A; }
body.page-test .test-recap-item.ko .test-recap-mark { background: var(--hot, #ff4d6d); }
body.page-test .test-recap-correct { color: var(--gold); }
body.page-test .test-result-cta {
    background: linear-gradient(180deg, #ffd85a, #f5a623); color: #0B1A4A;
    box-shadow: 0 5px 0 #a86a0a, 0 0 22px rgba(245, 200, 66, .3);
}
body.page-test .test-result-cta:hover { color: #0B1A4A; box-shadow: 0 7px 0 #a86a0a, 0 0 30px rgba(245, 200, 66, .55); }
body.page-test .test-result-restart { color: var(--neon); }

@media (max-width: 480px) {
    body.page-test .dw-question { font-size: 18px; }
    body.page-test .demo-widget-title { font-size: .9rem; }
    body.page-test .test-step-dot { width: 38px; }
}

/* Clavier : touches sur une ligne (cos( ), sin( )…), retour à la ligne si besoin */
body.page-test .dw-symbols { flex-wrap: wrap; }
body.page-test .dw-symbols button { white-space: nowrap; }
body.page-test .dw-input-row input:focus { outline: none; }
@media (max-width: 480px) {
    body.page-test .dw-symbols { gap: 6px; }
    body.page-test .dw-symbols button { min-width: 42px; padding: 0 9px; font-size: 15px; }
    body.page-test .dw-input-row input { font-size: 1rem; padding: 13px 10px; }
}
