/* ============================================================
   48N° · PAGES DOCUMENT — about, mentions légales, confidentialité, 404
   Habillage brutaliste éditorial cohérent avec la landing (css/app.css)
   et le portail (css/portal.css). La landing n'utilise PAS ce fichier.
   Structure : variables → reset → header → document → composants → footer
   ============================================================ */

/* ---------- VARIABLES (tokens partagés avec app.css / portal.css) ---------- */
:root {
  --bg: #F1EFE9;
  --bg-card: #FFFFFF;
  --ink: #0A0A0A;
  --ink-soft: #4A4A4A;
  --ink-mute: #8C8A82;
  --blue: #1E3CFF;
  --blue-soft: rgba(30, 60, 255, 0.08);
  --accent: #FF3D00;
  --line: #D8D4C8;
  --line-strong: #BFBBAE;
  --pad: clamp(20px, 3vw, 48px);
  --ff-display: "Space Grotesk", "Helvetica Neue", sans-serif;
  --ff-body: "DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* ---------- RESET ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--blue); color: var(--bg); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- TYPO UTILITAIRE ---------- */
.mono {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ---------- HEADER (repris de .site-header, version sticky) ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(241, 239, 233, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--pad);
}
.logo {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.logo .deg { color: var(--blue); }
.nav {
  display: flex;
  gap: clamp(16px, 3vw, 28px);
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
/* Zone tactile élargie (44px) sans changer le rendu : padding compensé par
   des marges négatives — le soulignement ::after reste calé sous le texte. */
.nav a {
  position: relative;
  color: var(--ink-soft);
  transition: color 200ms;
  padding: 12px 6px;
  margin: -12px -6px;
}
.nav a:hover { color: var(--ink); }
.nav a::after {
  content: '';
  position: absolute;
  left: 6px;
  bottom: 8px;
  height: 1px;
  width: 0;
  background: var(--blue);
  transition: width 250ms cubic-bezier(0.16, 1, 0.3, 1);
}
.nav a:hover::after { width: calc(100% - 12px); }

/* ---------- DOCUMENT (fiche technique : cartouche + prose) ---------- */
.container { max-width: 880px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
main.container {
  padding-top: clamp(48px, 8vh, 96px);
  padding-bottom: clamp(64px, 10vh, 120px);
}

/* Cartouche méta au-dessus du titre (DOC. XXX · REV.NN) */
.doc__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: clamp(32px, 6vh, 56px);
  color: var(--ink-soft);
}

.doc h1 {
  font-family: var(--ff-display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.95;
  font-size: clamp(40px, 7vw, 88px);
  text-wrap: balance;
  margin-bottom: clamp(28px, 5vh, 48px);
}
.doc h1 em { font-style: italic; color: var(--accent); }

/* h2 numérotés façon imprimé (/01, /02, …) */
.doc { counter-reset: doc-h2; }
.doc h2 {
  font-family: var(--ff-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(21px, 2.6vw, 28px);
  line-height: 1.15;
  margin: clamp(40px, 7vh, 64px) 0 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.doc h2::before {
  counter-increment: doc-h2;
  content: "/" counter(doc-h2, decimal-leading-zero);
  font-family: var(--ff-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--blue);
  flex: none;
}

.doc p { max-width: 68ch; margin-bottom: 16px; }
.doc ul { max-width: 68ch; margin-bottom: 16px; list-style: none; }
.doc ul li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.doc ul li::before { content: '\2192'; position: absolute; left: 0; color: var(--blue); }

.doc p a, .doc li a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 200ms;
}
.doc p a:hover, .doc li a:hover { color: var(--ink); text-decoration-thickness: 2px; }

.doc code {
  font-family: var(--ff-mono);
  font-size: 0.85em;
  background: var(--blue-soft);
  padding: 2px 6px;
}

/* Ligne « Dernière mise à jour » des pages légales */
.doc-updated {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: clamp(40px, 7vh, 56px);
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ---------- COMPOSANTS (compat pages existantes) ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  overflow: hidden;
  transition: color 250ms;
}
.btn .arrow { transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1); }
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateX(-101%);
  transition: transform 350ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
}
.btn:hover { color: var(--bg); }
.btn:hover::before { transform: translateX(0); }
.btn:hover .arrow { transform: translate(4px, -4px); }

.card { border: 1px solid var(--line); background: var(--bg-card); padding: 20px; }

.form { display: grid; gap: 14px; max-width: 600px; }
label { display: grid; gap: 6px; font-weight: 500; }
input, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
  font: inherit;
  color: var(--ink);
}
input:focus, textarea:focus { border-color: var(--ink); outline: none; }

.alert { border: 1px solid var(--accent); background: rgba(255, 61, 0, 0.06); padding: 12px 14px; }

/* Honeypot anti-spam */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- FOOTER (cartouche bas, repris du footer landing) ---------- */
.footer { border-top: 1px solid var(--ink); }
.footer__band {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px var(--pad);
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}
.footer__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px var(--pad) 28px;
  font-size: 13px;
  color: var(--ink-soft);
}
.footer__links a {
  display: inline-block;
  color: var(--ink);
  transition: color 200ms;
  padding: 12px 2px;
  margin: -12px -2px;
}
.footer__links a:hover { color: var(--blue); }

/* Ornements masqués aux lecteurs d'écran (syntaxe texte alternatif — les
   navigateurs sans support ignorent la surcharge et gardent la règle d'avant) */
.doc ul li::before { content: '\2192' / ''; }
.doc h2::before { content: "/" counter(doc-h2, decimal-leading-zero) / ''; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
  :root { --pad: 18px; }
  .nav { font-size: 10px; letter-spacing: 0.12em; }
  .doc__meta { font-size: 9px; letter-spacing: 0.12em; }
  .doc h2 { gap: 10px; }
}
