/*
 * docs.css : page /docs, dans la charte « Le Tatoo » (css/tatoo.css).
 *
 * Une doc se lit, elle ne s'opère pas : colonne de lecture sur papier, titres
 * Unbounded serrés, filets (3px en encre en haut d'un groupe, 1px entre les
 * articles), jamais de cartes. Le sommaire est l'écran LCD du pager : l'entrée
 * courante s'y affiche en vidéo inverse. Le tableau des réglages par défaut
 * reprend le tableau des permissions de la landing (bleu nuit, police matricielle
 * pour ce que l'appareil « affiche »).
 */

.docs-hero { padding-bottom: 56px; }
.docs-hero .page-lede { max-width: 38em; }

.docs { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 72px; align-items: start; padding: 56px 0 104px; }

/* Sommaire : écran LCD collant */
.docs-nav { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; overscroll-behavior: contain; background: var(--lcd); color: var(--lcd-ink); border-radius: 18px; padding: 8px 18px 14px; scrollbar-width: thin; scrollbar-color: var(--lcd-ink) transparent; }
.docs-nav summary { list-style: none; display: none; gap: 12px; cursor: pointer; padding: 12px 0; font-family: var(--display); font-weight: 700; font-size: 15px; }
.docs-nav summary::-webkit-details-marker { display: none; }
.docs-nav-group { padding: 10px 0 4px; }
.docs-nav-group + .docs-nav-group { border-top: 1px solid var(--lcd-off); }
.docs-nav-label { margin: 0 0 4px; font-family: var(--dot); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.docs-nav-label a { color: inherit; text-decoration: none; }
.docs-nav-label a:hover { text-decoration: underline; text-underline-offset: 4px; }
.docs-nav ul { list-style: none; }
.docs-nav li a { display: block; padding: 6px 10px; margin-inline: -10px; border-radius: 4px; color: var(--lcd-ink); font-size: 14px; font-weight: 600; line-height: 1.35; text-decoration: none; transition: background-color .15s ease-out, color .15s ease-out; }
.docs-nav li a:hover { text-decoration: underline; text-underline-offset: 4px; }
.docs-nav li a[aria-current="location"] { background: var(--lcd-ink); color: var(--lcd); text-decoration: none; }
.docs-nav :where(a):focus-visible { outline-color: var(--lcd-ink); outline-offset: 1px; }
/* Avec le script : seul le groupe en cours déplie ses entrées. */
.docs-nav.is-spy .docs-nav-group:not(.is-current) ul { display: none; }

/* Corps */
.docs-body { min-width: 0; max-width: 760px; }
.docs-body .article-meta { margin-bottom: 8px; }
.docs-group { scroll-margin-top: 24px; margin-top: 88px; border-top: 3px solid var(--ink); padding-top: 28px; }
.docs-group:first-of-type { margin-top: 32px; }
.docs-group > h2 { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; margin-bottom: 8px; }
.docs-item { scroll-margin-top: 24px; padding: 28px 0; border-bottom: 1px solid var(--rule); }
.docs-item:last-child { border-bottom: 0; }
.docs-item h3 { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 10px; text-wrap: balance; }
.docs-item p { font-size: 17px; line-height: 1.65; max-width: 62ch; }
.docs-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; }
.docs-links a { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 14px; line-height: 1.3; color: var(--shell-deep); text-underline-offset: 4px; }
.docs-links a:hover { color: var(--ink); }
.docs-links svg { width: 16px; height: 16px; flex-shrink: 0; }
:dir(rtl) .docs-links svg { transform: scaleX(-1); }

/* Tableau des réglages par défaut : bleu nuit, état lu à la forme et au libellé */
.docs-table { margin-top: 20px; background: var(--case); color: var(--white); border-radius: 24px; padding: 8px 28px 12px; }
.docs-table table { width: 100%; border-collapse: collapse; }
.docs-table caption { text-align: start; font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.25; padding: 22px 0 10px; }
.docs-table th, .docs-table td { text-align: start; vertical-align: baseline; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, 0.28); }
.docs-table thead th { border-top: 0; font-family: var(--dot); font-weight: 400; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.86); padding-top: 4px; }
.docs-table tbody th { font-family: var(--body); font-weight: 500; font-size: 16px; line-height: 1.4; color: rgba(255, 255, 255, 0.92); padding-inline-end: 16px; }
.docs-table td { width: 38%; font-family: var(--dot); font-size: 16px; letter-spacing: 0.04em; white-space: nowrap; }
.docs-state { display: inline-flex; align-items: center; gap: 10px; }
.docs-state::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--lcd); flex-shrink: 0; }
.docs-state.is-on { color: var(--lcd); }
.docs-state.is-on::before { background: var(--lcd); }
.docs-state.is-off { color: rgba(255, 255, 255, 0.86); }
.docs-state.is-off::before { border-color: rgba(255, 255, 255, 0.86); }
.docs-table tr.is-first-off th, .docs-table tr.is-first-off td { border-top: 2px solid rgba(255, 255, 255, 0.5); }
.docs-table :where(a):focus-visible { outline-color: var(--lcd); }

@media (max-width: 900px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 32px; }
  .docs-nav { position: static; max-height: none; overflow: visible; padding: 4px 18px 8px; }
  .docs-nav summary { display: flex; align-items: center; justify-content: space-between; }
  .docs-nav summary svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform .15s ease-out; }
  .docs-nav[open] summary svg { transform: rotate(180deg); }
  .docs-nav[open] summary { border-bottom: 2px solid var(--lcd-off); margin-bottom: 4px; }
  .docs-nav.is-spy .docs-nav-group:not(.is-current) ul { display: block; }
  .docs-group { margin-top: 64px; }
}
@media (max-width: 560px) {
  .docs-table { padding-inline: 18px; border-radius: 20px; }
  .docs-table td { white-space: normal; width: 42%; font-size: 15px; }
  .docs-item h3 { font-size: 18px; }
  .docs-item p { font-size: 16.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .docs-nav li a, .docs-nav summary svg { transition: none; }
}
