/* ============================================
   INTERACTIVE-DEMO.CSS
   ✅ VERSION FINALE - GRAPHIQUES CONTENUS ET SCROLLABLES
   ============================================ */

/* ============================================
   VARIABLES SPÉCIFIQUES DEMO
   ============================================ */
:root {
    --demo-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --demo-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --demo-gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --demo-accent: #667eea;
    --demo-accent-dark: #5568d3;
    --demo-text-light: #f0f2f5;
}

/* ============================================
   ✅ RÈGLE GLOBALE - BOX SIZING
   ============================================ */
* {
    box-sizing: border-box;
}

/* ============================================
   LAYOUT DEMO PAGE
   ============================================ */
.demo-page {
    background: var(--background-secondary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ============================================
   DEMO NAVIGATION
   ============================================ */
.demo-nav {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

body.dark-mode .demo-nav {
    background: rgba(30, 41, 59, 0.95);
}

.demo-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.demo-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.brand-text strong {
    font-weight: 800;
    background: var(--demo-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.demo-badge-nav {
    padding: 0.25rem 0.75rem;
    background: var(--demo-gradient-1);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.demo-nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all var(--transition-base);
}

.btn-back-home:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-back-home i {
    font-size: 1rem;
}

/* ============================================
   DEMO MAIN CONTENT
   ============================================ */
.demo-main {
    flex: 1;
    padding-bottom: 4rem;
    overflow-x: hidden;
}

/* ============================================
   DEMO HERO SECTION
   ============================================ */
.demo-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.demo-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.demo-hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(233, 220, 220, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--demo-text-light);
}

.demo-hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--demo-text-light);
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.demo-hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.7;
    color: var(--demo-text-light);
    margin-bottom: 2.5rem;
}

.demo-hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--demo-text-light);
}

.hero-stat i {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   DEMO TOOLS NAVIGATION
   ============================================ */
.demo-tools-nav {
    padding: 3rem 2rem;
    background: var(--background-primary);
}

.demo-tools-nav .section-title {
    text-align: center;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tool-card {
    background: var(--background-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--demo-gradient-1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

body.dark-mode .tool-card.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
}

.tool-card.active::before {
    transform: scaleX(1);
}

.tool-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--primary-color);
    transition: all var(--transition-base);
}

body.dark-mode .tool-icon {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
}

.tool-card:hover .tool-icon,
.tool-card.active .tool-icon {
    background: var(--demo-gradient-1);
    color: white;
    transform: scale(1.1);
}

.tool-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.tool-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ============================================
   DEMO CONTENT AREA
   ============================================ */
.demo-content {
    padding: 3rem 2rem;
    background: var(--background-secondary);
    overflow-x: hidden;
}

.demo-tool {
    display: none;
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease-in-out;
    overflow-x: hidden;
}

.demo-tool.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-header h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.tool-header h2 i {
    color: var(--primary-color);
}

.tool-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

.tool-header .highlight-text {
    color: var(--demo-text-light);
    font-weight: 600;
}

/* ============================================
   ✅ WRAPPER SCROLLABLE POUR GRAPHIQUES - CORRIGÉ
   ============================================ */
.chart-scroll-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
    position: relative;
    contain: layout style;
}

/* ✅ Indicateur de scroll DÉSACTIVÉ */
.chart-scroll-wrapper::after {
    display: none;
}

@media (max-width: 768px) {
    .chart-scroll-wrapper::after {
        opacity: 1;
    }
}

.chart-scroll-container {
    min-width: 100%;
    width: auto;
}

/* Sur mobile, définir une largeur minimale pour les graphiques */
@media (max-width: 768px) {
    .chart-scroll-container {
        min-width: 600px;
        width: max-content;
    }
    
    /* Les graphiques prennent 100% de leur container */
    .chart-scroll-container > div {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .chart-scroll-container {
        min-width: 500px;
    }
}

/* ✅ Scrollbar grise discrète */
.chart-scroll-wrapper::-webkit-scrollbar {
    height: 8px;
}

.chart-scroll-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);  /* Gris très clair */
    border-radius: var(--radius-sm);
}

.chart-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;  /* ✅ Gris clair */
    border-radius: var(--radius-sm);
}

.chart-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;  /* ✅ Gris moyen au survol */
}

/* ============================================
   ✅ CONTAINERS GRAPHIQUES - CONTAINMENT STRICT
   ============================================ */
