/* Variables de couleur */
:root {
    --primary: #FF0066;
    --primary-rgb: 255, 0, 102;
    --secondary: #6B46C1;
    --secondary-rgb: 107, 70, 193;
    --success: #4cc9f0;
    --info: #4895ef;
    --warning: #f72585;
    --danger: #e63946;
    --light: #f8f9fa;
    --dark: #212529;
}

/* Styles généraux */
body {
    background-color: #f0f2f5;
    font-family: 'Poppins', sans-serif;
    color: #4a5568 !important;  /* Gris foncé doux */
}

/* Navbar personnalisée */
.navbar-custom {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    color: #ffffff !important;
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease;
    font-weight: 500;
}

.navbar-custom .nav-link:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
}

.navbar-custom .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
}

.navbar-custom .dropdown-menu {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    padding: 10px;
    margin-top: 10px;
}

.navbar-custom .dropdown-item {
    border-radius: 8px;
    padding: 8px 15px;
    margin-bottom: 2px;
    transition: all 0.2s ease;
}

.navbar-custom .dropdown-item:hover {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.navbar-custom .dropdown-item i {
    width: 20px;
    text-align: center;
}

/* Texte dégradé */
.text-gradient {
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #ffffff !important;
}

/* Cartes */
.card {
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    color: #2D3748 !important;  /* Gris très foncé */
}

/* Effet de survol pour les cartes */
.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-header {
    color: #1A202C !important;  /* Presque noir */
}

.card-body {
    color: #2D3748 !important;
}

/* Graphiques */
.js-plotly-plot {
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

/* Boutons */
.btn {
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Animation de chargement */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.loading-pulse {
    animation: pulse 2s infinite;
}

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

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    animation: slideInUp 0.6s ease-out;
    transition: all 0.3s ease;
    height: 180px;  /* Hauteur fixe pour toutes les cartes */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0.5rem 0;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Modal personnalisé */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    color: #2D3748 !important;
}

.modal-body {
    color: #2D3748 !important;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.fade-in-slow {
    animation: fadeIn 0.8s ease-in-out;
}

.fade-in-delayed {
    animation: fadeIn 1.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-muted {
    color: #718096 !important;
}

/* Styles pour les titres */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #2D3748;
}

/* Styles pour les textes clairs */
.text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Styles pour les cartes de statistiques */
.stats-card .card-title {
    font-size: 0.9rem;
    color: #718096;
}

.stats-card .stats-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2D3748;
}

/* Styles pour les graphiques */
.dash-graph {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

/* Styles pour les sections arrondies */
.rounded-section {
    border-radius: 20px;
    overflow: hidden;
}

/* Recommandations */
.recommendation-title {
    color: #2D3748 !important;
}

.recommendation-description {
    color: #4A5568 !important;
}

/* Modals */
.modal-body {
    color: #2D3748 !important;
}

/* Dropdowns et filtres */
.Select-value-label {
    color: #2D3748 !important;
}

.Select-placeholder {
    color: #718096 !important;  /* Gris moyen */
}

/* Textes secondaires */
.text-muted {
    color: #718096 !important;  /* Gris moyen */
}

/* Liens */
a {
    color: #4299E1 !important;  /* Bleu */
}

a:hover {
    color: #2B6CB0 !important;  /* Bleu foncé */
}

/* Boutons sur fond foncé */
.btn-light {
    color: #2D3748 !important;
}

.btn-primary {
    color: #ffffff !important;
}

/* Labels et textes d'input */
label {
    color: #4A5568 !important;
}

/* Alertes et messages d'erreur */
.alert-danger {
    color: #ffffff !important;
}

.alert-warning {
    color: #2D3748 !important;
}

.alert-info {
    color: #2D3748 !important;
}

/* Progress bars */
.progress-bar {
    color: #ffffff !important;
}

/* Headers des sections */
h1, h2, h3, h4, h5, h6 {
    color: #1A202C !important;
}

/* Tooltips et info-bulles */
.tooltip {
    color: #ffffff !important;
}

/* Texte des tableaux */
table {
    color: #2D3748 !important;
}

th {
    color: #1A202C !important;
}

/* Légendes des graphiques */
.legend-item {
    color: #2D3748 !important;
}

.scroll-legend .legend {
    max-height: 80px !important; /* ~4 lignes */
    overflow-y: auto !important;
}
