/*
 * Mayage Typography System
 * Basé sur la charte graphique Mayage : Comfortaa + Nunito
 */

/* ==========================================================================
   CHARGEMENT DES POLICES - CORRECTION
   ========================================================================== */

/* Import correct des Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;400;500;600;700&family=Nunito:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================================
   VARIABLES TYPOGRAPHIQUES
   ========================================================================== */

:root {
    /* Familles de polices selon charte Mayage */
    --font-logo: 'Comfortaa', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Monaco', 'Consolas', 'Liberation Mono', monospace;
    
    /* Poids de polices */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    /* Hauteurs de ligne */
    --line-height-tight: 1.2;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    --line-height-loose: 2;
    
    /* Échelle typographique modulaire (ratio 1.25) */
    --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 */
    
    /* Espacement des lettres */
    --tracking-tight: -0.025em;
    --tracking-normal: 0em;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;
    
    /* Couleurs typographiques */
    --text-primary: var(--mayage-gray);
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-inverse: var(--mayage-white);
    --text-accent: var(--mayage-red);
    --text-link: var(--mayage-blue-dark);
    --text-link-hover: var(--mayage-red);
}

/* ==========================================================================
   RESET TYPOGRAPHIQUE
   ========================================================================== */

/* Améliorer le rendu des polices */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Reset des marges par défaut */
h1, h2, h3, h4, h5, h6,
p, blockquote, pre,
ul, ol, dl, dd,
figure, figcaption {
    margin: 0;
    padding: 0;
}

/* ==========================================================================
   TYPOGRAPHIE DE BASE
   ========================================================================== */

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-relaxed);
    color: var(--text-primary);
    letter-spacing: var(--tracking-normal);
}

/* ==========================================================================
   TITRES (COMFORTAA)
   ========================================================================== */

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-logo);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--text-primary);
    letter-spacing: var(--tracking-tight);
    margin-bottom: 1rem;
}

h1, .h1 {
    font-size: clamp(var(--text-3xl), 5vw, var(--text-6xl));
    font-weight: var(--font-weight-extrabold);
    margin-bottom: 1.5rem;
}

h2, .h2 {
    font-size: clamp(var(--text-2xl), 4vw, var(--text-5xl));
    font-weight: var(--font-weight-bold);
    margin-bottom: 1.25rem;
}

h3, .h3 {
    font-size: clamp(var(--text-xl), 3vw, var(--text-4xl));
    font-weight: var(--font-weight-bold);
    margin-bottom: 1rem;
}

h4, .h4 {
    font-size: clamp(var(--text-lg), 2.5vw, var(--text-3xl));
    font-weight: var(--font-weight-semibold);
    margin-bottom: 0.875rem;
}

h5, .h5 {
    font-size: clamp(var(--text-base), 2vw, var(--text-2xl));
    font-weight: var(--font-weight-semibold);
    margin-bottom: 0.75rem;
}

h6, .h6 {
    font-size: clamp(var(--text-sm), 1.5vw, var(--text-xl));
    font-weight: var(--font-weight-medium);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
}

/* ==========================================================================
   PARAGRAPHES ET TEXTE COURANT
   ========================================================================== */

p {
    font-size: var(--text-base);
    line-height: var(--line-height-relaxed);
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.lead {
    font-size: var(--text-lg);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-relaxed);
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.text-large {
    font-size: var(--text-lg);
    line-height: var(--line-height-normal);
}

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

.text-xs {
    font-size: var(--text-xs);
    line-height: var(--line-height-snug);
}

/* ==========================================================================
   EMPHASES ET VARIANTES
   ========================================================================== */

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

em, i, .font-italic {
    font-style: italic;
}

.font-light {
    font-weight: var(--font-weight-light);
}

.font-medium {
    font-weight: var(--font-weight-medium);
}

.font-semibold {
    font-weight: var(--font-weight-semibold);
}

.font-extrabold {
    font-weight: var(--font-weight-extrabold);
}

/* ==========================================================================
   COULEURS DE TEXTE
   ========================================================================== */

.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-muted {
    color: var(--text-muted);
}

.text-inverse {
    color: var(--text-inverse);
}

.text-accent {
    color: var(--text-accent);
}

.text-mayage-red {
    color: var(--mayage-red);
}

.text-mayage-blue {
    color: var(--mayage-blue-dark);
}

.text-mayage-green {
    color: var(--mayage-green-dark);
}

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

a {
    color: var(--text-link);
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover,
a:focus {
   color: white;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

a:focus-visible {
    outline: 2px solid var(--mayage-blue-light);
    outline-offset: 2px;
    border-radius: 3px;
}

/* Liens dans le texte inverse */
.text-inverse a {
    color: var(--text-inverse);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.5);
}

.text-inverse a:hover {
    text-decoration-color: var(--mayage-green-light);
}

/* ==========================================================================
   LISTES
   ========================================================================== */

ul, ol {
    margin: 0 0 1.5rem 1.5rem;
    padding: 0;
}

li {
    margin-bottom: 0.5rem;
    line-height: var(--line-height-normal);
}

/* Listes sans puces */
.list-none {
    list-style: none;
    margin-left: 0;
}

/* Listes stylisées Mayage */
.list-mayage {
    list-style: none;
    margin-left: 0;
}

.list-mayage li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.list-mayage li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 6px;
    height: 6px;
    background-color: var(--mayage-red);
    border-radius: 50%;
    transform: translateY(-50%);
}

/* ==========================================================================
   CITATIONS ET BLOCKQUOTES
   ========================================================================== */

blockquote {
    font-size: var(--text-lg);
    font-style: italic;
    line-height: var(--line-height-relaxed);
    color: var(--text-secondary);
    border-left: 4px solid var(--mayage-blue-light);
    padding: 1.5rem 0 1.5rem 2rem;
    margin: 2rem 0;
    background-color: rgba(42, 184, 203, 0.05);
}

blockquote p:last-child {
    margin-bottom: 0;
}

blockquote cite {
    display: block;
    font-size: var(--text-sm);
    font-style: normal;
    font-weight: var(--font-weight-medium);
    color: var(--text-muted);
    margin-top: 1rem;
}

blockquote cite::before {
    content: '— ';
}

/* Citation testimonial */
.testimonial-quote {
    font-family: var(--font-logo);
    font-size: var(--text-xl);
    text-align: center;
    border: none;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(42, 184, 203, 0.1), rgba(149, 193, 31, 0.1));
    border-radius: 1rem;
    position: relative;
}

.testimonial-quote::before {
    content: '"';
    font-size: 4rem;
    color: var(--mayage-red);
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    line-height: 1;
}

/* ==========================================================================
   CODE ET MONOSPACE
   ========================================================================== */

code, kbd, samp, pre {
    font-family: var(--font-mono);
    font-size: 0.875em;
}

code {
    background-color: var(--mayage-light-gray);
    color: var(--mayage-red);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: var(--font-weight-medium);
}

pre {
    background-color: var(--mayage-gray);
    color: var(--mayage-white);
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    line-height: var(--line-height-normal);
    margin: 1.5rem 0;
}

pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
}