/* ========================================
   ZANGA - Composants
   ======================================== */

/* ===== FILTRES ===== */
.filters {
  background: white;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  margin: 1.5rem 0;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.875rem;
}

.filter-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.filter-select,
.filter-input {
  width: 100%;
  padding: 0.55rem 0.875rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  background: white;
  color: var(--gray-800);
  transition: border-color var(--transition-fast);
  outline: none;
}

.filter-select:focus,
.filter-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,58,115,0.12);
}

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.modal.active { display: flex; }

.modal-content {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.modal-close {
  width: 2rem; height: 2rem;
  border: none;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  color: var(--gray-500);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex; align-items: center; justify-content: center;
}

.modal-close:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}

.modal-body { padding: 1.25rem 1.5rem; }

/* ===== FORM ===== */
.form-group { margin-bottom: 1rem; }

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  color: var(--gray-800);
  transition: border-color var(--transition-fast);
  outline: none;
  background: white;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,58,115,0.12);
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-primary  { background: rgba(27,58,115,0.12); color: var(--primary); }
.badge-success  { background: rgba(22,163,74,0.1);  color: var(--success); }
.badge-warning  { background: rgba(217,119,6,0.1);  color: var(--warning); }
.badge-danger   { background: rgba(220,38,38,0.1);  color: var(--danger); }

/* ===== STAT CARD ===== */
.stat-card {
  background: white;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  border-left: 3px solid var(--primary);
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-top: 0.25rem;
  line-height: 1;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
}

.empty-state-icon {
  font-size: 3rem;
  color: var(--gray-300);
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.4rem;
}

.empty-state-text {
  color: var(--gray-500);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 2rem 0;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 0.625rem;
  border: 1.5px solid var(--gray-200);
  background: white;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: var(--font-sans);
  color: var(--gray-700);
}

.page-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1.5px solid var(--gray-200);
  margin-bottom: 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-500);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1.5px;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  font-family: var(--font-sans);
}

.tab:hover { color: var(--gray-800); }

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ===== ALERT ===== */
.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  border-left: 3px solid;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.alert-success { background: rgba(22,163,74,0.07);  border-color: var(--success); color: #15803d; }
.alert-error   { background: rgba(220,38,38,0.07);  border-color: var(--danger);  color: #b91c1c; }
.alert-warning { background: rgba(217,119,6,0.07);  border-color: var(--warning); color: #92400e; }
.alert-info    { background: rgba(27,58,115,0.07);  border-color: var(--primary); color: var(--primary-dark); }

/* ===== DROPDOWN ===== */
.dropdown { position: relative; display: inline-block; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-100);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: var(--transition-base);
  z-index: 1000;
}

.dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--gray-700);
  text-decoration: none;
  font-size: 0.875rem;
  transition: background var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--gray-50);
  color: var(--gray-900);
}

/* ===== SKELETON LOADER ===== */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 2000px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.skeleton-text   { height: 0.875rem; margin-bottom: 0.4rem; }
.skeleton-title  { height: 1.1rem; width: 65%; margin-bottom: 0.75rem; }
.skeleton-image  { height: 190px; width: 100%; border-radius: 0; }

/* ===== PACKS GRID ===== */
.packs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.pack-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--gray-100);
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.pack-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.pack-card.featured {
  border-color: var(--primary);
  background: linear-gradient(135deg, #fff5ee 0%, white 100%);
}

.pack-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.pack-price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1rem;
}

.pack-price span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-500);
}

/* ===== AVATAR ===== */
.avatar    { width: 40px; height: 40px; border-radius: var(--radius-full); object-fit: cover; }
.avatar-lg { width: 72px; height: 72px; }
.avatar-sm { width: 28px; height: 28px; }

/* ===== LOADER ===== */
.loader {
  width: 32px; height: 32px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ===== PRODUCT SKELETON CARD ===== */
.product-card.skeleton-loader {
  border: none;
  box-shadow: var(--shadow-sm);
  cursor: default;
}

.product-card.skeleton-loader:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}
