/* Style de la page météo Calvados */

body {
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
  margin: 0;
  padding: 0;
}

/* En-tête */
header {
  background-color: #2c5f8a;
  color: white;
  padding: 20px;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 24px;
}

header p {
  margin: 5px 0 0 0;
  font-size: 14px;
  color: #cce0f5;
}

/* Contenu principal */
main {
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 15px;
}

/* Message de chargement */
#loading-overlay {
  text-align: center;
  padding: 60px 20px;
  font-size: 16px;
  color: #555;
}

.barre-progression {
  width: 300px;
  height: 10px;
  background-color: #ddd;
  margin: 15px auto;
  border-radius: 5px;
}

.barre-remplissage {
  height: 10px;
  background-color: #2c5f8a;
  border-radius: 5px;
  width: 0%;
}

/* Résumé après chargement */
#load-summary {
  background-color: #d9eaf7;
  border: 1px solid #2c5f8a;
  padding: 8px 12px;
  margin-bottom: 15px;
  font-size: 13px;
}

/* Panneau de filtres */
.filtres {
  background-color: white;
  border: 1px solid #ccc;
  padding: 15px;
  margin-bottom: 20px;
}

.filtres h2 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: #2c5f8a;
}

.ligne-filtres {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.groupe-filtre {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.groupe-filtre label {
  font-size: 13px;
  font-weight: bold;
  color: #444;
}

.groupe-filtre select,
.groupe-filtre input {
  padding: 6px 8px;
  border: 1px solid #aaa;
  font-size: 14px;
  width: 180px;
}

.boutons-filtres {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

/* Boutons */
button {
  padding: 7px 16px;
  font-size: 14px;
  cursor: pointer;
  border: none;
}

#btn-analyser {
  background-color: #2c5f8a;
  color: white;
}

#btn-analyser:hover {
  background-color: #1e4466;
}

#btn-reinit {
  background-color: #888;
  color: white;
}

#btn-reinit:hover {
  background-color: #666;
}

#btn-export {
  background-color: #4caf50;
  color: white;
  margin-bottom: 8px;
}

#btn-export:hover {
  background-color: #388e3c;
}

/* Cartes statistiques */
.stats {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.carte-stat {
  background-color: white;
  border: 1px solid #ccc;
  padding: 15px;
  flex: 1;
  min-width: 180px;
  text-align: center;
}

.carte-stat .label {
  font-size: 12px;
  color: #777;
  margin-bottom: 6px;
}

.carte-stat .valeur {
  font-size: 26px;
  font-weight: bold;
  color: #2c5f8a;
}

.carte-stat .valeur.froid {
  color: #1a73e8;
}

.carte-stat .valeur.chaud {
  color: #d32f2f;
}

.carte-stat .valeur.pluie {
  color: #0288d1;
}

.carte-stat .detail {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

/* Section graphique */
.section-graphique {
  background-color: white;
  border: 1px solid #ccc;
  padding: 15px;
  margin-bottom: 20px;
}

.section-graphique h2 {
  margin: 0 0 10px 0;
  font-size: 16px;
  color: #2c5f8a;
}

.legende {
  font-size: 13px;
  margin-top: 10px;
  color: #555;
}

.legende span {
  margin-right: 18px;
}

/* Section tableau */
.section-tableau {
  background-color: white;
  border: 1px solid #ccc;
  padding: 15px;
  margin-bottom: 20px;
}

.section-tableau h2 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: #2c5f8a;
}

.info-tableau {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

.conteneur-tableau {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table th {
  background-color: #2c5f8a;
  color: white;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

table th:hover {
  background-color: #1e4466;
}

table td {
  padding: 7px 10px;
  border-bottom: 1px solid #eee;
}

/* Zebrastripe */
table tbody tr:nth-child(even) {
  background-color: #f5f5f5;
}

table tbody tr:hover {
  background-color: #e8f0fe;
}

/* Couleurs de valeurs */
.froid {
  color: #1a73e8;
  font-weight: bold;
}
.chaud {
  color: #d32f2f;
  font-weight: bold;
}
.moy {
  color: #2e7d32;
  font-weight: bold;
}
.pluie {
  color: #0288d1;
}
.vide {
  color: #bbb;
  font-style: italic;
}

.msg-surplus {
  font-size: 12px;
  color: #999;
  font-style: italic;
  margin-top: 8px;
  text-align: center;
}

/* Pied de page */
footer {
  text-align: center;
  padding: 15px;
  font-size: 12px;
  color: #888;
  border-top: 1px solid #ddd;
  margin-top: 10px;
}

footer a {
  color: #2c5f8a;
}

/* Responsive simple */
@media (max-width: 700px) {
  .stats {
    flex-direction: column;
  }
  .ligne-filtres {
    flex-direction: column;
  }
  .groupe-filtre select,
  .groupe-filtre input {
    width: 100%;
  }
}
