/* ============================================
   SYSTÈME TYPOGRAPHIQUE
   Hiérarchie visuelle expressive et rythmée
   ============================================ */

/* Import des polices Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Crimson+Pro:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============================================
   TITRES (Display)
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-black);
}

h1 {
  font-size: var(--text-5xl);
  font-weight: var(--weight-extrabold);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

h2 {
  font-size: var(--text-4xl);
  font-weight: var(--weight-extrabold);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

h3 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
}

h4 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
}

h5 {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
}

h6 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
}

/* ============================================
   TEXTE CORPS (Body)
   ============================================ */

p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-gray-800);
  max-width: 68ch;
}

/* Lead paragraphe (intro) */
.lead {
  font-size: var(--text-md);
  line-height: var(--leading-loose);
  color: var(--color-gray-700);
  font-weight: var(--weight-regular);
}

/* Petit texte */
.text-small {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

/* Texte extra-small */
.text-xs {
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

/* ============================================
   VARIANTES TYPOGRAPHIQUES
   ============================================ */

/* Titre avec effet gradient */
.title-gradient {
  background: var(--gradient-fire);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Titre avec accent */
.title-accented {
  position: relative;
  display: inline-block;
  padding-bottom: var(--space-3);
}

.title-accented::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--gradient-fire);
  border-radius: var(--radius-full);
}

/* ============================================
   ÉLÉMENTS SPÉCIAUX
   ============================================ */

/* Citation */
blockquote {
  font-size: var(--text-lg);
  font-style: italic;
  line-height: var(--leading-loose);
  color: var(--color-gray-700);
  padding-left: var(--space-6);
  border-left: 4px solid var(--color-primary);
  margin: var(--space-8) 0;
}

blockquote cite {
  display: block;
  margin-top: var(--space-4);
  font-size: var(--text-base);
  font-style: normal;
  font-weight: var(--weight-semibold);
  color: var(--color-black-soft);
}

/* Texte monospace (chiffres, données) */
.mono {
  font-family: var(--font-mono);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-tight);
}

/* Chiffres tabulaires (alignement) */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* ============================================
   EMPHASES & ACCENTS
   ============================================ */

strong,
b {
  font-weight: var(--weight-bold);
  color: var(--color-black);
}

em,
i {
  font-style: italic;
}

mark {
  background: var(--gradient-fire-subtle);
  color: var(--color-black);
  padding: 0.1em 0.3em;
  border-radius: var(--radius-sm);
}

/* Texte accentué (custom) */
.accent-text {
  color: var(--color-accent-orange);
  font-weight: var(--weight-semibold);
}

/* ============================================
   LISTES STYLISÉES
   ============================================ */

/* Liste avec puces custom */
.list-styled {
  list-style: none;
  padding-left: 0;
}

.list-styled li {
  padding-left: var(--space-7);
  position: relative;
  margin-bottom: var(--space-4);
}

.list-styled li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  background: var(--gradient-fire);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-glow-fire);
}

/* Liste numérotée custom */
.list-numbered {
  list-style: none;
  counter-reset: custom-counter;
  padding-left: 0;
}

.list-numbered li {
  counter-increment: custom-counter;
  padding-left: var(--space-8);
  position: relative;
  margin-bottom: var(--space-5);
}

.list-numbered li::before {
  content: counter(custom-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  color: var(--color-white);
  background: var(--gradient-fire);
  border-radius: var(--radius-full);
}

/* ============================================
   LIENS
   ============================================ */

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-smooth);
  position: relative;
}

/* Effet underline animé */
.link-animated {
  position: relative;
  display: inline-block;
}

.link-animated::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-fire);
  transition: width var(--duration-base) var(--ease-natural);
}

.link-animated:hover::after,
.link-animated:focus::after {
  width: 100%;
}

/* Lien dans le texte */
p a {
  color: var(--color-primary);
  font-weight: var(--weight-medium);
  border-bottom: 1px solid var(--color-primary-400);
  transition: all var(--duration-fast) var(--ease-smooth);
}

p a:hover {
  color: var(--color-accent-orange);
  border-bottom-color: var(--color-accent-orange);
}

/* ============================================
   UTILITAIRES TEXTE
   ============================================ */

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

.text-balance {
  text-wrap: balance;
}

.text-pretty {
  text-wrap: pretty;
}

/* ============================================
   RESPONSIVE TYPOGRAPHY
   ============================================ */

@media (max-width: 768px) {
  h1 {
    font-size: var(--text-4xl);
  }

  h2 {
    font-size: var(--text-3xl);
  }

  h3 {
    font-size: var(--text-2xl);
  }

  p,
  .lead {
    max-width: 100%;
  }

  .lead {
    font-size: var(--text-base);
  }

  blockquote {
    padding-left: var(--space-4);
    font-size: var(--text-base);
  }
}
