/* ============================================================
   MAIN.CSS — Variables, Reset, Typographie, Utilitaires
   ============================================================ */

/* --- Variables --- */
:root {
  --jaune:      #FFEC01;
  --rouge:      #DD2628;
  --noir:       #0A0A0A;
  --blanc:      #FFFFFF;
  --gris-clair: #F5F5F5;
  --gris-moyen: #E0E0E0;
  --gris-texte: #555555;

  --font-body:    'Inter', sans-serif;
  --font-titre:   'Inter Tight', sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 20px;

  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);

  --max-width: 1200px;
  --gutter: 24px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--noir);
  background: var(--blanc);
  -webkit-font-smoothing: antialiased;
}

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

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

ul, ol {
  list-style: none;
}

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

input, select, textarea {
  font: inherit;
}

/* --- Typographie --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-titre);
  line-height: 1.2;
  font-weight: 800;
  color: var(--noir);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }

/* --- Utilitaires layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: 80px;
}

.section--sm {
  padding-block: 48px;
}

.section--lg {
  padding-block: 112px;
}

.section--dark {
  background: var(--noir);
  color: var(--blanc);
}

.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: var(--blanc);
}

.section--grey {
  background: var(--gris-clair);
}

.section--jaune {
  background: var(--jaune);
}

.section--rouge {
  background: var(--rouge);
  color: var(--blanc);
}

.section--rouge h1,
.section--rouge h2,
.section--rouge h3 {
  color: var(--blanc);
}

/* --- Grilles --- */
.grid {
  display: grid;
  gap: 24px;
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.grid--auto-3 {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.flex {
  display: flex;
  gap: 24px;
}

.flex--center {
  align-items: center;
  justify-content: center;
}

.flex--between {
  align-items: center;
  justify-content: space-between;
}

.flex--wrap {
  flex-wrap: wrap;
}

/* --- Texte utilitaires --- */
.text-center  { text-align: center; }
.text-left    { text-align: left; }

.text-blanc   { color: var(--blanc); }
.text-gris    { color: var(--gris-texte); }
.text-jaune   { color: var(--jaune); }
.text-rouge   { color: var(--rouge); }

.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.fs-sm  { font-size: 0.875rem; }
.fs-lg  { font-size: 1.125rem; }

/* --- Section header (titre + sous-titre centré) --- */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--gris-texte);
  max-width: 640px;
  margin-inline: auto;
  margin-top: 16px;
}

.section--dark .section-header p {
  color: rgba(255,255,255,0.7);
}

/* --- Séparateur --- */
.divider {
  width: 48px;
  height: 4px;
  background: var(--jaune);
  margin: 16px auto 0;
  border-radius: 2px;
}

/* --- Fade-in animation (IntersectionObserver) --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section { padding-block: 56px; }
  .section--lg { padding-block: 72px; }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .section-header { margin-bottom: 40px; }
}
