/*
 * Le style du wiki (S19, L0). Les tokens de couleur viennent de `tokens.css` (copié depuis
 * `apps/web/src/styles.css`, comme `site/public/tokens.css` — voir le rapport de L0 pour ce
 * qu'une troisième copie justifierait de factoriser). Ce fichier-ci est propre au wiki : une
 * mise en page à trois zones (en-tête, sommaire latéral + contenu, pied) que la vitrine n'a
 * pas, donc pas réutilisable depuis `site/public/site.css` tel quel.
 */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

.lien-saut {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--encre-inversee);
  padding: 0.5em 1em;
  z-index: 10;
}
.lien-saut:focus { left: 0; }

.entete { border-bottom: 1px solid var(--trait); background: var(--surface-douce); }
.entete-barre {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75em 1em;
  display: flex;
  align-items: center;
  gap: 1.25em;
  flex-wrap: wrap;
}
.marque { display: flex; align-items: center; gap: 0.5em; color: var(--encre); text-decoration: none; font-weight: 600; }
.nav-principale ul { list-style: none; display: flex; gap: 1em; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-principale a { color: var(--discret); text-decoration: none; padding: 0.25em 0; min-height: 24px; display: inline-flex; align-items: center; }
.nav-principale a[aria-current='page'] { color: var(--accent-encre); font-weight: 600; border-bottom: 2px solid var(--accent); }
.selecteur-langue { display: flex; gap: 0.5em; margin-left: auto; }
.selecteur-langue a { color: var(--discret); text-decoration: none; min-height: 24px; min-width: 24px; display: inline-flex; align-items: center; justify-content: center; }
.selecteur-langue a[aria-current='true'] { color: var(--accent-encre); font-weight: 700; }
.retour-site { color: var(--discret); text-decoration: none; font-size: 0.9em; }

.recherche-wiki { position: relative; }
.recherche-wiki input[type='search'] {
  border: 1px solid var(--trait);
  border-radius: 6px;
  padding: 0.35em 0.6em;
  background: var(--toile);
  color: var(--encre);
  min-width: 12em;
}
.resultats-recherche {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 0.25em 0 0;
  padding: 0.25em;
  list-style: none;
  background: var(--toile);
  border: 1px solid var(--trait);
  border-radius: 6px;
  box-shadow: 0 4px 12px var(--ombre);
  max-height: 60vh;
  overflow: auto;
  z-index: 20;
}
.resultats-recherche li a { display: block; padding: 0.4em 0.5em; color: var(--encre); text-decoration: none; border-radius: 4px; }
.resultats-recherche li a:hover,
.resultats-recherche li a:focus { background: var(--surface-survol); }
.resultats-recherche .extrait { display: block; color: var(--discret); font-size: 0.85em; }

.fil-ariane { max-width: 1100px; margin: 1em auto 0; padding: 0 1em; }
.fil-ariane ol { list-style: none; display: flex; gap: 0.4em; margin: 0; padding: 0; font-size: 0.9em; color: var(--discret); flex-wrap: wrap; }
.fil-ariane li:not(:last-child)::after { content: '›'; margin-left: 0.4em; }
.fil-ariane a { color: var(--discret); }
.fil-ariane [aria-current='page'] { color: var(--encre); }

.mise-en-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1em;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2em;
  align-items: start;
}
@media (max-width: 760px) {
  .mise-en-page { grid-template-columns: 1fr; }
}

.sommaire-section { font-size: 0.95em; }
.sommaire-titre { font-weight: 700; margin: 0 0 0.5em; }
.sommaire-section ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25em; }
.sommaire-section a { color: var(--discret); text-decoration: none; display: block; padding: 0.2em 0; }
.sommaire-section a[aria-current='page'] { color: var(--accent-encre); font-weight: 600; }

.contenu-page h1 { margin-top: 0; }
.contenu-page :is(h2, h3) { color: var(--encre); }
.contenu-page a { color: var(--accent-encre); }
.contenu-page code { background: var(--surface-creuse); padding: 0.1em 0.35em; border-radius: 4px; }
.contenu-page pre.bloc-code { background: var(--surface-creuse); padding: 0.75em 1em; overflow-x: auto; border-radius: 6px; }
.contenu-page table.tableau-wiki { border-collapse: collapse; width: 100%; margin: 1em 0; }
.contenu-page table.tableau-wiki th,
.contenu-page table.tableau-wiki td { border: 1px solid var(--trait); padding: 0.5em 0.6em; text-align: left; vertical-align: top; }
.contenu-page table.tableau-wiki th { background: var(--surface-douce); }
.contenu-page .contenu-a-venir { color: var(--discret); font-style: italic; }

.pied-wiki { max-width: 1100px; margin: 2em auto 1em; padding: 1em; border-top: 1px solid var(--trait); }

/* Sombre : suit la préférence système, comme `site/` — par les seuls jetons de `tokens.css`
   (la copie de l'application, gardée par `scripts/jetons-vitrine.test.ts`). Ce fichier portait
   ici son propre sombre, un brun d'avant la refonte, qui écrasait la copie : retiré au lot 5. */

