/* ========================================
   OPTIMISATIONS FINALES - ESPRIT TOURELLOIS
   Améliore cohérence, espacement et lisibilité
   ======================================== */

/* ========================================
   HIÉRARCHIE TYPOGRAPHIQUE HARMONISÉE
   ======================================== */

/* Tous les H2 - Style uniforme */
h2 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* H2 dans sections principales */
.intro-section h2,
.team-section h2,
.voting-section h2 {
    font-size: 2.2rem;
}

/* H3 - Sous-titres */
h3 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--color-dark);
    margin-bottom: 0.8rem;
}

/* H4 - Petits titres */
h4 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-dark);
    margin-bottom: 0.6rem;
}

/* ========================================
   ESPACEMENT HARMONISÉ
   ======================================== */

/* Sections principales */
section {
    padding: var(--spacing-lg) 0;
}

/* En-têtes de section */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-gray);
    line-height: 1.6;
    margin-top: 1rem;
}

/* ========================================
   BOUTONS UNIFORMISÉS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 77, 143, 0.3);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* ========================================
   AMÉLIORATION LISIBILITÉ MOBILE
   ======================================== */

@media (max-width: 768px) {
    /* Titres plus petits sur mobile */
    h2 {
        font-size: 1.8rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    /* Sections moins espacées */
    section {
        padding: 3rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    /* Texte légèrement plus grand pour lecture mobile */
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    
    /* Boutons full-width sur mobile */
    .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
    }
}

/* ========================================
   CARTES CANDIDATS - COHÉRENCE
   ======================================== */

.candidate-card-main h2,
.candidate-card-support h2 {
    font-family: var(--font-display);
    font-weight: 900;
    line-height: 1.1;
}

.candidate-card-main p,
.candidate-card-support p {
    line-height: 1.6;
}

/* ========================================
   AMÉLIORATION ACCESSIBILITÉ
   ======================================== */

/* Focus visible pour navigation clavier */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

/* Contraste amélioré */
.hero-subtitle,
.section-subtitle {
    color: var(--color-gray);
}

/* ========================================
   MICRO-AJUSTEMENTS PROFESSIONNELS
   ======================================== */

/* Ombres uniformes */
.team-member,
.candidate-card-main,
.candidate-card-support {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

/* Espacement cohérent dans les cartes */
.intro-content,
.letter-content {
    max-width: 800px;
    margin: 0 auto;
}

/* ========================================
   OPTIMISATION PERFORMANCE
   ======================================== */

/* Will-change pour animations fluides */
.team-member,
.btn {
    will-change: transform;
}

/* Lazy loading optimisé */
img[loading="lazy"] {
    content-visibility: auto;
}
