/* ==============================================
   🎨 INVESTMENT-ANALYTICS.CSS - PREMIUM ANIMATED VERSION
   Performance optimisée • Animations élégantes • Design moderne
   ✅ MODALS 100% PRÉSERVÉES
   ============================================== */

/* ============================================
   🌟 VARIABLES OPTIMISÉES
   ============================================ */
:root {
    --ml-primary: #667eea;
    --ml-secondary: #764ba2;
    --ml-accent: #f093fb;
    --ml-success: #43e97b;
    --ml-danger: #f5576c;
    --ml-warning: #f6d365;
    
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(102, 126, 234, 0.2);
    --glass-shadow: rgba(0, 0, 0, 0.08);
    
    --glow-primary: 0 0 20px rgba(102, 126, 234, 0.4);
    --glow-success: 0 0 20px rgba(67, 233, 123, 0.4);
    --glow-danger: 0 0 20px rgba(245, 87, 108, 0.4);
    
    --transition-fast: all 0.2s ease;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

body.dark-mode {
    --glass-bg: rgba(15, 23, 42, 0.95);
    --glass-border: rgba(148, 163, 184, 0.2);
}

/* ============================================
   ✨ ANIMATIONS GLOBALES
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideRight {
    0%, 100% { 
        transform: translateX(0); 
        opacity: 1; 
    }
    50% { 
        transform: translateX(200px); 
        opacity: 0; 
    }
}

@keyframes gradientShift {
    0%, 100% { 
        background-position: 0% 50%; 
    }
    50% { 
        background-position: 100% 50%; 
    }
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1); 
    }
    50% { 
        opacity: 0.85; 
        transform: scale(1.05); 
    }
}

@keyframes floatIcon {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(-5px); 
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

/* ============================================
   📊 ANALYTICS SECTION - AVEC ANIMATIONS
   ============================================ */

.analytics-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: var(--transition-smooth);
    animation: fadeInUp 0.6s ease-out backwards;
}

.analytics-section:hover {
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

body.dark-mode .analytics-section {
    background: #1e293b;
    border-color: #334155;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, var(--ml-primary), transparent);
    animation: slideRight 3s ease-in-out infinite;
}

body.dark-mode .section-header {
    border-bottom-color: #334155;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    animation: gradientShift 3s ease infinite;
}

.section-header h2 i {
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.3rem;
    animation: floatIcon 3s ease-in-out infinite;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-icon {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 15px;
    cursor: pointer;
    transition: var(--transition-smooth);
    color: var(--text-primary);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn-icon:hover::before {
    width: 200px;
    height: 200px;
}

.btn-icon:hover {
    background: var(--ml-primary);
    color: white;
    border-color: var(--ml-primary);
    transform: translateY(-3px);
    box-shadow: var(--glow-primary);
}

body.dark-mode .btn-icon {
    background: #334155;
    border-color: #475569;
}

body.dark-mode .btn-icon:hover {
    background: var(--ml-primary);
    border-color: var(--ml-primary);
}

.header-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

/* ============================================
   🎯 TITRE PRINCIPAL - FORMAT HARMONISÉ + ANIMÉ
   ============================================ */

.top-header h1,
#pageTitle {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary)) !important;
    background-size: 200% 200% !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 !important;
    animation: gradientShift 3s ease infinite !important;
}

.top-header h1 i,
#pageTitle i {
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary)) !important;
    background-size: 200% 200% !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    font-size: 1.3rem !important;
    animation: floatIcon 3s ease-in-out infinite !important;
}

/* ============================================
   🎯 INFO BUTTON - AVEC ANIMATIONS
   ============================================ */

.chart-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: var(--transition-smooth);
    animation: fadeInUp 0.6s ease-out backwards;
}

.chart-card:hover {
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
    transform: translateY(-4px);
}

body.dark-mode .chart-card {
    background: #1e293b;
    border-color: #334155;
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    animation: gradientShift 3s ease infinite;
}

