/* Documentation Weizly App — gabarit du guide du site (bandeau titre,
 * sommaire collant à droite, encarts), en trois colonnes : menu de la
 * documentation, texte, sommaire. Tokens --wz-* repris de static/nav.js
 * (palette de marque #003472, assets/brand/TOKENS.md), clair / sombre par
 * prefers-color-scheme. Aucune ressource distante : fontes locales. */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("fonts/inter-tight-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --wz-blue: #003472; --wz-blue-solid: #003472; --wz-blue-soft: #edf4fb;
  --wz-page: #f8f9fa; --wz-surface: #ffffff; --wz-soft: #eef3f1;
  --wz-ink: #343a40; --wz-muted: #69737a; --wz-line: #dde4e1; --wz-sage: #bbcdc5;
  --wz-ok: #16744d; --wz-ok-bg: #eaf6f0; --wz-warn: #935b0c; --wz-warn-bg: #fff6e8;
  --wz-shadow: rgba(52,58,64,.08);
  --wz-font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --wz-font-titres: "Inter Tight", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --wz-radius-md: 10px; --wz-radius-lg: 14px;
  --entete-h: 60px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --wz-blue: #a5caef; --wz-blue-solid: #16365a; --wz-blue-soft: #263746;
    --wz-page: #20262c; --wz-surface: #2b3137; --wz-soft: #2a3632;
    --wz-ink: #f1f3f4; --wz-muted: #c2c9ce; --wz-line: #434c53; --wz-sage: #4c6259;
    --wz-ok: #75dbae; --wz-ok-bg: #233d32; --wz-warn: #efbd68; --wz-warn-bg: #443522;
    --wz-shadow: rgba(0,0,0,.24);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--entete-h) + 16px); }
body { margin: 0; background: var(--wz-page); color: var(--wz-ink); font: 16px/1.65 var(--wz-font); }
a { color: var(--wz-blue); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--wz-blue); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.evitement { position: absolute; left: -999px; top: 0; }
.evitement:focus { left: 16px; top: 8px; background: var(--wz-surface); padding: 8px 12px; z-index: 10; }

