/* ── Reset & scope ── */
.pl {
  /* Negative margin to counteract DashboardWrapper p-8 (2rem = 32px) */
  margin: -2rem;
  min-height: calc(100vh - 64px); /* subtract navbar height */
  background: #f3f3f9;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #1a202c;
  display: flex;
  flex-direction: column;
}

/* ── Page header ── */
.pl-header {
  padding: 28px 32px 0;
  background: #ffffff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.pl-header-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #0f172a;
  /* text-transform: uppercase; */
}
.pl-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 8px;
}
.pl-breadcrumb a {
  color: #94a3b8;
  text-decoration: none;
}
.pl-breadcrumb a:hover {
  color: #475569;
}
.pl-breadcrumb span {
  color: #cbd5e1;
}

/* ── Stats row ── */
.pl-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px 32px;
}
.pl-stat {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8eaf0;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s;
}
.pl-stat:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.pl-stat-label {
  font-size: 12.5px;
  color: #94a3b8;
  font-weight: 500;
  margin-bottom: 8px;
}
.pl-stat-value {
  font-size: 30px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -1px;
}
.pl-stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

/* ── Body ── */
.pl-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  padding: 0 32px 32px;
  flex: 1;
}

/* ── Sidebar filters ── */
.pl-filters {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8eaf0;
  padding: 22px 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  align-self: start;
  position: sticky;
  top: 16px;
}
.pl-filters-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.pl-filters-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}
.pl-clear {
  font-size: 13px;
  color: #3b82f6;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 500;
}
.pl-clear:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.pl-search-wrap {
  position: relative;
  margin-bottom: 22px;
}
.pl-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #94a3b8;
  pointer-events: none;
}
.pl-search {
  width: 100%;
  padding: 10px 12px 10px 34px;
  border: 1.5px solid #e8eaf0;
  border-radius: 9px;
  font-size: 13.5px;
  outline: none;
  color: #1a202c;
  background: #f8fafc;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.pl-search:focus {
  border-color: #3b82f6;
  background: #fff;
}

.pl-group {
  margin-bottom: 22px;
}
.pl-group-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 10px;
}
.pl-cat-item {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  cursor: pointer;
  color: #374151;
  transition: all 0.12s;
  border: 1.5px solid transparent;
}
.pl-cat-item:hover {
  background: #f1f5f9;
}
.pl-cat-item.pl-cat-active {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
  font-weight: 600;
}

.pl-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pl-price-in {
  flex: 1;
  padding: 9px 10px;
  border: 1.5px solid #e8eaf0;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  min-width: 0;
  background: #f8fafc;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.pl-price-in:focus {
  border-color: #3b82f6;
  background: #fff;
}
.pl-price-sep {
  font-size: 13px;
  color: #94a3b8;
  flex-shrink: 0;
  font-weight: 500;
}

/* ── Main panel ── */
.pl-main {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8eaf0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pl-main-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5f9;
}
.pl-btn-add {
  background: #00b4e9;
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 95, 115, 0.25);
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
.pl-btn-add:hover {
  background: #00b4e9;
  box-shadow: 0 2px 8px rgba(0, 95, 115, 0.25);
}
.pl-btn-print {
  background: #fff;
  color: #374151;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.pl-btn-print:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

/* ── Tabs ── */
.pl-tabs {
  display: flex;
  border-bottom: 1px solid #f1f5f9;
  padding: 0 24px;
}
.pl-tab {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: #94a3b8;
  border: none;
  border-bottom: 2.5px solid transparent;
  background: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s;
  white-space: nowrap;
}
.pl-tab:hover {
  color: #475569;
}
.pl-tab.active {
  color: #0f172a;
  font-weight: 700;
  border-bottom-color: #0f172a;
}
.pl-badge {
  background: #fef3c7;
  color: #d97706;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 11.5px;
  font-weight: 700;
}
.pl-tab.active .pl-badge {
  background: #0f172a;
  color: #fff;
}

/* ── Table ── */
.pl-table-wrap {
  overflow-x: auto;
  flex: 1;
}
table.pl-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.pl-tbl thead tr {
  background: #f8fafc;
}
.pl-tbl th {
  padding: 14px 24px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 700;
  color: #64748b;
  border-bottom: 1px solid #f1f5f9;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
}
.pl-tbl td {
  padding: 16px 24px;
  border-bottom: 1px solid #f8fafc;
  vertical-align: middle;
}
.pl-tbl tbody tr:last-child td {
  border-bottom: none;
}
.pl-tbl tbody tr {
  transition: background 0.1s;
}
.pl-tbl tbody tr:hover td {
  background: #fafbff;
}
.pl-product-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 14.5px;
}
.pl-price {
  font-weight: 600;
  color: #374151;
}
.pl-stock-hi {
  color: #16a34a;
  font-weight: 700;
}
.pl-stock-lo {
  color: #ea580c;
  font-weight: 700;
}
.pl-stock-zero {
  color: #94a3b8;
  font-weight: 500;
}
.pl-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
}
.pl-empty {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
  font-size: 15px;
}
.pl-empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

