/**
 * ═══════════════════════════════════════════════════════════
 * 🎨 CORRECTIONS COULEURS - BSN FINANCEMENT 2025
 * Résolution des problèmes de lisibilité et backgrounds
 * ═══════════════════════════════════════════════════════════
 */

/* ─────────────────────────────────────────────────────────── */
/* 1. CORRECTION BACKGROUNDS BLEUS PROBLÉMATIQUES              */
/* ─────────────────────────────────────────────────────────── */

/* Remplacer les fonds bleus par des fonds clairs avec texte sombre */
body {
    background: #f5f7fa !important;
    color: #1f2937 !important;
}

/* ─────────────────────────────────────────────────────────── */
/* CONTRASTE FORT POUR TEXTE SUR FOND COLORÉ                  */
/* ─────────────────────────────────────────────────────────── */

/* RÈGLE UNIVERSELLE: Tout élément avec fond coloré → texte blanc */
[style*="background: linear-gradient"],
[style*="background:linear-gradient"],
[style*="background: rgb"],
[style*="background:rgb"],
[style*="background: #667"],
[style*="background: #764"],
[style*="background: #5"],
[style*="background: #4"],
[style*="background: #3"],
[style*="background-color: #"],
[class*="gradient"],
[class*="bg-primary"],
[class*="bg-secondary"],
[class*="bg-color"],
.hero-content,
.hero-section,
.colored-bg {
    color: #000000 !important;
}

/* Tous les enfants de ces éléments aussi */
[style*="background: linear-gradient"] *,
[style*="background:linear-gradient"] *,
[style*="background: rgb"] *,
[style*="background: #667"] *,
[style*="background: #764"] *,
[style*="background-color: #"] *,
.hero-content *,
.colored-bg * {
    color: #000000 !important;
}

/* Titres sur fond coloré */
[style*="background: linear-gradient"] h1,
[style*="background: linear-gradient"] h2,
[style*="background: linear-gradient"] h3,
[style*="background: linear-gradient"] h4,
[style*="background: linear-gradient"] p,
[style*="background: linear-gradient"] span,
[style*="background: linear-gradient"] a,
[style*="background-color"] h1,
[style*="background-color"] h2,
[style*="background-color"] h3,
[style*="background:#"] h1,
[style*="background:#"] h2,
[style*="background:#"] h3,
[style*="background:#"] p,
.hero-content h1,
.hero-content h2,
.hero-content h3,
.hero-content p,
.hero-content span,
.hero-content a {
    color: #000000 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* Icônes et emojis aussi */
[style*="background: linear-gradient"] .icon,
[style*="background: linear-gradient"] .emoji,
[style*="background-color"] .icon {
    color: #000000 !important;
    filter: brightness(1) !important;
}

/* ─────────────────────────────────────────────────────────── */
/* HEADER PUBLIC - BOUTONS CLAIRS ET LISIBLES                 */
/* ─────────────────────────────────────────────────────────── */

.site-header,
.public-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 8px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky !important;
    top: 0 !important;
    z-index: 4000 !important;
}

.public-header .header-content {
    padding: 2px 0 !important;
}

/* Etendre le header public sur toute la largeur */
.public-header .container {
    max-width: 100% !important;
    padding: 0 12px !important;
}

.header-content {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
}

