/* Palette officielle NamiQuest.eu : night, abyss, teal, green, gold. */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@700&display=swap');
:root,body[data-school-level=college]{--ink:#EAF7F6;--muted:#a9c7c7;--purple:#59d9c5;--bg:#02121F;--line:#ffffff20;--font:'Plus Jakarta Sans',system-ui,sans-serif;--night:#041B2E;--teal:#14B8A6;--green:#15B36A;--gold:#FFB020}
.mobile-brand{display:none}@media(max-width:760px){.mobile-brand{display:flex;align-items:center;gap:7px;color:#EAF7F6;text-decoration:none;font:700 16px 'Space Grotesk',system-ui}.mobile-brand img{border-radius:8px}.topbar{gap:10px}.grade-picker{margin-left:auto}.profile{gap:5px}.topbar .search-shell{flex-basis:100%}}
.lesson-body .feedback{background:#def5ed;color:#173e36}.lesson-body .read-button{background:#e6f4f0;color:#087e70}.stat strong{font-family:'Space Grotesk',system-ui}
body{background:radial-gradient(ellipse at 40% 0%,#14b8a615,transparent 45rem),var(--bg);color:var(--ink)}
h1,h2,h3,h4,.brand{font-family:'Space Grotesk',system-ui,sans-serif}.brand{letter-spacing:-.5px}.brand-mark{background:none;transform:none;width:45px;height:45px}.brand-mark img{width:45px;height:45px;object-fit:cover;border-radius:13px}.brand-name{display:grid;line-height:1.1}.brand-name small{font:600 9px var(--font);letter-spacing:.8px;color:var(--muted);margin-top:6px}.sidebar,.topbar{background:#041B2E}.sidebar{border-color:var(--line)}.nav button.active,.nav button:hover{background:#14b8a61a;color:#80e8d9}.sidebar .tiny{color:#8FB3B4}.side-bottom{background:#ffffff08}.side-bottom p{color:var(--muted)}
.search-shell,.grade-picker select,.library-search{background:#102b3b;border-color:#ffffff26;color:var(--ink)}.search-shell input{color:var(--ink)}input::placeholder,textarea::placeholder{color:#9db6bd}.grade-picker select option{background:#102b3b;color:var(--ink)}.xp-pill{background:#ffb02012;color:#ffd274;border-color:#ffb02040}.avatar{background:#14b8a61a}.date-tag{background:#ffffff08}.hero,body[data-school-level=college] .hero{background:radial-gradient(ellipse at 85% 50%,#14b8a62b,transparent 70%),linear-gradient(120deg,#0b3343,#041B2E);border:1px solid #14b8a638}.hero h2,body[data-school-level=college] .hero h2{color:#EAF7F6}.hero p{color:#CDE9E6}.hero .eyebrow{color:#82dfce}.hero-art{opacity:.95!important}
.button,body[data-school-level=college] .button{background:linear-gradient(120deg,#14B8A6,#15B36A);color:#02121F;box-shadow:0 4px 0 #087666}.button:active{box-shadow:0 1px 0 #087666}.button.secondary{background:#ffffff0a;color:var(--ink);border:1px solid var(--line);box-shadow:none}.text-link{color:var(--purple)}
.stat,.world,.panel,.lesson-card,.class-card,.empty,.badge,.lesson-aside .panel{background:#0c2637;color:var(--ink);border-color:var(--line)}.world-icon{background:#ffffff0e}.world:hover,.lesson-card:hover{border-color:#59d9c580}.lesson-card .tag{color:#91e4d7}.pill,.grade-tag,.step-num{background:#14b8a61a;color:#8ce8da}.filter{background:#0c2637;color:var(--muted)}.filter.active{background:#14B8A6;color:#02121F;border-color:#14B8A6}.class-card.chosen{background:#14b8a61a;border-color:#59d9c5}.class-card strong{font-family:'Space Grotesk',system-ui}.progress-track{background:#ffffff12}.progress-track i{background:linear-gradient(90deg,#14B8A6,#FFB020)}.completed{color:#7fe2ba}.school-loading{color:#59d9c5}.official-grade,.parent-grade-note{background:#14b8a610}
.parent-grid input,.journal-form input,.journal-form select,.panel textarea{background:#041B2E;color:var(--ink);border-color:var(--line)}.school-confirm{background:#0c2637;color:var(--ink);border:1px solid var(--line)}.school-confirm::backdrop{background:#02121fcc}
/* Les fiches gardent un fond clair pour lire, écrire et manipuler les schémas. */
.lesson-body{--ink:#102d3e;--muted:#496877;--purple:#087e70;--line:#d3e6e5;background:#f7fcfb;color:var(--ink)}.lesson-body .pill,.lesson-body .step-num{color:#076c60;background:#def5ed}.lesson-body .method,.lesson-body .objective,.lesson-body .practice-hero{background:#e6f4f0}.lesson-body .button.secondary{background:#fff;color:#102d3e;border-color:#d3e6e5}.lesson-body .source-detail a{color:#087e70}.lesson-body .input-answer,.lesson-body textarea{background:#fff;color:#102d3e}.lesson-body .answer{background:#fff;color:#102d3e;border-color:#d3e6e5}.lesson-body .answer.selected{background:#dbf4eb;border-color:#087e70}.lesson-body .answer.selected span{background:#087e70;color:#fff}.lesson-body .order-chip{background:#e6f4f0;color:#102d3e}.lesson-body .math-visual{background:#fff}.example p{white-space:pre-line}.lesson-body .progress-track{background:#dcece8}.lesson-body .example h3{color:#087e70}.lesson-body .remember{background:#fff5dd;color:#65511c}
.nami-free{display:inline-flex;align-items:center;gap:8px;border:1px solid #59d9c550;border-radius:999px;padding:6px 11px;color:#91e4d7;font-size:11px;font-weight:800;margin-bottom:16px;background:#14b8a611}.parent-invite{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:26px;padding:22px 26px;background:#0c2637;border:1px solid var(--line);border-radius:18px}.parent-invite h3{font-size:18px;margin-bottom:8px}.parent-invite p{margin:0;color:var(--muted);font-size:13px}.nami-parent{margin-top:24px;background:radial-gradient(ellipse at 100% 0%,#14b8a630,transparent 70%),#0c2637}.nami-parent h2{font-size:27px;margin:8px 0 14px}.nami-parent p{max-width:750px;color:#CDE9E6}.nami-parent .eyebrow{color:#FFB020}.nami-parent .actions{display:flex;flex-wrap:wrap;gap:12px}.nami-parent .note{font-size:12px;margin:16px 0 0;color:var(--muted)}.nami-logo-card{width:66px;height:66px;object-fit:cover;border-radius:16px;margin-bottom:14px}
@media(max-width:760px){.brand{font-size:19px}.brand-mark,.brand-mark img{width:36px;height:36px}.brand-name small{font-size:8px}.parent-invite{display:block;padding:20px}.parent-invite .button{margin-top:16px}.nami-parent h2{font-size:23px}}
@media print{body,.lesson-body{background:white;color:#102d3e}.parent-invite,.nami-parent{display:none}}
/* Messages temporaires : contraste indépendant des couleurs de la fiche. */
#toast{background:#102d3e;color:#f7fcfb;border:1px solid #59d9c5;box-shadow:0 8px 24px #02121f40;font-size:15px;font-weight:600;line-height:1.5;width:max-content;max-width:min(480px,calc(100vw - 32px));padding:14px 20px;bottom:calc(24px + env(safe-area-inset-bottom,0px));overflow-wrap:anywhere}
@media(max-width:760px){#toast{bottom:calc(86px + env(safe-area-inset-bottom,0px))}}
.nami-companion{display:block;width:100%;height:auto}.side-bottom .mini-bot{width:100px}.hero-art{display:flex;align-items:center;justify-content:center;min-width:0}.nami-hero-orbit{position:relative;display:grid;place-items:center;width:100%;height:100%;padding:12px 28px;background:radial-gradient(ellipse,#14b8a628,transparent 65%)}.nami-hero-character{display:block;width:min(100%,250px);height:280px;object-fit:contain;filter:drop-shadow(0 15px 20px #02121f55);animation:nami-bob 5s ease-in-out infinite}.nami-orbit-star{position:absolute;right:20%;top:12%;color:#FFB020;font-size:24px;animation:twinkle 4s ease-in-out infinite}.nami-feedback{float:right;object-fit:contain;margin-left:16px;max-width:72px;height:87px}.feedback{display:flow-root}.brand-mark img,.nami-logo-card{object-fit:contain;background:#041B2E}@keyframes nami-bob{50%{transform:translateY(-7px)}}@media(prefers-reduced-motion:reduce){.nami-hero-character,.nami-orbit-star{animation:none}}body.calm .nami-hero-character,body.calm .nami-orbit-star{animation:none}@media(max-width:760px){.nami-hero-character{height:190px}.nami-hero-orbit{padding:0 15px}.hero-text{padding:25px}.hero{min-height:300px}}@media print{.nami-feedback{display:none}}