/* ── Action buttons ── */
.pl-acts {
  display: flex;
  gap: 8px;
}
.pl-act {
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #374151;
  transition: all 0.12s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.pl-act:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.pl-act-del {
  color: #ef4444;
  border-color: #fecaca;
}
.pl-act-del:hover {
  background: #fef2f2;
  border-color: #f87171;
}

/* ── Pagination ── */
.pl-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
}
.pl-pager-info {
  font-size: 13.5px;
  color: #94a3b8;
}
.pl-pager-btn {
  padding: 9px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: #475569;
  color: #fff;
  transition: background 0.15s;
}
.pl-pager-btn:hover:not(:disabled) {
  background: #334155;
}
.pl-pager-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

@media (max-width: 1024px) {
  .pl-body {
    grid-template-columns: 1fr;
  }
  .pl-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .pl-filters {
    position: static;
  }
}
@media (max-width: 640px) {
  .pl {
    margin: -1rem;
  }
  .pl-header,
  .pl-stats,
  .pl-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .pl-stats {
    grid-template-columns: 1fr;
  }
}

/* ── Scoped with ap- prefix to avoid conflicts with DashboardWrapper ── */
.ap-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  padding: 0 28px;
  height: 56px;
  gap: 16px;
}
.ap-page-title {
  font-size: 17px;
  font-weight: 700;
  flex: 1;
  color: #1a202c;
}
.ap-btn-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #00b4e9;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 22px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.ap-btn-save:hover {
  background: #00b4e9;
}

.ap-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  padding: 18px 8px;
  max-width: 1300px;
}
.ap-left,
.ap-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}
.section-header {
  padding: 14px 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-icon {
  font-size: 16px;
}
.section-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a202c;
}
.section-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-size: 13px;
  font-weight: 600;
  color: #1a202c;
}
.required-star {
  color: #e85d26;
  margin-left: 3px;
}
.ap-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ap-text-input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 7px;
  font-size: 14px;
  outline: none;
  background: #fff;
  color: #1a202c;
  transition: border-color 0.15s;
}
.ap-text-input:focus {
  border-color: #e85d26;
}

.ap-select-wrapper {
  position: relative;
}
.ap-select-input {
  width: 100%;
  padding: 9px 32px 9px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 7px;
  font-size: 14px;
  background: #fff;
  color: #1a202c;
  outline: none;
  appearance: none;
  cursor: pointer;
}
.ap-select-input:focus {
  border-color: #e85d26;
}
.ap-select-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #718096;
}

.ap-rte {
  border: 1.5px solid #e2e8f0;
  border-radius: 7px;
  overflow: hidden;
}
.ap-rte-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 8px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.ap-rte-group {
  display: flex;
  gap: 1px;
  margin-right: 6px;
}
.ap-rte-btn {
  padding: 4px 8px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #1a202c;
}
.ap-rte-btn:hover {
  background: #e2e8f0;
}
.ap-rte-source {
  margin-left: auto;
  font-size: 12px;
}
.ap-rte-body {
  min-height: 120px;
  padding: 12px;
  font-size: 14px;
  outline: none;
  color: #1a202c;
}
.ap-rte-placeholder {
  color: #718096;
  pointer-events: none;
}

