/* ============================================
   Super Test de Sia — Design System
   ============================================ */

:root {
    --purple: #7c3aed;
    --purple-light: #a78bfa;
    --purple-dark: #5b21b6;
    --pink: #ec4899;
    --pink-light: #f9a8d4;
    --blue: #3b82f6;
    --blue-light: #60a5fa;
    --green: #10b981;
    --orange: #f59e0b;
    --red: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --white: #ffffff;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.25);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
    color: var(--gray-900);
    background: linear-gradient(135deg, #faf5ff 0%, #fdf4ff 50%, #fce7f3 100%);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; color: var(--gray-900); }
h1 { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; font-weight: 700; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 0.9rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--gray-100);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--purple);
    text-decoration: none;
}
.nav-brand:hover { text-decoration: none; }

.nav-toggle { display: none; background: none; border: none; color: var(--gray-700); cursor: pointer; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-links > a {
    padding: 0.55rem 1rem;
    color: var(--gray-700);
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
}
.nav-links > a:hover { background: var(--gray-100); color: var(--purple); }
.nav-links > a.active { background: linear-gradient(135deg, var(--purple), var(--pink)); color: white; }

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.5rem 0.4rem 0.4rem;
    background: var(--gray-50);
    border-radius: 100px;
    margin-left: 0.8rem;
}
.nav-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}
.nav-user-info { line-height: 1.2; }
.nav-user-name { font-weight: 700; font-size: 0.9rem; }
.nav-user-role { font-size: 0.75rem; color: var(--gray-500); text-transform: capitalize; }
.nav-logout {
    padding: 0.5rem;
    color: var(--gray-500);
    display: flex;
    border-radius: 50%;
    transition: all 0.2s;
}
.nav-logout:hover { color: var(--red); background: white; }

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-page {
    background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-container { width: 100%; max-width: 460px; }

.auth-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    text-align: center;
}

.auth-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: white;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
}

.auth-card h1 { font-size: 1.8rem; margin-bottom: 0.4rem; }
.auth-subtitle { color: var(--gray-500); margin-bottom: 2rem; }

.auth-form { text-align: left; }

.form-group { margin-bottom: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: var(--gray-700);
}
.form-group input, .form-group select {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s;
    font-family: inherit;
    background: var(--white);
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--purple);
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.9rem;
}
.demo-info {
    margin-top: 1rem;
    padding: 0.8rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    font-size: 0.8rem;
    text-align: left;
    color: var(--gray-700);
    line-height: 1.6;
}
.demo-info code { background: white; padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.75rem; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.3rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s;
    font-family: inherit;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45); }

.btn-secondary {
    background: white;
    color: var(--purple);
    border: 2px solid var(--purple);
}
.btn-secondary:hover { background: var(--purple); color: white; }

.btn-ghost { background: transparent; color: var(--gray-700); }
.btn-ghost:hover { background: var(--gray-100); }

.btn-large { padding: 0.9rem 1.8rem; font-size: 1.05rem; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.85rem; }
.btn-full { width: 100%; }

/* ============================================
   CONTAINER + LAYOUT
   ============================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.page-header h1 { font-size: 2rem; }
.page-subtitle { color: var(--gray-500); font-size: 1rem; }

.section-header { text-align: center; margin: 3rem 0 2rem; }
.section-header h2 { font-size: 1.8rem; margin-bottom: 0.3rem; }
.section-header p { color: var(--gray-500); }

/* ============================================
   HERO (Accueil)
   ============================================ */
.hero {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 2rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    background: white;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--purple);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.2rem;
}
.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
}
.gradient-text {
    background: linear-gradient(135deg, var(--purple), var(--pink));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 1.15rem;
    color: var(--gray-700);
    margin-bottom: 2rem;
    max-width: 500px;
}
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.hero-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.brain-emoji-wrap {
    background: white;
    padding: 2rem;
    border-radius: 40% 60% 65% 35% / 40% 45% 55% 60%;
    box-shadow: var(--shadow-xl);
    animation: morph 8s ease-in-out infinite;
}
@keyframes morph {
    0%, 100% { border-radius: 40% 60% 65% 35% / 40% 45% 55% 60%; }
    50% { border-radius: 60% 40% 35% 65% / 55% 60% 40% 45%; }
}

