/* ==========================================================================
   STYLES DU SHORTCODE DE MENU BOURSE (MARKET DATA MENU)
   Design : Terminal Trading Premium (Cohérence Globale)
   ========================================================================== */

: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-red: #f23645;
    --fin-blue: #2962ff;
    --fin-gold: #ffd700; /* Or pour les éléments Premium */
}

/* Conteneur principal */
.etea-market-data-menu {
    background-color: var(--fin-bg);
    border-bottom: 1px solid var(--fin-border);
    height: 60px; /* Taille affinée */
    position: relative;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: block;
    padding: 0;
    margin: 0;
    overflow: hidden; 
    box-sizing: border-box;
}

/* Neutralisation de WordPress (wpautop) */
.etea-market-data-menu p, 
.etea-market-data-menu br {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.etea-ticker-loading {
    color: var(--fin-text-muted);
    font-size: 12px;
    font-family: 'Share Tech Mono', monospace;
    padding: 22px;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: etea-pulse-opacity 1.5s infinite;
}

@keyframes etea-pulse-opacity {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

/* ==========================================================================
   STYLES DU DÉFILEMENT (TICKER TAPE)
   ========================================================================== */

.etea-ticker-tape-display-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.etea-tape-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.5s;
    padding-left: 20px;
    
    /* Scroll Horizontal */
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.etea-tape-slide.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.etea-tape-slide::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Espace pour le bouton CTA si gratuit */
.etea-market-data-menu.is-free .etea-tape-slide {
    padding-right: 240px; 
}
.etea-market-data-menu.is-premium .etea-tape-slide {
    padding-right: 20px;
}

/* Chaque bloc de donnée (Ticker) */
.etea-tape-item {
    display: inline-flex;
    align-items: center;
    height: 100%;
    padding: 0 24px;
    color: var(--fin-text);
    text-decoration: none !important;
    border-right: 1px solid var(--fin-border);
    transition: background 0.2s ease;
    flex-shrink: 0;
    box-sizing: border-box;
}

.etea-tape-item:hover {
    background: rgba(255, 255, 255, 0.03);
}
.etea-tape-item:last-child {
    border-right: none;
}

/* Logo des entreprises (Pastille blanche pour visibilité sur fond sombre) */
.etea-tape-logo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 12px;
    background: #ffffff !important;
    object-fit: contain;
    padding: 3px;
    flex-shrink: 0;
    border: 1px solid var(--fin-border);
}

/* Textes et Valeurs */
.etea-tape-text-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.etea-tape-ticker-row {
    display: flex;
    align-items: center;
    font-weight: 700;
    color: var(--fin-text-light);
    font-size: 14px;
    line-height: 1.2;
    margin-bottom: 2px;
    font-family: 'Share Tech Mono', monospace;
}

.etea-tape-badges {
    font-size: 11px;
    margin-left: 8px;
    letter-spacing: 1px;
}

.etea-tape-item .val {
    font-size: 12px;
    font-weight: 600;
    font-family: 'Share Tech Mono', monospace;
}

/* Titres des sections ("Win Streaks", "Profit", etc.) */
.etea-tape-section-title {
    color: var(--fin-text-muted);
    text-transform: uppercase;
    font-weight: bold;
    margin-right: 15px;
    font-size: 10px;
    letter-spacing: 1.5px;
    flex-shrink: 0;
}
.etea-premium-title { 
    color: var(--fin-gold); 
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

/* Couleurs Sémantiques Dynamiques */
.etea-val-pos { color: var(--fin-green) !important; }
.etea-val-neg { color: var(--fin-red) !important; }
.etea-val-neutral { color: var(--fin-text-muted) !important; }

/* Statut et Sentiment Fixes */
.etea-status-text {
    font-size: 13px;
    font-weight: 700;
    margin-left: 8px;
    font-family: 'Share Tech Mono', monospace;
}

.etea-tape-sentiment .label { 
    color: var(--fin-text-muted); 
    margin-right: 15px; 
    font-size: 12px; 
    text-transform: uppercase; 
    font-weight: bold;
}

.etea-tape-sentiment .bullish { color: var(--fin-green); margin-right: 12px; font-weight: 700; font-size: 14px; }
.etea-tape-sentiment .bearish { color: var(--fin-red); font-weight: 700; font-size: 14px; }


/* ==========================================================================
   BOUTON UPGRADE (CTA)
   ========================================================================== */
.etea-cta-container {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 10;
    pointer-events: none;
}

.etea-tape-upgrade-cta {
    pointer-events: auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 30px 0 70px;
    /* Dégradé propre pour masquer la fin du défilement avec la couleur du fond */
    background: linear-gradient(to right, transparent 0%, var(--fin-bg) 35%, var(--fin-bg) 100%); 
    color: var(--fin-gold) !important;
    font-weight: 800;
    font-size: 11px;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    font-family: 'Share Tech Mono', monospace;
}

.etea-tape-upgrade-cta:hover {
    color: var(--fin-text-light) !important;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* ==========================================================================
   RESPONSIVE (MOBILES)
   ========================================================================== */
@media (max-width: 768px) {
    .etea-market-data-menu { height: 50px; }
    .etea-tape-item { padding: 0 15px; }
    .etea-tape-logo { width: 22px; height: 22px; margin-right: 8px; }
    .etea-tape-ticker-row { font-size: 12px; }
    .etea-tape-item .val { font-size: 11px; }
    
    .etea-tape-upgrade-cta {
        padding: 0 15px 0 45px;
        font-size: 9px;
    }
    .etea-market-data-menu.is-free .etea-tape-slide {
        padding-right: 150px;
    }
}