/**
 * ═══════════════════════════════════════════════════════════
 * ROUND TRIP INSTITUT - TYPOGRAPHIE PROFESSIONNELLE
 * Google Fonts : Poppins (titres) + Inter (texte)
 * Style moderne, élégant et international
 * ═══════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════
   IMPORT GOOGLE FONTS
   ═══════════════════════════════════════════════════════════ */

/* Poppins - Pour les titres (Moderne, géométrique, impact) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

/* Inter - Pour le texte (Lisible, moderne, conçu pour l'écran) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ═══════════════════════════════════════════════════════════
   APPLICATION GLOBALE DE LA TYPOGRAPHIE
   ═══════════════════════════════════════════════════════════ */

/* Body - Police de base */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    letter-spacing: -0.01em;
    color: var(--rti-gray-800);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Tous les titres - Police Poppins */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--rti-gray-900);
    margin-bottom: 1rem;
}

/* H1 - Titre principal */
h1, .h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

/* H2 - Titre de section */
h2, .h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

/* H3 - Sous-titre important */
h3, .h3 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.015em;
    margin-bottom: 1rem;
}

/* H4 - Sous-titre */
h4, .h4 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
    margin-bottom: 0.875rem;
}

/* H5 - Petit titre */
h5, .h5 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

/* H6 - Mini titre */
h6, .h6 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

/* Paragraphes - Styles par défaut (faible spécificité) */
p {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: -0.01em;
    margin-bottom: 1.25rem;
    color: var(--rti-gray-700);
}

/* Texte large (lead) */
.lead, .intro-text, .rti-text-lg {
    font-size: 1.4rem;
    line-height: 1.7;
    font-weight: 400;
    color: var(--rti-gray-700);
    letter-spacing: -0.015em;
}

/* Texte small */
small, .small, .rti-text-sm {
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Texte extra small */
.text-xs {
    font-size: 0.75rem;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   POIDS DE POLICE (Font Weights)
   ═══════════════════════════════════════════════════════════ */

.font-light { font-weight: 300; }
.font-regular { 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; }

/* ═══════════════════════════════════════════════════════════
   STYLES DE TEXTE SPÉCIAUX
   ═══════════════════════════════════════════════════════════ */

/* Strong / Bold */
strong, b {
    font-weight: 600;
    color: var(--rti-gray-900);
}

/* Emphase */
em, i {
    font-style: italic;
}

/* Links */
a {
    font-weight: 500;
    color: var(--rti-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--rti-blue-dark);
    text-decoration: underline;
}

/* Citations */
blockquote {
    font-family: 'Poppins', serif;
    font-size: 1.25rem;
    font-weight: 500;
    font-style: italic;
    line-height: 1.6;
    padding-left: 2rem;
    border-left: 4px solid var(--rti-blue);
    margin: 2rem 0;
    color: var(--rti-gray-800);
}

/* Code inline */
code {
    font-family: 'Courier New', monospace;
    font-size: 0.875em;
    padding: 0.2em 0.4em;
    background: var(--rti-gray-100);
    border-radius: 3px;
    color: var(--rti-red);
}

/* Listes */
ul, ol {
    font-family: 'Inter', sans-serif;
    line-height: 1.8;
    /*margin-bottom: 1.5rem;*/
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
    color: var(--rti-gray-700);
}

/* ═══════════════════════════════════════════════════════════
   BOUTONS - Typographie
   ═══════════════════════════════════════════════════════════ */

button, .button, .btn, .rti-btn,
input[type="submit"],
input[type="button"] {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════════════════════
   DIVI OVERRIDES - Forcer la typographie sur Divi
   ═══════════════════════════════════════════════════════════ */

/* Titres Divi */
.et_pb_text h1, .et_pb_text h2, .et_pb_text h3,
.et_pb_text h4, .et_pb_text h5, .et_pb_text h6,
.et_pb_module h1, .et_pb_module h2, .et_pb_module h3,
.et_pb_module h4, .et_pb_module h5, .et_pb_module h6 {
    font-family: 'Poppins', sans-serif !important;
}

/* Texte Divi - Sans !important pour permettre les overrides */
.et_pb_text:not([style*="font-family"]) p:not([style*="font-family"]),
.et_pb_module:not([style*="font-family"]) p:not([style*="font-family"]) {
    font-family: 'Inter', sans-serif;
}

/* Permettre aux styles inline Divi de prendre le dessus */
.et_pb_module[style],
.et_pb_module [style],
.et_pb_text[style],
.et_pb_text [style] {
    /* Les styles inline de Divi ont maintenant la priorité */
}

/* Menu Divi */
#main-header, #et-top-navigation,
.et_mobile_menu, #mobile_menu {
    font-family: 'Inter', sans-serif !important;
}

#top-menu li a, #et-top-navigation nav > ul > li > a {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
}

/* Boutons Divi */
.et_pb_button, .et_pb_module .et_pb_button {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
}

/* ═══════════════════════════════════════════════════════════
   CLASSES UTILITAIRES
   ═══════════════════════════════════════════════════════════ */

/* Force la police de titre */
.font-heading {
    font-family: 'Poppins', sans-serif !important;
}

/* Force la police de texte */
.font-body {
    font-family: 'Inter', sans-serif !important;
}

/* Letterspacing */
.tracking-tight { letter-spacing: -0.05em; }
.tracking-normal { letter-spacing: 0; }
.tracking-wide { letter-spacing: 0.05em; }
.tracking-wider { letter-spacing: 0.1em; }

/* Line height */
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.75; }
.leading-loose { line-height: 2; }

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

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE - Ajustements Mobile
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    h1, .h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    h2, .h2 {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
    }

    h3, .h3 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .lead, .intro-text, .rti-text-lg {
        font-size: 1.125rem;
    }

    blockquote {
        font-size: 1.125rem;
        padding-left: 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════
   PERFORMANCE - Font Loading
   ═══════════════════════════════════════════════════════════ */

/* Preload critical fonts */
@font-face {
    font-family: 'Inter';
    font-display: swap; /* Affiche le texte immédiatement avec une police système */
}

@font-face {
    font-family: 'Poppins';
    font-display: swap;
}

/* ═══════════════════════════════════════════════════════════
   ACCESSIBILITÉ
   ═══════════════════════════════════════════════════════════ */

/* Focus visible pour accessibilité clavier */
*:focus-visible {
    outline: 2px solid var(--rti-blue);
    outline-offset: 2px;
}

/* Sélection de texte */
::selection {
    background: var(--rti-blue-light);
    color: var(--rti-blue-dark);
}

::-moz-selection {
    background: var(--rti-blue-light);
    color: var(--rti-blue-dark);
}
