/* ==========================================
   BLUESTIFT - TYPOGRAPHY
   Système typographique moderne et accessible
   ========================================== */

/* ==========================================
   IMPORT DE FONTES
   ========================================== */

/* Inter (Google Fonts) - Variable Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ==========================================
   BASE TYPOGRAPHY
   ========================================== */

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   HEADINGS - TITRES
   ========================================== */

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

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem); /* Responsive 40px-72px */
  font-weight: var(--font-weight-extrabold);
  letter-spacing: var(--letter-spacing-tighter);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.75rem); /* Responsive 32px-60px */
  font-weight: var(--font-weight-bold);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem); /* Responsive 24px-36px */
  font-weight: var(--font-weight-bold);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.875rem); /* Responsive 20px-30px */
  font-weight: var(--font-weight-semibold);
}

h5 {
  font-size: var(--font-size-xl); /* 20px */
  font-weight: var(--font-weight-semibold);
}

h6 {
  font-size: var(--font-size-lg); /* 18px */
  font-weight: var(--font-weight-medium);
}

/* ==========================================
   PARAGRAPHES & TEXT
   ========================================== */

p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-text);
  margin: 0;
}

/* Lead text (intro paragraphs) */
.lead {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-normal);
}

/* Small text */
small, .text-small {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

/* Extra small text */
.text-xs {
  font-size: var(--font-size-xs);
}

/* ==========================================
   FONT WEIGHTS - UTILITIES
   ========================================== */

.font-light { font-weight: var(--font-weight-light); }
.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }
.font-extrabold { font-weight: var(--font-weight-extrabold); }

/* ==========================================
   TEXT COLORS - UTILITIES
   ========================================== */

.text-primary { color: var(--color-primary-start); }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }
.text-warning { color: var(--color-warning); }
.text-info { color: var(--color-info); }

/* ==========================================
   TEXT ALIGNMENT
   ========================================== */

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* ==========================================
   TEXT GRADIENT (pour titres modernes)
   ========================================== */

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

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

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

/* ==========================================
   LINKS - LIENS
   ========================================== */

a {
  color: var(--color-primary-start);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-mid);
}

a:focus-visible {
  outline: 2px solid var(--color-primary-start);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Link with underline */
.link-underline {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: all var(--transition-fast);
}

.link-underline:hover {
  text-decoration-thickness: 3px;
}

/* ==========================================
   LISTS - LISTES
   ========================================== */

/* Ordered lists */
ol {
  list-style: decimal;
  padding-left: var(--space-6);
}

ol li {
  padding-left: var(--space-2);
  margin-bottom: var(--space-2);
}

/* Unordered lists */
ul {
  list-style: disc;
  padding-left: var(--space-6);
}

ul li {
  padding-left: var(--space-2);
  margin-bottom: var(--space-2);
}

/* Custom styled list (sans bullets) */
.list-none {
  list-style: none;
  padding: 0;
}

/* ==========================================
   BLOCKQUOTES - CITATIONS
   ========================================== */

blockquote {
  border-left: 4px solid var(--color-primary-start);
  padding-left: var(--space-4);
  margin: var(--space-4) 0;
  font-style: italic;
  color: var(--color-text-secondary);
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
}

blockquote cite {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--font-size-sm);
  font-style: normal;
  color: var(--color-text-tertiary);
}

/* ==========================================
   CODE - BLOCS DE CODE
   ========================================== */

code, kbd, samp {
  font-family: var(--font-family-mono);
  font-size: 0.9em;
  background: var(--glass-bg);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
}

pre {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  overflow-x: auto;
  margin: var(--space-4) 0;
}

pre code {
  background: none;
  border: none;
  padding: 0;
}

/* ==========================================
   TEXT TRANSFORMS
   ========================================== */

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }
.normal-case { text-transform: none; }

/* ==========================================
   TEXT DECORATION
   ========================================== */

.underline { text-decoration: underline; }
.line-through { text-decoration: line-through; }
.no-underline { text-decoration: none; }

/* ==========================================
   TRUNCATE TEXT
   ========================================== */

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* Mobile: Réduire légèrement les tailles */
@media (max-width: 768px) {
  body {
    font-size: 15px; /* Légèrement plus petit sur mobile */
  }
  
  .lead {
    font-size: var(--font-size-lg);
  }
}

/* Desktop: Augmenter line-height pour confort */
@media (min-width: 1024px) {
  p {
    line-height: var(--line-height-loose);
  }
}

/* ==========================================
   ACCESSIBILITY - A11Y
   ========================================== */

/* Skip to content link (pour clavier) */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary-start);
  color: white;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  z-index: 9999;
}

.skip-to-content:focus {
  top: var(--space-2);
}

/* Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================
   SELECTION - SÉLECTION DE TEXTE
   ========================================== */

::selection {
  background: rgba(102, 126, 234, 0.3);
  color: var(--color-text);
}

::-moz-selection {
  background: rgba(102, 126, 234, 0.3);
  color: var(--color-text);
}

/* ==========================================
   NOTES
   ========================================== */

/*
  TYPOGRAPHIE MODERNE :
  
  1. Responsive avec clamp()
     - Tailles s'adaptent automatiquement au viewport
     - Pas besoin de media queries
  
  2. Variable Fonts (Inter)
     - Qualité supérieure
     - Poids variables fluides
  
  3. Accessibilité intégrée
     - Contrastes WCAG AA minimum
     - Focus visible
     - Screen reader support
  
  4. Performance
     - Font-display: swap (Google Fonts)
     - Antialiasing optimisé
     - Chargement asynchrone
*/