/* Documentation publiée (manuel public du web et documentation de l'équipe dans le back-office).
   Repose sur les jetons de web/css/app.css ; mise en page de lecture : sommaire collant, colonne de texte confortable. */

.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
.doc-toc { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow-y: auto; font-size: 13.5px; }
.doc-toc-toggle { display: none; }
.doc-toc ol { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 2px solid var(--line); display: grid; gap: 2px; }
.doc-toc li.depth-1 { padding-left: 12px; font-size: 13px; }
.doc-toc a { display: block; padding: 4px 8px; border-radius: 8px; color: var(--muted); font-weight: 600; }
.doc-toc a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }

.doc-body { max-width: 78ch; font-size: 15.5px; line-height: 1.7; overflow-wrap: anywhere; }
.doc-body > :first-child { margin-top: 0; }
.doc-body h1 { font-size: clamp(28px, 4vw, 38px); margin: 0 0 18px; }
.doc-body h2 { font-size: 23px; margin: 40px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); scroll-margin-top: 84px; }
.doc-body h3 { font-size: 18px; margin: 28px 0 8px; scroll-margin-top: 84px; }
.doc-body h4 { font-size: 15.5px; margin: 22px 0 6px; }
.doc-body p, .doc-body ul, .doc-body ol { margin: 0 0 14px; }
.doc-body ul, .doc-body ol { padding-left: 1.3rem; }
.doc-body li + li { margin-top: 4px; }
.doc-body a { text-decoration: underline; text-underline-offset: 3px; }
.doc-body code { font: 600 .88em ui-monospace, monospace; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); }
.doc-body pre { padding: 14px 16px; border-radius: 14px; background: var(--surface-2); overflow-x: auto; font-size: 13.5px; line-height: 1.5; }
.doc-body pre code { padding: 0; background: none; font-weight: 500; }
.doc-body blockquote { margin: 0 0 14px; padding: 10px 16px; border-left: 4px solid var(--brand); background: var(--brand-soft); border-radius: 0 12px 12px 0; }
.doc-body table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14px; line-height: 1.5; display: block; overflow-x: auto; }
.doc-body th { text-align: left; background: var(--surface-2); font-weight: 700; }
.doc-body th, .doc-body td { padding: 8px 10px; border: 1px solid var(--line); vertical-align: top; }
.doc-note { padding: 10px 14px; border-radius: 12px; background: var(--sun-soft); color: var(--warn); font-weight: 600; font-size: 14px; }

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .doc-toc { position: static; max-height: none; }
  .doc-toc-toggle { display: inline-flex; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 700 14px var(--font-body);
    padding: 9px 14px; border-radius: 12px; cursor: pointer; }
  .doc-toc ol { display: none; margin-top: 10px; }
  .doc-toc ol.open { display: grid; }
}
