/* ============================================
   DAGDA TEMPLATE - Typography
   Fonts, headings, texte
   ============================================ */

@layer base {
  /* Typographie système moderne */
  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--text-base);
    color: var(--text-primary);
    background-color: var(--bg-primary);
  }

  /* Headings */
  h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.02em;
  }

  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
  h4 { font-size: var(--text-lg); }
  h5, h6 { font-size: var(--text-base); }

  /* Paragraphes */
  p {
    max-width: 65ch;
  }

  /* Code */
  code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    font-size: 0.9em;
    padding: 0.125rem 0.375rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--prim-bright);
  }

  pre {
    padding: var(--space-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow-x: auto;
    
    code {
      padding: 0;
      background: none;
      border: none;
      color: green;
      /*color: var(--text-primary);*/
    }
  }

  /* Links */
  a {
    color: var(--prim);
    transition: color var(--transition-fast);
    
    &:hover {
      color: var(--prim-bright);
    }
  }

  /* Selection */
  ::selection {
    background: var(--prim-dim);
    color: var(--text-primary);
  }
  
  /* Focus states - Accessibilité */
  :focus-visible {
    outline: 2px solid var(--prim-bright);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
  }
  
  /* Reduce motion pour accessibilité */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
  
  /* ========== TYPOGRAPHY COMPONENTS ========== */
  
  /* Hero typography */
  .hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
  }
  
  /* Article typography */
  .article-body {
    font-size: 1.1rem;
    line-height: 1.8;
  }
  
  /* Meta information */
  .meta-info {
    display: flex;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
  }
  
  /* Section titles */
  .section-title {
    margin-bottom: 2rem;
  }
  
  .subsection-title {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
  }
  
  /* Logo link */
  .logo-link {
    font-weight: 600;
    font-size: 1.25rem;
  }
}