.main-nav {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

/* Forcer la tenue sur une seule ligne et éviter les débordements */
.main-nav,
.header-actions {
    min-width: 0 !important;
}

.main-nav {
    flex: 1 1 auto !important;
    justify-content: center !important;
}

.header-actions {
    flex: 0 0 auto !important;
}

.nav-link,
.main-nav a,
.nav-dropdown>a {
    color: #ffffff !important;
    font-weight: 500 !important;
    padding: 6px 10px !important;
    font-size: inherit !important;
    border-radius: 6px !important;
    transition: all 0.3s !important;
    text-decoration: none !important;
    display: inline-block !important;
    white-space: nowrap !important;
}

/* Public header: encore plus compact (FR = EN en una sola línea) */
.public-header .brand-logo-img {
    height: 200px !important;
    width: 200px !important;
    object-fit: contain !important;
}

.public-header .nav-link,
.public-header .main-nav a,
.public-header .nav-dropdown>a {
    padding: 8px 12px !important;
    font-size: inherit !important;
}

.public-header .main-nav {
    gap: 8px !important;
}

.public-header .header-actions .btn {
    padding: 8px 12px !important;
    font-size: 14px !important;
}

/* Réduction supplémentaire pour garantir une seule ligne */
.public-header .header-content {
    overflow: visible !important;
}

.public-header .brand {
    flex: 0 0 auto !important;
    min-width: 0 !important;
}

.public-header .main-nav {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.public-header .header-actions {
    flex: 0 0 auto !important;
    min-width: 0 !important;
}

.public-header #language-selector-btn {
    padding: 6px 10px !important;
    font-size: inherit !important;
}

.public-header .nav-link,
.public-header .main-nav a,
.public-header .nav-dropdown>a {
    padding: 8px 12px !important;
    font-size: 14px !important;
}

/* Desktop: rester sur une seule ligne avec logo 100x100 */
@media (min-width: 769px) {
    .public-header .header-content {
        flex-wrap: nowrap !important;
    }

    .public-header .main-nav {
        gap: 6px !important;
    }

    .public-header .nav-link,
    .public-header .main-nav a,
    .public-header .nav-dropdown>a {
        padding: 6px 8px !important;
    }

    .public-header .header-actions .btn {
        padding: 6px 8px !important;
    }

    /* Hauteur fixe 85px (logo 100x100 peut dépasser visuellement) */
    .site-header.public-header,
    .public-header {
        height: 85px !important;
        overflow: visible !important;
    }

    .site-header.public-header .header-content,
    .public-header .header-content {
        height: 85px !important;
    }
}

/* Mobile: min-height 250px, wrap, pas de défilement horizontal */
@media (max-width: 768px) {

    html,
    body {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .public-header {
        min-height: 250px !important;
    }

    .public-header .header-content {
        flex-wrap: wrap !important;
        row-gap: 4px !important;
    }

    .public-header .brand {
        flex: 1 1 100% !important;
        display: flex !important;
        justify-content: center !important;
    }

    .public-header .main-nav {
        flex: 1 1 100% !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        white-space: normal !important;
    }

    .public-header .header-actions {
        flex: 1 1 100% !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        white-space: normal !important;
    }

    .public-header .nav-link,
    .public-header .main-nav a,
    .public-header .nav-dropdown>a {
        padding: 4px 8px !important;
    }

    .public-header .header-actions .btn {
        padding: 4px 8px !important;
        font-size: 13px !important;
    }

    /* Boutons dimensionnés selon le texte (auto) */
    .public-header #language-selector-btn {
        width: 51.9px !important;
        min-width: 51.9px !important;
        text-align: center !important;
    }

    .public-header .header-actions a.btn[href*="/login.html"],
    .public-header .header-actions a.btn[href*="/register-wizard.html"] {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 4px 8px !important;
        font-size: 13px !important;
    }
}

.nav-link:hover,
.main-nav a:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

.header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
}

.header-actions .btn {
    white-space: nowrap !important;
    padding: 6px 12px !important;
    font-size: inherit !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.3s !important;
}