.ap-dropzone-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ap-dropzone-label {
  font-size: 13px;
  font-weight: 600;
  color: #1a202c;
}
.ap-dropzone-hint {
  font-size: 12px;
  color: #718096;
}
.ap-dropzone {
  border: 2px dashed #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  cursor: pointer;
  text-align: center;
  background: #fafbfc;
  transition: border-color 0.15s;
}
.ap-dropzone:hover {
  border-color: #e85d26;
}
.ap-dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #718096;
  font-size: 13px;
}
.ap-dropzone-icon {
  font-size: 28px;
}
.ap-dropzone-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.ap-preview-thumb {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.ap-preview-thumb img,
.ap-preview-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ap-preview-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ap-add-more {
  width: 90px;
  height: 90px;
  border: 2px dashed #e2e8f0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #718096;
}

.ap-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.ap-toggle-track {
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: #cbd5e0;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.ap-toggle-track.ap-toggle-on {
  background: #00b4e9;
}
.ap-toggle-thumb {
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.ap-toggle-track.ap-toggle-on .ap-toggle-thumb {
  left: 19px;
}
.ap-toggle-label {
  font-size: 13.5px;
  color: #1a202c;
}

.ap-price-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ap-price-row {
  display: flex;
  align-items: center;
}
.ap-currency {
  padding: 9px 12px;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-right: none;
  border-radius: 7px 0 0 7px;
  font-size: 13px;
  font-weight: 700;
  color: #718096;
}
.ap-price-input {
  border-radius: 0 7px 7px 0 !important;
  flex: 1;
}
.ap-price-ht {
  font-size: 11.5px;
  color: #718096;
}

.ap-info-box {
  background: #ebf8ff;
  border: 1px solid #bee3f8;
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 12.5px;
  color: #2b6cb0;
  display: flex;
  gap: 8px;
}
.ap-stock-note {
  font-size: 13px;
  color: #718096;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 7px;
  padding: 10px 14px;
}
.ap-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 7px;
  font-size: 14px;
  outline: none;
  resize: vertical;
  min-height: 80px;
  background: #fff;
  color: #1a202c;
  font-family: inherit;
}
.ap-textarea:focus {
  border-color: #e85d26;
}
.ap-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 4px 0;
}
.ap-variants-hint {
  font-size: 13px;
  color: #718096;
  line-height: 1.6;
}
.ap-variants-hint a {
  color: #e85d26;
  text-decoration: none;
  font-weight: 600;
}
.ap-linked-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.ap-linked-tag {
  background: #edf2ff;
  color: #3730a3;
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 12.5px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.ap-linked-tag button {
  background: none;
  border: none;
  cursor: pointer;
  color: #7c3aed;
  font-size: 14px;
}
.ap-add-link-btn {
  padding: 8px 14px;
  border: 1.5px dashed #e2e8f0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  color: #718096;
  width: 100%;
  transition:
    border-color 0.15s,
    color 0.15s;
}
.ap-add-link-btn:hover {
  border-color: #e85d26;
  color: #e85d26;
}
.ap-link {
  font-size: 13px;
  color: #e85d26;
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 1024px) {
  .ap-grid {
    grid-template-columns: 1fr;
  }
  .ap-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}
@media (max-width: 700px) {
  .ap-grid {
    padding: 16px;
  }
  .ap-right {
    grid-template-columns: 1fr;
  }
  .ap-two-col {
    grid-template-columns: 1fr;
  }
}
.loading-fade {
  opacity: 0.4;
  pointer-events: none;
}

.pl-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  background: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pag-numbers {
  display: flex;
  gap: 5px;
}

.pag-num {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: white;
  cursor: pointer;
  font-size: 13px;
  transition: 0.2s;
}

.pag-num.active {
  background: #005f73;
  color: white;
  border-color: #005f73;
}

.pag-nav-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: white;
  cursor: pointer;
  font-size: 13px;
}

.pag-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.opacity-50 {
  opacity: 0.5;
  pointer-events: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-content {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  width: 100%;
  max-width: 460px;
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
}
.modal-form {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #f1f5f9;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 13px;
  font-weight: 600;
}
.form-group input {
  padding: 9px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 7px;
  font-size: 14px;
  outline: none;
}
.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #94a3b8;
}
/* Conteneur pour aligner les badges */
.attribute-values-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* Style de base des badges (pilules) */
.value-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background-color: #f8fafc; /* Gris très clair */
  border: 1px solid #e2e8f0; /* Bordure douce */
  border-radius: 8px; /* Coins arrondis modernes */
  color: #1e293b; /* Texte sombre */
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.value-badge:hover {
  border-color: #cbd5e1;
  background-color: #f1f5f9;
}

