/* css/inline-styles.css - Styles externalisés depuis index.html */

/* ── Version Badge ────────────────────────────────────── */
.version-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-left: 10px;
}

/* ── Validation Section ──────────────────────────────── */
#validationCon {
    min-height: 300px;
}

/* ── Tab Animations ──────────────────────────────────── */
.tab-content {
    animation: fadeIn 0.5s ease-out;
    flex: 1;
    min-height: 0;
}

.dashboard-container {
    animation: slideIn 0.6s ease-out;
}

.tab-pane {
    height: 100%;
}

/* ── Content Sections ────────────────────────────────── */
.content-section {
    min-height: auto !important;
    height: auto !important;
}

#validationCon,
#inventoryCon,
#valuesCon {
    min-height: 300px;
    padding-bottom: var(--space-xl);
}

/* ── Global Transitions ──────────────────────────────── */
* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* ── Cards Carousel ──────────────────────────────────── */
.cards-carousel {
    height: 200px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 12px;
    padding: 20px;
}

.carousel-container {
    position: relative;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.6s ease;
}

.carousel-card {
    position: absolute;
    width: 100px;
    height: 140px;
    transition: all 0.6s ease;
    cursor: pointer;
}

.carousel-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.carousel-card.active {
    transform: translateX(0) scale(1.1);
    z-index: 3;
}

.carousel-card.next {
    transform: translateX(120px) scale(0.9);
    opacity: 0.7;
    z-index: 2;
}

.carousel-card.prev {
    transform: translateX(-120px) scale(0.9);
    opacity: 0.7;
    z-index: 1;
}

.carousel-card.hidden {
    transform: translateX(240px) scale(0.8);
    opacity: 0;
    z-index: 0;
}

.carousel-card.entering {
    animation: cardEnter 0.6s ease-out;
}

@keyframes cardEnter {
    from {
        transform: translateX(240px) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translateX(120px) scale(0.9);
        opacity: 0.7;
    }
}

.carousel-info {
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
    color: #667eea;
    font-size: 0.9em;
    transition: opacity 0.3s ease;
}

/* ── Sidebar Toggle (Mobile) ─────────────────────────── */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1100;
    font-size: 2em;
    background: #fff;
    border: none;
    border-radius: 6px;
    box-shadow: 0 1px 6px #0002;
    padding: 3px 13px 7px 13px;
    color: #667eea;
    cursor: pointer;
    transition: background 0.2s;
}

.sidebar-toggle:hover {
    background: #f5f7ff;
}

/* ── Anomaly Stats ───────────────────────────────────── */
.anomaly-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.anomaly-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.anomaly-icon {
    font-size: 2em;
}

.anomaly-count {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-color, #667eea);
}

.anomaly-label {
    font-size: 0.85em;
    color: var(--text-muted, #6c757d);
}

/* ── Performance Metrics ─────────────────────────────── */
.performance-metrics {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.perf-metric {
    display: flex;
    align-items: center;
    gap: 15px;
}

.perf-label {
    width: 150px;
    font-weight: 500;
}

.perf-bar {
    flex: 1;
    height: 24px;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.perf-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: width 0.6s ease;
    position: relative;
}

.perf-fill.total {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.perf-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.perf-value {
    width: 60px;
    text-align: right;
    font-weight: 600;
    color: var(--primary-color, #667eea);
}

/* ── Chart Size Limits ───────────────────────────────── */
#hashConfidenceChart {
    max-height: 300px !important;
}

#mlFeaturesChart,
#mlAccuracyChart {
    max-height: 200px !important;
}

.chart-body {
    overflow: hidden;
    position: relative;
}

.chart-card canvas {
    display: block;
    max-width: 100%;
}

/* ── Responsive (Mobile) ─────────────────────────────── */
@media (max-width: 900px) {
    .sidebar-toggle {
        display: block;
    }

    .sidebar {
        position: fixed !important;
        left: 0;
        top: 0;
        bottom: 0;
        width: 250px;
        max-width: 85vw;
        background: #f8f9fa;
        z-index: 1050;
        transform: translateX(-120%);
        transition: transform 0.3s cubic-bezier(.86,0,.07,1);
        box-shadow: 2px 0 16px #0005;
        border-radius: 0 12px 12px 0;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .app-container {
        padding-left: 0 !important;
    }

    body.sidebar-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #0007;
        z-index: 1045;
        pointer-events: auto;
    }

    .anomaly-stat {
        flex-direction: column;
        text-align: center;
    }

    .perf-label {
        width: 120px;
        font-size: 0.9em;
    }
}
