/* ──────────────────────────────────────────────────────────────
   THEME LIGHT - MONITORING APP - SOPHISTIQUÉ & MODERNE (V2)
   ────────────────────────────────────────────────────────────── */

.theme-light {
    /* ─── VARIABLES CSS ─── */
    --bg-primary: #fafbfc;
    --bg-secondary: #f0f4f8;
    --bg-tertiary: #ffffff;
    
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-tertiary: #718096;
    
    --accent-main: #00b4d8;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-error: #ef4444;
    
    --border-color: rgba(0, 0, 0, 0.06);
    --border-light: rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(0, 180, 216, 0.15);

     /* ─── VARIABLES POUR LES GRAPHIQUES ─── */
    --chart-grid-color: rgba(0, 0, 0, 0.08);
    --chart-border-width: 2.5;
}

/* Trend table styling - Light mode */
.theme-light .trend-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.theme-light .trend-table th,
.theme-light .trend-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.theme-light .trend-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: none;
}

/* Lignes alternées - mode clair */
.theme-light .trend-row-even {
    background-color: rgba(0, 0, 0, 0.02);
}

.theme-light .trend-row-odd {
    background-color: rgba(0, 0, 0, 0.06);
}

.theme-light .trend-row-even:hover,
.theme-light .trend-row-odd:hover {
    background-color: rgba(0, 180, 216, 0.1);
    transition: background 0.2s;
}

.theme-light .channel-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 8px;
    vertical-align: middle;
}

.theme-light .zero {
    color: var(--text-tertiary);
    font-style: italic;
}

/* ─── ANIMATIONS ─── */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes slideUp {
    from { transform: translateY(8px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-8px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes rotateBackground {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Suppression de l'animation glowPulse (trop agressive) */

/* ─── FONDAMENTALS ─── */
.theme-light body,
.theme-light root {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica", "Arial", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "kern" 1, "liga" 1;
}

.theme-light * {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── SIDEBAR (ONGLETS) ─── */
.theme-light .sidebar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

.theme-light .sidebar-item {
    color: var(--text-secondary);
    border-radius: 8px;
    margin: 0 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-light .sidebar-item:hover {
    background: rgba(0, 180, 216, 0.08);
    color: var(--accent-main);
    transform: translateX(4px);
}

/* Onglet actif : même fond que .chart-header pour continuité */
.theme-light .sidebar-item.active {
    background: linear-gradient(to right, rgba(250, 251, 252, 0.5), rgba(240, 244, 248, 0.5));
    color: var(--accent-main);
    border-left: 3px solid var(--accent-main);
    padding-left: 13px;
}

/* ─── HEADER ─── */
.theme-light header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.theme-light .header-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.3px;
}

/* ─── CONTENT AREA ─── */
.theme-light .content {
    background: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary));
}

/* ─── CHART WINDOWS (sans coins arrondis) ─── */
.theme-light .chart-window {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0;          /* Plus d'arrondis */
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.theme-light .chart-window:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 180, 216, 0.3);
}

/* Effet actif très fin : juste une bordure discrète et une ombre légère */
.theme-light .chart-window.active {
    box-shadow: var(--shadow-md);
    border: 1px solid var(--accent-main);
    transform: none;           /* Pas de déplacement */
}

/* ─── CHART HEADER (même fond que les onglets actifs) ─── */
.theme-light .chart-header {
    background: linear-gradient(to right, rgba(250, 251, 252, 0.5), rgba(240, 244, 248, 0.5));
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
}

.theme-light .chart-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    margin: 0;
}

/* ─── CHART CONTENT ─── */
.theme-light .chart-content {
    background: var(--bg-tertiary);
    position: relative;
}

/* ─── CHART LEGEND ─── */
.theme-light .chart-legend {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-left: 1px solid var(--border-color);
}

.theme-light .legend-item {
    color: var(--text-secondary);
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-light .legend-item:hover {
    background: rgba(0, 180, 216, 0.1);
    color: var(--accent-main);
}

.theme-light .legend-item.hidden {
    opacity: 0.4;
    text-decoration: line-through;
}

/* ─── CHART FOOTER ─── */
.theme-light .chart-footer {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    padding: 0 6px;
    height: 28px;
}

/* ─── BUTTONS ─── */
.theme-light .footer-btn,
.theme-light button {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 4px;
}

.theme-light .footer-btn:hover,
.theme-light button:hover {
    background: rgba(0, 180, 216, 0.1);
    color: var(--accent-main);
    border-color: rgba(0, 180, 216, 0.3);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 180, 216, 0.15);
}

.theme-light .footer-btn.active,
.theme-light button.active {
    background: var(--accent-main);
    color: white;
    border-color: var(--accent-main);
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.3);
}

