/* JAUGE COMPACTE - Affichée en haut de chaque vue */
.jauge-compact {
    position: -webkit-sticky; /* Safari */
    position: sticky;
    top: 120px; /* Header (70px) + Navbar (50px) = 120px */
    z-index: 50; /* En dessous de la navbar et des dropdowns */
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* S'assurer que le conteneur parent permet le sticky */
.view-container {
    position: relative;
    overflow: visible;
}

.jauge-compact-value {
    text-align: center;
    font-size: 1.3em;
    font-weight: bold;
    color: #0056b3;
    font-family: 'Courier New', monospace;
    margin-bottom: 8px;
}

.jauge-compact-bar {
    position: relative;
    height: 20px;
    background: linear-gradient(to right, #dc3545 0%, #ffc107 35%, #28a745 100%);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}

.jauge-compact-cursor {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 35px;
    background: linear-gradient(to bottom, #fff 0%, #333 50%, #fff 100%);
    border: 3px solid #fff;
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(0,0,0,0.9), 0 0 5px rgba(255,255,255,0.8), inset 0 0 3px rgba(0,0,0,0.5);
    transition: left 0.3s ease;
    left: 50%;
    z-index: 10;
}

/* Animation pulse en zone critique */
@keyframes pulse-critical {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

.jauge-compact-cursor.critical {
    animation: pulse-critical 1s infinite;
}

/* Responsive : réduire taille sur petits écrans */
@media (max-width: 768px) {
    .jauge-compact {
        padding: 10px 15px;
    }
    
    .jauge-compact-value {
        font-size: 1.1em;
    }
    
    .jauge-compact-bar {
        height: 16px;
    }
    
    .jauge-compact-cursor {
        height: 24px;
    }
}