#companyExtraCharts,
#portfolioCorrelation,
#portfolioPerformance,
#monteCarloSection,
#marketSentiment,
#aiPredictionChart {
    margin: 2rem 0;
    overflow: hidden;
}

/* Tous les containers de graphiques */
#companyPerformanceChart,
#companyRatingsChart,
#sentimentGauge,
#correlationHeatmap,
#portfolioPerformanceChart,
#monteCarloChart,
#predictionChartContainer,
#liveQuoteChart,
#technicalChart,
#portfolioAllocationChart {
    width: 100%;
    height: auto;
    min-height: 300px;
}

/* Sur desktop, hauteur fixe */
@media (min-width: 769px) {
    #companyPerformanceChart,
    #companyRatingsChart,
    #correlationHeatmap,
    #portfolioPerformanceChart,
    #monteCarloChart,
    #predictionChartContainer,
    #liveQuoteChart,
    #technicalChart {
        min-height: 400px;
    }
    
    #sentimentGauge {
        min-height: 250px;
    }
    
    #portfolioAllocationChart {
        min-height: 400px;
    }
}

/* Sur mobile, hauteur réduite */
@media (max-width: 768px) {
    #companyPerformanceChart,
    #companyRatingsChart,
    #correlationHeatmap,
    #portfolioPerformanceChart,
    #monteCarloChart,
    #predictionChartContainer,
    #liveQuoteChart,
    #technicalChart {
        min-height: 250px;
    }
    
    #sentimentGauge {
        min-height: 200px;
    }
    
    #portfolioAllocationChart {
        min-height: 250px;
    }
}

/* ============================================
   SEARCH INTERFACE DEMO
   ============================================ */
