/* ============================================================
   TRENDING TOPICS — trending-topics.css v2.1
   Compatible AlphaVault Drive (avd- variables)
   ============================================================ */

/* ════════════════════════════════════════════════════════════
   0. RÉTRO-COMPATIBILITÉ — anciennes variables common.css
   (utilisées dans le JS : var(--text-secondary), etc.)
════════════════════════════════════════════════════════════ */
:root {
    --text-primary:       var(--avd-text);
    --text-secondary:     var(--avd-text-muted);
    --text-tertiary:      var(--avd-text-dim);
    --glass-border:       var(--avd-border);
    --glass-bg:           var(--avd-input-bg);
    --transition-smooth:  var(--avd-transition);
}

/* ════════════════════════════════════════════════════════════
   1. LAYOUT CONTENU
════════════════════════════════════════════════════════════ */

#avDriveContent {
    background: transparent;
}

.tt-section {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--avd-radius-xl);
    padding: 28px 32px;
    margin-bottom: 24px;
}

.tt-subtitle {
    color: var(--avd-text-dim);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 24px;
    margin-top: 6px;
}

/* ── Page Footer ─────────────────────────────────────────── */
.tt-footer {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--avd-radius-xl);
    text-align: center;
    padding: 24px 20px;
    margin-top: 8px;
    margin-bottom: 4px;
}
.tt-footer p {
    color: var(--avd-text-dim);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* ════════════════════════════════════════════════════════════
   2. TRENDING TOPICS GRID
   ⚠  Classe réelle du JS : .trending-topic-card
════════════════════════════════════════════════════════════ */

.trending-topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

/* ── Card ───────────────────────────────────────────────── */
.trending-topic-card {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--avd-radius-lg);
    padding: 18px 20px;
    cursor: pointer;
    transition: var(--avd-transition);
    position: relative;
    overflow: hidden;
    animation: ttFadeIn 0.35s ease both;
}
.trending-topic-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--avd-primary), var(--avd-primary-dark));
    opacity: 0;
    transition: var(--avd-transition);
}
.trending-topic-card:hover {
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-3px);
    box-shadow: var(--avd-shadow);
}
.trending-topic-card:hover::before { opacity: 1; }

/* Staggered delays */
.trending-topic-card:nth-child(1)  { animation-delay: 0.04s; }
.trending-topic-card:nth-child(2)  { animation-delay: 0.08s; }
.trending-topic-card:nth-child(3)  { animation-delay: 0.12s; }
.trending-topic-card:nth-child(4)  { animation-delay: 0.16s; }
.trending-topic-card:nth-child(5)  { animation-delay: 0.20s; }
.trending-topic-card:nth-child(6)  { animation-delay: 0.24s; }
.trending-topic-card:nth-child(7)  { animation-delay: 0.28s; }
.trending-topic-card:nth-child(8)  { animation-delay: 0.32s; }
.trending-topic-card:nth-child(9)  { animation-delay: 0.36s; }
.trending-topic-card:nth-child(10) { animation-delay: 0.40s; }

