.artificiers-main {
  overflow: visible !important;
}

.artificiers-page {
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow: visible;
}

/* Bandeau = même logique que Paramètres (parametres.css) */
.artificiers-toolbar.parametres-toolbar {
  z-index: 45;
}

.artificiers-toolbar.parametres-toolbar button.settings-nav-pill.filter-chip {
  appearance: none;
  margin: 0;
  font-family: inherit;
  text-align: center;
}

.artificiers-toolbar.parametres-toolbar button.filter-chip.active {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.26), rgba(139, 92, 246, 0.24));
  border-color: rgba(236, 72, 153, 0.4);
  color: #fff;
  box-shadow: 0 10px 28px rgba(236, 72, 153, 0.18);
}

.artificiers-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.artificiers-toolbar .project-btn.artificiers-btn-danger,
.artificiers-page .project-header .project-header-actions .project-btn.artificiers-btn-danger {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.32);
  color: #fecaca;
}

.artificiers-toolbar .project-btn.artificiers-btn-danger:hover,
.artificiers-page .project-header .project-header-actions .project-btn.artificiers-btn-danger:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fff;
}

/* ===== Liste / carte ===== */

.artificiers-list-shell {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.055) 0%,
    rgba(255, 255, 255, 0.03) 45%,
    rgba(139, 92, 246, 0.04) 100%
  );
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.artificiers-list-head {
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(
    180deg,
    rgba(236, 72, 153, 0.06) 0%,
    transparent 100%
  );
}

.artificiers-list-search {
  margin-top: 12px;
  max-width: 420px;
}

.artificiers-search-input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  outline: none;
  transition: 0.2s ease;
  box-sizing: border-box;
}

.artificiers-search-input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.artificiers-search-input:focus {
  border-color: rgba(236, 72, 153, 0.35);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
}

.artificiers-list-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.artificiers-list-meta {
  margin: 6px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.52);
}

.artificiers-card .artificiers-table-wrap {
  padding: 8px 16px 20px;
}

.artificiers-card {
  width: 100%;
  min-width: 0;
}

.artificiers-table-wrap {
  overflow-x: auto;
}

.artificiers-th-icon {
  width: 56px;
}

.artificiers-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
}

.artificiers-table thead th {
  text-align: left;
  padding: 4px 16px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.artificiers-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.artificiers-sort-indicator {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid rgba(255, 255, 255, 0.3);
  transform: translateY(1px);
  transition: transform 0.18s ease, border-top-color 0.18s ease;
}

.artificiers-sort-btn.is-active {
  color: rgba(255, 255, 255, 0.9);
}

.artificiers-sort-btn.is-active .artificiers-sort-indicator {
  border-top-color: rgba(236, 72, 153, 0.95);
}

.artificiers-sort-btn.is-active.is-desc .artificiers-sort-indicator {
  transform: rotate(180deg) translateY(1px);
}

.artificiers-table tbody tr.artificiers-row {
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.artificiers-table tbody tr.artificiers-row:hover {
  transform: translateY(-2px);
}

.artificiers-table tbody tr.artificiers-row:hover td {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 28px rgba(236, 72, 153, 0.08);
}

.artificiers-table tbody td {
  padding: 16px 16px;
  border: none;
  color: #fff;
  font-size: 14px;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.045);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.artificiers-table tbody td:first-child {
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.artificiers-table tbody td:last-child {
  border-top-right-radius: 18px;
  border-bottom-right-radius: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.artificiers-table tbody tr.artificiers-row:hover td:first-child {
  border-left-color: rgba(236, 72, 153, 0.35);
  box-shadow: inset 3px 0 0 0 rgba(236, 72, 153, 0.65);
}

.artificiers-table tbody tr.artificiers-row td {
  border-top-color: rgba(255, 255, 255, 0.06);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.art-identity-cell {
  min-width: 160px;
}

.art-identity-line {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
}

.art-identity-line strong {
  font-weight: 700;
  color: #fff;
}

.art-dept-cell {
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: 13px;
}

.arti-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.arti-badge--n1 {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.22), rgba(139, 92, 246, 0.2));
  border-color: rgba(236, 72, 153, 0.35);
  color: #fce7f3;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.12);
}

.arti-badge--n2 {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(139, 92, 246, 0.22));
  border-color: rgba(56, 189, 248, 0.35);
  color: #e0f2fe;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.1);
}

.arti-badge--none {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.55);
}

.arti-role {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.arti-role--admin {
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.28);
}

.arti-role--ops {
  background: rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.28);
}

.arti-role--artificier {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.artificiers-table input,
.artificiers-table select,
.artificiers-table textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  outline: none;
  transition: 0.2s ease;
  box-sizing: border-box;
}

.artificiers-table input:focus,
.artificiers-table select:focus,
.artificiers-table textarea:focus {
  border-color: rgba(236,72,153,0.35);
  box-shadow: 0 0 0 4px rgba(236,72,153,0.12);
}

.artificiers-table select option {
  background: #0f172a;
  color: #fff;
}

.empty-artificiers {
  text-align: center;
  padding: 48px 24px !important;
  color: rgba(255, 255, 255, 0.55) !important;
  font-size: 14px;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.03) !important;
  border-radius: 18px !important;
  border: 1px dashed rgba(255, 255, 255, 0.1) !important;
}