.btn-info {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.3);
    color: var(--ml-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    transition: var(--transition-bounce);
    flex-shrink: 0;
}

.btn-info:hover {
    background: var(--ml-primary);
    color: white;
    border-color: var(--ml-primary);
    transform: scale(1.2) rotate(15deg);
    box-shadow: var(--glow-primary);
}

body.dark-mode .btn-info {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.4);
    color: #818cf8;
}

body.dark-mode .btn-info:hover {
    background: #667eea;
    color: white;
}

/* ============================================
   🎪 MODALS INFO - 100% PRÉSERVÉES (NE PAS TOUCHER)
   ============================================ */

.modal-info {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-info.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-info-content {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    max-height: 85vh;
    overflow-y: auto;
    animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 90%;
    max-width: 700px;
    border: 2px solid var(--primary-color);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-info-header {
    padding: 25px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.modal-info-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: white;
}

.modal-info-header h3 i {
    font-size: 1.6rem;
    color: #FFD700;
}

.modal-info-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.modal-info-close:hover {
    background: rgba(239, 68, 68, 0.9);
    transform: rotate(90deg) scale(1.1);
}

.modal-info-body {
    padding: 30px;
    color: var(--text-primary);
}

.modal-info-body h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 25px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-info-body h4:first-child {
    margin-top: 0;
}

.modal-info-body p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.modal-info-body ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.modal-info-body li {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.modal-info-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.info-highlight {
    background: rgba(37, 99, 235, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    border-radius: var(--radius-md);
    margin: 20px 0;
}

.dark-mode .info-highlight {
    background: rgba(102, 126, 234, 0.15);
}

.info-highlight p {
    margin: 0;
    font-style: italic;
}

.info-example {
    background: var(--background-secondary);
    border-radius: var(--radius-md);
    padding: 15px 20px;
    margin: 15px 0;
    border: 1px solid var(--border-color);
}

.info-example strong {
    color: var(--success-color);
}

.metric-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 8px;
}

.metric-badge.good {
    background: var(--success-color);
}

.metric-badge.warning {
    background: var(--accent-color);
}

.metric-badge.bad {
    background: var(--danger-color);
}

/* ============================================
   💎 KPI GRID - AVEC ANIMATIONS PREMIUM
   ============================================ */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--ml-primary);
    border-radius: 16px;
    padding: 25px;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    animation: fadeInUp 0.6s ease-out backwards;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s, transform 0.5s;
}

.kpi-card:hover::before {
    opacity: 1;
    transform: scale(1.1);
}

.kpi-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.2);
    border-left-width: 5px;
}

.kpi-card:nth-child(1) { animation-delay: 0.1s; }
.kpi-card:nth-child(2) { animation-delay: 0.2s; }
.kpi-card:nth-child(3) { animation-delay: 0.3s; }
.kpi-card:nth-child(4) { animation-delay: 0.4s; }
.kpi-card:nth-child(5) { animation-delay: 0.5s; }
.kpi-card:nth-child(6) { animation-delay: 0.6s; }

body.dark-mode .kpi-card {
    background: #1e293b;
    border-color: #334155;
}

.kpi-card.positive {
    border-left-color: var(--ml-success);
}

.kpi-card.positive::before {
    background: radial-gradient(circle, rgba(67, 233, 123, 0.05) 0%, transparent 70%);
}

.kpi-card.negative {
    border-left-color: var(--ml-danger);
}

.kpi-card.negative::before {
    background: radial-gradient(circle, rgba(245, 87, 108, 0.05) 0%, transparent 70%);
}

.kpi-card.neutral {
    border-left-color: var(--ml-warning);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.kpi-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.1);
    color: var(--ml-primary);
    font-size: 1.2rem;
    transition: var(--transition-smooth);
}