/* Header : icon + nom + trend */
.topic-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.topic-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 800;
    color: var(--avd-text);
    flex: 1;
    min-width: 0;
}
.topic-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.12);
    color: var(--avd-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* Indicateur de tendance */
.topic-trend {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}
.topic-trend.up      { background: rgba(16, 185, 129, 0.12); color: var(--avd-green); }
.topic-trend.down    { background: rgba(239, 68, 68, 0.12);  color: var(--avd-red);   }
.topic-trend.neutral { background: rgba(100, 116, 139, 0.12); color: var(--avd-text-dim); }

/* Compteur mentions */
.topic-mentions {
    font-size: 12px;
    color: var(--avd-text-dim);
    font-weight: 600;
    margin-bottom: 12px;
}
.mention-count {
    font-size: 24px;
    font-weight: 900;
    color: var(--avd-primary);
    margin-right: 4px;
}

/* Sparkline container */
.topic-timeline {
    height: 50px;
    margin-bottom: 12px;
    position: relative;
}
.topic-timeline canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Badge de variation */
.topic-change-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.topic-change-badge.positive {
    background: rgba(16, 185, 129, 0.12);
    color: var(--avd-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.topic-change-badge.negative {
    background: rgba(239, 68, 68, 0.12);
    color: var(--avd-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.topic-change-badge.neutral {
    background: rgba(100, 116, 139, 0.12);
    color: var(--avd-text-dim);
    border: 1px solid var(--avd-border);
}

/* ════════════════════════════════════════════════════════════
   3. FEAR & GREED INDEX
════════════════════════════════════════════════════════════ */

.fear-greed-wrapper {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--avd-radius-xl);
    padding: 28px 32px;
    margin-bottom: 24px;
}

/* Header */
.fear-greed-header {
    text-align: center;
    margin-bottom: 28px;
}
.fear-greed-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: var(--avd-primary);
    margin-bottom: 14px;
}
.fear-greed-badge i { color: var(--avd-red); }

.global-title {
    font-size: 20px;
    font-weight: 900;
    color: var(--avd-text);
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.global-title i { color: var(--avd-primary); }

.global-subtitle {
    font-size: 13px;
    color: var(--avd-text-dim);
    font-weight: 500;
    margin: 0;
}
.global-subtitle span {
    color: var(--avd-primary);
    font-weight: 800;
}

/* Container principal */
.fear-greed-main {
    background: var(--avd-input-bg);
    border: 1px solid var(--avd-border);
    border-radius: var(--avd-radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}
.breakdown-title {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--avd-text-dim);
    text-align: center;
    margin-bottom: 24px;
}

/* Visual wrapper : gauge + stats */
.fear-visual-wrapper {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Gauge */
.fear-greed-gauge {
    position: relative;
    width: 200px;
    height: 200px;
    flex-shrink: 0;
}
.fear-greed-gauge canvas {
    width: 100% !important;
    height: 100% !important;
}
.gauge-center-fear {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}
.fear-value {
    font-size: 38px;
    font-weight: 900;
    color: var(--avd-text);
    line-height: 1;
}
.fear-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--avd-text-dim);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* Stats breakdown */
.fear-breakdown {
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.fear-stat {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--avd-radius);
    padding: 12px 16px;
    transition: var(--avd-transition);
}
.fear-stat:hover {
    border-color: var(--avd-border-hover);
    transform: translateX(4px);
}
.fear-stat-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.fear-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.fear-stat-icon.fear-icon    { background: rgba(239, 68, 68, 0.12);   color: var(--avd-red);   }
.fear-stat-icon.greed-icon   { background: rgba(16, 185, 129, 0.12);  color: var(--avd-green); }
.fear-stat-icon.neutral-icon { background: rgba(245, 158, 11, 0.12);  color: var(--avd-amber); }
.fear-stat-label { flex: 1; font-size: 12px; font-weight: 600; color: var(--avd-text-muted); }
.fear-stat-value { font-size: 18px; font-weight: 900; color: var(--avd-text); flex-shrink: 0; }

/* Timeline */
.fear-timeline {
    background: var(--avd-input-bg);
    border: 1px solid var(--avd-border);
    border-radius: var(--avd-radius-lg);
    padding: 20px;
}
.fear-timeline-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    color: var(--avd-text);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.fear-timeline-title i { color: var(--avd-primary); }
.fear-chart-wrapper {
    height: 200px;
    position: relative;
}
.fear-chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ════════════════════════════════════════════════════════════
   4. RISKS & OPPORTUNITIES
   ⚠  Classe réelle du JS : .risk-opportunity-item
════════════════════════════════════════════════════════════ */

.risks-opportunities-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.risk-opportunity-panel {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--avd-radius-xl);
    padding: 24px;
    overflow: hidden;
    position: relative;
}
.risk-opportunity-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}
.risk-opportunity-panel.opportunities::before {
    background: linear-gradient(90deg, var(--avd-green), #38f9d7);
}
.risk-opportunity-panel.risks::before {
    background: linear-gradient(90deg, var(--avd-red), #fd7e14);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}
.panel-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.panel-icon.opportunity { background: rgba(16, 185, 129, 0.12); color: var(--avd-green); }
.panel-icon.risk        { background: rgba(239, 68, 68, 0.12);  color: var(--avd-red);   }
.panel-title   { font-size: 14px; font-weight: 800; color: var(--avd-text); margin-bottom: 3px; }
.panel-subtitle{ font-size: 11px; color: var(--avd-text-dim); font-weight: 500; }

.risk-opportunity-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Item individuel (classe réelle JS : .risk-opportunity-item) */
.risk-opportunity-item {
    background: var(--avd-input-bg);
    border: 1px solid var(--avd-border);
    border-radius: var(--avd-radius);
    padding: 14px 16px;
    cursor: pointer;
    transition: var(--avd-transition);
}
.risk-opportunity-item:hover {
    border-color: var(--avd-border-hover);
    background: var(--avd-card-hover);
    transform: translateX(3px);
}

.item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.item-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--avd-text);
    flex: 1;
    min-width: 0;
}
.item-badge {
    font-size: 9px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.item-badge.high-opportunity {
    background: rgba(16, 185, 129, 0.12);
    color: var(--avd-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.item-badge.high-risk {
    background: rgba(239, 68, 68, 0.12);
    color: var(--avd-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.item-description {
    font-size: 11px;
    color: var(--avd-text-dim);
    line-height: 1.5;
    margin-bottom: 10px;
}

.item-metrics {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.metric {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--avd-text-muted);
    font-weight: 600;
}
.metric i        { color: var(--avd-text-dim); font-size: 10px; }
.metric strong   { color: var(--avd-text); }

/* ════════════════════════════════════════════════════════════
   5. LOGOS ENTREPRISES
════════════════════════════════════════════════════════════ */

/* Petit logo dans les listes */
.company-logo-mini {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--avd-input-bg);
    border: 1px solid var(--avd-border);
    display: flex;
    align-items: center;
    justify-content: center;
}
.company-logo-mini .company-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.company-logo-mini .logo-initials {
    font-size: 9px;
    font-weight: 900;
    color: var(--avd-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Grand logo dans le modal */
.modal-company-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--avd-input-bg);
    border: 1px solid var(--avd-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.modal-company-logo .company-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.modal-company-logo .logo-initials {
    font-size: 14px;
    font-weight: 900;
    color: var(--avd-text-muted);
    text-transform: uppercase;
}
.modal-company-logo i {
    color: var(--avd-text-dim);
    font-size: 20px;
}

/* ════════════════════════════════════════════════════════════
   6. MODAL — Company Detail
   ⚠  Créé dynamiquement par JS dans createModal()
════════════════════════════════════════════════════════════ */

.company-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 15000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.company-modal.active {
    display: flex;
}

/* Backdrop */
.company-modal .modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}

/* ── Boîte modale principale (le fond qui était transparent) */
.company-modal .modal-content {
    position: relative;
    z-index: 1;
    /* DARK MODE : fond sombre opaque */
    background: #1a2235;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--avd-radius-xl);
    width: 100%;
    max-width: 620px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
    animation: ttModalIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* LIGHT MODE : fond blanc */
body.light-mode .company-modal .modal-content {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.2);
}

/* ── Header du modal ────────────────────────────────────── */
.company-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--avd-border);
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.02);
}
body.light-mode .company-modal .modal-header {
    background: rgba(0, 0, 0, 0.02);
}
.company-modal .modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}
.company-modal .modal-company-name {
    font-size: 18px;
    font-weight: 900;
    color: var(--avd-text);
    margin: 0 0 3px;
    line-height: 1.2;
}
.company-modal .modal-company-ticker {
    font-size: 12px;
    font-weight: 700;
    color: var(--avd-primary);
    margin: 0;
}

/* Bouton fermeture */
.company-modal .modal-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--avd-border);
    background: var(--avd-input-bg);
    color: var(--avd-text-muted);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--avd-transition);
    flex-shrink: 0;
}
.company-modal .modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--avd-red);
    border-color: rgba(239, 68, 68, 0.3);
}

