/* Variables Design Bourse */
: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-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --fin-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --fin-mono: "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

/* Reset Partiel pour le Header */
.etea-unified-header-container * {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

/* Bloque le scroll de la page en arrière-plan */
body.etea-no-scroll {
    overflow: hidden;
    height: 100vh;
    /* Optionnel : évite les petits sauts de mise en page sur certains navigateurs */
    position: fixed;
    width: 100%;
}

/* ==========================================================================
   CONTENEUR GLOBAL
   ========================================================================== */

.etea-unified-header-container {
    font-family: var(--fin-font);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-color: var(--fin-bg);
    border-bottom: 1px solid var(--fin-border);
    padding: 0 24px;
    height: 70px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    top: 0;
    z-index: 1000;
}

/* ==========================================================================
   LOGO
   ========================================================================== */
.etea-header-logo-section {
    flex-shrink: 0;
    margin-right: 40px;
    display: flex;
    align-items: center;
    margin-top: 9px;
}

.etea-header-logo-section img.custom-logo {
    height: 45px ;
    width: auto;
    transition: transform 0.2s ease;
}

.etea-header-logo-section img.custom-logo:hover {
    transform: scale(1.05);
}


/* ==========================================================================
   SECTION RECHERCHE
   ========================================================================== */
.etea-header-search-section {
    flex-grow: 1;
    max-width: 420px;
    margin-right: auto;
}

.etea-global-search-wrapper {
    position: relative;
    width: 100%;
}

.etea-global-search-form {
    display: flex;
    align-items: center;
    background-color: var(--fin-panel);
    border: 1px solid var(--fin-border);
    border-radius: 4px;
    height: 34px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.etea-global-search-form:hover {
    border-color: var(--fin-text-muted);
}

.etea-global-search-form:focus-within {
    border-color: var(--fin-blue);
    background-color: #1c202b;
    box-shadow: 0 0 0 1px var(--fin-blue);
}

.etea-global-search-button {
    background: transparent;
    border: none;
    width: 38px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--fin-text-muted);
    transition: color 0.2s;
}

.etea-global-search-button:hover {
    color: var(--fin-text-light);
}

.etea-global-search-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    color: var(--fin-text-light);
    font-size: 13px;
    outline: none;
    padding-right: 12px;
}

.etea-global-search-input::placeholder {
    color: var(--fin-text-muted);
    opacity: 0.7;
}

/* Dropdown de Recherche */
.etea-search-dropdown-container {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 680px;
    max-width: 95vw;
    background: var(--fin-bg);
    border: 1px solid var(--fin-border);
    border-radius: 6px;
    box-shadow: var(--fin-shadow);
    overflow: hidden;
    animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.etea-search-col-left {
    flex: 4;
    border-right: 1px solid var(--fin-border);
}

.etea-search-col-right {
    flex: 5;
    background: rgba(255, 255, 255, 0.02);
}

.etea-dropdown-section-title {
    padding: 12px 16px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--fin-text-muted);
    border-bottom: 1px solid var(--fin-border);
}

.etea-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.etea-dropdown-list li a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--fin-text);
    text-decoration: none;
    transition: background 0.15s;
    font-size: 13px;
}

.etea-dropdown-list li a:hover {
    background: rgba(41, 98, 255, 0.08);
}

.etea-dropdown-list .t-code {
    font-family: var(--fin-mono);
    color: var(--fin-blue);
    font-weight: 700;
    width: 70px;
}

.etea-dropdown-list .t-name {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--fin-text-light);
}

.etea-dropdown-list .t-sector {
    font-size: 10px;
    color: var(--fin-text-muted);
    background: var(--fin-panel);
    padding: 2px 6px;
    border-radius: 3px;
}

/* Items News dans Dropdown */
.etea-search-news-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    border-bottom: 1px solid var(--fin-border);
}

.etea-search-news-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.etea-search-news-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--fin-panel);
}

.etea-search-news-content h4 {
    margin: 0 0 4px 0;
    font-size: 12px;
    color: var(--fin-text-light);
    line-height: 1.4;
}

.etea-search-news-content span {
    font-size: 10px;
    color: var(--fin-text-muted);
}

/* Pastille blanche pour les logos dans la liste */
.etea-portfolio-logo {
    background: #ffffff !important;
    border-radius: 50%;
    padding: 2px;
    object-fit: contain;
    border: 1px solid var(--fin-border);
}

