/* =========================================================
💅 STYLE GLOBAL POUR DATATABLES - TransApp ERP
========================================================= */

/* Structure générale */
.dataTables_wrapper {
  padding: 10px 20px;
  width: 100%;
}

/* Barre de recherche */
.dataTables_wrapper .dataTables_filter {
  float: right !important;
  text-align: right !important;
  margin-bottom: 10px;
}
.dataTables_wrapper .dataTables_filter label {
  font-weight: 500;
  color: #444;
}
.dataTables_wrapper .dataTables_filter input {
  border-radius: 6px;
  border: 1px solid #ddd;
  padding: 6px 10px;
  width: 220px;
  transition: all 0.2s ease;
}
.dataTables_wrapper .dataTables_filter input:focus {
  border-color: #1c8c38;
  box-shadow: 0 0 4px rgba(28, 140, 56, 0.3);
  outline: none;
}

/* Sélecteur “Afficher X entrées” */
.dataTables_wrapper .dataTables_length {
  float: left !important;
  margin-top: 5px;
}
.dataTables_wrapper .dataTables_length label {
  font-weight: 500;
  color: #444;
}
.dataTables_wrapper .dataTables_length select {
  border-radius: 5px;
  padding: 3px;
  border: 1px solid #ddd;
}

/* Infos pagination (en bas à gauche) */
.dataTables_wrapper .dataTables_info {
  padding-top: 10px;
  color: #555;
  font-size: 13px;
}

/* Boutons de pagination */
.dataTables_wrapper .dataTables_paginate {
  text-align: right !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 6px !important;
  padding: 4px 10px !important;
  margin: 2px;
  color: #333 !important;
  border: 1px solid #ddd !important;
  background: white !important;
  font-weight: 500;
  transition: all 0.2s ease;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: #1c8c38 !important;
  color: white !important;
  border: none !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #e7f6ec !important;
  border-color: #1c8c38 !important;
  color: #1c8c38 !important;
}

/* Tableau */
.table {
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}
.table thead th {
  background-color: #f3f4f6;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  font-size: 13px;
  border-bottom: 2px solid #e1e1e1;
}
.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #f9fafb;
}
.table-hover tbody tr:hover {
  background-color: #eef7f0;
  transition: background-color 0.2s ease;
}
.table > :not(caption) > * > * {
  vertical-align: middle;
}

/* Ligne de total (tfoot) */
#transactionsTable tfoot th {
  background: #f7faf8;
  font-weight: 600;
  font-size: 14px;
  color: #1c8c38;
  border-top: 2px solid #dfe7e1;
}

/* Loader */
.loader {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.9);
  padding: 20px 30px;
  border-radius: 10px;
  font-weight: 600;
  color: #1c8c38;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Responsive (mobile) */
@media (max-width: 768px) {
  .dataTables_filter {
    float: none !important;
    text-align: left !important;
    margin-top: 10px;
  }
  .dataTables_length {
    float: none !important;
    margin-bottom: 10px;
  }
  .dataTables_filter input {
    width: 100%;
  }
}
.loader {
  display: none;
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.8);
  padding: 20px 30px;
  border-radius: 10px;
  font-weight: 600;
  color: #1c8c38;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}