.kpi-card:hover .kpi-icon {
    transform: scale(1.15) rotate(-10deg);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.kpi-card.positive .kpi-icon {
    background: rgba(67, 233, 123, 0.1);
    color: var(--ml-success);
}

.kpi-card.negative .kpi-icon {
    background: rgba(245, 87, 108, 0.1);
    color: var(--ml-danger);
}

.kpi-value {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    line-height: 1;
    animation: gradientShift 3s ease infinite;
}

.kpi-card.positive .kpi-value {
    background: linear-gradient(135deg, var(--ml-success), #38f9d7);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.kpi-card.negative .kpi-value {
    background: linear-gradient(135deg, var(--ml-danger), #fd7e14);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.kpi-change {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.kpi-change.positive {
    color: var(--ml-success);
}

.kpi-change.negative {
    color: var(--ml-danger);
}

.kpi-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

body.dark-mode .kpi-footer {
    border-top-color: #334155;
}

/* ============================================
   🎚️ PERIOD SELECTOR - AVEC ANIMATIONS
   ============================================ */

.period-selector {
    display: flex;
    gap: 8px;
    background: #f8fafc;
    padding: 5px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

body.dark-mode .period-selector {
    background: #334155;
    border-color: #475569;
}

.period-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.period-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.period-btn:hover::before {
    left: 100%;
}

.period-btn:hover {
    background: #ffffff;
    color: var(--text-primary);
}

body.dark-mode .period-btn:hover {
    background: #1e293b;
}

.period-btn.active {
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    background-size: 200% 200%;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    animation: gradientShift 3s ease infinite;
}

/* ============================================
   📈 CHARTS GRID
   ============================================ */

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 25px;
}

.chart-container,
.chart-container-large {
    min-height: 400px;
    position: relative;
}

.chart-container-large {
    min-height: 500px;
}

/* ============================================
   📊 RISK METRICS TABLE - PREMIUM ANIMÉ
   ============================================ */

.risk-metrics-container {
    margin-top: 30px;
    animation: fadeInUp 0.6s ease-out backwards;
    animation-delay: 0.3s;
}

.risk-metrics-container h3 {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: gradientShift 3s ease infinite;
}

.table-responsive {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: var(--transition-smooth);
}

.table-responsive:hover {
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.12);
}

body.dark-mode .table-responsive {
    background: #1e293b;
    border-color: #334155;
}

.metrics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.metrics-table thead {
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    background-size: 200% 200%;
    color: white;
    animation: gradientShift 6s ease infinite;
}

.metrics-table th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.metrics-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: var(--transition-fast);
}

body.dark-mode .metrics-table tbody tr {
    border-bottom-color: #334155;
}

.metrics-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05), transparent);
    transform: translateX(4px);
}

.metrics-table td {
    padding: 16px 20px;
    color: var(--text-primary);
    font-weight: 500;
}

.metrics-table td:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

.metrics-table td:nth-child(2) {
    font-weight: 700;
    font-size: 1.05rem;
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.metric-good {
    color: var(--ml-success) !important;
    font-weight: 700;
}

.metric-warning {
    color: var(--ml-warning) !important;
    font-weight: 700;
}

.metric-bad {
    color: var(--ml-danger) !important;
    font-weight: 700;
}

/* ============================================
   🔗 CORRELATION MATRIX - ANIMÉ
   ============================================ */

.correlation-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: var(--transition-smooth);
}

.correlation-container:hover {
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.12);
}

body.dark-mode .correlation-container {
    background: #1e293b;
    border-color: #334155;
}

.correlation-insights {
    margin-top: 20px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 16px;
    border-left: 4px solid var(--ml-primary);
}

body.dark-mode .correlation-insights {
    background: #334155;
}

.insight-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    padding: 12px;
    background: #ffffff;
    border-radius: 12px;
    transition: var(--transition-smooth);
}

body.dark-mode .insight-item {
    background: #1e293b;
}

.insight-item:last-child {
    margin-bottom: 0;
}

