
.doc { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; padding-top: 56px; padding-bottom: 96px; align-items: start; }

.doc-sommaire { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; }
.doc-sommaire b { display: block; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--doux); margin-bottom: 12px; }
.doc-sommaire ol { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 2px; }
.doc-sommaire li { counter-increment: s; }
.doc-sommaire a { display: flex; gap: 10px; padding: 7px 10px; border-radius: 10px; text-decoration: none; color: var(--doux); font-size: .93rem; line-height: 1.35; }
.doc-sommaire a::before { content: counter(s); min-width: 1.2em; color: var(--roux); font-weight: 700; }
.doc-sommaire a:hover { background: var(--roux-voile); color: var(--texte); }
.doc-sommaire a.actif { background: var(--surface); color: var(--texte); box-shadow: var(--ombre); }
.doc-sommaire code { font-size: .85em; }

.doc-texte { max-width: 820px; font-size: 1.02rem; line-height: 1.7; }
.doc-texte h1 { margin: 0; font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1.05; letter-spacing: -.04em; font-weight: 800; }
.doc-maj { margin: 10px 0 28px; color: var(--doux); font-size: .9rem; }
.doc-maj + p { font-size: 1.15rem; color: var(--doux); }
.doc-texte h2 { margin: 64px 0 18px; padding-top: 8px; font-size: clamp(1.5rem, 2.6vw, 1.95rem); letter-spacing: -.03em; line-height: 1.2; scroll-margin-top: 96px; }
.doc-texte h3 { margin: 32px 0 12px; font-size: 1.15rem; }
.doc-texte p { margin: 0 0 16px; }
.doc-texte ul { margin: 0 0 18px; padding-left: 22px; }
.doc-texte li { margin: 6px 0; }
.doc-texte li::marker { color: var(--roux); }
.doc-texte ul.sous { margin: 6px 0 0; }
.doc-texte a { color: var(--roux-fonce); text-underline-offset: 3px; }
.doc-texte :not(pre) > code {
  font-family: var(--police-code); font-size: .86em; padding: 2px 6px; border-radius: 6px;
  background: var(--roux-voile); color: var(--texte); white-space: nowrap;
}
.doc-texte td code { white-space: normal; overflow-wrap: anywhere; }

.doc-code { margin: 0 0 22px; }
.doc-code pre { font-size: .84rem; line-height: 1.65; }

.doc-tableau { margin: 0 0 22px; overflow-x: auto; border: 1px solid var(--ligne); border-radius: 14px; background: var(--surface); }
.doc-tableau table { width: 100%; border-collapse: collapse; font-size: .93rem; line-height: 1.5; }
.doc-tableau th { text-align: left; font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--ligne-forte); white-space: nowrap; }
.doc-tableau td { padding: 11px 14px; border-bottom: 1px solid var(--ligne); vertical-align: top; }
.doc-tableau tr:last-child td { border-bottom: 0; }
.doc-tableau td:first-child { white-space: nowrap; }

@media (max-width: 900px) {
  .doc { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; }
  .doc-sommaire { position: static; max-height: none; border: 1px solid var(--ligne); border-radius: 14px; padding: 14px; background: var(--surface); }
  .doc-texte h2 { margin-top: 48px; }
  .doc-tableau td:first-child { white-space: normal; }
}
