/* === BASE === */
body {
  background-color: #f0f4f8;
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  color: #2c3e50;
}

button, .btn {
  font-weight: bold;
  border-radius: 6px;
}

.btn-primary {
  background-color: #007bff;
  color: white;
  border: none;
}

.btn-success {
  background-color: #28a745;
  color: white;
  border: none;
}

.btn-danger {
  background-color: #dc3545;
  color: white;
  border: none;
}

.btn-warning {
  background-color: #ffc107;
  color: black;
  border: none;
}

.btn-info {
  background-color: #17a2b8;
  color: white;
  border: none;
}

/* === LOGIN PAGE === */
.login-container {
  text-align: center;
  width: 300px;
  margin: 100px auto;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

.login-logo {
  width: 150px;
  margin-bottom: 15px;
  border-radius: 8px; 
}

.login-container h2 {
  font-size: 24px;
  margin-bottom: 20px;
}

.login-container .form-control {
  margin-bottom: 15px;
}

#login_btn {
  width: 100%;
  margin-top: 10px;
}

.login-container .spinner-border {
  margin-top: 10px;
}

/* === VALUE BOXES === */
.value-box {
  text-align: center;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  background-color: #e3f2fd;
  margin-bottom: 20px;
}

.pastel-green {
  background-color: #d4edda;
}

.pastel-yellow {
  background-color: #fff3cd;
}

/* === TABLES & MAP === */
.table-container, .leaflet-container {
  width: 100%;
  overflow-x: auto;
  margin-top: 15px;
}

.scrollable-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* === SPINNER === */
.spinner-border {
  display: inline-block;
  vertical-align: middle;
  border: 0.25em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
  width: 1.5rem;
  height: 1.5rem;
}

@keyframes spinner-border {
  100% {
    transform: rotate(360deg);
  }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .value-box,
  .login-container,
  .col-sm-3,
  .col-sm-4,
  .col-sm-6,
  .col-sm-9,
  .col-sm-12 {
    width: 100% !important;
    float: none !important;
  }

  .login-container {
    margin: 30px auto;
    padding: 20px;
  }

  .leaflet-container {
    height: 400px !important;
  }
}

.panel-container {
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

/*==FORM INSCRIT*/
.value-box {
  height: 100px;
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  box-shadow: 1px 1px 5px rgba(0,0,0,0.1);
}

.pastel-blue {
  background-color: #cfe2ff;
}

.pastel-green {
  background-color: #d1e7dd;
}

.pastel-yellow {
  background-color: #fff3cd;
}

.value-box h4 {
  margin: 0;
  font-size: 1.2em;
  color: #333;
}

.value-box h2 {
  margin: 5px 0 0;
  font-size: 2em;
  font-weight: bold;
}

/* --- Styles spécifiques au tableau des patients --- */

/* Global */
#table_patients table.dataTable {
  font-size: 14px;
}

/* Cellule éditable (Date d'inscription) */
#table_patients td.dt-editable-cell {
  color: #000 !important;
  background-color: #fff8e1 !important;  /* jaune clair pour signaler éditable */
  cursor: pointer !important;
  border: 1px dashed #ccc;
}

/* En mode sélection, garder le texte noir */
#table_patients tr.selected td.dt-editable-cell {
  color: #000 !important;
  background-color: #fff3cd !important;
}

/* Pas de surbrillance bleue en édition */
#table_patients tr.selected td.dt-editable-cell:focus {
  outline: none !important;
  box-shadow: inset 0 0 0 2px #007bff40;
}

/* Survol léger pour montrer que c’est cliquable */
#table_patients td.dt-editable-cell:hover {
  background-color: #ffeeba !important;
}

/* Centrage vertical */
#table_patients td {
  vertical-align: middle;
}

/* Désactivation de la sélection visuelle quand on clique dans la colonne date */
#table_patients td.no-select {
  user-select: text !important;
}