/* ── abonnementList.css — scoped sous .sm-wrap pour zéro conflit ── */

.sm-wrap {
  margin-top: 20px;
  padding: 1.5rem;
}

.sm-card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 12px rgba(33, 37, 41, .08);
  overflow: hidden;
  max-width: 1450px;
  justify-self: center;
}

/* ── En-tête ── */
.sm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  padding: 1.1rem 1.4rem;
  background: #212529;
  border-bottom: 3px solid #c2b280;
}

.sm-head__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.sm-head__title i {
  color: #ffffff;
}

/* ── Boutons d'en-tête ── */
.sm-head-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.sm-btn-head {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 700;
  font-size: .82rem;
  padding: .5rem 1.1rem;
  border-radius: 6px;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
  white-space: nowrap;
}

.sm-btn-head:hover {
  opacity: .88;
  transform: translateY(-1px);
}

.sm-btn-excel {
  background: #198754;
  color: #fff !important;
}

.sm-btn-pdf {
  background: #dc3545;
  color: #fff !important;
}

.sm-btn-print {
  background: #6c757d;
  color: #fff !important;
}

.sm-btn-msg {
  background: #c2b280;
  color: #212529 !important;
}

/* ── Alerte succès ── */
.sm-alert {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: .9rem 1.2rem 0;
  padding: .7rem 1rem;
  background: #d1e7dd;
  border: 1px solid #a3cfbb;
  border-radius: 6px;
  color: #0a3622;
  font-size: .86rem;
}

/* ── Toolbar ── */
.sm-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  padding: .85rem 1.2rem;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

/* ── Filtres statut ── */
.sm-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .75rem 1.2rem;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.sm-filters__label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #6c757d;
  margin-right: .25rem;
  white-space: nowrap;
}

.sm-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .78rem;
  font-weight: 600;
  padding: .32rem .75rem;
  border-radius: 99px;
  border: 1.5px solid #dee2e6;
  background: #fff;
  color: #6c757d;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.sm-filter-btn:hover {
  border-color: #adb5bd;
  color: #212529;
}

.sm-filter-btn.active {
  background: #212529;
  color: #fff;
  border-color: #212529;
}

.sm-filter-btn[data-status="all"].active {
  background: #c2b280;
  color: #212529;
  border-color: #c2b280;
}

.sm-filter-btn[data-status="0"].active {
  background: #ffc107;
  color: #212529;
  border-color: #ffc107;
}

.sm-filter-btn[data-status="1"].active {
  background: #198754;
  color: #fff;
  border-color: #198754;
}

.sm-filter-btn[data-status="3"].active {
  background: #6c757d;
  color: #fff;
  border-color: #6c757d;
}

/* ── Searchbar ── */
.sm-search {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: #fff;
  border: 1.5px solid #ced4da;
  border-radius: 6px;
  padding: .42rem .85rem;
  flex: 1;
  min-width: 180px;
  max-width: 360px;
  transition: border-color .2s, box-shadow .2s;
}

.sm-search:focus-within {
  border-color: #c2b280;
  box-shadow: 0 0 0 3px rgba(194, 178, 128, .18);
}

.sm-search i {
  color: #adb5bd;
  font-size: .83rem;
  flex-shrink: 0;
}

.sm-search input {
  border: none;
  outline: none;
  background: none;
  font-size: .87rem;
  color: #212529;
  width: 100%;
}

.sm-search input::placeholder {
  color: #adb5bd;
}

.sm-count {
  font-size: .78rem;
  color: #6c757d;
  margin-left: auto;
  white-space: nowrap;
}

.sm-count strong {
  color: #212529;
}

/* ── Table ── */
.sm-table-wrap {
  overflow-x: auto;
}

.sm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.sm-table thead tr {
  background: #212529;
  color: #fff;
}

.sm-table th {
  padding: .75rem 1rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #ffffff;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}

.sm-table th:not([data-col]) {
  cursor: default;
}

.sm-table th:hover[data-col] {
  background: #2c3237;
}

.sm-table th.sm-sorted {
  color: #fff;
}

.sm-table th .sm-sort {
  margin-left: .3rem;
  font-size: .6rem;
  opacity: .45;
}

.sm-table th.sm-sorted .sm-sort {
  opacity: 1;
}

.sm-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background .12s;
}

