/* ============================================================
   RPAM — Système typographique unifié
   Police : Montserrat (300–700) | Registre : élégant, aéré
   Chargé en dernier pour prendre le dessus sur les autres CSS
   ============================================================ */

/* ── Variables ──────────────────────────────────────────────── */
:root {
  /* Échelle de tailles fluides : clamp(mobile, fluide, desktop) */
  --type-h1:      clamp(2.2rem,  4vw + 0.3rem,  3.5rem);   /* 35–56px */
  --type-h2:      clamp(1.6rem,  2.5vw + 0.2rem, 2.25rem); /* 26–36px */
  --type-h3:      clamp(1.25rem, 1.6vw + 0.15rem, 1.625rem); /* 20–26px */
  --type-h4:      clamp(1.1rem,  1.2vw + 0.1rem, 1.375rem); /* 18–22px */
  --type-h5:      clamp(1rem,    0.8vw + 0.1rem, 1.25rem);  /* 16–20px */
  --type-h6:      clamp(0.9rem,  0.5vw + 0.1rem, 1.0625rem); /* 14–17px */
  --type-body:    clamp(1.0625rem, 0.5vw + 0.9rem, 1.1875rem); /* 17–19px */
  --type-lead:    clamp(1.0625rem, 0.8vw + 0.2rem, 1.25rem); /* 17–20px */
  --type-small:   1rem;        /* 16px fixe */
  --type-caption: 0.9375rem;   /* 15px fixe */

  /* Poids — Montserrat max 700 */
  --fw-heading:    600;
  --fw-body:       400;
  --fw-label:      500;

  /* Hauteurs de ligne */
  --lh-heading:   1.2;
  --lh-subhead:   1.35;
  --lh-body:      1.75;
  --lh-loose:     1.85;

  /* Letter-spacing */
  --ls-heading:   0.02em;
  --ls-subhead:   0.015em;
  --ls-body:      0;
  --ls-caption:   0.06em;
}

/* ── Corps de page ──────────────────────────────────────────── */
body {
  font-size: var(--type-body);
  font-weight: var(--fw-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── H1 ─────────────────────────────────────────────────────── */
h1, .h1 {
  font-size: var(--type-h1);
  font-weight: var(--fw-heading);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  margin-bottom: 1.25rem;
}

/* ── H2 ─────────────────────────────────────────────────────── */
h2, .h2 {
  font-size: var(--type-h2);
  font-weight: var(--fw-heading);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-subhead);
  margin-bottom: 1rem;
}

/* ── H3 ─────────────────────────────────────────────────────── */
h3, .h3 {
  font-size: var(--type-h3);
  font-weight: var(--fw-heading);
  line-height: var(--lh-subhead);
  letter-spacing: 0.01em;
  margin-bottom: 0.875rem;
}

/* ── H4 ─────────────────────────────────────────────────────── */
h4, .h4,
.team-name,
.value-item h4 {
  font-size: var(--type-h4);
  font-weight: var(--fw-heading);
  line-height: var(--lh-subhead);
  letter-spacing: 0;
  margin-bottom: 0.75rem;
}

/* ── H5 ─────────────────────────────────────────────────────── */
h5, .h5 {
  font-size: var(--type-h5);
  font-weight: var(--fw-heading);
  line-height: 1.4;
  letter-spacing: 0;
  margin-bottom: 0.625rem;
}

/* ── H6 ─────────────────────────────────────────────────────── */
h6, .h6 {
  font-size: var(--type-h6);
  font-weight: var(--fw-heading);
  line-height: 1.4;
  letter-spacing: 0;
  margin-bottom: 0.5rem;
}

/* ── Paragraphes ────────────────────────────────────────────── */
p {
  font-size: var(--type-body);
  font-weight: var(--fw-body);
  line-height: var(--lh-body);
  margin-bottom: 1rem;
}

/* ── Lead / sous-titre de section ───────────────────────────── */
.lead,
.section-subtitle {
  font-size: var(--type-lead);
  font-weight: var(--fw-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
}

/* ── Texte petit ────────────────────────────────────────────── */
small, .small {
  font-size: var(--type-small);
  font-weight: var(--fw-label);
  line-height: 1.5;
}

/* ── Caption / label ────────────────────────────────────────── */
.caption,
.text-caption,
.hero-tag,
.team-role {
  font-size: var(--type-caption);
  font-weight: var(--fw-label);
  line-height: 1.5;
  letter-spacing: var(--ls-caption);
  text-transform: uppercase;
}

/* ── Contenu article ────────────────────────────────────────── */
.article-content h2 {
  font-size: var(--type-h2);
  font-weight: var(--fw-heading);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-subhead);
}
.article-content h3 {
  font-size: var(--type-h3);
  font-weight: var(--fw-heading);
  line-height: var(--lh-subhead);
}
.article-content p {
  font-size: var(--type-body);
  line-height: var(--lh-loose);
}

/* ── Extraits / descriptions ────────────────────────────────── */
.featured-excerpt,
.blog-card-excerpt,
.service-card-description {
  font-size: var(--type-small);
  font-weight: var(--fw-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
}

/* ── Utilitaires poids normalisés ───────────────────────────── */
.fw-300 { font-weight: 300; }
.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 700; } /* Montserrat chargé jusqu'à 700 max */

/* ── Utilitaires taille normalisés ──────────────────────────── */
.fs-12 { font-size: 0.75rem; }
.fs-14 { font-size: 0.875rem; }
.fs-15 { font-size: 0.9375rem; }
.fs-16 { font-size: 1rem; }
.fs-17 { font-size: var(--type-body); }
.fs-18 { font-size: var(--type-lead); }
.fs-20 { font-size: var(--type-h5); }
.fs-22 { font-size: var(--type-h4); }