/* ==========================================================================
   NAVIGATION PRINCIPALE
   ========================================================================== */
.etea-header-right-group {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 100%;
}

.etea-header-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
}

.etea-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.etea-nav-item > a {
    color: var(--fin-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 0 12px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    position: relative;
}

.etea-nav-item:hover > a {
    color: var(--fin-text-light);
}

/* Indicateur de ligne sous le lien */
.etea-nav-item > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--fin-green);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.etea-nav-item:hover > a::after {
    transform: scaleX(1);
}

.etea-chevron-icon { width: 12px; height: 12px; stroke: currentColor; opacity: 0.7; transition: transform 0.2s; display: block; margin: 0; }

/* Submenu */
.etea-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--fin-panel);
    border: 1px solid var(--fin-border);
    border-radius: 0 0 4px 4px;
    padding: 6px 0;
    min-width: 200px;
    box-shadow: var(--fin-shadow);
    list-style: none;
}

.etea-has-submenu:hover .etea-submenu {
    display: block;
    animation: fadeIn 0.2s ease;
}

.etea-submenu li a {
    padding: 10px 16px;
    font-size: 13px;
    color: var(--fin-text);
    text-decoration: none;
    display: block;
}

.etea-submenu li a:hover {
    background: var(--fin-bg);
    color: var(--fin-green);
}

/* ==========================================================================
   BOUTONS ACTIONS & AUTH
   ========================================================================== */
.etea-logged-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.etea-nav-action-link, .etea-nav-logout-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: var(--fin-panel);
    border: 1px solid var(--fin-border);
    color: var(--fin-text-muted);
    transition: all 0.2s;
}

.etea-nav-action-link:hover {
    border-color: var(--fin-blue);
    color: var(--fin-blue);
    background: rgba(41, 98, 255, 0.05);
}

.etea-nav-logout-icon:hover {
    border-color: var(--fin-red);
    color: var(--fin-red);
    background: rgba(242, 54, 69, 0.05);
}

/* ==========================================================================
   MENU MOBILE & HAMBURGER
   ========================================================================== */
.etea-menu-toggle {
    display: none;
    margin-left: 20px;
    width: 24px;
    height: 24px;
    position: relative;
    cursor: pointer;
}

.etea-menu-toggle span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--fin-text-light);
    border-radius: 2px;
    transition: .25s ease-in-out;
}

.etea-menu-toggle span:nth-child(1) { top: 6px; }
.etea-menu-toggle span:nth-child(2) { top: 12px; }
.etea-menu-toggle span:nth-child(3) { top: 18px; }

.etea-menu-toggle.active span:nth-child(1) { top: 12px; transform: rotate(135deg); }
.etea-menu-toggle.active span:nth-child(2) { opacity: 0; left: -20px; }
.etea-menu-toggle.active span:nth-child(3) { top: 12px; transform: rotate(-135deg); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .etea-unified-header-container {
        padding: 0 16px;
        height: 60px;
    }

    .etea-header-nav, .etea-logged-actions {
        display: none;
    }

    .etea-menu-toggle {
        display: block;
    }

    .etea-header-logo-section {
        margin-right: 20px;
    }

    .etea-header-search-section {
        max-width: none;
    }

    /* Navigation Mobile Active */
    .etea-header-nav.active {
        display: block;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        background: var(--fin-bg);
        overflow-y: auto;
        padding: 16px 0;
    }

    .etea-header-nav-list {
        flex-direction: column;
    }

    .etea-nav-item > a {
        padding: 16px 24px;
        font-size: 16px;
        border-bottom: 1px solid var(--fin-border);
        justify-content: space-between;
    }

    .etea-submenu {
        position: static;
        width: 100%;
        background: #1a1e2a;
        box-shadow: none;
        border: none;
    }

    .etea-nav-item.active .etea-submenu {
        display: block;
    }

    .etea-has-submenu:hover .etea-chevron-icon { transform: rotate(-90deg); }
    .etea-has-submenu:hover .etea-submenu { display: block; animation: fadeIn 0.2s ease; }

}

/* Custom Scrollbar pour les listes de recherche */
.etea-dropdown-list::-webkit-scrollbar {
    width: 6px;
}
.etea-dropdown-list::-webkit-scrollbar-track {
    background: var(--fin-bg);
}
.etea-dropdown-list::-webkit-scrollbar-thumb {
    background: var(--fin-border);
    border-radius: 10px;
}
.etea-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: var(--fin-text-muted);
}