/* ==============================================
   🎨 SCENARIO-ANALYSIS.CSS - ULTRA MODERN 3D VERSION
   Glassmorphism • 3D Effects • Premium Animations
   VERSION FINALE COMPLÈTE ET CORRIGÉE
   ============================================== */

/* ============================================
   🌟 VARIABLES (Héritées de market-data.css)
   ============================================ */
: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.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: rgba(31, 38, 135, 0.37);
    
    --glow-primary: 0 0 20px rgba(102, 126, 234, 0.5);
    --glow-accent: 0 0 30px rgba(240, 147, 251, 0.6);
    
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

body.dark-mode,
[data-theme="dark"] {
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(148, 163, 184, 0.1);
}

/* ============================================
   ✅ TITRE PRINCIPAL DE LA PAGE - SCENARIO ANALYSIS
   ============================================ */
.top-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.top-header h1 i {
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2rem;
}

/* ============================================
   ✅ TITRES DE SECTIONS
   ============================================ */

/* Section Title (What is Scenario Analysis?, Step 1, etc.) */
.section-title,
h2.section-title,
.main-section-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    position: relative;
}

.section-title i,
h2.section-title i {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Card Title pour "What is Scenario Analysis?" */
.info-card-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ============================================
   📊 PORTFOLIO INPUT - GLASSMORPHISM
   ============================================ */
.portfolio-input {
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    padding: 30px;
    border-radius: 24px;
    margin-bottom: 30px;
    box-shadow: 
        0 12px 40px rgba(102, 126, 234, 0.4),
        0 0 60px rgba(118, 75, 162, 0.3);
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.portfolio-input::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.03) 10px,
        rgba(255, 255, 255, 0.03) 20px
    );
    animation: moveStripes 20s linear infinite;
    pointer-events: none;
}

@keyframes moveStripes {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.input-title {
    color: white !important;
    margin-bottom: 25px;
    font-size: 1.6rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.input-title i {
    font-size: 1.8rem;
    color: white;
    animation: floatIcon 3s ease-in-out infinite;
}

/* ============================================
   📋 PORTFOLIO GRID - 3D CARDS
   ============================================ */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.portfolio-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    padding: 20px;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: var(--transition-smooth);
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

body.dark-mode .portfolio-item {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.2);
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--ml-primary), var(--ml-secondary));
    border-radius: 16px 0 0 16px;
}

.portfolio-item:hover {
    transform: translateY(-6px) rotateX(2deg);
    box-shadow: 
        0 16px 48px rgba(102, 126, 234, 0.25),
        0 0 40px rgba(118, 75, 162, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-color: rgba(102, 126, 234, 0.4);
}

.portfolio-item label {
    display: block;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.portfolio-item input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.dark-mode .portfolio-item input {
    background: rgba(15, 23, 42, 0.5);
    color: #e2e8f0;
}

.portfolio-item input:focus {
    outline: none;
    border-color: var(--ml-primary);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.1),
        inset 0 2px 8px rgba(0, 0, 0, 0.05),
        var(--glow-primary);
    transform: translateY(-2px);
}

body.dark-mode .portfolio-item input:focus {
    background: rgba(15, 23, 42, 0.8);
}

/* ============================================
   💰 TOTAL ALLOCATION DISPLAY
   ============================================ */
.total-allocation-display {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 16px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    position: relative;
    z-index: 1;
}

body.dark-mode .total-allocation-display {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.2);
}

.total-allocation-display strong {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.total-allocation-display span {
    color: var(--ml-primary);
    font-size: 1.8rem;
    font-weight: 800;
    margin-left: 15px;
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.total-allocation-display span.error {
    background: linear-gradient(135deg, var(--ml-danger), #fd7e14);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

/* ============================================
   🚀 ANALYZE BUTTON - HOLOGRAPHIC
   ============================================ */
.btn-analyze {
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary), var(--ml-accent));
    background-size: 200% 200%;
    color: white;
    padding: 18px 48px;
    border: none;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 
        0 8px 24px rgba(102, 126, 234, 0.4),
        0 0 20px rgba(118, 75, 162, 0.3);
    transition: var(--transition-smooth);
    width: 100%;
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin-top: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-analyze::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.6s;
}

.btn-analyze:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 16px 40px rgba(102, 126, 234, 0.5),
        0 0 40px rgba(118, 75, 162, 0.4);
    animation: gradientShift 3s ease infinite;
}

.btn-analyze:hover::before {
    left: 100%;
}

.btn-analyze:active {
    transform: translateY(-2px) scale(1);
}

.btn-analyze i {
    font-size: 1.3rem;
    transition: var(--transition-smooth);
}

.btn-analyze:hover i {
    transform: scale(1.2) rotate(10deg);
}

/* ============================================
   📌 SCENARIO CARDS - GLASSMORPHISM
   ============================================ */
.scenario-card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
    backdrop-filter: blur(20px) saturate(180%);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 25px;
    border: 2px solid var(--glass-border);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

body.dark-mode .scenario-card {
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.05) 0%,
        rgba(15, 23, 42, 0.5) 100%
    );
}