.insight-item:hover {
    transform: translateX(6px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.insight-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.insight-item:hover .insight-icon {
    transform: scale(1.15) rotate(-10deg);
}

.insight-icon.positive {
    background: rgba(67, 233, 123, 0.1);
    color: var(--ml-success);
}

.insight-icon.warning {
    background: rgba(246, 211, 101, 0.1);
    color: var(--ml-warning);
}

.insight-icon.negative {
    background: rgba(245, 87, 108, 0.1);
    color: var(--ml-danger);
}

.insight-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.insight-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================
   🤖 AI SECTION - FOND VIOLET ANIMÉ
   ============================================ */

.ai-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 200% 200%;
    border: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    animation: gradientShift 8s ease infinite, fadeInUp 0.6s ease-out backwards;
}

.ai-section .section-header {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.ai-section .section-header h2 {
    color: white !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    background: none !important;
    -webkit-text-fill-color: white !important;
}

.ai-section .section-header h2 i {
    color: #FFD700 !important;
    background: none !important;
    -webkit-text-fill-color: #FFD700 !important;
    animation: pulse 2s ease-in-out infinite;
}

.ai-section .btn-primary {
    background: white;
    color: var(--ml-primary);
    border: none;
    font-weight: 700;
}

.ai-section .btn-primary:hover {
    background: #FFD700;
    color: #333;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4);
}

/* AI Loading */

.ai-loading {
    text-align: center;
    padding: 60px 20px;
}

.ai-loading.hidden {
    display: none;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.ai-loading p {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.loading-progress {
    max-width: 400px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin: 0 auto;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s;
    animation: shimmer 2s infinite;
}

/* AI Models Grid */

.ai-models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.ai-model-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: var(--transition-smooth);
    border-top: 4px solid var(--ml-primary);
    animation: fadeInUp 0.6s ease-out backwards;
    position: relative;
    overflow: hidden;
}

.ai-model-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.8s;
}

.ai-model-card:hover::before {
    left: 100%;
}

.ai-model-card:nth-child(1) { animation-delay: 0.1s; }
.ai-model-card:nth-child(2) { animation-delay: 0.2s; }
.ai-model-card:nth-child(3) { animation-delay: 0.3s; }
.ai-model-card:nth-child(4) { animation-delay: 0.4s; }

body.dark-mode .ai-model-card {
    background: #1e293b;
}

.ai-model-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.25);
}

.model-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.model-icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.ai-model-card:hover .model-icon {
    transform: scale(1.15) rotate(-15deg);
}

