:root{font-family:system-ui,-apple-system,Segoe UI,sans-serif;color:#182b40;background:#f4f7fa;font-size:16px;line-height:1.55;--blue:#235789;--line:#dce5ef;--muted:#52677b;--gold:#aa600a}*{box-sizing:border-box}body{margin:0}a{color:var(--blue);text-underline-offset:3px}button,input,select{font:inherit}button{cursor:pointer;border:1px solid #c4d3e2;background:#fff;color:#183c61;border-radius:10px;padding:11px 16px;font-weight:650}button:hover{background:#eef5fc}button.primary{background:var(--blue);color:#fff;border-color:var(--blue)}button:disabled{opacity:.5;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #c77919;outline-offset:3px}nav{padding:16px max(20px,calc((100vw - 1150px)/2));display:flex;gap:22px;align-items:center;flex-wrap:wrap;background:#fff;border-bottom:1px solid var(--line)}.brand{font:700 1.8rem Georgia,serif;text-decoration:none}nav a:not(.brand){font-size:.9rem}main{max-width:1150px;margin:auto;padding:32px 22px 45px}.skip{position:absolute;top:-100px}.skip:focus{top:5px;left:5px;z-index:20;background:#fff;padding:15px}h1{font:700 clamp(2rem,5vw,3.25rem)/1.15 Georgia,serif;margin:8px 0 16px}h2{font-size:1.25rem;margin:0 0 12px}h3{font-size:1.08rem}.eyebrow{font-size:.76rem;letter-spacing:.11em;font-weight:800;color:var(--blue);text-transform:uppercase}.lead{font-size:1.1rem;color:var(--muted);max-width:750px}.pill{display:inline-block;padding:4px 10px;border-radius:30px;background:#e8eff7;font-size:.8rem;margin:0 6px 8px 0;font-weight:650}.hero{display:grid;grid-template-columns:1.5fr 1fr;gap:28px;margin-bottom:26px}.side{background:#183c61;color:white;border-radius:18px;padding:25px;align-self:center}.side p{margin:9px 0;color:#e2edf8}.side strong{font-size:1.1rem}.panel{background:white;border:1px solid var(--line);border-radius:16px;padding:22px;margin:18px 0}.small,.muted{font-size:.9rem;color:var(--muted)}.toolbar,.row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.between{justify-content:space-between}.toolbar input{padding:12px;border:1px solid #bfccda;border-radius:10px;flex:1;min-width:220px}.catalog{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:20px 0}.domain{border:1px solid var(--line);border-radius:14px;background:#fff;padding:0 18px}.domain summary{cursor:pointer;padding:17px 0;font-weight:750}.domain[open] summary{border-bottom:1px solid var(--line)}.skill{display:flex;align-items:flex-start;gap:11px;padding:11px 0;border-bottom:1px solid #edf1f5;cursor:pointer}.skill:last-child{border:0}.skill input{width:19px;height:19px;flex-shrink:0;margin-top:4px;accent-color:var(--blue)}.skill strong{font-size:.94rem;font-weight:600}.skill small{display:block;font-size:.75rem;color:var(--muted)}.launch{position:sticky;bottom:0;background:#fff;border:1px solid var(--line);box-shadow:0 -5px 24px #183c6110;border-radius:14px;padding:15px 18px;z-index:3}.launch p{margin:0}.launch .row{justify-content:space-between}.status{min-height:1.5em;color:#923c15}.quizhead{margin-bottom:18px}.progress{height:6px;border-radius:10px;background:#dce6f0;margin:18px 0;overflow:hidden}.progress span{display:block;height:100%;background:var(--blue)}.question{font-size:1.25rem;line-height:1.7;font-weight:550;margin:16px 0 24px;overflow-wrap:anywhere}.visual svg{display:block;width:100%;max-width:480px;margin:12px auto;font-size:15px}.choices{display:grid;grid-template-columns:1fr 1fr;gap:12px}.choice{min-height:62px;display:flex;align-items:center;gap:13px;text-align:left;font-weight:500}.letter{background:#edf2f8;border-radius:6px;padding:3px 9px;font-weight:750}.choice.selected{border:2px solid var(--blue);background:#eaf2fc}.choice.correct{border:2px solid #16704a;background:#eefaf3}.choice.wrong{border:2px solid #a03b29;background:#fff1ec}.answer-input{width:100%;padding:14px;border:2px solid #bdcbdc;border-radius:11px;font-size:1.25rem}.answer-label{display:block;font-weight:650;margin-bottom:8px}.keypad{display:flex;gap:7px;flex-wrap:wrap;margin:10px 0}.keypad button{padding:7px 13px}.question-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:23px;padding-top:17px;border-top:1px solid var(--line)}.feedback{padding:18px;border-radius:12px;background:#f0f7f3;border-left:4px solid #16704a;margin:16px 0}.feedback.wrong{background:#fff7f1;border-color:#b86818}.feedback p{margin:7px 0}.fraction{display:inline-flex;vertical-align:middle;flex-direction:column;align-items:center;line-height:1.15;margin:0 .18em}.fraction>span:first-child{padding:0 .15em .1em;border-bottom:1px solid currentColor}.fraction>span:last-child{padding:.1em .15em 0}table{border-collapse:collapse;margin:15px 0;font-size:1rem;max-width:100%}th,td{border:1px solid #cbd5e1;padding:7px 13px;text-align:center}pre{font:1rem/1.7 ui-monospace,monospace;background:#f2f5f9;border-radius:10px;padding:15px;overflow:auto}.score{font:700 3rem Georgia,serif;color:var(--blue)}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.stat{background:#edf3f9;border-radius:12px;padding:18px}.stat strong{display:block;font-size:1.5rem}.resultrow{padding:12px 0;border-bottom:1px solid var(--line)}.resultrow small{display:block;color:var(--muted)}.review{border-top:1px solid var(--line);padding:14px 0}.review summary{cursor:pointer}.review .question{font-size:1rem;margin:8px 0}.notice{background:#fff8eb;border:1px solid #efdbb5;border-radius:12px;padding:14px 17px}.sources li{margin-bottom:12px}footer{text-align:center;font-size:.8rem;color:var(--muted);padding:24px}.danger{color:#933827}.hidden,[hidden]{display:none!important}@media(max-width:720px){.hero,.catalog{grid-template-columns:1fr}.hero{gap:10px}.side{padding:18px}.choices{grid-template-columns:1fr}main{padding:22px 14px 32px}.panel{padding:17px}.stats{grid-template-columns:1fr}.launch .row{gap:10px}.launch .row>div:last-child{width:100%;display:flex;flex-wrap:wrap;gap:8px}.launch button{flex:1}.question-actions{position:sticky;bottom:0;background:white;padding:13px 0;z-index:2}.question{font-size:1.12rem}nav{gap:10px 16px;padding:12px 16px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* Parcours PWA cycle 4 : compétences en priorité, aides repliables. */
:root{--blue:#087f82;--line:#d9e5e2;--muted:#5b737c;color:#183b45;background:#f8faf7}
body{background:#f8faf7}
nav{padding:11px max(18px,calc((100vw - 1150px)/2));min-height:68px}
nav .brand{font-size:1.19rem;color:#143f52;font-family:system-ui,-apple-system,Segoe UI,sans-serif;font-weight:850}
nav a{color:#087f82}
main{padding-top:23px}
.hero{display:block;margin:0 0 13px;background:linear-gradient(135deg,#143f52,#087f82);color:white;padding:24px 29px;border-radius:20px}
.hero h1{font:700 clamp(1.65rem,4vw,2.3rem)/1.16 Georgia,serif;margin:8px 0}
.hero .eyebrow,.hero .lead{color:#effffb}.hero .lead{font-size:.99rem;margin:0}
.format-panel{padding:16px 18px;margin:12px 0}
.format-panel h2{margin:0 0 10px}
.format-panel select{min-height:46px;border-radius:10px;padding:7px;border:1px solid #c5ded8}
.small-extra{margin:12px 0;font-size:.86rem;color:#526d73}
.small-extra summary{color:#087f82;font-weight:760;cursor:pointer;padding:4px 2px}
.small-extra p{margin:7px 0}
.catalog{margin:12px 0;gap:11px}
.domain{border-color:#d9e5e2}
.launch{border-color:#c5ded8}
button.primary{background:#087f82;border-color:#087f82}
@media(max-width:720px){main{padding:13px 13px 30px}.hero{padding:20px 19px;border-radius:16px}.hero h1{font-size:1.7rem}.panel{padding:15px}.launch{padding:12px}.catalog{gap:9px}nav{gap:10px;padding:10px 13px}}


/* Interface collège simplifiée : grands choix avant le catalogue détaillé. */
.easy-hero{margin-bottom:17px;padding:27px 29px}
.easy-hero h1{font-size:clamp(1.8rem,4.5vw,2.55rem)}
.skill-search{display:flex;gap:10px;margin:18px 0 21px;align-items:stretch}
.skill-search input{flex:1;min-width:0;border:1px solid #bfd5d2;border-radius:13px;background:#fff;padding:13px 15px;font:inherit;color:#143f52;min-height:49px}
.skill-search button{background:#e9f4f1;color:#087f82;border-color:#c5ded8;font-weight:800}
.path-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:16px 0 22px}
.path-card{position:relative;display:flex;align-items:flex-start;flex-direction:column;gap:10px;padding:24px;min-height:220px;border:2px solid #d9e5e2;border-radius:21px;background:#fff;color:#143f52;text-align:left;box-shadow:0 10px 32px #143f520e;transition:transform .15s,border-color .15s,box-shadow .15s}
.path-card:hover{border-color:#087f82;background:#fbfefd;box-shadow:0 14px 34px #143f5217;transform:translateY(-2px)}
.path-card:active{transform:scale(.99)}
.path-card .path-icon{display:block;font-size:2.2rem;line-height:1.1}
.path-card strong{font-size:clamp(1.22rem,2.7vw,1.45rem);line-height:1.3;font-weight:850;letter-spacing:-.02em}
.path-card>span:not(.path-icon){font-size:.92rem;color:#526b74;line-height:1.5}
.path-card em{font-size:.83rem;font-style:normal;font-weight:750;color:#17686b;background:#e9f4f1;border-radius:10px;padding:8px 10px;margin-top:auto}
.path-card b{position:absolute;right:22px;top:20px;color:#087f82;font-size:1.55rem}
.screen-back{margin:10px 0 18px}
.screen-back button{border:0;color:#087f82;background:#e9f4f1;font-size:.92rem;font-weight:800;min-height:46px}
.selection-note{margin:11px 0 18px;max-width:750px;line-height:1.5}
.selection-head{margin:8px 0 13px}
.selection-head h1{font-size:clamp(1.6rem,4vw,2.2rem);margin:5px 0 7px}
.selection-head p{margin:0}
.compact-settings{margin:16px 0;border:1px solid #d9e5e2;border-radius:14px;background:#fff;overflow:hidden}
.compact-settings summary{cursor:pointer;padding:14px 17px;font-weight:750;color:#17676b;min-height:48px}
.compact-settings[open] summary{border-bottom:1px solid #d9e5e2}
.compact-settings .settings-body{padding:14px 17px}
.settings-body label{font-weight:700;margin-right:10px}
.settings-body select{border:1px solid #bfd5d2;min-height:45px;padding:8px;border-radius:10px;max-width:100%;background:#fff;color:#143f52}
.settings-body p{margin:10px 0 0}
.extra-help{margin-top:20px;color:#516a73}
.catalog{margin-top:14px}
.catalog .domain{min-width:0}
.catalog .domain summary{font-size:.96rem}
.catalog .skill strong{line-height:1.4}
.launch{background:#fff;border-color:#c5ded8}
.launch .row>div:last-child{display:flex;align-items:center}
.launch button{min-height:48px}
@media(max-width:720px){
 .easy-hero{padding:22px 20px;border-radius:18px}
 .path-cards{grid-template-columns:1fr;gap:12px;margin:13px 0}
 .path-card{min-height:0;padding:19px 20px;gap:6px;border-radius:17px}
 .path-card .path-icon{font-size:1.8rem}
 .path-card strong{font-size:1.2rem}
 .path-card em{margin-top:5px}
 .skill-search{margin:13px 0 16px;gap:7px}
 .skill-search button{padding:10px;font-size:.86rem}
 .catalog{margin-top:12px;gap:10px}
 .launch{padding:12px 14px}
}
@media(prefers-reduced-motion:reduce){.path-card{transition:none}.path-card:hover,.path-card:active{transform:none}}


/* Scripts visuels inspirés des blocs Scratch ; utilisables au clavier et sur mobile. */
.scratch-figure{margin:12px 0 18px;max-width:100%;min-width:0;border:1px solid #d6e4df;border-radius:16px;background:#f6f9f8;overflow:hidden}
.scratch-figure figcaption{color:#466775;font:750 .84rem/1.45 system-ui,-apple-system,Segoe UI,sans-serif;padding:10px 15px;border-bottom:1px solid #d6e4df}
.scratch-canvas{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;padding:18px 18px 22px;background-color:#fcfefd;background-image:radial-gradient(#dce7e5 .8px,transparent .8px);background-size:17px 17px}
.scratch-stack{display:flex;align-items:flex-start;flex-direction:column;gap:0;min-width:210px;width:max-content;max-width:none;font:650 clamp(13px,2.4vw,15px)/1.4 system-ui,-apple-system,Segoe UI,sans-serif;color:#fff}
.sc-block{box-sizing:border-box;display:block;padding:9px 12px;border-radius:5px;min-height:41px;max-width:max-content;white-space:nowrap;box-shadow:inset 0 -3px 0 rgba(0,0,0,.12);border:1px solid rgba(0,0,0,.05)}
.sc-event{background:#ffbf00;color:#3b3216;font-weight:800;border-radius:16px 16px 5px 5px}
.sc-variable{background:#ff8c1a}
.sc-looks{background:#9966ff}
.sc-motion{background:#4c97ff}
.sc-pen{background:#0fbd8c}
.sc-input{display:inline-flex;align-items:center;justify-content:center;padding:2px 7px;border-radius:20px;background:#fff;color:#3b3b3b;min-height:23px;font-weight:750}
.sc-var{display:inline-flex;align-items:center;border-radius:19px;padding:2px 8px;background:#ff8c1a;color:#fff;border:1px solid #e77705;min-height:24px;font-weight:750}
.sc-flag{font-size:19px;line-height:1;display:inline-block;color:#198d43;vertical-align:middle}
.sc-operator{display:inline-flex;align-items:center;gap:4px;padding:3px 7px;border-radius:22px;background:#59c059;min-height:29px;color:#fff;vertical-align:middle;white-space:nowrap}
/* Le sous-bloc réellement emboîté est entouré de blanc, comme une pièce Scratch. */
.sc-operator-group{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;flex:none;border:2px solid #fff;border-radius:999px;background:#318c42;padding:2px;box-shadow:0 0 0 2px #2d7840,0 2px 5px #13391940;min-height:39px}
.sc-operator-group>.sc-operator{display:inline-flex;background:#238b36;border-radius:999px;border:0;box-shadow:none;padding:3px 8px;min-height:29px}
.sc-operator:has(>.sc-operator-group){padding:4px 9px;gap:8px;min-height:48px;box-shadow:inset 0 -3px 0 #1c6b2980}
.sc-reading-hint{font:.84rem/1.45 system-ui,-apple-system,Segoe UI,sans-serif;color:#23605b;background:#e9f4f1;margin:0;padding:10px 15px 12px;border-top:1px solid #d6e4df}
.sc-reading-hint strong{color:#143f52}
@media(max-width:580px){.sc-operator-group{padding:1px;min-height:35px}.sc-operator-group>.sc-operator{padding:3px 6px}.sc-operator:has(>.sc-operator-group){gap:5px;padding:3px 7px}}
.sc-symbol{font-weight:800}
.sc-control{background:#ffab19;color:#fff;border:1px solid #d68b10;border-radius:6px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.12);padding:0;min-width:145px;max-width:max-content}
.sc-control-top{padding:9px 13px;white-space:nowrap;font-weight:750}
.sc-control-inside{border-left:15px solid #ffab19;padding:0 5px 3px 0;background:transparent;display:flex;align-items:flex-start;flex-direction:column}
.sc-control-inside .sc-block{max-width:max-content}
.sc-control-else{padding:7px 13px;white-space:nowrap;font-weight:750}
.sc-control-bottom{padding:0 12px 3px;text-align:right;height:18px}
@media(max-width:580px){.scratch-canvas{padding:13px 10px 16px}.scratch-stack{font-size:13px;min-width:0}.sc-block{padding:8px 9px}.sc-control-top{padding:8px 10px}.sc-input{padding:2px 6px}}

/* Géométrie : repères invariants lorsque les triangles tournent.
   Les sommets et étiquettes restent indépendants de l'orientation. */
.visual svg.triangle-variable{display:block;width:min(100%,460px);max-width:100%;height:auto;overflow:visible;margin:13px auto;border-radius:15px;background:#fbfefd;border:1px solid #d9e5e2}
.triangle-variable .tri-outline{stroke:#143f52;stroke-width:3;stroke-linejoin:round;fill:#e9f4f1}
.triangle-variable .tri-right-mark{stroke:#d58420;stroke-width:3;stroke-linejoin:round;fill:none}
.triangle-variable .tri-equal-mark{stroke:#d58420;stroke-width:3.8;stroke-linecap:round;fill:none}
.triangle-variable .tri-exterior{stroke:#143f52;stroke-width:2.3;stroke-dasharray:6 4;stroke-linecap:round;fill:none}
.triangle-variable .tri-vertex{font:750 17px system-ui,-apple-system,Segoe UI,sans-serif;fill:#143f52}
.triangle-variable .tri-length{font:690 15px system-ui,-apple-system,Segoe UI,sans-serif;fill:#086c70;paint-order:stroke;stroke:#fbfefd;stroke-width:5}
.triangle-variable .tri-angle{font:750 15px system-ui,-apple-system,Segoe UI,sans-serif;fill:#b26c19;paint-order:stroke;stroke:#fbfefd;stroke-width:4}

/* Corrections pédagogiques : positions exactes, détails facultatifs. */
.correction-figure{margin:12px 0;max-width:100%;overflow-x:auto;padding:8px 0;color:#183b45}
.correction-svg{display:block;width:100%;height:auto;margin:0 auto;font:26px ui-monospace,SFMono-Regular,Consolas,monospace;overflow:visible}
.correction-svg text{fill:currentColor}
.correction-svg .carry{font-size:13px;font-weight:750;fill:#b3470c}
.correction-svg .compensation-one{font-size:12px}
.correction-svg .added-zero{fill:#08716c}
.correction-svg .operation-result{fill:#075e61;font-weight:750}
.correction-svg .column-guide{stroke:#dce5e2;stroke-width:.6}
.correction-svg .operation-line{stroke:#183b45;stroke-width:1.6;fill:none}
.correction-svg .bring-down,.correction-svg .comma-path{stroke:#b3470c;stroke-width:1.7;fill:none}
.correction-svg .division-zero{fill:#52677b}
.correction-figure figcaption{font-size:.8rem;line-height:1.45;margin:8px 0 0;color:#405f68}
.correction-details{margin-top:10px;border-top:1px solid #c9dcd5}
.correction-details>summary{cursor:pointer;color:#075e61;font-weight:700;min-height:44px;padding:10px 0;line-height:1.5}
.correction-body{font-size:.95rem;overflow-wrap:anywhere}
.correction-body ol{padding-left:1.35em;margin:12px 0}
.correction-body li{margin:9px 0}
.division-vocabulary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;font-size:.9rem}
.division-vocabulary dt{font-weight:750}.division-vocabulary dd{margin:0}
.replay-correction{display:block;margin:7px auto;min-height:44px;padding:8px 12px;font-size:.85rem}
.shift-value{text-align:center;font-variant-numeric:tabular-nums}
.moving-comma{color:#b3470c;transform:translateX(var(--comma-end));animation:comma-travel 1.5s steps(var(--comma-steps),end) .2s both}
.moving-comma text{font-size:32px;font-weight:800}
.moving-comma.replaying{animation-name:comma-replay}
@keyframes comma-travel{from{transform:translateX(var(--comma-start))}to{transform:translateX(var(--comma-end))}}
@keyframes comma-replay{from{transform:translateX(var(--comma-start))}to{transform:translateX(var(--comma-end))}}
@media(max-width:380px){.feedback{padding:12px}.division-vocabulary{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.moving-comma,.moving-comma.replaying{animation:none;transform:translateX(var(--comma-end))}.replay-correction{display:none}}

/* Indices Cycle 4 : deux aides facultatives, utilisables au doigt sans élargir la page. */
.optional-hints{display:grid;gap:8px;margin:14px 0;min-width:0;max-width:100%}
.optional-hints details{min-width:0;max-width:100%;border:1px solid #c9dcd5;border-radius:11px;background:#f5faf8;overflow:hidden}
.optional-hints summary{display:flex;align-items:center;min-height:44px;padding:11px 13px;cursor:pointer;font-weight:700;color:#075e61;line-height:1.35;overflow-wrap:anywhere;list-style:none}
.optional-hints summary::-webkit-details-marker{display:none}
.optional-hints summary::before{content:'+';display:inline-flex;align-items:center;justify-content:center;flex:none;width:23px;height:23px;margin-right:10px;border:1px solid currentColor;border-radius:50%;font-weight:700}
.optional-hints details[open] summary::before{content:'−'}
.optional-hints details[open] summary{border-bottom:1px solid #dce9e4}
.optional-hints details>p{margin:0;padding:11px 13px 13px;line-height:1.55;overflow-wrap:anywhere}
.optional-hints summary:focus-visible{outline:3px solid #176e9d;outline-offset:-3px}
.correction-method{border-top:1px solid #dce9e4;margin-top:12px;padding-top:5px}
.correction-method p{line-height:1.55;overflow-wrap:anywhere}
@media(max-width:580px){.optional-hints{gap:7px;margin:10px 0}.optional-hints summary{padding:10px 12px;min-height:46px}.optional-hints details>p{padding:10px 12px 12px}}

/* Mobile Cycle 4 : ne pas faire chevaucher la barre d'action et les réponses QCM. */
@media(max-width:720px){.question-actions{position:static;bottom:auto}}

.irem-sketch-note { margin: 0 auto 1rem; text-align: center; }
.irem-check { margin: 1rem 0; padding: .25rem 1rem .75rem; border: 1px solid #c4d3e2; border-radius: 12px; }
.irem-check > summary { cursor: pointer; color: #075e61; font-weight: 700; padding: .55rem 0; }
.irem-check fieldset { margin: .5rem 0 1rem; padding: .5rem; min-inline-size: 0; border: 1px solid #c4d3e2; border-radius: 8px; }
.irem-check legend { max-width: 100%; padding: 0 .25rem; overflow-wrap: anywhere; }
.irem-check label { display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: .25rem; cursor: pointer; }
.irem-check input { width: 1.1rem; height: 1.1rem; flex: 0 0 auto; accent-color: #235789; }
.irem-check p[role="status"]:empty { margin: 0; }
