/* ===========================================================================
   Nokka, feuille commune des pages de contenu (tout sauf l'accueil)
   ---------------------------------------------------------------------------
   L'accueil garde son fond WebGL. Ici, des pages longues faites pour être lues :
   même noir, même police système, même logotype, même verre, mais peints en CSS.
   Aucune police ni script tiers. Accent Bec (#FFC21A) seulement sur fond sombre,
   et seulement pour de petits repères (puces, page active, survol) : jamais pour
   du texte courant.
   Gabarit HTML à copier : templates/page.html.
   =========================================================================== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --encre: #0A0A0C;
  --bec: #FFC21A;
  --ink: #ffffff;
  --ink-body: rgba(255, 255, 255, 0.86);   /* texte courant, 15:1 */
  --ink-2: rgba(255, 255, 255, 0.66);      /* texte secondaire, 8:1 */
  --ink-3: rgba(255, 255, 255, 0.56);      /* pied de page, fil d'Ariane, 6:1 */
  --line: rgba(255, 255, 255, 0.10);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --col: 680px;                            /* colonne de lecture */
  --wide: 1080px;                          /* en-tête, pied de page */
  --gutter: 24px;
  color-scheme: dark;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 88px;                /* les ancres ne passent pas sous l'en-tête collant */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "Segoe UI", system-ui, sans-serif;
  background: var(--encre);
  color: var(--ink-body);
  font-size: 17.5px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Le rappel du verre de l'accueil : deux nappes grises fixes, très douces. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 12% -5%, rgba(255, 255, 255, 0.075), transparent 70%),
    radial-gradient(45% 40% at 100% 30%, rgba(255, 255, 255, 0.04), transparent 70%),
    var(--encre);
}

img, svg, video { display: block; max-width: 100%; height: auto; }

a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.35);
    text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color .25s var(--ease), color .25s var(--ease); }
a:hover { text-decoration-color: var(--bec); }

:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.85); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  padding: 10px 14px; border-radius: 10px; background: #fff; color: #000; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------- en-tête */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 10, 12, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.site-header .inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand { display: inline-flex; align-items: center; color: #fff; text-decoration: none; flex: 0 0 auto; }
/* Même calage que l'accueil : 22 px de haut, la capitale tombe sur des pixels pleins. */
.brand .logotype { height: 22px; width: auto; }

.site-nav { margin-left: auto; display: flex; align-items: center; }
.nav-links { display: flex; align-items: center; gap: 22px; list-style: none; }
.nav-links a, .nav-mobile a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14.5px;
  line-height: 1.2;
  white-space: nowrap;
}
.nav-links a:hover, .nav-mobile a:hover { color: #fff; }
.nav-links a[aria-current="page"], .nav-mobile a[aria-current="page"] {
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--bec);
  padding-bottom: 4px;
}

/* Le bouton : la même pièce de verre que le bouton de l'accueil sur téléphone, en CSS. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.20) 0%, rgba(255, 255, 255, 0.08) 100%);
  border: 1px solid rgba(255, 255, 255, 0.30);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.btn:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.12) 100%);
  border-color: rgba(255, 255, 255, 0.44);
}
.btn-lg { padding: 15px 22px; font-size: 15.5px; border-radius: 16px; }
.site-header .btn { padding: 9px 14px; font-size: 14px; border-radius: 12px; }

/* Menu sur téléphone : un <details>, sans JavaScript. */
.nav-mobile { display: none; position: relative; }
.nav-mobile summary {
  list-style: none;
  cursor: pointer;
  font-size: 14.5px;
  color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile[open] summary { background: rgba(255, 255, 255, 0.08); }
.nav-mobile ul {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 240px;
  list-style: none;
  padding: 8px;
  border-radius: 16px;
  background: #121215;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.nav-mobile li a { display: block; padding: 11px 12px; border-radius: 10px; font-size: 15.5px; }
.nav-mobile li a:hover { background: rgba(255, 255, 255, 0.06); }
.nav-mobile li a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--bec); padding-bottom: 11px; }
.nav-mobile li.cta { padding: 6px 4px 4px; }
.nav-mobile li.cta .btn { display: flex; width: 100%; }

@media (max-width: 960px) {
  .nav-links, .site-header .inner > .btn { display: none; }
  .nav-mobile { display: block; }
}

/* ---------------------------------------------------------- page, lecture */

main { flex: 1 0 auto; }