.scenario-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--ml-primary), var(--ml-secondary));
    border-radius: 20px 0 0 20px;
}

.scenario-card:hover {
    transform: translateX(8px) rotateY(2deg);
    box-shadow: 
        0 16px 48px rgba(102, 126, 234, 0.25),
        0 0 40px rgba(118, 75, 162, 0.15);
    border-color: rgba(102, 126, 234, 0.4);
}

.scenario-card h3 {
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.scenario-card h3 i {
    font-size: 1.5rem;
}

.scenario-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* ============================================
   🏷️ IMPACT BADGES - PREMIUM
   ============================================ */
.scenario-impacts {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.impact-badge {
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-bounce);
    cursor: default;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.impact-positive {
    background: linear-gradient(135deg, var(--ml-success), #38f9d7);
    color: white;
}

.impact-positive:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 
        0 8px 24px rgba(67, 233, 123, 0.4),
        0 0 20px rgba(56, 249, 215, 0.3);
}

.impact-negative {
    background: linear-gradient(135deg, var(--ml-danger), #fd7e14);
    color: white;
}

.impact-negative:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 
        0 8px 24px rgba(245, 87, 108, 0.4),
        0 0 20px rgba(253, 126, 20, 0.3);
}

/* ============================================
   📊 RESULTS GRID - 3D CARDS
   ============================================ */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.result-card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.85) 100%
    );
    backdrop-filter: blur(20px) saturate(180%);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: var(--transition-smooth);
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

body.dark-mode .result-card {
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.9) 0%,
        rgba(30, 41, 59, 0.8) 100%
    );
    border-color: rgba(148, 163, 184, 0.2);
}

.result-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(102, 126, 234, 0.05) 0%,
        transparent 70%
    );
    animation: rotateBg 25s linear infinite;
    pointer-events: none;
}

@keyframes rotateBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result-card:hover {
    transform: translateY(-8px) rotateX(2deg);
    box-shadow: 
        0 20px 60px rgba(102, 126, 234, 0.25),
        0 0 40px rgba(118, 75, 162, 0.15);
}

.result-card h4 {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.result-card .value {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
    line-height: 1.2;
}

.result-card.positive .value {
    background: linear-gradient(135deg, var(--ml-success), #38f9d7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.result-card.negative .value {
    background: linear-gradient(135deg, var(--ml-danger), #fd7e14);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.result-card .value-icon {
    font-size: 1.5rem;
    margin-left: 10px;
    opacity: 0.7;
}

/* ============================================
   📝 SUBSECTION TITLE
   ============================================ */
.subsection-title {
    color: var(--text-primary);
    margin-bottom: 20px;
    margin-top: 35px;
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 12px;
}

.subsection-title:first-of-type {
    margin-top: 0;
}

.subsection-title i {
    font-size: 1.6rem;
    animation: floatIcon 3s ease-in-out infinite;
}

/* ============================================
   ✅ DETAILED TABLE - ULTRA LISIBLE
   ============================================ */
.detailed-table-container {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
    backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    overflow-x: auto;
    margin-bottom: 30px;
}

body.dark-mode .detailed-table-container {
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.05) 0%,
        rgba(15, 23, 42, 0.5) 100%
    );
}

.detailed-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
}

/* ✅ HEADER - Gradient violet avec séparateurs blancs */
.detailed-table thead {
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    color: white;
}

.detailed-table th {
    padding: 18px;
    text-align: left;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white !important;
    white-space: nowrap;
    border-right: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.detailed-table th:last-child {
    border-right: none;
}

.detailed-table th:first-child {
    border-radius: 16px 0 0 0;
}

.detailed-table th:last-child {
    border-radius: 0 16px 0 0;
}

/* ✅ BODY - Lignes alternées avec séparateurs visibles */
.detailed-table tbody tr {
    transition: var(--transition-smooth);
    border-bottom: 2px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
}

.detailed-table tbody tr:nth-child(even) {
    background: rgba(102, 126, 234, 0.03);
}

body.dark-mode .detailed-table tbody tr:nth-child(even) {
    background: rgba(102, 126, 234, 0.08);
}

.detailed-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.12) !important;
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    position: relative;
    z-index: 10;
}

