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

body.dark-theme {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #0b0c0e;
    color: #d8d9da;
    min-height: 100vh;
}

/* Header */
header {
    background: #181b1f;
    border-bottom: 1px solid #2c3035;
    padding: 15px 20px;
}

.header-content {
    max-width: 1800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 2px;
}

.subtitle {
    font-size: 14px;
    color: #8e8e8e;
}

.logout-btn {
    padding: 8px 16px;
    background: #f2495c;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: #d63948;
}

/* Main */
main {
    max-width: 1800px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Grille capteurs */
#sensors-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sensor-row {
    display: grid;
    grid-template-columns: 20% 60% 20%;
    gap: 15px;
    min-height: 150px;
}

/* Colonne stat température */
.stat-col {
    background: linear-gradient(135deg, #1f77b4 0%, #145a8d 100%);
    border-radius: 4px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sensor-name {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.temp-big {
    font-size: 52px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 5px;
}

.temp-big.alert {
    color: #ff6b6b;
}

.sensor-label {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

/* Colonne graphique */
.chart-col {
    background: #181b1f;
    border-radius: 4px;
    padding: 15px;
    position: relative;
}

.chart-title {
    font-size: 13px;
    color: #8e8e8e;
    margin-bottom: 10px;
    text-transform: uppercase;
}

canvas {
    height: 120px !important;
}

/* Colonne jauge */
.gauge-col {
    background: #181b1f;
    border-radius: 4px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gauge-title {
    font-size: 13px;
    color: #8e8e8e;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.gauge-container {
    position: relative;
    width: 120px;
    height: 120px;
}

.gauge-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.gauge-bg {
    fill: none;
    stroke: #2c3035;
    stroke-width: 12;
}

.gauge-fill {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease;
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

/* Login page (inchangé) */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: #181b1f;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.login-container h1 {
    color: #fff;
    margin-bottom: 10px;
}

.login-container h2 {
    color: #8e8e8e;
    font-size: 16px;
    margin-bottom: 30px;
    font-weight: 400;
}

.login-container input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #2c3035;
    background: #0b0c0e;
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
}

.login-container button {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.login-container button:hover {
    background: #2980b9;
}

.error {
    background: #f2495c;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1200px) {
    .sensor-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-col {
        min-height: 120px;
    }
    
    .gauge-col {
        min-height: 180px;
    }
}