.header-actions .btn-outline {
    background: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.header-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.header-actions .btn-primary {
    background: #ffffff !important;
    color: #667eea !important;
    border: 2px solid #ffffff !important;
}

.header-actions .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Brand Logo */
.brand {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 20px !important;
    flex-shrink: 0 !important;
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    font-weight: 800;
    font-size: 20px;
}

/* Dropdown menus */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    min-width: 200px;
    display: none;
    z-index: 5000 !important;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.nav-dropdown.open .dropdown-menu {
    display: block !important;
}

.dropdown-menu a {
    display: block !important;
    padding: 10px 20px !important;
    color: #1f2937 !important;
    text-decoration: none;
    transition: all 0.3s;
}

.dropdown-menu a:hover {
    background: #f3f4f6 !important;
    color: #667eea !important;
}

/* ─────────────────────────────────────────────────────────── */
/* CORRECTIONS SVG ET BOUTONS INDEX.PHP                       */
/* ─────────────────────────────────────────────────────────── */

/* Tous les SVG doivent être visibles (pas gris) */
svg {
    color: currentColor !important;
}

.hero svg,
[style*="background: linear-gradient"] svg,
[style*="background:linear-gradient"] svg,
.hero-content svg {
    color: #ffffff !important;
    stroke: currentColor !important;
    fill: currentColor !important;
}

/* SVG sur fond clair */
.service-card svg,
.feature-card svg,
section:not(.hero) svg {
    color: #667eea !important;
    stroke: currentColor !important;
}

/* Bouton Connexion VISIBLE sur index.html - FORCÉ */
.btn-outline,
.public-header .btn-outline,
.header-actions .btn-outline,
a.btn-outline,
header .btn-outline,
[class*="header"] .btn-outline {
    background: transparent !important;
    border: 2px solid #00c !important;
    color: #000000 !important;
    padding: 8px 20px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-block !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

.btn-outline:hover,
.public-header .btn-outline:hover,
.header-actions .btn-outline:hover,
a.btn-outline:hover,
header .btn-outline:hover,
[class*="header"] .btn-outline:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

/* Spécifique: Bouton Connexion (header public) en BLEU */
.public-header .header-actions a.btn.btn-outline.btn-sm[href*="login.html"] {
    color: #1d4ed8 !important;
    /* Bleu */
    border-color: #1d4ed8 !important;
    background: transparent !important;
}

.public-header .header-actions a.btn.btn-outline.btn-sm[href*="login.html"]:hover {
    background: #1d4ed8 !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
}

/* Spécifique: Bouton Ouvrir un compte (header public) en BLEU */
.public-header .header-actions a.btn.btn-primary.btn-sm[href*="register-wizard.html"] {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
}

.public-header .header-actions a.btn.btn-primary.btn-sm[href*="register-wizard.html"]:hover {
    background: #1e40af !important;
    border-color: #1e40af !important;
}

/* Bouton "Ouvrir un compte" (CTA héro) en BLEU comme Connexion */
.public-site .hero .hero-actions a.btn.btn-outline-light[href*="register-wizard.html"] {
    color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    background: transparent !important;
}

.public-site .hero .hero-actions a.btn.btn-outline-light[href*="register-wizard.html"]:hover {
    background: #1d4ed8 !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
}

/* ─────────────────────────────────────────────────────────── */
/* TEXTE CTA BLANC SUR INDEX.PHP - FORCÉ                      */
/* ─────────────────────────────────────────────────────────── */

.cta-section .cta-content h2,
.cta-section .cta-content p,
.cta-content h2,
.cta-content p,
section.cta-section h2,
section.cta-section p {
    color: #ffffff !important;
}

/* ─────────────────────────────────────────────────────────── */
/* CORRECTION TEXTES BLANCS SUR FOND BLANC                    */
/* ─────────────────────────────────────────────────────────── */

/* Tous les boutons DOIVENT être visibles */
.btn,
button,
[type="button"],
[type="submit"],
.button,
a.btn {
    color: #ffffff !important;
    background: #667eea !important;
    border: none !important;
}

/* Fix global pour la traduction: les textes traduits dans les boutons doivent hériter de la couleur du bouton */
.btn *,
button *,
a.btn * {
    color: inherit !important;
}

.btn:hover,
button:hover,
[type="button"]:hover,
[type="submit"]:hover {
    background: #5568d3 !important;
    color: #ffffff !important;
}

/* Boutons secondaires */
.btn-secondary {
    background: #6b7280 !important;
    color: #ffffff !important;
}

/* Textes sur fond BLANC = texte NOIR */
body,
.container,
.card,
.section:not(.hero):not([style*="background: linear-gradient"]):not([style*="background:linear-gradient"]),
section:not(.hero):not([style*="background: linear-gradient"]):not([style*="background:linear-gradient"]) {
    color: #1f2937 !important;
}

/* Titres et paragraphes sur fond blanc */
body h1:not(.hero h1):not([class*="hero"] h1),
body h2:not(.hero h2):not([class*="hero"] h2),
body h3:not(.hero h3):not([class*="hero"] h3),
body p:not(.hero p):not([class*="hero"] p),
.card h1,
.card h2,
.card h3,
.card p {
    color: #1f2937;
}

/* Forcer visibilité des labels et inputs */
label,
.form-label,
input::placeholder,
textarea::placeholder {
    color: #374151 !important;
}

input,
textarea,
select {
    color: #1f2937 !important;
    background: #ffffff !important;
}

/* ─────────────────────────────────────────────────────────── */
/* SECTIONS CTA (CALL TO ACTION) - VISIBILITÉ TOTALE          */
/* ─────────────────────────────────────────────────────────── */

.cta,
.cta-section,
[class*="cta-"],
.call-to-action {
    position: relative;
    overflow: visible;
}

/* Textes CTA sur fond coloré = BLANC et VISIBLE */
.cta *,
.cta-section *,
[class*="cta-"] *,
.call-to-action *,
.cta h1,
.cta h2,
.cta h3,
.cta p,
.cta-content *,
.cta-content h1,
.cta-content h2,
.cta-content h3,
.cta-content p {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
}

/* Boutons CTA VISIBLES au survol */
.cta .btn,
.cta-section .btn,
[class*="cta-"] .btn,
.call-to-action .btn {
    background: #ffffff !important;
    color: #667eea !important;
    border: 2px solid #ffffff !important;
    font-weight: 700 !important;
    padding: 15px 40px !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
}

/* Fix pour la traduction: forcer les enfants (font) à hériter de la couleur du bouton */
.cta .btn *,
.cta-section .btn *,
[class*="cta-"] .btn *,
.call-to-action .btn * {
    color: inherit !important;
    text-shadow: none !important;
}

.cta .btn:hover,
.cta-section .btn:hover,
[class*="cta-"] .btn:hover,
.call-to-action .btn:hover {
    background: #667eea !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

/* Bouton secondaire dans CTA */
.cta .btn-secondary,
.cta-section .btn-secondary {
    background: transparent !important;
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
}

.cta .btn-secondary:hover,
.cta-section .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: #ffffff !important;
}

/* Changer les textes gris en blanc */
.cta [style*="color: #6b7280"],
.cta [style*="color:#6b7280"],
.cta [style*="color: #9ca3af"],
.cta-section [style*="color: #6b7280"],
.cta-section [style*="color: #9ca3af"] {
    color: #ffffff !important;
}

/* Responsive - empêcher les coupures */
@media (min-width: 769px) {
    .header-content {
        flex-wrap: nowrap !important;
    }

    .main-nav {
        flex: 1 !important;
        justify-content: center !important;
        flex-wrap: nowrap !important;
    }

    .mobile-menu-toggle {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .main-nav.open {
        display: flex !important;
        flex-wrap: wrap !important;
    }

    .header-actions {
        gap: 5px;
    }

    .header-actions .btn {
        padding: 6px 12px !important;
        font-size: 13px !important;
    }
}

.container,
.main-content,
.content-wrapper {
    background: transparent !important;
    color: #1f2937 !important;
}

/* Sections avec fond bleu → fond clair */
section[style*="background: blue"],
section[style*="background: #0000ff"],
.bg-blue,
.background-blue {
    background: #f8f9fa !important;
    color: #1f2937 !important;
}

/* Headers et titres - toujours lisibles */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: #1f2937 !important;
}

/* Hero sections - texte blanc sur fond sombre OK */
.hero h1,
.hero h2,
.hero p,
.hero-home h1,
.hero-home h2,
.hero-home p,
.hero-credit h1,
.hero-credit h2,
.hero-credit p,
.hero-corporate h1,
.hero-corporate h2,
.hero-corporate p {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ─────────────────────────────────────────────────────────── */
/* 2. TEXTE ET PARAGRAPHES - TOUJOURS LISIBLES                */
/* ─────────────────────────────────────────────────────────── */

p,
span,
div,
li,
td,
th {
    color: #4b5563;
}

/* Texte sur fond clair */
.text-on-light,
section:not(.hero) p,
section:not(.hero) div {
    color: #4b5563;
}

/* Texte sur fond sombre (hero uniquement) */
.hero p,
.hero div,
.hero span {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Labels et descriptions */
label,
.form-label,
.input-label {
    color: #374151 !important;
    font-weight: 500;
}

/* ─────────────────────────────────────────────────────────── */
/* 3. FORMULAIRES - INPUTS TOUJOURS LISIBLES                  */
/* ─────────────────────────────────────────────────────────── */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
    background: #ffffff !important;
    color: #1f2937 !important;
    border: 1px solid #d1d5db !important;
    padding: 10px 15px;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
textarea::placeholder {
    color: #9ca3af !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    outline: none !important;
}

/* ─────────────────────────────────────────────────────────── */
/* 4. BOUTONS - CONTRASTE OPTIMAL                             */
/* ─────────────────────────────────────────────────────────── */

.btn {
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #667eea !important;
    color: white !important;
    border: 2px solid #667eea !important;
}

.btn-primary:hover {
    background: #5568d3 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #4facfe !important;
    color: white !important;
    border: 2px solid #4facfe !important;
}

.btn-secondary:hover {
    background: #3b9ae8 !important;
}

.btn-outline-primary {
    background: transparent !important;
    color: #667eea !important;
    border: 2px solid #667eea !important;
}

.btn-outline-primary:hover {
    background: #667eea !important;
    color: white !important;
}

.btn-light {
    background: white !important;
    color: #667eea !important;
    border: 2px solid white !important;
}

.btn-outline-light {
    background: transparent !important;
    color: white !important;
    border: 2px solid white !important;
}

.btn-outline-light:hover {
    background: white !important;
    color: #667eea !important;
}

/* ─────────────────────────────────────────────────────────── */
/* 5. CARDS - FOND BLANC MODÉRÉ, TEXTE SOMBRE                 */
/* ─────────────────────────────────────────────────────────── */

.card,
.stat-card,
.account-card,
.transaction-card,
.product-card {
    background: white !important;
    color: #1f2937 !important;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Modération pour dashboard et sections principales */
.dashboard-main,
.admin-main {
    background: #f5f7fa !important;
}

.dashboard-container,
.admin-container {
    background: #f5f7fa !important;
}

.card h3,
.card h4,
.stat-card h3,
.account-card h3 {
    color: #1f2937 !important;
}

.card p,
.stat-card p,
.account-card p {
    color: #6b7280 !important;
}

/* ─────────────────────────────────────────────────────────── */
/* 6. TABLEAUX - LISIBILITÉ MAXIMALE                          */
/* ─────────────────────────────────────────────────────────── */

table {
    width: 100%;
    background: white;
    border-collapse: collapse;
}

thead {
    background: #f8f9fa !important;
}

th {
    color: #374151 !important;
    font-weight: 600;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
}

td {
    color: #4b5563 !important;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
}

tr:hover {
    background: #f9fafb !important;
}

/* ─────────────────────────────────────────────────────────── */
/* 7. SIDEBAR NAVIGATION - CONTRASTE                          */
/* ─────────────────────────────────────────────────────────── */

.sidebar,
.dashboard-sidebar {
    background: #1f2937 !important;
    color: white !important;
}

.sidebar a,
.dashboard-sidebar a,
.sidebar .nav-link,
.dashboard-sidebar .nav-link {
    color: #d1d5db !important;
    text-decoration: none;
    padding: 12px 20px;
    display: block;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar a:hover,
.dashboard-sidebar a:hover,
.sidebar .nav-link:hover,
.dashboard-sidebar .nav-link:hover {
    background: rgba(102, 126, 234, 0.2) !important;
    color: white !important;
}

.sidebar a.active,
.dashboard-sidebar a.active {
    background: #667eea !important;
    color: white !important;
}

/* ─────────────────────────────────────────────────────────── */
/* 8. ALERTS ET MESSAGES - CODES COULEURS CLAIRS             */
/* ─────────────────────────────────────────────────────────── */

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #d1fae5 !important;
    color: #065f46 !important;
    border-left-color: #10b981;
}

.alert-error,
.alert-danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border-left-color: #ef4444;
}

.alert-warning {
    background: #fef3c7 !important;
    color: #92400e !important;
    border-left-color: #f59e0b;
}

.alert-info {
    background: #dbeafe !important;
    color: #1e40af !important;
    border-left-color: #3b82f6;
}

/* ─────────────────────────────────────────────────────────── */
/* 9. BADGES ET TAGS - VISIBLES                               */
/* ─────────────────────────────────────────────────────────── */

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-success,
.badge-active {
    background: #d1fae5 !important;
    color: #065f46 !important;
}

.badge-warning,
.badge-pending {
    background: #fef3c7 !important;
    color: #92400e !important;
}

.badge-danger,
.badge-rejected {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

.badge-info {
    background: #dbeafe !important;
    color: #1e40af !important;
}

/* ─────────────────────────────────────────────────────────── */
/* 10. LIENS - TOUJOURS VISIBLES                              */
/* ─────────────────────────────────────────────────────────── */

a {
    color: #667eea !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #5568d3 !important;
    text-decoration: underline;
}

/* Liens dans hero sections */
.hero a {
    color: white !important;
}

.hero a:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* ─────────────────────────────────────────────────────────── */
/* 11. HEADER / NAVIGATION - FOND BLANC                       */
/* ─────────────────────────────────────────────────────────── */

.site-header,
.public-header {
    background: white !important;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.site-header .nav-link {
    color: #374151 !important;
}

.site-header .nav-link:hover {
    color: #667eea !important;
}

/* ─────────────────────────────────────────────────────────── */
/* 12. FOOTER - FOND SOMBRE, TEXTE CLAIR                      */
/* ─────────────────────────────────────────────────────────── */

.site-footer {
    background: #1f2937 !important;
    color: #d1d5db !important;
}

.site-footer h4 {
    color: white !important;
}

.site-footer a {
    color: #9ca3af !important;
}

.site-footer a:hover {
    color: white !important;
}

/* CTA sections: texte toujours blanc dans .cta-section .container.text-center
   sans modifier les couleurs des boutons existants */
.cta-section .container.text-center h1,
.cta-section .container.text-center h2,
.cta-section .container.text-center h3,
.cta-section .container.text-center h4,
.cta-section .container.text-center p,
.cta-section .container.text-center span {
    color: #ffffff !important;
}

/* Ne pas toucher aux .btn à l’intérieur des CTA : les styles de boutons
   restent ceux définis plus haut (fond clair / texte bleu) */

/* ─────────────────────────────────────────────────────────── */
/* 13. STATS ET VALEURS - MISE EN ÉVIDENCE                    */
/* ─────────────────────────────────────────────────────────── */

.stat-value,
.amount-value,
.balance-amount {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937 !important;
}

.stat-label,
.amount-label {
    font-size: 14px;
    color: #6b7280 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.text-success,
.positive {
    color: #10b981 !important;
}

.text-danger,
.negative {
    color: #ef4444 !important;
}

.text-warning {
    color: #f59e0b !important;
}

/* ─────────────────────────────────────────────────────────── */
/* 14. RESPONSIVE - MAINTENIR LA LISIBILITÉ                   */
/* ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {

    /* Augmenter les contrastes sur mobile */
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 32px !important;
    }

    h2 {
        font-size: 28px !important;
    }

    /* Boutons plus grands sur mobile */
    .btn {
        padding: 12px 24px;
        font-size: 16px;
    }

    /* Inputs plus grands */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px;
        padding: 12px 16px;
    }
}

/* ─────────────────────────────────────────────────────────── */
/* 15. MODE SOMBRE (OPTIONNEL - POUR PLUS TARD)               */
/* ─────────────────────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {

    /* Désactivé pour l'instant - garder mode clair */
    body {
        background: white !important;
        color: #1f2937 !important;
    }
}

/* ─────────────────────────────────────────────────────────── */
/* 16. OVERRIDE STYLES INLINE PROBLÉMATIQUES                  */
/* ─────────────────────────────────────────────────────────── */

/* Force la lisibilité même avec styles inline */
[style*="background: blue"],
[style*="background: #0000ff"],
[style*="background: #00f"] {
    background: #f8f9fa !important;
    color: #1f2937 !important;
}

[style*="color: blue"]:not(.hero *),
[style*="color: #0000ff"]:not(.hero *) {
    color: #667eea !important;
}

/* Correction spécifique: carte Assurance Vie sur fond clair */
.assurance-vie-card h3,
.assurance-vie-card p,
.assurance-vie-card li,
.assurance-vie-card span,
.assurance-vie-card strong {
    color: #1d4ed8 !important;
    text-shadow: none !important;
}

.assurance-vie-card strong {
    color: #1d4ed8 !important;
    text-shadow: none !important;
}

/* ─────────────────────────────────────────────────────────── */
/* 17. FIX LAYOUT HERO HOME + SIMULATEUR SUR MOBILE           */
/* ─────────────────────────────────────────────────────────── */

@media (max-width: 640px) {

    /* Hero home : garantir badge lisible et non coupé */
    .public-site .hero.hero-home {
        min-height: 260px !important;
        max-height: none !important;
        padding-top: 24px !important;
        padding-bottom: 24px !important;
        overflow: visible !important;
    }

    .public-site .hero.hero-home .hero-badge {
        display: block !important;
        white-space: normal !important;
        width: auto !important;
        max-width: calc(100% - 32px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 8px 12px !important;
        text-align: center !important;
        overflow: visible !important;
    }

    /* Simulateur : espacement ultra-compact entre lignes */
    .public-site .simulator-section {
        padding: 12px 0 !important;
    }

    .public-site .simulator {
        padding: 8px 10px 8px !important;
        box-shadow: none !important;
    }

    .public-site .simulator .sim-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
    }

    .public-site .simulator .sim-row label {
        font-size: 12px !important;
        margin-bottom: 0 !important;
        line-height: 1.2 !important;
    }

    .public-site .simulator .sim-row input[type="number"] {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 2px 4px !important;
        font-size: 12px !important;
        height: 24px !important;
        max-height: 24px !important;
        margin: 0 !important;
        line-height: 1.2 !important;
    }

    .public-site .simulator .sim-row span {
        font-size: 11px !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   FIN DES CORRECTIONS COULEURS - BSN FINANCEMENT 2025
   Toutes les pages devraient maintenant être lisibles
   ═══════════════════════════════════════════════════════════ */