/* Spécifique aux couleurs */
.value-badge.has-color {
  padding-left: 8px; /* Moins d'espace si présence du point */
}

.color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-right: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1); /* Pour voir le blanc sur fond blanc */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Badges de type d'affichage (Couleur / Texte) */
.badge-color,
.badge-text {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.badge-color {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-text {
  background-color: #e0f2fe;
  color: #0369a1;
}
/* Layout spécifique au VariantsPanel */
.ap-inline-form {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.ap-attrs-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin: 1.5rem 0;
}

.ap-attr-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 1rem;
  border-radius: 8px;
}

.ap-attr-item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ap-values-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.ap-tag {
  background: #fff;
  border: 1px solid #cbd5e1;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ap-btn-generate {
  width: 100%;
  background: #2563eb;
  color: white;
  padding: 10px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.ap-cell-badge {
  background: #eef2ff;
  color: #4338ca;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 12px;
}

.ap-btn-remove {
  color: #ef4444;
  font-size: 12px;
  text-decoration: underline;
}
.ap-value-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: white;
  transition: all 0.2s;
}

.ap-value-chip.active {
  background: #3b82f6;
  color: white;
  border-color: #2563eb;
}

.ap-attr-box {
  background: #f1f5f9;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
}

/* ── Stock Movements Modal ── */

.sm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.sm-modal {
  background: var(--card-bg, #fff);
  border-radius: 12px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.sm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.sm-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #111827);
}

.sm-modal-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #9ca3af;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .15s;
}
.sm-modal-close:hover { background: #f3f4f6; }

.sm-error {
  margin: 12px 20px 0;
  padding: 10px 14px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 8px;
  font-size: 13px;
}

.sm-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px 20px;
}

.sm-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sm-field-full { grid-column: 1 / -1; }

.sm-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary, #374151);
}

.sm-field input,
.sm-field select,
.sm-field textarea {
  padding: 8px 10px;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
  background: var(--input-bg, #fff);
  color: var(--text-primary, #111827);
  width: 100%;
  box-sizing: border-box;
}

.sm-field input:focus,
.sm-field select:focus,
.sm-field textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}

.sm-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border-color, #e5e7eb);
}

.sm-btn-cancel {
  padding: 9px 18px;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 8px;
  background: var(--card-bg, #fff);
  font-size: 14px;
  cursor: pointer;
  color: var(--text-secondary, #374151);
}

.sm-btn-save {
  padding: 9px 22px;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}
.sm-btn-save:hover:not(:disabled) { background: #4f46e5; }
.sm-btn-save:disabled { opacity: .6; cursor: not-allowed; }

@media (max-width: 480px) {
  .sm-form-grid { grid-template-columns: 1fr; }
  .sm-field-full { grid-column: 1; }
}

/* ── Ajouter dans stock-movements.css ── */

.sm-modal-wide {
  max-width: 780px;
}

.sm-warning {
  margin: 8px 20px 0;
  padding: 8px 14px;
  background: var(--color-background-warning);
  color: var(--color-text-warning);
  border-radius: 8px;
  font-size: 13px;
}

.sm-variants-table-wrap {
  border: 1px solid var(--color-border-tertiary);
  border-radius: 8px;
  overflow: hidden;
}

.sm-variants-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sm-variants-table thead {
  background: var(--color-background-secondary);
}

.sm-variants-table th {
  padding: 8px 12px;
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border-tertiary);
}

.sm-variants-table td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--color-border-tertiary);
  color: var(--color-text-primary);
}

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

.sm-variants-table tr:hover td {
  background: var(--color-background-secondary);
}

.sm-variants-table input[type="number"] {
  width: 90px;
  padding: 5px 8px;
  border: 1px solid var(--color-border-tertiary);
  border-radius: 6px;
  font-size: 13px;
  background: var(--color-background-primary);
  color: var(--color-text-primary);
  outline: none;
}

.sm-variants-table input[type="number"]:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99,102,241,.1);
}

.sm-input-error {
  border-color: var(--color-border-danger) !important;
}