.model-icon.optimizer {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.model-icon.predictor {
    background: linear-gradient(135deg, #10b981, #059669);
}

.model-icon.risk {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.model-icon.rebalancer {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.model-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.model-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--ml-primary);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.model-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.model-results {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    min-height: 150px;
}

body.dark-mode .model-results {
    background: #334155;
    border-color: #475569;
}

.model-results.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-style: italic;
}

.result-item {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

body.dark-mode .result-item {
    border-bottom-color: #475569;
}

.result-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.result-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 600;
    text-transform: uppercase;
}

.result-value {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

.result-value.positive {
    background: linear-gradient(135deg, var(--ml-success), #38f9d7);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.result-value.negative {
    background: linear-gradient(135deg, var(--ml-danger), #fd7e14);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* AI Recommendations - TEXTE BLANC */

.ai-recommendations {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.6s ease-out backwards;
    animation-delay: 0.2s;
}

.ai-recommendations h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: white !important;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: none !important;
    -webkit-text-fill-color: white !important;
}

.ai-recommendations h3 i {
    color: #FFD700;
    animation: pulse 2s ease-in-out infinite;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recommendation-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 4px solid white;
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.recommendation-item:hover {
    transform: translateX(6px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.recommendation-item.priority-high {
    border-left-color: var(--ml-danger);
}

.recommendation-item.priority-medium {
    border-left-color: var(--ml-warning);
}

.recommendation-item.priority-low {
    border-left-color: var(--ml-success);
}

.recommendation-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    transition: var(--transition-smooth);
}

.recommendation-item:hover .recommendation-icon {
    transform: scale(1.15) rotate(-10deg);
}

.recommendation-item.priority-high .recommendation-icon {
    background: var(--ml-danger);
    color: white;
}

.recommendation-item.priority-medium .recommendation-icon {
    background: var(--ml-warning);
    color: white;
}

.recommendation-item.priority-low .recommendation-icon {
    background: var(--ml-success);
    color: white;
}

.recommendation-content {
    flex: 1;
}

.recommendation-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.recommendation-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 10px;
}

.recommendation-action {
    display: inline-block;
    padding: 6px 15px;
    background: white;
    color: var(--ml-primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.recommendation-action:hover {
    background: #FFD700;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

/* ============================================
   📊 BENCHMARK COMPARISON
   ============================================ */

.benchmark-selector {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.benchmark-selector label {
    font-weight: 600;
    color: var(--text-primary);
}

.benchmark-selector select {
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

body.dark-mode .benchmark-selector select {
    background: #1e293b;
    border-color: #334155;
}

.benchmark-selector select:focus {
    outline: none;
    border-color: var(--ml-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.comparison-metrics {
    margin-top: 20px;
}

/* ============================================
   🏢 ASSET ALLOCATION SECTION - FOND VIOLET ANIMÉ
   ============================================ */

.asset-config-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 200% 200%;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    animation: gradientShift 8s ease infinite, fadeInUp 0.6s ease-out backwards;
}

.asset-config-section .section-header {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.asset-config-section .section-header h2 {
    color: white !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    background: none !important;
    -webkit-text-fill-color: white !important;
}

.asset-config-section .section-header h2 i {
    animation: floatIcon 3s ease-in-out infinite;
}

.asset-config-section .btn-icon {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.asset-config-section .btn-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.info-box {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 4px solid #FFD700;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: var(--transition-smooth);
}

.info-box:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.info-box i {
    font-size: 1.2rem;
    color: #FFD700;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-box p {
    margin: 0;
    line-height: 1.6;
    color: white;
}

.portfolio-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-item {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: var(--transition-smooth);
}

.summary-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

.summary-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    opacity: 0.9;
    color: white;
}

.summary-value {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: #FFD700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.summary-hint {
    font-size: 0.75rem;
    opacity: 0.7;
    color: white;
}

.asset-allocation-manager {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body.dark-mode .asset-allocation-manager {
    background: #1e293b;
}

.manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

body.dark-mode .manager-header {
    border-bottom-color: #334155;
}

.manager-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: gradientShift 3s ease infinite;
}

.assets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.asset-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #667eea;
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-smooth);
}

body.dark-mode .asset-item {
    background: #334155;
    border-color: #475569;
}

.asset-item:hover {
    transform: translateX(6px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.asset-item.equity {
    border-left-color: #2563eb;
}

.asset-item.bonds {
    border-left-color: #10b981;
}

.asset-item.crypto {
    border-left-color: #f59e0b;
}

.asset-item.commodities {
    border-left-color: #8b5cf6;
}

.asset-item.real-estate {
    border-left-color: #06b6d4;
}

.asset-item.cash {
    border-left-color: #64748b;
}

.asset-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.asset-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.asset-item:hover .asset-icon {
    transform: scale(1.15) rotate(-10deg);
}

.asset-icon.equity {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.asset-icon.bonds {
    background: linear-gradient(135deg, #10b981, #059669);
}

.asset-icon.crypto {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.asset-icon.commodities {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.asset-icon.real-estate {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.asset-icon.cash {
    background: linear-gradient(135deg, #64748b, #475569);
}

.asset-details {
    flex: 1;
}

.asset-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.asset-ticker {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.asset-allocation-display {
    display: flex;
    align-items: center;
    gap: 15px;
}

.allocation-bar {
    width: 120px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

body.dark-mode .allocation-bar {
    background: #475569;
}

.allocation-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.allocation-percent {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    min-width: 60px;
    text-align: right;
    animation: gradientShift 3s ease infinite;
}

.asset-actions {
    display: flex;
    gap: 8px;
}

.asset-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-bounce);
    font-size: 0.9rem;
}

.asset-btn.edit {
    background: rgba(37, 99, 235, 0.1);
    color: var(--ml-primary);
}

.asset-btn.edit:hover {
    background: var(--ml-primary);
    color: white;
    transform: scale(1.2);
    box-shadow: var(--glow-primary);
}

.asset-btn.delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--ml-danger);
}

.asset-btn.delete:hover {
    background: var(--ml-danger);
    color: white;
    transform: scale(1.2);
    box-shadow: var(--glow-danger);
}

.assets-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.assets-empty i {
    font-size: 4rem;
    color: #e2e8f0;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

body.dark-mode .assets-empty i {
    color: #475569;
}

.assets-empty h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

/* ============================================
   🎪 MODALS - 100% PRÉSERVÉES (NE PAS TOUCHER)
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-medium {
    width: 90%;
    max-width: 600px;
}

.modal-large {
    width: 90%;
    max-width: 900px;
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--background-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    font-size: 1.2rem;
}

.modal-close:hover {
    background: var(--danger-color);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--background-primary);
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* ============================================
   🚀 MODERN BUTTONS - ANIMÉS + CENTRÉS
   ============================================ */

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 200% 200%;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    animation: gradientShift 6s ease infinite;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-primary i {
    font-size: 16px;
}

.btn-secondary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.dark-mode .btn-secondary {
    background: #334155;
    border-color: #475569;
    color: #cbd5e1;
}

body.dark-mode .btn-secondary:hover {
    background: #475569;
    border-color: #64748b;
}

/* Container pour centrer les boutons */
.header-actions,
.modal-footer,
.manager-header .header-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ============================================
   🌙 DARK MODE OVERRIDES
   ============================================ */

body.dark-mode .chart-card,
body.dark-mode .analytics-section {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .highcharts-background {
    fill: #1e293b;
}

body.dark-mode .highcharts-title,
body.dark-mode .highcharts-subtitle,
body.dark-mode .highcharts-axis-labels text,
body.dark-mode .highcharts-legend-item text {
    fill: #e2e8f0 !important;
}

body.dark-mode .highcharts-grid-line {
    stroke: #334155;
}

.dark-mode #pageTitle,
.dark-mode .top-header h1 {
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary)) !important;
    background-size: 200% 200% !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.dark-mode .chart-title {
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary)) !important;
    background-size: 200% 200% !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.dark-mode .section-header h2 {
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary)) !important;
    background-size: 200% 200% !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* ============================================
   📱 RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .ai-models-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .period-selector {
        flex-wrap: wrap;
    }
    
    .analytics-section {
        padding: 20px;
    }
    
    .modal-info-content {
        width: 95%;
    }
    
    .portfolio-summary {
        grid-template-columns: 1fr;
    }
    
    .asset-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .asset-allocation-display {
        width: 100%;
        justify-content: space-between;
    }
    
    .allocation-bar {
        flex: 1;
    }
}

/* ============================================
   🎯 SCROLLBAR CUSTOM - PREMIUM
   ============================================ */

.modal-info-content::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-info-content::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

body.dark-mode .modal-info-content::-webkit-scrollbar-track,
body.dark-mode .modal-content::-webkit-scrollbar-track {
    background: #334155;
}

.modal-info-content::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    border-radius: 10px;
}

.modal-info-content::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--ml-secondary), var(--ml-accent));
}

/* ============================================
   🎬 FIN DU FICHIER - PREMIUM ANIMATED VERSION
   ============================================ */