/* Exercices École VD uniquement. Aucun sélecteur ne s’applique aux pages historiques.
   Les règles de visibilité des solutions restent sous le contrôle des exercices. */
body.evd-exercise {
 --bg:#111413; --panel:#1b201e; --card:#1b201e; --line:#46534a; --border:#46534a;
 --text:#f1f2e9; --ink:#f1f2e9; --muted:#b6beb7; --accent:#f5ce62; --focus:#f5ce62;
 --green:#9edb96; --ok:#9edb96; --good:#9edb96; --bad:#ffaaa4; --err:#ffaaa4; --warn:#f5ce62;
 margin:0; padding:0; background:var(--bg); color:var(--text); height:auto;
 font:16px/1.65 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
 color-scheme:dark;
}
.evd-exercise *, .evd-exercise *::before, .evd-exercise *::after { box-sizing:border-box; }
.evd-exercise [hidden] { display:none !important; }
.evd-exercise a { color:#65dbd0; text-underline-offset:.22em; }
.evd-exercise a:hover { color:#f5ce62; }
.evd-exercise :focus-visible { outline:3px solid #f5ce62 !important; outline-offset:4px; }
.evd-exercise .evd-shell { width:min(1160px,calc(100% - 48px)); margin-inline:auto; }
.evd-exercise .evd-skip { position:absolute; top:8px; left:12px; z-index:30; padding:12px; background:#f5ce62; color:#111413; transform:translateY(-160%); }
.evd-exercise .evd-skip:focus { transform:translateY(0); }
.evd-exercise .evd-topbar { border-bottom:1px solid var(--line); background:#111413; }
.evd-exercise .evd-topbar .evd-shell { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:18px; min-height:88px; padding-block:16px; }
.evd-exercise .evd-brand { display:flex; align-items:center; gap:12px; font-size:17px; font-weight:750; letter-spacing:.07em; line-height:1.3; text-decoration:none; color:var(--text); }
.evd-exercise .evd-brand img { width:44px; height:40px; object-fit:contain; }
.evd-exercise .evd-brand small { display:block; font-size:11px; font-weight:400; letter-spacing:.02em; color:var(--muted); margin-top:5px; }
.evd-exercise .evd-home { padding:9px 14px; border:1px solid var(--line); border-radius:7px; font-size:14px; text-decoration:none; }
.evd-exercise .evd-breadcrumb { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 10px; font-size:13px; padding-block:22px 12px; overflow-wrap:anywhere; }
.evd-exercise .evd-breadcrumb > span { color:var(--muted); }
.evd-exercise .evd-return { padding-block:4px 16px; font-size:14px; }
.evd-exercise .evd-notice { border-left:3px solid #f5ce62; padding:12px 16px; color:var(--muted); }
.evd-exercise .evd-content { width:100%; min-width:0; }
.evd-exercise .evd-content > .wrap, .evd-exercise .evd-content > main, .evd-exercise .evd-content > header, .evd-exercise .tp-page, .evd-exercise .quiz-container { width:min(1160px,calc(100% - 48px)); max-width:1160px; margin:20px auto; padding:0; }
.evd-exercise .evd-content header { position:static; top:auto; background:none; border:0; box-shadow:none; backdrop-filter:none; padding:20px 0; }
.evd-exercise .evd-content h1, .evd-exercise .evd-content h2, .evd-exercise .evd-content h3 { color:var(--text); text-align:left; line-height:1.25; letter-spacing:-.025em; overflow-wrap:anywhere; }
.evd-exercise .evd-content h1 { font-size:clamp(26px,4vw,40px); }
.evd-exercise .evd-content .logo { color:#f5ce62; }
.evd-exercise :is(.card,.panel,.tp-card,.sheet,.quiz-container) { background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:10px; box-shadow:none; min-width:0; }
.evd-exercise :is(.q,.question,.exercise) { background:var(--panel); color:var(--text); border-color:var(--line); min-width:0; overflow-wrap:anywhere; }
.evd-exercise .question { padding:20px; border:1px solid var(--line); border-radius:10px; margin-block:16px; }
.evd-exercise .tp-card-inner { background:transparent; color:var(--text); }
.evd-exercise :is(.tp-top-info,.sheet-header,details,.pill,.badge,.tag,.scoreBox) { background:#252f2b; color:var(--text); border-color:var(--line); }
.evd-exercise .tp-top-info { border-radius:10px; }
.evd-exercise .badge { background:#f5ce62; color:#191c16; }
.evd-exercise .qhead .badge { background:#252f2b; color:var(--text); }
.evd-exercise :is(.lead,.sub,.subtitle,.legend,.hint,.meta) { color:var(--muted); }
.evd-exercise :is(.qhead,.ans,.controls,.tp-controls,.actions,.statement,.sheet-header) { min-width:0; flex-wrap:wrap; }
.evd-exercise .qhead .prompt { overflow-wrap:anywhere; }
.evd-exercise :is(button,input[type=submit]) { font:600 15px/1.4 system-ui,sans-serif; background:#f5ce62; color:#191c16; border:1px solid #f5ce62; border-radius:7px; padding:11px 16px; min-height:44px; cursor:pointer; box-shadow:none; max-width:100%; white-space:normal; }
.evd-exercise :is(button,input[type=submit]):hover { background:#ffdf88; color:#191c16; transform:none; box-shadow:none; }
.evd-exercise button:is(.secondary,.ghost) { background:#252f2b; color:var(--text); border:1px solid var(--line); }
.evd-exercise :is(.controls,.tp-controls) { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.evd-exercise .tp-btn { margin:0; }
.evd-exercise input:not([type=radio]):not([type=checkbox]):not([type=submit]), .evd-exercise select, .evd-exercise textarea {
 background:#101713; color:var(--text); border:1px solid #788d7e; border-radius:7px;
 font:16px/1.5 system-ui,sans-serif; padding:10px; min-height:44px; max-width:100%; box-shadow:none;
}
.evd-exercise input::placeholder, .evd-exercise textarea::placeholder { color:#b6beb7; opacity:1; }
.evd-exercise input:is([type=radio],[type=checkbox]) { accent-color:#f5ce62; width:20px; height:20px; vertical-align:middle; flex-shrink:0; }
.evd-exercise label { color:var(--text); }
.evd-exercise label.opt, .evd-exercise .choices label { padding-block:10px; line-height:1.6; }
.evd-exercise textarea.lined { width:100%; color:var(--text); background:#101713; line-height:1.7; }
.evd-exercise :is(.feedback,.result,.solution,.show,.tp-correction,.tp-result) { font-size:15px; line-height:1.6; overflow-wrap:anywhere; }
.evd-exercise :is(.solution,.show,.tp-correction,.tp-result) { color:var(--text); }
.evd-exercise :is(.feedback.ok,.feedback.good,.ok,.result .ok) { color:#9edb96; }
.evd-exercise :is(.feedback.err,.feedback.bad,.ko,.result .ko) { color:#ffaaa4; }
.evd-exercise input:is(.ok,.good,.correct) { background:#182f20; color:var(--text); border:2px solid #9edb96; }
.evd-exercise input:is(.bad,.incorrect) { background:#391f20; color:var(--text); border:2px solid #ffaaa4; }
.evd-exercise .tp-row-good { background:#203728 !important; color:var(--text); }
.evd-exercise .tp-row-bad { background:#422729 !important; color:var(--text); }
.evd-exercise .tp-table :is(th,td) { border-color:var(--line); }
.evd-exercise .tp-table th { background:#252f2b; color:var(--text); }
.evd-exercise .fraction-input input { width:64px; height:44px; border-radius:7px; }
.evd-exercise .evd-table-scroll { max-width:100%; overflow-x:auto; }
.evd-exercise :is(.grid,.questions,.cols) > * { min-width:0; }
.evd-exercise svg { max-width:100%; }
.evd-exercise .evd-bottom { display:flex; flex-wrap:wrap; gap:20px; justify-content:space-between; padding-block:24px 40px; margin-top:36px; border-top:1px solid var(--line); color:var(--muted); font-size:14px; }
@media(max-width:760px) {
 .evd-exercise .evd-shell, .evd-exercise .evd-content > .wrap, .evd-exercise .evd-content > main, .evd-exercise .evd-content > header, .evd-exercise .tp-page, .evd-exercise .quiz-container { width:calc(100% - 32px); }
 .evd-exercise .evd-brand { font-size:15px; }
 .evd-exercise .evd-content :is(.grid,.questions,.cols,.statement) { grid-template-columns:minmax(0,1fr); }
 .evd-exercise .evd-content :is(.card,.panel,.tp-card) { padding:18px; }
 .evd-exercise .tp-card-inner { padding:0; }
 .evd-exercise .sheet-header { align-items:flex-start; gap:14px; }
 .evd-exercise .tp-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
 .evd-exercise .tp-table, .evd-exercise .tp-table tbody { display:block; width:100%; }
 .evd-exercise .tp-table tr { display:grid; grid-template-columns:28px minmax(0,1fr); margin-block:16px; border:1px solid var(--line); border-radius:8px; padding:8px; }
 .evd-exercise .tp-table td { display:block; width:auto !important; border:0; text-align:left; }
 .evd-exercise .tp-table td:first-child { grid-row:span 3; padding:8px 0; }
 .evd-exercise .tp-table td:not(:first-child) { grid-column:2; }
 .evd-exercise .tp-table td::before { content:attr(data-evd-label); display:block; color:var(--muted); font-size:12px; margin-bottom:4px; }
 .evd-exercise .fraction-input { flex-wrap:wrap; }
 .evd-exercise .evd-content .q input.answer { width:100%; }
}
@media print {
 .evd-exercise .evd-topbar,.evd-exercise .evd-breadcrumb,.evd-exercise .evd-return,.evd-exercise .evd-bottom,.evd-exercise .evd-skip { display:none; }
 body.evd-exercise { color-scheme:light; background:white; color:black; }
 .evd-exercise .evd-content :is(.card,.panel,.sheet,.q,.exercise,.question,.tp-card,.tp-card-inner) { background:white; color:black; }
 .evd-exercise .evd-content :is(h1,h2,h3,.solution,.tp-correction) { color:black; }
}