:root {
  --ink:#14213d;
  --muted:#5f6b7a;
  --paper:#f7f6f2;
  --card:#ffffff;
  --line:#dfe4ea;
  --accent:#1f6feb;
  --accent2:#0b8457;
  --danger:#b42318;
  --warn:#a15c00;
  --shadow:0 18px 45px rgba(20,33,61,.12);
  --radius:22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
*{box-sizing:border-box}
body{margin:0;background:linear-gradient(150deg,#eef3fb 0%,#f7f6f2 48%,#eef8f3 100%);color:var(--ink);min-height:100vh}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.45}
a{color:inherit}
.shell{max-width:1440px;margin:0 auto;padding:24px}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px}
.brand{display:flex;align-items:center;gap:12px;font-weight:850;font-size:1.15rem;letter-spacing:-.02em}
.brand-mark{width:42px;height:42px;border-radius:15px;background:var(--ink);color:white;display:grid;place-items:center;font-weight:900;box-shadow:var(--shadow)}
.top-actions{display:flex;gap:8px;flex-wrap:wrap}
.pill{display:inline-flex;align-items:center;gap:7px;padding:8px 12px;border-radius:999px;background:#fff;border:1px solid var(--line);font-size:.9rem;color:var(--muted)}
.hero{background:rgba(255,255,255,.84);backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.9);border-radius:32px;padding:38px;box-shadow:var(--shadow);display:grid;grid-template-columns:1.25fr .75fr;gap:30px;align-items:center}
.hero h1{font-size:clamp(2.15rem,4vw,4.6rem);line-height:.98;margin:0 0 16px;letter-spacing:-.055em}
.hero p{font-size:1.08rem;line-height:1.65;color:var(--muted);max-width:760px}
.hero-panel{background:var(--ink);color:#fff;border-radius:26px;padding:24px;min-height:250px;display:flex;flex-direction:column;justify-content:space-between}
.hero-panel strong{font-size:1.35rem}
.hero-panel p{color:#dbe4f2;font-size:.96rem}
.choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:24px}
.choice{border:1px solid var(--line);background:#fff;border-radius:var(--radius);padding:24px;text-align:left;min-height:175px;box-shadow:0 10px 30px rgba(20,33,61,.06);transition:.2s transform,.2s box-shadow}
.choice:hover{transform:translateY(-3px);box-shadow:var(--shadow)}
.choice .icon{font-size:2rem}
.choice h2{font-size:1.18rem;margin:14px 0 7px}
.choice p{margin:0;color:var(--muted);line-height:1.5}
.section{margin-top:28px}
.section-title{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin:0 0 14px}
.section-title h2{margin:0;font-size:1.55rem;letter-spacing:-.025em}
.section-title p{margin:0;color:var(--muted)}
.card{background:rgba(255,255,255,.92);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 10px 28px rgba(20,33,61,.06)}
.recall-card{padding:20px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-left:5px solid var(--accent2)}
.recall-card h3{margin:0 0 7px}.recall-card p{margin:0;color:var(--muted)}
.btn{border:0;border-radius:14px;padding:12px 17px;background:var(--ink);color:#fff;font-weight:750;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.btn.secondary{background:#fff;color:var(--ink);border:1px solid var(--line)}
.btn.accent{background:var(--accent)}
.btn.success{background:var(--accent2)}
.btn.danger{background:var(--danger)}
.btn.ghost{background:transparent;color:var(--ink);border:1px solid var(--line)}
.btn.small{padding:9px 12px;font-size:.9rem;border-radius:12px}
.catalog-head{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:16px}
.search{flex:1;min-width:260px;border:1px solid var(--line);background:white;border-radius:16px;padding:14px 16px;outline:none}
.search:focus,select:focus,textarea:focus,input:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(31,111,235,.12)}
select{border:1px solid var(--line);background:white;border-radius:14px;padding:13px 14px;min-width:170px}
.course-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:15px}
.course-card{padding:20px;display:flex;flex-direction:column;gap:12px;min-height:250px}
.course-card .meta{display:flex;gap:7px;flex-wrap:wrap}
.tag{font-size:.78rem;padding:6px 9px;border-radius:999px;background:#eef3fb;color:#34506f;font-weight:700}
.tag.ok{background:#e8f7ef;color:#176b4a}.tag.board{background:#fff1d8;color:#7c4a00}.tag.review{background:#f8e9e7;color:#8d2e25}
.course-card h3{margin:0;font-size:1.12rem;line-height:1.3}
.course-card p{margin:0;color:var(--muted);line-height:1.45;flex:1}
.course-card footer{display:flex;justify-content:space-between;align-items:center;gap:10px}
.empty{padding:44px;text-align:center;color:var(--muted)}
.room-shell{max-width:1550px;margin:0 auto;padding:16px}
.room-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.room-title h1{font-size:1.25rem;margin:0 0 3px}.room-title p{margin:0;color:var(--muted);font-size:.9rem}
.room-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.room-grid{display:grid;grid-template-columns:minmax(330px,.75fr) minmax(520px,1.25fr);gap:14px;min-height:calc(100vh - 115px)}
.teacher-panel,.board-panel{background:#fff;border:1px solid var(--line);border-radius:26px;box-shadow:var(--shadow);overflow:hidden}
.teacher-panel{display:flex;flex-direction:column}
.teacher-head{padding:18px 20px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:13px}
.avatar{width:54px;height:54px;border-radius:18px;background:linear-gradient(145deg,#14213d,#2c4a76);color:#fff;display:grid;place-items:center;font-size:1.25rem;font-weight:900}
.teacher-head h2{font-size:1rem;margin:0}.teacher-head p{font-size:.85rem;color:var(--muted);margin:4px 0 0}
.progress-wrap{padding:12px 20px;border-bottom:1px solid var(--line)}
.progress-row{display:flex;justify-content:space-between;font-size:.8rem;color:var(--muted);margin-bottom:7px}
.progress{height:8px;background:#edf0f4;border-radius:999px;overflow:hidden}.progress>div{height:100%;background:var(--accent);transition:width .35s ease}
.dialogue{padding:20px;overflow:auto;flex:1;min-height:360px;max-height:calc(100vh - 360px)}
.speech{font-size:1.04rem;line-height:1.68;white-space:pre-line}
.step-kicker{text-transform:uppercase;letter-spacing:.1em;font-size:.72rem;font-weight:850;color:var(--accent);margin-bottom:8px}
.adaptive-note{margin-top:14px;background:#eef6ff;border-left:4px solid var(--accent);border-radius:12px;padding:12px;font-size:.9rem;color:#294b74}
.response-area{border-top:1px solid var(--line);padding:15px 18px;background:#fbfcfe}
.response-row{display:flex;gap:9px}.response-row textarea{flex:1;min-height:78px;resize:vertical;border:1px solid var(--line);border-radius:14px;padding:12px}
.quick-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.feedback{margin-top:10px;padding:11px 13px;border-radius:12px;font-size:.92rem;line-height:1.45}.feedback.ok{background:#e8f7ef;color:#176b4a}.feedback.partial{background:#fff5df;color:#805000}.feedback.bad{background:#fdecea;color:#8d2e25}
.board-panel{display:flex;flex-direction:column;background:#fdfdfb}
.board-head{display:flex;justify-content:space-between;align-items:center;padding:15px 18px;border-bottom:1px solid var(--line)}
.board-head h2{font-size:1rem;margin:0}.board-head span{font-size:.8rem;color:var(--muted)}
.board-stage{position:relative;flex:1;min-height:540px;padding:20px;overflow:auto;background:linear-gradient(rgba(20,33,61,.035) 1px, transparent 1px),linear-gradient(90deg,rgba(20,33,61,.035) 1px, transparent 1px),#fff;background-size:28px 28px}
.board-content{min-height:100%;border-radius:18px;background:rgba(255,255,255,.88);padding:22px;box-shadow:inset 0 0 0 1px rgba(20,33,61,.06)}
.board-text h3{font-size:1.55rem;margin:0 0 14px}.board-text p,.board-text li{font-size:1.05rem;line-height:1.65}.board-text .formula{font-family:"Cambria Math",Georgia,serif;font-size:1.5rem;background:#f1f4f8;border-radius:13px;padding:12px 15px;display:inline-block}
.board-footer{padding:12px 16px;border-top:1px solid var(--line);display:flex;gap:8px;justify-content:space-between;align-items:center;flex-wrap:wrap}
.milestone{font-size:.88rem;color:var(--muted)}
.svg-board{width:100%;height:auto;min-height:360px}.svg-board text{font-family:Inter,system-ui,sans-serif;fill:#14213d}
.code-layout{display:grid;grid-template-columns:1.1fr .9fr;gap:14px;height:100%}.code-editor{background:#101827;color:#e6edf3;border-radius:16px;padding:16px;white-space:pre;font:15px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace;overflow:auto}.trace{border:1px solid var(--line);border-radius:16px;padding:14px}.trace-row{display:grid;grid-template-columns:80px 1fr;gap:10px;padding:9px 0;border-bottom:1px solid var(--line)}
.annotation-layout{display:grid;grid-template-columns:1fr 1fr;gap:16px}.passage{font-family:Georgia,serif;font-size:1.08rem;line-height:1.75;padding:18px;background:#fffdf8;border-radius:16px;border:1px solid #eee7d8}.highlight{background:#fff0a8;border-bottom:2px solid #c38a00}.annotation-list{display:flex;flex-direction:column;gap:10px}.annotation{padding:12px;border-radius:13px;background:#f3f6fa;border-left:4px solid var(--accent)}
.modal-backdrop{position:fixed;inset:0;background:rgba(10,18,35,.52);display:grid;place-items:center;padding:20px;z-index:30}.modal{max-width:700px;width:100%;max-height:90vh;overflow:auto;background:#fff;border-radius:24px;padding:26px;box-shadow:0 30px 90px rgba(0,0,0,.25)}.modal h2{margin-top:0}
.recall-question{font-size:1.15rem;line-height:1.6;background:#f6f8fb;border-radius:16px;padding:18px;margin:14px 0}
.status-line{display:flex;gap:10px;align-items:center;color:var(--muted);font-size:.88rem}
.mode-switch{display:flex;background:#eef1f5;border-radius:14px;padding:4px}.mode-switch button{border:0;background:transparent;border-radius:10px;padding:8px 11px}.mode-switch button.active{background:#fff;box-shadow:0 3px 10px rgba(20,33,61,.12)}
.toast{position:fixed;right:20px;bottom:20px;background:var(--ink);color:#fff;border-radius:15px;padding:13px 17px;box-shadow:var(--shadow);z-index:50;max-width:360px}
.hidden{display:none!important}
@media(max-width:980px){.hero{grid-template-columns:1fr}.choice-grid{grid-template-columns:1fr}.room-grid{grid-template-columns:1fr}.dialogue{max-height:none}.board-stage{min-height:430px}.room-shell{padding:8px}.annotation-layout,.code-layout{grid-template-columns:1fr}}
@media(max-width:620px){.shell{padding:13px}.hero{padding:24px}.topbar{align-items:flex-start}.room-top{align-items:flex-start}.room-actions{justify-content:flex-end}.teacher-head{padding:13px}.dialogue{padding:16px}.board-stage{padding:10px}.response-row{flex-direction:column}.catalog-head{align-items:stretch}.search,select{width:100%}}

/* V10 — professeur conversationnel réel */
.ai-status{font-weight:760;cursor:pointer}.ai-status.connected{color:#176b4a;background:#e8f7ef;border-color:#bfe4d0}.ai-status.missing{color:#805000;background:#fff5df;border-color:#f0d59d}.ai-dot{width:8px;height:8px;border-radius:50%;background:currentColor;display:inline-block}.ai-live{display:inline-flex;align-items:center;gap:7px;font-size:.82rem;font-weight:760;padding:7px 10px;border-radius:999px;white-space:nowrap}.ai-live span{width:8px;height:8px;border-radius:50%;background:currentColor}.ai-live.on{color:#176b4a;background:#e8f7ef}.ai-live.off{color:#805000;background:#fff5df}
.conversation-modal{max-width:1080px;padding:0;overflow:hidden}.conversation-head{padding:22px 24px 17px;display:flex;justify-content:space-between;gap:18px;align-items:flex-start;border-bottom:1px solid var(--line)}.conversation-head h2{margin:8px 0 4px}.conversation-head p{margin:0;color:var(--muted)}.conversation-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(260px,.65fr);min-height:390px;max-height:55vh}.conversation-thread{padding:20px;overflow:auto;background:#f8fafc;display:flex;flex-direction:column;gap:13px}.conversation-empty{margin:auto;max-width:520px;text-align:center;color:var(--muted);padding:30px}.conversation-empty strong{display:block;color:var(--ink);font-size:1.08rem}.chat-turn{display:flex;flex-direction:column;max-width:88%}.chat-turn.student{align-self:flex-end;align-items:flex-end}.chat-turn.teacher{align-self:flex-start}.chat-label{font-size:.72rem;text-transform:uppercase;letter-spacing:.08em;font-weight:850;color:var(--muted);margin:0 8px 5px}.chat-bubble{padding:13px 15px;border-radius:17px;line-height:1.58;white-space:pre-line;background:#fff;border:1px solid var(--line);box-shadow:0 5px 16px rgba(20,33,61,.05)}.chat-turn.student .chat-bubble{background:var(--ink);color:#fff;border-color:var(--ink);border-bottom-right-radius:5px}.chat-turn.teacher .chat-bubble{border-bottom-left-radius:5px}.teacher-check{margin-top:11px;padding:10px 12px;border-radius:12px;background:#eef6ff;border-left:4px solid var(--accent);color:#294b74}.chat-warning{margin-top:9px;color:#805000;font-size:.85rem}.conversation-board{border-left:1px solid var(--line);padding:20px;background:linear-gradient(rgba(20,33,61,.03) 1px,transparent 1px),linear-gradient(90deg,rgba(20,33,61,.03) 1px,transparent 1px),#fff;background-size:24px 24px;overflow:auto}.conversation-board-title{display:flex;align-items:center;gap:10px;font-size:1.05rem;margin-bottom:14px}.conversation-board-title span{width:34px;height:34px;display:grid;place-items:center;background:var(--ink);color:#fff;border-radius:11px;font-weight:900}.conversation-board-line{background:rgba(255,255,255,.9);border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin:8px 0;line-height:1.45}.conversation-highlight{margin-top:14px;background:#fff1d8;color:#7c4a00;border-radius:12px;padding:11px 12px;font-weight:700}.conversation-compose{padding:15px 20px;border-top:1px solid var(--line);background:#fff}.conversation-compose textarea{width:100%;min-height:86px;resize:vertical}.conversation-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;margin-top:9px}.conversation-footer{padding:13px 20px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:10px;background:#fbfcfe}.connection-notice{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:14px 20px 0;padding:12px 14px;border:1px solid #f0d59d;background:#fff8e9;border-radius:14px;color:#704500}.connection-notice p{margin:4px 0 0;font-size:.86rem}.thinking-dot{width:7px;height:7px;border-radius:50%;background:var(--muted);display:inline-block;margin:0 3px;animation:think 1s infinite ease-in-out}.thinking-dot:nth-child(2){animation-delay:.15s}.thinking-dot:nth-child(3){animation-delay:.3s}@keyframes think{0%,80%,100%{transform:translateY(0);opacity:.4}40%{transform:translateY(-5px);opacity:1}}
.field-label{display:block;font-weight:780;margin:15px 0 7px}.ai-config-modal .search{width:100%}
@media(max-width:820px){.conversation-layout{grid-template-columns:1fr;max-height:58vh}.conversation-board{display:none}.conversation-head,.conversation-footer{flex-direction:column}.conversation-footer .btn{width:100%}.chat-turn{max-width:96%}.connection-notice{align-items:flex-start;flex-direction:column}}

/* V11 — profondeur adaptative, cours consultable et réenseignement profond */
.course-depth{display:flex;gap:6px;flex-wrap:wrap;margin-top:4px}.course-depth span{font-size:.75rem;font-weight:750;color:#34506f;background:#eef3fb;border-radius:999px;padding:5px 8px}.depth-line{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 8px}.depth-line span{font-size:.74rem;color:var(--muted);background:#f3f6fa;border-radius:999px;padding:5px 8px}.course-card .depth-line{margin:3px 0 0}
.reader-modal{max-width:1180px;padding:0;overflow:hidden}.reader-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;padding:24px 26px 18px;border-bottom:1px solid var(--line)}.reader-head h2{margin:8px 0 5px}.reader-head p{margin:0;color:var(--muted)}.reader-modal>.search{display:block;width:calc(100% - 52px);margin:16px 26px}.reader-layout{display:grid;grid-template-columns:270px minmax(0,1fr);min-height:420px;max-height:58vh;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.reader-nav{padding:14px;background:#f7f9fc;border-right:1px solid var(--line);overflow:auto;display:flex;flex-direction:column;gap:6px}.reader-nav button{border:1px solid transparent;background:transparent;border-radius:11px;text-align:left;padding:9px 10px;color:var(--ink)}.reader-nav button:hover,.reader-nav button.active{background:#fff;border-color:var(--line);box-shadow:0 4px 12px rgba(20,33,61,.06)}.reader-content{padding:24px 28px;overflow:auto}.reader-content h3{font-size:1.45rem;margin:0 0 12px}.reader-content h4{margin:22px 0 8px}.reader-text{white-space:pre-line;line-height:1.78;font-family:Georgia,serif;font-size:1.06rem}.reader-text mark{background:#fff0a8;border-radius:4px;padding:1px 2px}.reader-content .reader-meta{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:15px}.reader-modal>.quick-actions{padding:15px 24px;margin:0;justify-content:flex-end}
.reteach-modal{max-width:1100px}.reteach-modal>h2{margin:10px 0 16px}.reteach-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(270px,.75fr);gap:18px}.reteach-step{border:1px solid var(--line);border-radius:15px;padding:14px 15px;margin-bottom:10px;background:#fff}.reteach-step strong{display:block;color:var(--accent);margin-bottom:5px}.reteach-step p{margin:0;line-height:1.62}.reteach-board{border-radius:18px;padding:16px;background:linear-gradient(rgba(20,33,61,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(20,33,61,.035) 1px,transparent 1px),#fbfcfe;background-size:22px 22px;border:1px solid var(--line)}.reteach-board h3{margin:0 0 11px}.reteach-board>div{background:rgba(255,255,255,.94);border-radius:12px;border:1px solid var(--line);padding:10px 12px;margin:8px 0}.reteach-board p{margin:5px 0 0;line-height:1.5}.teacher-check{margin-top:14px}
.algebra-board{display:grid;gap:16px}.tile-side{border:1px solid var(--line);border-radius:16px;padding:15px;background:#fbfcfe}.tile-side h4{margin:0 0 12px}.tile-bin{display:flex;gap:8px;flex-wrap:wrap;align-items:flex-end;min-height:88px}.x-tile{width:32px;height:92px;border-radius:7px;background:#dbeafe;border:2px solid #1f6feb;display:grid;place-items:center;font-weight:850}.unit-tile{width:32px;height:32px;border-radius:6px;background:#fef3c7;border:2px solid #d97706;display:grid;place-items:center;font-weight:800}.fraction-board{display:grid;gap:15px}.fraction-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.fraction-card{border:1px solid var(--line);border-radius:16px;padding:14px;background:#fff}.fraction-card h4{margin:0 0 10px}.fraction-strip{display:grid;grid-template-columns:repeat(var(--parts,4),1fr);height:58px;border:2px solid var(--ink);border-radius:8px;overflow:hidden}.fraction-strip span{border-right:1px solid var(--ink)}.fraction-strip span:last-child{border-right:0}.fraction-strip span.filled{background:#bfdbfe}.data-table-board{overflow:auto}.data-table-board table{width:100%;border-collapse:collapse;background:#fff}.data-table-board th,.data-table-board td{border:1px solid var(--line);padding:10px 12px;text-align:left}.data-table-board th{background:#eef3fb}.syntax-board,.phonetics-board,.dialogue-map-board,.source-board,.process-board,.accounting-board,.composition-board,.palette-board,.picture-board{display:grid;gap:14px}.syntax-tree{display:flex;gap:12px;flex-wrap:wrap;justify-content:center}.syntax-tree>div{min-width:150px;padding:14px;border:1px solid var(--line);border-radius:14px;background:#f8fafc;text-align:center}.sound-chunks{display:flex;gap:8px;flex-wrap:wrap}.sound-chunks span{padding:10px 13px;border-radius:12px;background:#eef3fb;border:1px solid #c9d8ed;font-weight:800}.sound-chunks span.stress{background:#fff1d8;border-color:#e3b867}.dialogue-map-board .turn{display:grid;grid-template-columns:44px 1fr;gap:10px;align-items:start}.dialogue-map-board .speaker{width:38px;height:38px;border-radius:12px;background:var(--ink);color:#fff;display:grid;place-items:center;font-weight:900}.dialogue-map-board .bubble{padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:#fff}.source-grid{display:grid;grid-template-columns:minmax(220px,.7fr) minmax(0,1.3fr);gap:15px}.source-card{border:1px solid var(--line);border-radius:15px;padding:14px;background:#fff}.source-card h4{margin:0 0 8px}.source-card p{margin:5px 0;line-height:1.5}.process-flow{display:flex;gap:10px;align-items:stretch;overflow:auto;padding-bottom:4px}.process-flow .process-step{min-width:160px;flex:1;padding:14px;border-radius:14px;border:1px solid var(--line);background:#fff;position:relative}.process-flow .process-step:not(:last-child)::after{content:'→';position:absolute;right:-9px;top:50%;transform:translate(50%,-50%);font-weight:900;color:var(--accent)}.accounting-board table{width:100%;border-collapse:collapse}.accounting-board th,.accounting-board td{border:1px solid var(--line);padding:10px;text-align:right}.accounting-board th:first-child,.accounting-board td:first-child{text-align:left}.composition-canvas{position:relative;min-height:380px;border:1px solid var(--line);border-radius:16px;background:#fff;overflow:hidden}.composition-canvas .zone{position:absolute;border:2px dashed var(--accent);background:rgba(31,111,235,.09);border-radius:11px;padding:8px;font-weight:750}.palette-row{display:flex;gap:10px;flex-wrap:wrap}.palette-swatch{min-width:100px;min-height:92px;border-radius:15px;padding:10px;display:flex;align-items:flex-end;box-shadow:inset 0 0 0 1px rgba(0,0,0,.08);font-weight:800}.picture-sequence{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px}.picture-frame{border:1px solid var(--line);border-radius:16px;padding:15px;text-align:center;background:#fff}.picture-frame .icon{font-size:2.1rem;display:block;margin-bottom:8px}
@media(max-width:900px){.reader-layout,.reteach-grid,.source-grid{grid-template-columns:1fr}.reader-layout{max-height:none}.reader-nav{max-height:170px;border-right:0;border-bottom:1px solid var(--line)}.process-flow{flex-direction:column}.process-flow .process-step:not(:last-child)::after{content:'↓';right:50%;top:auto;bottom:-15px;transform:translate(50%,50%)}.fraction-pair{grid-template-columns:1fr}}
@media(max-width:620px){.reader-head{flex-direction:column}.reader-modal>.search{width:calc(100% - 28px);margin:14px}.reader-content{padding:18px}.reader-modal>.quick-actions{padding:13px}.depth-line{gap:4px}.course-depth span,.depth-line span{font-size:.68rem}}
.algebra-equation{display:grid;grid-template-columns:1fr auto 1fr;gap:14px;align-items:center}.equal-sign{font-size:2rem;font-weight:900;color:var(--accent)}.syntax-sentence,.phonetic-phrase{padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:#fff;font-size:1.15rem;line-height:1.6}.syntax-node{min-width:150px;padding:14px;border:1px solid var(--line);border-radius:14px;background:#f8fafc;text-align:center}.syntax-node span{display:block;color:var(--muted);font-size:.78rem;margin-bottom:5px}.syntax-arrow{display:grid;place-items:center;font-weight:900;color:var(--accent)}.dialogue-lanes{display:flex;flex-direction:column;gap:10px}.dialogue-turn{display:grid;grid-template-columns:42px 1fr;gap:10px;align-items:start}.dialogue-turn>span{width:38px;height:38px;border-radius:12px;background:var(--ink);color:#fff;display:grid;place-items:center;font-weight:900}.dialogue-turn p{margin:0;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:#fff;line-height:1.5}.source-grid dl{margin:8px 0}.source-grid dt{font-size:.78rem;color:var(--muted);font-weight:800}.source-grid dd{margin:2px 0 10px}.process-arrow{display:grid;place-items:center;font-size:1.4rem;font-weight:900;color:var(--accent)}.composition-canvas>.zone{position:absolute;border:2px dashed var(--accent);background:rgba(31,111,235,.09);border-radius:11px;padding:8px;font-weight:750}.palette-swatch-wrap{display:grid;gap:6px}.palette-swatch{display:block;width:92px;height:92px;border-radius:15px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.09)}.palette-swatch-wrap small{font-weight:750}.picture-sequence>.picture-frame{border:1px solid var(--line);border-radius:16px;padding:15px;text-align:center;background:#fff}.picture-sequence>.picture-frame .icon{font-size:2.1rem;display:block;margin-bottom:8px}.picture-sequence>.picture-frame p{margin:7px 0 0}.fraction-card small{display:block;margin-top:8px;color:var(--muted)}
@media(max-width:700px){.algebra-equation{grid-template-columns:1fr}.equal-sign{text-align:center}.syntax-tree{flex-direction:column}.syntax-arrow{transform:rotate(90deg)}}
.branch-feedback{margin-top:10px;padding:11px 12px;border:1px solid rgba(31,111,235,.22);border-radius:12px;background:#f6f9fe;color:#294b74}.branch-feedback>span{display:inline-block;font-size:.68rem;text-transform:uppercase;letter-spacing:.08em;font-weight:850;color:var(--accent);margin-bottom:5px}.branch-feedback p{margin:0 0 6px;line-height:1.45}.branch-feedback strong{display:block;color:var(--ink);font-weight:780}

.btn.bad{background:#7f1d1d;color:white;border-color:#7f1d1d}.btn.bad:hover{filter:brightness(1.04)}
.model-help,.teacher-check{margin-top:10px;padding:10px;border-radius:12px;background:rgba(15,23,42,.06)}
.teacher-check ol{margin:8px 0 0 22px}

.v21-modes{margin-top:6px;border-top:1px solid rgba(15,23,42,.08);padding-top:8px}.tiny-label{font-size:12px;color:#64748b;align-self:center;margin-right:4px}.branch-feedback,.model-help,.teacher-check{line-height:1.45}

/* V22 — professeur-cours adaptatif */
.v22-map-note{margin:0 0 14px;padding:12px 13px;border-radius:14px;background:#f1f8ff;border:1px solid rgba(31,111,235,.18);color:#294b74;line-height:1.45;font-size:.92rem}
.v22-map-note strong{color:#1f6feb}

.v25-proof,.v25-repair{border-left:4px solid #2b7cff;background:rgba(43,124,255,.08)}

/* V26 */
.mini-choice-grid{grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;margin-top:12px}.small-choice{padding:14px;text-align:left;min-height:110px}.small-choice h2{font-size:1rem;margin:0 0 6px}.small-choice p{font-size:.88rem;margin:0;color:var(--muted)}.reader-content .reader-text{font-size:1.02rem;line-height:1.65}.room-actions #prevStep{border-color:rgba(49,130,206,.35)}

/* V31.2 : dialogue réellement utilisable sur petit écran. Le champ d'envoi reste visible. */
body.modal-open{overflow:hidden}
.modal-backdrop.conversation-backdrop{align-items:stretch;place-items:center;overflow:auto;padding:10px}
.conversation-modal{width:min(1120px,98vw);height:min(94vh,900px);display:flex;flex-direction:column;max-height:94vh;overflow:hidden}
.conversation-modal .conversation-head{flex:0 0 auto}
.conversation-layout{flex:1 1 auto;min-height:0;max-height:none}
.conversation-thread,.conversation-board{min-height:0;overscroll-behavior:contain}
.conversation-compose,.conversation-footer{flex:0 0 auto}
.conversation-compose textarea{min-height:74px;max-height:22vh}
@media(max-width:800px){.conversation-layout{grid-template-columns:1fr;max-height:none}.conversation-board{display:none}.conversation-modal{height:96vh;width:98vw}.conversation-head{padding:14px 16px}.conversation-compose{padding:10px 12px}.conversation-footer{padding:10px 12px}.conversation-thread{padding:12px}.chat-turn{max-width:96%}}


/* V32 — ergonomie réelle : rien ne doit piéger l'élève hors écran. */
html,body,#app{min-height:100%;overflow-x:hidden;scroll-behavior:smooth}
body.modal-open{overflow:auto!important}
.shell{width:min(100%,1440px);padding:clamp(12px,2vw,24px)}
.room-shell{width:min(100%,1550px);padding:clamp(8px,1.4vw,16px)}
.room-top{align-items:flex-start;position:sticky;top:0;z-index:8;background:linear-gradient(150deg,#eef3fb 0%,#f7f6f2 48%,#eef8f3 100%);padding:8px 0;border-radius:0 0 18px 18px}
.teacher-panel,.board-panel{min-width:0}.dialogue{max-height:none;min-height:180px}.speech{overflow-wrap:anywhere}.board-stage{min-height:360px;max-height:none}.response-area{position:sticky;bottom:0;z-index:5}.catalog-head{position:sticky;top:0;z-index:6;background:rgba(247,246,242,.96);padding:8px 0;border-radius:14px}.course-card p{flex:0}.course-card{min-height:auto}
@media(max-width:1180px){.room-grid{grid-template-columns:1fr;min-height:auto}.board-stage{min-height:300px}.room-top{flex-direction:column}.room-actions{width:100%;justify-content:flex-start}.teacher-panel,.board-panel{overflow:visible}.dialogue{max-height:none}}
@media(max-width:760px){.topbar{align-items:flex-start;flex-direction:column}.top-actions{width:100%}.choice-grid,.hero{grid-template-columns:1fr}.room-actions .mode-switch{order:10}.room-title h1{font-size:1.05rem}.response-row{flex-direction:column}.board-footer{align-items:flex-start}.board-footer>div{width:100%;display:flex;gap:8px;flex-wrap:wrap}.btn{width:auto}.modal{max-height:calc(100dvh - 18px);padding:16px}.modal-backdrop{padding:8px}}
/* Dialogue : la zone message et Envoyer restent toujours accessibles. */
.modal-backdrop.conversation-backdrop{display:flex!important;align-items:flex-start!important;justify-content:center!important;overflow:auto!important;padding:8px!important}
.conversation-modal{width:min(1120px,calc(100vw - 16px))!important;height:auto!important;max-height:calc(100dvh - 16px)!important;min-height:min(560px,calc(100dvh - 16px));display:flex!important;flex-direction:column!important;overflow:hidden!important;padding:0!important}
.conversation-head{padding:16px 18px!important;flex:0 0 auto!important}.conversation-layout{flex:1 1 auto!important;min-height:0!important;overflow:hidden!important;display:grid}.conversation-thread{overflow:auto!important;min-height:0!important;padding-bottom:12px!important}.conversation-board{overflow:auto!important;min-height:0!important}.conversation-compose{flex:0 0 auto!important;position:sticky!important;bottom:0!important;background:#fff!important;border-top:1px solid var(--line)!important;z-index:9!important}.conversation-footer{flex:0 0 auto!important;position:sticky!important;bottom:0!important;background:#fff!important;border-top:1px solid var(--line)!important;z-index:9!important}.conversation-actions{display:flex;gap:8px;flex-wrap:wrap}.conversation-compose textarea{min-height:72px!important;max-height:28dvh!important;resize:vertical!important}.chat-bubble{overflow-wrap:anywhere}
@media(max-width:800px){.conversation-modal{min-height:calc(100dvh - 16px)!important}.conversation-layout{display:block!important;overflow:auto!important}.conversation-board{display:none!important}.conversation-thread{max-height:none!important}.conversation-actions .btn,.conversation-footer .btn{flex:1 1 160px}.conversation-head p{display:none}}

/* V33 : correction mobile réelle du dialogue. La zone de messages prend l'espace restant,
   la saisie et Envoyer restent dans le flux, sans chevaucher le fil. */
@media(max-width:800px){
  .conversation-modal{height:calc(100dvh - 16px)!important;max-height:calc(100dvh - 16px)!important;min-height:0!important;display:flex!important;flex-direction:column!important;}
  .conversation-layout{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-height:0!important;overflow:hidden!important;}
  .conversation-thread{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow:auto!important;}
  .conversation-board{display:none!important;}
  .conversation-compose{flex:0 0 auto!important;position:relative!important;bottom:auto!important;background:#fff!important;border-top:1px solid var(--line)!important;}
  .conversation-footer{flex:0 0 auto!important;position:relative!important;bottom:auto!important;background:#fff!important;border-top:1px solid var(--line)!important;display:flex!important;flex-direction:column!important;}
  .conversation-actions .btn,.conversation-footer .btn{flex:0 0 auto!important;width:100%!important;min-height:44px!important;}
  .conversation-compose textarea{min-height:56px!important;max-height:18dvh!important;resize:vertical!important;}
}


/* V34 ergonomie vente : scroll, centrage, onglets et modales réellement utilisables */
body.reader-open{overflow:hidden!important;}
.modal-backdrop.reader-backdrop{
  position:fixed!important; inset:0!important; display:flex!important; align-items:center!important; justify-content:center!important;
  padding:8px!important; overflow:hidden!important; z-index:1000!important;
}
.reader-modal{
  width:min(1180px,calc(100vw - 16px))!important;
  height:min(94dvh,920px)!important;
  max-height:calc(100dvh - 16px)!important;
  display:flex!important; flex-direction:column!important;
  overflow:hidden!important; margin:0!important;
}
.reader-head{flex:0 0 auto!important;}
.reader-layout{
  flex:1 1 auto!important; min-height:0!important; overflow:hidden!important;
  display:grid!important; grid-template-columns:minmax(190px,280px) minmax(0,1fr)!important;
}
.reader-nav,.reader-content{min-height:0!important; overflow:auto!important; overscroll-behavior:contain!important;}
.reader-content{padding-bottom:14px!important;}
.reader-modal>.quick-actions{
  flex:0 0 auto!important; max-height:24dvh!important; overflow:auto!important; border-top:1px solid rgba(148,163,184,.28)!important; padding-top:10px!important;
}
.reteach-modal,.modal{max-height:calc(100dvh - 16px); overflow:auto;}
.room-grid{align-items:start!important;}
@media(max-width:900px){
  .room-top,.catalog-head{position:static!important; top:auto!important;}
  .reader-layout{grid-template-columns:1fr!important; grid-template-rows:auto minmax(0,1fr)!important;}
  .reader-nav{max-height:88px!important; display:flex!important; gap:8px!important; overflow:auto!important;}
  .reader-nav button{flex:0 0 auto!important;}
}
@media(max-width:620px){
  body{overflow-x:hidden!important;}
  .reader-modal{width:calc(100vw - 16px)!important; height:calc(100dvh - 16px)!important;}
  .reader-head{padding:12px!important; gap:8px!important;}
  .reader-head h2{font-size:1.05rem!important; line-height:1.2!important;}
  .reader-head p{display:none!important;}
  .reader-content{font-size:.96rem!important;}
  .reader-modal>.quick-actions{max-height:28dvh!important;}
  .reader-modal>.quick-actions .btn{width:100%!important; justify-content:center!important;}
  .conversation-modal{width:calc(100vw - 16px)!important; height:calc(100dvh - 16px)!important; max-height:calc(100dvh - 16px)!important;}
  .conversation-head{padding:12px!important; gap:8px!important;}
  .conversation-head h2{font-size:1.05rem!important;}
  .conversation-head p{display:none!important;}
  .conversation-layout{min-height:0!important;}
  .conversation-thread{min-height:120px!important;}
  .conversation-compose{padding:10px!important;}
  .conversation-footer{padding:8px 10px!important; gap:8px!important;}
}

/* V35 — interface simplifiée : cours à gauche, tableau + IA à droite.
   Les aides (Indice, Réexpliquer, Simple, Je ne sais pas…) ne s'affichent plus sous le texte du cours.
   La réponse de Lascaro apparaît dans un bloc clair sous le tableau. */
.classroom-grid{grid-template-columns:minmax(360px,.86fr) minmax(560px,1.14fr);align-items:start!important;min-height:auto!important}
.course-column{min-height:calc(100dvh - 125px)}
.course-column .dialogue{max-height:none!important;min-height:360px;flex:1 1 auto}
.board-interaction-panel{min-height:calc(100dvh - 125px);display:flex;flex-direction:column;overflow:hidden}
.board-interaction-panel .board-stage{flex:1 1 auto;min-height:360px;max-height:none;overflow:auto}
.board-response-area{position:sticky!important;bottom:0!important;z-index:6;border-top:1px solid var(--line);background:rgba(255,255,255,.98);box-shadow:0 -10px 24px rgba(20,33,61,.07);display:grid;gap:10px;padding:14px 16px;margin:0}
.interaction-head{display:grid;gap:3px}.interaction-head h3{margin:0;font-size:1.02rem;letter-spacing:-.01em}.interaction-head p{margin:0;color:var(--muted);font-size:.88rem;line-height:1.35}
.ai-response-slot{margin:0!important;border:1px solid rgba(31,111,235,.18);border-left:4px solid var(--accent);border-radius:14px;padding:12px 13px;background:#f6f9fe;color:#294b74;line-height:1.45;max-height:30dvh;overflow:auto}.ai-response-slot p{margin:5px 0 0}.ai-response-slot.empty{border-left-color:#cbd5e1;background:#f8fafc;color:#475569}.ai-response-slot.feedback.ok{border-left-color:var(--accent2);background:#e8f7ef;color:#176b4a}.ai-response-slot.feedback.partial{border-left-color:#d99715;background:#fff8e9;color:#704500}.ai-response-slot.feedback.bad{border-left-color:var(--danger);background:#fdecea;color:#8d2e25}
.help-actions{display:flex;gap:8px;flex-wrap:wrap;margin:0}.help-actions .btn{white-space:nowrap}
.classroom-answer-row{align-items:stretch;gap:8px}.classroom-answer-row textarea{min-height:70px;max-height:20dvh}.classroom-answer-row .btn{align-self:stretch}
.interaction-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}.interaction-actions .btn.accent{min-width:145px}
.inline-choice-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:9px;margin-top:10px}.inline-choice-grid .choice{min-height:92px;padding:12px;border-radius:15px}.inline-choice-grid h2{font-size:.92rem;margin:0 0 4px}.inline-choice-grid p{font-size:.82rem;margin:0;color:var(--muted)}
#exerciseFeedback.ai-response-slot{min-height:60px}
@media(max-width:900px){.classroom-grid{grid-template-columns:1fr}.course-column,.board-interaction-panel{min-height:auto}.course-column .dialogue{min-height:220px}.board-interaction-panel .board-stage{min-height:300px}.board-response-area{position:relative!important;bottom:auto!important}}
@media(max-width:760px){.classroom-grid{gap:10px}.course-column .dialogue{min-height:170px;padding:14px}.board-interaction-panel .board-stage{min-height:240px;padding:10px}.board-response-area{padding:12px;gap:9px}.interaction-head p{display:none}.help-actions .btn,.interaction-actions .btn,.classroom-answer-row .btn{flex:1 1 130px}.classroom-answer-row{flex-direction:column}.ai-response-slot{max-height:34dvh}.room-actions{justify-content:flex-start}.room-top{position:static!important}}


/* V35B — correctif final audit : sur écran bureau/tablette large, le cours et le tableau restent côte à côte
   et chaque colonne scrolle à l'intérieur. Les boutons ne disparaissent plus sous la page. */
.classroom-grid{
  grid-template-columns:minmax(300px,.68fr) minmax(410px,1.32fr)!important;
  height:calc(100dvh - 118px)!important;
  min-height:620px!important;
  overflow:hidden!important;
  align-items:stretch!important;
}
.course-column,.board-interaction-panel{
  height:100%!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
.course-column .dialogue,.course-column .course-text{
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:auto!important;
}
.board-interaction-panel .board-stage{
  flex:1 1 auto!important;
  min-height:220px!important;
  max-height:none!important;
  overflow:auto!important;
}
.board-response-area{
  flex:0 0 auto!important;
  position:relative!important;
  bottom:auto!important;
  z-index:2!important;
  max-height:47%!important;
  overflow:auto!important;
  box-shadow:none!important;
}
.ai-response-slot.empty{padding:10px 12px!important;text-align:left!important}
@media(max-width:900px){
  .classroom-grid{grid-template-columns:1fr!important;height:auto!important;min-height:0!important;overflow:visible!important;align-items:start!important}
  .course-column,.board-interaction-panel{height:auto!important;min-height:0!important;overflow:visible!important}
  .course-column .dialogue,.course-column .course-text{max-height:none!important;overflow:visible!important}
  .board-interaction-panel .board-stage{min-height:230px!important;max-height:42dvh!important;overflow:auto!important}
  .board-response-area{max-height:none!important;overflow:visible!important;position:relative!important}
}
@media(max-width:680px){
  .classroom-grid{gap:10px!important}
  .board-interaction-panel .board-stage{min-height:210px!important;max-height:38dvh!important;padding:10px!important}
  .board-content{padding:14px!important}
  .classroom-answer-row{flex-direction:column!important}
  .help-actions .btn,.interaction-actions .btn,.classroom-answer-row .btn{width:100%!important;min-height:42px!important}
}

/* V35 complément : Je ne sais pas et reprise profonde directement sous le tableau. */
.inline-reteach-box{max-height:34dvh;overflow:auto;}
.inline-reteach h3{margin:0 0 8px;color:var(--ink);font-size:1rem;}
.inline-reteach-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,.55fr);gap:12px;align-items:start;}
.inline-reteach .reteach-step{padding:9px 10px;margin:0 0 8px;border-radius:12px;background:rgba(255,255,255,.76);border:1px solid rgba(148,163,184,.28);}
.inline-reteach .reteach-step p{margin:5px 0 0;}
.inline-reteach .reteach-board{background:rgba(255,255,255,.82);border:1px solid rgba(148,163,184,.3);border-radius:14px;padding:10px;}
.inline-reteach .reteach-board h3{font-size:.92rem;margin:0 0 8px;}
.inline-reteach .inlineReteachFeedback .feedback{margin-top:8px;}
@media(max-width:760px){.inline-reteach-box{max-height:none}.inline-reteach-grid{grid-template-columns:1fr!important}}

/* V37 — prévente : la zone IA sous le tableau ne doit plus pousser les boutons hors écran. */
.board-response-area{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
}
.board-response-area .ai-response-slot,
.board-response-area #feedback,
.board-response-area #exerciseFeedback{
  flex:0 1 auto!important;
}
.board-response-area .help-actions,
.board-response-area .classroom-answer-row,
.board-response-area .interaction-actions{
  flex:0 0 auto!important;
}
.board-response-area .interaction-actions{
  position:sticky!important;
  bottom:0!important;
  z-index:5!important;
  padding-top:6px!important;
  background:rgba(255,255,255,.98)!important;
}
@media(min-width:901px){
  .board-response-area{max-height:42%!important;overflow:auto!important;}
  .ai-response-slot{max-height:18dvh!important;}
  .inline-reteach-box{max-height:20dvh!important;}
}
@media(max-width:900px){
  .board-response-area{max-height:calc(100dvh - 145px)!important;overflow:auto!important;}
  .ai-response-slot{max-height:26dvh!important;}
  .inline-reteach-box{max-height:32dvh!important;overflow:auto!important;}
}
@media(max-width:680px){
  .board-response-area{max-height:calc(100dvh - 115px)!important;}
  .ai-response-slot{max-height:24dvh!important;}
  .inline-reteach-box{max-height:30dvh!important;}
}


/* V38 — finalisation urgente prévente : premier écran exploitable, surtout laptop/mobile.
   Objectif : l'élève voit immédiatement le tableau, l'aide IA et les boutons de réponse sans chercher tout en bas. */
@media (min-width:901px){
  .classroom-grid{
    height:calc(100dvh - 210px)!important;
    min-height:500px!important;
    max-height:calc(100dvh - 185px)!important;
    overflow:hidden!important;
  }
  .course-column,.board-interaction-panel{min-height:0!important;height:100%!important;overflow:hidden!important;}
  .board-interaction-panel .board-stage{min-height:160px!important;}
  .board-response-area{max-height:50%!important;overflow:auto!important;}
  .ai-response-slot{max-height:14dvh!important;}
  .classroom-answer-row textarea{min-height:56px!important;max-height:13dvh!important;}
  .help-actions .btn{padding:8px 10px!important;min-height:34px!important;}
  .interaction-head p{display:none!important;}
}
@media (max-width:900px){
  .course-column .dialogue,.course-column .course-text{
    max-height:30dvh!important;
    overflow:auto!important;
  }
  .board-interaction-panel .board-stage{
    min-height:170px!important;
    max-height:26dvh!important;
    overflow:auto!important;
  }
  .board-response-area{
    max-height:calc(100dvh - 270px)!important;
    min-height:270px!important;
    overflow:auto!important;
  }
  .ai-response-slot{max-height:18dvh!important;}
  .classroom-answer-row textarea{min-height:58px!important;max-height:16dvh!important;}
  .help-actions{gap:6px!important;}
  .help-actions .btn{min-height:38px!important;padding:8px 10px!important;}
  .interaction-actions{position:sticky!important;bottom:0!important;background:rgba(255,255,255,.98)!important;}
}
@media (max-width:680px){
  .course-column .dialogue,.course-column .course-text{max-height:24dvh!important;}
  .board-interaction-panel .board-stage{min-height:145px!important;max-height:21dvh!important;}
  .board-response-area{max-height:calc(100dvh - 210px)!important;min-height:300px!important;}
  .ai-response-slot{max-height:15dvh!important;}
  .interaction-head h3{font-size:.96rem!important;}
}

/* V38B — mobile premier écran : le cours se lit dans une zone courte et le tableau/IA arrive immédiatement. */
@media (max-width:680px){
  .course-column{max-height:260px!important;overflow:hidden!important;}
  .course-column .dialogue,.course-column .course-text{max-height:150px!important;min-height:0!important;overflow:auto!important;}
  .board-interaction-panel .board-stage{min-height:105px!important;max-height:16dvh!important;}
  .board-response-area{min-height:250px!important;max-height:calc(100dvh - 155px)!important;}
  .board-response-area .ai-response-slot{max-height:12dvh!important;}
}
@media (min-width:681px) and (max-width:900px){
  .course-column{max-height:310px!important;overflow:hidden!important;}
  .course-column .dialogue,.course-column .course-text{max-height:180px!important;min-height:0!important;overflow:auto!important;}
  .board-interaction-panel .board-stage{min-height:130px!important;max-height:18dvh!important;}
  .board-response-area{min-height:270px!important;}
}

/* V38C — mobile : les actions essentielles remontent en haut du bloc IA, les aides tiennent sur une seule ligne scrollable. */
@media (max-width:680px){
  .board-response-area .interaction-head{order:0!important;}
  .board-response-area .interaction-actions{order:1!important;position:sticky!important;top:0!important;bottom:auto!important;z-index:8!important;padding:4px 0!important;background:rgba(255,255,255,.99)!important;}
  .board-response-area .ai-response-slot,.board-response-area #feedback,.board-response-area #exerciseFeedback{order:2!important;}
  .board-response-area .classroom-answer-row{order:3!important;}
  .board-response-area .help-actions{order:4!important;flex-wrap:nowrap!important;overflow-x:auto!important;max-height:48px!important;padding-bottom:3px!important;}
  .board-response-area .help-actions .btn{width:auto!important;flex:0 0 auto!important;min-width:108px!important;}
  .board-response-area{min-height:230px!important;max-height:430px!important;}
}

/* V38D — mobile : moins de titre dans le bloc IA, les contrôles passent dans le premier écran. */
@media (max-width:680px){
  .board-response-area .interaction-head{display:none!important;}
  .board-response-area .interaction-actions{order:1!important;}
  .board-response-area .classroom-answer-row{order:2!important;}
  .board-response-area .help-actions{order:3!important;}
  .board-response-area .ai-response-slot,.board-response-area #feedback,.board-response-area #exerciseFeedback{order:4!important;}
  .board-response-area{gap:6px!important;}
}


/* V42 — Je ne sais pas lisible + connexion IA accessible */
.ai-status.configured{background:#fff8e9;color:#704500;border-color:#f0d59d}.ai-status.configured .ai-dot{background:#d99715}
.deep-help-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.deep-help-bar h3{margin:0!important}.deep-help-bar .btn{flex:0 0 auto}
.board-response-area.deep-help-mode{max-height:72%!important;overflow:auto!important;padding:14px 16px!important;gap:10px!important}.board-response-area.deep-help-mode>.interaction-head,.board-response-area.deep-help-mode>.help-actions,.board-response-area.deep-help-mode>.classroom-answer-row,.board-response-area.deep-help-mode>.interaction-actions{display:none!important}.board-response-area.deep-help-mode .ai-response-slot,.board-response-area.deep-help-mode #feedback,.board-response-area.deep-help-mode .unknown-inline,.board-response-area.deep-help-mode .inline-reteach-box{max-height:none!important;overflow:visible!important;min-height:0!important;background:#f6f9fe!important;color:#294b74!important}.board-response-area.deep-help-mode .inline-choice-grid{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important}.board-response-area.deep-help-mode .inline-reteach-grid{grid-template-columns:minmax(0,1fr) minmax(220px,.55fr)!important;gap:12px!important}.board-interaction-panel.deep-help-open .board-stage{min-height:130px!important}.modal-backdrop.unknown-backdrop,.modal-backdrop.reteach-backdrop,.modal-backdrop.ai-config-backdrop{display:flex!important;align-items:center!important;justify-content:center!important;overflow:auto!important;padding:10px!important;z-index:1200!important}.unknown-modal,.reteach-modal,.ai-config-modal{width:min(1080px,calc(100vw - 20px))!important;max-height:calc(100dvh - 20px)!important;overflow:auto!important;margin:auto!important;padding:20px!important}.ai-config-open{overflow:hidden!important}.ai-config-modal .search{width:100%!important}.config-help{font-size:.9rem;line-height:1.45;color:var(--muted);background:#f8fafc;border:1px solid var(--line);border-radius:12px;padding:10px 12px}
@media(max-width:900px){.board-response-area.deep-help-mode{max-height:none!important;overflow:visible!important;min-height:0!important}.board-response-area.deep-help-mode .inline-reteach-grid{grid-template-columns:1fr!important}.board-interaction-panel.deep-help-open .board-stage{max-height:22dvh!important;min-height:110px!important}.deep-help-bar{align-items:flex-start;flex-direction:column}.deep-help-bar .btn{width:100%!important}}
@media(max-width:680px){.board-response-area.deep-help-mode{max-height:none!important;min-height:0!important;padding:12px!important}.board-response-area.deep-help-mode .inline-choice-grid{grid-template-columns:1fr!important}.unknown-modal,.reteach-modal,.ai-config-modal{width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;padding:14px!important;border-radius:18px!important}.ai-config-modal .quick-actions .btn{width:100%!important}}


/* V43 — IA centralisée adulte : aucun bouton de connexion dans l'espace élève. */
.ai-status,[data-config-ai],#aiConnectRoom,#aiConnectExercise,.connection-notice{display:none!important;}
.ai-live.off{background:#e8f5ee!important;color:#166534!important;border-color:#bbf7d0!important}.ai-live.off span{background:#22c55e!important}

/* V43 — dialogue et "Je ne sais pas" lisibles : grande fenêtre centrée, aucun mini-popup coincé. */
.modal-backdrop.conversation-backdrop{position:fixed!important;inset:0!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:12px!important;overflow:hidden!important;z-index:1200!important;}
.conversation-modal{width:min(1180px,calc(100vw - 24px))!important;height:calc(100dvh - 24px)!important;min-height:0!important;max-height:calc(100dvh - 24px)!important;margin:auto!important;border-radius:24px!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;}
.conversation-head{flex:0 0 auto!important;padding:16px 18px!important;}
.conversation-layout{flex:1 1 auto!important;min-height:0!important;max-height:none!important;display:grid!important;grid-template-columns:minmax(0,1.42fr) minmax(260px,.58fr)!important;overflow:hidden!important;}
.conversation-thread{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow:auto!important;padding:18px!important;}
.conversation-board{min-height:0!important;overflow:auto!important;}
.conversation-compose,.conversation-footer{flex:0 0 auto!important;position:relative!important;bottom:auto!important;z-index:4!important;}
.conversation-compose textarea{min-height:78px!important;max-height:18dvh!important;}
.chat-turn{max-width:92%!important}.chat-bubble{font-size:1rem!important;line-height:1.55!important;}
.board-response-area.deep-help-mode{max-height:min(72dvh,660px)!important;min-height:260px!important;overflow:auto!important;padding:16px!important;}
.board-interaction-panel.deep-help-open .board-response-area.deep-help-mode{flex:1 1 auto!important;}
.board-response-area.deep-help-mode .unknown-inline,.board-response-area.deep-help-mode .inline-reteach-box,.board-response-area.deep-help-mode #feedback{max-height:none!important;overflow:visible!important;}
.board-response-area.deep-help-mode .inline-choice-grid{grid-template-columns:repeat(auto-fit,minmax(230px,1fr))!important;}
@media(max-width:800px){
  .conversation-modal{width:calc(100vw - 12px)!important;height:calc(100dvh - 12px)!important;max-height:calc(100dvh - 12px)!important;border-radius:18px!important;}
  .conversation-layout{display:flex!important;flex-direction:column!important;}
  .conversation-board{display:none!important;}
  .conversation-thread{padding:12px!important;}
  .conversation-actions .btn,.conversation-footer .btn{width:100%!important;}
  .conversation-head p{display:none!important;}
  .board-response-area.deep-help-mode{max-height:none!important;min-height:0!important;}
  .board-response-area.deep-help-mode .inline-choice-grid{grid-template-columns:1fr!important;}
}


/* V45 — prévente propre : accueil plus simple et réponses courtes pour les petits. */
.v45-hero{grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr)!important;align-items:stretch!important;}
.v45-hero h1{font-size:clamp(2rem,4vw,4.2rem)!important;}
.v45-main-actions{margin-top:18px!important;}
.v45-trust{min-height:0!important;}
.v45-choice-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
.v45-home .choice{min-height:145px!important;}
.v45-home .course-card{min-height:210px!important;}
@media(max-width:900px){.v45-hero{grid-template-columns:1fr!important;padding:24px!important}.v45-choice-grid{grid-template-columns:1fr!important}.top-actions .pill{display:none!important}.top-actions{gap:6px}.top-actions .btn{font-size:.84rem;padding:8px 10px}}
@media(max-width:680px){.v45-hero h1{font-size:2rem!important}.hero p{font-size:1rem!important;line-height:1.45!important}.v45-home .course-grid{grid-template-columns:1fr!important}.v45-home .choice{min-height:118px!important;padding:18px!important}.v45-trust{padding:18px!important}.topbar{align-items:flex-start!important}.brand span{font-size:1rem}.top-actions .btn:nth-of-type(n+4){display:none!important}}

/* V45 — ne pas faire des pavés en primaire. */
.teacher-panel .speech{overflow-wrap:anywhere;}
.inline-reteach .reteach-step p,.teacher-check,.ai-response-slot{font-size:.96rem;}
@media(max-width:680px){.teacher-panel .speech{font-size:.98rem!important;line-height:1.55!important}.inline-reteach .reteach-step{padding:8px!important}.inline-choice-grid .choice{min-height:76px!important}.inline-choice-grid .choice p{display:none!important}.board-response-area.deep-help-mode .inline-choice-grid{gap:7px!important}}

/* V47 — illustrations simples adaptées au niveau */
.visual-lesson-board{display:grid;gap:16px;min-height:100%;padding:4px;background:linear-gradient(145deg,var(--v47-a),#fff 55%,var(--v47-b));border-radius:18px}
.visual-hero{display:grid;grid-template-columns:104px 1fr;gap:16px;align-items:center;padding:18px;border:1px solid rgba(20,33,61,.08);border-radius:22px;background:rgba(255,255,255,.88);box-shadow:0 12px 28px rgba(20,33,61,.06)}
.visual-main-icon{width:96px;height:96px;border-radius:28px;display:grid;place-items:center;font-size:3.7rem;background:linear-gradient(135deg,var(--v47-b),var(--v47-c));box-shadow:inset 0 0 0 1px rgba(20,33,61,.06)}
.visual-hero-text h3{margin:6px 0 4px;font-size:clamp(1.35rem,2vw,2rem);line-height:1.1;letter-spacing:-.03em}.visual-hero-text p{margin:0;color:var(--muted);font-weight:700}
.visual-tag{display:inline-flex;border-radius:999px;background:#fff;padding:6px 10px;border:1px solid var(--line);font-size:.75rem;font-weight:900;color:#34506f;text-transform:uppercase;letter-spacing:.08em}
.visual-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.visual-card{position:relative;min-height:170px;border-radius:22px;border:1px solid rgba(20,33,61,.09);background:rgba(255,255,255,.92);padding:16px;display:grid;grid-template-rows:auto auto auto 1fr;box-shadow:0 10px 22px rgba(20,33,61,.055)}
.visual-card-number{position:absolute;right:12px;top:12px;width:28px;height:28px;border-radius:10px;background:var(--ink);color:#fff;display:grid;place-items:center;font-size:.8rem;font-weight:900}.visual-card-icon{font-size:2.6rem;line-height:1;margin-bottom:8px}.visual-card strong{font-size:1.05rem}.visual-card p{margin:6px 0 0;color:#314155;line-height:1.38;font-weight:650}.visual-action{display:grid;grid-template-columns:190px 1fr;gap:12px;align-items:center;padding:14px 16px;border-radius:18px;background:#14213d;color:#fff}.visual-action strong{font-size:.95rem}.visual-action p{margin:0;line-height:1.45;color:#eef3fb;font-weight:700}.visual-caption{margin:0;color:#4a5b70;line-height:1.45;border-radius:15px;padding:12px 14px;background:rgba(255,255,255,.8);border:1px solid rgba(20,33,61,.07)}
.visual-lesson-board.level-cp_ce1{gap:18px}.visual-lesson-board.level-cp_ce1 .visual-hero{grid-template-columns:124px 1fr;padding:20px}.visual-lesson-board.level-cp_ce1 .visual-main-icon{width:116px;height:116px;font-size:4.7rem}.visual-lesson-board.level-cp_ce1 .visual-hero-text h3{font-size:clamp(1.6rem,2.5vw,2.25rem)}.visual-lesson-board.level-cp_ce1 .visual-card{min-height:190px;text-align:center;place-items:center;padding:18px}.visual-lesson-board.level-cp_ce1 .visual-card-icon{font-size:3.2rem}.visual-lesson-board.level-cp_ce1 .visual-card strong{font-size:1.18rem}.visual-lesson-board.level-cp_ce1 .visual-card p{font-size:1.05rem}.visual-lesson-board.level-cp_ce1 .visual-caption{display:none}
.visual-lesson-board.level-lycee_pro .visual-cards,.visual-lesson-board.level-college .visual-cards{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
@media(max-width:900px){.visual-hero{grid-template-columns:82px 1fr}.visual-main-icon{width:78px;height:78px;font-size:3rem}.visual-cards{grid-template-columns:1fr}.visual-card{min-height:126px;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:12px;align-items:center}.visual-card-icon{grid-row:1/3;margin:0}.visual-card p{margin-top:3px}.visual-action{grid-template-columns:1fr}.visual-caption{font-size:.92rem}.board-stage{min-height:410px}}
@media(max-width:520px){.visual-hero{grid-template-columns:1fr;text-align:center}.visual-main-icon{margin:auto}.visual-card{display:block;text-align:center}.visual-card-icon{display:block;margin-bottom:7px}.visual-action{text-align:center}.visual-lesson-board{padding:0}.board-content{padding:14px}.visual-hero,.visual-card{border-radius:18px}}

/* V47.1 — pictogrammes SVG locaux : plus d'emojis comme image principale. */
.visual-svg-board .visual-main-icon{font-size:0;color:#14213d;overflow:hidden}
.visual-svg-board .visual-card-icon{font-size:0;line-height:1;display:block;margin-bottom:8px;color:#14213d}
.visual-picto{display:block;width:66px;height:66px;margin:auto;color:#14213d}
.visual-picto *{fill:none;stroke:currentColor;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.visual-picto-main{width:78px;height:78px}
.visual-picto-card{width:54px;height:54px;margin:0 0 8px 0}
.visual-lesson-board.level-cp_ce1 .visual-picto-main{width:92px;height:92px}
.visual-lesson-board.level-cp_ce1 .visual-picto-card{width:68px;height:68px;margin:0 auto 10px}
.visual-lesson-board.level-cp_ce1 .visual-card-icon{width:100%}
.visual-svg-board .picto-risk,.visual-svg-board .picto-check,.visual-svg-board .picto-health{color:#0f3d2e}
.visual-svg-board .picto-chair,.visual-svg-board .picto-rotate,.visual-svg-board .picto-palette{color:#273b7a}
.visual-svg-board .picto-book,.visual-svg-board .picto-write,.visual-svg-board .picto-speech{color:#6b3b16}
.visual-svg-board .picto-math,.visual-svg-board .picto-method,.visual-svg-board .picto-gear{color:#173b63}
@media(max-width:900px){.visual-picto-main{width:62px;height:62px}.visual-picto-card{width:50px;height:50px;margin:0}.visual-svg-board .visual-card-icon{grid-row:1/3;margin:0}.visual-lesson-board.level-cp_ce1 .visual-picto-card{width:54px;height:54px}}
@media(max-width:520px){.visual-picto-card{margin:0 auto 8px}.visual-svg-board .visual-card-icon{display:block;margin-bottom:7px}}

/* V47.2 — illustrations de cours premium locales */
.course-illustration-board{display:grid;gap:14px;min-height:100%;padding:8px;background:linear-gradient(145deg,var(--v47-a),#fff 54%,var(--v47-b));border-radius:22px}
.course-ill-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 12px;border:1px solid rgba(20,33,61,.08);border-radius:18px;background:rgba(255,255,255,.84);box-shadow:0 10px 24px rgba(20,33,61,.05)}
.course-ill-head span{font-size:.76rem;font-weight:950;text-transform:uppercase;letter-spacing:.08em;color:#34506f;background:#eef3fb;border-radius:999px;padding:6px 10px}.course-ill-head strong{font-size:.95rem;color:#14213d}.course-ill-head em{font-style:normal;color:#64748b;font-weight:800}
.course-scene-wrap{border-radius:24px;overflow:hidden;background:#fff;border:1px solid rgba(20,33,61,.08);box-shadow:0 18px 34px rgba(20,33,61,.09)}
.course-scene-svg{display:block;width:100%;height:auto;min-height:335px}.course-scene-svg text{paint-order:stroke;stroke:#fff;stroke-width:2px;stroke-linejoin:round}.course-scene-svg rect,.course-scene-svg circle,.course-scene-svg path,.course-scene-svg line,.course-scene-svg polygon{vector-effect:non-scaling-stroke}
.course-ill-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.course-ill-card{position:relative;display:grid;grid-template-columns:54px 1fr;grid-template-rows:auto auto;align-items:center;column-gap:11px;min-height:118px;padding:15px 14px;border-radius:20px;background:rgba(255,255,255,.94);border:1px solid rgba(20,33,61,.08);box-shadow:0 10px 22px rgba(20,33,61,.055)}
.course-card-num{position:absolute;right:11px;top:10px;width:26px;height:26px;border-radius:10px;background:#14213d;color:#fff;display:grid;place-items:center;font-size:.76rem;font-weight:950}.course-card-picto{grid-row:1/3;display:grid;place-items:center;color:#14213d}.course-ill-card strong{padding-right:28px;font-size:1.02rem;color:#14213d}.course-ill-card p{margin:4px 0 0;color:#314155;font-weight:680;line-height:1.34}.course-ill-action{display:grid;grid-template-columns:190px 1fr;gap:12px;align-items:center;padding:14px 16px;border-radius:18px;background:#14213d;color:#fff}.course-ill-action strong{font-size:.94rem}.course-ill-action p{margin:0;color:#eef3fb;font-weight:750;line-height:1.42}
.course-illustration-board.level-cp_ce1{gap:16px;padding:6px}.course-illustration-board.level-cp_ce1 .course-ill-head{justify-content:center}.course-illustration-board.level-cp_ce1 .course-scene-svg{min-height:370px}.course-illustration-board.level-cp_ce1 .course-ill-cards{grid-template-columns:repeat(3,minmax(0,1fr))}.course-illustration-board.level-cp_ce1 .course-ill-card{grid-template-columns:1fr;text-align:center;min-height:150px;place-items:center}.course-illustration-board.level-cp_ce1 .course-card-picto{grid-row:auto}.course-illustration-board.level-cp_ce1 .course-card-picto .visual-picto-card{width:62px;height:62px;margin:auto}.course-illustration-board.level-cp_ce1 .course-ill-card strong{font-size:1.16rem;padding:0}.course-illustration-board.level-cp_ce1 .course-ill-card p{font-size:1.03rem}.course-illustration-board.level-college .course-ill-cards,.course-illustration-board.level-lycee_pro .course-ill-cards{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
@media(max-width:900px){.course-ill-cards{grid-template-columns:1fr}.course-ill-card{min-height:106px}.course-ill-action{grid-template-columns:1fr}.course-scene-svg{min-height:270px}.course-illustration-board.level-cp_ce1 .course-ill-cards{grid-template-columns:1fr}.course-illustration-board.level-cp_ce1 .course-ill-card{min-height:116px}.course-ill-head{align-items:flex-start}.course-ill-head span{width:100%;text-align:center}}
@media(max-width:520px){.course-illustration-board{padding:0}.course-scene-wrap{border-radius:18px}.course-ill-card{display:block;text-align:center}.course-card-picto{display:block;margin-bottom:6px}.course-ill-action{text-align:center}.course-ill-head{border-radius:16px}.course-scene-svg{min-height:230px}}

/* V47.2 final — tableau illustré de cours, sans pictogrammes décoratifs */
.premium-course-board{padding:8px!important;gap:14px!important;background:linear-gradient(145deg,var(--v47-a),#fff 54%,var(--v47-b))!important;border-radius:22px!important;}
.course-visual-head{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:14px 16px;border-radius:20px;background:rgba(255,255,255,.92);border:1px solid rgba(20,33,61,.08);box-shadow:0 10px 24px rgba(20,33,61,.055)}
.course-visual-head h3{margin:7px 0 3px;font-size:clamp(1.25rem,2vw,1.85rem);line-height:1.12;letter-spacing:-.025em;color:#14213d}.course-visual-head p{margin:0;color:#5b6b7e;font-weight:800}.course-scene-type{flex:0 0 auto;max-width:190px;border-radius:999px;background:#eef3fb;color:#34506f;border:1px solid rgba(20,33,61,.08);padding:8px 12px;font-size:.76rem;font-weight:950;text-transform:uppercase;letter-spacing:.07em;text-align:center}
.course-scene-wrap{border-radius:24px;overflow:hidden;background:#fff;border:1px solid rgba(20,33,61,.08);box-shadow:0 18px 34px rgba(20,33,61,.09)}
.course-scene-svg{display:block;width:100%;height:auto;min-height:330px}.course-scene-svg text{paint-order:stroke;stroke:#fff;stroke-width:2px;stroke-linejoin:round}.course-scene-svg rect,.course-scene-svg circle,.course-scene-svg path,.course-scene-svg line,.course-scene-svg polygon{vector-effect:non-scaling-stroke}
.course-callout text{stroke-width:1.5px}.course-legend-cards{grid-template-columns:repeat(3,minmax(0,1fr))}.premium-course-board .visual-card{min-height:128px;grid-template-columns:56px 1fr;grid-template-rows:auto auto;column-gap:12px;align-items:center;padding:15px 14px}.premium-course-board .visual-card-icon{grid-row:1/3;margin:0}.premium-course-board .visual-card strong{padding-right:30px;color:#14213d}.premium-course-board .visual-card p{font-weight:700}.premium-course-board .visual-picto-card{width:48px;height:48px;margin:0}.premium-course-board .visual-action{border-radius:18px;box-shadow:0 12px 24px rgba(20,33,61,.12)}
.premium-course-board.level-cp_ce1 .course-scene-svg{min-height:370px}.premium-course-board.level-cp_ce1 .course-visual-head{text-align:center;justify-content:center}.premium-course-board.level-cp_ce1 .course-scene-type{display:none}.premium-course-board.level-cp_ce1 .visual-card{display:grid;grid-template-columns:1fr;text-align:center;place-items:center;min-height:148px}.premium-course-board.level-cp_ce1 .visual-card-icon{grid-row:auto}.premium-course-board.level-cp_ce1 .visual-picto-card{width:62px;height:62px;margin:auto}.premium-course-board.level-cp_ce1 .visual-card strong{padding:0;font-size:1.16rem}.premium-course-board.level-cp_ce1 .visual-card p{font-size:1.03rem}.premium-course-board.level-lycee_pro .course-legend-cards,.premium-course-board.level-college .course-legend-cards{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
@media(max-width:900px){.course-visual-head{align-items:flex-start;flex-direction:column}.course-scene-type{max-width:none}.course-scene-svg{min-height:270px}.course-legend-cards{grid-template-columns:1fr}.premium-course-board .visual-card{min-height:106px}.premium-course-board .visual-action{grid-template-columns:1fr}.premium-course-board.level-cp_ce1 .course-legend-cards{grid-template-columns:1fr}.premium-course-board.level-cp_ce1 .visual-card{min-height:116px}}
@media(max-width:520px){.premium-course-board{padding:0!important}.course-scene-wrap{border-radius:18px}.course-scene-svg{min-height:230px}.premium-course-board .visual-card{display:block;text-align:center}.premium-course-board .visual-card-icon{display:block;margin-bottom:6px}.premium-course-board .visual-picto-card{margin:0 auto}.premium-course-board .visual-action{text-align:center}.course-visual-head{border-radius:16px}}

/* V47.2 — planches pédagogiques propres : scènes de cours SVG locales, pas de simple emoji. */
.pedago-plate{gap:14px!important;padding:10px!important;background:linear-gradient(145deg,var(--v47-a),#fff 52%,var(--v47-b))!important;border:1px solid rgba(20,33,61,.08);box-shadow:0 18px 42px rgba(20,33,61,.08)}
.plate-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:14px 16px;border-radius:20px;background:rgba(255,255,255,.92);border:1px solid rgba(20,33,61,.08)}
.plate-head h3{margin:6px 0 3px;font-size:clamp(1.22rem,1.8vw,1.8rem);line-height:1.1;letter-spacing:-.025em}.plate-head p{margin:0;color:#536273;font-weight:750}.plate-system{flex:0 0 auto;border-radius:999px;padding:8px 12px;background:#14213d;color:#fff;font-size:.78rem;font-weight:900;white-space:nowrap}
.plate-scene{border-radius:24px;background:#fff;border:1px solid rgba(20,33,61,.1);overflow:hidden;box-shadow:0 14px 34px rgba(20,33,61,.08)}
.course-scene-svg{display:block;width:100%;height:auto;min-height:340px;background:#f8fafc}.scene-paper{fill:#fff;stroke:#d9e2ec;stroke-width:2}.scene-kicker{font-size:15px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;fill:#52606d}.scene-title{font-size:29px;font-weight:950;fill:#14213d;letter-spacing:-.02em}.scene-goal{font-size:17px;font-weight:740;fill:#607086}.thin,.source-line,.text-line{fill:none;stroke:#52606d;stroke-width:5;stroke-linecap:round}.arrow{fill:none;stroke:#243b53;stroke-width:5;stroke-linecap:round;stroke-linejoin:round}.arrow.safe{stroke:#0b8457}.arrow.danger{stroke:#b42318}.dot,.warn-dot,.map-dot{fill:#14213d}.scene-callout rect{fill:#fff;stroke:#d9e2ec;stroke-width:2}.scene-callout .callout-title{font-size:18px;font-weight:950;fill:#14213d}.scene-callout .callout-detail{font-size:14px;font-weight:750;fill:#52606d}.callout-risk rect{fill:#fff2f0;stroke:#f2b8b5}.callout-glove rect,.callout-check rect{fill:#ecfdf5;stroke:#a7f3d0}.callout-eye rect,.callout-book rect,.callout-math rect,.callout-method rect{fill:#eff6ff;stroke:#bfdbfe}
.plate-legend{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.plate-step{position:relative;display:grid;grid-template-columns:42px 1fr;grid-template-rows:auto auto;column-gap:10px;min-height:104px;padding:14px 14px 14px 58px;border-radius:20px;background:rgba(255,255,255,.94);border:1px solid rgba(20,33,61,.08);box-shadow:0 10px 24px rgba(20,33,61,.055)}.plate-step-num{position:absolute;left:14px;top:14px;width:30px;height:30px;border-radius:10px;background:#14213d;color:#fff;display:grid;place-items:center;font-size:.82rem;font-weight:950}.plate-step-icon{grid-row:1/3;display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:var(--v47-a)}.plate-step .visual-picto-card{width:28px;height:28px;margin:0}.plate-step strong{font-size:1rem;color:#14213d}.plate-step p{margin:5px 0 0;color:#40556b;line-height:1.35;font-weight:700}.plate-action{display:grid;grid-template-columns:188px 1fr;gap:12px;align-items:center;padding:14px 16px;border-radius:18px;background:#14213d;color:#fff}.plate-action strong{font-size:.95rem}.plate-action p{margin:0;line-height:1.45;color:#edf6ff;font-weight:780}.plate-caption{margin-top:0!important}
/* scènes : sens */
.skin{fill:#fde9bf;stroke:#946332;stroke-width:4}.body{fill:#dbeafe;stroke:#1e3a8a;stroke-width:5;stroke-linejoin:round}.organ{fill:#fff;stroke:#14213d;stroke-width:5;stroke-linecap:round;stroke-linejoin:round}.organ-eye circle,.organ-hand{fill:#fff}.organ-nose,.organ-mouth{fill:none}.floor{fill:#e6edf5}.chair-back{fill:#dbeafe;stroke:#1e3a8a;stroke-width:5}.chair-seat{fill:#bfdbfe;stroke:#1e3a8a;stroke-width:5}.chair-line{fill:none;stroke:#1e3a8a;stroke-width:8;stroke-linecap:round;stroke-linejoin:round}.wheel,.pivot{fill:#fff;stroke:#1e3a8a;stroke-width:5}.rotation-arrow{fill:none;stroke:#1f6feb;stroke-width:6;stroke-linecap:round}.person{fill:#fde9bf;stroke:#704214;stroke-width:5}.person.two{fill:#dbeafe}.person-line{fill:none;stroke:#704214;stroke-width:7;stroke-linecap:round;stroke-linejoin:round}
/* sécurité */
.bench{fill:#d9b38c;stroke:#7c4a21;stroke-width:5}.bench-leg{fill:#a97142}.tool{fill:#cbd5e1;stroke:#334155;stroke-width:5}.blade{fill:#e2e8f0;stroke:#334155;stroke-width:5}.glove{fill:#d1fae5;stroke:#0b6b4b;stroke-width:5}.glove-line{fill:none;stroke:#0b6b4b;stroke-width:4;stroke-linecap:round}.warn{fill:#fff1bf;stroke:#b42318;stroke-width:6}.warn-line{stroke:#b42318;stroke-width:7;stroke-linecap:round}
/* math */
.grid-bg path{fill:none;stroke:#e2e8f0;stroke-width:2}.math-card,.fraction-box{fill:#eff6ff;stroke:#1d4ed8;stroke-width:4}.math-big{font-size:48px;font-weight:950;fill:#14213d}.math-small{font-size:18px;font-weight:800;fill:#40556b}.axis{stroke:#14213d;stroke-width:5;stroke-linecap:round}.axis-head{fill:#14213d}.tick{stroke:#14213d;stroke-width:4}.tick-label{font-size:16px;font-weight:800;fill:#14213d}.fraction-on{fill:#93c5fd;stroke:#1d4ed8;stroke-width:3}.fraction-off{fill:#fff;stroke:#1d4ed8;stroke-width:3}
/* français / langues */
.paper-page{fill:#fff;stroke:#d9e2ec;stroke-width:3}.highlight-one{fill:#fde68a;opacity:.74}.highlight-two{fill:#bfdbfe;opacity:.74}.note-card{fill:#eff6ff;stroke:#bfdbfe;stroke-width:3}.answer-card{fill:#ecfdf5;stroke:#a7f3d0;stroke-width:3}.note-title{font-size:22px;font-weight:950;fill:#14213d}.note-text{font-size:16px;font-weight:800;fill:#40556b}.bubble{fill:#fff7ed;stroke:#fb923c;stroke-width:4}.bubble.answer{fill:#eff6ff;stroke:#60a5fa}.bubble-text{font-size:22px;font-weight:900;fill:#14213d}
/* histoire-géo */
.source-card,.case-panel,.tool-panel,.decision-panel{fill:#fff;stroke:#d9e2ec;stroke-width:4}.source-title{font-size:26px;font-weight:950;fill:#14213d}.source-date{fill:#ede9fe;stroke:#8b5cf6;stroke-width:3}.timeline-line{stroke:#14213d;stroke-width:7;stroke-linecap:round}.event-one{fill:#bfdbfe;stroke:#1d4ed8;stroke-width:4}.event-two{fill:#fde68a;stroke:#b45309;stroke-width:4}.event-three{fill:#d1fae5;stroke:#0b8457;stroke-width:4}.event-label{font-size:18px;font-weight:900;fill:#14213d}.map-bg{fill:#e0f2fe;stroke:#7dd3fc;stroke-width:3}.land{fill:#bbf7d0;stroke:#16a34a;stroke-width:5}.route{fill:none;stroke:#b42318;stroke-width:6;stroke-linecap:round;stroke-dasharray:12 8}.route.tiny{stroke-width:5}.compass circle,.compass path{fill:none;stroke:#14213d;stroke-width:4}.compass text,.legend-text{font-size:18px;font-weight:900;fill:#14213d}.legend-card{fill:#fff;stroke:#d9e2ec;stroke-width:3}
/* sciences / technologie / arts / EPS / pro */
.flask{fill:#f0f9ff;stroke:#0f3d5e;stroke-width:6;stroke-linejoin:round}.liquid{fill:none;stroke:#38bdf8;stroke-width:20;stroke-linecap:round}.bubble-dot{fill:#38bdf8}.graph-card{fill:#fff;stroke:#d9e2ec;stroke-width:4}.curve{fill:none;stroke:#1f6feb;stroke-width:7;stroke-linecap:round}.tech-part,.tech-output{fill:#eff6ff;stroke:#1e3a8a;stroke-width:5}.gear-lite{fill:#fff;stroke:#1e3a8a;stroke-width:5}.tech-cross{fill:none;stroke:#1e3a8a;stroke-width:7;stroke-linecap:round}.need-card,.function-card{fill:#fff7ed;stroke:#fb923c;stroke-width:3}.art-sheet{fill:#fff;stroke:#d9e2ec;stroke-width:4}.poster-frame{fill:#fdf2f8;stroke:#be185d;stroke-width:4}.art-circle{fill:#f9a8d4;stroke:#be185d;stroke-width:3}.art-square{fill:#bfdbfe;stroke:#1d4ed8;stroke-width:3}.palette-panel{fill:#fff;stroke:#d9e2ec;stroke-width:3}.swatch{stroke:#14213d;stroke-width:3}.s1{fill:#f472b6}.s2{fill:#60a5fa}.s3{fill:#fde68a}.floor-line{stroke:#64748b;stroke-width:6;stroke-linecap:round}.sport-head{fill:#fde9bf;stroke:#704214;stroke-width:5}.sport-line{fill:none;stroke:#1e3a8a;stroke-width:8;stroke-linecap:round;stroke-linejoin:round}.motion{fill:none;stroke:#0b8457;stroke-width:6;stroke-linecap:round}.decision-check{fill:none;stroke:#0b8457;stroke-width:10;stroke-linecap:round;stroke-linejoin:round}
.concept-center{fill:#dbeafe;stroke:#1d4ed8;stroke-width:5}.concept-text{font-size:28px;font-weight:950;fill:#14213d;text-anchor:middle}.concept-detail{font-size:17px;font-weight:850;fill:#40556b;text-anchor:middle}.concept-node{fill:#fff;stroke:#d9e2ec;stroke-width:4}.concept-node.answer{fill:#ecfdf5;stroke:#86efac}.node-text{font-size:20px;font-weight:950;fill:#14213d}
@media(max-width:900px){.plate-head{display:grid}.plate-system{justify-self:start}.plate-legend{grid-template-columns:1fr}.plate-action{grid-template-columns:1fr}.course-scene-svg{min-height:300px}.scene-title{font-size:24px}.scene-goal{display:none}.plate-step{min-height:92px}}
@media(max-width:520px){.pedago-plate{padding:6px!important}.plate-head{padding:12px}.plate-system{display:none}.course-scene-svg{min-height:250px}.plate-step{padding-left:54px}.plate-step p{font-size:.92rem}.scene-kicker{font-size:12px}.scene-title{font-size:20px}}
.health-food,.health-sleep,.health-move,.health-clean{fill:#fff;stroke:#d9e2ec;stroke-width:4}.health-food{fill:#ecfdf5;stroke:#86efac}.health-sleep{fill:#e0f2fe;stroke:#7dd3fc}.health-move{fill:#fff7ed;stroke:#fdba74}.health-clean{fill:#f5f3ff;stroke:#c4b5fd}.health-icon{fill:none;stroke:#166534;stroke-width:6;stroke-linecap:round;stroke-linejoin:round}.health-icon.sleep{stroke:#0369a1}.health-icon.move{stroke:#c2410c}.health-icon.clean{stroke:#7c3aed}.rule-card{fill:#fff7ed;stroke:#fb923c;stroke-width:4}.choice-card{fill:#ecfdf5;stroke:#16a34a;stroke-width:5}.scene-emc .person-line{stroke:#334155}.scene-body-health .person-line{stroke:#704214}

/* V47.3 — retours synthétiques : rendre les planches moins "template" et plus lisibles. */
.premium-course-board .visual-caption{font-size:.95rem;color:#475569;background:#f8fafc;border:1px solid var(--line);border-radius:16px;padding:10px 12px}
.premium-course-board.scene-type-graph_data .course-scene-type,
.premium-course-board.scene-type-code_algorithm .course-scene-type,
.premium-course-board.scene-type-accounting_balance .course-scene-type,
.premium-course-board.scene-type-document_analysis .course-scene-type,
.premium-course-board.scene-type-picture_method .course-scene-type{background:#eef6ff;color:#1e3a8a}

/* V47.4 — maturité visuelle par niveau : les niveaux lycée / pro / BTS ne doivent plus ressembler à des planches enfantines. */
.premium-course-board.level-lycee,
.premium-course-board.level-voie_pro,
.premium-course-board.level-bts_sup{
  background:linear-gradient(145deg,#f8fafc,#ffffff 56%,#eef2f7)!important;
  border:1px solid #cbd5e1!important;
}
.premium-course-board.level-lycee .course-visual-head,
.premium-course-board.level-voie_pro .course-visual-head,
.premium-course-board.level-bts_sup .course-visual-head{
  background:#ffffff!important;
  border:1px solid #d0d7e2!important;
  box-shadow:0 10px 22px rgba(15,23,42,.07)!important;
}
.premium-course-board.level-lycee .visual-tag,
.premium-course-board.level-voie_pro .visual-tag,
.premium-course-board.level-bts_sup .visual-tag{
  background:#111827!important;
  color:#fff!important;
  border-color:#111827!important;
  letter-spacing:.04em;
}
.premium-course-board.level-lycee .course-scene-type,
.premium-course-board.level-voie_pro .course-scene-type,
.premium-course-board.level-bts_sup .course-scene-type{
  background:#eef2f7!important;
  color:#334155!important;
  border:1px solid #cbd5e1!important;
}
.premium-course-board.level-lycee .course-legend-cards,
.premium-course-board.level-voie_pro .course-legend-cards,
.premium-course-board.level-bts_sup .course-legend-cards,
.premium-course-board.level-lycee_pro .course-legend-cards{
  grid-template-columns:repeat(auto-fit,minmax(168px,1fr))!important;
}
.premium-course-board.level-lycee .visual-card,
.premium-course-board.level-voie_pro .visual-card,
.premium-course-board.level-bts_sup .visual-card{
  background:#fff!important;
  border:1px solid #cbd5e1!important;
  box-shadow:0 10px 20px rgba(15,23,42,.06)!important;
  min-height:112px!important;
}
.premium-course-board.level-bts_sup .visual-card,
.premium-course-board.level-voie_pro .visual-card{
  grid-template-columns:42px 1fr!important;
}
.premium-course-board.level-bts_sup .visual-card-number,
.premium-course-board.level-voie_pro .visual-card-number,
.premium-course-board.level-lycee .visual-card-number{
  background:#111827!important;
  color:#fff!important;
}
.premium-course-board.level-bts_sup .visual-picto-card,
.premium-course-board.level-voie_pro .visual-picto-card,
.premium-course-board.level-lycee .visual-picto-card{
  width:38px!important;
  height:38px!important;
  stroke:#334155!important;
}
.premium-course-board.level-bts_sup .visual-action,
.premium-course-board.level-voie_pro .visual-action,
.premium-course-board.level-lycee .visual-action{
  background:#111827!important;
  color:#fff!important;
  border:0!important;
  box-shadow:0 12px 26px rgba(15,23,42,.16)!important;
}
.premium-course-board.level-bts_sup .visual-action p,
.premium-course-board.level-voie_pro .visual-action p,
.premium-course-board.level-lycee .visual-action p,
.premium-course-board.level-bts_sup .visual-action strong,
.premium-course-board.level-voie_pro .visual-action strong,
.premium-course-board.level-lycee .visual-action strong{
  color:#fff!important;
}
.mature-course-scene{background:#f7f8fb!important;min-height:360px!important;}
.mature-course-scene text{stroke:#fff;stroke-width:1px;paint-order:stroke;}
.mature-course-scene .mature-box text{stroke-width:.75px;}
.mature-course-scene rect,.mature-course-scene path,.mature-course-scene line,.mature-course-scene polyline,.mature-course-scene circle{vector-effect:non-scaling-stroke;}
.mature-band-bts_sup text,.mature-band-voie_pro text{letter-spacing:-.01em;}
@media(max-width:900px){
  .mature-course-scene{min-height:300px!important;}
  .premium-course-board.level-bts_sup .course-legend-cards,
  .premium-course-board.level-voie_pro .course-legend-cards,
  .premium-course-board.level-lycee .course-legend-cards{grid-template-columns:1fr!important;}
}

/* V47.6 : l'illustration apparaît seulement quand elle aide. Quand elle est utilisée,
   on affiche le point précis de la séance pour éviter la même image sans contexte. */
.course-point-badge{display:flex;gap:10px;align-items:center;justify-content:space-between;border:1px solid rgba(20,33,61,.08);background:rgba(255,255,255,.92);border-radius:16px;padding:10px 14px;color:#14213d;box-shadow:0 8px 18px rgba(20,33,61,.045)}
.course-point-badge strong{font-size:.78rem;text-transform:uppercase;letter-spacing:.08em;color:#5b6b7e}
.course-point-badge span{font-weight:900;line-height:1.25;text-align:right}
@media(max-width:700px){.course-point-badge{display:block}.course-point-badge span{display:block;text-align:left;margin-top:4px}}


/* V47.16 - Connexion IA directe de test propriétaire */
.ai-key-paste{font-family:ui-monospace,Consolas,monospace;min-height:96px;line-height:1.4;word-break:break-all;}
.ai-direct-note{margin-top:10px!important;background:#fff8e9;border:1px solid #f0d59d;border-radius:12px;padding:9px 11px;color:#704500;}
.ai-config-modal code{background:#f1f5f9;border-radius:6px;padding:1px 5px;}
.ai-config-modal .config-help.ok{border-color:#b7e2c3;background:#f2fff6;color:#164923;}
.ai-config-modal .config-help.bad{border-color:#f1b7b7;background:#fff5f5;color:#7f1d1d;}


/* V47.39 comptes élèves, parents, chat */
.account-row{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid rgba(30,41,59,.12)}
.account-row:last-child{border-bottom:0}.checkline{display:block;margin:.55rem 0}.chat-participants{max-height:240px;overflow:auto;border:1px solid rgba(30,41,59,.12);border-radius:12px;padding:10px;margin:10px 0;background:rgba(255,255,255,.7)}
.thread-btn{display:block;width:100%;text-align:left;border:1px solid rgba(30,41,59,.12);background:#fff;border-radius:12px;padding:12px;margin:8px 0;cursor:pointer}.thread-btn:hover{box-shadow:0 6px 20px rgba(15,23,42,.10)}
.chat-messages{max-height:420px;overflow:auto;padding:8px;border:1px solid rgba(30,41,59,.12);border-radius:14px;background:rgba(248,250,252,.8);margin-bottom:12px}.chat-message{background:#fff;border-radius:12px;padding:10px;margin:8px 0;border:1px solid rgba(30,41,59,.08)}.chat-message p{white-space:pre-wrap;margin:.4rem 0}


.legal-table{width:100%;border-collapse:collapse;font-size:.92rem}.legal-table th,.legal-table td{border:1px solid #dbe3ef;padding:10px;vertical-align:top}.legal-table th{background:#f1f5f9;text-align:left}.btn.danger{background:#fee2e2;color:#991b1b;border-color:#fecaca}.btn.danger:hover{background:#fecaca}

.legal-pre{white-space:pre-wrap;background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:14px;max-height:460px;overflow:auto;font-size:.92rem;line-height:1.45}.legal-docs details{margin-bottom:12px}.legal-docs summary{cursor:pointer}
/* V48.3 abonnements / testeurs */
.selected-plan{outline:3px solid rgba(40,120,80,.25);box-shadow:0 0 0 4px rgba(40,120,80,.08)}
.tester-review{border:1px solid rgba(0,0,0,.08);border-radius:14px;padding:14px;margin:12px 0;background:rgba(255,255,255,.7)}
.tester-review blockquote{margin:8px 0;padding:10px 14px;border-left:4px solid rgba(0,0,0,.18);background:rgba(0,0,0,.03);border-radius:8px}

/* V48.4 simplification */
.subscription-simple-grid .course-card{min-height:250px}
.price-big{font-size:1.25rem;font-weight:800;margin:.35rem 0;color:var(--text)}
.selected-plan{outline:3px solid rgba(67,121,238,.25);box-shadow:0 0 0 4px rgba(67,121,238,.08)}
.account-gate .course-grid{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.student-topbar .top-actions{gap:.45rem}.student-topbar .pill{max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width: 780px){.student-topbar .top-actions .pill:nth-of-type(2){display:none}.student-topbar .top-actions{justify-content:flex-end}.price-big{font-size:1.05rem}}
/* V48.10 admin */
.feedback.warn{background:#fff5df;color:#805000}
.tag.warn{background:#fff5df;color:#805000}
.tag.bad{background:#fdecea;color:#8d2e25}
.admin-grid-kpi .course-card h3{font-size:2rem;margin:.2rem 0}
