
body { font-family: sans-serif; margin: 0; background-color: #f4f4f9; color: #333; }
.container { max-width: 1000px; margin: auto; background: #fff; padding: 20px; border-radius: 0; box-shadow: none; min-height: 100vh; }
@media (min-width: 768px) {
    .container { margin: 20px auto; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); min-height: auto; }
}

header { border-bottom: 2px solid #5d5dff; padding-bottom: 10px; margin-bottom: 20px; text-align: center; }
header p a { color: #5d5dff; text-decoration: none; font-weight: bold;}
header p a:hover, footer p a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: #5d5dff; }

/* Amélioration des onglets pour la responsivité */
.tab { overflow-x: auto; white-space: nowrap; border-bottom: 1px solid #ccc; padding-bottom: 5px; }
.tablinks { 
    background-color: #e6e6ff; border: none; outline: none; cursor: pointer; padding: 10px 14px; 
    transition: 0.3s; font-size: 15px; margin: 0 2px 5px 0; border-radius: 4px; display: inline-block; 
}
.tablinks:hover { background-color: #ccccff; }
.tablinks.active { background-color: #5d5dff; color: white; }
.forecast-day { padding: 10px 0; border-top: none; }

/* Responsivité et style des metadata (coordonnées/climatologie globale) */
.metadata { 
    display: flex; 
    justify-content: space-around; 
    flex-wrap: wrap; 
    margin-bottom: 20px;
}
.metadata div { 
    padding: 10px; border: 1px solid #eee; margin: 5px; border-radius: 4px; 
    background-color: #f9f9f9; 
    flex-grow: 1; /* Permet aux éléments de grandir pour remplir l'espace */
    min-width: 150px; /* Assure un minimum de lisibilité */
    text-align: center;
}
@media (max-width: 600px) {
    .metadata div { 
        min-width: 100%; 
        margin: 5px 0; 
        box-sizing: border-box; 
    }
}

/* Styles pour AQI */
.aqi-container {
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 20px;
}
.aqi-summary {
    display: flex;
    flex-direction: column; /* Passage en colonne sur petit écran */
    align-items: center;
    justify-content: space-between;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}
@media (min-width: 600px) {
    .aqi-summary {
        flex-direction: row; /* Retour en ligne sur grand écran */
    }
}
.aqi-value {
    font-weight: bold;
    font-size: 1.1em;
}
.aqi-good { background-color: #ccffcc; border-left: 5px solid #009900; }
.aqi-moderate { background-color: #ffffcc; border-left: 5px solid #ffcc00; }
.aqi-unhealthy-sensitive { background-color: #ffcccc; border-left: 5px solid #ff0000; }
.aqi-unhealthy { background-color: #ff99cc; border-left: 5px solid #990066; }
.aqi-hazardous { background-color: #ffcc99; border-left: 5px solid #663300; }

/* Styles pour les graphiques et images */
.chart-block img {
    max-width: 100%;
    height: auto; /* Garantit la responsivité des images */
    display: block;
    margin: 10px 0;
}
.chart-block {
    overflow-x: auto; /* Permet de scroller si le graphique est trop grand (rare avec max-width: 100% mais utile) */
}

/* Amélioration de la liste de liens d'index */
.locality-list {
    list-style: none;
    padding: 0;
}
.locality-list li {
    margin-bottom: 10px;
}
.locality-list a {
    display: block; /* Rendre toute la zone cliquable */
    padding: 15px;
    background-color: #e6e6ff;
    border-radius: 6px;
    text-decoration: none;
    color: #5d5dff;
    font-weight: bold;
    transition: background-color 0.3s;
    font-size: 1.1em; /* Augmentation de la taille pour améliorer la clarté */
    border-left: 5px solid #5d5dff;
}
.locality-list a:hover {
    background-color: #ccccff;
    border-left: 5px solid #3d3dcf;
}

/* Style spécifique pour les conditions horaires */
.hourly-condition {
    text-align:center; 
    flex: 0 0 auto; /* Empêche le rétrécissement */
    width: 80px; /* Largeur fixe pour la cohérence */
    margin: 0 5px;
    padding: 5px 0;
}
.hourly-condition p {
    margin: 2px 0 0 0;
    font-size: 0.9em;
}
.hourly-condition .time {
    font-weight: bold;
}
.hourly-condition .beaufort {
    font-size: 0.8em;
    color: #555;
    font-weight: normal;
}


footer { border-top: 1px solid #ccc; padding-top: 10px; margin-top: 20px; text-align: center; }
