/* Pages documentaires générées au build (/methodology, /sources, et /fr/…).
   Complète privacy.css, dont elles reprennent l'habillage (tokens, topbar, sections) : ce
   fichier n'ajoute que ce qu'un document chiffré demande en plus, des tableaux et une
   navigation. Externe pour la même raison que privacy.css : la CSP `style-src 'self'`. */

.doc main,
.doc .page-header,
.doc footer {
  max-width: 980px;
}

.doc-nav {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.doc-nav-link {
  padding: 0.3rem 0.75rem;
  border-radius: var(--r-pill);
  color: var(--ink-dim);
  font-size: 0.85rem;
  font-weight: 600;
}
.doc-nav-link:hover {
  color: var(--ink);
  text-decoration: none;
}
.doc-nav-link.is-current {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline);
}
.doc-lang {
  font-size: 0.85rem;
  font-weight: 600;
}

/* privacy.css coche chaque puce (liste d'engagements) ; ici ce sont des listes ordinaires. */
.doc main section ul,
.doc main section ol {
  display: block;
  padding-left: 1.3rem;
  margin: 0.6rem 0;
}
.doc main section ul {
  list-style: disc;
}
.doc main section ol {
  list-style: decimal;
}
.doc main section li {
  padding-left: 0.2rem;
  margin: 0.35rem 0;
}
.doc main section li::before {
  content: none;
}

.doc h3 {
  font-size: 1rem;
  margin: 1.6rem 0 0.4rem;
}
.doc code {
  font-size: 0.86em;
  padding: 0.05rem 0.3rem;
  border-radius: 0.3rem;
  background: rgba(255, 255, 255, 0.06);
  overflow-wrap: anywhere;
}

/* Tableaux : défilement horizontal dans leur propre boîte, jamais celui de la page. */
.table-scroll {
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  line-height: 1.45;
}
.doc caption {
  caption-side: top;
  text-align: left;
  padding: 0.6rem 0.8rem;
  color: var(--ink-dim);
  font-size: 0.82rem;
}
.doc th,
.doc td {
  padding: 0.4rem 0.8rem;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--hairline);
}
.doc thead th {
  color: var(--ink-faint);
  font-weight: 600;
  white-space: nowrap;
}
.doc tbody th {
  font-weight: 600;
  white-space: nowrap;
}
.doc td {
  color: var(--ink-dim);
}
.doc .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .doc-nav {
    order: 3;
    width: 100%;
  }
}

/* Rapport complet par source : replié par défaut, un tableau par source. */
.doc-details {
  margin: 0.6rem 0;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 0 0.8rem;
}
.doc-details summary {
  cursor: pointer;
  padding: 0.6rem 0;
  font-weight: 600;
  color: var(--ink);
}
.doc-details[open] summary {
  border-bottom: 1px solid var(--hairline);
}

/* Une longue URL dans le texte ne doit jamais élargir la page sur mobile. */
.doc main a {
  overflow-wrap: anywhere;
}
.table-scroll:focus-visible {
  outline: 2px solid rgb(var(--accent));
  outline-offset: 2px;
}