.search-interface-demo {
    background: var(--background-primary);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.search-box-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--background-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    transition: all var(--transition-base);
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

body.dark-mode .search-box:focus-within {
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.search-box i {
    color: var(--text-tertiary);
    font-size: 1.25rem;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-primary);
    background: transparent;
    font-weight: 500;
}

.search-box input::placeholder {
    color: var(--text-tertiary);
}

.btn-search {
    background: var(--demo-gradient-1);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-search:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-height: 400px;
    overflow-y: auto;
    z-index: var(--z-dropdown);
    display: none;
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: background var(--transition-base);
    border-bottom: 1px solid var(--border-color);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background: var(--background-tertiary);
}

.suggestion-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--demo-gradient-1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.suggestion-icon.tech {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.suggestion-icon.finance {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.suggestion-icon.industrial {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.suggestion-icon.crypto {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.suggestion-icon.etf {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.suggestion-info {
    flex: 1;
    min-width: 0;
}

.suggestion-symbol {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin-bottom: 0.125rem;
}

.suggestion-match {
    background: rgba(102, 126, 234, 0.2);
    color: var(--primary-color);
    padding: 0 0.25rem;
    border-radius: 2px;
}

.suggestion-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-exchange {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    padding: 0.25rem 0.5rem;
    background: var(--background-tertiary);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.suggestion-category {
    padding: 0.75rem 1rem;
    background: var(--background-tertiary);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: sticky;
    top: 0;
    z-index: 1;
}

.suggestion-loading {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.suggestion-loading i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.no-results {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 3rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.no-results p {
    margin: 0.5rem 0;
}

.no-results strong {
    color: var(--text-primary);
}

/* ============================================
   SEARCH RESULTS CONTAINER
   ============================================ */
.search-results-container {
    min-height: 400px;
    overflow: hidden;
}

.results-placeholder {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.results-placeholder i {
    font-size: 4rem;
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
}

.results-placeholder h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.results-placeholder p {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.popular-searches {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.popular-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.popular-tag {
    padding: 0.5rem 1rem;
    background: var(--background-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
}

.popular-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Company Result Cards */
.company-result-card {
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all var(--transition-base);
    cursor: pointer;
    overflow: hidden;
}

.company-result-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.company-result-card.highlight {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

body.dark-mode .company-result-card.highlight {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
}

.company-result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.company-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--demo-gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.company-details {
    flex: 1;
    min-width: 0;
}

.company-details h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.company-details p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.relevancy-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.score-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(
        var(--success-color) 0% 98%, 
        var(--border-color) 98% 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--background-primary);
}

.score-value {
    position: relative;
    z-index: 1;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.score-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.company-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ============================================
   LIVE QUOTES INTERFACE
   ============================================ */
.live-quotes-interface {
    background: var(--background-primary);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.quote-search {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quote-search input {
    flex: 1;
}

.quote-display {
    background: var(--background-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    overflow: hidden;
}

.quote-placeholder {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.quote-placeholder i {
    font-size: 3rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.quote-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.quote-header {
    margin-bottom: 1.5rem;
}

.quote-symbol {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.quote-name {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.quote-price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.quote-change {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.125rem;
}

.quote-change.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.quote-change.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.quote-stat {
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.quote-stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.quote-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.quote-chart-container {
    margin-top: 2rem;
    overflow: hidden;
}

.chart-area {
    min-height: 400px;
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    overflow: hidden;
}

/* ============================================
   PORTFOLIO INTERFACE
   ============================================ */
.portfolio-interface {
    background: var(--background-primary);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.portfolio-add {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.portfolio-add input {
    flex: 1;
    min-width: 150px;
}

.portfolio-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    overflow: hidden;
}

.summary-card {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    overflow: hidden;
}

.summary-card h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.value-large {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.portfolio-table-wrapper {
    overflow-x: auto;
    margin-bottom: 2rem;
}

.portfolio-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.portfolio-table thead {
    background: var(--background-tertiary);
}

.portfolio-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.portfolio-table td {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-primary);
}

.portfolio-table .empty-state {
    text-align: center;
}

.portfolio-table .empty-state td {
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.portfolio-table .empty-state i {
    font-size: 3rem;
    color: var(--text-tertiary);
    display: block;
    margin-bottom: 1rem;
}

.btn-remove {
    background: transparent;
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.875rem;
}

.btn-remove:hover {
    background: var(--danger-color);
    color: white;
}

.portfolio-chart {
    min-height: 400px;
    overflow: hidden;
}

/* ============================================
   TECHNICAL ANALYSIS INTERFACE
   ============================================ */
.technical-interface {
    background: var(--background-primary);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.technical-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.technical-controls input {
    flex: 1;
}

.indicators-panel {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.indicators-panel h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.indicators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.indicator-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    transition: background var(--transition-base);
}

.indicator-checkbox:hover {
    background: var(--background-tertiary);
}

.indicator-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.indicator-checkbox span {
    font-size: 0.9375rem;
    color: var(--text-primary);
    font-weight: 500;
}

.technical-chart-container {
    margin-bottom: 2rem;
    overflow: hidden;
}

.technical-signals {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.technical-signals h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.signals-placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.signals-placeholder i {
    font-size: 2.5rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.signals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.signal-card {
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow: hidden;
}

.signal-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.signal-icon.bullish {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.signal-icon.bearish {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.signal-icon.neutral {
    background: var(--background-tertiary);
    color: var(--text-secondary);
}

.signal-info h5 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.signal-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ============================================
   RISK CALCULATOR INTERFACE
   ============================================ */
.risk-interface {
    background: var(--background-primary);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    overflow: hidden;
}

.risk-inputs {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    overflow: hidden;
}

.risk-results {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    overflow: hidden;
}

.results-placeholder {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.results-placeholder i {
    font-size: 3rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.risk-metric-card {
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.risk-metric-card h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.risk-metric-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.risk-metric-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.btn-block {
    width: 100%;
}

/* ============================================
   AI INSIGHTS INTERFACE
   ============================================ */
.ai-interface {
    background: var(--background-primary);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.ai-search {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.ai-search input {
    flex: 1;
}

.btn-accent {
    background: var(--accent-color);
    color: white;
    border: none;
}

.btn-accent:hover {
    background: #7c3aed;
}

.ai-results {
    min-height: 400px;
    overflow: hidden;
}

.ai-placeholder {
    text-align: center;
    padding: 3rem 2rem;
}

.ai-placeholder i {
    font-size: 4rem;
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
}

.ai-placeholder h3 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.ai-placeholder p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.ai-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.ai-feature {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition-base);
}

.ai-feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.ai-feature i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.ai-feature span {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.ai-insight-card {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.ai-insight-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ai-insight-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--demo-gradient-1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.ai-insight-title {
    flex: 1;
}

.ai-insight-title h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.ai-insight-title p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.ai-confidence {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.875rem;
}

.ai-insight-content {
    color: var(--text-primary);
    line-height: 1.7;
}

.ai-prediction-chart {
    margin-top: 1.5rem;
    min-height: 300px;
    overflow: hidden;
}

/* ============================================
   DEMO CTA SECTION
   ============================================ */
.demo-cta {
    background: var(--demo-gradient-1);
    padding: 4rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.demo-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.demo-cta .cta-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.demo-cta h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--demo-text-light);
}

.demo-cta p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: var(--demo-text-light);
}

.cta-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-cta-primary {
    padding: 1rem 2.5rem;
    background: white;
    color: var(--primary-color);
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.btn-cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-cta-secondary {
    padding: 1rem 2.5rem;
    background: transparent;
    color: white;
    border: 2px solid white;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition-base);
}

.btn-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

/* ============================================
   DEMO FOOTER
   ============================================ */
.demo-footer {
    background: var(--text-primary);
    color: rgba(255, 255, 255, 0.7);
    padding: 2rem;
    text-align: center;
    margin-top: auto;
}

body.dark-mode .demo-footer {
    background: #0a0f1a;
}

.demo-footer .container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.demo-footer p {
    margin: 0;
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition-base);
}

.footer-links a:hover {
    color: white;
}

/* ============================================
   LOADING & STATES
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.error-message i {
    font-size: 1.25rem;
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.success-message i {
    font-size: 1.25rem;
}

/* ============================================
   NOTIFICATIONS TOAST
   ============================================ */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease-in-out;
    max-width: 400px;
}

.notification-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-toast i {
    font-size: 1.25rem;
}

.notification-toast.notification-success {
    border-color: var(--success-color);
}

.notification-toast.notification-success i {
    color: var(--success-color);
}

.notification-toast.notification-error {
    border-color: var(--danger-color);
}

.notification-toast.notification-error i {
    color: var(--danger-color);
}

.notification-toast.notification-warning {
    border-color: var(--warning-color);
}

.notification-toast.notification-warning i {
    color: var(--warning-color);
}

.notification-toast.notification-info {
    border-color: var(--primary-color);
}

.notification-toast.notification-info i {
    color: var(--primary-color);
}

.notification-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    font-size: 1rem;
}

.notification-close:hover {
    color: var(--text-primary);
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================ */

/* ✅ TABLETTES (768px - 1024px) */
@media (max-width: 1024px) {
    .risk-interface {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* ✅ SMARTPHONES (768px et moins) */
@media (max-width: 768px) {
    .demo-nav-container {
        padding: 1rem 1.5rem;
    }
    
    .demo-brand {
        gap: 0.5rem;
    }
    
    .brand-text {
        font-size: 1.125rem;
    }
    
    .btn-back-home span {
        display: none;
    }
    
    .demo-hero {
        padding: 3rem 1.5rem;
    }
    
    .demo-hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .demo-tools-nav {
        padding: 2rem 1.5rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .demo-content {
        padding: 2rem 1.5rem;
    }
    
    .search-interface-demo,
    .live-quotes-interface,
    .portfolio-interface,
    .technical-interface,
    .ai-interface {
        padding: 1.5rem;
        border-radius: var(--radius-lg);
    }
    
    .quote-search,
    .portfolio-add,
    .technical-controls,
    .ai-search {
        flex-direction: column;
    }
    
    .company-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quote-info {
        grid-template-columns: 1fr;
    }
    
    .portfolio-summary {
        grid-template-columns: 1fr;
    }
    
    .indicators-grid {
        grid-template-columns: 1fr;
    }
    
    .signals-grid {
        grid-template-columns: 1fr;
    }
    
    .ai-features {
        grid-template-columns: 1fr;
    }
    
    .demo-cta {
        padding: 3rem 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-cta-primary,
    .btn-cta-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .demo-footer .container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ✅ PETITS SMARTPHONES (480px et moins) */
@media (max-width: 480px) {
    .demo-hero-title {
        font-size: 1.75rem;
    }
    
    .tool-card {
        padding: 1.5rem;
    }
    
    .company-metrics {
        grid-template-columns: 1fr;
    }
    
    .company-result-header {
        flex-wrap: wrap;
    }
    
    .relevancy-score {
        margin-top: 1rem;
        flex-direction: row;
        width: 100%;
        justify-content: center;
    }
    
    .search-box {
        padding: 0.875rem 1rem;
    }
    
    .popular-searches {
        flex-direction: column;
        align-items: stretch;
    }
    
    .popular-tag {
        width: 100%;
        text-align: center;
    }
    
    .quote-price {
        font-size: 2.5rem;
    }
    
    .value-large {
        font-size: 1.75rem;
    }
    
    .ai-insight-header {
        flex-wrap: wrap;
    }
    
    .ai-confidence {
        width: 100%;
        justify-content: center;
    }
    
    .notification-toast {
        max-width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.bg-success-light {
    background: rgba(16, 185, 129, 0.1) !important;
}

.bg-danger-light {
    background: rgba(239, 68, 68, 0.1) !important;
}

.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.4s ease-in-out;
}

.slide-up {
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   DARK MODE SPECIFIC ADJUSTMENTS
   ============================================ */
body.dark-mode .search-box {
    background: var(--background-secondary);
}

body.dark-mode .suggestion-item:hover {
    background: var(--background-primary);
}

body.dark-mode .chart-area {
    background: var(--background-secondary);
}

body.dark-mode {
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --background-primary: #1e293b;
    --background-secondary: #0f172a;
    --background-tertiary: #334155;
    --border-color: #334155;
}

/* GRAPHIQUES HIGHCHARTS - TEXTES */
body.dark-mode .highcharts-root text,
body.dark-mode .highcharts-title,
body.dark-mode .highcharts-axis-title,
body.dark-mode .highcharts-axis-labels text,
body.dark-mode .highcharts-legend-item text,
body.dark-mode .highcharts-label text {
    fill: #f1f5f9 !important;
}

body.dark-mode .highcharts-data-label text {
    fill: #ffffff !important;
    text-shadow: 0 0 3px rgba(0,0,0,0.8);
}

/* GRAPHIQUES HIGHCHARTS - TOOLTIPS */
body.dark-mode .highcharts-tooltip-box {
    fill: #1e293b !important;
    stroke: #334155 !important;
}

body.dark-mode .highcharts-tooltip text,
body.dark-mode .highcharts-tooltip th,
body.dark-mode .highcharts-tooltip td {
    fill: #f1f5f9 !important;
}

/* GRAPHIQUES HIGHCHARTS - GRILLES ET AXES */
body.dark-mode .highcharts-grid-line {
    stroke: #334155 !important;
}

body.dark-mode .highcharts-axis-line,
body.dark-mode .highcharts-tick {
    stroke: #475569 !important;
}

/* GRAPHIQUES HIGHCHARTS - BOUTONS */
body.dark-mode .highcharts-button-box {
    fill: #334155 !important;
}

body.dark-mode .highcharts-button text,
body.dark-mode .highcharts-range-selector-buttons text {
    fill: #cbd5e1 !important;
}

/* GRAPHIQUES HIGHCHARTS - NAVIGATOR ET SCROLLBAR */
body.dark-mode .highcharts-navigator-outline {
    stroke: #475569 !important;
}

body.dark-mode .highcharts-navigator-handle {
    fill: #475569 !important;
    stroke: #64748b !important;
}

body.dark-mode .highcharts-scrollbar-track {
    fill: #0f172a !important;
    stroke: #334155 !important;
}

body.dark-mode .highcharts-scrollbar-thumb {
    fill: #475569 !important;
    stroke: #64748b !important;
}

/* INPUTS ET FORMULAIRES */
body.dark-mode .search-box,
body.dark-mode .form-input {
    background: var(--background-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-mode .search-box input,
body.dark-mode .form-input {
    color: var(--text-primary);
}

body.dark-mode .search-box input::placeholder,
body.dark-mode .form-input::placeholder {
    color: var(--text-tertiary);
}

/* CARTES ET CONTAINERS */
body.dark-mode .search-interface-demo,
body.dark-mode .live-quotes-interface,
body.dark-mode .portfolio-interface,
body.dark-mode .technical-interface,
body.dark-mode .risk-interface,
body.dark-mode .ai-interface,
body.dark-mode .company-result-card,
body.dark-mode .quote-display,
body.dark-mode .quote-stat,
body.dark-mode .summary-card,
body.dark-mode .risk-metric-card,
body.dark-mode .signal-card {
    background: var(--background-primary);
    border-color: var(--border-color);
}

/* TABLEAUX */
body.dark-mode .portfolio-table {
    background: var(--background-primary);
    border-color: var(--border-color);
}

body.dark-mode .portfolio-table thead {
    background: var(--background-tertiary);
}

body.dark-mode .portfolio-table th,
body.dark-mode .portfolio-table td {
    color: var(--text-primary);
    border-color: var(--border-color);
}

/* SUGGESTIONS */
body.dark-mode .search-suggestions {
    background: var(--background-primary);
    border-color: var(--border-color);
}

body.dark-mode .suggestion-item:hover {
    background: var(--background-tertiary) !important;
}

body.dark-mode .suggestion-category {
    background: var(--background-tertiary);
    color: var(--text-secondary);
}

body.dark-mode .suggestion-exchange {
    background: var(--background-tertiary);
    color: var(--text-tertiary);
}

/* INDICATEURS TECHNIQUES */
body.dark-mode .indicators-panel,
body.dark-mode .technical-signals {
    background: var(--background-secondary);
    border-color: var(--border-color);
}

body.dark-mode .indicator-checkbox:hover {
    background: var(--background-tertiary);
}

/* RISK CALCULATOR */
body.dark-mode .risk-inputs,
body.dark-mode .risk-results {
    background: var(--background-secondary);
    border-color: var(--border-color);
}

/* AI FEATURES */
body.dark-mode .ai-feature {
    background: var(--background-secondary);
    border-color: var(--border-color);
}

/* PLACEHOLDERS */
body.dark-mode .results-placeholder,
body.dark-mode .quote-placeholder,
body.dark-mode .ai-placeholder {
    color: var(--text-secondary);
}

body.dark-mode .results-placeholder h3,
body.dark-mode .ai-placeholder h3 {
    color: var(--text-primary);
}

/* POPULAR TAGS */
body.dark-mode .popular-tag {
    background: var(--background-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* MESSAGES */
body.dark-mode .error-message {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

body.dark-mode .success-message {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

/* SCROLLBAR */
body.dark-mode ::-webkit-scrollbar-track {
    background: var(--background-secondary);
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: var(--background-tertiary);
}

/* Dark mode */
body.dark-mode .chart-scroll-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .chart-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #475569;  /* Gris foncé en dark mode */
}

body.dark-mode .chart-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: #64748b;  /* Gris moyen en dark mode */
}

/* HEADINGS */
body.dark-mode h4,
body.dark-mode h5 {
    color: var(--text-primary) !important;
}

/* LABELS ET VALEURS */
body.dark-mode .metric-label,
body.dark-mode .quote-stat-label,
body.dark-mode .risk-metric-description {
    color: var(--text-secondary) !important;
}

body.dark-mode .metric-value,
body.dark-mode .quote-stat-value,
body.dark-mode .value-large,
body.dark-mode .quote-price {
    color: var(--text-primary) !important;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .demo-nav,
    .demo-tools-nav,
    .demo-cta,
    .demo-footer,
    .btn,
    button {
        display: none !important;
    }
    
    .demo-tool {
        display: block !important;
        page-break-inside: avoid;
    }
    
    body {
        background: white;
    }
    
    .chart-scroll-wrapper::after {
        display: none;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ============================================
   SMOOTH SCROLLING
   ============================================ */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* DEMO BADGES & DISCLAIMERS */
.demo-badge-inline {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
    font-size: 0.625rem;
    font-weight: 800;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.demo-watermark {
    display: inline-block;
    font-size: 0.875rem;
    color: #f59e0b;
    font-weight: 700;
    margin-left: 0.5rem;
    opacity: 0.7;
}

.global-demo-disclaimer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10000;
    max-width: 90%;
    opacity: 0;
    transition: all 0.5s ease;
}

.global-demo-disclaimer.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.global-demo-disclaimer button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    font-size: 1.25rem;
}

.demo-data-disclaimer {
    background: rgba(245, 158, 11, 0.1);
    border: 2px solid #f59e0b;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #f59e0b;
    font-weight: 600;
    font-size: 0.875rem;
}

body.dark-mode .demo-data-disclaimer {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-color: #fbbf24;
}

.demo-data-disclaimer strong {
    color: #ea580c;
    font-weight: 800;
}

body.dark-mode .demo-data-disclaimer strong {
    color: #fb923c;
}
