/* Guide Angéloz Mode : noir et blanc, sobre, lisible. */
:root {
  --ink: #111;
  --muted: #6b6b6b;
  --hairline: #e6e3de;
  --paper: #fff;
  --wash: #faf9f7;
  --accent: #111;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

/* ---- Structure ---- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  flex: 0 0 264px;
  border-inline-end: 1px solid var(--hairline);
  background: var(--wash);
  padding: 28px 22px 40px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.content {
  flex: 1;
  min-width: 0;
  padding: 44px clamp(24px, 6vw, 88px) 120px;
}
.content-inner { max-width: 740px; }

/* ---- Sidebar ---- */
.brand {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.01em;
  margin: 0 0 2px;
}
.brand a { color: inherit; text-decoration: none; }
.brand-sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 28px;
}
.nav-group { margin-bottom: 6px; }
.nav a {
  display: block;
  padding: 7px 10px;
  margin: 1px -10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  border-radius: 6px;
}
.nav a:hover { background: #f0ede8; }
.nav a.active { background: var(--ink); color: #fff; }
.nav-sep {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 18px 0;
}
.nav-foot { font-size: 12px; color: var(--muted); margin-top: 26px; line-height: 1.5; }
.nav-foot a { color: inherit; }

/* ---- Typographie ---- */
h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 38px);
  line-height: 1.15;
  margin: 0 0 10px;
  text-wrap: balance;
}
.lede { font-size: 17.5px; color: var(--muted); margin: 0 0 40px; max-width: 60ch; }
h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 25px;
  line-height: 1.25;
  margin: 56px 0 14px;
  padding-top: 26px;
  border-top: 1px solid var(--hairline);
}
h3 { font-size: 17px; font-weight: 600; margin: 32px 0 8px; }
h4 { font-size: 15px; font-weight: 600; margin: 24px 0 6px; }
p { margin: 0 0 14px; max-width: 70ch; }
ul, ol { margin: 0 0 16px; padding-inline-start: 22px; }
li { margin-bottom: 6px; max-width: 65ch; }
li > ul, li > ol { margin-top: 6px; }
a { color: var(--ink); text-underline-offset: 3px; }
strong { font-weight: 600; }

/* ---- Composants ---- */
.path {
  font-family: var(--mono);
  font-size: 13px;
  background: #f2f0ec;
  border: 1px solid var(--hairline);
  border-radius: 5px;
  padding: 1px 7px;
  white-space: nowrap;
}
code {
  font-family: var(--mono);
  font-size: 13.5px;
  background: #f2f0ec;
  border-radius: 4px;
  padding: 1px 5px;
}
.note, .warn {
  border: 1px solid var(--hairline);
  border-inline-start: 3px solid var(--ink);
  background: var(--wash);
  padding: 14px 18px;
  margin: 18px 0 22px;
  max-width: 70ch;
  border-radius: 0 6px 6px 0;
}
.note p:last-child, .warn p:last-child { margin-bottom: 0; }
.warn { border-inline-start-color: #b3261e; }
.warn strong:first-child { color: #b3261e; }
.note-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 4px;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 18px 0 26px;
  font-size: 14.5px;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 9px 14px 9px 0;
  border-bottom: 1px solid var(--hairline);
}
th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
.table-scroll { overflow-x: auto; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 24px; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 18px 44px;
  max-width: 70ch;
}
.steps > li:before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 26px;
  height: 26px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.steps > li > strong:first-child { display: block; margin-bottom: 3px; }

.status { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.status--ok { background: #e3f1e5; color: #1a5c2a; }
.status--warn { background: #fdf3d7; color: #7a5b00; }
.status--info { background: #e4edf7; color: #1f4e79; }
.status--off { background: #eeece8; color: #555; }

.toc {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 0 0 40px;
  background: var(--wash);
  max-width: 70ch;
}
.toc-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin: 0 0 8px; }
.toc ol { margin: 0; padding-inline-start: 20px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.next {
  margin-top: 72px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: flex-end;
}
.next a {
  text-decoration: none;
  font-size: 14px;
  border: 1px solid var(--ink);
  padding: 10px 18px;
  border-radius: 6px;
}
.next a:hover { background: var(--ink); color: #fff; }

/* ---- Hub racine ---- */
.hub {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}
.hub h1 { margin-bottom: 6px; }
.hub p { color: var(--muted); }

/* ---- Mobile ---- */
@media (max-width: 900px) {
  .layout { display: block; }
  .sidebar {
    position: static;
    height: auto;
    border-inline-end: 0;
    border-bottom: 1px solid var(--hairline);
    padding: 20px 22px;
  }
  .sidebar details summary {
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    list-style: none;
  }
  .sidebar details summary:after { content: " +"; }
  .sidebar details[open] summary:after { content: " \2212"; }
  .content { padding: 30px 20px 90px; }
}
@media (min-width: 901px) {
  .sidebar details summary { display: none; }
  .sidebar details { display: contents; }
}
@media print {
  .sidebar, .next { display: none; }
  .content { padding: 0; }
}

/* ---- Figures (captures) ---- */
figure.shot {
  margin: 20px 0 28px;
  max-width: 76ch;
}
figure.shot img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--hairline);
  border-radius: 8px;
}
figure.shot figcaption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}

/* ---- Sous-chapitres dans la barre laterale ---- */
.nav-sub {
  list-style: none;
  margin: 2px 0 6px;
  padding: 0 0 0 14px;
  border-inline-start: 1px solid var(--hairline);
  margin-inline-start: 4px;
}
.nav-sub a {
  display: block;
  padding: 4px 10px;
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 5px;
}
.nav-sub a:hover { color: var(--ink); background: #f0ede8; }

/* ---- Video ---- */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 76ch;
  margin: 20px 0 28px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