/* ── Badge de sentiment ─────────────────────────────────── */
.company-modal .modal-sentiment-badge {
    margin: 16px 24px 0;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.company-modal .modal-sentiment-badge.opportunity {
    background: rgba(16, 185, 129, 0.1);
    color: var(--avd-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.company-modal .modal-sentiment-badge.risk {
    background: rgba(239, 68, 68, 0.1);
    color: var(--avd-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.company-modal .modal-sentiment-badge.neutral {
    background: rgba(245, 158, 11, 0.1);
    color: var(--avd-amber);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ── Boutons d'action ───────────────────────────────────── */
.company-modal .modal-actions {
    display: flex;
    gap: 10px;
    padding: 16px 24px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--avd-border);
}
.company-modal .modal-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--avd-radius);
    border: 1px solid var(--avd-border);
    background: var(--avd-input-bg);
    color: var(--avd-text-muted);
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--avd-transition);
}
.company-modal .modal-action-btn:hover {
    color: var(--avd-text);
    border-color: var(--avd-border-hover);
}
.company-modal .modal-action-btn.analyze {
    background: rgba(102, 126, 234, 0.1);
    color: var(--avd-primary);
    border-color: rgba(102, 126, 234, 0.25);
}
.company-modal .modal-action-btn.analyze:hover {
    background: rgba(102, 126, 234, 0.2);
}
.company-modal .modal-action-btn.predict {
    background: rgba(16, 185, 129, 0.1);
    color: var(--avd-green);
    border-color: rgba(16, 185, 129, 0.25);
}
.company-modal .modal-action-btn.predict:hover {
    background: rgba(16, 185, 129, 0.2);
}

/* ── Grille de stats ────────────────────────────────────── */
.company-modal .modal-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid var(--avd-border);
    flex-shrink: 0;
}
.company-modal .modal-stat {
    background: var(--avd-input-bg);
    padding: 14px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-right: 1px solid var(--avd-border);
}
.company-modal .modal-stat:last-child { border-right: none; }
body.light-mode .company-modal .modal-stat { background: #f8fafc; }

.company-modal .modal-stat > i {
    font-size: 16px;
    color: var(--avd-primary);
    flex-shrink: 0;
}
.company-modal .modal-stat > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.company-modal .stat-label {
    font-size: 9px;
    font-weight: 800;
    color: var(--avd-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 2px;
}
.company-modal .stat-value {
    font-size: 15px;
    font-weight: 900;
    color: var(--avd-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Section scrollable (articles) ─────────────────────── */
.company-modal .modal-section {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    min-height: 0;
}
.company-modal .modal-section::-webkit-scrollbar { width: 4px; }
.company-modal .modal-section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
body.light-mode .company-modal .modal-section::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
}

.company-modal .modal-section-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--avd-text);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.company-modal .modal-section-title i { color: var(--avd-primary); }

/* ── Liste d'articles ───────────────────────────────────── */
.company-modal .modal-articles-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Article card */
.company-modal .modal-article-card {
    display: flex;
    background: var(--avd-input-bg);
    border: 1px solid var(--avd-border);
    border-radius: var(--avd-radius);
    overflow: hidden;
    transition: var(--avd-transition);
}
.company-modal .modal-article-card:hover {
    border-color: var(--avd-border-hover);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* Indicateur de sentiment (barre latérale colorée) */
.company-modal .article-sentiment-indicator {
    width: 4px;
    flex-shrink: 0;
}
.company-modal .article-sentiment-indicator.positive { background: var(--avd-green); }
.company-modal .article-sentiment-indicator.negative { background: var(--avd-red);   }
.company-modal .article-sentiment-indicator.neutral  { background: var(--avd-amber); }

/* Contenu de l'article */
.company-modal .article-content {
    flex: 1;
    padding: 12px 14px;
    min-width: 0;
}
.company-modal .article-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.company-modal .article-source {
    font-size: 10px;
    font-weight: 700;
    color: var(--avd-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.company-modal .article-time {
    font-size: 10px;
    color: var(--avd-text-dim);
    font-weight: 500;
    flex-shrink: 0;
}
.company-modal .article-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--avd-text);
    line-height: 1.4;
    margin: 0 0 8px;
}
.company-modal .article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.company-modal .article-sentiment {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    color: var(--avd-text-dim);
    text-transform: capitalize;
}
.company-modal .sentiment-score {
    font-size: 10px;
    font-weight: 900;
    color: var(--avd-primary);
    margin-left: 2px;
}
.company-modal .article-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    color: var(--avd-primary);
    text-decoration: none;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(102, 126, 234, 0.1);
    transition: var(--avd-transition);
}
.company-modal .article-link:hover {
    background: rgba(102, 126, 234, 0.2);
}

/* Spacer de fin (ajouté par JS) */
.modal-articles-spacer {
    min-height: 80px;
    height: 80px;
    flex-shrink: 0;
    pointer-events: none;
}

/* ════════════════════════════════════════════════════════════
   7. LOADING OVERLAY
   ⚠  Créé dynamiquement par JS dans showLoadingState()
════════════════════════════════════════════════════════════ */

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: rgba(11, 17, 32, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
body.light-mode .loading-overlay {
    background: rgba(241, 245, 249, 0.9);
}

.modern-spinner {
    width: 52px;
    height: 52px;
    border: 4px solid var(--avd-border);
    border-top-color: var(--avd-primary);
    border-radius: 50%;
    animation: ttSpin 0.75s linear infinite;
}
.loading-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--avd-text-muted);
    letter-spacing: 0.3px;
}

/* ════════════════════════════════════════════════════════════
   8. ÉTATS VIDES / ERREUR
════════════════════════════════════════════════════════════ */

.tt-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    gap: 14px;
    color: var(--avd-text-dim);
    font-size: 13px;
    font-weight: 600;
    grid-column: 1 / -1;
}
.tt-loading i { font-size: 28px; color: var(--avd-primary); }

.tt-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    gap: 10px;
    color: var(--avd-text-dim);
    font-size: 13px;
    text-align: center;
    grid-column: 1 / -1;
}
.tt-empty i { font-size: 36px; opacity: 0.45; margin-bottom: 6px; }

