:root {
    --primary: #007BFF;      /* Bleu pour les titres et éléments importants */
    --secondary: #6c757d;    /* Gris moyen pour les textes secondaires */
    --background: #F8F9FA;   /* Fond gris très clair */
    --card-bg: #FFFFFF;      /* Cartes en blanc */
    --text: #212529;         /* Texte sombre */
    --accent: #FF5722;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tv-header {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.15) 0%, rgba(108, 117, 125, 0.1) 100%);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #ddd;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.tv-logo {
    height: 60px;
    filter: drop-shadow(0 0 10px rgba(0, 123, 255, 0.3));
}

.tv-title {
    font-size: 2.2rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    color: var(--primary);
}

.tv-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.tv-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    /* Vous pouvez retirer le backdrop-filter si non nécessaire pour une version plus légère */
    backdrop-filter: blur(10px);
    border: 1px solid #ddd;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: transform 0.3s ease;
    height: 100%;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--primary);
}

.status-indicator {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.gauge-container {
    height: 250px;
    margin: 1rem 0;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.data-item {
    background: #e9ecef;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.data-label {
    font-weight: bold;
    display: block;
    font-size: 1.1rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.data-value {
    font-size: 2.7rem;
    font-weight: bold;
    color: var(--primary);
}

.data-value small {
    font-weight: normal;
    font-size: 1.5rem;
    color: var(--secondary);
    margin-left: 0.3rem;
}

.timestamp {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tv-footer {
    background: #e9ecef;
    padding: 1rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--secondary);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--success);
}

.pulse {
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

@media (max-width: 768px) {
    .tv-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .tv-title {
        font-size: 1.8rem;
    }

    .data-value {
        font-size: 1.8rem;
    }

    .gauge-container {
        height: 200px;
    }
}

.refreshing {
    animation: refreshFade 0.5s ease;
}

@keyframes refreshFade {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}
