:root{--font:"Nunito", "Nunito Sans", ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;--primary:#5b6cff;--primary-dark:#4353e6;--primary-soft:#e6e9ff;--accent:#ff8a3d;--accent-dark:#e8752b;--accent-soft:#ffe8d6;--success:#2ecc71;--success-soft:#dff8e8;--danger:#ff6b6b;--danger-soft:#ffe3e3;--warn:#ffd166;--warn-soft:#fff4d6;--bg:#fff8ef;--surface:#fff;--surface-2:#fff1e0;--text:#2b2d42;--muted:#6b6f85;--border:#eadfce;--shadow:0 4px 0 #2b2d4214, 0 10px 24px #2b2d4214;--shadow-sm:0 2px 0 #2b2d4214;--subject:var(--primary);--subject-soft:var(--primary-soft);--radius:20px;--radius-sm:12px;--tap:48px;--maxw:880px}.subject-francais{--subject:#3b82f6;--subject-soft:#dbeafe}.subject-maths{--subject:#ff8a3d;--subject-soft:#ffe8d6}.subject-monde{--subject:#22b573;--subject-soft:#d9f5e6}.subject-emc{--subject:#8b5cf6;--subject-soft:#ece4ff}.subject-anglais{--subject:#ef4444;--subject-soft:#ffe0e0}.subject-arts{--subject:#ec4899;--subject-soft:#ffe0ef}.subject-eps{--subject:#14b8a6;--subject-soft:#d5f5f1}@media (prefers-color-scheme:dark){:root{--bg:#1b1c2b;--surface:#262838;--surface-2:#2f3145;--text:#f3f1ea;--muted:#b0b3c6;--border:#3a3d55;--primary-soft:#33386a;--accent-soft:#4a3222;--success-soft:#1f3f2e;--danger-soft:#4a2626;--warn-soft:#4a3f1f;--shadow:0 4px 0 #0000004d, 0 10px 24px #00000059;--shadow-sm:0 2px 0 #0000004d}.subject-francais{--subject-soft:#1f2f52}.subject-maths{--subject-soft:#4a3222}.subject-monde{--subject-soft:#1f3f2e}.subject-emc{--subject-soft:#352a55}.subject-anglais{--subject-soft:#4a2626}.subject-arts{--subject-soft:#4a2440}.subject-eps{--subject-soft:#1e3f3c}}*,:before,:after{box-sizing:border-box}html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}body{font-family:var(--font);color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased;margin:0;font-size:18px;line-height:1.5;overflow-x:hidden}#root{min-height:100dvh}img,svg{max-width:100%}h1,h2,h3{margin:0 0 .5em;font-weight:800;line-height:1.2}h1{font-size:clamp(1.6rem,2.5vw + 1rem,2.4rem)}h2{font-size:clamp(1.3rem,1.5vw + .9rem,1.7rem)}h3{font-size:1.15rem}p{margin:0 0 .75em}a{color:var(--primary)}button,input,select{font:inherit;color:inherit}button{cursor:pointer}:focus-visible{outline:4px solid var(--accent);outline-offset:3px;border-radius:var(--radius-sm)}.sr-only{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.muted{color:var(--muted)}.small{font-size:.9rem}.center{text-align:center}code{background:var(--surface-2);word-break:break-all;border-radius:6px;padding:.1em .4em;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.85em}mark{background:var(--warn);color:#2b2d42;border-radius:6px;padding:0 .15em;font-weight:800}.app{flex-direction:column;min-height:100dvh;display:flex}.page{width:100%;max-width:var(--maxw);padding:16px 16px 48px;padding-left:max(16px, env(safe-area-inset-left));padding-right:max(16px, env(safe-area-inset-right));flex:1;margin:0 auto}.footer{text-align:center;color:var(--muted);padding:16px;font-size:.85rem}.section{margin:28px 0}.page-title{flex-wrap:wrap;align-items:center;gap:.4em;display:flex}.page-title small{color:var(--muted);font-size:.55em;font-weight:700}.page-title.small-title{font-size:1.3rem}.card{background:var(--surface);border:2px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm);padding:20px}.topbar{z-index:20;padding:10px 16px;padding-top:max(10px, env(safe-area-inset-top));background:var(--surface);border-bottom:3px solid var(--subject);justify-content:space-between;align-items:center;gap:12px;display:flex;position:sticky;top:0;box-shadow:0 2px 12px #0000000f}.brand{color:var(--text);min-height:var(--tap);align-items:center;gap:8px;font-size:1.35rem;font-weight:900;text-decoration:none;display:flex}.brand-fox{font-size:1.7rem;transition:transform .3s;display:inline-block}.brand:hover .brand-fox{transform:rotate(-12deg)scale(1.1)}.brand-plus{color:var(--subject)}.topnav{align-items:center;gap:6px;display:flex}.navlink{min-height:44px;color:var(--text);background:var(--surface-2);border-radius:999px;align-items:center;gap:6px;padding:6px 12px;font-size:.95rem;font-weight:800;text-decoration:none;display:inline-flex}.navlink:hover,.profile-pill{background:var(--subject-soft)}@media (width<=560px){.navlink-text{display:none}.navlink{padding:6px 10px;font-size:1.2rem}}.crumbs ol{color:var(--muted);flex-wrap:wrap;gap:4px;margin:0 0 16px;padding:0;font-size:.9rem;list-style:none;display:flex}.crumbs li+li:before{content:"›";margin:0 6px}.crumbs a{color:var(--muted);padding:6px 0;font-weight:700;text-decoration:none;display:inline-block}.crumbs a:hover{color:var(--subject);text-decoration:underline}.btn{min-height:var(--tap);color:var(--text);background:var(--surface-2);box-shadow:var(--shadow-sm);-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;border:0;border-radius:999px;justify-content:center;align-items:center;gap:8px;padding:10px 20px;font-size:1.05rem;font-weight:800;text-decoration:none;transition:transform .12s,box-shadow .12s,background .15s;display:inline-flex}.btn:hover:not(:disabled){box-shadow:var(--shadow);transform:translateY(-2px)}.btn:active:not(:disabled){box-shadow:none;transform:translateY(1px)}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-primary{background:var(--primary);color:#fff;box-shadow:0 4px 0 var(--primary-dark)}.btn-primary:hover:not(:disabled){box-shadow:0 6px 0 var(--primary-dark)}.btn-accent{background:var(--accent);color:#fff;box-shadow:0 4px 0 var(--accent-dark)}.btn-accent:hover:not(:disabled){box-shadow:0 6px 0 var(--accent-dark)}.btn-danger{background:var(--danger);color:#fff;box-shadow:0 4px #d64d4d}.btn-ghost{box-shadow:none;border:2px solid var(--border);background:0 0}.btn-ghost:hover:not(:disabled){background:var(--surface-2)}.btn-lg{min-height:56px;padding:12px 28px;font-size:1.2rem}.btn-xl{min-height:64px;padding:14px 32px;font-size:1.35rem}.btn-icon{width:var(--tap);padding:0;font-size:1.2rem}.btn-chip{background:var(--surface);border:2px solid var(--border);min-height:44px;padding:6px 16px;font-size:1rem}.btn-speak{background:var(--subject-soft)}.btn-speak.is-playing{background:var(--warn-soft);animation:1s infinite pulse}.btn-tile{background:var(--surface);border:3px solid var(--subject-soft);border-radius:var(--radius-sm);min-width:var(--tap);font-size:1.25rem}.btn-tile.selected{border-color:var(--subject);background:var(--subject-soft);transform:scale(1.05)}.btn-tile-sm{min-height:44px;padding:6px 14px;font-size:1.05rem}.btn-tile.is-correct{border-color:var(--success);background:var(--success-soft)}.btn-tile.is-wrong{border-color:var(--danger);background:var(--danger-soft)}.row-actions{flex-wrap:wrap;align-items:center;gap:12px;margin-top:16px;display:flex}.row-actions.column{flex-direction:column;align-items:stretch}.row-actions.column .btn{width:100%}.validate-row{justify-content:center;margin-top:20px;display:flex}.chip{background:var(--surface-2);color:var(--muted);white-space:nowrap;border-radius:999px;align-items:center;gap:4px;padding:4px 12px;font-size:.85rem;font-weight:800;display:inline-flex}.chip-ok{background:var(--success-soft);color:#1b7a43}.chip-warn{background:var(--warn-soft);color:#8a5a00}.chip-info{background:var(--subject-soft);color:var(--text)}@media (prefers-color-scheme:dark){.chip-ok{color:#8be0ad}.chip-warn{color:#ffd98a}}.field{flex-direction:column;gap:6px;margin-bottom:14px;font-weight:800;display:flex}.field.inline{flex-direction:row;align-items:center;margin:0}.field input,.field select{min-height:var(--tap);border-radius:var(--radius-sm);border:3px solid var(--border);background:var(--surface);padding:8px 14px;font-size:1.1rem}.field input:focus,.field select:focus{border-color:var(--primary);outline:none}.toggle{cursor:pointer;align-items:center;gap:8px;min-height:44px;font-size:.95rem;font-weight:800;display:inline-flex}.toggle input{width:24px;height:24px;accent-color:var(--primary)}.mascot{align-items:center;gap:14px;display:flex}.mascot-face{flex-shrink:0;font-size:3rem;line-height:1;animation:2.4s ease-in-out infinite bob;display:inline-block}.mascot-lg .mascot-face{font-size:4.5rem}.mascot-sm .mascot-face{font-size:2.4rem}.mascot-party .mascot-face{animation:.8s ease-in-out infinite wiggle}.bubble{background:var(--surface);border:2px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm);padding:12px 18px;font-size:1.1rem;position:relative}.bubble:before{content:"";border:8px solid #0000;border-right-color:var(--border);border-left:0;position:absolute;top:22px;left:-12px}.bubble:after{content:"";border:7px solid #0000;border-right-color:var(--surface);border-left:0;position:absolute;top:23px;left:-9px}.stars{gap:2px;font-size:1.1rem;display:inline-flex}.stars-sm{font-size:.95rem}.stars-md{font-size:1.6rem}.stars-lg{font-size:2.6rem}.star{opacity:.35}.star.on{opacity:1}.stars-animate .star.on{animation:.5s cubic-bezier(.34,1.56,.64,1) both pop}.ring{flex-shrink:0}.ring-bg{stroke:var(--border)}.ring-fg{stroke:var(--subject);transition:stroke-dashoffset .6s}.ring-text{fill:var(--text);font-size:12px;font-weight:900}.confetti{pointer-events:none;z-index:30;position:fixed;inset:0;overflow:hidden}.confetti-piece{opacity:.95;border-radius:3px;width:12px;height:18px;animation:linear forwards confetti-fall;position:absolute;top:-20px}.confetti-piece.shape-1{border-radius:50%;width:12px;height:12px}.confetti-piece.shape-2{width:8px;height:22px}@keyframes confetti-fall{0%{opacity:1;transform:translateY(-20px)rotate(0)}to{opacity:0;transform:translateY(110vh)rotate(720deg)}}@keyframes pop{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes bob{0%,to{transform:translateY(0)}50%{transform:translateY(-6px)}}@keyframes wiggle{0%,to{transform:rotate(-8deg)}50%{transform:rotate(8deg)}}@keyframes pulse{0%,to{transform:scale(1)}50%{transform:scale(1.05)}}@keyframes shake{0%,to{transform:translate(0)}25%{transform:translate(-6px)}75%{transform:translate(6px)}}@keyframes fade-up{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes drop-in{0%{opacity:0;transform:scale(.4)}to{opacity:1;transform:scale(1)}}.hero{margin:12px 0 8px;animation:.4s both fade-up}.profile-row{flex-wrap:wrap;gap:12px;display:flex}.profile-card{background:var(--surface);border:3px solid var(--border);border-radius:var(--radius);min-width:120px;box-shadow:var(--shadow-sm);flex-direction:column;align-items:center;transition:transform .15s,border-color .15s;display:flex;position:relative}.profile-card.selected{border-color:var(--primary);background:var(--primary-soft)}.profile-card:hover{transform:translateY(-2px)}.profile-main,.profile-add{border-radius:var(--radius);cursor:pointer;background:0 0;border:0;flex-direction:column;align-items:center;gap:4px;width:100%;padding:14px 18px 12px;display:flex}.profile-add{border:3px dashed var(--border);color:var(--muted);background:0 0}.profile-avatar{font-size:2.4rem;line-height:1}.profile-name{font-weight:800}.profile-remove{border:2px solid var(--border);background:var(--surface);width:32px;height:32px;color:var(--muted);border-radius:50%;font-size:.8rem;font-weight:900;position:absolute;top:-8px;right:-8px}.profile-remove:hover{color:var(--danger);border-color:var(--danger)}.profile-form{margin-top:16px;animation:.25s both fade-up}.avatar-picker{border:0;margin:0 0 14px;padding:0}.avatar-picker legend{margin-bottom:6px;font-weight:800}.avatar-grid{flex-wrap:wrap;gap:8px;display:flex}.avatar-btn{border:3px solid var(--border);background:var(--surface);border-radius:14px;width:52px;height:52px;font-size:1.7rem}.avatar-btn.selected{border-color:var(--primary);background:var(--primary-soft);transform:scale(1.1)}.level-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px;display:grid}.level-card{background:var(--surface);border:3px solid var(--border);border-radius:var(--radius);color:var(--text);box-shadow:var(--shadow-sm);flex-direction:column;align-items:center;gap:4px;padding:18px 12px;text-decoration:none;transition:transform .15s,box-shadow .15s;animation:.4s both fade-up;display:flex}.level-card:hover{box-shadow:var(--shadow);transform:translateY(-3px)}.level-card.disabled{opacity:.55}.level-cp{border-color:#ff8a3d}.level-ce1{border-color:#3b82f6}.level-ce2{border-color:#22b573}.level-cm1{border-color:#8b5cf6}.level-cm2{border-color:#ec4899}.level-emoji{font-size:2.6rem;line-height:1}.level-label{font-size:1.5rem;font-weight:900}.level-age{color:var(--muted);font-size:.9rem}.subject-grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px;display:grid}.subject-card{background:var(--surface);border:3px solid var(--subject);border-radius:var(--radius);color:var(--text);box-shadow:0 5px 0 var(--subject);grid-template-columns:1fr auto;grid-template-areas:"icon ring""label ring""count ring";align-items:center;gap:2px 12px;padding:18px 20px;text-decoration:none;transition:transform .15s;animation:.4s both fade-up;display:grid}.subject-card:hover{transform:translateY(-3px)}.subject-card.disabled{opacity:.55;box-shadow:none}.subject-card .subject-icon{grid-area:icon;font-size:2.4rem;line-height:1}.subject-card .subject-label{grid-area:label;font-size:1.3rem;font-weight:900}.subject-card .subject-count{color:var(--muted);grid-area:count;font-size:.95rem}.subject-card .ring{grid-area:ring}.domain-nav{flex-wrap:wrap;gap:8px;margin-bottom:8px;display:flex}.domain-section h2{border-left:6px solid var(--subject);padding-left:12px}.lesson-list{flex-direction:column;gap:12px;margin:0;padding:0;list-style:none;display:flex}.lesson-card{background:var(--surface);border:3px solid var(--border);border-radius:var(--radius);color:var(--text);box-shadow:var(--shadow-sm);grid-template-columns:auto auto 1fr auto;align-items:center;gap:12px;padding:14px 16px;text-decoration:none;transition:transform .15s,border-color .15s;display:grid}.lesson-card:hover{border-color:var(--subject);transform:translate(4px)}.lesson-card.status-done{border-color:var(--success)}.lesson-card.status-in-progress{border-color:var(--warn)}.lesson-num{background:var(--subject);color:#fff;border-radius:50%;justify-content:center;align-items:center;width:34px;height:34px;font-weight:900;display:inline-flex}.lesson-emoji{font-size:2rem;line-height:1}.lesson-body{flex-direction:column;gap:2px;min-width:0;display:flex}.lesson-title{font-size:1.15rem;font-weight:900}.lesson-subtitle{color:var(--muted)}.lesson-meta{color:var(--muted);flex-wrap:wrap;gap:12px;font-size:.9rem;display:flex}.lesson-status{align-items:center;display:flex}@media (width<=480px){.lesson-card{grid-template-columns:auto 1fr;grid-template-areas:"num body""emoji body""status status"}.lesson-num{grid-area:num}.lesson-emoji{grid-area:emoji}.lesson-body{grid-area:body}.lesson-status{grid-area:status;justify-content:flex-end}}.lesson-header{align-items:flex-start;gap:18px;margin-bottom:20px;animation:.4s both fade-up;display:flex}.lesson-hero-emoji{background:var(--subject-soft);border-radius:24px;flex-shrink:0;padding:14px;font-size:4rem;line-height:1}.eyebrow{color:var(--subject);margin:0 0 4px;font-size:.95rem;font-weight:800}.lesson-hero-sub{color:var(--muted);font-size:1.2rem}@media (width<=480px){.lesson-header{text-align:center;flex-direction:column;align-items:center}.lesson-header .lesson-meta{justify-content:center}}.course{flex-direction:column;gap:16px;display:flex}.course-section{background:var(--surface);border:2px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm);padding:16px 20px;animation:.4s both fade-up}.section-head{justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;display:flex}.section-kind{text-transform:uppercase;letter-spacing:.04em;color:var(--muted);font-size:.9rem;font-weight:900}.section-body{align-items:flex-start;gap:16px;display:flex}.section-illu{flex-shrink:0;font-size:3rem;line-height:1}.section-content{flex:1;min-width:0}.section-content h2{font-size:1.35rem}.section-img{border-radius:var(--radius-sm);margin-bottom:8px}.md p:last-child,.md ul:last-child,.md ol:last-child{margin-bottom:0}.md ul,.md ol{margin:0 0 .75em;padding-left:1.4em}.md li{margin:.2em 0}.md strong{color:var(--subject)}.section-intro{border-left:8px solid var(--subject)}.section-regle,.section-resume{background:var(--subject-soft);border-color:var(--subject);border-width:3px}.section-regle .section-kind,.section-resume .section-kind{color:var(--subject)}.section-exemple{border-style:dashed}.section-astuce{background:var(--warn-soft);border-color:var(--warn)}.section-astuce .section-kind{color:#8a5a00}.section-activite{background:var(--success-soft);border-color:var(--success)}.section-activite .section-kind{color:#1b7a43}.section-video .video-card{background:var(--surface-2);border-radius:var(--radius-sm);padding:14px}.video-thumb{background:linear-gradient(135deg, var(--primary), var(--accent));border-radius:var(--radius-sm);justify-content:center;align-items:center;height:120px;margin-bottom:10px;font-size:3rem;display:flex}@media (prefers-color-scheme:dark){.section-astuce .section-kind{color:#ffd98a}.section-activite .section-kind{color:#8be0ad}}@media (width<=480px){.section-body{flex-direction:column}.section-illu{font-size:2.4rem}}.cta-block{flex-direction:column;align-items:center;gap:14px;margin:32px 0 16px;display:flex}.cta-block .btn-xl{width:min(100%,420px)}.player{animation:.3s both fade-up}.player-top{align-items:center;gap:12px;margin-bottom:10px;display:flex}.progress-bar{background:var(--surface-2);border:2px solid var(--border);border-radius:999px;flex:1;height:16px;overflow:hidden}.progress-bar.big{width:100%;height:20px;margin:12px 0 6px;display:block}.progress-bar.thin{border-width:1px;max-width:260px;height:8px;margin-top:6px;display:block}.progress-fill{background:linear-gradient(90deg, var(--subject), var(--accent));border-radius:999px;height:100%;transition:width .5s;display:block}.player-count{color:var(--muted);white-space:nowrap;font-weight:900}.player-tools{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin-bottom:14px;display:flex}.consigne{background:var(--surface);border:3px solid var(--subject);border-radius:var(--radius);box-shadow:var(--shadow-sm);align-items:center;gap:12px;margin-bottom:14px;padding:16px 18px;display:flex}.consigne-illu{font-size:2.6rem;line-height:1}.consigne-text{flex:1;font-size:1.3rem;font-weight:800}.consigne-text .md strong{color:var(--accent)}.hint-row{margin-bottom:14px}.hint-box{background:var(--warn-soft);border:2px solid var(--warn);border-radius:var(--radius-sm);align-items:flex-start;gap:8px;padding:10px 14px;animation:.25s both fade-up;display:flex}.hint-box .md p{margin:0}.player-body{background:var(--surface);border:2px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm);padding:18px}.ex-help{color:var(--muted);margin:0 0 12px}.choice-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px;display:grid}.choice{border-radius:var(--radius-sm);border:3px solid var(--border);background:var(--surface);text-align:left;align-items:center;gap:12px;min-height:60px;padding:12px 16px;font-size:1.25rem;font-weight:800;transition:transform .12s,border-color .12s,background .12s;display:flex;position:relative}.choice:hover:not(:disabled){border-color:var(--subject);transform:translateY(-2px)}.choice.selected{border-color:var(--subject);background:var(--subject-soft)}.choice.is-correct{border-color:var(--success);background:var(--success-soft)}.choice.is-wrong{border-color:var(--danger);background:var(--danger-soft);animation:.4s shake}.choice:disabled{cursor:default}.choice-mark{color:var(--subject);text-align:center;width:1.2em;font-size:1.1em}.choice-text{flex:1}.choice-big{justify-content:center;min-height:80px;font-size:1.5rem}.choice-number{justify-content:center;min-width:72px;font-size:1.8rem}.vf-row{grid-template-columns:1fr 1fr;gap:14px;display:grid}@media (width<=420px){.vf-row{grid-template-columns:1fr}}.statement{background:var(--subject-soft);border-radius:var(--radius-sm);align-items:center;gap:12px;margin-bottom:16px;padding:14px 18px;font-size:1.35rem;display:flex}.statement .md{flex:1}.statement .md p{margin:0}.trou-text{font-size:1.5rem;font-weight:700;line-height:2.2}.hole{border:3px dashed var(--subject);background:var(--subject-soft);min-width:3em;min-height:48px;font:inherit;text-align:center;vertical-align:middle;color:var(--subject);border-radius:12px;margin:0 4px;padding:2px 12px;font-weight:900;display:inline-block}.hole.active{background:var(--warn-soft);border-style:solid;border-color:var(--accent)}.hole.filled{color:var(--text);border-style:solid}.hole.is-correct{border-color:var(--success);background:var(--success-soft);color:var(--text)}.hole.is-wrong{border-color:var(--danger);background:var(--danger-soft);color:var(--text)}.hole-input{width:auto}.hole-input:focus{border-style:solid;border-color:var(--accent);outline:none}.word-bank{border-top:2px dashed var(--border);flex-wrap:wrap;gap:10px;margin-top:14px;padding-top:14px;display:flex}.word-bank .btn-chip{font-size:1.2rem;font-weight:900}.order-answer{border-radius:var(--radius-sm);border:3px dashed var(--subject);background:var(--subject-soft);flex-wrap:wrap;align-items:center;gap:6px;min-height:72px;margin-bottom:14px;padding:12px;font-size:1.4rem;font-weight:900;display:flex}.order-placeholder{color:var(--muted);font-size:1rem;font-weight:700}.order-item{background:var(--surface);border:2px solid var(--border);border-radius:10px;padding:6px 14px;animation:.25s both drop-in}.order-item.is-correct{border-color:var(--success);background:var(--success-soft)}.order-item.is-wrong{border-color:var(--danger);background:var(--danger-soft)}.order-joiner{color:var(--muted);margin-left:6px}.order-pool{flex-wrap:wrap;gap:10px;margin-bottom:12px;display:flex}.order-actions{flex-wrap:wrap;gap:10px;display:flex}.buckets{grid-template-columns:repeat(var(--buckets,2), minmax(0, 1fr));gap:12px;margin-top:8px;display:grid}@media (width<=560px){.buckets{grid-template-columns:1fr}}.bucket{border:3px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-2);min-height:140px;padding:10px;transition:border-color .15s}.bucket.droppable{border-color:var(--accent);border-style:dashed}.bucket-title{width:100%;min-height:var(--tap);background:var(--subject);color:#fff;border:0;border-radius:10px;padding:8px 12px;font-size:1.1rem;font-weight:900}.bucket-title:disabled{cursor:default;opacity:1}.bucket-items{flex-wrap:wrap;gap:8px;margin-top:10px;display:flex}.bucket-drop{border:2px dashed var(--accent);background:var(--warn-soft);border-radius:10px;width:100%;min-height:44px;font-weight:800}.assoc-grid{grid-template-columns:1fr 1fr;gap:14px;display:grid}.assoc-col{flex-direction:column;gap:10px;display:flex}.assoc-badge{background:var(--subject);color:#fff;border-radius:50%;justify-content:center;align-items:center;width:28px;height:28px;font-size:.9rem;display:inline-flex}.choice.linked.pair-0{background:#e6e9ff;border-color:#5b6cff}.choice.linked.pair-1{background:#ffe8d6;border-color:#ff8a3d}.choice.linked.pair-2{background:#d9f5e6;border-color:#22b573}.choice.linked.pair-3{background:#ffe0ef;border-color:#ec4899}.choice.linked.pair-4{background:#ece4ff;border-color:#8b5cf6}.choice.linked.pair-5{background:#d5f5f1;border-color:#14b8a6}.choice.linked.pair-6{background:#fff1cc;border-color:#f59e0b}.choice.linked.pair-7{background:#ffe0e0;border-color:#ef4444}.choice.linked .assoc-badge{background:currentColor}@media (prefers-color-scheme:dark){.choice.linked.pair-0{background:#33386a}.choice.linked.pair-1{background:#4a3222}.choice.linked.pair-2{background:#1f3f2e}.choice.linked.pair-3{background:#4a2440}.choice.linked.pair-4{background:#352a55}.choice.linked.pair-5{background:#1e3f3c}.choice.linked.pair-6{background:#4a3f1f}.choice.linked.pair-7{background:#4a2626}}.choice.linked.is-correct{border-color:var(--success)}.choice.linked.is-wrong{border-color:var(--danger)}.answer-field{flex-direction:column;align-items:center;gap:10px;display:flex}.answer-input{text-align:center;border-radius:var(--radius-sm);border:3px solid var(--border);background:var(--surface);width:min(100%,420px);min-height:64px;padding:8px 16px;font-size:1.8rem;font-weight:900}.answer-input:focus{border-color:var(--subject);outline:none}.answer-field.is-correct .answer-input{border-color:var(--success);background:var(--success-soft)}.answer-field.is-wrong .answer-input{border-color:var(--danger);background:var(--danger-soft)}.answer-input-hidden{opacity:0;width:1px;height:1px;position:absolute}.letter-boxes{cursor:text;flex-wrap:wrap;justify-content:center;gap:8px;display:flex}.letter-box{border:3px solid var(--border);background:var(--surface);border-radius:12px;justify-content:center;align-items:center;width:56px;height:64px;font-size:2rem;font-weight:900;display:inline-flex}.letter-box.filled{border-color:var(--subject)}.letter-box.caret{border-color:var(--accent);box-shadow:inset 0 -4px 0 var(--accent)}.answer-field.is-correct .letter-box{border-color:var(--success);background:var(--success-soft)}.answer-field.is-wrong .letter-box{border-color:var(--danger);background:var(--danger-soft)}.answer-field:focus-within .letter-box.caret{animation:1s infinite pulse}.numeric-pad{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:min(100%,260px);margin-top:8px;display:grid}.numeric-key{border:2px solid var(--border);background:var(--surface-2);min-height:52px;color:var(--text);font:inherit;cursor:pointer;border-radius:12px;font-size:1.5rem;font-weight:800}.numeric-key:hover,.numeric-key:focus-visible{border-color:var(--subject);background:var(--subject-soft)}.numeric-key:active{transform:scale(.96)}.numeric-key:disabled{opacity:.5;cursor:not-allowed}.ex-tracage{max-width:620px;margin:0 auto}.tracage-toolbar{justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;display:flex}.tracage-model{font-size:1.2rem;font-weight:700}.tracage-model strong{color:var(--subject);font-size:2rem}.tracage-page{aspect-ratio:2;border:3px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);touch-action:none;cursor:crosshair;width:100%;display:block}.tracage-line{stroke:#c6dcf0;stroke-width:2px;stroke-dasharray:6 6}.tracage-base{stroke:#7eb0d8;stroke-dasharray:none}.tracage-ghost{fill:#d7dae8;font:150px/1 Comic Sans MS,Segoe Print,cursive}.tracage-stroke{fill:none;stroke:#7655cc;stroke-width:8px;stroke-linecap:round;stroke-linejoin:round}.ex-tracage .ex-help{text-align:center}.dictee-player{flex-direction:column;align-items:center;gap:8px;margin-bottom:18px;display:flex}.calc-expr{color:var(--subject);justify-content:center;align-items:center;gap:16px;margin-bottom:18px;font-size:clamp(2rem,6vw,3.2rem);font-weight:900;display:flex}.calc-eq{color:var(--muted)}.calc-q{color:var(--accent)}.count-grid{background:var(--surface-2);border-radius:var(--radius-sm);flex-wrap:wrap;justify-content:center;gap:8px;margin-bottom:16px;padding:16px;font-size:2.4rem;line-height:1;display:flex}.count-grid.dense{gap:4px;font-size:1.6rem}.count-item{animation:.3s both drop-in}.number-row{flex-wrap:wrap;justify-content:center;gap:12px;display:flex}.reading-card{background:var(--subject-soft);border-radius:var(--radius);margin-bottom:14px;padding:20px 22px}.reading-line{letter-spacing:.02em;margin:0;font-size:1.7rem;font-weight:700;line-height:1.7}.reading-actions{margin-top:12px}.feedback{border-radius:var(--radius);border:3px solid;flex-direction:column;align-items:flex-start;gap:12px;margin-top:16px;padding:18px;animation:.3s both fade-up;display:flex}.feedback-ok{background:var(--success-soft);border-color:var(--success)}.feedback-ko{background:var(--danger-soft);border-color:var(--danger)}.feedback .bubble{font-size:1.15rem}.feedback-answer{margin-top:6px}.feedback-expl{margin-top:6px;font-weight:600}.feedback-expl .md p{margin:0}.feedback .row-actions{justify-content:flex-end;width:100%;margin-top:4px}.end-screen{text-align:center;flex-direction:column;align-items:center;gap:18px;animation:.4s both fade-up;display:flex}.score-card{background:var(--surface);border:3px solid var(--subject);border-radius:var(--radius);box-shadow:var(--shadow);flex-direction:column;align-items:center;gap:4px;width:min(100%,420px);padding:22px 32px;display:flex}.score-big{color:var(--subject);margin:6px 0 0;font-size:3rem;font-weight:900}.end-screen .row-actions{width:min(100%,420px)}.stat-grid{grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin-bottom:8px;display:grid}.stat{background:var(--surface);border:2px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm);flex-direction:column;align-items:center;padding:16px 10px;animation:.4s both fade-up;display:flex}.stat-emoji{font-size:2rem;line-height:1}.stat-value{color:var(--primary);font-size:2.2rem;font-weight:900}.stat-label{color:var(--muted);text-align:center;font-size:.9rem}.subject-progress-list{flex-direction:column;gap:10px;display:flex}.subject-progress{background:var(--surface);border:2px solid var(--subject);border-radius:var(--radius-sm);border-left-width:8px;align-items:center;gap:14px;padding:12px 16px;display:flex}.subject-progress .subject-icon{font-size:1.8rem}.subject-progress-body{flex-direction:column;flex:1;display:flex}.recent-list{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.recent-item{min-height:var(--tap);border-radius:var(--radius-sm);background:var(--surface);border:2px solid var(--border);color:var(--text);align-items:center;gap:12px;padding:8px 14px;text-decoration:none;display:flex}.recent-title{flex:1;font-weight:800}.section-head-row{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;display:flex}.objective-list{flex-direction:column;gap:10px;margin:12px 0 0;padding:0;list-style:none;display:flex}.objective-item{background:var(--surface);border:2px solid var(--border);border-left:8px solid var(--subject);border-radius:var(--radius-sm);overflow:hidden}.objective-toggle{text-align:left;width:100%;min-height:var(--tap);background:0 0;border:0;grid-template-columns:auto 1fr auto auto;align-items:center;gap:12px;padding:12px 16px;font-size:1.5rem;display:grid}.objective-toggle:hover{background:var(--surface-2)}.objective-title{flex-direction:column;font-size:1rem;display:flex}.objective-toggle>.muted{font-size:.85rem}.objective-body{border-top:2px dashed var(--border);padding:4px 16px 16px;font-size:1rem;animation:.25s both fade-up}.objective-body h3{color:var(--subject);margin:12px 0 4px;font-size:1rem}.objective-body ul{margin:0 0 8px;padding-left:1.3em}@media (width<=480px){.objective-toggle{grid-template-columns:auto 1fr auto}.objective-toggle>.muted{display:none}}.loading{flex-direction:column;align-items:center;gap:20px;padding:40px 16px;animation:.3s both fade-up;display:flex}.loading-dots{gap:10px;display:flex}.loading-dots span{background:var(--subject);border-radius:50%;width:14px;height:14px;animation:.9s ease-in-out infinite bob}.loading-dots span:nth-child(2){animation-delay:.15s}.loading-dots span:nth-child(3){animation-delay:.3s}.empty{text-align:center;color:var(--muted);padding:40px 16px}.empty-emoji{margin-bottom:12px;font-size:4rem;line-height:1}.lesson-lab-callout{border:2px solid var(--subject);border-radius:var(--radius);background:var(--subject-soft);align-items:center;gap:14px;margin:0 0 24px;padding:16px;display:flex}.lesson-lab-callout>span{font-size:2rem}.lesson-lab-callout>div{flex:1}.lesson-lab-callout strong{font-size:1.12rem}.lesson-lab-callout p{color:var(--muted);margin:0;font-size:.9rem}.lesson-lab-callout .btn{white-space:nowrap}.lab-header{align-items:center;gap:18px;margin:12px 0 24px;display:flex}.lab-header>span{background:var(--subject-soft);border-radius:22px;flex:0 0 72px;place-items:center;width:72px;height:72px;font-size:2.4rem;display:grid}.lab-header h1{margin:2px 0}.lab-header p:last-child{color:var(--muted);margin:0}.lab-card{border:2px solid var(--border);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow);text-align:center;padding:clamp(16px,4vw,32px);overflow:hidden}.lab-challenge{flex-direction:column;justify-content:center;align-items:center;gap:4px;margin-bottom:20px;display:flex}.lab-challenge>span:first-child{color:var(--subject);text-transform:uppercase;letter-spacing:.05em;font-size:.9rem;font-weight:900}.lab-challenge strong{font-size:clamp(1.35rem,3vw,2rem);line-height:1.2}.lab-challenge>span:last-child{color:var(--muted);font-size:.94rem}.lab-instruction{color:var(--muted);margin:16px 0}.lab-feedback,.lab-observation{border-radius:14px;max-width:650px;margin:18px auto;padding:12px 16px;font-weight:800}.lab-feedback.is-success,.lab-observation.is-success{background:var(--success-soft);color:var(--text)}.lab-feedback.is-try{background:var(--warn-soft);color:var(--text)}.lab-observation{background:var(--subject-soft)}.lab-question{margin-top:18px;font-weight:900}.lab-note{color:var(--muted);margin:24px 0 0;font-size:.82rem}.lab-next{margin:8px auto 0}.lab-links{margin:24px auto}.lab-choices,.lab-presets{flex-wrap:wrap;justify-content:center;gap:10px;margin:12px auto;display:flex}.lab-choices button,.lab-presets button{border:2px solid var(--border);background:var(--surface-2);min-height:52px;color:var(--text);font:inherit;cursor:pointer;border-radius:14px;padding:9px 16px;font-weight:800}.lab-choices button:hover,.lab-choices button:focus-visible,.lab-presets button:hover,.lab-presets button:focus-visible{border-color:var(--subject)}.lab-choices button.is-selected{background:var(--subject-soft);border-color:var(--subject);box-shadow:var(--shadow-sm)}.abacus-frame{background:repeating-linear-gradient(0deg,#ffefce 0 18px,#fff4da 18px 36px);border:12px solid #b77843;border-radius:24px;place-items:center;width:min(100%,670px);min-height:170px;margin:auto;display:grid;position:relative;box-shadow:inset 0 0 0 3px #e4b680}.abacus-rod{background:#716760;border-radius:9px;height:8px;position:absolute;left:5%;right:5%;box-shadow:0 3px 3px #0003}.abacus-beads{width:92%;height:70px;position:relative}.abacus-bead{color:#0000;cursor:grab;touch-action:none;background:linear-gradient(135deg,#ffdb75,#f5a826 65%,#c86a13);border:0;border-radius:50%;min-width:0;max-width:58px;height:62px;transition:left .4s,transform .25s,background .25s,box-shadow .25s;position:absolute;top:4px;box-shadow:inset -5px -5px #9d511355,0 4px #a05f29}.abacus-bead:nth-child(2n){background:linear-gradient(135deg,#ffa7a8,#ec5e70 65%,#a83457);box-shadow:inset -5px -5px #78223855,0 4px #a83e52}.abacus-bead.is-active{outline-offset:1px;outline:3px solid #3849bb;transform:scale(1.08)}.abacus-bead:focus-visible{outline:4px solid var(--primary);outline-offset:3px}.abacus-bead:active{cursor:grabbing}.abacus-controls{flex-wrap:wrap;justify-content:center;align-items:center;gap:14px;display:flex}.abacus-count{min-width:100px;color:var(--subject);font-size:2rem;font-weight:900}.abacus-count small{color:var(--muted);font-size:.8rem;line-height:1;display:block}.fraction-whole{background:#ffe0aa;border:4px solid #e8a652;border-radius:22px;gap:5px;width:min(100%,680px);margin:24px auto 12px;padding:8px;display:grid}.fraction-piece{color:#d09b59;cursor:pointer;background:#fff6e6;border:2px solid #e8a652;border-radius:12px;min-width:0;min-height:130px;font-size:clamp(1.1rem,3vw,2rem);transition:transform .2s,background .2s,box-shadow .2s}.fraction-piece.is-filled{background:#ffb45b;transform:translateY(-5px);box-shadow:0 5px #d77828}.fraction-piece:focus-visible{outline:3px solid var(--primary)}.fraction-result{justify-content:center;align-items:baseline;gap:12px;margin:14px 0;display:flex}.fraction-result strong{color:var(--subject);font-size:2.2rem}.fraction-result span{color:var(--muted)}.water-stage{background:linear-gradient(#d9efff,#f8fcff);border-radius:24px;width:min(100%,640px);height:280px;margin:auto;position:relative;overflow:hidden}.water-vessel{opacity:.7;border:8px solid #82b8de;border-top:0;border-radius:5px 5px 32px 32px;width:58%;height:57%;position:absolute;bottom:10%;left:21%}.water-vessel:after{content:"";background:#64bbef88;border-radius:0 0 20px 20px;height:57%;transition:height .5s,opacity .5s;position:absolute;bottom:4px;left:4px;right:4px}.phase-solide .water-vessel:after{background:#c4efff;height:67%}.phase-gaz .water-vessel:after{opacity:.45;height:8%}.water-particle{z-index:2;background:#268ad3;border-radius:50%;width:15px;height:15px;transition:left .65s,top .65s,background .65s;position:absolute;box-shadow:0 2px 6px #1866a455}.phase-solide .water-particle{background:#2e97ca}.phase-liquide .water-particle{animation:1.9s ease-in-out infinite alternate water-wiggle}.phase-gaz .water-particle{background:#a6def7;animation:2.8s ease-in-out infinite alternate water-rise}.water-phase-label{z-index:3;color:#16557e;font-weight:900;position:absolute;bottom:4%;left:0;right:0}.water-controls{width:min(100%,640px);margin:22px auto}.water-controls label{font-size:1.15rem;font-weight:800;display:block}.water-controls input[type=range]{width:100%;height:36px;accent-color:var(--subject);cursor:pointer}@keyframes water-wiggle{to{transform:translate(8px,-5px)}}@keyframes water-rise{to{opacity:.55;transform:translate(4px,-19px)}}.mixture-stage{background:linear-gradient(#f9f5e9,#e6f3ff);border-radius:25px;width:min(100%,620px);height:290px;margin:18px auto 8px;position:relative;overflow:hidden}.mixture-glass{border:7px solid #82b8de;border-top:0;border-radius:0 0 34px 34px;width:42%;height:78%;position:absolute;bottom:14px;left:29%;overflow:hidden}.mixture-water{background:#7acaf1b8;height:70%;position:absolute;bottom:0;left:0;right:0}.mixture-bit{z-index:2;background:#eee8db;border-radius:50%;width:12px;height:12px;transition:top .8s,opacity .8s;position:absolute;top:45%}.mixture-sel.is-stirred .mixture-bit{opacity:.45;width:5px;height:5px;animation:1.8s ease-in-out infinite alternate water-wiggle;top:70%}.mixture-sable .mixture-bit{background:#b98454}.mixture-sable.is-stirred .mixture-bit{top:92%}.mixture-huile .mixture-bit{background:#e7bc33}.mixture-huile.is-stirred .mixture-bit{border-radius:50%;width:20px;height:12px;top:35%}.mixture-emoji{font-size:2.4rem;position:absolute;top:8%;right:19%}.circuit-stage{background:#edf4fe;border-radius:22px;width:min(100%,680px);margin:18px auto;padding:8px}.circuit-stage svg{width:100%;display:block}.circuit-wire{fill:none;stroke:#4b6284;stroke-width:9px;stroke-linecap:round;stroke-linejoin:round}.circuit-material{stroke-width:13px;stroke-linecap:round;transition:stroke .3s}.circuit-material-metal{stroke:#9ca9b5}.circuit-material-plastic{stroke:#d77b46}.circuit-flow{fill:none;stroke:#ffc72c;stroke-width:5px;stroke-dasharray:8 15;stroke-linecap:round;animation:1s linear infinite circuit-move}.circuit-contact{stroke:#df8c32;stroke-width:12px;stroke-linecap:round;transition:all .25s}.circuit-node{fill:#df8c32}.circuit-battery{fill:#344462}.circuit-symbol{fill:#fff;font-size:24px;font-weight:900}.circuit-bulb{fill:#d6dce5;stroke:#5e6980;stroke-width:7px;transition:fill .3s}.circuit-bulb-glow{fill:#ffda58;opacity:0;transition:opacity .3s}.is-lit .circuit-bulb{fill:#ffd84f}.is-lit .circuit-bulb-glow{opacity:.65;animation:1.1s ease-in-out infinite alternate bulb-pulse}.circuit-filament{fill:none;stroke:#987423;stroke-width:4px}.circuit-label{fill:#36415b;font-size:18px;font-weight:800}.circuit-controls{flex-wrap:wrap;justify-content:center;align-items:center;gap:20px;display:flex}.circuit-controls fieldset{border:2px solid var(--border);border-radius:14px;padding:4px 14px}.circuit-controls legend{font-size:.9rem;font-weight:800}@keyframes circuit-move{to{stroke-dashoffset:-23px}}@keyframes bulb-pulse{to{opacity:.9;transform-origin:495px 160px;transform:scale(1.07)}}@media (width<=560px){.lesson-lab-callout{flex-wrap:wrap}.lesson-lab-callout .btn{width:100%}.lab-header{align-items:flex-start}.lab-header>span{flex-basis:56px;width:56px;height:56px;font-size:1.8rem}.abacus-frame{border-width:8px;min-height:135px}.abacus-bead{height:48px}.fraction-piece{min-height:88px}.circuit-controls{flex-direction:column}}@media (prefers-color-scheme:dark){.water-stage,.circuit-stage,.mixture-stage{background:#243c55}.water-phase-label{color:#153650}.fraction-piece{background:#fff0d9}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}.confetti{display:none}}