.theme-light .footer-btn:active,
.theme-light button:active {
    transform: scale(0.98);
}

/* ─── TRACK LINES (CURSORS) ─── */
.theme-light .track-line-container {
    transition: all 0.1s linear;
}

.theme-light .track-line-single {
    filter: drop-shadow(0 0 4px rgba(0, 180, 216, 0.4));
}

.theme-light .track-line-0 {
    filter: drop-shadow(0 0 4px rgba(0, 180, 216, 0.4));
}

.theme-light .track-line-1 {
    filter: drop-shadow(0 0 4px rgba(255, 51, 51, 0.4));
}

/* ─── DISPLAY BOXES ─── */
.theme-light .track-display,
.theme-light .track-delta-display {
    background: rgba(26, 32, 44, 0.9) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── LOGIN PAGE ─── */
.theme-light .login-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.theme-light .login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: rotateBackground 20s linear infinite;
    z-index: 0;
}

.theme-light .login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 40px;
}

.theme-light .login-title {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 24px;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.theme-light .login-subtitle {
    color: var(--text-tertiary);
    margin-bottom: 32px;
}

/* ─── INPUTS ─── */
.theme-light input,
.theme-light select,
.theme-light textarea {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-light input:hover,
.theme-light select:hover,
.theme-light textarea:hover {
    border-color: rgba(0, 180, 216, 0.3);
    background: rgba(255, 255, 255, 0.95);
}

.theme-light input:focus,
.theme-light select:focus,
.theme-light textarea:focus {
    outline: none;
    border-color: var(--accent-main);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.02);
    background: var(--bg-tertiary);
}

/* ─── SCROLLBAR ─── */
.theme-light ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.theme-light ::-webkit-scrollbar-track {
    background: transparent;
}

.theme-light ::-webkit-scrollbar-thumb {
    background: rgba(0, 180, 216, 0.3);
    border-radius: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-light ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 180, 216, 0.5);
}

/* ─── STATUS INDICATORS ─── */
.theme-light .status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.theme-light .status-online {
    background: var(--accent-success);
}

.theme-light .status-warning {
    background: var(--accent-warning);
}

.theme-light .status-offline {
    background: var(--accent-error);
}

/* ─── PANELS & MODALS ─── */
.theme-light .panel,
.theme-light .modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── HOVER EFFECTS ─── */
.theme-light .interactive-element {
    cursor: pointer;
}

.theme-light .interactive-element:hover {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 8px;
}

/* ─── TYPOGRAPHY ─── */
.theme-light h1, .theme-light h2, .theme-light h3, .theme-light h4, .theme-light h5, .theme-light h6 {
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.theme-light p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.theme-light a {
    color: var(--accent-main);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-light a:hover {
    color: #0099b8;
    text-decoration: underline;
}

/* ─── TABLES ─── */
.theme-light table {
    border-collapse: collapse;
    width: 100%;
}

.theme-light th {
    background: rgba(240, 244, 248, 0.8);
    color: var(--text-primary);
    font-weight: 600;
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.theme-light td {
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.theme-light tr:hover {
    background: rgba(0, 180, 216, 0.05);
}

/* ─── BADGES ─── */
.theme-light .badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(0, 180, 216, 0.1);
    color: var(--accent-main);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-light .badge:hover {
    background: rgba(0, 180, 216, 0.2);
}

/* ─── ALERTS ─── */
.theme-light .alert {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-success);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.theme-light .alert.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--accent-error);
}

.theme-light .alert.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--accent-warning);
}