/* ════════════════════════════════════════════════════════════
   9. ANIMATIONS
════════════════════════════════════════════════════════════ */

@keyframes ttFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes ttModalIn {
    from { opacity: 0; transform: scale(0.94) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes ttSpin {
    to { transform: rotate(360deg); }
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(20px); }
}

/* ════════════════════════════════════════════════════════════
   10. LIGHT MODE
════════════════════════════════════════════════════════════ */

body.light-mode .tt-section,
body.light-mode .fear-greed-wrapper,
body.light-mode .risk-opportunity-panel,
body.light-mode .tt-footer {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
body.light-mode .fear-stat          { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); }
body.light-mode .trending-topic-card{ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06); }
body.light-mode .risk-opportunity-item:hover { background: rgba(0, 0, 0, 0.02); }

/* ════════════════════════════════════════════════════════════
   11. RESPONSIVE
════════════════════════════════════════════════════════════ */

@media (max-width: 1100px) {
    .risks-opportunities-grid { grid-template-columns: 1fr; }
    .fear-visual-wrapper       { flex-direction: column; align-items: center; }
    .fear-breakdown            { width: 100%; min-width: unset; }
}

@media (max-width: 768px) {
    .tt-section,
    .fear-greed-wrapper,
    .risk-opportunity-panel {
        padding: 18px 16px;
    }
    .trending-topics-grid       { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .risks-opportunities-grid   { gap: 14px; }
    .fear-greed-gauge           { width: 160px; height: 160px; }
    .fear-value                 { font-size: 28px; }
    .fear-chart-wrapper         { height: 160px; }
    .company-modal .modal-stats { grid-template-columns: repeat(2, 1fr); }
    .company-modal .modal-actions { flex-direction: column; }
    .company-modal .modal-content { max-height: 94vh; }
}

@media (max-width: 480px) {
    .trending-topics-grid         { grid-template-columns: 1fr; }
    .fear-visual-wrapper          { gap: 18px; }
    .fear-greed-gauge             { width: 140px; height: 140px; }
    .fear-value                   { font-size: 24px; }
    .company-modal .modal-stats   { grid-template-columns: repeat(2, 1fr); }
    .company-modal .modal-content { max-height: 96vh; }
}