@font-face{font-family:ElectroShackle;src:url("../asset/ElectroShackle.otf") format("opentype");font-display:swap}
body{margin:0;background:#181a1e;color:#f2f2f2;font:1rem/1.55 "Segoe UI",sans-serif}
header{background:#202328;border-bottom:1px solid #474b51}
.bar,main{width:min(1120px,calc(100% - 32px));margin:auto}
.bar,footer,.tabs{display:flex;align-items:center;gap:8px 18px;flex-wrap:wrap}
.bar{min-height:48px;justify-content:space-between}
a{color:#bfdbfe;text-decoration:none}a:hover{text-decoration:underline}
.brand{display:inline-flex;align-items:center;gap:8px;font:18px ElectroShackle,sans-serif;color:white}.brand img{width:30px;height:30px}
h1{font-size:clamp(1.55rem,3vw,2.25rem);line-height:1.15;margin:22px 0 12px}
.tabs{gap:5px;border-bottom:1px solid #484b50;padding-bottom:12px}
.tabs a,.contents a{padding:5px 10px;border-radius:7px;color:#d9d9d9}
.tabs a[aria-current]{background:#bfdbfe;color:#172335}
.layout{display:grid;grid-template-columns:180px minmax(0,1fr);gap:20px;margin-block:16px}
.contents{display:grid;align-self:start;position:sticky;top:12px;font-size:.91rem}
.contents strong{padding:6px 10px}.lesson{display:grid;gap:12px}
details{background:#23262b;border:1px solid #41454a;border-radius:12px;overflow:hidden;scroll-margin-top:12px}
summary{cursor:pointer;padding:12px 16px;color:#bfdbfe;background:#292d32}
summary h2{display:inline;font-size:1.1rem;color:#f2f2f2}
section{padding:0 16px 14px}p,dd{color:#dedfe1}p{max-width:82ch;margin:12px 0 0}
.fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(135px,100%),1fr));gap:10px;margin:16px 0}
label{display:grid;gap:4px;font-weight:600;font-size:.86rem;color:#bfdbfe}
select{width:100%;height:38px;padding:0 8px;border-radius:6px;border:1px solid #666;background:#191c20;color:white;font:inherit}
table{width:100%;border-collapse:collapse;font-size:.93rem}td,th{text-align:left;padding:7px;border-bottom:1px solid #46494e}th{color:#fef0b3;background:#2b2e32}
dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr));gap:10px}
dl div{padding:9px 12px;border-left:3px solid #ddd0fe;background:#2a2d33}dt{color:#ddd0fe;font-weight:700}dd{margin:3px 0}
figure{margin:12px 0;text-align:center}figure img{max-width:100%;max-height:260px;background:white;border-radius:8px}figcaption{color:#d9d9d9}
footer{justify-content:space-between;border-top:1px solid #484b50;padding:12px 0 20px;font-size:.9rem}
:focus-visible{outline:2px solid #bfdbfe;outline-offset:2px}
@media(max-width:720px){.layout{grid-template-columns:1fr;gap:10px}.contents{position:static;display:flex;flex-wrap:wrap;gap:3px}.contents strong{width:100%}.bar,main{width:calc(100% - 24px)}}

/* Sommaire fixe et repère de lecture */
body{--rail-width:205px;padding-left:var(--rail-width)}
body.rail-closed{--rail-width:48px}
.layout{display:block}
.reading-rail{position:fixed;inset:0 auto 0 0;width:var(--rail-width);z-index:10;padding:8px;background:#202328;border-right:1px solid #484b50;overflow:auto}
.rail-toggle{display:flex;align-items:center;gap:10px;border:0;border-radius:6px;padding:8px;background:transparent;color:#f2f2f2;cursor:pointer;font:inherit}
.rail-toggle:hover{background:#32363d}
.reading-rail .contents{position:static;display:grid;gap:4px;margin-top:12px}
.reading-rail .contents[hidden],.rail-closed .rail-label{display:none}
.contents strong{display:none}
.contents a[aria-current="location"]{border-left:3px solid #bfdbfe;background:#303f51;color:#fff;font-weight:650}
@media(max-width:720px){
  body,body.rail-closed{padding-left:0;padding-top:46px}
  .reading-rail{inset:0 auto auto 0;width:min(280px,100%);max-height:90dvh;border-bottom:1px solid #484b50;border-radius:0 0 10px 0;padding:4px 8px}
  .rail-closed .reading-rail{width:100%;border-radius:0}
  .rail-closed .rail-label{display:inline}
  .reading-rail .contents{margin:5px 0 8px}
  details{scroll-margin-top:54px}
}