.art-icon-cell {
  text-align: center;
  padding-left: 14px !important;
  padding-right: 10px !important;
  width: 56px;
}

.art-row-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Code couleur = rôle du compte (aligné sur les pastilles « Rôle ») */
.art-row-avatar--artificier {
  background: linear-gradient(145deg, rgba(236, 72, 153, 0.75), rgba(109, 40, 217, 0.72));
  border-color: rgba(236, 72, 153, 0.45);
}

.art-row-avatar--ops {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.72), rgba(5, 150, 105, 0.78));
  border-color: rgba(52, 211, 153, 0.45);
}

.art-row-avatar--admin {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.78), rgba(217, 119, 6, 0.82));
  border-color: rgba(251, 191, 36, 0.5);
}

.artificiers-table tbody tr.artificiers-row:hover .art-row-avatar--artificier {
  transform: scale(1.06);
  box-shadow:
    0 8px 22px rgba(236, 72, 153, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.artificiers-table tbody tr.artificiers-row:hover .art-row-avatar--ops {
  transform: scale(1.06);
  box-shadow:
    0 8px 22px rgba(16, 185, 129, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.artificiers-table tbody tr.artificiers-row:hover .art-row-avatar--admin {
  transform: scale(1.06);
  box-shadow:
    0 8px 22px rgba(245, 158, 11, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.art-icon-white {
  display: none;
}

.art-row-checkbox-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-checkbox.select-artificier {
  width: 18px;
  height: 18px;
  min-height: auto;
  accent-color: #ec4899;
  cursor: pointer;
}

.artificiers-table .project-btn,
.artificiers-table button.project-btn,
.artificiers-table .delete-btn {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
  backdrop-filter: blur(10px);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.artificiers-table .project-btn:hover,
.artificiers-table button.project-btn:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-1px);
}

.artificiers-table .delete-btn {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.24);
  color: #fca5a5;
}

.artificiers-table .delete-btn:hover {
  background: rgba(239,68,68,0.18);
  color: #fff;
}

/* Modal nouveau compte : grille 2 colonnes pour éviter le scroll vertical */
#artificierModal.modal.modal-overlay-modern .modal-content.modal-box-modern {
  width: min(560px, 96vw) !important;
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
}

.artificier-modal-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  align-items: start;
}

.artificier-modal-fields .form-group {
  margin-bottom: 0;
}

.artificier-modal-fields__full {
  grid-column: 1 / -1;
}

#artificierModal .modal-box-modern .artificier-modal-fields .form-group input,
#artificierModal .modal-box-modern .artificier-modal-fields .form-group select {
  min-height: 40px;
  padding: 0 11px;
  font-size: 13px;
  border-radius: 12px;
}

#artificierModal .modal-box-modern .artificier-modal-fields .form-group label {
  margin-bottom: 5px;
  font-size: 12px;
}

@media (max-width: 540px) {
  .artificier-modal-fields {
    grid-template-columns: 1fr;
  }

  .artificier-modal-fields__full {
    grid-column: auto;
  }
}

.modal-overlay-modern {
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
}

.modal-box-modern {
  width: min(440px, 92vw);
  background: rgba(12, 18, 34, 0.94);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 28px 24px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  backdrop-filter: blur(18px);
  position: relative;
}

.modal-box-modern h2 {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.modal-box-modern .form-group {
  margin-bottom: 14px;
}

.modal-box-modern .form-group label {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,0.78);
  display: block;
}

.modal-box-modern .form-group input,
.modal-box-modern .form-group select,
.modal-box-modern .form-group textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: 0.2s ease;
  backdrop-filter: blur(8px);
}

.modal-box-modern .form-group input:focus,
.modal-box-modern .form-group select:focus,
.modal-box-modern .form-group textarea:focus {
  border-color: rgba(236,72,153,0.35);
  box-shadow: 0 0 0 4px rgba(236,72,153,0.12);
}

.modal-box-modern .form-group input::placeholder {
  color: rgba(255,255,255,0.32);
}

.modal-box-modern .form-group select option {
  background: #0f172a;
  color: #fff;
}

.modal-text-modern {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.78);
}

.modal-actions-modern {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.modal-btn-modern {
  border-radius: 14px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
  backdrop-filter: blur(10px);
}

.modal-btn-modern:hover {
  transform: translateY(-1px);
}

.modal-btn-cancel {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.modal-btn-cancel:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.16);
}

.modal-btn-confirm {
  border: 1px solid rgba(236,72,153,0.35);
  background: linear-gradient(135deg, rgba(236,72,153,0.24), rgba(139,92,246,0.24));
  color: #fff;
  box-shadow: 0 10px 25px rgba(236,72,153,0.15);
}

.modal-btn-confirm:hover {
  box-shadow: 0 14px 28px rgba(236,72,153,0.18);
}

.modal-close-modern {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 24px;
  color: rgba(255,255,255,0.56);
  transition: 0.2s ease;
  cursor: pointer;
}

.modal-close-modern:hover {
  color: #fff;
}

@media (max-width: 760px) {
  .artificiers-toolbar.parametres-toolbar .parametres-toolbar-save {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .artificiers-toolbar.parametres-toolbar .parametres-toolbar-save .project-btn {
    width: 100%;
    justify-content: center;
  }

  .artificiers-toolbar.parametres-toolbar .primary-save-btn {
    order: -1;
  }
}