.page {
  max-width: calc(var(--col) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 28px var(--gutter) 72px;
}

.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13.5px; color: var(--ink-3); }
.breadcrumb li + li::before { content: '›'; margin-right: 8px; color: var(--ink-3); }
.breadcrumb a { color: var(--ink-3); text-decoration: none; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb [aria-current="page"] { color: var(--ink-2); }

.page-head { margin: 40px 0 36px; }

/* Le H1 reprend celui de l'accueil, en plus petit : c'est une page de lecture. */
.page h1 {
  font-size: clamp(32px, 5.4vw, 46px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
  background: linear-gradient(180deg, #fff 28%, rgba(255, 255, 255, 0.76) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-wrap: balance;
}

.lede { margin-top: 18px; font-size: 19px; line-height: 1.55; color: var(--ink-body); }

.byline { margin-top: 18px; font-size: 13.5px; color: var(--ink-3); }

.prose > * + * { margin-top: 1.05em; }

.prose h2 {
  margin-top: 2.2em;
  font-size: clamp(23px, 3.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.22;
  color: #fff;
  text-wrap: balance;
}
.prose h3 {
  margin-top: 1.8em;
  font-size: 19.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #fff;
}
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose h2[id], .prose h3[id] { scroll-margin-top: 88px; }

.prose strong { color: #fff; font-weight: 600; }

.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.45em; }
.prose ul li::marker { color: var(--bec); }
.prose ol li::marker { color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* Les URL affichées en texte (sources) se coupent au lieu d'élargir la page sur téléphone. */
.prose a { overflow-wrap: anywhere; }

.prose blockquote {
  padding: 4px 0 4px 18px;
  border-left: 2px solid rgba(255, 255, 255, 0.28);
  color: var(--ink-2);
}

.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

.prose figure img { border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.09); }
.prose figcaption { margin-top: 10px; font-size: 13.5px; line-height: 1.45; color: var(--ink-3); }

/* Tableaux : défilement horizontal DANS le cadre, jamais de la page. */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.prose th, .prose td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { color: #fff; font-weight: 600; background: rgba(255, 255, 255, 0.04); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose caption { caption-side: bottom; padding: 10px 14px; font-size: 13px; color: var(--ink-3); text-align: left; }

/* Carte de verre : « en bref », définition à citer, encadré. */
.card {
  padding: 20px 22px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 18px 40px rgba(0, 0, 0, 0.30);
}
.card > * + * { margin-top: 0.7em; }
.card-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #fff;
}
.prose .card { margin-top: 1.6em; margin-bottom: 1.6em; }

/* Questions fréquentes : visibles en entier (le balisage FAQPage doit coller au texte affiché). */
.faq-item + .faq-item { margin-top: 1.4em; padding-top: 1.4em; border-top: 1px solid var(--line); }
.faq-item h3 { margin-top: 0; }

/* Lexique : un terme par bloc, ancre stable. */
.term + .term { margin-top: 1.6em; }
.term h3 { margin-top: 0; }

/* Appel à l'action de fin de page. Limité à <aside> : le <li class="cta"> du menu mobile
   ne doit pas hériter de cette carte. */
aside.cta {
  margin-top: 64px;
  padding: 28px 26px;
  border-radius: 24px;
  text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.035) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 24px 60px rgba(0, 0, 0, 0.35);
}
aside.cta h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; color: #fff; }
aside.cta p { margin-top: 8px; color: var(--ink-2); font-size: 16px; }
aside.cta .btn { margin-top: 18px; }

/* --------------------------------------------------------- pied de page */

.site-footer {
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-3);
}
.site-footer .inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 48px var(--gutter) 40px;
}
/* Le logo et la phrase sur toute la largeur, puis cinq colonnes de liens. */
.footer-top { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px; }
.footer-id { grid-column: 1 / -1; }
.footer-id .brand { margin-bottom: 14px; }
.footer-id p { max-width: 520px; }
.footer-col h2 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #fff;
  margin-bottom: 12px;
}
.footer-col ul { list-style: none; }
.footer-col li + li { margin-top: 8px; }
.site-footer a { color: var(--ink-3); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .brand { color: #fff; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; }

@media (max-width: 860px) {
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------ téléphone */

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 17px; }
  .site-header .inner { height: 58px; }
  .page { padding-top: 20px; padding-bottom: 56px; }
  .page-head { margin: 28px 0 28px; }
  .lede { font-size: 18px; }
  .card { padding: 18px; border-radius: 18px; }
  aside.cta { padding: 22px 18px; border-radius: 20px; margin-top: 48px; }
  .prose th, .prose td { padding: 10px 12px; }
}

@media (max-width: 380px) {
  .footer-top { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
