/* ========================================= */
/* STYLE DU TABLEAU GLOBAL                   */
/* ========================================= */

table.views-table {
  width: auto;              /* ✅ Colonnes compactes */
  min-width: 100%;          /* ✅ Responsive */
  border-collapse: collapse;
  table-layout: auto;
}

/* ========================================= */
/* TITRES DES COLONNES                       */
/* ========================================= */

table.views-table th {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid #ddd;
  background-color: #99adce;
  color: #ffffff;
  font-weight: 600;

  /* ✅ Titres propres sur une seule ligne */
  white-space: nowrap !important;

  line-height: 1.3;
  vertical-align: bottom;

  /* ✅ Empêche les colonnes trop fines */
  min-width: 120px;
}

/* ========================================= */
/* CELLULES                                  */
/* ========================================= */

table.views-table td {
  padding: 8px 12px;
  border: 1px solid #ddd;
  text-align: left;
  color: #555;
  vertical-align: top;

  /* ✅ compatible partout */
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;

  /* ✅ Empêche les colonnes trop étroites */
  min-width: 120px;
}

/* ========================================= */
/* BOUTON SUPPRESSION                        */
/* ========================================= */

.delete-row {
  background-color: #fff0f0;
  color: #ff4d4d;
  border: 1px solid #ff4d4d;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.delete-row:hover {
  background-color: #ff4d4d;
  color: white;
}

.delete-row:focus {
  outline: none;
}

/* ========================================= */
/* MESSAGE VIDE                              */
/* ========================================= */

.empty-message {
  text-align: center;
  font-style: italic;
  color: #888;
  padding: 20px;
}

/* ========================================= */
/* ENTÊTE FIXE (STICKY CLONE)                */
/* ========================================= */

.sticky-clone {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  background: white;
  border-collapse: collapse;
  pointer-events: none;
}

/* Clone aligné avec le vrai tableau */
.sticky-clone thead th {
  background: white !important;
  position: static !important;
  top: auto !important;
  z-index: 1200 !important;

  padding: 10px 12px;

  /* ✅ Même logique que le tableau principal */
  white-space: nowrap !important;

  line-height: 1.3;
  vertical-align: bottom;

  min-width: 120px;
}

/* ========================================= */
/* TOOLBAR ADMIN                             */
/* ========================================= */

.admin-toolbar + .sticky-clone {
  top: 32px;
}