/* ========================
   Style général commun
   ======================== */

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f5f7fa;
    margin: 0;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: auto;
    background: #fff;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.8rem;
    color: #100b00;
}

/* ========================
   Styles pour index.php (surveillance)
   ======================== */

.valeurs {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.valeur {
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.2rem;
    min-width: 180px;
    text-align: center;
    background-color: #e0e0e0;
    color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Classe normale quand seuil non dépassé */
/* Valeurs par défaut */
.valeur {
    background-color: #e0e0e0; /* gris clair */
    color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.2rem;
    min-width: 180px;
    text-align: center;
}

/* Normal (pas d'alerte) */
.valeur.normal {
    background-color: #e0e0e0; /* vert trés clair */
    color: #3c763d; /* vert foncé */
}

/* Alertes couleurs pour la température */
.temp.normal {
    color: black; /* couleur neutre */
}

.temp.vert {
    color: green;
}

.temp.jaune {
    color: orange; /* je conseille orange ici plutét que jaune pour lisibilité */
}

.temp.rouge {
    color: red; /* rouge pour alerte forte */
}


.alert-hum {
    background-color: #b3e5fc; /* bleu clair */
    color: #01579b;
}

.alert-gaz {
    background-color: #ffe082; /* jaune clair */
    color: #ff6f00;
}

.alert-eau {
    background-color: #020d94; /* bleu moyen */
    color: #fdfeff;
}

.centreitalic {
    margin-top: 20px;
    font-style: italic;
    text-align: center;
    color: #555;
    font-size: 1rem;
}




/* ========================
   Styles pour parametre.php (formulaire email)
   ======================== */

.form-container {
    max-width: 450px;
    margin: 40px auto 0;
    background: white;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}

.form-container h2 {
    margin-bottom: 20px;
    font-size: 1.6rem;
    color: #1976d2;
    text-align: center;
}

.form-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}
.form-container input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 7px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-container input[type="email"]:focus {
    border-color: #1976d2;
    outline: none;
    box-shadow: 0 0 6px rgba(25, 118, 210, 0.5);
}

.form-container input[type="submit"] {
    width: 100%;
    background: #1976d2;
    color: white;
    font-weight: 700;
    border: none;
    padding: 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.form-container input[type="submit"]:hover {
    background: #155a9c;
}

.message {
    margin-top: 12px;
    font-weight: 700;
    text-align: center;
    color: #1976d2;
}

/* ========================
   Accordéon Mobile / Réactif (au cas ou)
   ======================== */

.accordion {
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.accordion-header {
    background-color: #e3f2fd;
    color: #0d47a1;
    padding: 14px 16px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
    position: relative;
}

.accordion-header:hover {
    background-color: #bbdefb;
}

.accordion-header::after {
    content: "+";
    font-size: 20px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.accordion-header.active::after {
    content: "-";
}

.accordion-content {
    display: none;
    padding: 15px 20px;
    background-color: #fafafa;
    border-top: 1px solid #ccc;
}

.accordion-content p {
    margin: 10px 0;
    font-size: 1rem;
}

.btn-primary {
  display: inline-block;
  padding: 12px 25px;
  font-size: 1em;
  color: #fff;
  background-color: #007bff;
  border-radius: 5px;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0,123,255,0.3);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #0056b3;
  box-shadow: 0 6px 15px rgba(0,86,179,0.5);
  outline: none;
}
/* ========================
   Table de statistiques (desktop)
   ======================== */

.table-stats {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.table-stats th,
.table-stats td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: center;
    font-size: 0.95rem;
}

.table-stats th {
    background-color: #1976d2;
    color: white;
    font-weight: 700;
}

.table-stats tr:nth-child(even) {
    background-color: #f5f5f5;
}

.table-stats tr:hover {
    background-color: #e3f2fd;
    cursor: default;
}

/* Couleurs spécifiques par type */

.tr-gaz {
    background-color: #fff3e0; /* orange trés clair */
}

.tr-eau {
    background-color: #e3f2fd; /* bleu trés clair */
}

.tr-hum {
    background-color: #bbdefb; /* bleu léger */
}

.tr-temp {
    background-color: #ffe0b2; /* orange pale */
}

.tr-total td {
    font-weight: bold;
    background-color: #cfd8dc; /* gris clair */
    text-align: center;
}

/* ========================
   Affichage responsive mobile
   ======================== */

@media (max-width: 600px) {
    .container {
        padding: 15px 20px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .accordion-header {
        font-size: 1rem;
        padding: 12px 14px;
    }

    .accordion-content p {
        font-size: 0.95rem;
    }

    .table-stats {
        display: none; /* cache en mobile si on utilise accordéons */
    }

    .valeurs {
        flex-direction: column;
        gap: 10px;
    }
}


