/* Typographie avancée */

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

/* Variables typographiques */
:root {
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    
    /* Échelle typographique modulaire */
    --text-xs: 0.75rem;     /* 12px */
    --text-sm: 0.875rem;    /* 14px */
    --text-base: 1rem;      /* 16px */
    --text-lg: 1.125rem;    /* 18px */
    --text-xl: 1.25rem;     /* 20px */
    --text-2xl: 1.5rem;     /* 24px */
    --text-3xl: 1.875rem;   /* 30px */
    --text-4xl: 2.25rem;    /* 36px */
    --text-5xl: 3rem;       /* 48px */
    --text-6xl: 3.75rem;    /* 60px */
    --text-7xl: 4.5rem;     /* 72px */
    --text-8xl: 6rem;       /* 96px */
    
    /* Hauteurs de ligne */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
    
    /* Espacement des lettres */
    --tracking-tighter: -0.05em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0em;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;
}

/* Classe de base pour le body */
body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    font-weight: 400;
    letter-spacing: var(--tracking-normal);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hiérarchie des titres */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    margin-bottom: 0.5em;
    color: var(--text-light);
}

h1 {
    font-size: var(--text-6xl);
    font-weight: 800;
    letter-spacing: var(--tracking-tighter);
    line-height: var(--leading-none);
}

h2 {
    font-size: var(--text-4xl);
    font-weight: 700;
}

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

h4 {
    font-size: var(--text-xl);
    font-weight: 600;
}

h5 {
    font-size: var(--text-lg);
    font-weight: 500;
}

h6 {
    font-size: var(--text-base);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

/* Paragraphes et texte */
p {
    margin-bottom: 1em;
    line-height: var(--leading-relaxed);
    color: var(--text-muted);
}

p.lead {
    font-size: var(--text-lg);
    font-weight: 300;
    line-height: var(--leading-relaxed);
    color: var(--text-light);
}

/* Texte de citation */
blockquote {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-style: italic;
    font-weight: 300;
    line-height: var(--leading-relaxed);
    margin: 2rem 0;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

blockquote p {
    margin-bottom: 0;
    color: var(--text-light);
}

/* Code et éléments monospace */
code, kbd, samp, pre {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

code {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-light);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-weight: 500;
}

pre {
    background: var(--light-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    overflow-x: auto;
    line-height: var(--leading-relaxed);
    margin: 1.5rem 0;
}

pre code {
    background: none;
    padding: 0;
    color: var(--text-light);
}

/* Listes */
ul, ol {
    margin-bottom: 1em;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5em;
    line-height: var(--leading-relaxed);
    color: var(--text-muted);
}

/* Listes personnalisées pour le design tech */
.tech-list {
    list-style: none;
    padding-left: 0;
}

.tech-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.tech-list li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--primary-light);
    font-weight: bold;
}

/* Liens - version améliorée */
a {
    color: #cbd5e1;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

a:hover {
    color: #f1f5f9;
    text-decoration: none;
}

/* Classes utilitaires pour la typographie */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* Tailles de police */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }
.text-6xl { font-size: var(--text-6xl); }

/* Poids de police */
.font-thin { font-weight: 100; }
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }

/* Hauteurs de ligne */
.leading-none { line-height: var(--leading-none); }
.leading-tight { line-height: var(--leading-tight); }
.leading-snug { line-height: var(--leading-snug); }
.leading-normal { line-height: var(--leading-normal); }
.leading-relaxed { line-height: var(--leading-relaxed); }
.leading-loose { line-height: var(--leading-loose); }

/* Espacement des lettres */
.tracking-tighter { letter-spacing: var(--tracking-tighter); }
.tracking-tight { letter-spacing: var(--tracking-tight); }
.tracking-normal { letter-spacing: var(--tracking-normal); }
.tracking-wide { letter-spacing: var(--tracking-wide); }
.tracking-wider { letter-spacing: var(--tracking-wider); }
.tracking-widest { letter-spacing: var(--tracking-widest); }

/* Couleurs de texte */
.text-light { color: var(--text-light); }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-light); }
.text-secondary { color: var(--secondary-color); }
.text-accent { color: var(--accent-color); }

/* Transformations de texte */
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }
.normal-case { text-transform: none; }

/* Styles spéciaux - version améliorée */
.gradient-text {
    background: linear-gradient(135deg, #f8fafc 0%, #94a3b8 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.gradient-text-secondary {
    background: linear-gradient(135deg, #f8fafc 0%, #8b5cf6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.text-glow {
    text-shadow: 0 0 20px currentColor;
}

/* Style pour le code inline tech - version subtile */
.tech-highlight {
    background: rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
    padding: 0.2em 0.6em;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-weight: 500;
    border: 1px solid rgba(148, 163, 184, 0.2);
    transition: all 0.3s ease;
    display: inline-block;
    margin: 0.2rem;
}

.tech-highlight:hover {
    background: rgba(148, 163, 184, 0.15);
    color: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.3);
}

/* Badge container */
.badge-container {
    margin-top: 1.5rem;
}

/* Badge/Tag styling */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    border-radius: 9999px;
    background: var(--gradient-tech);
    color: white;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Responsive typography */
@media (max-width: 768px) {
    :root {
        --text-6xl: 2.5rem;
        --text-5xl: 2rem;
        --text-4xl: 1.75rem;
        --text-3xl: 1.5rem;
    }
    
    h1 { font-size: var(--text-5xl); }
    h2 { font-size: var(--text-3xl); }
    h3 { font-size: var(--text-xl); }
    
    body { font-size: 0.9rem; }
}
