/* Variables CSS pour Investor Banque - Palette professionnelle : Bleu sombre dominant, Blanc, Gris */
:root {
    /* Bleu sombre matte - COULEUR DOMINANTE */
    --investor-blue-dark: #2C3E50;   /* Bleu sombre matte principal - DOMINANT */
    --investor-blue: #34495E;        /* Bleu matte moyen */
    --investor-blue-light: #4A6FA5;  /* Bleu matte clair (accents) */
    --investor-blue-soft: #ECF0F1;   /* Bleu très clair (fonds doux) */
    
    /* Blanc - Fond et contraste */
    --investor-white: #FFFFFF;       /* Blanc pur */
    
    /* Gris - Complément subtil seulement */
    --investor-gray-light: #F8F9FA;  /* Gris très clair (fonds alternatifs) */
    --investor-gray-medium: #D5DBDB; /* Gris moyen (bordures subtiles) */
    --investor-gray: #95A5A6;        /* Gris (textes secondaires) */
    --investor-gray-dark: #7F8C8D;   /* Gris foncé (textes tertiaires) */
}

/* Styles globaux */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--investor-white);
    color: var(--investor-blue-dark);
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
}

/* Logo Investor Banque */
.navbar-logo {
    height: 50px;
    width: auto;
    transition: all 0.3s ease;
    filter: brightness(0) invert(1); /* Blanc pour contraste sur fond bleu */
}

.navbar-logo:hover {
    transform: scale(1.05);
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

/* Responsive logo */
@media (max-width: 768px) {
    .navbar-logo {
        height: 40px;
    }
}

/* Boutons Investor Banque - Bleu sombre dominant */
.btn-ecobank, .btn-investor {
    background: var(--investor-blue-dark);
    border: 1px solid var(--investor-blue-dark);
    color: var(--investor-white);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(44, 62, 80, 0.3);
}

.btn-ecobank:hover, .btn-investor:hover {
    background: var(--investor-blue);
    border-color: var(--investor-blue);
    color: var(--investor-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.4);
}

.btn-ecobank:focus,
.btn-ecobank:active,
.btn-investor:focus,
.btn-investor:active {
    background: var(--investor-blue-dark);
    border-color: var(--investor-blue-dark);
    color: var(--investor-white);
    box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.3);
    transform: translateY(0);
}

/* Couleurs de texte */
.text-ecobank {
    color: var(--investor-blue) !important;
}

.text-ecobank-blue {
    color: var(--investor-blue) !important;
}

/* Liens Investor Banque */
a {
    color: var(--investor-blue);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--investor-blue-dark);
    text-decoration: none;
}

/* Titres avec couleurs Investor Banque */
h1, h2, h3, h4, h5, h6 {
    color: var(--investor-blue);
}

/* Badges et étiquettes - Bleu sombre */
.badge-ecobank, .badge-investor {
    background: var(--investor-blue-dark);
    border: 1px solid var(--investor-blue-dark);
    color: var(--investor-white);
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
}

/* Arrière-plans - Bleu sombre dominant */
.bg-ecobank, .bg-investor {
    background: var(--investor-blue-dark) !important;
    box-shadow: 0 2px 10px rgba(44, 62, 80, 0.3);
}

.bg-ecobank-light {
    background-color: var(--investor-gray-light) !important;
}

/* En-têtes de cartes - Bleu sombre dominant */
.card-header-ecobank, .card-header-investor {
    background: var(--investor-blue-dark);
    border-bottom: 2px solid var(--investor-blue);
    font-weight: 600;
    color: var(--investor-white);
    padding: 1.25rem 1.5rem;
}

/* Cartes avec animation - Bleu sombre en accents */
.loan-card,
.card {
    transition: all 0.3s ease;
    border: 1px solid var(--investor-gray-medium);
    background: var(--investor-white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.loan-card:hover,
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.2);
    border-color: var(--investor-blue-dark);
}

/* Badges de statut */
.status-badge {
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
}

/* Formulaires - Focus bleu sombre */
.form-control {
    border: 1px solid var(--investor-gray-medium);
    border-radius: 6px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--investor-blue-dark);
    box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.2);
    outline: none;
}

.form-label {
    color: var(--investor-blue-dark);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-label {
    font-weight: 500;
    color: #333;
}

/* Timeline (pour loan_detail) */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--investor-gray);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
}

.timeline-marker {
    position: absolute;
    left: -37px;
    top: 2px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--investor-gray-light);
    box-shadow: 0 0 0 3px var(--investor-gray-light);
    font-size: 14px;
}

.timeline-item.completed .timeline-marker {
    background: var(--investor-blue-dark);
    box-shadow: 0 0 0 3px var(--investor-blue-soft);
}

.timeline-item.rejected .timeline-marker {
    box-shadow: 0 0 0 3px #dc3545;
}

.timeline-item.pending .timeline-marker {
    box-shadow: 0 0 0 3px #ffc107;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-body {
        padding: 1.5rem 1rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
}

/* Footer - Bleu sombre dominant */
.footer {
    background: var(--investor-blue-dark);
    color: var(--investor-white);
    margin-top: auto;
    border-top: 2px solid var(--investor-blue);
    padding: 3rem 0 2rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--investor-white);
}

.footer h5, .footer h6 {
    color: var(--investor-white);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Tables responsives */
.table-responsive {
    border-radius: 0.5rem;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.table th {
    background-color: var(--investor-blue-dark);
    color: var(--investor-white);
    font-weight: 600;
    border-bottom: 2px solid var(--investor-blue);
    padding: 1rem 0.75rem;
}

.table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: var(--investor-blue-soft);
    border-left: 3px solid var(--investor-blue-dark);
}

/* Alertes personnalisées */
.alert {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.1);
    color: #055160;
    border-left: 4px solid #0dcaf0;
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: #0a3622;
    border-left: 4px solid #198754;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #664d03;
    border-left: 4px solid #ffc107;
}

/* Loading spinner */
.spinner-border-ecobank, .spinner-border-investor {
    border-color: var(--investor-blue);
    border-right-color: transparent;
}

/* Boutons avec icônes */
.btn i {
    margin-right: 0.5rem;
}

/* Cartes statistiques - Bleu sombre dominant */
.stat-card {
    background: var(--investor-blue-dark);
    color: var(--investor-white);
    border: none;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
}

.stat-card:hover {
    background: var(--investor-blue);
    box-shadow: 0 6px 16px rgba(44, 62, 80, 0.4);
}

.stat-card:hover {
    transform: scale(1.05);
}

.stat-card h3 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}