/* ============================================================
   Galaad — base.css
   Reset, custom properties (tokens), typographie de base.
   ============================================================ */

/* ---------- Tokens (charte Galaad v2.0) ---------- */

:root {
  /* Couleurs */
  --galaad-cream: #faf7f0;
  --galaad-ink: #0f1419;
  --galaad-ink-soft: #4a5568;
  --galaad-ink-whisper: #8a94a6;
  --galaad-accent: #1a3a5c;
  --galaad-rule: #e8e2d3;
  --galaad-rule-strong: #c7bfa8;

  /* Typo */
  --font-voice: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-structure: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Menlo', 'Consolas', monospace;

  /* Spacing scale (strict, voir charte) */
  --space-4: 4px;
  --space-8: 8px;
  --space-16: 16px;
  --space-24: 24px;
  --space-40: 40px;
  --space-80: 80px;
  --space-160: 160px;

  /* Max widths */
  --content-max: 680px;
  --wide-max: 1200px;
}

/* ---------- Reset minimal ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto; /* Lenis gère le scroll, pas le natif */
}

body {
  min-height: 100vh;
  background-color: var(--galaad-cream);
  color: var(--galaad-ink);
  font-family: var(--font-structure);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

button {
  font: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

/* ---------- Polices auto-hébergées ---------- */

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/assets/fonts/CormorantGaramond-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/assets/fonts/CormorantGaramond-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/assets/fonts/CormorantGaramond-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/assets/fonts/CormorantGaramond-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/assets/fonts/CormorantGaramond-MediumItalic.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Typographie de base ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-voice);
  font-weight: 500;
  color: var(--galaad-ink);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

p {
  max-width: var(--content-max);
  line-height: 1.6;
}

/* Focus visible (accessibilité) */
:focus-visible {
  outline: 2px solid var(--galaad-accent);
  outline-offset: 4px;
}

/* Sélection de texte */
::selection {
  background-color: var(--galaad-ink);
  color: var(--galaad-cream);
}

/* Skip-to-content pour l'accessibilité clavier */
.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  padding: 12px 20px;
  background: var(--galaad-ink);
  color: var(--galaad-cream);
  font-family: var(--font-structure);
  font-size: 14px;
  z-index: 1000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}
