/* style.css - Interface Clinique La Concorde */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    background-color: #E6F2F8;
    color: #1A2A3A;
    padding: 20px;
}

/* Conteneur principal */
.dashboard {
    max-width: 1400px;
    margin: 0 auto;
}

/* ========== HEADER ========== */
.header {
    background: linear-gradient(135deg, #0B3B5E 0%, #1A5A7A 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.header .version {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 5px;
}

.status {
    background: rgba(255,255,255,0.15);
    padding: 8px 18px;
    border-radius: 40px;
    backdrop-filter: blur(4px);
}

.online {
    color: #A3E4D7;
    font-weight: bold;
}

#horloge {
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: 500;
}

/* ========== BANDEAU ALERTE ========== */
.alerte-bandeau {
    background: white;
    border-radius: 20px;
    padding: 18px 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-left: 8px solid #2E8B57;
    transition: all 0.2s;
}

.alerte-bandeau.alerte-active {
    border-left-color: #FFC107;
    background: #FFF9E6;
}

.alerte-bandeau.alerte-urgence {
    border-left-color: #DC3545;
    background: #FFEFEF;
}

.timer {
    font-size: 2rem;
    font-weight: 700;
    font-family: monospace;
    color: #0B3B5E;
}

/* ========== GRILLE DES CARTES ========== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.card h3 {
    font-size: 1.3rem;
    color: #0B3B5E;
    margin-bottom: 15px;
    border-left: 5px solid #2E8B57;
    padding-left: 12px;
}

.valeur-capteur {
    font-size: 2.2rem;
    font-weight: 700;
    color: #0B3B5E;
    text-align: center;
    margin: 20px 0;
    background: #F0F7FA;
    border-radius: 50px;
    padding: 12px;
}

/* Boutons */
.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    margin: 5px;
}

.btn-normal {
    background: #2E8B57;
    color: white;
}
.btn-normal:hover { background: #1E6B42; }

.btn-urgence {
    background: #DC3545;
    color: white;
}
.btn-urgence:hover { background: #B02A37; }

.btn-reset {
    background: #0B3B5E;
    color: white;
}
.btn-reset:hover { background: #062C44; }

/* Tableau historique */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #DCE7ED;
}

th {
    background: #E6F2F8;
    color: #0B3B5E;
    font-weight: 600;
}

.retard {
    color: #DC3545;
    font-weight: bold;
}
.ok {
    color: #2E8B57;
}

/* Badge infirmière */
.badge-infirmiere {
    background: linear-gradient(145deg, #0B3B5E, #1A5A7A);
    border-radius: 20px;
    padding: 20px;
    color: white;
    text-align: center;
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .grid {
        grid-template-columns: 1fr;
    }
}