.sm-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.sm-table tbody tr:hover {
  background: #fff8ee;
}

.sm-table tbody tr:last-child {
  border-bottom: none;
}

.sm-table td {
  padding: .8rem 1rem;
  vertical-align: middle;
  color: #212529;
}

.sm-num {
  color: #adb5bd;
  font-size: .78rem;
  font-weight: 700;
  width: 48px;
}

.sm-name {
  font-weight: 700;
  color: #212529;
}

.sm-email {
  color: #6c757d;
  font-size: .82rem;
}

.sm-price {
  font-weight: 700;
  color: #212529;
  white-space: nowrap;
}

/* ── Badges de statut ── */
.sm-status {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  font-size: .72rem;
  font-weight: 700;
  padding: .28rem .65rem;
  border-radius: 99px;
  white-space: nowrap;
}

.sm-status-pending {
  background: #fff3cd;
  color: #664d03;
  border: 1px solid #ffc107;
}

.sm-status-active {
  background: #d1e7dd;
  color: #0a3622;
  border: 1px solid #a3cfbb;
}

.sm-status-prepared {
  background: #cff4fc;
  color: #055160;
  border: 1px solid #9eeaf9;
}

.sm-status-expired {
  background: #e2e3e5;
  color: #41464b;
  border: 1px solid #c4c8cb;
}

.sm-status-unknown {
  background: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
}

/* ── Actions ── */
.sm-actions {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}

.sm-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .76rem;
  font-weight: 600;
  padding: .35rem .7rem;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .15s, transform .12s;
  background: none;
}

.sm-btn:hover {
  opacity: .85;
  transform: translateY(-1px);
  text-decoration: none;
}

.sm-btn-view {
  background: #212529;
  color: #fff !important;
  border-color: #212529;
}

.sm-btn-pay {
  background: #0dcaf0;
  color: #212529 !important;
  border-color: #0dcaf0;
}

/* ── Empty / No results ── */
.sm-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #adb5bd;
}

.sm-empty i {
  font-size: 2rem;
  display: block;
  margin-bottom: .75rem;
  opacity: .4;
}

.sm-empty p {
  font-size: .9rem;
}

/* ── Pagination ── */
.sm-pag-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  padding: .9rem 1.2rem;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
}

.sm-pag-info {
  font-size: .78rem;
  color: #6c757d;
}

.sm-pag-info strong {
  color: #212529;
}

.sm-pag-btns {
  display: flex;
  align-items: center;
  gap: .15rem;
  flex-wrap: wrap;
}

.sm-pag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 .55rem;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 600;
  border: 1px solid #dee2e6;
  background: #fff;
  color: #212529;
  cursor: pointer;
  transition: all .15s;
  line-height: 1;
}

.sm-pag-btn:hover:not(.sm-pag-disabled):not(.sm-pag-active) {
  background: #212529;
  color: #c2b280;
  border-color: #212529;
}

.sm-pag-btn.sm-pag-active {
  background: #c2b280;
  color: #212529;
  border-color: #c2b280;
  box-shadow: 0 2px 8px rgba(194, 178, 128, .35);
  cursor: default;
}

.sm-pag-btn.sm-pag-disabled {
  opacity: .35;
  cursor: default;
  pointer-events: none;
}

.sm-pag-sep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 34px;
  font-size: .8rem;
  color: #adb5bd;
}

/* DataTables override — scoped */
.sm-table-wrap .dataTables_wrapper .dataTables_filter,
.sm-table-wrap .dataTables_wrapper .dataTables_length,
.sm-table-wrap .dataTables_wrapper .dataTables_info,
.sm-table-wrap .dataTables_wrapper .dataTables_paginate {
  display: none !important;
  /* on gère nous-mêmes search + pagination */
}

.sm-table-wrap .dataTables_wrapper {
  overflow: visible;
}

/* ── Modal overrides ── */
.sm-modal .modal-header {
  background: #212529;
  border-bottom: 3px solid #c2b280;
  padding: 1rem 1.4rem;
}

.sm-modal .modal-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.sm-modal .modal-body {
  padding: 1.4rem;
}

.sm-modal .modal-footer {
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
  padding: .8rem 1.2rem;
}

.sm-modal .card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
}

.sm-modal .card-header {
  background: #f8f9fa;
  padding: .65rem 1rem;
}

