:root {
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --primary-color: #1a73e8;
    --text-color: #333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .dashboard { grid-template-columns: 1fr; }
}

.card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.image-container {
    position: relative;
    width: 100%;
    max-width: 400px; /* Taille de la vignette dans le tableau de bord */
    margin: 0 auto;
    cursor: zoom-in;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #ddd;
}

#webcam {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.zoom-icon {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 0.7em;
    padding: 5px 0;
    text-align: center;
}

/* Mode Zoomé (Taille réelle) */
.image-container.expanded {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    z-index: 9999;
    background: rgba(0,0,0,0.9); /* Fond noir */
    cursor: zoom-out;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0;
}

.image-container.expanded #webcam {
    width: auto;      /* Taille réelle */
    max-width: 100%;  /* Mais on ne dépasse pas l'écran pour garder l'image visible */
    max-height: 100%;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.image-container.expanded .zoom-icon { display: none; }

.weather-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.weather-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.main-temp {
    grid-column: span 2;
    background: var(--primary-color);
    color: white;
}

.label { font-size: 0.9em; opacity: 0.8; margin-bottom: 5px; }
.value { font-size: 1.8em; font-weight: bold; }
.main-temp .value { font-size: 3em; }

.caption { font-size: 0.8em; color: #666; margin-top: 10px; text-align: center; }