.floating-card {
    position: absolute;
    width: 68px; height: 68px;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    animation: float 4s ease-in-out infinite;
}
.card-1 { top: 5%; left: 5%; color: var(--purple); animation-delay: 0s; }
.card-2 { top: 15%; right: 8%; color: var(--pink); animation-delay: 1s; }
.card-3 { bottom: 12%; left: 12%; color: var(--blue); animation-delay: 2s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ============================================
   STAT CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.stat-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 0.3rem;
}
.icon-purple { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.icon-pink { background: linear-gradient(135deg, #ec4899, #f9a8d4); }
.icon-blue { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.icon-orange { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.icon-green { background: linear-gradient(135deg, #10b981, #34d399); }

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
}
.stat-label { color: var(--gray-500); font-size: 0.9rem; font-weight: 500; }

/* ============================================
   CATEGORY CARDS
   ============================================ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-bottom: 3rem;
}

.category-card {
    background: white;
    padding: 1.8rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}
.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    text-decoration: none;
}
.category-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--purple), var(--pink));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}
.category-card:hover::before { transform: scaleX(1); }

.cat-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1rem;
}
.category-card h3 { margin-bottom: 0.3rem; }
.category-card p { color: var(--gray-500); font-size: 0.9rem; margin-bottom: 1rem; }
.cat-tag {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================
   TEST PAGE
   ============================================ */
.test-page { background: linear-gradient(135deg, #faf5ff 0%, #fce7f3 100%); min-height: 100vh; }

.test-header {
    background: white;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
}

.test-quit {
    color: var(--gray-500);
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    transition: all 0.2s;
}
.test-quit:hover { color: var(--red); background: var(--gray-100); text-decoration: none; }

.test-progress-wrap { flex: 1; }
.test-progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 0.35rem;
}
.test-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--purple), var(--pink));
    border-radius: 100px;
    transition: width 0.4s ease-out;
    width: 0%;
}
.test-progress-text {
    font-size: 0.85rem;
    color: var(--gray-500);
    font-weight: 600;
}

.test-timer {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    background: var(--gray-100);
    border-radius: 100px;
    font-weight: 700;
    color: var(--gray-700);
    font-variant-numeric: tabular-nums;
}

.test-container {
    max-width: 720px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.question-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.q-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.q-badge {
    padding: 0.35rem 0.9rem;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: white;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.q-diff { color: var(--orange); font-size: 1.1rem; letter-spacing: 0.1em; }

.q-enonce {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 2rem;
    color: var(--gray-900);
}

.q-options {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.q-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.3rem;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1.05rem;
    text-align: left;
    transition: all 0.2s;
    font-family: inherit;
}
.q-option:hover:not(:disabled) {
    border-color: var(--purple-light);
    background: #faf5ff;
    transform: translateX(4px);
}
.q-option.selected {
    border-color: var(--purple);
    background: #f5f3ff;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}
.q-option.correct {
    border-color: var(--green);
    background: #ecfdf5;
    color: var(--green);
}
.q-option.wrong {
    border-color: var(--red);
    background: #fef2f2;
    color: var(--red);
}
.q-option:disabled { cursor: default; }

.q-option-letter {
    width: 32px; height: 32px;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.q-option.selected .q-option-letter { background: var(--purple); color: white; }
.q-option.correct .q-option-letter { background: var(--green); color: white; }
.q-option.wrong .q-option-letter { background: var(--red); color: white; }

.q-option-text { flex: 1; font-weight: 500; }

.q-feedback {
    margin-top: 1.5rem;
    padding: 1.3rem;
    border-radius: var(--radius);
    animation: slideUp 0.3s ease-out;
}
.feedback-good { background: #ecfdf5; border: 2px solid var(--green); }
.feedback-bad { background: #fef2f2; border: 2px solid var(--red); }
.feedback-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.4rem; }
.feedback-good .feedback-title { color: var(--green); }
.feedback-bad .feedback-title { color: var(--red); }
.feedback-explain { color: var(--gray-700); margin-bottom: 1rem; font-size: 0.95rem; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.loader {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-500);
    font-size: 1.2rem;
}

/* ============================================
   RESULTAT
   ============================================ */
.result-hero {
    text-align: center;
    padding: 2rem 1rem 3rem;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.result-emoji { margin-bottom: 1rem; }
.result-hero h1 { font-size: 1.6rem; color: var(--gray-500); margin-bottom: 1.5rem; font-weight: 600; }

.iq-big {
    display: inline-block;
    padding: 2rem 3rem;
    border-radius: var(--radius-xl);
    margin: 0.5rem 0 1.5rem;
    color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.iq-big.niveau-genie { background: linear-gradient(135deg, #f59e0b, #dc2626); }
.iq-big.niveau-excellent { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.iq-big.niveau-bon { background: linear-gradient(135deg, #3b82f6, #7c3aed); }
.iq-big.niveau-moyen { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.iq-big.niveau-faible { background: linear-gradient(135deg, #64748b, #94a3b8); }

.iq-number { font-size: 5rem; font-weight: 900; line-height: 1; }
.iq-label { font-size: 1rem; opacity: 0.9; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }

.iq-niveau {
    display: inline-block;
    padding: 0.5rem 1.3rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}
.iq-niveau.niveau-genie { background: #fef3c7; color: #b45309; }
.iq-niveau.niveau-excellent { background: #f5f3ff; color: var(--purple-dark); }
.iq-niveau.niveau-bon { background: #dbeafe; color: #1e40af; }
.iq-niveau.niveau-moyen { background: #cffafe; color: #155e75; }
.iq-niveau.niveau-faible { background: var(--gray-100); color: var(--gray-700); }

.iq-message { color: var(--gray-700); font-size: 1.1rem; max-width: 500px; margin: 0 auto; }

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.result-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}
.result-card h2 { margin-bottom: 1.5rem; }

.cat-bars { display: flex; flex-direction: column; gap: 1rem; }
.cat-bar-row {}
.cat-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: capitalize;
}
.cat-bar-track {
    height: 12px;
    background: var(--gray-100);
    border-radius: 100px;
    overflow: hidden;
}
.cat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--purple), var(--pink));
    border-radius: 100px;
    transition: width 0.6s ease-out;
}

.result-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.chart-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.chart-card h2 { font-size: 1.2rem; margin-bottom: 1rem; }

.history-table-wrap { overflow-x: auto; }
.history-table { width: 100%; border-collapse: collapse; }
.history-table th {
    text-align: left;
    padding: 0.8rem 0.6rem;
    color: var(--gray-500);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--gray-100);
}
.history-table td {
    padding: 0.9rem 0.6rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}
.history-table tr:last-child td { border-bottom: none; }
.history-table tr:hover td { background: var(--gray-50); }

.mini-bar {
    position: relative;
    height: 20px;
    background: var(--gray-100);
    border-radius: 100px;
    overflow: hidden;
    min-width: 100px;
}
.mini-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--purple), var(--pink));
    border-radius: 100px;
}
.mini-bar span {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 20px;
    color: var(--gray-900);
}

.iq-pill {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.9rem;
}
.iq-good { background: #ecfdf5; color: var(--green); }
.iq-medium { background: #fef3c7; color: #b45309; }
.iq-low { background: var(--gray-100); color: var(--gray-500); }

.empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--gray-500);
}

/* ============================================
   PARENT
   ============================================ */
.child-selector {
    background: white;
    padding: 1.2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.child-selector label { display: block; font-weight: 600; margin-bottom: 0.6rem; color: var(--gray-500); font-size: 0.85rem; text-transform: uppercase; }
.child-tabs { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.child-tab {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 1rem 0.6rem 0.6rem;
    background: var(--gray-50);
    border-radius: 100px;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.2s;
}
.child-tab:hover { background: var(--gray-100); text-decoration: none; }
.child-tab.active {
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: white;
}
.child-avatar {
    width: 36px; height: 36px;
    background: white;
    color: var(--purple);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}
.child-tab.active .child-avatar { background: white; color: var(--purple); }
.child-name { font-weight: 700; font-size: 0.9rem; }
.child-age { font-size: 0.75rem; opacity: 0.7; }

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 0.9rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.alert-error { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }
.alert-success { background: #ecfdf5; color: var(--green); border: 1px solid #a7f3d0; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: white;
    padding: 2rem;
    border-top: 1px solid var(--gray-100);
    margin-top: 4rem;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--gray-500); font-size: 0.9rem; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; gap: 2rem; }
    .hero-visual { height: 280px; order: -1; }
    .brain-emoji-wrap { padding: 1.5rem; }
    .hero-content h1 { font-size: 2.2rem; }
    .dashboard-grid { grid-template-columns: 1fr; }
    h1 { font-size: 2rem; }

    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        gap: 0.3rem;
        box-shadow: var(--shadow);
        border-top: 1px solid var(--gray-100);
    }
    .nav-links.open { display: flex; }
    .nav-links > a { width: 100%; }
    .nav-user { margin-left: 0; width: 100%; }
    .nav-user-info { flex: 1; }
}

@media (max-width: 600px) {
    .container { padding: 1rem; }
    h1 { font-size: 1.7rem; }
    .hero-content h1 { font-size: 1.8rem; }
    .auth-card { padding: 2rem 1.3rem; }
    .question-card { padding: 1.5rem; }
    .q-enonce { font-size: 1.25rem; }
    .iq-number { font-size: 3.5rem; }
    .iq-big { padding: 1.5rem 2rem; }
    .navbar { padding: 0.8rem 1rem; }
    .test-header { padding: 0.8rem 1rem; gap: 0.8rem; }
    .form-row { grid-template-columns: 1fr; }
    .result-actions .btn { flex: 1; }
}
