
   :root{--bg:#0b1220;--nav:#0f172a;--card:#111827;--line:#263449;--txt:#e5e7eb;--muted:#9ca3af;--blue:#38bdf8;--green:#34d399;--yellow:#fbbf24}
*{box-sizing:border-box}html{scroll-behavior:smooth}html,body{min-height:100%;margin:0}body{background:var(--bg);color:var(--txt);font:16px/1.62 "Segoe UI",Arial,sans-serif}
.shell{display:grid;grid-template-columns:325px minmax(0,1fr);height:100vh}
aside{overflow:auto;background:var(--nav);border-right:1px solid var(--line);padding:22px 16px}
main.frame{min-width:0;height:100vh}.brand{font-size:1.28rem;font-weight:800}.sub{color:var(--muted);font-size:.88rem;margin:3px 0 18px}
nav a{display:block;color:#cbd5e1;text-decoration:none;padding:5px 9px;border-radius:6px}nav a:hover,nav a.active{background:#172033;color:white}
nav .chapter{font-weight:800;color:white;margin-top:10px}.l2{padding-left:22px;}.l3{padding-left:40px;}
#viewer{width:100%;height:100%;border:0;background:var(--bg)}
.page,.wrap{max-width:1050px;margin:auto;padding:38px 50px 90px}.hero{background:#101d30;border-bottom:1px solid var(--line);padding:38px 0 12px}.hero .wrap{padding-top:0;padding-bottom:0}.hero h1{margin:5px 0 10px}.hero p{color:#cbd5e1;max-width:800px}.tag,.k{color:var(--blue);font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
body> .wrap main, .wrap>main{background:transparent;border:0;box-shadow:none;padding:0;margin:0}
h1{font-size:2.3rem;line-height:1.15}h2{margin-top:48px;border-bottom:1px solid var(--line);padding-bottom:7px;color:#e5e7eb}h3{margin-top:32px;color:#dbeafe}h4{margin-top:24px;color:#cbd5e1}
p,li{max-width:90ch}a{color:#7dd3fc}
.box,.note,.warn,.correction{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:14px 17px;margin:17px 0}.note{border-left:4px solid var(--green)}.warn,.correction{border-left:4px solid var(--yellow)}
pre{background:#070d18;border:1px solid var(--line);border-radius:9px;padding:15px;overflow:auto;color:#d1fae5}code{font-family:Consolas,monospace}:not(pre)>code{background:#172033;color:#bae6fd;padding:2px 5px;border-radius:4px}
table{border-collapse:collapse;width:100%;margin:18px 0;background:var(--card)}th,td{border:1px solid var(--line);padding:9px 11px;text-align:left;vertical-align:top}th{background:#172033}
.diagram{display:flex;justify-content:center;gap:12px;align-items:center;flex-wrap:wrap;margin:20px 0}.diagram .box{margin:0}.arrow{color:#7dd3fc;font-size:1.3em}
.page .diagram{background:#070d18;border:1px solid var(--line);border-radius:9px;padding:15px;color:#dbeafe}
body> .wrap>main>nav{background:#101827;border:1px solid var(--line);border-radius:10px;padding:18px 22px}body> .wrap>main>nav h2{margin-top:0;border:0}body> .wrap>main>nav ol{padding-left:1.4em}
footer{color:var(--muted);padding:30px 0;font-size:.9em}


/* Architecture locale sans serveur */
.local-shell{display:grid;grid-template-columns:325px minmax(0,1fr);height:calc(100vh - 76px);overflow:hidden}
.local-shell .toc-frame,.local-shell .content-frame{width:100%;height:100%;border:0}
.local-shell .toc-frame{background:var(--nav);border-right:1px solid var(--line)}
.local-shell .content-frame{background:var(--bg)}
.toc-page nav a{display:block;color:#cbd5e1;text-decoration:none;padding:5px 9px;border-radius:6px}
.toc-page nav a:hover,.toc-page nav a.active{background:#172033;color:white}
.toc-page nav .chapter{font-weight:800;color:white;margin-top:10px}
.toc-page nav .l2{padding-left:22px;}
.toc-page nav .l3{padding-left:40px;}



/* Illustrations du cours
   Les images ne dépassent jamais la largeur de leur conteneur
   et conservent automatiquement leurs proportions. */
img,
.illustration img {
  max-width: 100%;
  height: auto;
}

.illustration {
  max-width: 100%;
  margin: 24px auto;
  text-align: center;
}

.illustration img {
  display: block;
  margin: 0 auto;
}

/* Accueil des modules */
.modules-frame{display:block;width:100%;height:100vh;border:0}
.modules-home{max-width:880px;margin:0 auto;padding:64px 28px}
.modules-home h1{margin:8px 0}.modules-home .sub{font-size:1rem;margin-bottom:32px}
.module-list{display:grid;gap:14px}.module-card{display:flex;gap:20px;align-items:center;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:22px;color:var(--txt);text-decoration:none}
.module-card:hover,.module-card:focus-visible{border-color:var(--blue);background:#172033}
.module-card strong,.module-card small{display:block}.module-card small{color:var(--muted);margin-top:4px}
.module-card>span:last-child{margin-left:auto;color:var(--blue)}.module-number{font-weight:800;color:var(--blue);font-size:1.3rem}
.all-modules{display:inline-block;margin-bottom:18px;color:var(--blue);text-decoration:none}
.back-modules{position:absolute;right:16px;top:10px;z-index:1;font-size:.8rem;color:var(--blue);text-decoration:none}

/* En-tête du module */
.module-header{height:76px;padding:12px 24px;display:flex;align-items:center;justify-content:space-between;gap:18px;background:var(--nav);border-bottom:1px solid var(--line)}
.module-identity{display:flex;align-items:center;gap:13px;min-width:0}.module-logo{width:48px;height:48px;flex:none}
.module-eyebrow{display:block;color:var(--blue);font-size:.75rem;font-weight:700;line-height:1.3}
.module-header h1{font-size:1.25rem;line-height:1.25;margin:2px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.modules-button{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:9px 15px;border:1px solid var(--line);border-radius:8px;color:var(--txt);text-decoration:none;font-size:.9rem;font-weight:600}
.modules-button:hover,.modules-button:focus-visible{border-color:var(--blue);background:#172033}


.osi-figure{max-width:760px;margin:20px 0}.osi-figure img{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:12px}.osi-figure figcaption{color:var(--muted);font-size:.85rem;margin-top:8px}

/* Sommaire visuel sur l’accueil des modules */
.module-summary a{color:var(--blue);text-decoration:none}.module-summary a:hover,.module-summary a:focus-visible{text-decoration:underline}.module-summary td:first-child{width:38%}.module-summary tbody tr:hover{background:#172033}


/* Navigation accordéon harmonisée */
.toc-page{padding:14px 10px!important;overflow-y:auto}
.toc-page #nav{display:flex;flex-direction:column;gap:6px}
.toc-page .toc-module-title{display:block!important;font-weight:800!important;color:#fff!important;padding:9px 10px!important;margin:0 0 4px!important;border-radius:8px;background:rgba(255,255,255,.06)}
.toc-page details{margin:0}
.toc-page summary{cursor:pointer;list-style:none;user-select:none}
.toc-page summary::-webkit-details-marker{display:none}
.toc-page .toc-section>summary{position:relative;font-weight:800;color:#fff;padding:9px 30px 9px 10px;border-radius:8px;background:rgba(255,255,255,.045)}
.toc-page .toc-section>summary::after,.toc-page .toc-chapter>summary::after{content:"›";position:absolute;right:10px;top:50%;transform:translateY(-50%);transition:transform .15s ease;color:#94a3b8}
.toc-page .toc-section[open]>summary::after,.toc-page .toc-chapter[open]>summary::after{transform:translateY(-50%) rotate(90deg)}
.toc-page .toc-items{padding:4px 0 5px 8px}
.toc-page .toc-item{font-size:.91rem}
.toc-page .toc-chapter{margin:3px 0}
.toc-page .toc-chapter>summary{position:relative;padding-right:28px;border-radius:7px}
.toc-page .toc-chapter>summary:hover{background:#172033}
.toc-page .toc-chapter-link{font-weight:700!important;color:#e2e8f0!important;margin:0!important;padding:7px 9px!important}
.toc-page .toc-chapter-items{padding:2px 0 5px}
.toc-page .toc-chapter-items .l2{padding-left:22px}
.toc-page .toc-chapter-items .l3{padding-left:38px}
.toc-page nav a.active{background:#263449!important;color:#fff!important;box-shadow:inset 3px 0 0 #38bdf8}
.toc-page .toc-section:has(a.active)>summary,.toc-page .toc-chapter:has(a.active)>summary{background:#172033;color:#fff}

/* Recherche globale et organisation par sprint */
.search-box{position:relative;margin:22px 0 30px;max-width:900px}
.search-controls{display:grid;grid-template-columns:minmax(0,1fr) 190px;gap:10px}
.search-controls input,.search-controls select{width:100%;box-sizing:border-box;padding:12px 14px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;font:inherit;color:#0f172a}
.search-controls input:focus,.search-controls select:focus{outline:2px solid #38bdf8;outline-offset:1px}
.search-results{position:absolute;z-index:20;left:0;right:0;top:calc(100% + 6px);background:#fff;border:1px solid #cbd5e1;border-radius:10px;box-shadow:0 12px 30px rgba(15,23,42,.16);max-height:430px;overflow:auto}
.search-result{display:block;padding:10px 14px;text-decoration:none;color:#0f172a;border-bottom:1px solid #e2e8f0}
.search-result:last-child{border-bottom:0}.search-result:hover{background:#f1f5f9}.search-result strong{display:block}.search-result small{display:block;margin-top:3px;color:#64748b}.search-empty{padding:12px 14px;color:#64748b}
.sprint-section{margin:12px 0 34px}.sprint-section>h2{margin-bottom:12px}


/* Repère permanent : page/chapitre actuellement affiché */
.current-page{min-width:0;flex:1;padding-left:18px;border-left:1px solid var(--line);display:flex;flex-direction:column;justify-content:center}
.current-page-label{color:var(--muted);font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.current-page-title{display:block;max-width:52vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.95rem;color:var(--text)}


/* v1.3.0-transform-to-pwa : deux modes, un seul seuil */
html,body{max-width:100%;overflow-wrap:anywhere}
.page,.wrap,.modules-home{min-width:0;max-width:100%}
.page,.wrap{max-width:1050px}
.modules-home{max-width:880px}
pre{max-width:100%;white-space:pre;overflow-x:auto;overflow-wrap:normal}
pre code{overflow-wrap:normal}
:not(pre)>code{overflow-wrap:anywhere}
.table-scroll{max-width:100%;overflow-x:auto;margin:18px 0;overscroll-behavior-x:contain}
.table-scroll table{margin:0;min-width:560px;overflow-wrap:normal}
.table-scroll:focus-visible{outline:2px solid var(--blue)}
img{max-width:100%;height:auto}
.local-shell{height:calc(100vh - 76px);height:calc(100dvh - 76px);position:relative}
.modules-frame{height:100vh;height:100dvh}
.mobile-menu,.menu-backdrop{display:none}
button{font:inherit;cursor:pointer}
:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
@media(max-width:1024px){
 .page,.wrap{padding:24px 16px 56px}
 .modules-home{padding:28px 16px}
 h1{font-size:1.75rem}h2{font-size:1.4rem;margin-top:32px}h3{font-size:1.15rem}
 .module-header{padding:8px 12px;gap:8px;height:110px;flex-wrap:wrap}
 .module-logo{width:34px;height:34px}
 .module-identity{flex:1;overflow:hidden}
 .module-header h1{font-size:1rem}
 .modules-button{font-size:.8rem;padding:10px 8px;min-height:44px}
 .current-page{order:3;flex:1 1 65%;padding:0;border:0}
 .current-page-label{display:none}.current-page-title{max-width:100%;font-size:.86rem}
 .mobile-menu{display:block;order:4;background:var(--card);color:var(--txt);border:1px solid var(--line);border-radius:8px;padding:8px 12px;min-height:44px}
 .local-shell{display:block;height:calc(100vh - 110px);height:calc(100dvh - 110px)}
 .local-shell .toc-frame{display:none;position:absolute;left:0;top:0;z-index:5;width:min(88%,360px);height:100%;box-shadow:10px 0 28px #0008}
 .local-shell.menu-open .toc-frame{display:block}
 .local-shell.menu-open .menu-backdrop{display:block;position:absolute;inset:0;z-index:4;background:#0008;border:0;width:100%;height:100%}
 .toc-page nav a,.toc-page summary{min-height:44px}
 .search-controls{grid-template-columns:1fr}
 .module-card{padding:16px;gap:12px;align-items:flex-start}
 .module-card>span{min-width:0}
 .box,.note,.warn,.correction{padding:12px}
 table.module-summary{min-width:0;display:block}
 .module-summary thead{display:none}
 .module-summary tbody,.module-summary tr,.module-summary td{display:block;width:100%!important}
 .module-summary tr{margin:12px 0;border:1px solid var(--line);border-radius:8px;overflow:hidden}
 .module-summary td{border:0}.module-summary td+td{border-top:1px solid var(--line)}
 .shell{display:block}.shell aside{max-width:100%}
 footer{padding:20px 0}
}

/* Itération 2 : numéros indivisibles et commandes accessibles */
.module-number{white-space:nowrap;overflow-wrap:normal;flex:0 0 auto}
.module-card>span:last-child{flex:0 0 auto}
.module-card>span:nth-child(2){flex:1;min-width:0}
@media(max-width:1024px){
 .module-header{display:grid;grid-template-columns:44px minmax(0,1fr) auto;grid-template-rows:48px 24px;gap:4px 8px;height:92px;padding:8px 12px}
 .mobile-menu{order:initial;grid-column:1;grid-row:1;padding:0;width:44px;height:44px;font-size:1.5rem;line-height:1}
 .module-identity{grid-column:2;grid-row:1;gap:0}
 .module-identity>div{min-width:0;width:100%}
 .module-logo{display:none}
 .modules-button{grid-column:3;grid-row:1;font-size:.75rem;padding:8px 6px;white-space:nowrap}
 .current-page{grid-column:1 / -1;grid-row:2;min-width:0}
 .local-shell{height:calc(100vh - 92px);height:calc(100dvh - 92px)}
}

/* Retour aux modules : icône seule toujours à droite, quelle que soit l’orientation */
.module-header .module-identity{order:0}
.module-header .current-page{order:1}
.module-header .modules-button{order:2;margin-left:auto;padding:0;width:44px;height:44px;flex:0 0 44px}
@media(max-width:1024px){
 .module-header{grid-template-columns:44px minmax(0,1fr) 44px}
 .module-header .modules-button{grid-column:3;grid-row:1;justify-self:end}
}

/* En-tête mobile compact : repère module puis chapitre, deux lignes seulement */
@media(max-width:1024px){
 .module-header{height:76px;grid-template-rows:24px 28px;gap:2px 8px;padding:10px 12px}
 .module-header .mobile-menu{grid-column:1;grid-row:1 / 3;align-self:center}
 .module-header .module-identity{grid-column:2;grid-row:1;align-self:end}
 .module-header .module-identity h1{display:none}
 .module-header .module-eyebrow{font-size:.8rem;line-height:1.3}
 .module-header .current-page{grid-column:2;grid-row:2;align-self:start;order:1}
 .module-header .current-page-title{font-size:.95rem;line-height:1.4;max-width:100%}
 .module-header .modules-button{grid-column:3;grid-row:1 / 3;align-self:center}
 .local-shell{height:calc(100vh - 76px);height:calc(100dvh - 76px)}
}

@media(max-width:1024px){.module-header .module-identity h1{display:none!important}}

/* Shared fragments */
.from-fragment{margin-left:22px;padding-left:18px;border-left:1px solid var(--line)}
@media(max-width:700px){.from-fragment{margin-left:8px;padding-left:10px}}

/* v1.4.0-alpha — Sprints repliables de la page Modules */
.sprint-section>summary{
  position:relative;cursor:pointer;list-style:none;user-select:none;
  margin-bottom:12px;padding:9px 38px 9px 10px;border-radius:8px;
  font-size:1.5em;font-weight:800;color:#fff;background:rgba(255,255,255,.045);
}
.sprint-section>summary::-webkit-details-marker{display:none}
.sprint-section>summary::after{
  content:"›";position:absolute;right:12px;top:50%;
  transform:translateY(-50%);transition:transform .15s ease;color:#94a3b8;
}
.sprint-section[open]>summary::after{transform:translateY(-50%) rotate(90deg)}
.sprint-section>summary:hover{background:#172033}

.content-toc,.content-toc ul{list-style:none;margin:0;padding-left:0}
.content-toc ul{list-style:none;margin:0;padding-left:1.5rem}
.content-toc li{list-style:none;margin:0;padding:0}
.content-toc li::marker{content:""}

/* v1.4.0-alpha — sommaires compacts : aucune puce, aucune rupture verticale parent/enfant. */
.content-toc,
.content-toc ul,
.toc-section ul,
.toc-chapter ul {
  list-style: none;
  margin-top: 0;
  margin-bottom: 0;
}
.content-toc {
  padding-left: 0;
}
.content-toc ul,
.toc-section ul,
.toc-chapter ul {
  padding-top: 0;
  padding-bottom: 0;
}
.content-toc li,
.toc-section li,
.toc-chapter li {
  margin-top: 0;
  margin-bottom: 0;
}

.toc-label{display:block;margin:0;padding:0;text-decoration:none}.toc-chapter-items .l3{padding-left:1.5rem}

/* Design system — sommaires : même taille typographique pour tous les niveaux.
   La hiérarchie reste portée uniquement par l'indentation. */
.toc-page nav .l2,
.toc-page nav .l3,
.toc-page nav .l4,
.toc-page nav .l5,
.toc-page nav .l6,
.toc-page nav .l7,
.toc-page nav .l8,
.toc-page nav .l9 {
  font-size: .91rem;
}

/* Design system — internal TOC indentation */
.content-toc > .l2 { padding-left: 0; }
.content-toc > .l3 { padding-left: 1.5rem; }
.content-toc > .l4 { padding-left: 3rem; }
.content-toc > .l5 { padding-left: 4.5rem; }
.content-toc > .l6 { padding-left: 6rem; }
.content-toc > .l2,
.content-toc > .l3,
.content-toc > .l4,
.content-toc > .l5,
.content-toc > .l6 {
  font-size: .91rem;
  list-style: none;
}

/* Action de téléchargement — design system */
.download-action{margin:18px 0 28px}
.download-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:11px 16px;border:1px solid var(--blue);border-radius:8px;background:#172033;color:#e5e7eb!important;text-decoration:none;font-weight:800}
.download-button:hover,.download-button:focus-visible{background:#1e293b;border-color:#7dd3fc;text-decoration:none}

/* Illustrations : largeur fluide et fond blanc ; chaque image fixe son max-width. */
.course-image { display: block; width: 100%; height: auto; margin-inline: auto; background: #fff; padding: 1rem; border-radius: .5rem; }

/* Schéma du chapitre 5.1 */
.architecture-diagram { margin: 1.5rem 0; max-width: 100%; }
.architecture-diagram svg { display: block; width: 100%; height: auto; border-radius: 12px; }
.architecture-diagram figcaption { margin-top: .65rem; color: #64748b; font-size: .92rem; line-height: 1.5; }
  .docker-check-details{margin-top:12px}.docker-check-details summary{cursor:pointer;font-weight:600;color:var(--blue);padding:7px 0}.docker-check-details pre{margin-bottom:0}
  
figure.schema{margin:22px 0;text-align:center}figure.schema svg{width:100%;max-width:850px;height:auto;border:1px solid var(--line);border-radius:12px;background:#091425}figure.schema figcaption{font-size:.85rem;color:var(--muted);font-style:italic;margin-top:8px}.note details summary{cursor:pointer;color:var(--blue)}
.recap-separator{border:0;border-top:1px solid var(--line);margin:22px 0}
.startup-table{table-layout:auto}
.startup-table th:first-child,.startup-table td:first-child{width:1%;white-space:nowrap}
.startup-table th:nth-child(2),.startup-table td:nth-child(2){width:auto;overflow-wrap:anywhere}

/* Illustrations partagées : même rendu que les SVG intégrés. */
.docker-course .course-svg{display:block;width:100%;height:auto;max-width:100%;margin-inline:auto;background:transparent}
.docker-course figure.schema .course-svg{max-width:850px;border:1px solid var(--line);border-radius:12px;background:#091425}
.docker-course .risk-graph-object{display:block;width:100%;min-width:800px;aspect-ratio:960/690;border:0}

/* Keep callout icons inline with their sentence and use color emoji fonts. */
.note .callout-icon,.warn .callout-icon{display:inline;font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;font-style:normal;filter:none}
.note>p:first-child,.warn>p:first-child{margin-top:0}
