/* ==========================================================================
   TOP PERFORMERS - DESIGN BOURSE (TradingView / Bloomberg)
   ========================================================================== */

:root {
    --fin-bg: #131722;
    --fin-panel: #1e222d;
    --fin-border: #2a2e39;
    --fin-text-muted: #787b86;
    --fin-text: #d1d4dc;
    --fin-text-light: #ffffff;
    --fin-green: #089981;
    --fin-green-bg: rgba(8, 153, 129, 0.1);
    --fin-red: #f23645;
    --fin-blue: #2962ff;
    --fin-gold: #e2a03f;
    --fin-silver: #a0aab2;
    --fin-bronze: #cd7f32;
}

.etea-top-performers-wrapper {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* --- Boutons d'onglets (Tabs) --- */
.etea-tp-controls {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.etea-tp-btn-group {
    display: flex;
    flex-wrap: wrap;
    background-color: var(--fin-bg);
    border: 1px solid var(--fin-border);
    border-radius: 6px;
    overflow: hidden;
}

.etea-tp-btn {
    background: transparent;
    border: none;
    border-right: 1px solid var(--fin-border);
    color: var(--fin-text-muted);
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}
.etea-tp-btn:last-child {
    border-right: none;
}

.etea-tp-btn:hover {
    background-color: rgba(255,255,255,0.03);
    color: var(--fin-text-light);
}

.etea-tp-btn.active {
    background-color: var(--fin-green);
    color: #ffffff;
    font-weight: 700;
}

/* Texte Descriptif */
.etea-tp-desc {
    text-align: center;
    color: var(--fin-text-muted);
    font-style: italic;
    margin-bottom: 15px;
    font-size: 12px;
}

/* --- Tableaux --- */
.etea-tp-table-responsive {
    overflow-x: auto;
    border: 1px solid var(--fin-border);
    border-radius: 8px;
    background-color: var(--fin-bg);
}

.etea-tp-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.etea-tp-table thead th {
    background-color: var(--fin-panel);
    color: var(--fin-text-muted);
    font-weight: 600;
    padding: 12px 15px;
    text-transform: uppercase;
    font-size: 11px;
    text-align: left;
    border-bottom: 1px solid var(--fin-border);
    white-space: nowrap;
}

.etea-tp-row {
    transition: background-color 0.2s, transform 0.1s;
    cursor: pointer;
}

.etea-tp-row:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Ciblage lors du scroll */
.etea-tp-row.highlighted {
    background-color: var(--fin-green-bg) !important;
}

.etea-tp-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--fin-border);
    color: var(--fin-text);
    font-size: 13px;
    vertical-align: middle;
}

.etea-tp-table tr:last-child td {
    border-bottom: none;
}

/* Cellule Ticker (Logo + Nom) */
.etea-tp-ticker-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.etea-tp-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #ffffff;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.etea-tp-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}
.etea-tp-logo-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--fin-border);
    flex-shrink: 0;
}

.etea-tp-ticker-name {
    color: var(--fin-text-light);
    font-weight: 600;
    font-size: 14px;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.2s;
}
.etea-tp-row:hover .etea-tp-ticker-name {
    text-decoration-color: var(--fin-text-muted);
}

/* Badge de Rang */
.etea-tp-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: var(--fin-panel);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--fin-text-muted);
    border: 1px solid var(--fin-border);
}

/* Couleurs spécifiques pour le Top 3 */
.etea-tp-table tbody tr:nth-child(1) .etea-tp-rank { 
    background-color: rgba(226, 160, 63, 0.1); color: var(--fin-gold); border-color: rgba(226, 160, 63, 0.3); 
}
.etea-tp-table tbody tr:nth-child(2) .etea-tp-rank { 
    background-color: rgba(160, 170, 178, 0.1); color: var(--fin-silver); border-color: rgba(160, 170, 178, 0.3); 
}
.etea-tp-table tbody tr:nth-child(3) .etea-tp-rank { 
    background-color: rgba(205, 127, 50, 0.1); color: var(--fin-bronze); border-color: rgba(205, 127, 50, 0.3); 
}

/* Contenus Textuels Spécifiques */
.etea-tp-streak {
    color: var(--fin-green);
    font-weight: 700;
    font-size: 15px;
}
.etea-tp-muted {
    color: var(--fin-text-muted);
}
.etea-tp-pos { color: var(--fin-green); font-weight: 600; }
.etea-tp-neg { color: var(--fin-red); font-weight: 600; }

.etea-tp-no-data {
    text-align: center;
    color: var(--fin-text-muted);
    font-style: italic;
    padding: 20px;
    font-size: 13px;
}