/* ==========================================================================
   VARIABLES & RESET LOCAL
   ========================================================================== */
: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;
}

/* On force le box-sizing pour éviter que le padding ne fasse déborder les éléments */
.etea-dashboard-free-wrapper, 
.etea-dashboard-free-wrapper * {
    box-sizing: border-box;
}

.etea-dashboard-free-wrapper {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--fin-text);
    padding: 10px;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.etea-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 20px;
}

.etea-section-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.8em;
    color: var(--fin-green);
    margin: 0;
    text-transform: uppercase;
}

.etea-badge-free {
    font-size: 10px;
    background: var(--fin-panel);
    color: var(--fin-text-muted);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--fin-border);
    margin-left: 10px;
    letter-spacing: 1px;
}

/* ==========================================================================
   KPI CARDS (CORRECTIF GRILLE)
   ========================================================================== */
.etea-kpi-grid {
    display: grid;
    /* On force 3 colonnes égales sur desktop pour éviter le chevauchement */
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.etea-terminal-card {
    background: var(--fin-panel);
    border: 1px solid var(--fin-border);
    border-radius: 8px;
    padding: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* Important pour éviter l'éclatement du grid child */
}

.etea-terminal-card.mini {
    text-align: center;
    min-height: 180px;
}

.etea-label-mini {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--fin-text-muted);
    font-weight: 700;
    letter-spacing: 1px;
}

.etea-terminal-card.mini .val {
    font-size: 2.2em;
    font-weight: bold;
    font-family: 'Share Tech Mono', monospace;
    margin: 12px 0;
    line-height: 1;
}

.neon-green .val { color: var(--fin-green); text-shadow: 0 0 15px rgba(8, 153, 129, 0.4); }
.neon-blue .val { color: var(--fin-blue); }

.highlight-pro {
    background: linear-gradient(145deg, #1e222d, #131722);
    border: 1px solid var(--fin-blue);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.highlight-pro h3 { 
    margin: 0 0 8px 0; 
    font-size: 1.2em; 
    color: #fff; 
    font-family: 'Share Tech Mono', monospace;
}

.highlight-pro p { 
    font-size: 12px; 
    color: var(--fin-text-muted); 
    margin-bottom: 15px; 
    line-height: 1.4;
}

/* ==========================================================================
   CHARTS PREVIEW & LOCKED OVERLAYS
   ========================================================================== */
.etea-charts-preview-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 20px;
}

.etea-locked-container {
    position: relative;
    overflow: hidden;
    min-height: 380px;
}

.etea-chart-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--fin-text-light);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--fin-border);
}

.etea-chart-blur-area {
    filter: blur(10px);
    opacity: 0.2;
    pointer-events: none;
    height: 260px;
    width: 100%;
}

.etea-locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(19, 23, 34, 0.3); /* Léger voile */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 10;
}

.etea-lock-box {
    text-align: center;
    width: 100%;
    max-width: 320px;
    background: var(--fin-bg);
    padding: 30px 20px;
    border-radius: 12px;
    border: 1px solid var(--fin-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.etea-icon-lock { 
    font-size: 2.5em; 
    display: block; 
    margin-bottom: 15px; 
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

.etea-lock-box h4 { 
    color: #fff; 
    margin: 0 0 10px 0; 
    font-size: 1.1em;
}

.etea-lock-box p { 
    font-size: 13px; 
    color: var(--fin-text-muted); 
    margin-bottom: 20px; 
    line-height: 1.5;
}

/* ==========================================================================
   BOUTONS (FIX DÉBORDEMENT)
   ========================================================================== */
.etea-btn-run, 
.etea-btn-utility, 
.etea-btn-premium-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    font-size: 11px;
    text-transform: uppercase;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* On s'assure que les boutons dans les boites de lock ne dépassent jamais */
.etea-lock-box .etea-btn-run, 
.etea-lock-box .etea-btn-utility,
.highlight-pro .etea-btn-run {
    width: 100%;
    display: flex;
}

.etea-btn-run { 
    background: var(--fin-green); 
    color: #fff; 
    border: none; 
}

.etea-btn-run:hover { 
    filter: brightness(1.1);
    box-shadow: 0 0 20px rgba(8, 153, 129, 0.4);
    transform: translateY(-2px);
}

.etea-btn-utility { 
    background: transparent; 
    border: 1px solid var(--fin-blue); 
    color: var(--fin-blue); 
}

.etea-btn-utility:hover { 
    background: var(--fin-blue); 
    color: #fff; 
    box-shadow: 0 0 20px rgba(41, 98, 255, 0.4);
}

.etea-btn-premium-top { 
    background: rgba(41, 98, 255, 0.1); 
    border: 1px solid var(--fin-blue); 
    color: var(--fin-blue);
    font-size: 10px;
    padding: 6px 15px;
}

.etea-btn-premium-top:hover { 
    background: var(--fin-blue); 
    color: #fff; 
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
    .etea-charts-preview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 850px) {
    .etea-kpi-grid {
        grid-template-columns: 1fr; /* Passage en colonne sur mobile */
    }
    
    .etea-terminal-card.mini {
        min-height: auto;
    }

    .etea-header-flex {
        flex-direction: column;
        text-align: center;
    }
}