/**
 * global.css
 * Reset, variables CSS, typographie, utilitaires globaux.
 * Toutes les couleurs et espacements sont centralisés ici via custom properties.
 */

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

html {
  /* Pas de smooth scrolling CSS — piloté par JS si nécessaire */
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul,
ol {
  list-style: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

/* ── CSS Custom Properties ────────────────────────────────────────────────── */
:root {
  /* Couleurs */
  --color-bg: #FFFFFF;
  --color-bg-alt: #FAFAFA;
  --color-text: #1A1A1A;
  --color-text-secondary: #6B7280;
  --color-accent: #C8762A;
  --color-accent-secondary: #D4892E;
  --gradient-signature: linear-gradient(135deg, #C8762A, #D4892E);
  --color-overlay: rgba(0, 0, 0, 0.45);

  /* Typographie */
  --font-body: 'Inter', sans-serif;
  --font-display: 'Syne', sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;
  --text-6xl: 4.5rem;

  /* Espacements */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Rayons */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Ombres */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.4s;
  --duration-slow: 0.6s;

  /* Header */
  --header-height: 80px;
  --header-height-compact: 60px;
}

/* ── Typographie ──────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

@media (min-width: 768px) {
  h1 { font-size: var(--text-5xl); }
  h2 { font-size: var(--text-4xl); }
  h3 { font-size: var(--text-3xl); }
}

@media (min-width: 1200px) {
  h1 { font-size: var(--text-6xl); }
  h2 { font-size: var(--text-5xl); }
}

/* ── Utilitaires ──────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.section {
  padding-block: var(--space-4xl);
}

@media (min-width: 768px) {
  .section {
    padding-block: var(--space-5xl);
  }
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.gradient-text {
  background: var(--gradient-signature);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

/* ── Bouton CTA ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.875rem 2rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  border-radius: var(--radius-full);
  transition: transform var(--duration-fast) var(--ease-out-expo),
              box-shadow var(--duration-fast) var(--ease-out-expo);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  color: #FFFFFF;
  background: var(--gradient-signature);
}

.btn--outline {
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}

.btn--outline:hover {
  color: #FFFFFF;
  background: var(--gradient-signature);
  border-color: transparent;
}

/* ── Animations (Intersection Observer) ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  will-change: transform, opacity;
  transition: opacity var(--duration-slow) var(--ease-out-expo),
              transform var(--duration-slow) var(--ease-out-expo);
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect des préférences de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Section title ────────────────────────────────────────────────────────── */
.section__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section__subtitle {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.section__title {
  margin-bottom: var(--space-md);
}

.section__description {
  max-width: 600px;
  margin-inline: auto;
  color: var(--color-text-secondary);
  font-size: var(--text-lg);
}
