/* ==========================================================================
   CHART GRAPHIQUE TRANSILIO - Fichier CSS dédié
   ========================================================================== */

/*
   Palette de couleurs Transilio
   ----------------------------
   Bleu Transilio: #0F1459
   Rouge Transilio: #FF5340
   Blanc: #FFFFFF

   Couleurs secondaires:
   Noir: #000000
   Bleu Electrique: #2F3CED
   Bleu pastel: #F0F1FF
   Rouge foncé: #730B00
   Rouge pastel: #FFEDEB
*/

/* Variables CSS pour la palette de couleurs */
:root {
    /* Couleurs primaires */
    --tr-blue-primary: #0F1459;
    --tr-red-primary: #FF5340;
    --tr-white: #FFFFFF;

    /* Couleurs secondaires */
    --tr-black: #000000;
    --tr-blue-electric: #2F3CED;
    --tr-blue-pastel: #F0F1FF;
    --tr-dark-red: #730B00;
    --tr-pastel-red: #FFEDEB;

    /* Couleurs dérivées */
    --tr-blue-light: rgba(15, 20, 89, 0.1);
    --tr-red-light: rgba(255, 83, 64, 0.1);
    --tr-text-dark: #333333;
    --tr-text-light: #666666;
    --tr-border-color: #E0E0E0;
}

/* Système de typographie */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* Base styles */
html {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--tr-text-dark);
}

/* Text content styles */
p, .section-subtitle, .formation-description {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--tr-text-dark);
    margin-bottom: 1em;
}

/* Advantages section : fond sombre -> textes clairs */
.advantages-section .section-title {
    color: #FFFFFF;
}

.advantages-section .advantage-title {
    color: #FFFFFF;
}

.advantages-section .advantage-description {
    color: rgba(255, 255, 255, 0.85);
}

.advantages-section .section-intro {
    color: rgba(255, 255, 255, 0.8);
}

/* Compliance section : fond sombre */
.compliance-section .section-title,
.compliance-section h3 {
    color: #FFFFFF;
}

.compliance-section p {
    color: rgba(255, 255, 255, 0.8);
}

/* Hero section : fond sombre */
.hero-how,
.hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

/* Enhanced line-height for better readability */
.long-text, .section-intro, .formation-topics {
    line-height: 1.7;
    font-weight: 400;
}

.section-subtitle {
    font-size: 0.9375rem;
    font-style: italic;
    color: var(--tr-blue-primary);
    opacity: 0.8;
    line-height: 1.7;
}

/* Spacing improvements */
h1 + p, h2 + p, h3 + p {
    margin-top: 0.5em;
}

/* Titres avec Space Grotesk */
h1, h2, h3, h4, h5, h6,
.section-title,
.advantage-title,
.formation-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

/* Couleur des titres : bleu Transilio par défaut */
.section-title,
.advantage-title,
.formation-title {
    color: var(--tr-blue-primary);
}

/* Hero title en rouge Transilio */
.hero-title {
    color: var(--tr-red-primary);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Section titles specific styles */
.section-title {
    font-size: clamp(1.625rem, 3vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.4px;
    text-align: center;
    margin-bottom: 1rem;
}

/* Styles de base améliorés */
body {
    background-color: var(--tr-white);
    color: var(--tr-text-dark);
}

/* Liens */
a {
    color: var(--tr-blue-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--tr-blue-electric);
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: 'Inter', sans-serif;
}

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

.btn-primary:hover {
    background-color: var(--tr-blue-electric);
    color: var(--tr-white);
}

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

.btn-secondary:hover {
    background-color: var(--tr-dark-red);
    color: var(--tr-white);
}

/* Action elements */
.action-element {
    background-color: var(--tr-red-primary);
    color: var(--tr-white);
}

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

.action-border {
    border-color: var(--tr-red-primary);
}

/* Secondary elements */
.secondary-element {
    background-color: var(--tr-blue-pastel);
    color: var(--tr-blue-primary);
}

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

.secondary-bg {
    background-color: var(--tr-blue-pastel);
}

/* High contrast text for accessibility */
.high-contrast {
    color: var(--tr-black) !important;
    background-color: var(--tr-white) !important;
}

/* Ensure text is readable on all backgrounds */
@media (prefers-contrast: high) {
    .section-title,
    h1, h2, h3 {
        color: var(--tr-black);
    }

    p, .section-subtitle {
        color: var(--tr-text-dark);
    }
}

/* Cartes et sections */
.card {
    background-color: var(--tr-white);
    border: 1px solid var(--tr-border-color);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Header */
.header {
    background-color: var(--tr-blue-primary);
    color: var(--tr-white);
    padding: 16px 0;
}

/* Footer */
.footer {
    background-color: var(--tr-blue-primary);
    color: var(--tr-white);
    padding: 32px 0;
    margin-top: 64px;
}

/* Primary elements */
.primary-element {
    background-color: var(--tr-blue-primary);
    color: var(--tr-white);
}

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

.primary-border {
    border-color: var(--tr-blue-primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .card {
        padding: 16px;
    }
}

/* FAQ page contrast overrides */
.hero-section .faq-container .faq-item {
    background: rgba(240, 241, 255, 0.65) !important;
    color: var(--tr-blue-primary) !important;
}

.hero-section .faq-container .faq-question,
.hero-section .faq-container .faq-answer,
.hero-section .faq-container .faq-answer p,
.hero-section .faq-container .faq-answer li,
.hero-section .faq-container .faq-answer small,
.hero-section .faq-container .faq-answer strong {
    color: var(--tr-blue-primary) !important;
}

.hero-section .faq-container .faq-answer a {
    color: var(--tr-dark-red) !important;
}

.method-letter {
    color: var(--tr-red-primary) !important;
    font-weight: 800;
}

.method-name {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.18em;
    max-width: 100%;
    padding: 0.45rem 0.75rem;
    margin: 0 0.2rem 0.35rem 0;
    color: var(--tr-white);
    background: var(--tr-blue-primary);
    border: 1px solid rgba(255, 83, 64, 0.45);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 20, 89, 0.18);
    font-style: normal;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.method-name .method-letter {
    color: var(--tr-red-primary) !important;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.18em;
    font-weight: 900;
    letter-spacing: 0.04em;
}
