﻿    :root {
      /* Marque émeraude (les noms --purple* sont conservés : utilisés partout) */
      --purple: #059669; --purple-light: #E3F7ED; --purple-dark: #047857;
      --yellow: #F59E0B; --yellow-light: #FEF3C7;
      --green:  #10B981; --green-light:  #D1FAE5;
      --blue:   #0EA5E9; --blue-light:   #E0F2FE;
      --red:    #EF4444; --red-light:    #FEE2E2;
      --orange: #F97316; --orange-light: #FFEDD5;
      --pink:   #EC4899; --pink-light:   #FCE7F3;
      --violet: #8B5CF6; --violet-light: #EDE9FE;
      --bg: #F5FBF8; --white: #fff;
      --text: #16342C; --muted: #6B7280;
      --radius: 20px; --radius-sm: 12px;
      --shadow: 0 4px 20px rgba(5,150,105,.15);
      --shadow-card: 0 2px 12px rgba(0,0,0,.08);
    }
    * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
    html, body { height: 100%; font-family: 'Inter', 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); overflow-x: hidden; }

    /* ── Layout ── */
    #app { min-height: 100vh; display: flex; flex-direction: column; }
    .screen { display: none; flex-direction: column; flex: 1; }
    .screen.active { display: flex; }

    /* ── Buttons ── */
    .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
           padding: 14px 28px; border-radius: 999px; font-size: 1rem; font-weight: 700;
           border: none; cursor: pointer; transition: all .2s; text-decoration: none; }
    .btn:active { transform: scale(.96); }
    .btn-primary { background: var(--purple); color: #fff; box-shadow: 0 4px 14px rgba(124,58,237,.4); }
    .btn-primary:hover { background: var(--purple-dark); }
    .btn-yellow  { background: linear-gradient(120deg,#F59E0B,#F97316); color: #fff; box-shadow: 0 4px 14px rgba(249,115,22,.4); }
    .btn-yellow:hover { background: linear-gradient(120deg,#D97706,#EA580C); }
    .btn-outline { background: transparent; color: var(--purple); border: 2.5px solid var(--purple); }
    .btn-ghost   { background: transparent; color: var(--muted); }
    .btn-hint    { background: #FFFBEB; color: #92400E; border: 2px solid #FCD34D; font-size: 0.875rem; }
    .btn-hint:hover:not(:disabled) { background: #FEF3C7; }
    .btn-sm { padding: 10px 20px; font-size: 0.875rem; }
    .btn-lg { padding: 18px 36px; font-size: 1.1rem; }
    .btn-full { width: 100%; }
    .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

    /* ── Cards ── */
    .card { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-card); }

    /* ── Form ── */
    .form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
    label { font-size: 0.875rem; font-weight: 600; color: var(--text); }
    input, select { padding: 14px 16px; border: 2px solid #E5E7EB; border-radius: var(--radius-sm);
                    font-size: 1rem; color: var(--text); background: #fff; transition: border .2s; width: 100%; }
    input:focus, select:focus { outline: none; border-color: var(--purple); }

    /* ── Alert ── */
    .alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 600; display: none; margin-top: 8px; }
    .alert.show { display: block; }
    .alert-err { background: var(--red-light);   color: var(--red); }
    .alert-ok  { background: var(--green-light);  color: var(--green); }

    /* ── Top bar ── */
    .topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px;
              background: var(--white); box-shadow: 0 2px 8px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 10; }
    .topbar-title { font-size: 1.1rem; font-weight: 800; color: var(--purple); }
    .back-btn { background: var(--purple-light); color: var(--purple); border: none; border-radius: 50%;
                width: 40px; height: 40px; font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }

    /* ── XP bar ── */
    .xp-bar-wrap { background: #E5E7EB; border-radius: 999px; height: 8px; overflow: hidden; }
    .xp-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--yellow), var(--purple)); transition: width .6s; }

    /* ═══════════════════════════════════════════
       SCREEN 1 — LANDING
    ═══════════════════════════════════════════ */
    #screen-landing {
      background: linear-gradient(135deg, #047857 0%, #059669 40%, #14B8A6 100%);
      color: #fff; align-items: center; justify-content: center; text-align: center; padding: 40px 24px; min-height: 100vh;
    }
    .landing-logo { font-size: 5.5rem; margin-bottom: 8px; animation: bounce 2s infinite; display: block; }
    @keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
    .landing-title { font-size: 2.8rem; font-weight: 900; margin-bottom: 6px; }
    .landing-sub   { font-size: 1.1rem; opacity: .9; margin-bottom: 36px; }
    .landing-features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 36px; width: 100%; max-width: 380px; }
    .feature-pill { background: rgba(255,255,255,.15); border-radius: 16px; padding: 12px 14px;
                    display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.875rem;
                    backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.2); }
    .landing-btns { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 340px; }
    .landing-btns .btn-outline { border-color: rgba(255,255,255,.6); color: #fff; }

    /* Stars decoration */
    .stars { position: absolute; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
    .star { position: absolute; background: #fff; border-radius: 50%; animation: twinkle 3s infinite; }
    @keyframes twinkle { 0%,100% { opacity: .2; transform: scale(1); } 50% { opacity: .8; transform: scale(1.3); } }

    /* ═══════════════════════════════════════════
       SCREEN 2 — AUTH
    ═══════════════════════════════════════════ */
    #screen-auth { padding: 0; }
    .auth-header { background: linear-gradient(135deg, var(--purple), var(--blue));
                   padding: 48px 24px 32px; text-align: center; color: #fff; }
    .auth-header .logo { font-size: 3rem; }
    .auth-header h1 { font-size: 1.6rem; font-weight: 800; margin-top: 8px; }
    .auth-body { padding: 28px 24px; flex: 1; }
    .auth-tabs { display: flex; background: #F3F4F6; border-radius: var(--radius-sm); padding: 4px; margin-bottom: 24px; }
    .auth-tab { flex: 1; padding: 10px; border: none; background: transparent; border-radius: 10px;
                font-weight: 700; cursor: pointer; transition: all .2s; color: var(--muted); }
    .auth-tab.active { background: #fff; color: var(--purple); box-shadow: var(--shadow-card); }

    /* ═══════════════════════════════════════════
       SCREEN 3 — PROFILES
    ═══════════════════════════════════════════ */
    #screen-profiles { padding: 0; }
    .profiles-header { background: linear-gradient(135deg, var(--purple), var(--blue));
                       padding: 32px 24px 24px; color: #fff; }
    .profiles-header h1 { font-size: 1.4rem; font-weight: 800; }
    .profiles-header p  { opacity: .85; margin-top: 4px; }
    .profiles-body { padding: 20px 16px; flex: 1; overflow-y: auto; }
    .profiles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
    .profile-card { background: var(--white); border-radius: var(--radius); padding: 20px 16px;
                    text-align: center; box-shadow: var(--shadow-card); cursor: pointer;
                    border: 3px solid transparent; transition: all .2s; }
    .profile-card:hover  { border-color: var(--purple); transform: translateY(-3px); box-shadow: var(--shadow); }
    .profile-card .avatar { font-size: 3rem; margin-bottom: 8px; }
    .profile-card .name   { font-weight: 800; font-size: 1rem; }
    .profile-card .info   { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
    .profile-card .xp-badge  { margin-top: 6px; background: var(--yellow-light); color: var(--yellow);
                                border-radius: 999px; padding: 3px 10px; font-size: 0.75rem; font-weight: 700; display: inline-block; }
    .profile-card .coin-badge { margin-top: 4px; background: #FEF3C7; color: #92400E;
                                 border-radius: 999px; padding: 3px 10px; font-size: 0.72rem; font-weight: 700; display: inline-block; }
    .add-profile-card { background: var(--purple-light); border: 3px dashed var(--purple);
                        color: var(--purple); font-size: 2.5rem; cursor: pointer;
                        min-height: 140px; display: flex; flex-direction: column; align-items: center;
                        justify-content: center; gap: 8px; border-radius: var(--radius); transition: all .2s; }
    .add-profile-card span { font-size: 0.875rem; font-weight: 700; }
    .add-profile-card:hover { background: var(--purple); color: #fff; }

    /* ═══════════════════════════════════════════
       SCREEN 4 — CREATE PROFILE
    ═══════════════════════════════════════════ */
    #screen-create-profile .body { padding: 24px 20px; flex: 1; overflow-y: auto; }
    .avatar-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 20px; }
    .avatar-opt  { font-size: 1.8rem; text-align: center; padding: 8px; border-radius: 12px;
                   cursor: pointer; border: 3px solid transparent; transition: all .15s; background: #F3F4F6; }
    .avatar-opt.selected { border-color: var(--purple); background: var(--purple-light); transform: scale(1.1); }
    .age-selector { display: flex; gap: 8px; flex-wrap: wrap; }
    .age-opt { padding: 10px 16px; border-radius: 999px; border: 2px solid #E5E7EB;
               cursor: pointer; font-weight: 700; font-size: 0.875rem; transition: all .15s; background: #fff; }
    .age-opt.selected { border-color: var(--purple); background: var(--purple-light); color: var(--purple); }

    /* ═══════════════════════════════════════════
       SCREEN 5 — HOME (child dashboard)
    ═══════════════════════════════════════════ */
    #screen-home { padding: 0; }
    .home-header { background: linear-gradient(135deg, #065F46 0%, #047857 60%, #059669 100%);
                   padding: 22px 20px 64px; color: #fff; position: relative; overflow: hidden; }
    .home-header::before { content: ''; position: absolute; inset: 0;
      background: radial-gradient(circle at 82% 15%, rgba(255,255,255,.12) 0%, transparent 55%); }
    .home-hello  { font-size: 0.85rem; opacity: .82; font-weight: 600; position: relative; }
    .home-name   { font-size: 1.55rem; font-weight: 800; margin-top: 3px; letter-spacing: -.3px; position: relative; }
    .home-stats  { display: flex; gap: 9px; margin-top: 14px; position: relative; }
    .home-stat   { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.22);
                   border-radius: 11px; padding: 7px 13px; font-size: 0.8rem; font-weight: 700;
                   backdrop-filter: blur(6px); }
    .home-body { padding: 0 16px; margin-top: -52px; flex: 1; overflow-y: auto; padding-bottom: 80px; }
    .section-title { font-size: 1.1rem; font-weight: 800; margin: 20px 0 12px; }

    /* Subjects grid — 2 columns */
    .subjects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
    .subject-card { background: var(--white); border-radius: var(--radius); padding: 16px 14px;
                    display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
                    box-shadow: var(--shadow-card); cursor: pointer; transition: all .2s;
                    border-top: 4px solid transparent; position: relative; overflow: hidden; }
    .subject-card::after { content: ''; position: absolute; bottom: -20px; right: -10px;
                            font-size: 3.5rem; opacity: .07; filter: grayscale(0); }
    .subject-card:active { transform: scale(.97); }
    .subject-icon  { font-size: 2rem; }
    .subject-name  { font-weight: 800; font-size: 0.9rem; }
    .subject-level { font-size: 0.72rem; color: var(--muted); }
    .subject-bar   { width: 100%; }

    /* Badges */
    .badges-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
    .badge-chip { display: flex; align-items: center; gap: 5px; border-radius: 999px;
                  padding: 6px 12px; font-size: 0.78rem; font-weight: 700; white-space: nowrap;
                  background: var(--yellow-light); color: #92400E; border: 1.5px solid #FCD34D; }

    /* Daily limit bar */
    .daily-bar-card { background: var(--white); border-radius: var(--radius); padding: 14px 16px;
                      box-shadow: var(--shadow-card); margin-bottom: 4px; }
    .daily-bar-label { font-size: 0.78rem; font-weight: 700; color: var(--muted); margin-bottom: 6px;
                       display: flex; justify-content: space-between; }

    /* ── Bottom nav ── */
    .bottom-nav { display: flex; background: var(--white); border-top: 2px solid #F3F4F6;
                  padding: 8px 0 env(safe-area-inset-bottom, 8px); position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; }
    .nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
                padding: 8px 4px; cursor: pointer; border: none; background: transparent; font-size: 0.65rem;
                font-weight: 700; color: var(--muted); transition: all .2s; }
    .nav-item .icon { font-size: 1.4rem; }
    .nav-item.active { color: var(--purple); }

    /* ═══════════════════════════════════════════
       SCREEN 6 — EXERCISE
    ═══════════════════════════════════════════ */
    #screen-exercise { padding: 0; }
    .exercise-header { padding: 14px 20px; background: var(--white); border-bottom: 2px solid #F3F4F6; }
    .exercise-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
    .exercise-subject  { font-size: 0.9rem; font-weight: 800; }
    .exercise-level    { font-size: 0.78rem; color: var(--muted); }
    .exercise-progress-bar  { height: 6px; background: #E5E7EB; border-radius: 999px; }
    .exercise-progress-fill { height: 100%; background: linear-gradient(90deg, var(--purple), var(--blue)); border-radius: 999px; transition: width .4s; }

    /* Timer */
    .timer-ring { width: 44px; height: 44px; flex-shrink: 0; }
    .timer-ring circle { fill: none; stroke-width: 4; }
    .timer-bg   { stroke: #E5E7EB; }
    .timer-arc  { stroke: var(--purple); stroke-linecap: round; transition: stroke-dashoffset .5s linear; transform-origin: center; transform: rotate(-90deg); }

    /* Exercise body */
    .exercise-body { padding: 20px; flex: 1; overflow-y: auto; padding-bottom: 20px; }
    .exercise-emoji    { font-size: 3rem; text-align: center; margin-bottom: 12px; animation: popIn .4s; }
    .exercise-question { font-size: 1.1rem; font-weight: 700; line-height: 1.5; margin-bottom: 20px; text-align: center; }
    .answers-grid { display: flex; flex-direction: column; gap: 10px; }
    .answer-btn { background: var(--white); border: 2.5px solid #E5E7EB; border-radius: 16px;
                  padding: 14px 18px; text-align: left; cursor: pointer; font-size: 0.95rem; font-weight: 600;
                  display: flex; align-items: center; gap: 12px; transition: all .2s; }
    .answer-btn:hover:not(:disabled) { border-color: var(--purple); background: var(--purple-light); transform: translateX(3px); }
    .answer-letter { width: 30px; height: 30px; border-radius: 50%; background: #F3F4F6;
                     display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem; flex-shrink: 0; }
    .answer-btn.correct { border-color: var(--green); background: var(--green-light); animation: correctPop .3s; }
    .answer-btn.correct .answer-letter { background: var(--green); color: #fff; }
    .answer-btn.wrong   { border-color: var(--red);   background: var(--red-light); animation: wrongShake .3s; }
    .answer-btn.wrong   .answer-letter { background: var(--red);   color: #fff; }
    @keyframes correctPop  { 0% { transform: scale(.98); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }
    @keyframes wrongShake  { 0%,100% { transform: translateX(0); } 25%,75% { transform: translateX(-5px); } 50% { transform: translateX(5px); } }

    /* Hint box */
    .hint-row   { display: flex; justify-content: center; margin: 12px 0 4px; }
    .hint-box   { margin-top: 10px; padding: 12px 16px; background: #FFFBEB; border: 1.5px solid #FCD34D;
                  border-radius: var(--radius-sm); font-size: 0.9rem; line-height: 1.5; display: none; }
    .hint-box.show { display: block; animation: fadeIn .3s; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

    /* Feedback box */
    .feedback-box { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm); display: none; }
    .feedback-box.show { display: block; animation: fadeIn .3s; }
    .feedback-box.correct { background: var(--green-light); color: #065F46; }
    .feedback-box.wrong   { background: var(--red-light);   color: #7F1D1D; }
    .feedback-title { font-weight: 800; margin-bottom: 4px; font-size: 1rem; }
    .rewards-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
    .reward-chip { border-radius: 999px; padding: 4px 12px; font-size: 0.8rem; font-weight: 800; }
    .reward-xp   { background: var(--yellow); color: #fff; }
    .reward-coin { background: #F59E0B; color: #fff; }

    /* Loading */
    .loading-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center;
                    flex: 1; gap: 20px; padding: 40px; }
    .spinner { width: 56px; height: 56px; border: 5px solid var(--purple-light);
               border-top-color: var(--purple); border-radius: 50%; animation: spin .8s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }
    .loading-text { font-weight: 700; color: var(--purple); }
    .loading-dots::after { content: ''; animation: dots 1.2s steps(4) infinite; }
    @keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

    /* Result overlay */
    .result-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex;
                      align-items: center; justify-content: center; z-index: 100; padding: 24px;
                      opacity: 0; pointer-events: none; transition: opacity .3s; }
    .result-overlay.show { opacity: 1; pointer-events: all; }
    .result-card { background: var(--white); border-radius: var(--radius); padding: 36px 28px;
                   text-align: center; max-width: 340px; width: 100%; animation: popIn .4s; }
    @keyframes popIn { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
    .result-emoji { font-size: 4.5rem; margin-bottom: 12px; }
    .result-title { font-size: 1.6rem; font-weight: 900; margin-bottom: 8px; }
    .result-msg   { color: var(--muted); margin-bottom: 16px; line-height: 1.5; }
    .result-xp    { font-size: 1.1rem; font-weight: 800; color: var(--yellow); margin-bottom: 20px; }

    /* Confetti */
    .confetti-piece { position: fixed; border-radius: 3px;
                      animation: confettiFall 1.4s linear forwards; z-index: 200; pointer-events: none; }
    @keyframes confettiFall {
      0%   { transform: translateY(-20px) rotate(0deg)   scale(1);   opacity: 1; }
      100% { transform: translateY(105vh) rotate(720deg) scale(.5);  opacity: 0; }
    }

    /* ═══════════════════════════════════════════
       SCREEN 7 — PRICING
    ═══════════════════════════════════════════ */
    #screen-pricing { padding: 0; }
    .pricing-header { background: linear-gradient(135deg, var(--purple), var(--blue));
                      padding: 40px 24px 32px; text-align: center; color: #fff; }
    .pricing-header h1 { font-size: 1.8rem; font-weight: 900; margin-bottom: 8px; }
    .pricing-header p  { opacity: .9; font-size: 1rem; }
    .pricing-body { padding: 20px 16px 32px; flex: 1; overflow-y: auto; }
    .pricing-cards { display: flex; flex-direction: column; gap: 16px; }
    .pricing-card { background: var(--white); border-radius: var(--radius); padding: 24px;
                    box-shadow: var(--shadow-card); border: 3px solid transparent; position: relative; }
    .pricing-card.featured { border-color: var(--purple); box-shadow: var(--shadow); }
    .pricing-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
                     background: var(--purple); color: #fff; border-radius: 999px; padding: 4px 16px;
                     font-size: 0.78rem; font-weight: 800; white-space: nowrap; }
    .pricing-plan  { font-size: 1.1rem; font-weight: 800; margin-bottom: 4px; }
    .pricing-price { font-size: 2rem; font-weight: 900; color: var(--purple); }
    .pricing-price span { font-size: 0.9rem; font-weight: 600; color: var(--muted); }
    .pricing-features { list-style: none; margin: 16px 0; display: flex; flex-direction: column; gap: 8px; }
    .pricing-features li { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
    .pricing-features li::before { content: '✓'; background: var(--green); color: #fff;
                                    border-radius: 50%; width: 20px; height: 20px; display: flex;
                                    align-items: center; justify-content: center; font-size: 0.7rem;
                                    font-weight: 800; flex-shrink: 0; }
    .pricing-features li.no::before { content: '✗'; background: #E5E7EB; color: var(--muted); }
    .manage-sub-btn { background: var(--purple-light); color: var(--purple); border: none; border-radius: 999px;
                      padding: 10px 20px; font-weight: 700; cursor: pointer; font-size: 0.875rem; }

    /* Math card — chiffres décoratifs en filigrane */
    .math-bg {
      position: absolute; inset: 0; overflow: hidden;
      pointer-events: none; border-radius: inherit; z-index: 0;
    }
    .math-bg span {
      position: absolute; font-weight: 900; color: var(--c, #047857);
      font-family: 'Courier New', monospace; user-select: none; line-height: 1;
    }
    .subject-card > *:not(.math-bg) { position: relative; z-index: 1; }

    /* ═══════════════════════════════════════════
       SCREEN — DASHBOARD PARENTAL
    ═══════════════════════════════════════════ */
    .dash-child { background:var(--white); border-radius:var(--radius); padding:20px; box-shadow:var(--shadow-card); margin-bottom:16px; border:1px solid rgba(124,58,237,.07); }
    .dash-child-header { display:flex; align-items:center; gap:12px; margin-bottom:16px; }
    .dash-avatar { font-size:2.8rem; }
    .dash-child-name { font-size:1.15rem; font-weight:900; }
    .dash-child-age  { font-size:0.78rem; color:var(--muted); margin-top:2px; }
    .stat-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:14px; }
    .stat-box  { background:#F8F7FF; border-radius:var(--radius-sm); padding:12px; text-align:center; }
    .stat-val  { font-size:1.5rem; font-weight:900; color:var(--purple); line-height:1; }
    .stat-lbl  { font-size:0.7rem; color:var(--muted); font-weight:700; margin-top:4px; text-transform:uppercase; letter-spacing:.4px; }
    .insight-row { display:flex; gap:8px; margin-bottom:14px; flex-wrap:wrap; }
    .insight-chip { border-radius:var(--radius-sm); padding:8px 12px; font-size:0.82rem; font-weight:700; flex:1; min-width:120px; }
    .chip-green { background:var(--green-light); color:#065F46; }
    .chip-orange{ background:var(--orange-light); color:#92400E; }
    /* Mini bar chart */
    .mini-chart { display:flex; align-items:flex-end; gap:4px; height:44px; margin-bottom:4px; }
    .mini-bar-wrap { flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; height:100%; justify-content:flex-end; }
    .mini-bar { width:100%; border-radius:4px 4px 0 0; background:var(--purple); min-height:2px; transition:height .4s; }
    .mini-bar-lbl { font-size:0.55rem; color:var(--muted); font-weight:700; }

    /* ═══════════════════════════════════════════
       SCREEN — ÉTUDE (Fiches + Q&A)
    ═══════════════════════════════════════════ */
    .study-tabs { display:flex; background:#F3F4F6; border-radius:var(--radius-sm); padding:4px; margin-bottom:20px; }
    .study-tab  { flex:1; padding:10px; border:none; background:transparent; border-radius:10px; font-weight:700; cursor:pointer; transition:all .2s; color:var(--muted); font-family:inherit; }
    .study-tab.active { background:#fff; color:var(--purple); box-shadow:var(--shadow-card); }
    .fiche-section { background:var(--white); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow-card); margin-bottom:12px; border-left:5px solid var(--purple); border:1px solid rgba(124,58,237,.07); border-left-width:5px; }
    .fiche-section h3 { font-size:0.88rem; font-weight:800; margin-bottom:12px; display:flex; align-items:center; gap:8px; }
    .fiche-item { display:flex; gap:10px; align-items:flex-start; font-size:0.88rem; line-height:1.6; padding:7px 0; border-bottom:1px solid #F3F4F6; }
    .fiche-item:last-child { border-bottom:none; }
    .fiche-num  { width:22px; height:22px; border-radius:50%; background:var(--purple-light); color:var(--purple); display:flex; align-items:center; justify-content:center; font-size:0.7rem; font-weight:800; flex-shrink:0; margin-top:2px; }
    .retenir-chip  { background:var(--yellow-light); border:1.5px solid #FCD34D; border-radius:var(--radius-sm); padding:9px 12px; font-size:0.86rem; font-weight:600; margin-bottom:6px; }
    .question-chip { background:var(--blue-light); border-radius:var(--radius-sm); padding:10px 14px; font-size:0.88rem; margin-bottom:6px; border-left:3px solid var(--blue); line-height:1.5; }
    .piege-chip    { background:var(--red-light); border-radius:var(--radius-sm); padding:9px 12px; font-size:0.86rem; margin-bottom:6px; border-left:3px solid var(--red); }
    .qa-answer { background:var(--white); border-radius:var(--radius); padding:20px; box-shadow:var(--shadow-card); margin-top:16px; border-left:5px solid var(--purple); white-space:pre-wrap; font-size:0.92rem; line-height:1.75; display:none; }
    .qa-answer.show { display:block; animation:fadeIn .3s; }

    /* Correction — améliorations visuelles */
    @keyframes notePopIn { from{transform:scale(.3);opacity:0} 65%{transform:scale(1.12)} to{transform:scale(1);opacity:1} }
    .note-circle.animate { animation:notePopIn .65s cubic-bezier(.34,1.56,.64,1) both; }
    .note-gauge-wrap { width:100%; max-width:180px; background:#E5E7EB; border-radius:999px; height:10px; overflow:hidden; }
    .note-gauge-fill { height:100%; border-radius:999px; width:0%; transition:width .9s cubic-bezier(.34,1.56,.64,1); }

    /* ── Flashcards répétition espacée ── */
    .fc-wrap  { perspective:1000px; cursor:pointer; margin-bottom:20px; user-select:none; }
    .fc-inner { width:100%; min-height:210px; position:relative; transform-style:preserve-3d; transition:transform .5s cubic-bezier(.4,0,.2,1); }
    .fc-inner.flipped { transform:rotateY(180deg); }
    .fc-face  { position:absolute; inset:0; backface-visibility:hidden; -webkit-backface-visibility:hidden;
      display:flex; flex-direction:column; align-items:center; justify-content:center;
      padding:28px 24px; border-radius:var(--radius); text-align:center; }
    .fc-front { background:linear-gradient(135deg,var(--purple),var(--blue)); color:#fff;
      box-shadow:var(--shadow); }
    .fc-back  { background:var(--white); border:2px solid var(--purple-light);
      transform:rotateY(180deg); box-shadow:var(--shadow); }
    .fc-label { font-size:0.72rem; font-weight:800; opacity:.7; text-transform:uppercase;
      letter-spacing:.5px; margin-bottom:10px; }
    .fc-text  { font-size:1.1rem; font-weight:700; line-height:1.5; }
    .fc-hint  { font-size:0.78rem; opacity:.65; margin-top:12px; }
    .fc-actions { display:flex; gap:10px; }
    .fc-actions .btn { flex:1; font-size:1rem; }
    .box-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:6px; margin-bottom:16px; }
    .box-cell { background:var(--white); border-radius:var(--radius-sm); padding:10px 6px;
      text-align:center; box-shadow:var(--shadow-card); border-top:3px solid var(--purple); }
    .box-cell-n   { font-size:1.4rem; font-weight:900; color:var(--purple); line-height:1; }
    .box-cell-lbl { font-size:0.6rem; color:var(--muted); font-weight:700; margin-top:3px; }
    .fc-progress  { display:flex; justify-content:space-between; align-items:center;
      font-size:0.82rem; color:var(--muted); font-weight:700; margin-bottom:8px; }

    /* Contrôle blanc */
    .controle-timer { font-size:2.2rem; font-weight:900; color:var(--purple); text-align:center;
      background:var(--purple-light); border-radius:var(--radius); padding:12px; margin-bottom:16px; letter-spacing:2px; }
    .controle-timer.urgent { color:var(--red); background:var(--red-light); animation:pulse 1s ease-in-out infinite; }
    @keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.6} }
    .controle-q-card { background:var(--white); border-radius:var(--radius); padding:18px; margin-bottom:12px;
      box-shadow:var(--shadow-card); border:1px solid rgba(124,58,237,.07); }
    .controle-q-num { font-size:0.72rem; font-weight:800; color:var(--muted); text-transform:uppercase;
      letter-spacing:.5px; margin-bottom:8px; }
    .controle-q-text { font-size:1rem; font-weight:700; line-height:1.5; margin-bottom:14px; }
    .controle-options { display:flex; flex-direction:column; gap:8px; }
    .controle-opt { display:flex; align-items:center; gap:10px; padding:10px 14px; border-radius:12px;
      border:2px solid #E5E7EB; cursor:pointer; font-size:0.9rem; transition:all .15s; background:var(--white); width:100%; text-align:left; font-family:inherit; font-weight:600; }
    .controle-opt:hover { border-color:var(--purple); background:var(--purple-light); }
    .controle-opt.selected { border-color:var(--purple); background:var(--purple-light); }
    .controle-opt.correct  { border-color:var(--green);  background:var(--green-light); }
    .controle-opt.wrong    { border-color:var(--red);    background:var(--red-light); }
    .opt-letter { width:26px;height:26px;border-radius:50%;background:#F3F4F6;display:flex;
      align-items:center;justify-content:center;font-weight:800;font-size:0.78rem;flex-shrink:0; }
    .score-circle { width:110px;height:110px;border-radius:50%;border:6px solid var(--green);
      display:flex;flex-direction:column;align-items:center;justify-content:center;
      margin:0 auto 12px;background:var(--white);box-shadow:var(--shadow); }
    /* Plan de révision */
    .plan-day { background:var(--white);border-radius:var(--radius);padding:16px 18px;
      margin-bottom:10px;box-shadow:var(--shadow-card);border-left:5px solid var(--purple); }
    .plan-day.legere   { border-left-color:var(--green); }
    .plan-day.moderee  { border-left-color:var(--yellow); }
    .plan-day.intense  { border-left-color:var(--red); }
    .plan-day.repos    { border-left-color:#E5E7EB; background:#F8F7FF; }
    .plan-day-header { display:flex;align-items:center;justify-content:space-between;margin-bottom:8px; }
    .plan-day-date { font-weight:800;font-size:0.9rem; }
    .plan-day-badge { font-size:0.72rem;font-weight:800;border-radius:999px;padding:3px 10px; }
    .badge-legere  { background:var(--green-light);  color:var(--green); }
    .badge-moderee { background:var(--yellow-light); color:#92400E; }
    .badge-intense { background:var(--red-light);    color:var(--red); }
    .badge-repos   { background:#F3F4F6;             color:var(--muted); }
    .plan-task { font-size:0.86rem;padding:4px 0;border-bottom:1px solid #F3F4F6;display:flex;gap:8px; }
    .plan-task:last-child { border-bottom:none; }
    /* Difficulty selector */
    .diff-row { display:flex;gap:6px;align-items:center;margin-top:6px; }
    .diff-btn { width:28px;height:28px;border-radius:50%;border:2px solid #E5E7EB;
      background:#fff;cursor:pointer;font-weight:800;font-size:0.78rem;transition:all .15s; }
    .diff-btn.active { border-color:var(--purple);background:var(--purple);color:#fff; }
    .subject-add-row { display:flex;gap:8px;margin-bottom:12px; }

    /* ═══════════════════════════════════════════
       SCREEN — RÉDACTION
    ═══════════════════════════════════════════ */
    textarea {
      padding: 14px 16px; border: 2px solid transparent; border-radius: var(--radius-sm);
      font-size: 0.95rem; color: var(--text); background: #F6F6FB; width: 100%;
      min-height: 200px; resize: vertical; font-family: inherit; line-height: 1.6; transition: border .2s;
    }
    textarea:focus { outline: none; border-color: var(--purple); background: #fff; box-shadow: 0 0 0 4px rgba(124,58,237,.14); }
    .char-count { font-size: 0.75rem; color: var(--muted); text-align: right; margin-top: 4px; }
    .note-display { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 0 16px; }
    .note-circle {
      width: 100px; height: 100px; border-radius: 50%; border: 6px solid var(--green);
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      background: var(--white); box-shadow: var(--shadow); transition: border-color .4s;
    }
    .note-num   { font-size: 2.4rem; font-weight: 900; color: var(--text); line-height: 1; }
    .note-denom { font-size: 0.8rem; color: var(--muted); font-weight: 700; }
    .mention-badge { border-radius: 999px; padding: 6px 22px; font-weight: 800; font-size: 0.95rem; }
    .correction-section {
      background: var(--white); border-radius: var(--radius); padding: 18px;
      box-shadow: var(--shadow-card); margin-bottom: 12px; border: 1px solid rgba(124,58,237,.07);
    }
    .correction-section h3 { font-size: 0.9rem; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
    .correction-list { display: flex; flex-direction: column; gap: 8px; }
    .correction-item { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; line-height: 1.5; }
    .correction-dot { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 800; margin-top: 1px; }
    .dot-green  { background: var(--green-light);  color: var(--green); }
    .dot-orange { background: var(--orange-light); color: var(--orange); }
    .erreur-card { background: var(--red-light); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 8px; border-left: 4px solid var(--red); }
    .erreur-type       { font-size: 0.72rem; font-weight: 800; color: var(--red); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
    .erreur-extrait    { font-style: italic; color: var(--red); text-decoration: line-through; font-size: 0.88rem; }
    .erreur-correction { color: var(--green); font-weight: 700; font-size: 0.88rem; margin-top: 3px; }
    .erreur-explication{ color: var(--muted); font-size: 0.82rem; margin-top: 4px; line-height: 1.5; }

    /* Responsive */
    @media (min-width: 480px) {
      .profiles-grid { grid-template-columns: repeat(3, 1fr); }
      .avatar-grid   { grid-template-columns: repeat(6, 1fr); }
    }
    @media (min-width: 600px) {
      .subjects-grid { grid-template-columns: repeat(3, 1fr); }
    }

    /* ═══════════════════════════════════════════
       ✨ JOYFUL UI — vivacité, couleurs, mouvement
    ═══════════════════════════════════════════ */
    @keyframes gradientShift { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
    @keyframes floaty        { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
    @keyframes floatySlow    { 0%,100%{transform:translateY(0) rotate(0)} 50%{transform:translateY(-12px) rotate(6deg)} }
    @keyframes wiggle        { 0%,100%{transform:rotate(0)} 25%{transform:rotate(-13deg)} 75%{transform:rotate(13deg)} }
    @keyframes cardIn        { from{opacity:0;transform:translateY(18px) scale(.95)} to{opacity:1;transform:translateY(0) scale(1)} }
    @keyframes pulseGlow     { 0%,100%{box-shadow:0 4px 14px rgba(245,158,11,.45)} 50%{box-shadow:0 8px 30px rgba(245,158,11,.85)} }
    @keyframes shine         { 0%{transform:translateX(-130%)} 60%,100%{transform:translateX(240%)} }

    /* Dégradés animés sur tous les grands en-têtes */
    #screen-landing, .auth-header, .profiles-header, .home-header, .pricing-header {
      background: linear-gradient(120deg, #047857, #059669, #0D9488, #14B8A6, #0EA5E9) !important;
      background-size: 300% 300% !important;
      animation: gradientShift 15s ease infinite;
    }

    /* Logo & titre plus présents */
    .landing-logo  { filter: drop-shadow(0 10px 18px rgba(0,0,0,.28)); }
    .landing-title { text-shadow: 0 4px 18px rgba(0,0,0,.20); letter-spacing:.5px; }
    .landing-sub   { animation: floaty 4s ease-in-out infinite; }

    /* Emojis flottants décoratifs (landing) */
    .float-emojis { position:absolute; inset:0; overflow:hidden; pointer-events:none; z-index:0; }
    .float-emojis span { position:absolute; font-size:2rem; opacity:.35;
      animation: floatySlow 7s ease-in-out infinite; filter: drop-shadow(0 4px 8px rgba(0,0,0,.2)); }
    #screen-landing > *:not(.float-emojis):not(.stars) { position:relative; z-index:1; }

    /* Pills d'accueil — flottent en cascade + réagissent */
    .feature-pill { animation: floaty 5s ease-in-out infinite; transition: transform .2s, background .2s; }
    .feature-pill:nth-child(2){animation-delay:.4s}  .feature-pill:nth-child(3){animation-delay:.8s}
    .feature-pill:nth-child(4){animation-delay:1.2s} .feature-pill:nth-child(5){animation-delay:1.6s}
    .feature-pill:nth-child(6){animation-delay:2s}
    .feature-pill:hover { transform: translateY(-3px) scale(1.05); background: rgba(255,255,255,.28); }

    /* CTA principal — halo pulsé ; boutons colorés — reflet brillant */
    .btn-yellow.btn-lg { animation: pulseGlow 2.4s ease-in-out infinite; }
    .btn-primary, .btn-yellow { position: relative; overflow: hidden; }
    .btn-primary::after, .btn-yellow::after {
      content:''; position:absolute; top:0; left:0; width:35%; height:100%;
      background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
      transform: translateX(-130%); animation: shine 4s ease-in-out infinite;
    }

    /* Cartes matières — style épuré et professionnel */
    .subject-card {
      background: #fff !important;
      border: 1px solid #ECE9F3 !important;
      border-top: 3px solid var(--c, #059669) !important;
      border-radius: 14px !important;
      padding: 15px !important;
      gap: 9px !important;
      box-shadow: 0 1px 3px rgba(16,24,40,.06) !important;
      animation: cardIn .4s both;
    }
    .subject-card::after { display: none !important; }
    .subject-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 10px 24px rgba(16,24,40,.10);
      border-color: color-mix(in srgb, var(--c,#059669) 32%, #ECE9F3) !important;
    }
    .subject-card:hover .subject-icon { animation: none; }
    .subject-icon {
      font-size: 1.45rem; line-height: 1; filter: none;
      width: 44px; height: 44px; border-radius: 11px;
      display: inline-flex; align-items: center; justify-content: center;
      background: color-mix(in srgb, var(--c,#059669) 12%, #fff);
    }
    .subject-name  { font-weight: 800; font-size: 0.92rem; color: var(--text); }
    .subject-level { font-size: 0.74rem; color: var(--muted); }
    .subj-lv-chip  { font-size: 0.64rem !important; font-weight: 800; }

    /* Profils — avatars qui flottent, cartes qui entrent */
    .profile-card { animation: cardIn .5s both; }
    .profile-card:nth-child(2){animation-delay:.06s} .profile-card:nth-child(3){animation-delay:.12s}
    .profile-card:nth-child(4){animation-delay:.18s} .profile-card:nth-child(5){animation-delay:.24s}
    .profile-card .avatar { display:inline-block; animation: floatySlow 4s ease-in-out infinite; }
    .profile-card:nth-child(2) .avatar{animation-delay:.5s} .profile-card:nth-child(3) .avatar{animation-delay:1s}
    .profile-card:hover { box-shadow: 0 14px 28px rgba(124,58,237,.30); }

    /* Barres XP / progression — reflet qui glisse */
    .xp-bar-fill, .exercise-progress-fill { position: relative; overflow: hidden; }
    .xp-bar-fill::after, .exercise-progress-fill::after {
      content:''; position:absolute; top:0; bottom:0; left:0; width:55%;
      background: linear-gradient(100deg, transparent, rgba(255,255,255,.6), transparent);
      transform: translateX(-130%); animation: shine 3s ease-in-out infinite;
    }

    /* Stats accueil + badges + réponses — micro-interactions vivantes */
    .home-stat  { transition: transform .2s; }
    .home-stat:hover { transform: scale(1.08); }
    .badge-chip { transition: transform .2s; }
    .badge-chip:hover { transform: translateY(-2px) scale(1.06); }
    .answer-btn { transition: all .2s cubic-bezier(.34,1.56,.64,1); }
    .answer-btn:hover:not(:disabled) { transform: translateX(5px) scale(1.015); }
    .nav-item.active .icon { animation: floaty 1.6s ease-in-out infinite; }

    /* Accessibilité — calmer les animations si l'utilisateur le demande */
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { animation-duration:.001s !important; animation-iteration-count:1 !important; }
    }

    /* ═══════════════════════════════════════════
       🪟 MODERN UI — typo, glassmorphism, profondeur
    ═══════════════════════════════════════════ */
    :root {
      --radius: 24px; --radius-sm: 16px;
      --shadow:      0 14px 34px -10px rgba(80,40,160,.30), 0 2px 8px rgba(80,40,160,.08);
      --shadow-card: 0 8px 24px -8px rgba(30,27,75,.14), 0 1px 3px rgba(30,27,75,.05);
    }
    html, body {
      font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
      -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    }
    body {
      background:
        radial-gradient(1100px 560px at 100% -8%, rgba(124,58,237,.07), transparent 60%),
        radial-gradient(900px 500px at -8% 108%, rgba(14,165,233,.07), transparent 60%),
        var(--bg);
      background-attachment: fixed;
    }
    .landing-title, .home-name, .section-title, .result-title, .auth-header h1 { letter-spacing:-.6px; }

    /* Barre du haut — verre dépoli */
    .topbar {
      background: rgba(255,255,255,.78);
      backdrop-filter: blur(16px) saturate(170%); -webkit-backdrop-filter: blur(16px) saturate(170%);
      border-bottom: 1px solid rgba(124,58,237,.08); box-shadow: 0 4px 18px -10px rgba(30,27,75,.25);
    }

    /* Cartes — bord net translucide + profondeur douce */
    .card, .daily-bar-card, .subject-card, .profile-card, .pricing-card { border: 1px solid rgba(124,58,237,.07); }

    /* Stats d'accueil — pastilles en verre sur le dégradé */
    .home-stat {
      background: rgba(255,255,255,.20); border: 1px solid rgba(255,255,255,.40);
      backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    }

    /* Champs de formulaire modernes */
    input, select { background: #F6F6FB; border: 2px solid transparent; border-radius: 14px; font-family: inherit; }
    input:focus, select:focus { background: #fff; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(124,58,237,.14); }

    /* Boutons — ombres colorées plus douces */
    .btn { font-family: inherit; letter-spacing:.2px; }
    .btn-primary { box-shadow: 0 10px 22px -8px rgba(124,58,237,.55); }
    .btn-yellow  { box-shadow: 0 10px 22px -8px rgba(245,158,11,.55); }

    /* Navigation du bas — verre dépoli flottant */
    .bottom-nav {
      background: rgba(255,255,255,.85);
      backdrop-filter: blur(18px) saturate(170%); -webkit-backdrop-filter: blur(18px) saturate(170%);
      border-top: 1px solid rgba(124,58,237,.10); border-radius: 22px 22px 0 0;
      box-shadow: 0 -8px 30px -12px rgba(30,27,75,.30);
    }
    .nav-item.active .icon { filter: drop-shadow(0 4px 8px rgba(124,58,237,.40)); }

    /* Réponses & profils — coins plus doux, modernes */
    .answer-btn { border-radius: 18px; }
    .profile-card, .add-profile-card { border-radius: 22px; }

    /* 🌍 Carte du monde en filigrane (arrière-plan global, fixe) */
    body::before {
      content:''; position: fixed; inset:0; z-index:0; pointer-events:none;
      background: url('/world-map.svg') center 42% / contain no-repeat;
      opacity:.25;
    }
    #app { position: relative; z-index: 1; }
    /* En-têtes en dégradé : laisser entrevoir la carte par transparence */
    .home-header, .profiles-header, .auth-header, .pricing-header { position: relative; }

    /* ═══════════════════════════════════════════
       🆕 LANDING PAGE REDESIGN
    ═══════════════════════════════════════════ */
    #screen-landing {
      overflow-y: auto !important; align-items: stretch !important;
      justify-content: flex-start !important; text-align: left;
      padding: 0 !important; background: none !important; animation: none !important;
      color: var(--text); /* annule le color:#fff hérité de la règle landing d'origine — sinon texte blanc sur sections blanches */
    }

    /* Navbar */
    .lnav { display:flex; align-items:center; justify-content:space-between;
      padding:16px 20px; position:absolute; top:0; left:0; right:0; z-index:10; }
    .lnav-logo { display:flex; align-items:center; gap:8px; font-weight:900; font-size:1.15rem; color:#047857; }
    .lnav-logo span { font-size:1.6rem; }
    .lnav-btn { background:#fff; color:#047857; border:1.5px solid #A7E3C9;
      border-radius:999px; padding:8px 18px; font-weight:700; font-size:0.875rem; cursor:pointer;
      transition:all .2s; }
    .lnav-btn:hover { background:#E9F9F1; }

    /* Hero — émeraude aéré : fond blanc lumineux, teintes menthe/soleil, confettis pastel */
    .hero { background:
        radial-gradient(circle at 12% 78%, #93C5FD 0 7px, transparent 8px),
        radial-gradient(circle at 86% 24%, #FCA5A5 0 5px, transparent 6px),
        radial-gradient(circle at 74% 88%, #FDE68A 0 6px, transparent 7px),
        radial-gradient(circle at 22% 14%, #C4B5FD 0 5px, transparent 6px),
        radial-gradient(circle at 80% 6%, #FEF6DE 0%, transparent 42%),
        radial-gradient(circle at 10% 95%, #E9F9F1 0%, #FFFFFF 62%);
      background-color:#fff;
      padding:88px 24px 56px; position:relative; overflow:hidden; color:#123B2E; }
    .hero::before { content:''; position:absolute; width:110px; height:110px; border-radius:50%;
      left:-30px; top:34px; background:#FDE68A; opacity:.4; pointer-events:none; }
    .hero::after { content:''; position:absolute; width:76px; height:76px; border-radius:50%;
      right:-20px; top:130px; background:#FBCFE8; opacity:.45; pointer-events:none; }
    .hero > * { position:relative; z-index:1; }
    .hero-badge { display:inline-flex; align-items:center; gap:6px; background:#FEF3C7;
      border:1px solid #FDE68A; color:#92400E; border-radius:999px; padding:5px 14px;
      font-size:0.78rem; font-weight:700; margin-bottom:18px; }
    .hero-title { font-size:2.2rem; font-weight:900; line-height:1.15; margin-bottom:14px;
      letter-spacing:-.5px; color:#123B2E; }
    .hero-title .accent { color:#059669; }
    .hero-desc { font-size:1rem; color:#4E6B5F; line-height:1.6; margin-bottom:28px; max-width:380px; }
    .hero-ctas { display:flex; flex-direction:column; gap:10px; max-width:320px; margin-bottom:24px; }
    .hero-ctas .btn-outline { border-color:#059669; color:#047857; }
    .hero-trust { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:32px; }
    .trust-item { font-size:0.78rem; font-weight:700; color:#4E6B5F; display:flex; align-items:center; gap:4px; }

    /* Phone mockup */
    .hero-phone { display:flex; justify-content:center; margin-top:8px; }
    .phone-outer { width:200px; background:#10291F; border-radius:32px; padding:10px;
      box-shadow:0 24px 48px rgba(6,78,59,.30), 0 0 0 1px rgba(5,150,105,.15); }
    .phone-inner { background:#F7FCF9; border-radius:24px; overflow:hidden; }
    .phone-top { background:linear-gradient(135deg,#059669,#14B8A6); padding:10px 12px 6px; color:#fff; }
    .phone-hi { font-size:0.6rem; opacity:.8; font-weight:700; }
    .phone-name { font-size:0.82rem; font-weight:900; }
    .phone-stats-row { display:flex; gap:5px; margin-top:5px; }
    .phone-stat-chip { background:rgba(255,255,255,.2); border-radius:999px; padding:2px 7px;
      font-size:0.55rem; font-weight:700; }
    .phone-body { padding:8px; }
    .phone-section { font-size:0.6rem; font-weight:800; color:#6B7280; margin:6px 0 4px; }
    .phone-subjects { display:grid; grid-template-columns:1fr 1fr; gap:4px; }
    .phone-subject { border-radius:8px; padding:6px 7px; font-size:0.58rem; font-weight:800;
      color:#fff; display:flex; align-items:center; gap:4px;
      background:linear-gradient(135deg,var(--sc,#059669),color-mix(in srgb,var(--sc,#059669) 70%,#000)); }

    /* Typographie landing — Poppins pour les titres (géométrique, arrondis doux) */
    .hero-title, .lsection-title, .lsubjects-title, .excl-title,
    .lprice-name, .lprice-price, .lnav-logo {
      font-family: 'Poppins', 'Inter', 'Segoe UI', sans-serif;
    }

    /* Micro-interactions landing — tout glisse, rien ne saute */
    .btn { transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
    .btn:hover { transform: translateY(-2px); }
    .btn:active { transform: translateY(0); }
    .feat-card, .lprice-card, .excl-card { transition: transform .22s ease, box-shadow .22s ease; }
    .feat-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(6,78,59,.10); }
    .lprice-card:hover { transform: translateY(-3px); }
    .lsubj { transition: transform .18s ease; }
    .lsubj:hover { transform: translateY(-2px) scale(1.04); }
    /* Entrée du héros en fondu doux, décalé élément par élément */
    @keyframes heroRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
    .hero-badge  { animation: heroRise .55s ease both .05s; }
    .hero-title  { animation: heroRise .55s ease both .15s; }
    .hero-desc   { animation: heroRise .55s ease both .25s; }
    .hero-ctas   { animation: heroRise .55s ease both .35s; }
    .hero-trust  { animation: heroRise .55s ease both .45s; }
    .hero-phone  { animation: heroRise .65s ease both .5s; }
    @media (prefers-reduced-motion: reduce) {
      .hero-badge, .hero-title, .hero-desc, .hero-ctas, .hero-trust, .hero-phone { animation: none; }
      .btn, .feat-card, .lprice-card, .excl-card, .lsubj { transition: none; }
    }

    /* Matières multicolores sur la landing — la gamification visible d'entrée */
    .lsubjects-strip { background:#fff; padding:26px 20px 34px; }
    .lsubjects-title { text-align:center; font-weight:900; font-size:1.05rem; color:#065F46; margin-bottom:14px; }
    .lsubjects { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; max-width:560px; margin:0 auto; }
    .lsubj { font-size:0.78rem; font-weight:700; padding:7px 14px; border-radius:999px; color:#fff; }

    /* Features section — espacement généreux (design aéré) */
    .lsection { padding:64px 20px; }
    .lsection-white { background:#fff; }
    .lsection-soft  { background:#F0FAF5; }
    .lsection-dark  { background:linear-gradient(135deg,#064E3B,#0B5E4A); color:#fff; }
    .lsection-title { font-size:1.4rem; font-weight:900; text-align:center; margin-bottom:6px; letter-spacing:-.4px; }
    .lsection-sub   { font-size:0.9rem; color:var(--muted); text-align:center; margin-bottom:28px; line-height:1.5; }
    .lsection-dark .lsection-sub { color:rgba(255,255,255,.7); }

    .feat-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
    .feat-card { background:#fff; border-radius:var(--radius); padding:18px 14px;
      box-shadow:var(--shadow-card); border:1px solid rgba(5,150,105,.12); }
    .lsection-soft .feat-card { background:#fff; }
    .feat-icon { font-size:1.8rem; margin-bottom:8px; }
    .feat-name { font-weight:800; font-size:0.9rem; margin-bottom:4px; }
    .feat-desc { font-size:0.78rem; color:var(--muted); line-height:1.5; }

    /* Exclusive features */
    .excl-card { background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.2);
      border-radius:var(--radius); padding:20px 16px; margin-bottom:12px; backdrop-filter:blur(8px); }
    .excl-badge { display:inline-block; background:#FCD34D; color:#78350F; border-radius:999px;
      padding:2px 10px; font-size:0.68rem; font-weight:800; margin-bottom:8px; }
    .excl-title { font-weight:800; font-size:1rem; color:#fff; margin-bottom:4px; }
    .excl-desc  { font-size:0.82rem; color:rgba(255,255,255,.75); line-height:1.5; }

    /* Pricing landing */
    .lprice-grid { display:flex; flex-direction:column; gap:12px; }
    .lprice-card { background:#fff; border-radius:var(--radius); padding:22px; box-shadow:var(--shadow-card);
      border:2px solid transparent; }
    .lprice-card.popular { border-color:#059669; box-shadow:0 4px 20px rgba(5,150,105,.18); position:relative; }
    .lprice-pop-badge { position:absolute; top:-11px; left:50%; transform:translateX(-50%);
      background:#059669; color:#fff; border-radius:999px; padding:3px 14px;
      font-size:0.72rem; font-weight:800; white-space:nowrap; }
    .lprice-name  { font-weight:800; font-size:1rem; margin-bottom:2px; }
    .lprice-price { font-size:1.8rem; font-weight:900; color:#047857; }
    .lprice-price span { font-size:0.85rem; font-weight:600; color:var(--muted); }
    .lprice-list  { margin:12px 0; display:flex; flex-direction:column; gap:6px; }
    .lprice-item  { font-size:0.84rem; display:flex; align-items:center; gap:8px; }
    .lprice-card .btn-primary { background:#059669; box-shadow:0 4px 14px rgba(5,150,105,.35); }
    .lprice-card .btn-primary:hover { background:#047857; }
    .lprice-card .btn-outline { color:#047857; border-color:#059669; }
    .lprice-item::before { content:'✓'; color:var(--green); font-weight:800; flex-shrink:0; }
    .lprice-item.no::before { content:'✗'; color:#D1D5DB; }
    .lprice-item.no { color:var(--muted); }

    /* Comparatif concurrents */
    .cmp-wrap  { overflow-x:auto; -webkit-overflow-scrolling:touch;
      margin:0 -20px; padding:0 20px 6px; }
    .cmp-table { border-collapse:separate; border-spacing:0; width:100%; min-width:600px;
      font-size:0.8rem; background:#fff; border-radius:var(--radius-sm);
      box-shadow:var(--shadow-card); overflow:hidden; }
    .cmp-table th, .cmp-table td { padding:10px 9px; text-align:center;
      border-bottom:1px solid #F0EEF8; }
    .cmp-table tbody tr:last-child td { border-bottom:none; }
    .cmp-table th:first-child, .cmp-table td:first-child { text-align:left;
      position:sticky; left:0; background:#fff; z-index:1; min-width:155px;
      font-weight:700; box-shadow:2px 0 4px rgba(30,27,75,.05); }
    .cmp-table thead th { font-weight:800; font-size:0.76rem; background:#FAF9FF;
      white-space:nowrap; }
    .cmp-table thead th:first-child { background:#FAF9FF; }
    .cmp-table td.cmp-us { background:#E3F7ED; color:#065F46; font-weight:800; }
    .cmp-table thead th.cmp-us { background:#059669; color:#fff; }
    .cmp-yes  { color:var(--green); font-weight:900; }
    .cmp-no   { color:#D1D5DB; font-weight:700; }
    .cmp-dash { color:#C7C3D9; }
    .cmp-note { font-size:0.7rem; color:var(--muted); text-align:center;
      margin-top:10px; line-height:1.5; }

    @media(min-width:480px) {
      .feat-grid { grid-template-columns: repeat(3,1fr); }
      .hero-title { font-size:2.6rem; }
      .lprice-grid { flex-direction:row; }
      .lprice-card { flex:1; }
    }

    /* ═══════════════════════════════════════════
       🏠 HOME — améliorations visuelles
    ═══════════════════════════════════════════ */
    /* En-tête — ligne info en bas */
    .home-motivate { font-size:0.8rem; opacity:.8; margin-top:4px; font-weight:600; position:relative; }

    /* Cards matières — top row avec badge niveau */
    .subj-top-row { display:flex; align-items:center; justify-content:space-between; width:100%; }
    .subj-lv-chip { font-size:0.65rem; font-weight:800; border-radius:999px; padding:2px 8px;
      white-space:nowrap; position:relative; z-index:1; }

    /* Daily bar card — look amélioré */
    .daily-bar-card { border-left:4px solid var(--green); }
    .daily-title    { font-size:0.85rem; font-weight:800; color:var(--text); }
    .daily-motivate { font-size:0.75rem; color:var(--muted); margin-top:2px; }
    .daily-counter  { font-size:1.4rem; font-weight:900; color:var(--green); line-height:1; }

    /* Section titre — plus affirmé */
    .section-title { font-size:1rem; font-weight:800; margin:18px 0 10px;
      display:flex; align-items:center; gap:6px; }
    .section-title::before { content:''; display:block; width:3px; height:18px;
      background:var(--purple); border-radius:999px; }

    /* ═══════════════════════════════════════════
       RAFFINEMENT PROFESSIONNEL — surcouche globale
       (Profils · Étude · Rédaction · Premium · auth)
       ═══════════════════════════════════════════ */
    :root{ --line:#ECE9F3; --shadow-soft:0 1px 3px rgba(16,24,40,.06);
           --shadow-soft-lg:0 10px 24px rgba(16,24,40,.10); }

    /* Cartes — fond blanc, bordure fine, ombre neutre douce */
    .card, .pricing-card, .fiche-section, .daily-bar-card,
    .profile-card, .add-profile-card {
      border:1px solid var(--line) !important;
      box-shadow:var(--shadow-soft) !important;
      border-radius:16px !important;
    }
    .fiche-section { border-left:3px solid var(--purple) !important; }
    .daily-bar-card{ border-left:3px solid var(--green) !important; }
    .pricing-card.featured{ border-color:var(--purple) !important; box-shadow:var(--shadow-soft-lg) !important; }

    /* En-têtes — dégradé violet premium unifié */
    .auth-header, .profiles-header, .pricing-header {
      background:linear-gradient(135deg,#065F46 0%,#047857 60%,#059669 100%) !important;
    }

    /* Boutons — ombres adoucies, fin des effets gadget */
    .btn-primary{ box-shadow:0 2px 8px rgba(124,58,237,.28) !important; }
    .btn-yellow { box-shadow:0 2px 8px rgba(245,158,11,.28) !important; }
    .btn-primary::after, .btn-yellow::after{ display:none !important; } /* retire le reflet animé */
    .btn-yellow.btn-lg{ animation:none !important; }                    /* retire le pulse */
    .btn-outline{ border-width:2px !important; }

    /* Profils — survol sobre, fin des animations flottantes */
    .profile-card, .profile-card .avatar{ animation:none !important; }
    .profile-card:hover{
      transform:translateY(-3px) !important;
      box-shadow:var(--shadow-soft-lg) !important;
      border-color:color-mix(in srgb, var(--purple) 30%, var(--line)) !important;
    }

    /* Onglets Étude — état actif plus net */
    .study-tab.active{ box-shadow:var(--shadow-soft) !important; border:1px solid var(--line) !important; }

    /* Champs de formulaire — bordure & focus cohérents */
    .form-group input, .form-group select, .form-group textarea{
      border:1px solid #E2DFEC; border-radius:10px;
    }
    .form-group input:focus, .form-group select:focus, .form-group textarea:focus{
      outline:none; border-color:var(--purple); box-shadow:0 0 0 3px rgba(124,58,237,.12);
    }
  
    /* ═══════════════════════════════════════════
       BANNIÈRE « INSTALLER SUR IPHONE » (PWA iOS)
    ═══════════════════════════════════════════ */
    .ios-hint { position:fixed; left:12px; right:12px; bottom:14px; z-index:1200;
      max-width:440px; margin:0 auto; display:flex; align-items:center; gap:12px;
      background:#fff; color:var(--text); border-radius:18px; padding:12px 14px;
      box-shadow:0 12px 36px rgba(30,27,75,.28), 0 0 0 1px rgba(124,58,237,.12);
      animation: iosHintUp .45s cubic-bezier(.2,.9,.3,1.15);
      padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
    .ios-hint.out { transition:transform .3s ease, opacity .3s ease;
      transform:translateY(120%); opacity:0; }
    .ios-hint-icon { width:42px; height:42px; border-radius:11px; flex-shrink:0;
      box-shadow:0 2px 8px rgba(30,27,75,.18); }
    .ios-hint-txt { flex:1; min-width:0; line-height:1.35; }
    .ios-hint-txt strong { display:block; font-size:0.9rem; font-weight:800; }
    .ios-hint-txt span { font-size:0.78rem; color:var(--muted); }
    .ios-hint-txt svg { color:#0A84FF; }
    .ios-hint-close { flex-shrink:0; background:#F3F0FF; border:none; cursor:pointer;
      width:30px; height:30px; border-radius:50%; font-size:0.85rem; font-weight:700;
      color:var(--muted); display:flex; align-items:center; justify-content:center; }
    @keyframes iosHintUp { from { transform:translateY(130%); opacity:0; }
      to { transform:translateY(0); opacity:1; } }

    /* ═══════════════════════════════════════════
       🎲 Formats d'exercices : vrai/faux, saisie, ordre
    ═══════════════════════════════════════════ */
    .ex-format-tag { font-size:0.75rem; font-weight:800; letter-spacing:0.5px;
      text-transform:uppercase; color:var(--muted); text-align:center; margin-bottom:2px; }

    /* Vrai / Faux */
    .vf-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
    .answer-vf { justify-content:center; font-weight:800; font-size:1.05rem; padding:20px 12px; }
    .answer-vf:hover:not(:disabled) { transform:none; }
    .vf-vrai:hover:not(:disabled) { border-color:var(--green); background:var(--green-light); }
    .vf-faux:hover:not(:disabled) { border-color:var(--red); background:var(--red-light); }

    /* Réponse à saisir */
    .saisie-row { display:flex; gap:8px; }
    .saisie-input { flex:1; min-width:0; padding:14px 16px; border:2.5px solid #E5E7EB;
      border-radius:16px; font-size:1rem; font-weight:600; font-family:inherit; background:var(--white); }
    .saisie-input:focus { outline:none; border-color:var(--purple); }
    .saisie-input.correct { border-color:var(--green); background:var(--green-light); animation:correctPop .3s; }
    .saisie-input.wrong   { border-color:var(--red); background:var(--red-light); animation:wrongShake .3s; }

    /* Remise en ordre */
    .ordre-list { display:flex; flex-direction:column; gap:10px; }
    .ordre-item .ordre-rank:empty::before { content:'•'; color:#D1D5DB; }
    .ordre-item.picked { border-color:var(--purple); background:var(--purple-light); }
    .ordre-item.picked .ordre-rank { background:var(--purple); color:#fff; }
    .ordre-item:hover:not(:disabled) { transform:none; }
    .ordre-reset-row { display:flex; justify-content:center; margin-top:6px; }

    /* ═══════════════════════════════════════════
       📄 Import d'un cours (PDF / texte) → fiche ou flashcards
    ═══════════════════════════════════════════ */
    .import-box { margin-top:14px; }
    .import-sep { display:flex; align-items:center; text-align:center; color:var(--muted);
      font-size:0.78rem; font-weight:800; text-transform:uppercase; letter-spacing:.5px; margin:8px 0 12px; }
    .import-sep::before, .import-sep::after { content:''; flex:1; height:1px; background:var(--border); }
    .import-sep span { padding:0 12px; }
    .import-file { display:flex; align-items:center; justify-content:center; gap:6px; cursor:pointer;
      background:#F3F0FF; color:var(--purple); border:1.5px dashed var(--purple); border-radius:14px;
      padding:13px 16px; font-weight:800; font-size:0.9rem; box-sizing:border-box; transition:background .2s; }
    .import-file:hover { background:#EAE4FF; }
    .import-text { width:100%; box-sizing:border-box; margin-top:10px; padding:12px 14px;
      border:1.5px solid var(--border); border-radius:14px; font-family:inherit; font-size:0.9rem;
      resize:vertical; background:var(--card); }
    .import-text:focus { outline:none; border-color:var(--purple); }

    /* ═══════════════════════════════════════════
       🔔 Relance proactive — carte de reprise (points faibles)
    ═══════════════════════════════════════════ */
    .nudge-card { background:linear-gradient(135deg,#FEF3C7,#FFE4E6); border:1.5px solid #FCD34D;
      border-radius:var(--radius-sm); padding:16px 16px 14px; margin-bottom:18px; animation:fadeIn .3s; }
    .nudge-head { font-weight:900; font-size:1.05rem; margin-bottom:4px; color:#92400E; }
    .nudge-msg  { font-size:0.9rem; color:#7C2D12; line-height:1.45; margin-bottom:8px; }
    .nudge-hint { font-size:0.82rem; background:#FFFBEB; border:1px solid #FDE68A; border-radius:10px;
      padding:8px 10px; margin-bottom:10px; color:#92400E; line-height:1.4; }
    .nudge-card .btn { margin-top:2px; }

    /* ═══════════════════════════════════════════
       💛 Anti-décrochage — carte de soutien
    ═══════════════════════════════════════════ */
    .support-card { background:#F0FDF4; border:1.5px solid #86EFAC; border-radius:var(--radius-sm);
      padding:14px 16px; margin:12px 0 4px; animation:fadeIn .3s; }
    .support-msg { font-size:0.9rem; color:#166534; line-height:1.45; margin-bottom:10px; }
    .support-actions { display:flex; gap:8px; }
    .support-actions .btn { flex:1; }

    /* ═══════════════════════════════════════════
       🔮 Bilan prédictif parent
    ═══════════════════════════════════════════ */
    .dash-forecast { margin-top:12px; }
    .forecast-box { background:#EEF2FF; border:1px solid #C7D2FE; border-radius:12px;
      padding:12px 14px; margin-top:8px; font-size:0.88rem; line-height:1.5; color:#3730A3;
      animation:fadeIn .3s; }

    /* ═══════════════════════════════════════════
       ✨ v3 — ACCUEIL & LANDING plus vivants
       (moderne & dynamique : entrées en cascade, survols riches, mouvement ambiant doux)
       ═══════════════════════════════════════════ */
    @keyframes riseIn    { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
    @keyframes blobDrift { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(18px,-12px) scale(1.15)} }
    @keyframes glowSoft  { 0%,100%{box-shadow:0 8px 22px -8px rgba(124,58,237,.45)} 50%{box-shadow:0 14px 34px -6px rgba(124,58,237,.6)} }

    /* ---- Accueil : en-tête plus vivant (halo ambiant + contenu qui monte) ---- */
    .home-header::after{
      content:''; position:absolute; z-index:0; pointer-events:none;
      width:220px; height:220px; right:-60px; top:-80px; border-radius:50%;
      background:radial-gradient(circle, rgba(255,255,255,.20), transparent 70%);
      animation:blobDrift 10s ease-in-out infinite;
    }
    .home-hello    { animation:riseIn .5s both; }
    .home-name     { animation:riseIn .5s .06s both; }
    .home-motivate { animation:riseIn .5s .12s both; }
    .home-stats    { animation:riseIn .5s .18s both; }
    .home-stat     { transition:transform .2s cubic-bezier(.34,1.56,.64,1), background .2s; }
    .home-stat:hover{ transform:translateY(-2px) scale(1.07); }

    /* ---- Accueil : corps en cascade ---- */
    .home-body > * { animation:riseIn .55s both; }
    .home-body > *:nth-child(1){animation-delay:.05s}
    .home-body > *:nth-child(2){animation-delay:.11s}
    .home-body > *:nth-child(3){animation-delay:.17s}
    .home-body > *:nth-child(4){animation-delay:.23s}
    .home-body > *:nth-child(5){animation-delay:.29s}

    /* ---- Cartes matières : cascade + survol qui rebondit + reflet qui glisse ---- */
    .subjects-grid .subject-card{ animation:cardIn .5s both;
      transition:transform .26s cubic-bezier(.34,1.56,.64,1), box-shadow .26s, border-color .26s; }
    .subjects-grid .subject-card:nth-child(1){animation-delay:.04s}
    .subjects-grid .subject-card:nth-child(2){animation-delay:.08s}
    .subjects-grid .subject-card:nth-child(3){animation-delay:.12s}
    .subjects-grid .subject-card:nth-child(4){animation-delay:.16s}
    .subjects-grid .subject-card:nth-child(5){animation-delay:.20s}
    .subjects-grid .subject-card:nth-child(6){animation-delay:.24s}
    .subjects-grid .subject-card:nth-child(7){animation-delay:.28s}
    .subjects-grid .subject-card:nth-child(8){animation-delay:.32s}
    .subjects-grid .subject-card:nth-child(9){animation-delay:.36s}
    .subjects-grid .subject-card:nth-child(n+10){animation-delay:.40s}
    .subjects-grid .subject-card:hover{ transform:translateY(-5px) scale(1.015);
      box-shadow:0 16px 30px -12px rgba(30,27,75,.22) !important; }
    .subject-card .subject-icon{ transition:transform .26s cubic-bezier(.34,1.56,.64,1); }
    .subjects-grid .subject-card:hover .subject-icon{ transform:rotate(-7deg) scale(1.14); }
    .subject-card::before{
      content:''; position:absolute; inset:0; z-index:2; pointer-events:none;
      background:linear-gradient(115deg, transparent 35%, rgba(255,255,255,.42) 50%, transparent 65%);
      transform:translateX(-130%); transition:transform .7s ease;
    }
    .subjects-grid .subject-card:hover::before{ transform:translateX(130%); }

    /* ---- Boutons : micro-rebond fluide au survol (premium, pas gadget) ---- */
    .btn:hover:not(:disabled){ transform:translateY(-2px); }
    .btn-primary:hover:not(:disabled){ box-shadow:0 10px 22px -6px rgba(124,58,237,.5) !important; }
    .btn-yellow:hover:not(:disabled){ box-shadow:0 10px 22px -6px rgba(245,158,11,.55) !important; }
    /* CTA d'engagement (carte de reprise) — halo doux qui respire */
    #home-nudge .btn-primary{ animation:glowSoft 3.2s ease-in-out infinite; }

    /* ---- Landing : survols riches + éléments du hero qui respirent ---- */
    .feat-card, .lprice-card, .excl-card{
      transition:transform .26s cubic-bezier(.34,1.56,.64,1), box-shadow .26s, background .26s; }
    .feat-card:hover, .lprice-card:hover{ transform:translateY(-6px); box-shadow:var(--shadow) !important; }
    .excl-card:hover{ transform:translateY(-4px); background:rgba(255,255,255,.18); }
    .feat-icon{ display:inline-block; transition:transform .26s cubic-bezier(.34,1.56,.64,1); }
    .feat-card:hover .feat-icon{ transform:scale(1.2) rotate(-7deg); }
    .lnav-btn:hover{ transform:translateY(-1px); }
    .hero-phone .phone-outer{ animation:floaty 6s ease-in-out infinite; }
    .hero-badge{ animation:floaty 5s ease-in-out infinite; }

    /* Accessibilité — couper le mouvement ambiant si demandé */
    @media (prefers-reduced-motion: reduce){
      .home-header::after, .hero-phone .phone-outer, .hero-badge,
      #home-nudge .btn-primary { animation:none !important; }
      .home-hello,.home-name,.home-motivate,.home-stats,
      .home-body > *,.subjects-grid .subject-card { animation:none !important; }
    }

    /* ---- Test QI ---- */
    .qi-home-btn { background: linear-gradient(120deg,#A855F7,#7C3AED); color:#fff;
                   box-shadow: 0 4px 14px rgba(168,85,247,.4); }
    .qi-home-btn:hover { filter: brightness(1.06); }
    .qi-disclaimer { background: var(--violet-light); color: #5B21B6; border-radius: var(--radius-sm);
                     padding: 10px 14px; font-size: 0.78rem; font-weight: 600; line-height: 1.45;
                     text-align: center; margin-bottom: 14px; }
    .qi-play-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
    .qi-qnum { font-size: 0.82rem; font-weight: 800; color: var(--muted); }
    .qi-cat-chip { font-size: 0.78rem; font-weight: 800; border-radius: 999px; padding: 4px 12px; }
    .qi-timer { font-size: 0.85rem; font-weight: 900; font-variant-numeric: tabular-nums; min-width: 38px; text-align: right; }
    .qi-timer-bar { height: 8px; border-radius: 999px; background: #E5E7EB; overflow: hidden; margin-bottom: 18px; }
    .qi-timer-fill { height: 100%; border-radius: 999px; background: var(--green); transition: width .25s linear, background .3s; }
    .qi-cat-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
    .qi-cat-name { font-size: 0.85rem; font-weight: 700; width: 105px; flex-shrink: 0; }
    .qi-cat-score { font-size: 0.82rem; font-weight: 800; color: var(--muted); width: 34px; text-align: right; }
    .qi-indice-circle { width: 132px; height: 132px; border-radius: 50%; margin: 6px auto 0;
                        display: flex; flex-direction: column; align-items: center; justify-content: center;
                        background: linear-gradient(135deg,#A855F7,#7C3AED); color: #fff;
                        box-shadow: 0 8px 24px rgba(124,58,237,.35); }
    .qi-indice-num { font-size: 2.6rem; font-weight: 900; line-height: 1; }
    .qi-indice-cap { font-size: 0.72rem; font-weight: 700; opacity: .9; margin-top: 4px; }
    .qi-hist-row { display: flex; align-items: center; justify-content: space-between; gap: 8px;
                   background: var(--white); border-radius: var(--radius-sm); padding: 10px 14px;
                   margin-bottom: 8px; box-shadow: var(--shadow-card); font-size: 0.85rem; font-weight: 700; }
    .qi-hist-indice { color: var(--purple); font-weight: 800; }

    /* ── Maternelle (2-5 ans) : gros visuels pour les non-lecteurs ─────────── */
    .speak-btn { display: flex; width: fit-content; align-items: center; gap: 6px;
                 margin: 0 auto 14px; padding: 10px 18px; border: none; border-radius: 999px;
                 cursor: pointer; font-family: inherit; font-size: 0.95rem; font-weight: 800;
                 color: #fff; background: linear-gradient(135deg, #10B981, #047857);
                 box-shadow: 0 4px 14px rgba(4, 120, 87, .3); }
    .speak-btn:active { transform: scale(.96); }
    #screen-exercise.maternelle .exercise-question { font-size: 1.5rem; line-height: 1.7; }
    #screen-exercise.maternelle .exercise-emoji { font-size: 3rem; }
    #screen-exercise.maternelle .answer-btn { font-size: 1.4rem; padding: 18px 16px; }
    #screen-exercise.maternelle .answer-btn .answer-letter { display: none; }
