/* ============================================================
   CPULSE.TV — BASE STYLES
   Reset, typographie, éléments fondamentaux
   ============================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Prévention FOUC : couleur de fond immédiate */
  background: var(--bg-page);
  color: var(--text-page);
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-page);
  background: var(--bg-page);
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color var(--duration-base) var(--ease-out),
              color var(--duration-base) var(--ease-out);
}

/* ---- SÉLECTION ---- */
::selection {
  background: var(--cobalt);
  color: var(--snow);
}

/* ---- TYPOGRAPHIE ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-page);
}

h1 { font-size: clamp(2.5rem, 7vw, var(--text-7xl)); font-weight: 600; }
h2 { font-size: clamp(2rem, 5vw, var(--text-5xl)); }
h3 { font-size: clamp(1.5rem, 3vw, var(--text-3xl)); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

.display-mega {
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, var(--text-8xl));
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 144, "SOFT" 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);   /* cobalt sur encre = 3.0:1 en thème sombre → --accent bascule vers --sky (6.0:1) */
  font-weight: 600;
}

.lede {
  font-size: clamp(1.125rem, 1.5vw, var(--text-xl));
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 60ch;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--accent);
}

p {
  max-width: 70ch;
  color: var(--text-page);
}

/* ---- BOUTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--cobalt);
  color: var(--snow);
}
.btn-primary:hover {
  background: var(--cobalt-deep);
  color: var(--snow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* StreamVid-inspired primary CTA — violet */
.btn-main {
  background: var(--main);
  color: #FFFFFF;
  font-weight: 600;
}
.btn-main:hover {
  background: var(--main-2);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--main-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-page);
  border-color: var(--text-page);
}
.btn-ghost:hover {
  background: var(--text-page);
  color: var(--bg-page);
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
}
.btn-gold:hover {
  background: var(--amber);
  color: var(--ink);
}

.btn-coral {
  background: var(--coral);
  color: #FFFFFF;
  font-weight: 600;
}
.btn-coral:hover {
  background: var(--coral-deep);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  justify-content: center;
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

/* CTA StreamVid-style — bouton principal dans la nav */
.btn-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 22px;
  background: var(--main);
  color: #FFFFFF;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--duration-base) var(--ease-out);
  white-space: nowrap;
  border: 0;
  cursor: pointer;
}

.btn-nav-cta:hover {
  background: var(--main-2);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--main-glow);
}

.btn-nav-cta svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ---- UTILITAIRES ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.divider {
  height: 1px;
  background: var(--border-page);
  margin: var(--space-12) 0;
}

.text-cobalt { color: var(--accent); }
.text-gold { color: var(--gold-text); }   /* or pur sur crème = 1.5:1 ; --gold-text = 5.7:1, redevient l'or pur sur fond sombre */
.text-coral { color: var(--coral-text); }
.section.dark .text-gold, .bg-ink .text-gold, .footer .text-gold { color: var(--gold); }
.section.dark .text-coral, .bg-ink .text-coral, .footer .text-coral { color: #FF6B6B; }
.text-muted { color: var(--text-muted); }

.bg-ink { background: var(--ink); }
.bg-paper { background: var(--bg-page); }
.bg-cobalt { background: var(--cobalt); }
.bg-gold { background: var(--gold); }

.uppercase { text-transform: uppercase; letter-spacing: 0.06em; }
.italic-display { font-style: italic; font-variation-settings: "opsz" 144; }

/* ---- ICÔNES ---- */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-filled svg {
  fill: currentColor;
  stroke: none;
}

/* ---- ACCESSIBILITÉ ---- */
.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;
}

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

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