/* ============================================================
   PAGINATIVE — Base & Reset
   ============================================================ */

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

/* L'attribut HTML hidden doit toujours masquer l'élément,
   même si une règle CSS (ex: display:flex) le réécrase. */
[hidden] { display: none !important; }

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  transition: background var(--t-action) var(--ease-book),
              color var(--t-action) var(--ease-book);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ───────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); font-weight: 700; }

p { color: var(--text-2); line-height: 1.7; }
a { color: var(--accent); text-decoration: none; transition: opacity var(--t-fast); }
a:hover { opacity: 0.8; }

em, i { font-family: var(--font-display); font-style: italic; }

/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ── Focus visible ───────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* ── Selection ───────────────────────────────────────── */
::selection {
  background: var(--accent-bg);
  color: var(--text);
}

/* ── Utilities ───────────────────────────────────────── */
.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;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container--narrow { max-width: 680px; }
.container--wide   { max-width: 1400px; }

/* ── Images ──────────────────────────────────────────── */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* ── Divider ─────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: 2rem 0;
}

/* ── Animations globales ─────────────────────────────── */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes ember-rise {
  0%   { transform: translateY(0) scale(1); opacity: 0.9; }
  60%  { opacity: 0.6; }
  100% { transform: translateY(-80px) scale(0.3); opacity: 0; }
}

@keyframes typewriter {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50%       { box-shadow: 0 0 0 8px transparent; }
}

.animate-fade-in  { animation: fade-in  var(--t-reveal) var(--ease-reveal) both; }
.animate-slide-up { animation: slide-up var(--t-reveal) var(--ease-reveal) both; }
.animate-scale-in { animation: scale-in var(--t-page)   var(--ease-settle) both; }

.delay-1 { animation-delay: 100ms; }
.delay-2 { animation-delay: 200ms; }
.delay-3 { animation-delay: 300ms; }
.delay-4 { animation-delay: 450ms; }
.delay-5 { animation-delay: 600ms; }
