/* Navigation intermodules V0.3.1 */
header.top{position:relative;flex-wrap:wrap;height:auto!important;min-height:70px;padding-top:12px!important;padding-bottom:12px!important}
.module-switcher{position:relative;margin-left:auto;z-index:50;font-family:system-ui,-apple-system,Segoe UI,sans-serif;font-size:15px;line-height:1.4}
.module-switcher>summary{cursor:pointer;list-style:none;border:1px solid #b6d2c7;border-radius:9px;background:#eef6f1;color:#155b50;padding:11px 15px;font-weight:750;white-space:nowrap}
.module-switcher>summary::-webkit-details-marker{display:none}.module-switcher>summary:after{content:' ▾'}
.module-switcher[open]>summary:after{content:' ▴'}
.module-switcher summary:focus-visible,.module-panel a:focus-visible,.module-pager a:focus-visible{outline:3px solid #d28b30;outline-offset:2px}
.module-panel{position:absolute;right:0;top:calc(100% + 8px);width:min(90vw,390px);max-height:min(75vh,630px);overflow-y:auto;overscroll-behavior:contain;background:white;border:1px solid #c7d9d1;border-radius:12px;box-shadow:0 12px 35px #153b3333;padding:12px;color:#1b3831}
.module-panel-title{font-size:11px;letter-spacing:.12em;color:#5b8174;font-weight:800;padding:5px 10px;margin:0 0 6px}
.module-options{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:2px!important;overflow:visible!important}
.module-options a,.menu-home{display:block!important;padding:10px 12px!important;font-size:14px!important;text-decoration:none!important;color:#244d43!important;white-space:normal!important;border-radius:7px}
.module-options a:hover,.menu-home:hover{background:#eaf3ee}.module-options a.current-module{background:#d9eee3;font-weight:800}
.menu-home{border-top:1px solid #e4eee8!important;margin-top:9px;font-weight:750}
.module-pager{display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:40px 0 20px;padding:20px 0;border-top:1px solid #d8e4dc}
.module-pager a{display:inline-block;border:1px solid #b9d1c7;border-radius:8px;background:#fff;padding:11px 14px;color:#145d51;text-decoration:none;font-weight:700}
@media(max-width:650px){header.top{gap:8px!important}.module-switcher{order:2;margin-left:0;width:100%}.module-switcher>summary{text-align:center}.module-panel{left:0;right:auto;width:100%}header.top .top-note{display:none}}

.module-panel{max-height:min(70dvh,580px);overflow-y:auto;overscroll-behavior:contain}
.module-panel-title{font-size:.78rem!important;letter-spacing:.12em!important;line-height:1.5!important}
.source-chapter{background:#fff;border:1px solid #e2e9e4;border-radius:12px;padding:clamp(18px,4vw,35px);margin:18px 0;overflow-wrap:anywhere}
.source-chapter h2{font-size:clamp(1.3rem,3vw,1.8rem);line-height:1.3;margin-top:0;color:#174c41}
.source-chapter p{white-space:pre-wrap;line-height:1.7}
.source-chapter pre{background:#142923;color:#f0f8f4;padding:15px;overflow:auto;border-radius:7px;white-space:pre;font-size:.86rem}
.source-index{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0}
.source-index a{border:1px solid #c9dcd2;padding:7px 11px;border-radius:8px;text-decoration:none}
.source-alert{padding:16px;border-left:4px solid #357f6c;background:#eaf5ee;margin:20px 0}

/* V0.4.1 — lecture des extraits de code */
.code-example{max-width:100%;min-width:0;margin:1.2rem 0;border:1px solid #c8d7d0;border-radius:12px;overflow:hidden;background:#122b24}
.code-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#e8f2ed;padding:9px 12px;color:#244f44;font-size:.86rem;font-weight:650}
.code-toolbar button{font:inherit;background:#fff;border:1px solid #a6c7b8;color:#185b4d;padding:8px 12px;border-radius:8px;cursor:pointer}
.code-toolbar button:focus-visible,.code-example pre:focus-visible{outline:3px solid #d0a24e;outline-offset:-3px}
.source-chapter .code-example pre{display:block;margin:0!important;padding:16px!important;max-width:100%;overflow-x:auto;overflow-y:hidden;white-space:pre!important;word-break:normal!important;overflow-wrap:normal!important;border-radius:0!important;background:#122b24!important;color:#f3f8f5!important;line-height:1.55;font-size:clamp(.78rem,2.7vw,.95rem);tab-size:2}
.source-chapter .code-example code{white-space:inherit;word-break:inherit;overflow-wrap:inherit;font:inherit;color:inherit}
.code-hint{margin:0!important;padding:5px 12px 9px!important;background:#e8f2ed;color:#44645a;font-size:.75rem!important;line-height:1.4!important;white-space:normal!important}
.source-chapter p{overflow-wrap:break-word;word-break:normal;white-space:pre-wrap}
@media(max-width:600px){.source-chapter{padding:18px 14px}.code-toolbar{flex-wrap:wrap}.source-index a{font-size:.92rem}}

/* V0.4.2 — adaptation mobile non destructive : le texte copié reste inchangé. */
@media(max-width:650px){
 .source-chapter .code-example pre{white-space:pre-wrap!important;overflow-wrap:anywhere!important;word-break:normal!important;overflow-x:auto;font-size:.82rem;line-height:1.6}
 .source-chapter .code-example code{white-space:inherit!important;overflow-wrap:inherit!important}
 .code-toolbar button{min-height:44px;min-width:116px}
}
.source-chapter .inline-code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.86em;background:#edf3f0;color:#17463c;border-radius:4px;padding:.08em .25em;overflow-wrap:anywhere;white-space:normal}
.copy-code:focus-visible{outline:3px solid #b47821;outline-offset:3px}

/* V0.4.3 : présentation uniquement des autoévaluations et corrigés */
.qa-item{padding:.7rem .85rem;margin:.65rem 0;border:1px solid #d6e2db;border-radius:12px;background:#fff;line-height:1.65;overflow-wrap:anywhere}
.qa-item p{margin:0}
.qa-answer{border-left:3px solid #458978;background:#f1f7f3}
.qa-correction{margin:1rem 0;padding:.75rem;border:1px solid #bdd5c8;border-radius:12px}
.qa-correction>summary{cursor:pointer;font-weight:700;color:#195f50;padding:.45rem;min-height:44px}
.qa-correction[open]>summary{margin-bottom:.8rem}
.qa-correction:focus-within{outline:2px solid #266b60;outline-offset:2px}


/* V0.6.0 — garde-fous de lisibilité mobile, sans altérer les contenus. */
.source-chapter, .source-chapter article, .source-chapter section,
.source-chapter fieldset, .source-chapter form {min-width:0;max-width:100%}
.source-chapter img,.source-chapter svg,.source-chapter video,
.source-chapter iframe {max-width:100%;height:auto}
.source-chapter textarea,.source-chapter input,.source-chapter select {
  max-width:100%;box-sizing:border-box
}
.source-chapter pre {max-width:100%;overflow-x:auto}
.source-chapter table {max-width:100%}
@media(max-width:650px){
 .source-chapter {min-width:0}
 .source-chapter :is(h1,h2,h3,h4,p,li,blockquote) {
   overflow-wrap:break-word;word-break:normal
 }
 .source-chapter :is(input,select,textarea,button) {font-size:max(16px,1em)}
}

/* Navigation publique : accès visible à l'accueil */
.menu-home-first{margin:0 0 8px!important;border:1px solid #d1e1d8!important;background:#eef6f1!important;font-weight:800!important}
header.top nav[aria-label='Navigation principale'] a.nav-home{font-weight:750!important}