.sm-modal .card-header h5 {
  font-size: .88rem;
  font-weight: 700;
  margin: 0;
  color: #212529;
}

.sm-modal .card-body {
  padding: .9rem;
}

.sm-modal .customer-details {
  font-size: .83rem;
  margin: 0;
}

.sm-modal .customer-details th {
  color: #6c757d;
  font-weight: 600;
  padding: .35rem .5rem;
  border: none;
  white-space: nowrap;
}

.sm-modal .customer-details td {
  color: #212529;
  padding: .35rem .5rem;
  border: none;
}

.sm-modal .customer-details tr {
  border-bottom: 1px solid #f0f0f0;
}

.sm-modal .customer-details tr:last-child {
  border-bottom: none;
}

/* ── Destinataires dans modal envoi ── */
.sm-recipients-list {
  background: #f8f9fa;
  border: 1.5px solid #dee2e6;
  border-radius: 6px;
  max-height: 210px;
  overflow-y: auto;
  padding: .6rem .8rem;
}

.sm-recipients-list .form-check {
  padding: 6px 0 6px 4px;
  border-bottom: 1px solid #f0f0f0;
}

.sm-recipients-list .form-check:last-child {
  border-bottom: none;
}

.sm-recipients-list .form-check-input {
  width: 16px;
  height: 16px;
  margin-right: 10px;
  accent-color: #c2b280;
}

.sm-sel-actions {
  display: flex;
  gap: .4rem;
}

.sm-sel-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  font-weight: 600;
  padding: .28rem .65rem;
  border-radius: 5px;
  border: 1.5px solid #ced4da;
  background: #fff;
  color: #495057;
  cursor: pointer;
  transition: all .15s;
}

.sm-sel-btn:hover {
  background: #212529;
  color: #fff;
  border-color: #212529;
}

#smEmptyRow td {
  padding: 0 !important;
  border: none !important;
}

#smNoResults td {
  padding: 0 !important;
  border: none !important;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .sm-wrap {
    padding: 1rem;
    margin-top: 50px;
  }

  .sm-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .sm-head-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .sm-search {
    max-width: 100%;
  }

  .sm-count {
    margin-left: 0;
  }

  .sm-table th:nth-child(4),
  .sm-table td:nth-child(4) {
    display: none;
  }

  /* email */
}

@media (max-width: 480px) {

  .sm-table th:nth-child(5),
  .sm-table td:nth-child(5) {
    display: none;
  }

  /* prix */

  .sm-btn span {
    display: none;
  }

  .sm-btn {
    padding: .35rem .55rem;
  }

  .sm-btn-head span {
    display: none;
  }

  .sm-btn-head {
    padding: .5rem .7rem;
  }
}


.sm-wrap {
  margin-top: 40px;
}

.sm-status-waiting {
  background: #fff3cd;
  color: #664d03;
  border: 1px solid #ffc107;
}

.sm-status-paid {
  background: #d1e7dd;
  color: #0a3622;
  border: 1px solid #a3cfbb;
}

.sm-status-progress {
  background: #cff4fc;
  color: #055160;
  border: 1px solid #9eeaf9;
}

.sm-status-done {
  background: #e2e3e5;
  color: #41464b;
  border: 1px solid #c4c8cb;
}


/* ── Surcharges légères pour la vue client ── */
.sm-wrap {
  margin-top: 40px;
}

.sm-tfoot-total td {
  background: #212529;
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  padding: .75rem 1rem;
}

.sm-tfoot-total .sm-price-total {
  color: #c2b280;
}


/* ── Filtres statut (newsletter_and_magazine) ── */
.sm-filter-status {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .78rem;
  font-weight: 600;
  padding: .32rem .75rem;
  border-radius: 99px;
  border: 1.5px solid #dee2e6;
  background: #fff;
  color: #6c757d;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.sm-filter-status:hover {
  border-color: #adb5bd;
  color: #212529;
}

.sm-filter-status.active {
  background: #212529;
  color: #fff;
  border-color: #212529;
}

.sm-filter-status[data-status="all"].active {
  background: #c2b280;
  color: #212529;
  border-color: #c2b280;
}

.sm-filter-status[data-status="actif"].active {
  background: #198754;
  color: #fff;
  border-color: #198754;
}

.sm-filter-status[data-status="inactif"].active {
  background: #6c757d;
  color: #fff;
  border-color: #6c757d;
}