/*
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
/* 
    Created on : 24 sept. 2024, 10:30:16
    Author     : SG41RPichet
*/

/* ===== Style Global RuralDash ===== */
/* ===== Thème adaptatif RuralDash (clair/sombre automatique) ===== */
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f7f9fc;
  color: #222;
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
    color: #e0e0e0;
  }
  .table-compact,
  .card,
  .card-body,
  .card-header,
  .card-footer,
  input.form-control,
  select.form-control {
    background-color: #1e1e1e;
    color: #fff;
    border-color: #333;
  }
  .table-compact th {
    background-color: #2a2a2a;
    border-bottom: 2px solid #444;
  }
  .table-compact tbody tr:nth-child(even) {
    background-color: #1a1a1a;
  }
  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_paginate,
  label {
    color: #ccc;
  }
  .dataTables_filter input {
    background-color: #2a2a2a;
    color: #fff;
    border-color: #555;
  }
  .dt-buttons .btn {
    background-color: #198754;
    color: white;
  }
  .dt-buttons .btn:hover {
    background-color: #146c43;
  }
}

/* Tableaux */
.table-compact {
  font-size: 12px;
  line-height: 1.3;
}
.table-compact th,
.table-compact td {
  padding: 0.4rem 0.6rem;
  vertical-align: middle;
}
.table-compact th {
  background-color: #f0f0f0;
  font-weight: 600;
  border-bottom: 2px solid #ddd;
}
.table-compact tbody tr:nth-child(even) {
  background-color: #fbfbfb;
}
.table-compact a {
  color: #0d6efd;
  text-decoration: none;
}
.table-compact a:hover {
  text-decoration: underline;
}

/* DataTables */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  font-size: 12px;
}
.dataTables_filter {
  text-align: left !important;
  margin-top: 1rem;
}
.dataTables_filter label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}
.dataTables_filter input {
  margin-left: 0 !important;
  width: auto;
  max-width: 300px;
}

/* Boutons */
.dt-buttons .btn,
.dt-buttons .buttons-excel,
.dt-buttons .buttons-csv,
.dt-buttons .buttons-pdf,
.dt-buttons .buttons-copy {
  background-color: #198754;
  color: white;
  border: none;
  padding: 6px 12px;
  margin-right: 6px;
  font-size: 12px;
  border-radius: 4px;
  transition: background-color 0.2s;
}
.dt-buttons .btn:hover {
  background-color: #146c43;
}

/* Spinner */
.spinner-border {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
  color: #198754;
}

/* Cartes */
.card {
  border-radius: 8px;
  border: 1px solid #ddd;
  margin-bottom: 2rem;
  background-color: #fff;
  color: #222;
}
.card-header {
  background-color: #e9ecef;
  font-weight: bold;
}
.card-footer {
  background-color: #f8f9fa;
}

/* Formulaires */
label {
  font-weight: 500;
}
select.form-control,
input.form-control {
  font-size: 14px;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  border: 1px solid #ccc;
}
button.btn-primary,
button.btn-success {
  font-size: 14px;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  background-color: #198754;
  border: none;
}
button.btn-primary:hover,
button.btn-success:hover {
  background-color: #146c43;
}

.logo-container .custom-logo {
  max-height: 280px; /* Ajustez la hauteur maximale */
  width: auto;
  position: relative;
  margin-left: 20px; /* Maintenez le débordement à gauche */
  margin-top: -20px; /* Réduisez le débordement vers le haut */
}

.hidden { display: none; }


/**/
.ui-autocomplete {
  background-color: white !important; /* ou une autre couleur adaptée à ton thème */
  z-index: 9999; /* s'assurer qu'elle est au-dessus des autres éléments */
  border: 1px solid #ccc;
  max-width: 250px;
  list-style-type: none;
  padding-left: 0; 
}
body.dark-mode .ui-autocomplete {
  background-color: #222 !important;
  color: white;
  border: 1px solid #444;
  max-width: 250px;
  list-style-type: none;
  padding-left: 0; 
}
.ui-autocomplete .ui-menu-item-wrapper {
  padding: 8px 12px;
  cursor: pointer;
}
.ui-autocomplete li {
  list-style: none;
  margin: 0;
  padding: 8px 12px;
}

.ui-autocomplete li.ui-menu-item-wrapper.ui-state-focus {
  background-color: #198754;  /* Bleu Bootstrap par exemple */
  color: white;               /* Texte en blanc */
}
.ui-menu-item-wrapper {
  transition: background-color 0.2s ease;
}

