/* Phase 3A: comfortable diagrams without text painted into a fixed-size image. */
.course-visual{margin:24px 0;background:#f5f8ff;border:1px solid #d6dff2;border-radius:20px;padding:22px;min-width:0;color:#162c48}
.cv-heading{display:flex;align-items:center;gap:12px}.cv-icon{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border-radius:14px;background:#e1e9ff;color:#314c99}.cv-icon svg{width:26px;height:26px}
.cv-kicker{display:block;font-size:12px;font-weight:800;color:#465f91;letter-spacing:.04em;text-transform:uppercase}.cv-heading h2{font-size:23px!important;line-height:1.3;margin:3px 0 0!important;letter-spacing:-.02em}
.cv-intro{font-size:17px!important;line-height:1.5!important;margin:12px 0 16px!important;color:#45566d}
.cv-step-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.cv-step-tabs button{min-width:0;border:1px solid #cbd6ec;background:#fff;border-radius:12px;color:#273e64;display:flex;align-items:center;gap:8px;padding:10px;min-height:54px;text-align:left;font-size:15px;font-weight:700;line-height:1.35}.cv-step-tabs button b{flex:0 0 26px;height:26px;display:grid;place-items:center;border-radius:50%;background:#eaf0fc}.cv-step-tabs button[aria-pressed=true]{background:#243e81;border-color:#243e81;color:white}.cv-step-tabs button[aria-pressed=true] b{background:white;color:#243e81}
.cv-scene{margin:16px 0;min-width:0;padding:18px;border:1px solid #dce4f1;border-radius:16px;background:#fff}.cv-scene h3{font-size:20px;line-height:1.4;margin:0 0 15px}.cv-scene p,.cv-summary p{font-size:18px!important;line-height:1.65!important;margin:12px 0 0!important;color:#33475e}
.cv-memory{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}.cv-cell{flex:1 1 130px;min-width:0;border:1px solid #d4ddeb;border-radius:14px;background:#fafbfd;padding:13px 11px;text-align:center}.cv-cell>span{display:block;color:#365470;font-size:16px;font-weight:700}.cv-cell strong{display:block;max-width:100%;overflow:auto;white-space:nowrap;margin:7px 0;font-size:23px;color:#142e4a}.cv-cell small{display:block;font-size:13px;color:#50677e}.cv-active{border:2px solid #238477!important;box-shadow:0 0 0 3px #daf4ed;background:#effaf5!important}.cv-arrow{flex:0 0 24px;width:24px;height:24px;fill:none;stroke:#7184a6;stroke-width:2}
/* Arrows denote a visual path, never a permanent link between variable cells. */
.cv-memory .cv-arrow{display:none}
.cv-code{margin:16px 0 0;overflow-x:auto;max-width:100%;padding:13px 12px;border:1px solid #cad6eb;border-radius:11px;background:#eef3fb;scrollbar-width:thin;scrollbar-color:#8095b7 #eef3fb}.cv-code code{white-space:pre;overflow-wrap:normal;word-break:normal;font:600 17px/1.65 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#163667}
.cv-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.cv-controls .btn{min-height:44px;font-size:15px;min-width:44px}.cv-speed{display:flex;align-items:center;gap:7px;font-size:14px;color:#3d5476}.cv-speed select{font:inherit;min-height:44px;max-width:110px;border:1px solid #bdcce4;background:#fff;border-radius:10px;padding:6px}
.cv-bottom{display:flex;gap:12px;justify-content:space-between;align-items:center;flex-wrap:wrap;margin-top:12px;font-size:14px;color:#465d7a}.cv-all{min-height:44px;padding:8px 4px;background:none;border:0;text-decoration:underline;text-underline-offset:3px;color:#294883;font-family:inherit;font-weight:700;font-size:14px;line-height:1.4;cursor:pointer}.cv-summary{margin:14px 0 0;padding:0 0 0 26px;display:grid;gap:14px}.cv-summary li{padding-left:5px}.cv-summary h3{font-size:18px}.cv-summary .cv-code{margin-top:8px}
.cv-ribbon{display:flex;gap:7px;max-width:100%;overflow-x:auto;padding:6px 4px 12px;scrollbar-width:thin}.cv-letter{flex:0 0 45px;border:1px solid #cbd7e9;border-radius:12px;background:#f7f9fd;text-align:center;padding:7px 4px}.cv-letter small{display:block;font-size:14px;color:#4a6481}.cv-letter strong{display:block;font:700 23px/1.5 ui-monospace,monospace}.cv-result{display:flex;align-items:center;gap:12px;margin-top:10px;color:#265b51;font-size:16px}.cv-result strong{font-family:ui-monospace,monospace;letter-spacing:.15em;font-size:24px}
.cv-groups{display:flex;gap:10px;flex-wrap:wrap}.cv-group{border:1px solid #a7d0c7;border-radius:12px;background:#edf8f4;padding:10px;flex:1 1 80px}.cv-group small{display:block;font-size:14px;font-weight:700;color:#2d615a;margin-bottom:10px}.cv-group>div{display:flex;gap:6px;flex-wrap:wrap}.cv-group i{width:14px;height:14px;display:block;background:#258476;border-radius:50%}.cv-rest{background:#fff6e7;border-color:#dbc59c}.cv-rest small{color:#765316}.cv-rest i{background:#ad7830}
.cv-dice{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;padding:4px}.cv-dice>span{min-height:52px;display:flex;align-items:center;justify-content:center;flex-direction:column;border:1px solid #cbd7e9;background:#f7f9fd;border-radius:10px;padding:6px 0}.cv-dice b{font-size:22px}.cv-dice small{font-size:11px;text-align:center}
.course-visual button:focus-visible,.course-visual select:focus-visible,.cv-code:focus-visible,.cv-ribbon:focus-visible{outline:3px solid #ac6422;outline-offset:3px}
.cv-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.lesson-content .study-reading{display:grid;gap:12px}.lesson-content .study-reading>p{margin:0!important;font-size:18px;line-height:1.8}
@media(max-width:720px){
 .course-visual{padding:14px 10px;margin:18px -4px;border-radius:16px}.cv-heading{gap:8px}.cv-heading h2{font-size:21px!important}.cv-icon{flex-basis:36px;width:36px;height:36px;border-radius:11px}.cv-icon svg{width:23px;height:23px}
 .cv-step-tabs{gap:6px}.cv-step-tabs button{flex-direction:column;align-items:flex-start;padding:9px 7px;font-size:14px;min-height:86px;gap:6px}.cv-step-tabs button b{flex-basis:auto;width:25px;height:25px}
 .cv-scene{padding:14px 10px;margin:12px 0}.cv-cell{flex-basis:90px;padding:10px 6px}.cv-cell>span{font-size:15px}.cv-cell strong{font-size:22px}.cv-cell small{font-size:12px}.cv-code{padding:11px 8px}.cv-code code{font-size:16px}.cv-controls .btn{padding:8px 10px;font-size:14px}.cv-speed{flex:1 1 130px}.cv-controls [data-cv-reset]{flex:1 1 130px}.cv-dice{grid-template-columns:repeat(3,minmax(0,1fr))}.cv-dice small{font-size:12px}.cv-bottom{font-size:13px}.cv-all{font-size:14px}
}
@media(prefers-reduced-motion:no-preference){.cv-active{transition:background-color .18s,border-color .18s}.cv-scene{animation:cv-enter .16s ease-out}@keyframes cv-enter{from{opacity:.6}to{opacity:1}}}
@media(prefers-reduced-motion:reduce){.course-visual *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
body.presenting .cv-heading h2{font-size:30px!important}body.presenting .cv-scene p{font-size:23px!important}body.presenting .cv-code code{font-size:21px}body.presenting .course-visual{max-width:1100px;margin:24px auto}
@media print{.cv-controls,.cv-bottom,.cv-step-tabs{display:none}.course-visual{break-inside:avoid;background:white;color:black}.cv-scene{border:0}}
.cv-memory .cv-cell.cv-wide{flex-basis:100%}.cv-scroll-hint{display:block;margin:5px 0;color:#466084;font-size:13px}.cv-scroll-hint[hidden]{display:none}.cv-code-shell{min-width:0}
/* Audit 3A: screen-reader labels stay inside the scroll container. */
.cv-letter{position:relative}
.course-visual .cv-controls .btn{width:auto;flex:0 1 auto}
.course-visual .cv-controls [data-cv-next]{flex:1 1 130px}
.course-visual .cv-controls [data-cv-reset]{flex:1 1 130px}

/* Inspection finale 3A : mots entiers et sept indices visibles sur téléphone. */
@media(max-width:720px){
 .cv-step-tabs{grid-template-columns:1fr;gap:6px}
 .cv-step-tabs button{flex-direction:row;align-items:center;min-height:44px;padding:8px 10px;font-size:16px}
 .cv-step-tabs button span{min-width:0;overflow-wrap:normal;word-break:normal;hyphens:none}
 .cv-step-tabs button b{flex:0 0 25px}
 .cv-ribbon{display:grid;grid-template-columns:repeat(7,minmax(28px,1fr));gap:4px}
 .cv-letter{min-width:0;padding:7px 1px}
}

/* Navigation de cours : trois libellés courts, sans mots fragmentés. */
@media(max-width:720px){
 .course-layout .study-tabs button{font-size:16px;line-height:1.4;padding:9px 4px;white-space:nowrap;overflow-wrap:normal;word-break:normal;hyphens:none}
}
