/* Documentation d'utilisation — page publique, statique, sans JavaScript.
   Elle réutilise `style.css` (variables, police, couleurs) et n'ajoute que la
   mise en page « manuel » : bandeau, sommaire, sections, encadrés. */

.doc-body {
  background: #f4f2ef;
  color: var(--ink);
}

/* ─────────────────────────────── bandeau ─────────────────────────────── */

.doc-top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 18px;
  background: var(--main); color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}

.doc-brand {
  display: flex; align-items: center; gap: 8px;
  color: #fff; text-decoration: none; font-size: 21px; letter-spacing: 1px;
}
.doc-brand svg { width: 22px; height: 22px; stroke-width: 3; }
.doc-top-title {
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase; opacity: .85;
}
.doc-top-nav {
  margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px;
}
.doc-top-nav a {
  color: #fff; text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .55);
}
.doc-top-nav a:hover, .doc-top-nav a:focus-visible { border-bottom-color: #fff; }

/* ─────────────────────────────── contenu ─────────────────────────────── */

.doc { max-width: 880px; margin: 0 auto; padding: 26px 18px 40px; }

.doc-lead { margin: 0 0 22px; font-size: 15px; line-height: 1.65; color: #333; }

.doc section { margin-top: 38px; scroll-margin-top: 64px; }

.doc h2 {
  margin: 0 0 12px; font-size: 23px; font-weight: 400;
  padding-bottom: 6px; border-bottom: 2px solid var(--main);
}
/* Numéro de section : une pastille, pas un titre. */
.doc h2 .num {
  display: inline-block; min-width: 26px; margin-right: 8px;
  padding: 1px 6px; border-radius: 3px; vertical-align: 3px;
  font-size: 14px; text-align: center; color: #fff; background: var(--main);
}

.doc h3 { margin: 22px 0 6px; font-size: 16px; font-weight: 700; }

.doc p { margin: 0 0 10px; font-size: 15px; line-height: 1.65; }

/* `style.css` remet les listes à zéro pour l'application : ici on veut des
   puces et des numéros classiques. */
.doc ul, .doc ol { margin: 6px 0 12px; padding-left: 22px; }
.doc ul { list-style: disc; }
.doc ol { list-style: decimal; }
.doc li { margin: 4px 0; font-size: 15px; line-height: 1.6; }
.doc li > ul, .doc li > ol { margin: 4px 0; }

.doc code {
  padding: 1px 5px; border-radius: 3px; background: #ece8e2; font-size: .92em;
}
.doc kbd {
  display: inline-block; padding: 1px 6px;
  border: 1px solid #cfcac2; border-bottom-width: 2px; border-radius: 3px;
  background: #fff; font-size: .85em; white-space: nowrap;
}
.doc strong { font-weight: 700; }
.doc a { color: var(--blue); }

/* ─────────────────────────── sommaire (TOC) ───────────────────────────
   Après `.doc h2` : même spécificité, donc l'ordre du fichier décide. */

.doc-toc {
  padding: 14px 18px 16px; border: 1px solid #e6e1da; border-radius: 4px;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.doc-toc h2 {
  margin: 0 0 8px; padding: 0; border: 0;
  font-size: 12px; font-weight: 400; letter-spacing: .8px;
  text-transform: uppercase; color: var(--dim);
}
.doc-toc ol {
  margin: 0; padding-left: 20px; list-style: decimal;
  columns: 2; column-gap: 28px;
}
.doc-toc li { margin: 0; font-size: 14px; line-height: 1.8; break-inside: avoid; }
.doc-toc a { color: var(--blue); text-decoration: none; }
.doc-toc a:hover, .doc-toc a:focus-visible { text-decoration: underline; }

/* ─────────────────────────────── tableaux ───────────────────────────── */

.doc table {
  width: 100%; margin: 8px 0 16px; border-collapse: collapse;
  font-size: 14px; background: #fff;
  border: 1px solid #e6e1da; border-radius: 4px; overflow: hidden;
}
.doc th, .doc td {
  padding: 8px 10px; text-align: left; vertical-align: top;
  border-bottom: 1px solid #e6e1da; line-height: 1.5;
}
.doc th { background: #faf8f5; font-weight: 700; }
.doc tbody tr:last-child td { border-bottom: 0; }

/* ─────────────────────────────── encadrés ───────────────────────────── */

.doc-note, .doc-warn {
  margin: 12px 0; padding: 10px 14px; border-radius: 2px;
  border-left: 4px solid var(--blue); background: #eef3f7;
}
.doc-warn { border-left-color: #c0392b; background: #fdecea; }
.doc-note p:last-child, .doc-warn p:last-child { margin-bottom: 0; }

/* ─────────────────────────────── captures ───────────────────────────── */

.doc-figure { margin: 16px 0 20px; }
.doc-figure img {
  display: block; width: 100%; height: auto;
  border: 1px solid #ddd7cf; border-radius: 4px; background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}
.doc-figure figcaption {
  margin-top: 6px; font-size: 12.5px; line-height: 1.5; color: #777;
}
/* Capture de téléphone : image à sa taille (320 px), centrée ; la légende
   reste pleine largeur pour ne pas se replier en colonne étroite. */
.doc-figure-phone img {
  width: 320px; max-width: 100%; margin-left: auto; margin-right: auto;
}
.doc-figure-phone figcaption { text-align: center; }

/* ─────────────────────────────── pied ───────────────────────────────── */

.doc-back { margin-top: 34px; }
.doc-foot {
  max-width: 880px; margin: 0 auto 40px; padding: 0 18px;
  font-size: 12px; line-height: 1.5; color: #777;
}

/* ───────────────────────────── téléphone ─────────────────────────────── */

@media (max-width: 620px) {
  .doc-top { position: static; }
  .doc-toc ol { columns: 1; }
  .doc h2 { font-size: 20px; }
  .doc section { scroll-margin-top: 0; }
  .doc table, .doc th, .doc td { font-size: 13px; }
}
