/* ============================================================
   base.css — reset, typo de base, helpers (.serif, .eyebrow, .rule),
   focus accessible, prefers-reduced-motion.
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  background: var(--bg-primary);
  color: var(--text-body);
  line-height: 1.65;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; cursor: pointer; }
button, [role="button"] { cursor: pointer; }

/* ============================================================
   Helpers typographiques
   ============================================================ */

.serif {
  font-family: var(--font-serif);
  font-weight: 300;
}

.serif em,
h1 em, h2 em, h3 em {
  font-style: italic;
  color: var(--accent-light);
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--accent);
  display: block;
}
.eyebrow.center { justify-content: center; }

.rule {
  width: 64px;
  height: 1px;
  background: var(--accent);
  margin: 1.5rem 0;
  border: 0;
  display: block;
}
.rule.center { margin-left: auto; margin-right: auto; }

/* ============================================================
   Layout primitives
   ============================================================ */

.section {
  padding: var(--section-pad-y) var(--section-pad-x);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.section:last-of-type { border-bottom: 0; }

.section-head {
  max-width: 720px;
  margin: 0 auto 3.5rem;
  text-align: center;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.section-sub {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0.6rem auto 0;
}

/* ============================================================
   Accessibilité
   ============================================================ */

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.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;
}

/* ============================================================
   Reveal-on-scroll — désactivé sous prefers-reduced-motion
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--dur-slow) var(--ease-premium),
    transform var(--dur-slow) var(--ease-premium);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================================
   Responsive — section padding
   ============================================================ */

@media (max-width: 1024px) {
  :root {
    --section-pad-x: 2rem;
    --section-pad-y: 5rem;
  }
}

@media (max-width: 768px) {
  :root {
    --section-pad-x: 1.25rem;
    --section-pad-y: 4rem;
  }
}

@media (max-width: 375px) {
  :root {
    --section-pad-y: 3.25rem;
  }
}