/* ✅ CELLULES - Séparateurs verticaux visibles */
.detailed-table td {
    padding: 16px 18px;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 600;
    border-right: 1px solid rgba(102, 126, 234, 0.15);
}

.detailed-table td:last-child {
    border-right: none;
}

.detailed-table .scenario-name {
    font-weight: 800;
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1rem;
}

.detailed-table .return-positive {
    color: white !important;
    font-weight: 700;
    background: linear-gradient(135deg, var(--ml-success), #38f9d7);
    padding: 6px 14px;
    border-radius: 50px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(67, 233, 123, 0.3);
}

.detailed-table .return-negative {
    color: white !important;
    font-weight: 700;
    background: linear-gradient(135deg, var(--ml-danger), #fd7e14);
    padding: 6px 14px;
    border-radius: 50px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}

.detailed-table .return-neutral {
    color: var(--text-primary);
    font-weight: 700;
    background: rgba(102, 126, 234, 0.1);
    padding: 6px 14px;
    border-radius: 50px;
    display: inline-block;
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.detailed-table tbody tr:last-child {
    border-bottom: none;
}

.detailed-table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 16px;
}

.detailed-table tbody tr:last-child td:last-child {
    border-radius: 0 0 16px 0;
}

/* ============================================
   📈 CHART CONTAINER - GLASSMORPHISM
   ============================================ */
.chart-container {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
    backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

body.dark-mode .chart-container {
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.05) 0%,
        rgba(15, 23, 42, 0.5) 100%
    );
}

.chart-container h4 {
    margin: 0 0 25px 0;
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--ml-primary), var(--ml-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============================================
   ℹ️ INFO BOX - PREMIUM
   ============================================ */
.info-box {
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.1) 0%,
        rgba(118, 75, 162, 0.05) 100%
    );
    border-left: 4px solid var(--ml-primary);
    padding: 18px 24px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    margin: 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.info-box i {
    font-size: 1.5rem;
    color: var(--ml-primary);
    margin-top: 2px;
}

.info-box p {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   ⚠️ WARNING BOX
   ============================================ */
.warning-box {
    background: linear-gradient(
        135deg,
        rgba(246, 211, 101, 0.15),
        rgba(253, 160, 133, 0.1)
    );
    border-left: 4px solid var(--ml-warning);
    padding: 18px 24px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    margin: 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(246, 211, 101, 0.15);
}

.warning-box i {
    font-size: 1.5rem;
    color: var(--ml-warning);
    margin-top: 2px;
}

.warning-box p {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   ✅ SUCCESS BOX
   ============================================ */
.success-box {
    background: linear-gradient(
        135deg,
        rgba(67, 233, 123, 0.15),
        rgba(56, 249, 215, 0.1)
    );
    border-left: 4px solid var(--ml-success);
    padding: 18px 24px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    margin: 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(67, 233, 123, 0.15);
}

.success-box i {
    font-size: 1.5rem;
    color: var(--ml-success);
    margin-top: 2px;
}

.success-box p {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   📱 RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-input {
        padding: 20px;
    }
    
    .btn-analyze {
        padding: 15px 32px;
        font-size: 1.1rem;
    }
    
    .scenario-card {
        padding: 20px;
    }
    
    .result-card {
        padding: 25px;
    }
    
    .result-card .value {
        font-size: 2rem;
    }
    
    .detailed-table-container {
        padding: 20px;
    }
    
    .detailed-table th,
    .detailed-table td {
        padding: 12px;
        font-size: 0.85rem;
    }
    
    .subsection-title,
    .section-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .portfolio-input {
        padding: 15px;
    }
    
    .input-title {
        font-size: 1.3rem;
    }
    
    .portfolio-grid {
        gap: 15px;
    }
    
    .portfolio-item {
        padding: 15px;
    }
    
    .btn-analyze {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .scenario-impacts {
        gap: 8px;
    }
    
    .impact-badge {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
    
    .detailed-table th,
    .detailed-table td {
        padding: 10px;
        font-size: 0.8rem;
    }
}

/* ============================================
   🎬 LOADING ANIMATION
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 6px solid rgba(102, 126, 234, 0.2);
    border-top-color: var(--ml-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 20px;
    text-align: center;
}

/* ============================================
   ✨ UTILITY CLASSES
   ============================================ */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 10px !important; }
.mt-2 { margin-top: 20px !important; }
.mt-3 { margin-top: 30px !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 10px !important; }
.mb-2 { margin-bottom: 20px !important; }
.mb-3 { margin-bottom: 30px !important; }

/* ============================================
   🎯 FIN DU FICHIER - ULTRA MODERN CSS
   ============================================ */