/* ════════════════════════════════════════════════════════════════════
   SENTINELLE DUARTÉ — base.css
   Reset, variables de charte, typographies, texture, accessibilité.
   ──────────────────────────────────────────────────────────────────
   Ordre de chargement attendu : base.css → layout.css → components.css → pages.css
   ════════════════════════════════════════════════════════════════════ */

/* ─── RESET MINIMAL ─────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

/* ─── VARIABLES DE CHARTE — palette validée DA générateur ─────────── */
:root {
  /* Couleurs principales */
  --navy:       #1F2F5A;         /* bleu nuit institutionnel (titres, header, btn principal) */
  --navy-dark:  #16213F;         /* bleu nuit assombri (hover btn) */
  --gold:       #C59B2A;         /* or principal (filets, eyebrows, accents) */
  --gold-light: #E8C96A;         /* or clair (états subtils) */
  --cream:      #F7F4EE;         /* fond crème global */
  --card-bg:    #FDFAF4;         /* fond des cartes (un ton plus clair que cream) */
  --ink:        #1A1A1A;         /* texte principal */
  --muted:      #6B6B6B;         /* texte secondaire / méta */
  --border:     rgba(197, 155, 42, 0.25);  /* bordures fines or atténué */
  --border-strong: rgba(197, 155, 42, 0.5);

  /* Couleurs de statut */
  --green:      #2D6A4F;         /* validation / confirmation */
  --red:        #B23A2E;         /* alerte / erreur (rouge éditorial, pas vif) */
  --red-bg:     rgba(178, 58, 46, 0.08);

  /* Ombres */
  --shadow:     0 4px 32px rgba(31, 47, 90, 0.10);
  --shadow-sm:  0 2px 8px rgba(31, 47, 90, 0.06);
  --shadow-lg:  0 8px 48px rgba(31, 47, 90, 0.14);

  /* Typographies
     - --font-sans  : corps de texte (lisibilité écran) → Inter
     - --font-serif : titres / éléments éditoriaux → EB Garamond (conservé)
     - --font-mono  : eyebrows, méta, code → DM Mono */
  --font-sans:  'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-mono:  'DM Mono', 'Courier New', monospace;

  /* Tailles de texte (mobile-first ; clamp pour fluidité) */
  --fs-hero:    clamp(32px, 6vw, 56px);
  --fs-h1:      clamp(28px, 4.5vw, 42px);
  --fs-h2:      clamp(22px, 3.2vw, 30px);
  --fs-h3:      clamp(19px, 2.5vw, 22px);
  --fs-body:    17px;
  --fs-small:   14px;
  --fs-tiny:    11px;

  /* Espaces */
  --space-xs:   6px;
  --space-sm:   12px;
  --space-md:   20px;
  --space-lg:   32px;
  --space-xl:   56px;
  --space-2xl:  88px;

  /* Conteneurs */
  --container-narrow: 720px;     /* longue lecture (articles, FAQ, contenu juridique) */
  --container:        960px;     /* défaut */
  --container-wide:   1180px;    /* pages avec colonnes/grilles */

  /* Rayons */
  --radius-sm:  3px;
  --radius:     4px;
  --radius-lg:  10px;

  /* Z-index */
  --z-header:   100;
  --z-modal:    200;
  --z-top:      999;
}

/* ─── CORPS ─────────────────────────────────────────────────────── */
body {
  font-family: var(--font-sans);   /* corps en sans-serif (lisibilité écran) */
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Texture grain subtile (issue de la maquette validée) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

/* Tous les conteneurs principaux remontent au-dessus du grain */
header,
main,
footer {
  position: relative;
  z-index: 1;
}

/* ─── TITRES ────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
}

h1 { font-size: var(--fs-h1); margin-bottom: var(--space-md); }
h2 { font-size: var(--fs-h2); margin-bottom: var(--space-sm); }
h3 { font-size: var(--fs-h3); margin-bottom: var(--space-sm); }

/* Italique = doré (signature visuelle de la maquette) */
h1 em, h2 em, h3 em {
  color: var(--gold);
  font-style: italic;
}

/* ─── PARAGRAPHES & LIENS DE CORPS ──────────────────────────────── */
p {
  margin-bottom: var(--space-md);
  max-width: 68ch;          /* longueur de ligne lisible */
}

a {
  color: var(--navy);
  border-bottom: 1px solid var(--gold);
  transition: color 0.2s, border-color 0.2s;
}
a:hover,
a:focus {
  color: var(--gold);
  border-bottom-color: var(--navy);
}

strong { font-weight: 600; color: var(--navy); }
em     { color: inherit; }

/* ─── LISTES DE CONTENU ─────────────────────────────────────────── */
.prose ul,
.prose ol {
  margin: 0 0 var(--space-md) var(--space-md);
  padding-left: var(--space-md);
}
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: var(--space-xs); }
.prose li::marker { color: var(--gold); }

/* ─── ÉLÉMENTS ÉDITORIAUX TRANSVERSES ───────────────────────────── */

/* Eyebrow : sur-titre en monospace doré */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-sm);
  display: inline-block;
}

/* Filet doré décoratif (séparateur fin) */
.gold-rule {
  width: 64px;
  height: 2px;
  background: var(--gold);
  border: none;
  margin: var(--space-md) 0;
}
.gold-rule--center { margin-left: auto; margin-right: auto; }

/* Chiffre de section "01/06" */
.section-number {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.12em;
  color: var(--gold);
  background: rgba(197, 155, 42, 0.09);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 4px 10px;
  white-space: nowrap;
  display: inline-block;
}

/* ─── ACCESSIBILITÉ ─────────────────────────────────────────────── */

/* Lien d'évitement (skip-link) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--navy);
  color: #fff;
  padding: 12px 18px;
  z-index: var(--z-top);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  border-bottom: none;
}
.skip-link:focus {
  top: 0;
  color: #fff;
}

/* Focus visible global */
*:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Visible uniquement par lecteur d'écran */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Respect des préférences utilisateur (animations).
   On désactive globalement les TRANSITIONS et le scroll-behavior, mais
   PAS les animations CSS : c'est animations.css qui les ralentit
   individuellement (faisceau du phare 8s→16s, lanterne 4s→9s, étoiles
   5.5s→18s, etc.). Une désactivation globale avec `animation: none
   !important` masquerait les animations signature même quand l'override
   du module animations.css essaye de les remettre en marche. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ─── ANIMATIONS GÉNÉRIQUES ─────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── UTILITAIRES TEXTE ─────────────────────────────────────────── */
.text-center { text-align: center; }
.text-mono   { font-family: var(--font-mono); }
.text-muted  { color: var(--muted); }
.text-gold   { color: var(--gold); }
