/* Candelium AI · plateforme de physique-chimie */
:root{
  --paper:#f8f7f3;--sheet:#fffefa;--ink:#152a43;--muted:#657180;--line:#e5e0d4;--grid:rgba(21,42,67,.035);
  --accent:#173655;--accent-soft:#e9eff4;--gold:#bb8c35;--gold-soft:#f7f0e2;--red:#c8253d;--red-soft:#fdebed;--ok:#16845f;--ok-soft:#e4f5ee;--warn:#a35b00;--warn-soft:#fdf1df;
  --display:"Archivo",system-ui,sans-serif;--body:"Instrument Sans",system-ui,-apple-system,"Segoe UI",sans-serif;--pen:"Caveat","Comic Sans MS",cursive;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){:root{
  --paper:#111823;--sheet:#192534;--ink:#edf1f5;--muted:#a8b3be;--line:#304052;--grid:rgba(182,147,78,.035);
  --accent:#a9c2d9;--accent-soft:#243547;--gold:#dbb768;--gold-soft:#3b3322;--red:#ff7a8c;--red-soft:#3a1d27;--ok:#5fd3a0;--ok-soft:#173529;--warn:#f0b35a;--warn-soft:#352812;color-scheme:dark;}}
*{box-sizing:border-box}
html,body{margin:0}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip-link{position:fixed;z-index:100;top:8px;left:8px;transform:translateY(-160%);padding:10px 14px;background:var(--sheet);color:var(--accent);border:2px solid var(--accent);border-radius:8px;font-weight:700}
.skip-link:focus{transform:translateY(0)}
body{background:linear-gradient(var(--grid) 1px,transparent 1px),linear-gradient(90deg,var(--grid) 1px,transparent 1px),radial-gradient(ellipse at 6% -8%,rgba(187,140,53,.09),transparent 32%),radial-gradient(ellipse at 96% 8%,rgba(23,54,85,.07),transparent 27%),var(--paper);background-size:22px 22px,22px 22px,auto,auto;color:var(--ink);font-family:var(--body);font-size:16px;line-height:1.55;min-height:100vh}
a{color:var(--accent)}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px clamp(16px,4vw,40px);border-bottom:1px solid color-mix(in srgb,var(--line) 72%,transparent);background:color-mix(in srgb,var(--sheet) 90%,transparent);backdrop-filter:blur(14px)}
.brand{display:flex;align-items:center;gap:10px;font-family:var(--display);font-weight:800;font-size:1.2rem;text-decoration:none;color:var(--ink);letter-spacing:-.035em}
.brand-mark{display:block;width:48px;height:48px;object-fit:cover;border:2px solid var(--gold);border-radius:50%;background:#fcf8f1;box-shadow:0 5px 14px rgba(23,54,85,.15)}
.brand-name{display:grid;line-height:1.02}.brand-main{white-space:nowrap}.brand-name b{color:var(--gold)}.brand-name small{margin-top:4px;font:700 .57rem var(--body);letter-spacing:.12em;color:var(--muted)}
.who{display:flex;gap:10px;align-items:center;font-size:.9rem;color:var(--muted)}
main{max-width:1180px;margin:0 auto;padding:28px clamp(16px,4vw,40px) 64px;display:flex;flex-direction:column;gap:20px}
.panel{background:var(--sheet);border:1px solid var(--line);border-radius:14px;padding:20px;box-shadow:0 8px 24px rgba(28,29,61,.035)}
h1,h2,h3{font-family:var(--display);margin:0;text-wrap:balance}
h1{font-size:clamp(1.5rem,3vw,2rem);font-weight:800}
h2{font-size:1.35rem;font-weight:700}
h3{font-size:1.02rem;font-weight:700}
p{margin:0}
.stack{display:flex;flex-direction:column;gap:12px}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
.muted,.small{color:var(--muted)}
.small{font-size:.86rem}
label{font-weight:600;font-size:.9rem;display:block;margin-bottom:5px}
input,select,textarea{width:100%;font:inherit;color:var(--ink);background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:9px 10px}
textarea{min-height:90px;resize:vertical;background:var(--sheet)}
input:focus,select:focus,textarea:focus,button:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
button,.btn{font:inherit;font-weight:600;cursor:pointer;border-radius:8px;border:1px solid var(--line);background:var(--sheet);color:var(--ink);padding:9px 14px;text-decoration:none;display:inline-flex;align-items:center;gap:6px}
button.primary,.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}
button.red{background:var(--red);border-color:var(--red);color:#fff}
button.ghost{background:transparent;border-color:transparent;color:var(--accent);padding:6px 8px}
button.danger{color:var(--red)}
button:disabled{opacity:.55;cursor:not-allowed}
button[aria-pressed="true"]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}
@media (prefers-color-scheme:dark){button.primary,.btn.primary{color:#0d1220}}
.chip{font-size:.76rem;font-weight:700;padding:3px 9px;border-radius:999px;background:var(--accent-soft);color:var(--accent);white-space:nowrap}
.chip.ok{background:var(--ok-soft);color:var(--ok)}.chip.warn{background:var(--warn-soft);color:var(--warn)}.chip.red{background:var(--red-soft);color:var(--red)}.chip.grey{background:var(--paper);color:var(--muted);border:1px solid var(--line)}
.card{display:flex;flex-direction:column;gap:8px;text-decoration:none;color:inherit;background:color-mix(in srgb,var(--sheet) 96%,var(--accent-soft));border:1px solid var(--line);border-radius:16px;padding:18px;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;box-shadow:0 7px 22px rgba(28,29,61,.04)}
.card:hover{border-color:color-mix(in srgb,var(--accent) 50%,var(--line));transform:translateY(-2px);box-shadow:0 14px 30px rgba(48,42,120,.09)}
.student-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.student-overview>div{display:flex;align-items:baseline;gap:9px;background:var(--sheet);border:1px solid var(--line);border-radius:10px;padding:12px 16px}
.student-overview b{font-family:var(--display);font-size:1.45rem;color:var(--accent);font-variant-numeric:tabular-nums}
.student-overview span{font-size:.88rem;color:var(--muted)}
.student-work{gap:18px}.student-groups{gap:22px}.student-group{display:flex;flex-direction:column;gap:10px}
.student-group-heading{display:flex;align-items:center;gap:9px}.student-group-heading h2{font-size:1.15rem}
.student-assignment{min-height:150px}.student-assignment h3{margin-top:3px}.student-open{margin-top:auto;padding-top:6px;color:var(--accent);font-size:.9rem;font-weight:700}
.student-practice-list{gap:8px}.student-practice-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:inherit;text-decoration:none}.student-practice-item>span:first-child{display:flex;flex-direction:column;gap:2px}.student-practice-item .student-open{padding:0;white-space:nowrap}.student-practice-item:hover{border-color:var(--accent)}
@media(max-width:600px){.student-overview{grid-template-columns:1fr;gap:8px}.student-overview>div{padding:8px 12px}.student-work{padding:16px}.student-assignment{min-height:0}}
@media(max-width:600px){.student-practice-item{align-items:flex-start;flex-direction:column;gap:4px}.student-practice-item .student-open{white-space:normal}}
body.plein-ecran .topbar,body.plein-ecran .pied{display:none!important}
body.plein-ecran main#app{width:100%;max-width:none;height:100dvh;margin:0;padding:10px 14px;gap:8px;overflow:auto}
.code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:1.4rem;font-weight:700;letter-spacing:.12em;color:var(--accent)}
.tabs{display:flex;gap:4px;border-bottom:2px solid var(--line);flex-wrap:wrap}
.tabs a,.tabs button{border:0;border-bottom:3px solid transparent;border-radius:8px 8px 0 0;background:transparent;color:var(--muted);padding:10px 16px;margin-bottom:-2px;text-decoration:none;font-weight:600}
.tabs [aria-selected="true"],.tabs .on{color:var(--accent);border-bottom-color:var(--accent);background:var(--sheet)}
.tabs button:disabled{opacity:.45}
table{border-collapse:collapse;width:100%;font-size:.92rem}
th,td{text-align:left;padding:8px 10px;border-bottom:1px solid var(--line);vertical-align:top}
th{font-size:.8rem;text-transform:uppercase;letter-spacing:.03em;color:var(--muted);font-weight:700}
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums}
.table-wrap{overflow-x:auto}
tr.click{cursor:pointer}tr.click:hover td{background:var(--paper)}
.note-cell{font-weight:700;font-variant-numeric:tabular-nums;text-align:center;border-radius:6px}
.n-good{background:var(--ok-soft);color:var(--ok)}.n-mid{background:var(--warn-soft);color:var(--warn)}.n-bad{background:var(--red-soft);color:var(--red)}
.status{font-size:.92rem;color:var(--muted);min-height:1.3em}
.status.err{color:var(--red)}
.spin{display:inline-block;width:14px;height:14px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:s .8s linear infinite;vertical-align:-2px;margin-right:6px}
@keyframes s{to{transform:rotate(360deg)}}
.route-loading{display:flex;align-items:center;gap:10px;min-height:clamp(150px,28vh,300px);padding:22px;background:var(--sheet);border:1px solid var(--line);border-radius:14px;color:var(--muted)}
body.is-navigating::after{content:"";position:fixed;z-index:10000;top:0;left:0;width:34%;height:3px;background:var(--gold);box-shadow:0 0 10px color-mix(in srgb,var(--gold) 50%,transparent);pointer-events:none;animation:navigation-progress 1.1s ease-in-out infinite}
@keyframes navigation-progress{0%{transform:translateX(-110%)}100%{transform:translateX(410%)}}
@media (prefers-reduced-motion:reduce){.spin{animation:none}}
@media (prefers-reduced-motion:reduce){body.is-navigating::after{width:42%;animation:none}}
.hidden{display:none!important}
.pied{text-align:center;padding:28px 16px 36px;font-size:.85rem}
.pied a{color:var(--muted)}
.labo-item{border:1px solid var(--line);border-radius:8px;padding:10px 12px;gap:6px;background:var(--paper)}
#labolist{max-height:70vh;overflow:auto;gap:8px}
.pdf-view{width:100%;box-sizing:border-box;max-height:75vh;overflow:auto;border:1px solid var(--line);border-radius:8px;background:#e9e9e9;padding:8px;display:grid;gap:8px}
.pdf-view canvas{width:100%;height:auto;display:block;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.pdf-view .pdf-page{width:100%;min-height:80px;contain:content;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.pdf-view .pdf-page canvas{box-shadow:none}
.pdf-view .status{padding:16px}
.sticky-enonce .pdf-view{max-height:none;overflow:visible}
.pdf-figure-actions{align-items:center;gap:10px}
.pdf-figure-actions .small{margin:0}
.figure-dialog{width:min(920px,94vw);max-width:none;max-height:94vh;padding:0;border:1px solid var(--line);border-radius:18px;background:var(--sheet);color:var(--ink);box-shadow:0 24px 80px rgba(20,28,50,.32)}
.figure-dialog::backdrop{background:rgba(15,20,35,.58);backdrop-filter:blur(3px)}
.figure-dialog-inner{display:grid;gap:12px;padding:clamp(14px,2.5vw,24px)}
.figure-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.figure-dialog-head h2{margin:5px 0 0;font-size:1.3rem}
.figure-dialog-inner>p{margin:0}
.figure-stage{display:grid;gap:10px;min-height:0}
.figure-select-row{display:grid;grid-template-columns:minmax(130px,.65fr) minmax(180px,1fr);align-items:center;gap:10px}
.figure-pdf-viewport{max-height:56vh;overflow:auto;border:1px solid var(--line);border-radius:12px;padding:10px;background:#e8ebf1}
.figure-page-zoom-tools{display:flex;justify-content:flex-end;align-items:center;gap:6px;flex-wrap:wrap}
.figure-page-zoom-tools [role="group"]{display:flex;align-items:center;gap:4px}
.figure-page-zoom-tools button{min-height:36px;padding:5px 10px}
.figure-pick-surface{position:relative;width:min(100%,900px);margin:0 auto;touch-action:none;user-select:none;cursor:crosshair}
.figure-pick-surface>canvas{display:block;width:100%;height:auto;background:white;box-shadow:0 2px 8px rgba(20,28,50,.18)}
.figure-pick-surface.is-panning,.figure-pick-surface.is-panning>canvas{cursor:grab}
.figure-selection{position:absolute;z-index:1;border:2px solid #5b3df5;background:rgba(91,61,245,.13);box-shadow:0 0 0 9999px rgba(20,28,50,.2);pointer-events:none}
.figure-dialog-actions{justify-content:space-between;gap:10px}
.figure-zoom-tools{display:flex;justify-content:flex-end;align-items:center;gap:8px}
.figure-zoom-tools [role="group"]{display:flex;align-items:center;gap:4px}
.figure-zoom-tools button{min-height:36px;padding:5px 11px}
.figure-editor-viewport{max-width:100%;max-height:56vh;overflow:auto;border:1px solid var(--line);border-radius:12px;background:#eef0f5;touch-action:pan-x pan-y;overscroll-behavior:contain}
.figure-editor{position:relative;flex:none;overflow:hidden;border-radius:11px;background:white;touch-action:none;box-shadow:0 2px 8px rgba(20,28,50,.12)}
.figure-editor>img{display:block;width:100%;height:100%;object-fit:fill;pointer-events:none;user-select:none}
.figure-editor>canvas{position:absolute;inset:0;display:block;width:100%;height:100%;touch-action:none;cursor:crosshair}
.figure-editor.is-panning,.figure-editor.is-panning>canvas{cursor:grab}
.figure-draw-tools{align-items:center;gap:8px;flex-wrap:wrap}
.figure-tools{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.figure-tools button{min-height:38px;padding:6px 11px}
.figure-tools button[aria-pressed="true"]{color:var(--accent);background:var(--accent-soft);border-color:var(--accent)}
.figure-label-entry{display:grid;gap:3px;min-width:min(240px,100%);font-size:.84rem;color:var(--muted)}
.figure-label-entry input{min-height:38px;padding:6px 10px}
.figure-colors{display:inline-flex;align-items:center;gap:8px}
.figure-colors button{width:32px;min-width:32px;height:32px;padding:0;border-radius:50%;border:2px solid white;box-shadow:0 0 0 1px var(--line)}
.figure-colors button[aria-pressed="true"]{box-shadow:0 0 0 2px var(--accent)}
.figure-dialog .status{margin:0;min-height:1.3em}
@media(max-width:600px){.figure-dialog{width:100vw;max-width:100vw;max-height:96vh;border-radius:16px 16px 0 0;margin:auto 0 0}.figure-dialog-inner{padding:14px}.figure-pdf-viewport,.figure-editor-viewport{max-height:48vh}.figure-draw-tools{display:flex;flex-wrap:wrap}.figure-dialog-actions>*{flex:1}.pdf-figure-actions{align-items:stretch;flex-direction:column}.figure-select-row{grid-template-columns:1fr;gap:4px}.figure-zoom-tools,.figure-page-zoom-tools{justify-content:space-between}}
.context{max-width:72ch}
.data{background:var(--paper);border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:6px;padding:10px 14px;max-width:72ch}
.data ul{margin:4px 0 0;padding-left:18px}
.qlist{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.qlist .pts{color:var(--muted);font-size:.85rem;white-space:nowrap}
.sticky-enonce{position:sticky;top:0;z-index:5;background:var(--sheet);border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:8px;box-shadow:0 6px 14px -10px rgba(0,0,0,.35)}
.sticky-enonce summary{cursor:pointer;padding:10px 14px;font-weight:600;display:flex;justify-content:space-between;gap:10px;list-style:none}
.sticky-enonce summary::-webkit-details-marker{display:none}
.sticky-enonce summary::after{content:"Replier";font-weight:500;font-size:.85rem;color:var(--accent)}
.sticky-enonce:not([open]) summary::after{content:"Afficher le sujet"}
.sticky-enonce .inner{max-height:38vh;overflow:auto;padding:0 14px 12px;font-size:.94rem;display:grid;gap:8px}
.mode{display:inline-flex;flex-wrap:wrap;border:1px solid var(--line);border-radius:8px;overflow:hidden;max-width:100%}
.mode button{border:0;border-radius:0;font-size:.85rem;padding:7px 12px}
.mode button+button{border-left:1px solid var(--line)}
.pad{border:1px solid var(--line);border-radius:8px;background:#fff}
.pad canvas{display:block;width:100%;touch-action:none;cursor:crosshair;border-radius:8px 8px 0 0;background:#fff;
  background-image:linear-gradient(90deg,transparent 56px,rgba(200,37,44,.45) 56px,rgba(200,37,44,.45) 58px,transparent 58px),linear-gradient(rgba(40,80,160,.12) 1px,transparent 1px);background-size:100% 100%,100% 30px}
.pad-tools{position:sticky;bottom:0;display:flex;gap:6px;flex-wrap:wrap;align-items:center;padding:6px;background:var(--paper);border-top:1px solid var(--line);border-radius:0 0 8px 8px}
.pad-tools button{font-size:.8rem;padding:5px 9px}
.pad-tools .sep{flex:1}
.sheet-text{min-height:60vh;line-height:1.9;font-size:1.02rem;background-image:linear-gradient(transparent calc(1.9em - 1px),rgba(40,80,160,.12) 1px);background-size:100% 1.9em;background-attachment:local}
.dropzone{border:2px dashed var(--line);border-radius:10px;padding:16px;display:grid;gap:10px}
.dropzone.over{border-color:var(--accent);background:var(--accent-soft)}
.file-btn{position:relative;overflow:hidden;display:inline-flex}
.file-btn input{position:absolute;inset:0;opacity:0;cursor:pointer}
.thumbs{display:flex;gap:10px;flex-wrap:wrap}
.thumb{position:relative}
.thumb small{display:block;max-width:170px;margin-top:3px;color:var(--muted);font-size:.76rem;line-height:1.2}
.thumb img{height:96px;max-width:170px;object-fit:cover;border-radius:6px;border:1px solid var(--line);display:block;background:#fff}
.thumb button{position:absolute;top:-8px;right:-8px;width:24px;height:24px;padding:0;border-radius:50%;font-size:.8rem;justify-content:center}
.copy-img{max-width:100%;border:1px solid var(--line);border-radius:8px;background:#fff}
kbd{font-family:inherit;font-size:.8em;border:1px solid var(--line);border-bottom-width:2px;border-radius:4px;padding:0 5px;background:var(--sheet)}
.verdict{border-radius:8px;padding:12px 14px;display:grid;gap:6px;border-left:5px solid var(--red);background:var(--red-soft)}
.verdict.juste{border-left-color:var(--ok);background:var(--ok-soft)}
.verdict.partiel{border-left-color:var(--warn);background:var(--warn-soft)}
.verdict .pen{font-family:var(--pen);font-size:1.45rem;line-height:1.15;color:var(--red)}
.verdict.juste .pen{color:var(--ok)}.verdict.partiel .pen{color:var(--warn)}
.verdict dl{margin:0;display:grid;grid-template-columns:max-content 1fr;gap:4px 12px}
.verdict dt{font-weight:600;font-size:.88rem}.verdict dd{margin:0}
.result-questions{display:grid;gap:8px}
.result-question{border:1px solid var(--line);border-radius:9px;background:var(--paper);overflow:hidden}
.result-question summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 14px;min-height:52px}
.result-question summary::-webkit-details-marker{display:none}
.result-question summary>span:first-child{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.result-question summary::after{content:"Voir le détail";font-size:.8rem;color:var(--accent);margin-left:auto;white-space:nowrap}
.result-question[open] summary::after{content:"Masquer le détail"}
.result-question .result-score{font-size:.88rem;font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}
.result-question>.stack{margin:0 10px 10px;padding:12px;background:var(--sheet);border-radius:7px}
@media(max-width:520px){.result-question summary{align-items:flex-start;flex-wrap:wrap}.result-question summary::after{margin-left:0}.result-question .result-score{margin-left:auto}}
.correction-sheet{position:relative;overflow:hidden;border:1px solid var(--line);border-left:5px solid var(--accent);border-radius:14px;background:var(--sheet);box-shadow:0 7px 22px rgba(28,29,61,.06)}
.correction-sheet-juste{border-left-color:var(--ok)}.correction-sheet-partiel{border-left-color:#d18a14}.correction-sheet-faux,.correction-sheet-vide{border-left-color:var(--red)}
.correction-sheet-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 16px;background:color-mix(in srgb,var(--accent-soft) 58%,var(--sheet));border-bottom:1px solid var(--line)}
.correction-sheet-q{display:flex;align-items:center;gap:8px;font-family:var(--display);font-weight:750}
.correction-sheet-score{font-family:var(--pen);font-size:1.75rem;line-height:1;color:var(--red);white-space:nowrap;transform:rotate(-3deg)}
.correction-sheet-score small{font:600 .75rem var(--body);color:var(--muted)}
.correction-sheet-paper{position:relative;display:grid;gap:10px;min-height:104px;padding:17px 24px 22px 62px;background-color:#fffdf7;background-image:repeating-linear-gradient(to bottom,transparent 0,transparent 2.05rem,rgba(72,116,194,.17) 2.05rem,rgba(72,116,194,.17) calc(2.05rem + 1px));color:#192d65;font-family:var(--pen);font-size:clamp(1.25rem,2vw,1.52rem);line-height:2.05rem;white-space:normal}
.correction-sheet-paper::before{position:absolute;left:46px;top:0;bottom:0;border-left:2px solid rgba(210,63,75,.36);content:""}
.corr-enonce{margin:0 0 2px;padding:8px 11px;border:1px dashed #cdd5e5;border-radius:8px;background:rgba(255,255,255,.72);color:var(--ink);font: .9rem/1.5 var(--body)}
.corr-enonce b,.corr-note>b{display:block;margin-bottom:2px;color:#657180;font:700 .71rem/1.3 var(--body);letter-spacing:.045em;text-transform:uppercase}
.corr-enonce p{margin:0}
.corr-note{position:relative;margin:0;padding:0 0 4px 13px;border-left:2px solid transparent;overflow-wrap:anywhere}
.corr-note p{margin:0;white-space:pre-wrap}
.corr-note-positive{border-left-color:#2c9470;color:#145c48}
.corr-note-error{border-left-color:#db4856;color:#b5223c}
.corr-note-explain{border-left-color:#6475cf;color:#192d65}
.corr-note-solution{border-left-color:#d2a747;color:#172e60}
.corr-note-tip{border-left-color:#2c9470;color:#145c48}
.corr-note-error>b{color:#b5223c}.corr-note-solution>b{color:#8a6927}.corr-note-positive>b,.corr-note-tip>b{color:#247856}
.corr-tag{display:inline-block;margin:0 0 3px;padding:1px 7px;border:1px solid #e9a8ad;border-radius:999px;color:#a92d3d;font:600 .72rem/1.5 var(--body)}
.correction-sheet-check{position:absolute;right:13px;bottom:8px;display:grid;place-items:center;width:32px;height:32px;border:2px solid currentColor;border-radius:50%;color:var(--red);font:700 1.45rem var(--pen);transform:rotate(-12deg);opacity:.8}
.correction-sheet-juste .correction-sheet-check{color:var(--ok)}.correction-sheet-partiel .correction-sheet-check{color:#b07712}
.corr-schema-label{margin-top:4px;color:var(--accent);font:700 .76rem/1.4 var(--body);letter-spacing:.04em;text-transform:uppercase}
.correction-sheet-schema{width:min(100%,620px);margin:0 auto;padding:10px;border:1px solid #d8dfea;border-radius:10px;background:#fff;text-align:center}
.correction-sheet-schema img{display:block;width:100%;max-height:330px;object-fit:contain}
.correction-sheet-schema figcaption{margin-top:4px;color:#56627b;font:600 .82rem/1.4 var(--body)}
.corr-copy-evidence{display:grid;gap:8px;margin-top:7px;padding:10px 12px;border:1px solid #d8deee;border-radius:10px;background:rgba(255,255,255,.82);font: .9rem/1.45 var(--body);color:#35324e}
.corr-copy-evidence-head{display:flex;justify-content:space-between;gap:10px;align-items:center;color:#5140c4}
.corr-copy-evidence-head span{padding:2px 8px;border-radius:999px;background:#eeebff;font-size:.76rem;font-weight:700}
.corr-copy-evidence blockquote{margin:0;padding:7px 10px;border-left:3px solid #7258ed;background:#f7f5ff;color:#28243c;font:600 .95rem/1.5 var(--body);white-space:pre-wrap}
.copy-evidence-image{position:relative;width:min(100%,520px);margin:0 auto;overflow:hidden;border:1px solid #d8deee;border-radius:8px;background:#fff;line-height:0}
.copy-evidence-image img{display:block;width:100%;height:auto;min-height:80px;object-fit:contain}
.copy-evidence-image img.load-error{min-height:80px}
.copy-evidence-image svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.copy-evidence-image rect{fill:rgba(255,59,72,.13);stroke:#f02944;stroke-width:.006;stroke-dasharray:.012 .008;vector-effect:non-scaling-stroke}
.copy-evidence-link{justify-self:start;color:#5140c4;font-size:.84rem;font-weight:700;text-decoration:none}
.copy-evidence-link:hover{text-decoration:underline}
.copy-quote-highlight{padding:2px 3px;border-radius:3px;background:#ffe07a;color:#241b00;box-shadow:0 0 0 2px rgba(255,184,0,.35)}
.copy-evidence-target{outline:3px solid #ffb31a!important;outline-offset:3px;border-radius:5px;transition:outline-color .2s}
.corr-explain{display:grid;gap:8px;margin-top:7px}
.corr-explain-button{justify-self:start;min-height:38px;padding:7px 12px;border:1px solid #d8d1fa;border-radius:999px;background:#f5f2ff;color:#5140c4;font:700 .84rem/1.25 var(--body);box-shadow:none}
.corr-explain-button:hover:not(:disabled){border-color:#8c7be9;background:#ece8ff}
.corr-explain-button:disabled{opacity:.65;cursor:wait}
.corr-explain-answer{padding:10px 12px;border:1px solid #dad5f6;border-left:3px solid #7258ed;border-radius:9px;background:#f9f7ff;color:#27243c;font:.95rem/1.55 var(--body);white-space:normal}
.corr-explain-answer b{display:block;margin-bottom:4px;color:#5140c4;font-size:.8rem}
.corr-explain-answer p{margin:0;white-space:normal}
.corr-explain-answer .small{display:block;margin-top:7px;color:var(--muted);font-size:.76rem}
.corr-explain-answer.is-loading{color:var(--muted);font-style:italic}
.corr-explain-answer.is-error{border-color:#efbdc4;border-left-color:var(--red);background:#fff6f7;color:#9a2639}
.result-question .correction-sheet{margin:0;border:0;border-radius:0;box-shadow:none;background:transparent}
.result-question .correction-sheet-head,.result-question .correction-sheet-check{display:none}
.result-question .correction-sheet-paper{border-radius:7px}
@media(max-width:520px){.correction-sheet-paper{padding:14px 15px 20px 49px;font-size:1.3rem;line-height:1.9rem;background-size:100% 1.9rem}.correction-sheet-paper::before{left:37px}.corr-note{padding-left:10px}.correction-sheet-check{right:8px;bottom:6px;width:28px;height:28px}}
@media(max-width:520px){.corr-copy-evidence{padding:9px}.copy-evidence-image{width:100%}.copy-evidence-link{font-size:.8rem}}
.attempt-compare{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:4px}
.attempt-card{display:grid;gap:7px;padding:12px;border:1px solid var(--line);border-radius:9px;background:var(--paper)}
.attempt-card.retained{border-color:var(--ok);box-shadow:inset 0 0 0 1px var(--ok-soft)}
.attempt-top{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap}
.attempt-top>b{font-size:.9rem}
.attempt-score{font-family:var(--display);font-weight:800;font-size:1.3rem;font-variant-numeric:tabular-nums}
.attempt-score span{font-family:var(--body);font-size:.82rem;font-weight:500;color:var(--muted)}
.attempt-card .track{height:9px}.attempt-card .fill{height:100%;border-radius:inherit;background:var(--accent)}
.attempt-card.retained .fill{background:var(--ok)}
@media(max-width:520px){.attempt-compare{grid-template-columns:1fr}.attempt-card{padding:10px 12px}}
@media (max-width:520px){.verdict dl{grid-template-columns:1fr}}
.tag{display:inline-block;font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;padding:1px 7px;border-radius:4px;border:1px solid currentColor;color:var(--red)}
.bignote{font-family:var(--pen);color:var(--red);font-size:3rem;line-height:1;border:3px solid var(--red);border-radius:50%;width:116px;height:116px;display:grid;place-items:center;transform:rotate(-6deg);font-variant-numeric:tabular-nums;flex:none}
.bignote small{font-size:1.3rem}
.bars{display:grid;gap:6px}
.bar{display:grid;grid-template-columns:minmax(120px,200px) 1fr auto;gap:10px;align-items:center;font-size:.9rem}
.progress-bars{gap:12px}
.pbar{grid-template-columns:minmax(0,1fr) auto;gap:5px 12px;padding:8px 0;border-bottom:1px solid var(--line)}
.pbar:last-child{border-bottom:0}
.pbar-name{min-width:0;overflow-wrap:anywhere}
.pbar-name .small{display:block}
.pbar .track{grid-column:1/-1;grid-row:2;height:10px}
.pbar .pbar-score{grid-column:2;grid-row:1;white-space:nowrap;font-variant-numeric:tabular-nums}
.pbar .fill{height:100%;border-radius:inherit}
.pbar:focus-visible{outline-offset:3px;border-radius:5px}
.pbar[href]:hover .pbar-name b{text-decoration:underline;color:var(--accent)}
.bar .track{height:12px;background:var(--paper);border-radius:6px;overflow:hidden;border:1px solid var(--line)}
.bar .fill{height:100%;background:var(--red)}
.bar .fill.blue{background:var(--accent)}
.q-edit{display:grid;grid-template-columns:70px 1fr 90px;gap:8px;align-items:start}
@media (max-width:620px){.q-edit{grid-template-columns:1fr}}
.notice{background:var(--warn-soft);border-radius:8px;padding:10px 14px;font-size:.93rem}
.center{max-width:440px;margin:6vh auto 0;width:100%}
.hero{display:grid;gap:14px;max-width:62ch}
.choice{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}
.choice .card h2{font-size:1.2rem}
.home-hero{position:relative;max-width:none;display:grid;grid-template-columns:minmax(0,1fr) minmax(190px,300px);align-items:center;gap:24px;overflow:hidden;padding:clamp(24px,5vw,54px);border:1px solid color-mix(in srgb,var(--gold) 24%,var(--line));border-radius:24px;background:linear-gradient(118deg,color-mix(in srgb,var(--sheet) 88%,var(--gold-soft)),var(--sheet) 62%,color-mix(in srgb,var(--sheet) 91%,#f3e9d3));box-shadow:0 18px 48px rgba(23,42,65,.08)}
.home-copy{display:grid;gap:14px}.home-logo{width:min(100%,300px);aspect-ratio:1;object-fit:contain;justify-self:end;border-radius:50%;filter:drop-shadow(0 10px 24px rgba(23,42,65,.12))}
.home-hero h1{max-width:18ch;font-size:clamp(2rem,5vw,3.5rem);line-height:1.06;letter-spacing:-.045em}
.home-hero p{max-width:66ch;font-size:1.05rem}
.home-hero-actions{margin-top:6px}
.home-hero-actions .btn{min-height:46px}
.home-audiences{display:grid;gap:16px}
.home-section-heading{display:grid;gap:5px}
.home-section-heading h2{font-size:clamp(1.35rem,3vw,1.8rem)}
.home-choice{grid-template-columns:repeat(2,minmax(0,1fr))}
.home-audience{min-height:100%;padding:clamp(20px,3vw,30px);gap:12px}
.home-audience:hover{transform:none;box-shadow:0 7px 22px rgba(28,29,61,.04)}
.home-audience>h2{font-size:clamp(1.35rem,3vw,1.75rem)!important}
.home-audience>p{max-width:62ch}
.home-audience ul{display:grid;gap:8px;margin:0;padding:0;list-style:none;color:var(--muted)}
.home-audience li{position:relative;padding-left:25px}
.home-audience li::before{content:"✓";position:absolute;left:0;color:var(--gold);font-weight:800}
.home-students{border-top:3px solid var(--gold)}
.home-teachers{border-top:3px solid var(--accent)}
.home-links{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:auto;padding-top:6px}
.home-text-link{padding:8px 4px;font-size:.9rem;font-weight:600}
.eyebrow{color:var(--gold);font-size:.72rem;font-weight:800;letter-spacing:.13em}
.paid-entry{background:linear-gradient(145deg,var(--sheet),color-mix(in srgb,var(--sheet) 88%,var(--gold-soft)))}
.demo-entry{border-color:var(--accent);background:linear-gradient(145deg,var(--sheet),var(--accent-soft))}
.demo-entry .chip{width:max-content}
@media(max-width:700px){.home-hero{grid-template-columns:minmax(0,1fr);gap:12px}.home-logo{width:clamp(120px,32vw,190px);justify-self:center;grid-row:1}}
@media(max-width:650px){.home-choice{grid-template-columns:1fr}.home-hero-actions{align-items:stretch}.home-hero-actions .btn{justify-content:center}.home-links{align-items:stretch;flex-direction:column}.home-links .btn{justify-content:center}.home-text-link{text-align:center}}
.account-card{border-radius:20px;padding:clamp(20px,5vw,32px);box-shadow:0 20px 60px rgba(40,35,100,.1)}
.demo-account-grid{align-items:start}
.demo-account-grid .account-card{margin:0}
.account-card h1{font-size:clamp(1.45rem,4vw,2rem)}
.account-card input{min-height:48px;background:var(--sheet)}
.demo-progress{display:grid;grid-template-columns:auto minmax(120px,1fr);align-items:center;gap:14px;padding:14px 16px;border:1px solid var(--line);border-radius:10px;background:var(--sheet)}
.demo-progress .track{height:10px;overflow:hidden;background:var(--paper);border:1px solid var(--line);border-radius:999px}
.demo-progress .fill{height:100%;background:var(--accent);border-radius:inherit;transition:width .2s ease}
.demo-filters{display:grid;gap:14px;margin:18px 0;background:var(--sheet)}
.demo-filters .grid2{align-items:end}
.demo-filter-bottom{align-items:end}
.demo-filter-bottom>div{min-width:min(260px,100%)}
.demo-filter-bottom #demo-count{margin-left:auto;padding:10px 0}
.demo-card{min-height:190px}
.demo-duration{margin-top:-8px;color:var(--muted)}
.demo-prep{margin:10px 0 16px;border-left:4px solid var(--accent);background:var(--accent-soft)}
.demo-learning .grid2>div{padding:14px;border-radius:10px;background:var(--paper)}
.demo-mastery{border-left:4px solid #1d7a46}
.demo-review{border-left:4px solid var(--accent)}
.demo-mastery ul,.demo-review ul{margin:8px 0 0;padding-left:20px}
.demo-next{border:1px solid var(--accent);background:var(--accent-soft)}
.demo-locked{opacity:.78}
.demo-locked .chip.grey{white-space:normal}
.demo-score{align-items:flex-start;background:var(--accent-soft)}
.demo-attempts{border-color:color-mix(in srgb,var(--accent) 24%,var(--line))}
.demo-attempts h2{margin:0 0 4px}
.attempt-list{display:grid;gap:6px;max-width:620px}
.attempt-row{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:9px 12px;border:1px solid var(--line);border-radius:8px;background:var(--paper)}
.attempt-best{background:var(--accent-soft);font-weight:700}
@media(max-width:600px){.demo-attempts>.row{align-items:stretch;flex-direction:column}.attempt-row{font-size:.9rem}}
.demo-big-score{font-family:var(--display);font-size:2rem;font-weight:800;color:var(--accent)}
.demo-big-score span{font:500 1rem var(--body);color:var(--muted)}
.demo-answer,.demo-tip{display:grid;gap:5px;padding:12px 14px;border-radius:8px;background:var(--paper)}
.demo-tip{border-left:4px solid var(--accent);background:var(--accent-soft)}
.demo-price{font-family:var(--display);font-size:2.1rem;font-weight:800;color:var(--accent)}
.demo-price span{font-family:var(--body);font-size:1rem;font-weight:500;color:var(--muted)}
.support-answer-text{white-space:normal;line-height:1.75}
@media(max-width:520px){.demo-progress{grid-template-columns:1fr;gap:8px}.demo-big-score span{display:block}}
.mot{min-height:90px;border:1px dashed var(--line);border-radius:8px;padding:10px 12px;white-space:pre-wrap;background:var(--paper)}
.mot:empty::before{content:"Écris ton appréciation ici…";color:var(--muted)}
@media print{
  .topbar,.no-print,.tabs,button,.pied{display:none!important}
  .mot{border:0;padding:0;min-height:60px;background:none}
  .mot:empty::before{content:""}
  .bilan .panel{break-inside:avoid;margin-bottom:10px}
  .bilan table{font-size:.85rem}
  body{background:#fff;color:#000}
  .panel{border:0;padding:0}
  main{padding:0;max-width:none}
}
/* ---------- Espace de travail d'un devoir : sujet et copie côte à côte ---------- */
body.ws-on{height:100dvh;overflow:hidden;display:flex;flex-direction:column}
body.ws-on .pied{display:none}
body.ws-on.ws-full .topbar{display:none}
body.ws-on .topbar{flex:none;padding-block:8px}
body.ws-on main#app{flex:1;min-height:0;width:100%;max-width:none;height:auto;margin:0;padding:10px clamp(8px,1.5vw,18px);gap:8px;overflow:hidden}
.ws{display:flex;flex-direction:column;gap:8px;flex:1;min-height:0}
.ws-head{display:flex;gap:8px 14px;align-items:center;flex-wrap:wrap}
.ws-head h1{font-size:clamp(1.05rem,2vw,1.3rem)}
.ws-title{min-width:0}
.ws-back{font-size:.88rem;white-space:nowrap}
.ws .sep{flex:1}
.ws-body{flex:1;min-height:0;display:grid;grid-template-columns:minmax(280px,var(--split,36%)) 12px minmax(420px,1fr)}
.ws.copy-wide .ws-body{grid-template-columns:minmax(0,1fr)}
.ws.copy-wide .ws-sujet,.ws.copy-wide .ws-sep{display:none}
.ws.copy-wide .ws-copie{grid-column:1}
.ws.copy-wide .ws-copie{border-color:color-mix(in srgb,var(--accent) 28%,var(--line));box-shadow:0 8px 28px rgba(48,42,120,.08)}
.ws-pane{min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--sheet);border:1px solid var(--line);border-radius:10px;overflow:hidden}
.ws-pane.over{outline:3px dashed var(--accent);outline-offset:-3px}
.ws-bar{display:flex;gap:6px;flex-wrap:wrap;align-items:center;padding:6px 8px;border-bottom:1px solid var(--line);background:var(--paper)}
.ws-bar button,.ws-bar select,.ws-head button{min-height:40px;padding:6px 11px;font-size:.88rem}
.ws-bar select{width:auto;background:var(--sheet)}
.ws-bar .mode button{min-height:38px}
.ws-photo-tools{display:flex;align-items:center;gap:6px;flex:none;padding-right:8px;border-right:1px solid var(--line)}
.ws-photo-tools button{white-space:nowrap}
.ws-photo-tools .ws-photos-titre{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;color:var(--muted);font-size:.82rem}
.ws-action-short{display:none}
.ws-pen{display:contents}
.ws-pen.hidden{display:none!important}
.ws-paper-picker{display:inline-flex;align-items:center;gap:5px;margin:0;padding:0 7px;color:var(--muted);font-size:.8rem;font-weight:650;white-space:nowrap}
.ws-paper-picker select{min-height:38px;padding-block:4px}
.ws-group{display:inline-flex;gap:4px}
.ws-ink{width:40px;padding:0!important;justify-content:center}
.ws-ink span{width:18px;height:18px;border-radius:50%;display:block;border:1px solid rgba(0,0,0,.25)}
.ws-ink[aria-pressed="true"]{box-shadow:inset 0 0 0 2px var(--accent)}
.ws-zval{min-width:46px;text-align:center;font-variant-numeric:tabular-nums}
.ws-scroll{flex:1;min-height:0;overflow:auto;padding:14px 16px;display:flex;flex-direction:column;gap:10px}
.ws-sujet .ws-scroll{font-size:calc(1rem*var(--z,1))}
.ws-sujet .ws-scroll .small,.ws-sujet .ws-scroll .pts{font-size:.86em}
.ws-sujet .context,.ws-sujet .data{max-width:none}
.ws-sujet .pdf-view{width:calc(100%*var(--z,1));max-width:none;max-height:none;overflow:visible;flex:none}
.ws-sheet{padding:0;gap:0;background:#fff}
.ws-sheet .pad{border:0;border-radius:0;flex:none}
.ws-sheet .pad canvas{border-radius:0;background:transparent!important}
.ws-world{display:contents}
.ws-sheet .sheet-text{flex:1;min-height:100%;border:0;border-radius:0;resize:none;padding:14px 18px;color:#172033;background-color:#fff}
.ws-sheet .sheet-text{min-height:100%;font-family:"Segoe Print","Bradley Hand",cursive;font-size:1.12rem;line-height:34px;letter-spacing:.01em;background-image:linear-gradient(90deg,transparent 68px,rgba(210,63,75,.38) 68px,rgba(210,63,75,.38) 69px,transparent 69px),linear-gradient(transparent 33px,rgba(72,116,194,.20) 34px);background-size:100% 100%,100% 34px;background-attachment:local;padding:18px clamp(18px,4vw,56px) 24px 82px}
.verdict-schema{margin:8px 0 2px;max-width:min(100%,560px)}
.verdict-schema img{display:block;width:100%;max-height:300px;object-fit:contain;border:1px solid var(--line);border-radius:8px;background:#fff;padding:8px}
.verdict-schema figcaption{margin-top:4px;color:var(--muted);font-size:.82rem}
.ws-photos{border-top:1px solid var(--line);background:var(--paper);max-height:34%;overflow:auto;flex:none}
.ws-photos summary{cursor:pointer;padding:9px 12px;font-size:.9rem;display:flex;align-items:center;gap:8px;min-height:40px}
.ws-photos-in{padding:0 12px 10px;display:grid;gap:6px}
.ws-photos .thumb img{height:72px}
.ws-photos button{min-height:40px;padding:6px 11px;font-size:.88rem}
.ws-photos .thumbs:empty,.ws-photos #imgcount:empty{display:none}
.ws-sep{cursor:col-resize;position:relative;touch-action:none;border-radius:6px}
.ws-sep::after{content:"";position:absolute;left:4px;right:4px;top:calc(50% - 28px);height:56px;border-radius:3px;background:var(--line)}
.ws-sep:hover::after,.ws-sep:focus-visible::after{background:var(--accent)}
.ws-foot{display:flex;flex:none;gap:6px 14px;align-items:center;flex-wrap:wrap;justify-content:space-between;background:var(--sheet);border:1px solid var(--line);border-radius:12px;padding:5px 12px;box-shadow:0 5px 18px rgba(31,42,68,.05)}
.ws-foot-info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.ws-foot-info #saved{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:.86rem}
.ws-foot-info #saved::before{content:"";width:9px;height:9px;flex:none;display:inline-block;border-radius:50%;background:#20a368;box-shadow:0 0 0 4px #e8f7ef}
.ws-foot-info #saved.err::before{background:var(--red);box-shadow:0 0 0 4px #fff0f0}
.ws-foot>.row{align-items:center;gap:8px}
.ws-foot>.row>button:not(.red){background:#fff}
.ws-foot .status{min-height:0}
.ws-foot .err{color:var(--red)}
.ws-foot button{min-height:40px;padding-block:5px}
.ws-foot button.red{min-height:40px;padding-inline:18px}
.ws-switch{display:none}
.dlg{border:1px solid var(--line);border-radius:12px;padding:22px;max-width:min(460px,92vw);background:var(--sheet);color:var(--ink);box-shadow:0 20px 60px -20px rgba(0,0,0,.5)}
.dlg::backdrop{background:rgba(10,15,30,.55)}
.dlg button{min-height:44px}
.correction-wait{width:min(540px,calc(100vw - 28px));max-width:540px;max-height:calc(100dvh - 24px);padding:0;overflow:auto;border:1px solid color-mix(in srgb,var(--accent) 18%,var(--line));border-radius:24px;background:var(--sheet);color:var(--ink);box-shadow:0 28px 90px rgba(17,31,54,.28)}
.correction-wait::backdrop{background:rgba(15,25,43,.58);backdrop-filter:blur(5px)}
.correction-wait-inner{display:flex;flex-direction:column;align-items:center;gap:14px;padding:28px clamp(20px,5vw,38px) 24px;text-align:center}
.wait-illustration{position:relative;display:grid;place-items:center;width:96px;height:96px;margin:0 0 2px;border-radius:50%;background:radial-gradient(circle,var(--accent-soft),color-mix(in srgb,var(--accent-soft) 25%,transparent) 70%)}
.wait-orbit{position:absolute;inset:7px;border:1px solid color-mix(in srgb,var(--accent) 25%,transparent);border-radius:50%}
.wait-orbit-one{animation:wait-orbit 5s linear infinite}
.wait-orbit-two{inset:15px;border-style:dashed;animation:wait-orbit 8s linear infinite reverse}
.wait-book{display:grid;place-items:center;width:54px;height:54px;border:1px solid color-mix(in srgb,var(--gold) 52%,var(--line));border-radius:18px;background:var(--sheet);color:var(--gold);font-size:1.8rem;box-shadow:0 6px 20px rgba(23,54,85,.12);animation:wait-glow 2.2s ease-in-out infinite}
@keyframes wait-orbit{to{transform:rotate(360deg)}}
@keyframes wait-glow{50%{transform:translateY(-3px);box-shadow:0 10px 24px rgba(23,54,85,.17)}}
.correction-wait-inner h2{font-size:clamp(1.3rem,4vw,1.65rem)}
.correction-wait-inner>#waitDescription{max-width:390px;line-height:1.6}
.wait-progress{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;margin:5px 0 0}
.wait-stage{position:relative;display:grid;justify-items:center;align-content:start;gap:7px;padding:0 7px;color:var(--muted);font-size:.76rem;line-height:1.3}
.wait-stage:not(:last-child)::after{position:absolute;top:14px;left:calc(50% + 18px);width:calc(100% - 36px);height:2px;background:var(--line);content:""}
.wait-stage i{z-index:1;display:grid;place-items:center;width:30px;height:30px;border:1px solid var(--line);border-radius:50%;background:var(--paper);font-style:normal;font-weight:750}
.wait-stage.active{color:var(--accent);font-weight:700}
.wait-stage.active i,.wait-stage.done i{border-color:var(--accent);background:var(--accent);color:#fff}
.wait-stage.done::after{background:var(--accent)}
.wait-curiosity{position:relative;display:grid;gap:10px;width:100%;min-height:112px;padding:14px 16px;border:1px solid color-mix(in srgb,var(--gold) 34%,var(--line));border-radius:16px;background:linear-gradient(135deg,var(--gold-soft),var(--sheet) 76%);text-align:left;overflow:hidden}
.wait-curiosity::after{position:absolute;right:-18px;bottom:-48px;width:122px;height:122px;border:1px solid color-mix(in srgb,var(--gold) 23%,transparent);border-radius:50%;content:"";box-shadow:0 0 0 12px color-mix(in srgb,var(--gold) 7%,transparent),0 0 0 25px color-mix(in srgb,var(--gold) 5%,transparent)}
.wait-curiosity-heading{display:flex;align-items:center;gap:9px;color:var(--accent)}
.wait-curiosity-heading>span{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:var(--sheet);font-size:1.15rem;animation:wait-glow 2.8s ease-in-out infinite}
.wait-curiosity-heading>div{display:grid;line-height:1.3}.wait-curiosity-heading .small{font-size:.75rem}
.wait-curiosity-text{position:relative;z-index:1;max-width:440px;padding-left:43px;color:var(--ink);font-size:.88rem;line-height:1.5}
.wait-curiosity-text.is-changing{animation:curiosity-in .55s ease both}
@keyframes curiosity-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
.wait-curiosity-dots{position:absolute;right:14px;top:21px;display:flex;gap:4px}
.wait-curiosity-dots i{width:5px;height:5px;border-radius:50%;background:color-mix(in srgb,var(--gold) 38%,var(--line));transition:transform .2s ease,background .2s ease}
.wait-curiosity-dots i.active{transform:scale(1.45);background:var(--gold)}
.wait-elapsed{min-height:1.4em}
.wait-background{border-color:transparent;background:transparent;color:var(--muted);font-size:.86rem}
.wait-background:hover{border-color:var(--line);background:var(--paper);color:var(--ink)}
@media(max-width:440px){.correction-wait-inner{gap:12px;padding:22px 16px 18px}.wait-stage{font-size:.69rem;padding-inline:3px}.wait-stage:not(:last-child)::after{left:calc(50% + 15px);width:calc(100% - 30px)}.wait-curiosity-text{padding-left:0;font-size:.82rem}}
@media(prefers-reduced-motion:reduce){.wait-orbit-one,.wait-orbit-two,.wait-book,.wait-curiosity-heading>span{animation:none}.wait-curiosity-text.is-changing{animation:none}}
@media(max-width:899px){
  .ws-body{grid-template-columns:minmax(0,1fr)}
  #copyWide{display:none}
  .ws-sep{display:none}
  .ws-switch{display:inline-flex}
  .ws[data-vue="sujet"] .ws-copie,.ws[data-vue="copie"] .ws-sujet{display:none}
  #full{display:none}
  .ws-head .sep{display:none}
  .ws-title{flex-basis:100%;order:3}
  .ws-bar button,.ws-bar select,.ws-bar .mode button,.ws-photos button{min-height:44px}
  body.ws-on .topbar{display:none}
  body.ws-on main#app{padding:8px}
  .ws-bar{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin}
  .ws-bar>*,.ws-pen>*,.ws-group>*{flex:none}
  .ws-bar button{white-space:nowrap}
  .ws-foot{padding:6px 10px;gap:4px 10px}
  .ws-foot #saved:not(.err){display:none}
  .ws-foot .status:empty{display:none}
  .ws-foot-info{flex:0 0 auto;max-width:100%}
  .ws-foot>.row{flex:1;justify-content:space-between;flex-wrap:nowrap;gap:8px}
  .ws-foot>.row .small{font-size:.78rem;line-height:1.3}
  .ws-foot button.red{white-space:nowrap;padding-inline:14px}
  .ws-head .mode button{min-height:44px}
}
@media(max-width:1100px){.ws-photo-tools{gap:4px}.ws-photo-tools .ws-action-long{display:none}.ws-photo-tools .ws-action-short{display:inline}.ws-photo-tools button{padding-inline:8px;font-size:.82rem}}
@media(max-width:640px){.ws-photo-tools .ws-action-short{display:none}.ws-photo-tools button{width:40px;min-width:40px;padding-inline:4px;font-size:0}.ws-photo-tools button>span[aria-hidden="true"]{font-size:1rem}}
/* ---------- Menu de l'espace élève ---------- */
.enav{display:flex;gap:4px}
.enav a{padding:8px 14px;border-radius:8px;text-decoration:none;color:var(--muted);font-weight:600;min-height:40px;display:inline-flex;align-items:center}
.enav a:hover{color:var(--ink)}
.enav a[aria-current]{background:var(--accent-soft);color:var(--accent)}
@media(max-width:700px){
  .enav{position:fixed;left:0;right:0;bottom:0;z-index:20;background:var(--sheet);border-top:1px solid var(--line);padding:6px 10px calc(6px + env(safe-area-inset-bottom));gap:8px}
  .enav a{flex:1;justify-content:center;min-height:48px}
  body:has(.enav) .pied{padding-bottom:96px}
  body:has(.enav) main{padding-bottom:40px}
  body.ws-on .enav{display:none}
  .who-id{display:none}
}
/* ---------- Tableau de bord de l'élève ---------- */
.dash-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;flex-wrap:wrap}
.dash-credits{font-size:.82rem;padding:5px 12px}
.dash-hero{display:flex;gap:16px;align-items:center;flex-wrap:wrap;text-decoration:none;color:#fff;background:var(--accent);border-radius:14px;padding:22px 24px;box-shadow:0 14px 30px -18px var(--accent)}
.dash-hero h2{font-size:clamp(1.25rem,3vw,1.6rem);color:inherit}
.dash-hero p{opacity:.9}
.dash-hero-kicker{font-size:.78rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.85}
.dash-hero-btn{background:#fff;color:#16337f;border-color:#fff;min-height:46px;padding-inline:20px}
.dash-hero:hover .dash-hero-btn,.dash-hero:focus-visible .dash-hero-btn{background:#eef2ff}
@media (prefers-color-scheme:dark){.dash-hero{color:#0d1220}.dash-hero-btn{background:#0d1220;color:#dfe7ff;border-color:#0d1220}.dash-hero:hover .dash-hero-btn{background:#1a2238}}
.dash-ok{background:var(--ok-soft);color:var(--ok);border-radius:12px;padding:16px 20px}
.dash-work{gap:16px}
.prof-assignment-head{justify-content:space-between;align-items:center}
.prof-assignment-head h2{margin:0}
.select-all-assignments{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;font-weight:600;cursor:pointer}
.assignment-select,.select-all-assignments input{width:auto;min-width:18px;min-height:18px;accent-color:var(--accent)}
.assignment-bulk{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--accent-soft)}
.assignment-bulk .row{gap:8px}
.assignment-bulk button{min-height:40px}
#assignmentBulkStatus:empty{display:none}
.schedule-field{display:grid;gap:6px;max-width:440px}
.schedule-field input{width:100%;min-height:44px}
@media(max-width:600px){.prof-assignment-head{align-items:flex-start;flex-wrap:wrap}.assignment-bulk{align-items:flex-start;flex-direction:column}.assignment-bulk .row{width:100%}.assignment-bulk .row button{flex:1;min-width:0;padding-inline:8px}}
.dash-search{max-width:260px;min-height:40px}
.dchips{display:flex;gap:6px;flex-wrap:wrap}
.dchips button{border-radius:999px;padding:6px 14px;font-size:.85rem;min-height:38px}
.dgroups{gap:24px}
.dgroup{display:flex;flex-direction:column;gap:10px}
.dgroup-head{display:flex;align-items:center;gap:9px}
.dgroup-head h2{font-size:1.1rem}
.dgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.dcard{gap:6px;padding:16px 18px;border-radius:12px;min-height:150px}
.dcard-top{gap:6px;min-height:24px}
.dcard h3{font-size:1.08rem}
.dlist{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.drow{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;text-decoration:none;color:inherit;background:var(--sheet);min-height:56px}
.drow+.drow{border-top:1px solid var(--line)}
.drow:hover{background:var(--paper)}
.drow-main{display:flex;flex-direction:column;gap:1px;min-width:0}
.dnote{padding:4px 10px;white-space:nowrap}
@media(max-width:600px){.dash-hero{padding:18px}.dash-hero-btn{width:100%;justify-content:center}.dcard{min-height:0}.dash-search{max-width:none;flex:1}}
@media(max-width:600px){
  .dash-credits{white-space:normal;max-width:100%;text-align:center}
  .dash-work>.row #dq{flex:1 1 100%;width:100%;max-width:100%;min-width:0}
  .progress-summary{gap:12px!important}
  .progress-summary-copy{min-width:0!important}
  .ws-foot>.row{min-width:0}
  .ws-foot>.row .small{flex:1 1 120px;min-width:0;overflow-wrap:anywhere}
}
@media(max-width:390px){
  .result-summary{gap:12px!important}
  .result-summary .bignote{width:88px;height:88px;font-size:2.35rem}
  .result-summary .bignote small{font-size:1rem}
  .attempt-top .chip{white-space:normal}
}

/* Inscription : identité et accord parental */
.identite{gap:12px}
.accord{display:flex;gap:10px;align-items:flex-start;font-weight:500;font-size:.9rem;background:var(--warn-soft);border-radius:8px;padding:10px 12px;margin:0}
.accord input{width:auto;margin-top:3px;flex:none}

/* Forfait professeur */
.forfait{display:grid;gap:8px;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:var(--sheet)}
.forfait-jauge{height:8px;border-radius:999px;background:var(--paper);border:1px solid var(--line);overflow:hidden}
.forfait-jauge span{display:block;height:100%;background:var(--accent);border-radius:inherit}
.forfait-off{border-top:3px solid var(--accent)}
.forfait-off ul{margin:0;padding-left:20px;display:grid;gap:4px}

/* Suppression de compte */
.danger-zone summary b{color:var(--red)}
.danger-zone button.danger:not(.ghost){background:var(--red);color:#fff;border-color:var(--red)}
/* Tableau de bord du propriétaire */
.dash-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.dash-tile{border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:var(--sheet)}
.dash-val{font-family:Archivo,system-ui,sans-serif;font-weight:800;font-size:1.6rem;color:var(--ink);line-height:1.2;margin-bottom:4px}
/* Aides de l'IA pour l'élève : relecture, questions, quiz */
.rel-box{position:fixed;right:16px;bottom:84px;width:min(440px,calc(100vw - 32px));max-height:60vh;overflow:auto;z-index:40;box-shadow:0 12px 32px rgba(0,0,0,.18)}
.rel-points{margin:0;padding-left:18px;display:grid;gap:8px}
.aide-fil{display:grid;gap:10px;max-height:420px;overflow:auto}
.aide-msg{padding:10px 12px;border-radius:12px;white-space:pre-wrap;max-width:88%}
.aide-msg.eleve{justify-self:end;background:var(--ink);color:var(--sheet)}
.aide-msg.ia{justify-self:start;background:var(--paper);border:1px solid var(--line)}
.quiz-q{border:1px solid var(--line);border-radius:12px;padding:12px 14px;display:grid;gap:8px;background:var(--sheet)}
.quiz-choix{display:grid;gap:6px}
.quiz-choix button{text-align:left;justify-content:flex-start}
.quiz-choix button.juste{border-color:var(--green,#1d7a46);background:rgba(29,122,70,.1)}
.quiz-choix button.faux{border-color:var(--red);background:rgba(200,40,40,.08)}
.dash-val small{font-size:.9rem;font-weight:600;color:var(--muted);margin-left:2px}
.reussite-barre{display:inline-block;width:120px;height:10px;vertical-align:middle;background:var(--paper);border:1px solid var(--line);border-radius:999px;overflow:hidden;margin-right:6px}
.reussite-barre>span{display:block;height:100%;border-radius:inherit}
/* Choix du type de devoir en cartes */
.choix-cartes{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.choix-cartes button{display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;padding:12px 14px;min-height:96px;border-radius:12px;white-space:normal;height:auto}
.choix-cartes button b{font-size:1rem}
.choix-cartes button span:not(.cc-ic){font-size:.85rem;font-weight:400;color:var(--muted);line-height:1.3}
.choix-cartes .cc-ic{font-size:1.3rem;line-height:1}
.choix-cartes button[aria-pressed=true]{border-color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink);background:var(--sheet)}
/* Menu de l'espace professeur */
.pnav{display:flex;gap:4px;align-items:center;flex-wrap:wrap}
.pnav a{padding:6px 10px;border-radius:8px;text-decoration:none;color:var(--ink);font-weight:600;font-size:.92rem}
.pnav a[aria-current=page]{background:var(--paper);box-shadow:inset 0 0 0 1px var(--line)}
/* Premiers pas */
.etapes{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.etapes li{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--sheet)}
.etapes li.fait{opacity:.65}
.etapes .num{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--ink);color:var(--sheet);font-weight:700;font-size:.85rem;margin-right:8px;flex:none}
.etapes li.fait .num{background:var(--ok,#1d7a46)}
/* Filtres du panneau Combiner */
.cb-filtres{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;align-items:end}.cb-filtres .cb-q{grid-column:span 2}
@media (max-width:640px){.cb-filtres{grid-template-columns:1fr 1fr}.cb-filtres .cb-q{grid-column:1/-1}}
/* Réponse mise en forme du tuteur */
.tut p{margin:0 0 10px}
.tut-titre{margin:16px 0 6px;font-size:1.08rem}
.tut-liste{margin:0 0 10px;padding-left:20px;display:grid;gap:4px}
.tut-formule{margin:8px 0 12px;padding:10px 14px;border-radius:10px;background:var(--paper);border:1px solid var(--line);font-size:1.08rem;font-weight:600;text-align:center;overflow-x:auto}
.tut-retenir{margin:10px 0;padding:10px 14px;border-left:4px solid #f59e0b;background:rgba(245,158,11,.1);border-radius:0 10px 10px 0}
.tut-retenir b{display:block;font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;color:#b45309;margin-bottom:2px}
.tut-schema{margin:14px 0;padding:12px;border:1px solid var(--line);border-radius:12px;background:#fff;text-align:center}
.tut-schema img{max-width:100%;height:auto}
.tut-schema figcaption{font-size:.9rem;color:#555;margin-top:6px}
.tut-suites{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:10px}
.tut-suites b{width:100%;font-size:.92rem}
.tut-suites button{white-space:normal;text-align:left}
/* Tuteur : choix de présentation */
.tut-vues{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 14px}
.tut-vues button[aria-pressed=true]{background:var(--ink);color:var(--sheet);border-color:var(--ink)}
/* Fiche manuscrite : papier ligné, écriture à la main */
.fiche-main{font-family:var(--pen);font-size:1.45rem;line-height:2rem;color:#1a2a6b;padding:18px 22px 18px 64px;border-radius:6px;background:#fffdf6 linear-gradient(#fffdf6 1.95rem,#c9d8f0 2rem) 0 .6rem/100% 2rem;position:relative;box-shadow:0 2px 10px rgba(0,0,0,.08)}
.fiche-main::before{content:"";position:absolute;left:46px;top:0;bottom:0;border-left:2px solid #e6a0a0}
.fiche-main h3{font-family:var(--pen);font-size:1.9rem;color:#b91c1c;text-decoration:underline;text-underline-offset:6px;margin:6px 0 4px}
.fiche-main p{margin:0}
.fiche-main .fm-puce{padding-left:14px}
.fiche-main mark{background:linear-gradient(transparent 35%,#fde047 35%,#fde047 85%,transparent 85%);color:inherit;padding:0 2px}
.fm-formule{display:inline-block;margin:4px 0;padding:0 14px;border:2px solid #1a2a6b;border-radius:10px;font-weight:700}
.fm-schema{margin:10px 0 0;background:#fff;padding:8px;border-radius:6px;text-align:center}.fm-schema img{max-width:100%}.fm-schema figcaption{font-size:1.2rem}
/* Post-it */
.postits{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:18px;padding:8px 4px 14px}
.postit{padding:14px 16px 18px;min-height:130px;transform:rotate(var(--r,0deg));box-shadow:0 6px 14px rgba(0,0,0,.15);font-family:var(--pen);font-size:1.3rem;line-height:1.35;color:#1f2937;border-radius:2px 2px 14px 2px;transition:transform .15s}
.postit:hover{transform:rotate(0) scale(1.03)}
.postit b{display:block;font-size:1rem;font-family:var(--body);text-transform:uppercase;letter-spacing:.03em;opacity:.7;margin-bottom:4px}
.postit p{margin:0}.postit .pi-f{font-weight:700;font-size:1.4rem}
.postit.jaune{background:#fef08a}.postit.bleu{background:#bfdbfe}.postit.rose{background:#fbcfe8}.postit.vert{background:#bbf7d0}.postit.orange{background:#fed7aa}
/* Infographie */
.infog{border-radius:16px;padding:18px;background:linear-gradient(160deg,#eef4ff,#fff7ed)}
.ig-tete{display:flex;gap:14px;align-items:center;margin-bottom:14px}.ig-tete h3{margin:2px 0 0;font-size:1.3rem}
.ig-ic{font-size:2.4rem;line-height:1}
.ig-etapes{list-style:none;margin:0;padding:0;display:grid;gap:12px;position:relative}
.ig-etapes li{display:grid;grid-template-columns:40px 1fr;gap:10px;align-items:start}
.ig-num{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#2563eb;color:#fff;font-weight:800}
.ig-carte{background:#fff;border-radius:12px;padding:12px 14px;box-shadow:0 2px 8px rgba(37,99,235,.12)}
.ig-carte h4{margin:0 0 6px;font-size:1.05rem}.ig-carte p{margin:0 0 6px}
.ig-formule{display:inline-block;margin:4px 6px 4px 0;padding:6px 12px;border-radius:999px;background:#dbeafe;color:#1e3a8a;font-weight:700}
.ig-retenir{margin-top:6px;padding:8px 10px;border-radius:8px;background:#fef3c7;font-weight:600}
/* Impression de la seule réponse du tuteur */
@media print{body.print-tuteur *{visibility:hidden}body.print-tuteur #support-answer,body.print-tuteur #support-answer *{visibility:visible}body.print-tuteur #support-answer{position:absolute;left:0;top:0;width:100%}body.print-tuteur .tut-vues,body.print-tuteur .tut-suites{display:none}}
.fm-formule{font-family:var(--body);font-size:1.12rem;font-style:italic;line-height:1.6rem;padding:2px 14px}
.fiche-main sub,.fiche-main sup{font-family:var(--body)}
.glyphe{font-family:var(--body);font-size:.82em}
.postit .pi-f{font-family:var(--body);font-size:1.12rem;font-style:italic}
/* Bandeau d'installation de l'application */
.install-bandeau{display:flex;gap:14px;align-items:center;flex-wrap:wrap;border:1px solid var(--line);background:linear-gradient(120deg,var(--sheet),#eef4ff)}
.install-bandeau img{border-radius:14px;box-shadow:0 2px 8px rgba(0,0,0,.12)}
/* Application installée : un peu d'air sous la barre d'état du téléphone */
@media (display-mode: standalone){.topbar{padding-top:max(env(safe-area-inset-top),10px)}}
/* Accueil : une promesse, comment ça marche, parents, autres accès */
.home-promesse{font-size:1.12rem;line-height:1.55;color:var(--ink);max-width:640px;margin:8px 0 14px}
.home-rassure{margin-top:8px;color:var(--muted)}
.home-etapes{margin:26px 0}
.home-etapes h2{margin-bottom:12px}
.home-etapes ol{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
.home-etapes li{display:grid;gap:4px;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--sheet)}
.home-etapes li b{font-size:1.05rem}
.home-etapes li span:not(.he-num){color:var(--muted);font-size:.95rem;line-height:1.45}
.he-num{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--ink);color:var(--sheet);font-weight:800;margin-bottom:4px}
.home-parents{margin:8px 0 22px}
.home-parents h2{margin:8px 0 10px}
.home-parents ul{margin:0 0 14px;padding-left:20px;display:grid;gap:8px;line-height:1.5}
.home-acces{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;margin-bottom:20px}
.home-acces-lien{display:grid;gap:2px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;text-decoration:none;color:var(--ink);background:var(--sheet)}
.home-acces-lien:hover{border-color:var(--ink)}
.home-acces-lien span{font-size:.9rem;color:var(--muted)}
.home-parents .chip{justify-self:start;align-self:start;width:max-content}
/* Accueil : exemple de correction */
.home-exemple{margin:28px 0}
.home-exemple h2{margin-bottom:2px}
.hx-grille{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px;margin-top:12px;align-items:start}
.hx-sujet,.hx-correction{display:grid;gap:10px}
.hx-sujet .chip,.hx-correction .chip{justify-self:start;width:max-content}
.hx-sujet ol{margin:0;padding-left:0;list-style:none;display:grid;gap:6px}
.hx-copie{border:1px dashed var(--line);border-radius:10px;padding:10px 12px;background:#fffdf6}
.hx-main{font-family:var(--pen);font-size:1.35rem;color:#1a2a6b;margin:4px 0;line-height:1.3}
.hx-main sup{font-family:var(--body);font-size:.6em}
.hx-note{font-family:var(--display);font-weight:800;font-size:1.6rem;color:#b91c1c}
.hx-note small{font-size:.9rem;color:var(--muted)}
.hx-q{border-left:4px solid #f59e0b;padding:8px 12px;border-radius:0 10px 10px 0;background:var(--paper)}
.hx-q.faux{border-left-color:#dc2626}
.hx-q p{margin:6px 0 0;line-height:1.45}
.hx-suite{font-size:.92rem;color:var(--muted)}
/* Accueil : questions fréquentes */
.home-faq{margin:26px 0}
.home-faq h2{margin-bottom:10px}
.home-faq details{border:1px solid var(--line);border-radius:12px;background:var(--sheet);margin-bottom:8px}
.home-faq summary{cursor:pointer;padding:12px 14px;font-weight:600;list-style-position:inside}
.home-faq details[open] summary{border-bottom:1px solid var(--line)}
.home-faq details p{margin:0;padding:12px 14px;line-height:1.55}
.chargement-interne{display:none}
.route-interne .accueil-statique{display:none}
.route-interne .chargement-interne{display:block}
/* Accueil : appels à essayer */
.home-final{margin:10px 0 22px;text-align:center;display:grid;gap:10px;justify-items:center;padding:24px 18px}
.home-final h2{margin:0}
.cta-collant{display:none}
@media (max-width:700px){
  .cta-collant{display:block;position:fixed;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));z-index:30;transform:translateY(140%);transition:transform .25s ease;pointer-events:none}
  .cta-collant.visible{transform:none;pointer-events:auto}
  .cta-collant .btn{display:flex;justify-content:center;width:100%;box-shadow:0 8px 22px rgba(21,42,67,.28)}
  .pied{padding-bottom:84px}
}
@media (prefers-reduced-motion:reduce){.cta-collant{transition:none}}
/* Accès rapide (classe, compte, professeur) : sous le haut de page, bien visibles */
.home-acces{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin:18px 0 8px}
.home-acces-lien{display:grid;grid-template-columns:auto 1fr;grid-template-rows:1fr auto;gap:10px 12px;padding:16px;border:1.5px solid var(--line);border-radius:14px;text-decoration:none;color:var(--ink);background:var(--sheet);box-shadow:0 2px 10px rgba(21,42,67,.06);transition:border-color .15s,box-shadow .15s,transform .15s}
.home-acces-lien:hover,.home-acces-lien:focus-visible{border-color:var(--ink);box-shadow:0 6px 18px rgba(21,42,67,.12);transform:translateY(-1px)}
.ha-ic{grid-row:1/3;font-size:1.7rem;line-height:1;width:46px;height:46px;display:grid;place-items:center;border-radius:12px;background:var(--paper)}
.ha-txt{display:grid;gap:3px;align-content:start}
.ha-txt b{font-size:1.05rem}
.ha-txt span{font-size:.92rem;color:var(--muted);line-height:1.4}
.ha-btn{justify-self:start;padding:7px 14px;border-radius:999px;background:var(--ink);color:var(--sheet);font-weight:600;font-size:.9rem}
.home-acces-lien:hover .ha-btn{filter:brightness(1.15)}
.home-acces-lien .ha-btn{color:var(--sheet);font-size:.9rem}
.home-acces-lien .ha-ic{color:inherit;font-size:1.7rem}
.home-acces-principal{border-color:var(--accent);background:linear-gradient(145deg,var(--accent-soft),var(--sheet));box-shadow:0 8px 24px rgba(91,61,245,.12)}
.home-acces-principal .ha-btn{background:var(--accent)}
.home-etapes li{align-content:start}

/* ==========================================================================
   THÈME « JEUNE ET COLORÉ » (novembre 2026) : remplace l'ancienne ambiance crème et dorée.
   Couleurs vives, titres arrondis (Fredoka), grands arrondis, boutons en pastille avec un léger relief.
   ========================================================================== */
:root{
  --paper:#fffdf7;--sheet:#ffffff;--ink:#1f1a3d;--muted:#6b6785;--line:#ece7f6;--grid:transparent;
  --accent:#5b3df5;--accent-soft:#efebff;--gold:#ff8a3d;--gold-soft:#fff1e6;
  --red:#e8364f;--red-soft:#ffe9ec;--ok:#13a36e;--ok-soft:#e1f8ee;--warn:#c76a00;--warn-soft:#fff3dc;
  --jaune:#ffd43b;--corail:#ff6b57;--vert:#22c08a;--ciel:#3ba8ff;
  --display:"Fredoka","Archivo",system-ui,sans-serif;
  --relief:3px 3px 0 var(--ink);
}
@media (prefers-color-scheme:dark){:root{
  --paper:#15122b;--sheet:#1f1a3d;--ink:#f4f1ff;--muted:#b8b2d6;--line:#352e5c;
  --accent:#a593ff;--accent-soft:#2c2556;--gold:#ffab70;--gold-soft:#3a2a1e;
  --red:#ff7a8c;--red-soft:#3a1d27;--ok:#5fd3a0;--ok-soft:#173529;--warn:#f0b35a;--warn-soft:#352812;
  --relief:3px 3px 0 #000;}}
body{background:radial-gradient(circle at 8% 0%,rgba(91,61,245,.10),transparent 30%),radial-gradient(circle at 95% 6%,rgba(255,212,59,.18),transparent 26%),radial-gradient(circle at 80% 70%,rgba(34,192,138,.07),transparent 30%),var(--paper);background-attachment:fixed}
h1,h2,h3{font-family:var(--display);letter-spacing:-.01em}
h1{font-weight:700}h2{font-weight:600}h3{font-weight:600}
a{color:var(--accent)}
.topbar{background:color-mix(in srgb,var(--sheet) 85%,transparent);border-bottom:1px solid var(--line)}
.brand{font-family:var(--display);font-weight:700;letter-spacing:0}
.brand-name b{color:var(--accent)}
.brand-mark{border-color:var(--jaune)}
.panel{border-radius:20px;border-color:var(--line);box-shadow:0 10px 30px rgba(91,61,245,.06)}
.card{border-radius:20px;background:var(--sheet);border-color:var(--line);box-shadow:0 10px 30px rgba(91,61,245,.06)}
.card:hover{border-color:var(--accent);box-shadow:0 16px 36px rgba(91,61,245,.14)}
button,.btn{border-radius:999px;padding:10px 18px;transition:transform .12s ease,box-shadow .12s ease,filter .12s ease}
button.primary,.btn.primary{background:var(--accent);border:2px solid var(--ink);color:#fff;box-shadow:var(--relief)}
button.primary:hover,.btn.primary:hover{transform:translate(-1px,-1px);box-shadow:4px 4px 0 var(--ink)}
button.primary:active,.btn.primary:active{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--ink)}
@media (prefers-color-scheme:dark){button.primary,.btn.primary{color:#15122b;border-color:#000}}
button.ghost{border-radius:999px}
input,select,textarea{border-radius:12px;background:var(--sheet);border:1.5px solid var(--line)}
input:focus,select:focus,textarea:focus{border-color:var(--accent);outline:3px solid var(--accent-soft);outline-offset:0}
.chip{border-radius:999px;font-weight:700}
.notice{border-radius:16px}
.eyebrow{color:var(--accent)}
/* Bouton d'essai : jaune vif, le plus visible de la page */
.btn.essai{background:var(--jaune);color:#1f1a3d;border:2px solid #1f1a3d;box-shadow:3px 3px 0 #1f1a3d;font-size:1.05rem;padding:13px 22px}
.btn.essai:hover{transform:translate(-1px,-1px);box-shadow:5px 5px 0 #1f1a3d;filter:saturate(1.1)}
.btn.essai:active{transform:translate(2px,2px);box-shadow:1px 1px 0 #1f1a3d}

/* Accueil « jeune » : héros avec cartes de correction illustrées */
.hh-jeune{grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);align-items:center}
.hh-jeune h1{font-size:clamp(2rem,4.6vw,3.3rem);line-height:1.08;margin:0}
.hh-emoji{display:inline-block;animation:hh-balance 2.6s ease-in-out infinite;transform-origin:70% 80%}
@keyframes hh-balance{0%,100%{transform:rotate(0)}50%{transform:rotate(-10deg)}}
.hh-badge{justify-self:start;background:var(--accent-soft);color:var(--accent);font-weight:700;font-size:.85rem;padding:6px 14px;border-radius:999px}
.hh-jeune .home-promesse{font-size:1.2rem;line-height:1.5;margin:0;max-width:34ch}
.hh-jeune .home-promesse b{background:linear-gradient(transparent 60%,var(--jaune) 60%);color:inherit}
@media (prefers-color-scheme:dark){.hh-jeune .home-promesse b{background:linear-gradient(transparent 60%,rgba(255,212,59,.45) 60%)}}
.hh-visuel{position:relative;min-height:300px}
.hh-carte{position:absolute;background:var(--sheet);border:2px solid var(--ink);border-radius:18px;box-shadow:var(--relief);padding:12px 16px;font-weight:600;font-size:.95rem;color:var(--ink);white-space:nowrap}
.hh-c1{top:6%;left:8%;display:grid;justify-items:center;gap:2px;background:var(--accent);color:#fff;padding:18px 26px;transform:rotate(-5deg)}
.hh-c1 span:last-child{font-size:.8rem;opacity:.85}
.hh-note{font-family:var(--display);font-size:2.6rem;line-height:1}.hh-note small{font-size:1rem;opacity:.8}
.hh-c2{top:14%;right:0;background:var(--jaune);color:#1f1a3d;transform:rotate(4deg)}
.hh-c3{top:52%;left:0;background:var(--ok-soft);transform:rotate(-2deg)}
.hh-c4{bottom:4%;right:6%;background:var(--gold-soft);transform:rotate(3deg)}
.hh-carte{animation:hh-flotte 5s ease-in-out infinite}
.hh-c2{animation-delay:-1.2s}.hh-c3{animation-delay:-2.5s}.hh-c4{animation-delay:-3.7s}
@keyframes hh-flotte{0%,100%{translate:0 0}50%{translate:0 -6px}}
@media (prefers-reduced-motion:reduce){.hh-carte,.hh-emoji{animation:none}}
@media(max-width:700px){
  .hh-jeune{grid-template-columns:minmax(0,1fr)}
  .hh-visuel{grid-row:auto;min-height:210px;margin-top:6px}
  .hh-carte{font-size:.82rem;padding:9px 12px}
  .hh-c1{padding:12px 18px}.hh-note{font-size:2rem}
}
/* Accès rapides : pastilles plus vivantes */
.home-acces-lien{border-radius:20px;border:2px solid var(--line)}
.home-acces-lien:hover{border-color:var(--ink);box-shadow:var(--relief);transform:translate(-1px,-1px)}
.home-acces .ha-btn{border-radius:999px}
/* Étapes en tuiles colorées */
.he-couleurs li{border:2px solid var(--ink);box-shadow:var(--relief);border-radius:20px;padding:18px;gap:6px}
.he-couleurs .he-ic{font-size:1.9rem;line-height:1}
.he-couleurs li b{font-family:var(--display);font-size:1.2rem}
.he-couleurs li span:not(.he-ic){color:#3d3860}
.he-jaune{background:#fff4c2 !important}.he-corail{background:#ffe1dc !important}.he-vert{background:#d6f5e8 !important}
.he-couleurs li b,.he-couleurs li{color:#1f1a3d}
.he-parcours{grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:16px !important}
.he-parcours li{grid-template-rows:auto auto auto 1fr;min-height:250px}
.he-etape-titre{display:flex;align-items:center;gap:9px;margin-bottom:2px}
.he-parcours .he-num{width:28px;height:28px;margin:0;background:#1f1a3d;color:white;font-size:.88rem}
.he-parcours .he-ic{font-size:1.5rem}
.hp-apercu{align-self:end;display:grid;gap:5px;min-height:88px;margin-top:10px;padding:12px;border:1px solid rgba(31,26,61,.14);border-radius:13px;background:rgba(255,255,255,.84);box-shadow:0 3px 10px rgba(31,26,61,.07);color:#1f1a3d}
.hp-sujet small{font-size:.64rem;font-weight:800;letter-spacing:.08em;color:#716b88}
.hp-sujet strong{font-family:var(--display);font-size:1rem}
.hp-sujet>span,.hp-retour>span{font-size:.78rem;color:#5e5972}
.hp-sujet i{justify-self:start;margin-top:2px;padding:5px 10px;border-radius:999px;background:var(--accent);color:white;font-size:.73rem;font-style:normal;font-weight:700}
.hp-feuille{padding:10px 12px 10px 22px;background:linear-gradient(90deg,transparent 15px,rgba(220,70,90,.25) 15px,rgba(220,70,90,.25) 16px,transparent 16px),repeating-linear-gradient(transparent 0 22px,rgba(72,116,194,.18) 22px 23px),#fff;font-family:"Caveat","Segoe Print",cursive;font-size:1rem;line-height:1.3}
.hp-feuille span:nth-child(2){padding-left:14px}
.hp-feuille span:nth-child(3){padding-left:28px}
.hp-retour{grid-template-columns:1fr 1fr;align-items:center}
.hp-retour strong{grid-row:span 2;font-family:var(--display);font-size:2rem;color:#147c55}
.hp-retour strong small{font-size:.85rem;color:#777}
.hp-retour>span{font-size:.72rem}
@media(max-width:760px){.he-parcours{grid-template-columns:1fr !important}.he-parcours li{min-height:0}.hp-apercu{min-height:76px}}
/* Parents : liste à emojis */
.hp-liste{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:10px}
.hp-liste li{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:start;font-size:1rem;line-height:1.45}
.hp-liste li>span:first-child{font-size:1.4rem;line-height:1.1}
/* Appel final coloré */
.hf-jeune{background:var(--accent);color:#fff;border:2px solid var(--ink);box-shadow:var(--relief);border-radius:24px}
.hf-jeune h2{color:#fff;font-size:clamp(1.6rem,3.5vw,2.2rem)}
.hf-jeune p{color:#efebff;margin:0}

/* ==========================================================================
   PAGES INTÉRIEURES AU STYLE « JEUNE » (élève, abonné, professeur)
   ========================================================================== */
/* Tableau de bord élève */
.dash-head h1{font-size:clamp(1.8rem,4vw,2.4rem)}
.dash-hero{background:linear-gradient(135deg,#5b3df5,#7a5cff);border:2px solid var(--ink);box-shadow:var(--relief);border-radius:24px;transition:transform .12s ease,box-shadow .12s ease}
.dash-hero:hover{transform:translate(-1px,-1px);box-shadow:5px 5px 0 var(--ink)}
.dash-hero-emoji{font-size:2.6rem;line-height:1;background:rgba(255,255,255,.18);border-radius:18px;width:68px;height:68px;display:grid;place-items:center;flex:none}
.dash-hero-btn{background:var(--jaune);color:#1f1a3d;border:2px solid #1f1a3d;box-shadow:2px 2px 0 #1f1a3d;font-weight:700}
.dash-hero:hover .dash-hero-btn,.dash-hero:focus-visible .dash-hero-btn{background:#ffe066}
.dash-ok{border-radius:20px;border:2px solid var(--ok);font-size:1.02rem}
.student-overview>div{border-radius:18px;border:2px solid var(--ink);box-shadow:var(--relief);align-items:center;color:#1f1a3d}
.student-overview>div>span:first-child{font-size:1.3rem}
.student-overview b{color:#1f1a3d}
.student-overview span{color:#3d3860}
.upcoming-work{padding:0;overflow:hidden;border:2px solid #e8c95f;border-radius:18px;box-shadow:var(--relief)}
.upcoming-work-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;background:linear-gradient(90deg,#fff8d8,#fffdf3)}
.upcoming-work-head h2{margin:0;color:#1f1a3d}
.upcoming-work-head p{margin:3px 0 0;color:#514a6c}
.upcoming-work .drow{padding:12px 18px}
@media(max-width:600px){.upcoming-work-head{padding:12px;align-items:flex-start}.upcoming-work .drow{padding:10px 12px;align-items:flex-start}.upcoming-work .drow>.chip{font-size:.78rem;max-width:48%;white-space:normal;text-align:right}}
.student-new-work{overflow:hidden;border:2px solid #6952dc;border-radius:18px;background:#f8f6ff;box-shadow:var(--relief)}
.student-new-work-head{display:flex;align-items:center;gap:12px;padding:16px 18px;background:linear-gradient(100deg,#f0ecff,#fff)}
.student-new-work-head h2{margin:0;color:#30245f}
.student-new-work-head p{margin:3px 0 0;color:#514a6c}
.student-new-work-icon{width:38px;height:38px;flex:none;display:grid;place-items:center;border-radius:12px;background:#6952dc;color:white;font-size:1.25rem}
.student-new-work-head>.chip{margin-left:auto;white-space:nowrap}
.student-new-work .drow{padding:12px 18px}
@media(max-width:600px){.student-new-work-head{align-items:flex-start;padding:12px}.student-new-work-head>.chip{font-size:.78rem}.student-new-work .drow{padding:10px 12px;align-items:flex-start}}
.so-jaune{background:#fff4c2 !important}.so-corail{background:#ffe1dc !important}.so-vert{background:#d6f5e8 !important}
.dcard{border-radius:20px;border-width:2px;position:relative}
.dcard:hover{border-color:var(--ink);box-shadow:var(--relief);transform:translate(-1px,-1px)}
.dcard-emoji{font-size:1.7rem;line-height:1}
.dcard .student-open{font-weight:700;color:var(--accent)}
.dlist{border-radius:18px;overflow:hidden;border:1.5px solid var(--line)}
.drow{gap:12px;justify-content:flex-start}
.drow>:last-child{margin-left:auto}
.drow-emoji{font-size:1.3rem;flex:none}
.dchips button[aria-pressed="true"]{background:var(--accent);color:#fff;border-color:var(--accent)}
.dgroup-head h2{font-family:var(--display)}
/* Abonné : cartes de sujets */
.demo-card{border-radius:20px;border-width:2px}
.demo-card:hover{border-color:var(--ink);box-shadow:var(--relief)}
.demo-progress .fill,.track .fill{background:linear-gradient(90deg,var(--accent),#9b7bff)}
/* Questions de la correction et quiz */
.result-question{border-radius:16px;border-width:1.5px}
.result-question summary b{font-family:var(--display);font-size:1.05rem}
.quiz-q{border-radius:18px;border-width:1.5px}
.quiz-choix button{border-radius:14px;text-align:left}
.quiz-choix button.juste{background:var(--ok-soft);border-color:var(--ok);color:var(--ok);font-weight:700}
.quiz-choix button.faux{background:var(--red-soft);border-color:var(--red);color:var(--red)}
.attempt-card{border-radius:16px}
/* Professeur : mêmes arrondis et reliefs au survol */
.prof-classe,.classe-carte{border-radius:20px}

/* Note animée de la correction */
.note-vivante{position:relative;display:grid;justify-items:center;gap:4px;min-width:150px;padding:16px 18px;border-radius:24px;border:2px solid var(--ink);box-shadow:var(--relief);text-align:center;flex:none;color:#1f1a3d}
.nv-top{background:#fff4c2}.nv-bien{background:#d6f5e8}.nv-moyen{background:#e8e2ff}.nv-bas{background:#ffe1dc}
.nv-emoji{font-size:2.2rem;line-height:1;animation:nv-saut .7s cubic-bezier(.3,1.6,.5,1) both}
.nv-chiffre{font-family:var(--display);font-weight:700;line-height:1;font-variant-numeric:tabular-nums}
.nv-chiffre b{font-size:2.9rem}.nv-chiffre small{font-size:1.15rem;opacity:.7}
.nv-titre{font-family:var(--display);font-weight:600;font-size:1rem;max-width:16ch;line-height:1.2}
.nv-petit{font-size:.78rem;opacity:.7}
@keyframes nv-saut{0%{transform:scale(0) rotate(-20deg)}100%{transform:scale(1) rotate(0)}}
.confetti{position:absolute;top:30%;width:8px;height:12px;border-radius:2px;pointer-events:none;animation:confetti 1.5s ease-out forwards}
@keyframes confetti{0%{transform:translate(0,0) rotate(0);opacity:1}70%{opacity:1}100%{transform:translate(var(--dx),calc(var(--dy) + 260px)) rotate(var(--r));opacity:0}}
@media (prefers-reduced-motion:reduce){.nv-emoji{animation:none}}
@media(max-width:700px){.result-summary .note-vivante{width:100%}}
/* Barre de réussite par question */
.barre-questions{display:flex;gap:4px;height:30px;border-radius:999px;overflow:hidden;border:2px solid var(--ink);background:var(--ink)}
.bq-case{display:grid;place-items:center;min-width:0;font-size:.72rem;font-weight:700;color:#1f1a3d;overflow:hidden}
.bq-case span{overflow:hidden;text-overflow:clip;white-space:nowrap}
.bq-juste{background:#3ddc97}.bq-partiel{background:#ffc94d}.bq-faux{background:#ff7a6b}.bq-vide{background:#d9d5e8}
.bq-resume{display:flex;flex-wrap:wrap;gap:6px 14px;margin:0}

/* Série et badges */
.badges-zone{display:grid;gap:14px}
.serie{display:flex;align-items:center;gap:14px;padding:14px 16px;border-radius:18px;background:var(--accent-soft)}
.serie b{font-family:var(--display);font-size:1.3rem;display:block}
.serie-flamme{font-size:2.2rem;filter:grayscale(1);opacity:.5}
.serie.active{background:linear-gradient(135deg,#fff1e6,#ffe1dc)}
.serie.active .serie-flamme{filter:none;opacity:1;animation:hh-balance 2.4s ease-in-out infinite}
.serie.active b{color:#c2410c}
.badges{display:grid;grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:10px}
.badge{position:relative;display:grid;justify-items:center;align-content:start;gap:4px;text-align:center;padding:12px 8px;border-radius:18px;border:1.5px dashed var(--line);background:var(--sheet);color:var(--muted)}
.badge-ic{font-size:1.8rem;line-height:1;filter:grayscale(1);opacity:.55}
.badge-nom{font-weight:700;font-size:.85rem;line-height:1.2}
.badge-aide{font-size:.72rem;line-height:1.25}
.badge.ok{border:2px solid var(--ink);box-shadow:var(--relief);background:#fff4c2;color:#1f1a3d}
.badge.ok .badge-ic{filter:none;opacity:1}
.badge.nouveau{animation:badge-nouveau 1s cubic-bezier(.3,1.6,.5,1) both}
.badge-new{position:absolute;top:-10px;right:-6px;background:var(--corail);color:#fff;font-size:.68rem;font-weight:800;padding:2px 8px;border-radius:999px;border:2px solid var(--ink)}
@keyframes badge-nouveau{0%{transform:scale(.4) rotate(-12deg)}100%{transform:scale(1) rotate(0)}}
@media (prefers-reduced-motion:reduce){.badge.nouveau,.serie.active .serie-flamme{animation:none}}
@media (prefers-color-scheme:dark){
  .serie.active{background:linear-gradient(135deg,#3a2a1e,#3a1d27)}.serie.active b{color:#ffab70}
  .badge.ok{background:#3a3418;color:#fff4c2}
  .dash-hero{background:linear-gradient(135deg,#4a30d8,#6a4cf0)}
}

/* Démo animée de l'accueil : data-etape 0 = écrit, 1 = rend, 2 = correction en cours, 3 = résultat */
.hh-demo{display:grid;gap:12px;justify-items:center;width:100%;max-width:400px;justify-self:center}
.hd-ecran{position:relative;width:100%;min-height:320px;background:var(--sheet);border:2px solid var(--ink);border-radius:24px;box-shadow:5px 5px 0 var(--ink);overflow:hidden;transform:rotate(1.5deg)}
.hd-barre{display:flex;align-items:center;gap:6px;padding:10px 14px;border-bottom:1.5px solid var(--line);background:var(--accent-soft)}
.hd-barre i{width:9px;height:9px;border-radius:50%;background:var(--corail)}.hd-barre i:nth-child(2){background:var(--jaune)}.hd-barre i:nth-child(3){background:var(--vert)}
.hd-barre b{margin-left:8px;font-size:.8rem;color:var(--accent)}
.hd-copie{display:grid;gap:10px;padding:18px 18px 16px;background-image:linear-gradient(transparent 31px,var(--line) 32px);background-size:100% 32px;transition:opacity .4s ease,filter .4s ease}
.hd-l{margin:0;font-family:var(--pen);font-size:1.35rem;line-height:1.15;color:#2a3aa8;white-space:nowrap}
.hd-l b{font-family:var(--body);font-size:.85rem;color:var(--muted);margin-right:4px}
.hd-l sub,.hd-l sup{font-family:var(--body);font-size:.62em}
@media (prefers-color-scheme:dark){.hd-l{color:#a9b6ff}}
.hd-envoyer{justify-self:end;margin-top:4px;background:var(--accent);color:#fff;font-weight:700;font-size:.85rem;padding:8px 14px;border-radius:999px;border:2px solid var(--ink);box-shadow:2px 2px 0 var(--ink);transition:transform .15s ease,box-shadow .15s ease}
.hd-attente{position:absolute;inset:44px 0 0;display:grid;place-content:center;justify-items:center;gap:10px;font-weight:700;color:var(--accent);opacity:0;pointer-events:none;transition:opacity .3s ease}
.hd-points{display:flex;gap:6px}.hd-points i{width:11px;height:11px;border-radius:50%;background:var(--accent);animation:hd-rebond 1s ease-in-out infinite}
.hd-points i:nth-child(2){animation-delay:.15s;background:var(--jaune)}.hd-points i:nth-child(3){animation-delay:.3s;background:var(--vert)}
@keyframes hd-rebond{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}
.hd-res{position:absolute;inset:44px 0 0;display:grid;align-content:start;gap:8px;padding:14px 16px;background:var(--sheet);opacity:0;transform:translateY(16px);transition:opacity .4s ease,transform .4s ease;pointer-events:none}
.hd-note{display:flex;align-items:center;gap:10px;background:#e8e2ff;border:2px solid var(--ink);border-radius:16px;padding:8px 12px;color:#1f1a3d}
.hd-note .hd-emoji{font-size:1.6rem}
.hd-note b{font-family:var(--display);font-size:2rem;line-height:1}.hd-note small{font-weight:700;opacity:.7}
.hd-bravo{margin-left:auto;font-family:var(--display);font-weight:600}
.hd-bq{display:flex;gap:3px;height:22px;border-radius:999px;overflow:hidden;border:2px solid var(--ink);background:var(--ink)}
.hd-bq span{flex:1;display:grid;place-items:center;font-size:.68rem;font-weight:800;color:#1f1a3d;transform-origin:left;transition:transform .35s ease}
.hh-demo[data-etape="3"] .hd-bq span:nth-child(2){transition-delay:.25s}.hh-demo[data-etape="3"] .hd-bq span:nth-child(3){transition-delay:.5s}
.hh-demo:not([data-etape="3"]) .hd-res,.hh-demo:not([data-etape="3"]) .hd-com{transition-duration:.15s}
.hd-com{margin:0;font-size:.88rem;padding:7px 10px;border-radius:12px;background:var(--paper);border:1.5px solid var(--line);opacity:0;transform:translateX(12px);transition:opacity .35s ease,transform .35s ease}
.hd-com sub,.hd-com sup{font-size:.7em}
.hh-demo[data-etape="3"] .hd-c1{transition-delay:.9s}.hh-demo[data-etape="3"] .hd-c2{transition-delay:1.4s}.hh-demo[data-etape="3"] .hd-c3{transition-delay:1.9s}
.hd-etapes{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.hd-etapes span{font-size:.8rem;font-weight:700;padding:5px 11px;border-radius:999px;background:var(--sheet);border:1.5px solid var(--line);color:var(--muted);transition:all .25s ease}
/* Étape 0 : les lignes s'écrivent l'une après l'autre */
.hh-demo[data-etape="0"] .hd-l{animation:hd-ecrit .9s steps(22,end) both}
.hh-demo[data-etape="0"] .hd-l2{animation-delay:1s}.hh-demo[data-etape="0"] .hd-l3{animation-delay:2s}
@keyframes hd-ecrit{from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}
/* Étape 1 : on appuie sur « Rendre » */
.hh-demo[data-etape="1"] .hd-envoyer{transform:translate(2px,2px) scale(.97);box-shadow:0 0 0 var(--ink);background:var(--jaune);color:#1f1a3d}
/* Étape 2 : correction en cours */
.hh-demo[data-etape="2"] .hd-copie{opacity:.25;filter:blur(1px)}
.hh-demo[data-etape="2"] .hd-attente{opacity:1}
/* Étape 3 : le résultat */
.hh-demo[data-etape="3"] .hd-copie{opacity:0}
.hh-demo[data-etape="3"] .hd-res{opacity:1;transform:none}
.hh-demo:not([data-etape="3"]) .hd-bq span{transform:scaleX(0)}
.hh-demo[data-etape="3"] .hd-com{opacity:1;transform:none}
.hh-demo[data-etape="0"] [data-e="0"],.hh-demo[data-etape="1"] [data-e="2"],.hh-demo[data-etape="2"] [data-e="2"],.hh-demo[data-etape="3"] [data-e="3"]{background:var(--jaune);color:#1f1a3d;border-color:var(--ink);box-shadow:2px 2px 0 var(--ink)}
@media(max-width:700px){.hd-ecran{transform:none;min-height:310px}.hd-l{font-size:1.2rem}}
@media (prefers-reduced-motion:reduce){.hd-points i{animation:none}}

/* Photos et captures : barre visible en haut de la copie */
.ws-photos{order:0;border-top:0;border-bottom:1px solid var(--line);background:linear-gradient(90deg,#fff4c2,#fff9e0);padding:8px 10px;display:grid;gap:6px;max-height:40%;overflow:auto;flex:none}
.ws-photos-tete{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
.ws-photos-titre{display:inline-flex;align-items:center;gap:6px;margin-right:auto;color:#1f1a3d;font-size:.92rem}
.ws-photos-tete button{min-height:40px;padding:6px 13px;font-size:.88rem;font-weight:700;background:#fff;border:2px solid #1f1a3d;color:#1f1a3d;box-shadow:2px 2px 0 #1f1a3d}
.ws-photos-tete button:hover{transform:translate(-1px,-1px);box-shadow:3px 3px 0 #1f1a3d}
.ws-photos-aide{margin:0;color:#4a4566}
.ws-photos .thumbs{display:flex;flex-wrap:wrap;gap:8px}
.ws-photos .thumb img{height:64px}
@media (prefers-color-scheme:dark){.ws-photos{background:linear-gradient(90deg,#3a3418,#2e2a16)}.ws-photos-titre{color:#fff4c2}.ws-photos-aide{color:#d8d2b0}}
@media(max-width:700px){.ws-photos{padding:4px 8px;gap:4px}.ws-photos-aide{display:none}.ws-photos:not(.has-photos) .ws-photos-titre{display:none}.ws-photos-tete button{flex:1 1 calc(50% - 6px);min-width:0;padding-inline:8px;font-size:.8rem;white-space:nowrap}}
/* Badge Powered by Netlify injecté par l'hébergeur : masqué sur toutes les pages. */
iframe#nl-badge-frame,iframe[src*="/.netlify/scripts/hud"],#nl-badge-frame{display:none!important;visibility:hidden!important;pointer-events:none!important}

/* Accès rapide aux devoirs par état, même quand la liste est longue */
.dstatus{flex-wrap:nowrap;overflow-x:auto;padding:2px 2px 8px;scrollbar-width:thin}
.dstatus button{display:inline-flex;align-items:center;gap:8px;flex:none;white-space:nowrap}
.dstatus button span{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:var(--paper);font-size:.76rem;font-variant-numeric:tabular-nums}
.dstatus button[aria-pressed="true"] span{background:rgba(255,255,255,.2)}

/* Atelier de rédaction agrandi : réservé à l'onglet « feuille seule » */
body.ws-on.feuille-seule .topbar{display:none}
body.ws-on.feuille-seule main#app{padding:8px}
body.feuille-seule .ws-body{grid-template-columns:minmax(0,1fr)}
body.feuille-seule .ws-sujet,body.feuille-seule .ws-sep{display:none!important}
body.feuille-seule .ws-copie{grid-column:1}
body.feuille-seule #copyWide,body.feuille-seule .ws-switch{display:none!important}
body.feuille-seule .ws-head{display:grid;grid-template-columns:auto minmax(180px,1fr) auto auto;gap:8px 14px;align-items:center;padding:4px 8px}
body.feuille-seule .ws-head>.sep{display:none}
body.feuille-seule .ws-head .ws-title{min-width:0;order:0;flex-basis:auto}
body.feuille-seule .ws-copie{position:relative;border-radius:14px;border-color:#e1e5ef;box-shadow:0 8px 28px rgba(31,42,68,.08)}
body.feuille-seule .ws-copie>.ws-bar{flex-wrap:wrap;overflow:visible;gap:8px;padding:8px 12px;background:#fff}
body.feuille-seule .ws-copie>.ws-bar .ws-pen{display:contents}
body.feuille-seule .ws-copie>.ws-bar button,body.feuille-seule .ws-copie>.ws-bar select,body.feuille-seule .ws-copie>.ws-bar .mode button{padding-inline:8px;min-height:38px}
body.feuille-seule .ws-more-tools{position:relative}
body.feuille-seule .ws-more-tools>summary{display:inline-flex;align-items:center;min-height:38px;padding:6px 12px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);font-weight:600;cursor:pointer;list-style:none}
body.feuille-seule .ws-more-tools>summary::-webkit-details-marker{display:none}
body.feuille-seule .ws-more-tools[open] .ws-more-panel{position:absolute;z-index:25;top:calc(100% + 6px);right:0;display:flex;gap:6px;padding:8px;border:1px solid #e1e5ed;border-radius:12px;background:#fff;box-shadow:0 8px 24px rgba(31,42,68,.15)}
body.feuille-seule .ws-more-panel button{white-space:nowrap}
body.feuille-seule .ws-photo-tools{display:flex;align-items:center;gap:8px;margin-left:0;flex:none}
body.feuille-seule .ws-photo-tools .ws-photos-titre{display:flex;align-items:center;gap:6px;white-space:nowrap}
body.feuille-seule .ws-photo-tools button{white-space:nowrap}
body.feuille-seule .ws-paper-picker{border-left:1px solid #e5e8f0}
body.feuille-seule .ws-photo-tools{padding-right:8px;border-right:1px solid #e5e8f0}
body.feuille-seule .ws-copie>.ws-bar::-webkit-scrollbar{height:4px}
body.feuille-seule .ws-copie>.ws-bar::-webkit-scrollbar-thumb{background:#cbd0da;border-radius:99px}
body.feuille-seule .ws-photos{background:#f8f9fc;border-color:#e7e9ef;max-height:26%}
body.feuille-seule .ws-photos-aide{display:none}
body.feuille-seule .ws-photo-tray{margin:8px 12px}
body.feuille-seule .ws-photo-tray>summary{display:flex;align-items:center;gap:8px;width:max-content;min-height:36px;padding:5px 10px;border:1px solid #e1e5ed;border-radius:9px;background:#fff;color:var(--ink);font-weight:600;cursor:pointer;list-style:none}
body.feuille-seule .ws-photo-tray>summary::-webkit-details-marker{display:none}
body.feuille-seule .ws-photo-tray-content{padding:8px 2px}
body.feuille-seule .ws-photo-tray .thumbs{display:flex;gap:8px;overflow-x:auto;flex-wrap:nowrap;max-width:100%}
body.feuille-seule .ws-photo-tray .thumb{flex:none}
body.feuille-seule .ws-sheet{display:block;padding:0;overflow:auto;background:linear-gradient(180deg,#f3f5f8,#eef1f5);scrollbar-width:thin;overscroll-behavior:contain}
body.feuille-seule .ws-sheet::-webkit-scrollbar{width:10px}
body.feuille-seule .ws-sheet::-webkit-scrollbar-thumb{background:#c7ccd6;border:3px solid #eef1f5;border-radius:99px}
body.feuille-seule .ws-world{position:relative;display:block;width:100%;min-height:100%;box-sizing:border-box;padding:22px clamp(12px,2vw,28px)}
body.feuille-seule .ws-world .pad,body.feuille-seule .ws-world .sheet-text{position:relative;left:auto;top:auto;transform:none;transform-origin:top center;width:min(1180px,calc(100vw - 56px));margin:0 auto;background:#fff;border:1px solid #e0e4ed;border-radius:10px;box-shadow:0 8px 22px rgba(31,42,68,.08)}
body.feuille-seule .ws-world .sheet-text{height:1100px;min-height:0;flex:none}
body.feuille-seule .ws-world .pad{background-color:#fff}
body.feuille-seule .ws-world .pad canvas{background:transparent!important}
body.feuille-seule .ws-add-page-bottom{display:flex;align-items:center;justify-content:center;width:min(1180px,calc(100vw - 56px));min-height:46px;margin:14px auto 8px;padding:8px 16px;border:1px dashed #c8cce0;border-radius:10px;background:rgba(255,255,255,.76);color:#5948c7;font-weight:700}
body.feuille-seule .ws-add-page-bottom:hover{border-color:#5948c7;background:#fff}
body.feuille-seule .ws-head .chip.ok{background:#f0edff;color:#5948c7;border-color:#ded8ff}
@media(max-width:640px){body.feuille-seule .ws-head{grid-template-columns:auto 1fr auto}body.feuille-seule .ws-head .ws-title{grid-column:1/-1;grid-row:2}body.feuille-seule .ws-head #full{grid-column:3;grid-row:1}}
@media(max-width:1100px){body.feuille-seule .ws-copie>.ws-bar{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;gap:4px;padding:6px 8px;scrollbar-width:thin;overscroll-behavior-x:contain}body.feuille-seule .ws-copie>.ws-bar>*{flex:0 0 auto}body.feuille-seule .ws-copie>.ws-bar button,body.feuille-seule .ws-copie>.ws-bar select,body.feuille-seule .ws-copie>.ws-bar .mode button{min-height:36px;padding-inline:7px;font-size:.82rem}body.feuille-seule .ws-copie>.ws-bar .ws-ink{width:34px}body.feuille-seule .ws-copie>.ws-bar .ws-paper-picker{gap:4px;padding-inline:4px}body.feuille-seule .ws-copie>.ws-bar .ws-photo-tools{flex:none;gap:4px}body.feuille-seule .ws-copie>.ws-bar .ws-photo-tools .ws-photos-titre b{display:none}body.feuille-seule .ws-copie>.ws-bar .ws-photo-tools .ws-action-long{display:none}body.feuille-seule .ws-copie>.ws-bar .ws-photo-tools .ws-action-short{display:inline}body.feuille-seule .ws-copie>.ws-bar .ws-photo-tools button{padding-inline:7px;font-size:.78rem}body.feuille-seule .ws-copie>.ws-bar .ws-photo-tools button>span[aria-hidden="true"]{font-size:.9rem}}
body.feuille-seule .ws-action-short{display:none}
@media(max-width:640px){body.feuille-seule .ws-copie>.ws-bar .ws-photo-tools .ws-action-short{display:none}body.feuille-seule .ws-copie>.ws-bar .ws-photo-tools button{width:38px;min-width:38px;padding-inline:4px;font-size:0}}
body.feuille-seule .ws-pan-ready .ws-sheet,body.feuille-seule .ws-pan-ready .ws-sheet canvas{cursor:grab}
body.feuille-seule .ws-panning .ws-sheet,body.feuille-seule .ws-panning .ws-sheet canvas{cursor:grabbing}
body.feuille-seule .ws-paper-picker{display:inline-flex;align-items:center;gap:6px;padding:0 8px;color:#46506a;font-size:.82rem;font-weight:650;white-space:nowrap}
body.feuille-seule .ws-paper-picker select{min-height:38px}
body.feuille-seule .ws[data-paper="lined"] .ws-sheet .sheet-text{background-image:linear-gradient(transparent calc(2em - 1px),rgba(89,70,214,.14) 1px);background-size:100% 2em}
body.feuille-seule .ws[data-paper="grid"] .ws-sheet .sheet-text{background-image:linear-gradient(to right,rgba(89,70,214,.13) 1px,transparent 1px),linear-gradient(to bottom,rgba(89,70,214,.13) 1px,transparent 1px);background-size:24px 24px}
body.feuille-seule .ws[data-paper="blank"] .ws-sheet .sheet-text{background-image:none}
body.feuille-seule .ws.ws-show-enonce .ws-body{grid-template-columns:minmax(0,1fr)}
body.feuille-seule .ws.ws-show-enonce .ws-copie,
body.feuille-seule .ws.ws-show-enonce .ws-sep,
body.feuille-seule .ws.ws-show-enonce .ws-foot,
body.feuille-seule .ws.ws-show-enonce .ws-canvas-tools,
body.feuille-seule .ws.ws-show-enonce>.notice{display:none!important}
body.feuille-seule .ws.ws-show-enonce .ws-sujet{display:flex!important;grid-column:1;min-height:0}
body.feuille-seule .ws.ws-show-enonce .ws-sujet .ws-scroll{padding:clamp(12px,2vw,24px);}
body.feuille-seule .ws-enonce-close{margin-left:auto;color:var(--accent)}
body.feuille-seule .ws-head #toggleEnonce[aria-expanded="true"]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}
body.feuille-seule .ws.ws-show-enonce .ws-head{flex:none}
body.feuille-seule .ws.ws-show-enonce .ws-sujet .ws-bar{position:sticky;top:0;z-index:2}
/* Tuteur abonné : demande guidée, exemples rapides et réponse lisible */
.support-hero{position:relative;overflow:hidden}
.support-steps{display:flex;gap:10px 22px;flex-wrap:wrap;margin-top:18px;color:var(--muted);font-size:.9rem}
.support-steps span{display:inline-flex;align-items:center;gap:7px}
.support-steps b{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--accent-soft);color:var(--accent)}
.support-compose{max-width:900px;margin:18px auto;padding:clamp(16px,3vw,28px);gap:18px;border-color:color-mix(in srgb,var(--accent) 20%,var(--line));box-shadow:0 12px 36px rgba(42,35,115,.08)}
.support-compose-title{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.support-compose-title h2{margin:10px 0 4px;font-size:clamp(1.2rem,2vw,1.55rem)}
.support-compose-title p{margin:0;max-width:620px}
.support-spark{display:grid;place-items:center;width:44px;height:44px;flex:none;border-radius:14px;background:var(--accent-soft);color:var(--accent);font-size:1.5rem}
.support-starters{display:flex;gap:8px;flex-wrap:wrap}
.support-starters button{min-height:38px;border-radius:999px;background:var(--paper);font-size:.83rem}
.support-starters button:hover{border-color:var(--accent);color:var(--accent)}
.support-context{align-items:end}
.support-question-wrap{display:grid;gap:7px}
.support-question-wrap textarea{min-height:132px;resize:vertical;padding:14px 16px;line-height:1.65;background:var(--paper)}
.support-input-foot{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}
.support-submit-row{align-items:center}
.support-submit-row .primary{min-height:48px;padding-inline:20px}
.support-answer{max-width:900px;margin:18px auto;scroll-margin-top:16px}
.support-answer>h2{font-size:1.35rem}
@media(max-width:620px){.support-steps{display:grid;gap:7px}.support-starters{display:grid;grid-template-columns:1fr}.support-starters button{text-align:left}.support-submit-row{align-items:stretch;flex-direction:column}.support-submit-row .primary{width:100%}.support-input-foot{font-size:.8rem}}
.ws-canvas-tools{position:absolute;right:14px;bottom:14px;z-index:10;display:flex;align-items:center;gap:6px;padding:6px;border:1px solid #e1e5ed;border-radius:14px;background:rgba(255,255,255,.95);box-shadow:0 6px 20px rgba(31,42,68,.13);backdrop-filter:blur(10px)}
.ws-canvas-tools{transition:opacity .18s ease,transform .18s ease}
body.feuille-seule .ws.ws-focus-mode:not(.ws-controls-visible) .ws-canvas-tools{opacity:0;transform:translateY(10px);pointer-events:none}
body.feuille-seule .ws-canvas-tools #focusMode[aria-pressed="true"]{background:#f0edff;color:#5948c7;border-color:#d8d0ff}
.ws-page-nav{display:inline-flex;align-items:center;gap:4px;padding-right:6px;border-right:1px solid var(--line)}
.ws-page-nav #pagePosition{min-width:92px;text-align:center;font-size:.82rem;font-weight:700;font-variant-numeric:tabular-nums;color:#46506a}
.ws-page-nav button{min-width:34px!important;padding-inline:6px!important}
.ws-page-nav button:disabled{opacity:.42;cursor:default}
.ws-canvas-tools button{min-height:40px;padding:6px 12px;font-size:.88rem}
.ws-canvas-tools .ws-sheet-zoom{border:0;padding:0}
.ws-sheet-zoom{display:inline-flex;align-items:center;gap:4px;flex:none;padding-left:6px;border-left:1px solid var(--line)}
.ws-sheet-zoom button{min-width:38px;padding-inline:8px!important}
.ws-sheet-zoom #sheetZoomReset{min-width:56px;font-variant-numeric:tabular-nums}
@media(max-width:520px){.ws-canvas-tools{right:8px;bottom:8px;max-width:calc(100vw - 24px);flex-wrap:wrap;justify-content:center;padding:4px;gap:2px}.ws-canvas-tools button{min-height:38px;padding:5px 8px;font-size:.8rem}.ws-canvas-tools .ws-sheet-zoom button{min-width:34px}.ws-canvas-tools .ws-sheet-zoom #sheetZoomReset{min-width:50px}.ws-page-nav #pagePosition{min-width:82px}}

/* Thèmes sélectionnables, mémorisés sur l'appareil */
.theme-switch{display:inline-flex;align-items:center;gap:6px;margin:0;font-size:.78rem;font-weight:650;color:var(--muted);white-space:nowrap}
.theme-switch select{width:auto;min-height:36px;padding:5px 28px 5px 9px;font-size:.82rem;border-radius:10px}
html[data-theme="academique"]{color-scheme:light}
html[data-theme="academique"] body{
  --paper:#f7f5ef;--sheet:#fffefa;--ink:#18324b;--muted:#657382;--line:#dfdfd5;--grid:rgba(24,50,75,.045);
  --accent:#17466c;--accent-soft:#e8f0f5;--gold:#b18436;--gold-soft:#f5eedf;
  --red:#bd3448;--red-soft:#fbeaec;--ok:#247856;--ok-soft:#e7f4ed;--warn:#94600b;--warn-soft:#f8f0df;
  --jaune:#d2a747;--corail:#bf684d;--vert:#3d8467;--ciel:#5587a7;--relief:0 2px 5px rgba(24,50,75,.12);
  background:linear-gradient(var(--grid) 1px,transparent 1px),linear-gradient(90deg,var(--grid) 1px,transparent 1px),radial-gradient(ellipse at 5% 0%,rgba(177,132,54,.10),transparent 32%),var(--paper);
  background-size:24px 24px,24px 24px,auto,auto;background-attachment:fixed;color-scheme:light
}
html[data-theme="academique"] .brand-name b{color:var(--gold)}
html[data-theme="academique"] .brand-mark{border-color:var(--gold)}
html[data-theme="academique"] .panel,html[data-theme="academique"] .card{border-radius:12px;box-shadow:0 5px 18px rgba(24,50,75,.055)}
html[data-theme="academique"] button,html[data-theme="academique"] .btn{border-radius:10px}
html[data-theme="academique"] button.primary,html[data-theme="academique"] .btn.primary{border-color:var(--accent);box-shadow:var(--relief)}
html[data-theme="academique"] .topbar{backdrop-filter:blur(12px)}
html[data-theme="academique"] .ws-canvas-tools{border-color:var(--line);background:rgba(255,254,250,.96)}
@media(max-width:700px){.theme-switch span{display:none}.theme-switch select{min-height:34px;padding-inline:8px}}