/* grille commune : menu | texte | sommaire */
.grille {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 220px;
  gap: 0 48px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

/* barre haute */
.entete { position: sticky; top: 0; z-index: 5; background: var(--wz-surface); border-bottom: 1px solid var(--wz-line); }
.entete-dedans {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px;
  max-width: 1320px; min-height: var(--entete-h); margin: 0 auto; padding: 8px 24px;
}
.marque { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; font-family: var(--wz-font-titres); font-weight: 700; font-size: 1.15rem; }
.marque-nom { color: var(--wz-blue); }
.marque-doc { color: var(--wz-muted); }
.entete-liens { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: .95rem; }
.entete-liens a { color: var(--wz-ink); text-decoration: none; padding: 4px 0; }
.entete-liens a:hover { color: var(--wz-blue); }
.entete-assistance { font-weight: 600; color: var(--wz-blue) !important; }

/* bandeau titre (gabarit du guide) */
.bandeau { background: var(--wz-blue-solid); color: #fff; padding: 40px 0 32px; }
.bandeau-texte { grid-column: 2; max-width: 760px; }
.bandeau h1 { margin: 0 0 10px; color: #fff; font-family: var(--wz-font-titres); font-size: clamp(1.7rem, 3.4vw, 2.3rem); line-height: 1.15; letter-spacing: -.02em; }
.chapo { margin: 0; color: rgba(255,255,255,.88); font-size: 1.08rem; }
.chapo a { color: #fff; }
.surtitre { display: inline-block; margin: 0 0 12px; padding: 3px 12px; border-radius: 999px; background: rgba(255,255,255,.14); font-size: .85rem; font-weight: 600; }
.ariane ol { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0 0 14px; padding: 0; list-style: none; font-size: .88rem; }
.ariane li { color: rgba(255,255,255,.8); }
.ariane li + li::before { content: "›"; margin: 0 8px; color: rgba(255,255,255,.55); }
.ariane a { color: #fff; }

/* colonnes */
.corps-page { padding-top: 32px; padding-bottom: 48px; align-items: start; }
.menu-doc, .sommaire { position: sticky; top: calc(var(--entete-h) + 16px); max-height: calc(100vh - var(--entete-h) - 32px); overflow-y: auto; }
.menu-doc { font-size: .93rem; padding-right: 4px; }
.menu-rubrique { margin: 18px 0 6px; color: var(--wz-muted); font-size: .76rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.menu-doc .menu-rubrique:first-child, .menu-doc-replie .menu-rubrique:first-child { margin-top: 0; }
.menu-doc ul, .menu-doc-replie ul { margin: 0; padding: 0; list-style: none; }
.menu-doc a, .menu-doc-replie a { display: block; padding: 5px 10px; border-left: 2px solid var(--wz-line); color: var(--wz-ink); text-decoration: none; line-height: 1.35; }
.menu-doc a:hover, .menu-doc-replie a:hover { border-left-color: var(--wz-blue); color: var(--wz-blue); background: var(--wz-soft); }
.menu-doc a[aria-current="page"], .menu-doc-replie a[aria-current="page"] { border-left-color: var(--wz-blue); color: var(--wz-blue); font-weight: 600; background: var(--wz-blue-soft); }

.sommaire { padding: 12px 0; border: 1px solid var(--wz-line); border-radius: var(--wz-radius-lg); background: var(--wz-surface); }
.sommaire-titre { margin: 0 18px 6px; color: var(--wz-muted); font-size: .76rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.sommaire ul, .sommaire-replie ul { margin: 0; padding: 0; list-style: none; }
.sommaire a { display: block; padding: 6px 18px; border-left: 3px solid transparent; color: var(--wz-ink); font-size: .9rem; line-height: 1.35; text-decoration: none; }
.sommaire a:hover { border-left-color: var(--wz-blue); background: var(--wz-soft); color: var(--wz-blue); }

main { min-width: 0; }
.texte { max-width: 760px; }
.texte > :first-child { margin-top: 0; }
.texte h2 { margin: 2.2em 0 .5em; font-family: var(--wz-font-titres); font-size: 1.5rem; line-height: 1.2; letter-spacing: -.015em; color: var(--wz-ink); }
.texte h3 { margin: 1.6em 0 .3em; font-family: var(--wz-font-titres); font-size: 1.08rem; line-height: 1.3; }
.texte h4 { margin: 1.2em 0 .3em; font-size: 1rem; }
.texte p, .texte ul, .texte ol { margin: 0 0 1em; }
.texte li { margin: .3em 0; }
.texte ol > li::marker { font-weight: 700; color: var(--wz-blue); }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--wz-soft); padding: .1em .35em; border-radius: 4px; overflow-wrap: anywhere; }
strong { font-weight: 650; }

/* encarts */
.encart { margin: 1.2em 0 1.4em; padding: 12px 16px; border: 1px solid var(--wz-line); border-left: 4px solid var(--wz-blue); border-radius: var(--wz-radius-md); background: var(--wz-surface); }
.encart > :last-child { margin-bottom: 0; }
.encart p { margin: 0 0 .4em; }
.encart ul { margin: .2em 0 0; padding-left: 20px; }
.encart.fait-quand { border-color: transparent; border-left-color: var(--wz-ok); background: var(--wz-ok-bg); }
.encart.fait-quand strong { color: var(--wz-ok); }
.encart.attention { border-color: transparent; border-left-color: var(--wz-warn); background: var(--wz-warn-bg); }
.encart.attention strong { color: var(--wz-warn); }
.encart.note { border-color: transparent; border-left-color: var(--wz-sage); background: var(--wz-soft); }
.encart.prerequis strong:first-child { color: var(--wz-blue); }

/* tableaux */
.tableau { margin: 1em 0 1.4em; overflow-x: auto; }
.tableau table { width: 100%; border: 1px solid var(--wz-line); border-radius: var(--wz-radius-lg); border-collapse: separate; border-spacing: 0; background: var(--wz-surface); font-size: .93rem; }
.tableau th { padding: 10px 12px; border-bottom: 1px solid var(--wz-line); background: var(--wz-soft); color: var(--wz-muted); font-weight: 600; text-align: left; }
.tableau td { padding: 10px 12px; border-bottom: 1px solid var(--wz-line); vertical-align: top; }
.tableau tr:last-child td { border-bottom: 0; }

/* pages voisines et aide */
.suite { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 760px; margin: 40px 0 24px; }
.suite a { display: block; padding: 14px 16px; border: 1px solid var(--wz-line); border-radius: var(--wz-radius-md); background: var(--wz-surface); color: var(--wz-ink); text-decoration: none; font-weight: 600; }
.suite a:hover { border-color: var(--wz-blue); color: var(--wz-blue); }
.suite span { display: block; color: var(--wz-muted); font-size: .8rem; font-weight: 500; }
.suite-suiv { grid-column: 2; text-align: right; }
.encart-aide { max-width: 760px; padding: 14px 16px; border-radius: var(--wz-radius-md); background: var(--wz-blue-soft); font-size: .95rem; }
.encart-aide p { margin: 0; }

/* blocs repliés (petits écrans) */
.replie { display: none; margin: 0 0 20px; border: 1px solid var(--wz-line); border-radius: var(--wz-radius-md); background: var(--wz-surface); }
.replie summary { padding: 10px 14px; cursor: pointer; font-weight: 600; }
.replie[open] summary { border-bottom: 1px solid var(--wz-line); }
.replie > ul, .menu-doc-replie { padding: 10px 14px; }
.sommaire-replie a { display: block; padding: 5px 14px; text-decoration: none; }

.pied { padding: 24px 16px 32px; border-top: 1px solid var(--wz-line); color: var(--wz-muted); font-size: .9rem; text-align: center; }
.pied p { margin: 0; }
.pied a { color: var(--wz-muted); }

@media (max-width: 1199px) {
  .grille { grid-template-columns: 220px minmax(0, 1fr); gap: 0 40px; }
  .sommaire { display: none; }
  .sommaire-replie { display: block; }
}
@media (max-width: 991px) {
  .grille { grid-template-columns: minmax(0, 1fr); padding: 0 16px; }
  .bandeau-texte { grid-column: 1; }
  .menu-doc { display: none; }
  .menu-replie { display: block; }
  .entete { position: static; }
  .entete-dedans { padding: 8px 16px; }
  html { scroll-padding-top: 16px; }
}
@media (max-width: 600px) {
  .bandeau { padding: 28px 0 24px; }
  .entete-liens { gap: 2px 14px; font-size: .9rem; }
  .corps-page { padding-top: 20px; }
  .suite { grid-template-columns: 1fr; }
  .suite-suiv { grid-column: 1; }
  .texte h2 { font-size: 1.3rem; }
}
