/* planificateur.css */

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html, body {
  font-family: Arial, sans-serif;
  background-color: #ececec;
  color: #333;
  height: 100%;
}
.container {
  max-width: 800px;
  margin: 2rem auto;
  background: #f7f7f7;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

/* Titres */
h1 {
  text-align: center;
  margin-bottom: 1rem;
}
h2 {
  margin: 1.5rem 0 0.5rem;
}

/* Utilitaires */
.hidden {
  display: none !important;
}
.options {
  margin-top: 0.5rem;
}

.bridges{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

/* Boutons */
button {
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 5px;
  border: 1px solid #9ca3af;
  background-color: white;
  color: #333;
  padding: 0.5rem 1rem;
  margin: 0.25rem;
  transition: background-color 0.2s, border-color 0.2s;
}
button:hover {
  background-color: #e5e7eb;
}
button.selected {
  background-color: #bfdbfe;
  border-color: #2563eb;
}

/* Grille des dates */
#options {
  gap: 0.5rem;
}

/* Grille des dates */
#date-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
}

#horaire {
  /* Remove OS default styling on all devices */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  /* Layout & colors */
  width: 50%;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #9ca3af;
  border-radius: 5px;
  background-color: white;
  color: #333;
  margin-top: 0.5rem;
}

#horaire:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

/* Hide spin/clear controls if they appear */
#horaire::-webkit-inner-spin-button,
#horaire::-webkit-clear-button {
  display: none;
}

/* Résultat */
#result {
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    margin: 1rem;
    padding: 1rem;
  }
  button {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  html, body {
    background-color: #1d1d1d;
    color: #e0e0e0;
  }
  .container {
    background: #292929;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  }
  button {
    background-color: #3a3a3a;
    border-color: #555;
    color: #e0e0e0;
  }
  button:hover {
    background-color: #4b4b4b;
  }
  button.selected {
    background-color: #2563eb;
    border-color: #1e40af;
    color: white;
  }
  #horaire {
    background-color: #3a3a3a;
    border-color: #555;
    color: #e0e0e0;
  }
  #horaire:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.3);
  }
 .risk-very-low {
    background-color: #436678;      /* bleu fonc   pastel */
  }
 .risk-low {
    background-color: #5a8f5e;      /* bleu foncé pastel */
  }
  .risk-moderate {
    background-color: #b38353;      /* vert foncé pastel */
  }
  .risk-high {
    background-color: #995d5b;      /* jaune-orangé foncé pastel */
  }
}

#horaire {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid #9ca3af;
  border-radius: 5px;
  padding: 0.5rem;
  background: white;
  color: #333;
}
#horaire:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.3);
}

/* masquer la croix de nettoyage sur certains navigateurs */
#horaire::-webkit-clear-button,
#horaire::-webkit-inner-spin-button {
  display: none;
}

/* Result box */
#result {
    margin-top: 1rem;
}

/* Risk levels */
.risk-very-low {
    background-color: #547b8e;
    padding: 1rem;
    border-radius: 5px;
}
.risk-low {
    background-color: #5a8f5e;
    padding: 1rem;
    border-radius: 5px;
}
.risk-moderate {
    background-color: #b38353;
    padding: 1rem;
    border-radius: 5px;
}
.risk-high {
    background-color: #995d5b;
    padding: 1rem;
    border-radius: 5px;
}

@media (hover: hover) and (pointer: fine) {
  /* Only on devices with mouse/trackpad */
  #horaire {
    -webkit-appearance: none;
    appearance: none;
  }

  /* hide spinner/clear buttons on desktop */
  #horaire::-webkit-clear-button,
  #horaire::-webkit-inner-spin-button {
    display: none;
  }
}
        .back-button {
            position: fixed;
            top: 20px;
            right: 20px;
            background-color: blue;
            color: white;
            padding: 10px 15px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
            box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
            transition: opacity 0.3s;
        }
        .back-button:hover {
            background-color: darkblue;
        }
        .hidden {
            opacity: 0;
            pointer-events: none;
        }
