/* === Base globale === */
body {
  font-family: "Segoe UI", Roboto, sans-serif;
  background: #f9f9f9;
  color: #333;
}

.wrap h2, .wrap h3 {
  margin-top: 1.5em;
  border-bottom: 2px solid #ccc;
  padding-bottom: 5px;
  color: #444;
}

/* === Tableaux classiques === */
table.widefat {
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  width: 100%;
}

table.widefat thead {
  background-color: #e9ecef;
  font-weight: bold;
}

table.widefat th,
table.widefat td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

table.widefat tbody tr:nth-child(even) {
  background-color: #f7f7f7;
}

table.widefat tbody tr:hover {
  background-color: #eef6ff;
}

/* === Formulaires en grille (2 colonnes) === */
.tc-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 32px;
  max-width: 800px;
  margin-bottom: 20px;
}

.tc-form-grid label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

.tc-form-grid input,
.tc-form-grid select {
  width: 100%;
  height: 42px;
  padding: 8px 10px;
  border: 1px solid #bbb;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 16px;
  background: #fff;
}

/* Responsive formulaire */
@media (max-width: 768px) {
  .tc-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .tc-form-grid {
    grid-template-columns: 1fr;
    gap: 8px 16px;              /* réduit l’espacement */
  }

  .tc-form-grid label {
    margin-bottom: 4px;
    font-size: 14px;
  }

  .tc-form-grid input,
  .tc-form-grid select {
    height: 36px;               /* réduit la hauteur */
    padding: 6px 8px;
    font-size: 14px;
    line-height: 1.2;
  }
}

/* === Boutons === */
.button,
.button-primary {
  background-color: #007cba;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.button:hover,
.button-primary:hover {
  background-color: #005a9e;
}

.button.delete-button {
  background-color: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
}

.button.delete-button:hover {
  background-color: #f1b0b7;
}

/* === Dashicons icônes === */
.dashicons {
  font-size: 20px;
  vertical-align: middle;
}

/* === Recherche et filtres === */
#searchInput,
#societeFilter {
  max-width: 300px;
  padding: 6px 10px;
  margin-bottom: 15px;
  border: 1px solid #bbb;
  border-radius: 4px;
}

/* === Messages système === */
div.updated, div.error {
  border-radius: 4px;
  padding: 10px 15px;
  margin: 15px 0;
}

div.updated {
  background-color: #d1e7dd;
  color: #0f5132;
  border-left: 5px solid #0f5132;
}

div.error {
  background-color: #f8d7da;
  color: #842029;
  border-left: 5px solid #842029;
}

/* === Tableaux responsives (cartes mobiles) === */
.tc-table-responsive {
  width: 100%;
  overflow-x: auto;
}

@media (max-width: 768px) {
  .tc-table-responsive table,
  .tc-table-responsive thead,
  .tc-table-responsive tbody,
  .tc-table-responsive th,
  .tc-table-responsive td,
  .tc-table-responsive tr {
    display: block;
    width: 100%;
  }

  .tc-table-responsive thead {
    display: none;
  }

  .tc-table-responsive tr {
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    background-color: #fff;
  }

  .tc-table-responsive td {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: none;
    border-bottom: 1px solid #eee;
    word-break: break-word;
  }

  .tc-table-responsive td::before {
    content: attr(data-label) ": ";
    font-weight: bold;
    color: #444;
    width: 40%;
    flex-shrink: 0;
  }
}

.tc-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
  align-items: center;
}

.tc-actions-bar label {
  font-weight: bold;
  margin-right: 8px;
}

.tc-actions-bar input,
.tc-actions-bar select {
  padding: 6px 10px;
  border: 1px solid #bbb;
  border-radius: 4px;
}

.tc-actions-bar .button {
  white-space: nowrap;
}
/* Responsive Table CSS pour la liste des résultats */

.tc-table-responsive {
  overflow-x: auto;
}

#resultatsTable {
  width: 100%;
  min-width: 700px; /* Ajuste selon tes besoins */
  border-collapse: collapse;
}

#resultatsTable th,
#resultatsTable td {
  white-space: nowrap;
  padding: 8px 12px;
}

/* Ajustements spécifiques pour mobile */
@media (max-width: 768px) {
  .wrap {
    padding: 10px;
  }

  .wrap form {
    flex-direction: column;
    align-items: flex-start;
  }

  .wrap form select,
  .wrap form input,
  .wrap form button {
    width: 100%;
    margin-bottom: 10px;
  }

  #export-pdf {
    margin-left: 0 !important;
  }
}
/* Forcer le tableau spécifique à rester horizontalement défilable sans affecter les autres pages */

.tc-table-responsive {
  overflow-x: auto !important;
}

.tc-table-responsive table,
.tc-table-responsive thead,
.tc-table-responsive tbody,
.tc-table-responsive tr,
.tc-table-responsive th,
.tc-table-responsive td {
  display: revert !important;
}

.tc-table-responsive table {
  min-width: 800px; /* adapte cette largeur si nécessaire pour éviter les retours à la ligne */
}
<style>
.cancel-edit-button {
    background-color: #fdd;       /* rouge clair */
    color: #a00;
    border-color: #f99;
}
.cancel-edit-button:hover {
    background-color: #faa;
    color: #800;
    border-color: #f66;
}
</style>