/**
 * =====================================================
 * STYLES POUR CONFIGURATION PRICING DYNAMIQUE
 * =====================================================
 */

/* ===== ONGLETS ===== */
.tabs-container {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid rgba(139, 92, 246, 0.2);
  margin-bottom: 2rem;
}

.tab-btn {
  padding: 0.875rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #a1a1aa;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.tab-btn:hover {
  color: #e4e4e7;
  background: rgba(139, 92, 246, 0.1);
}

.tab-btn.active {
  color: #a78bfa;
  border-bottom-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.15);
}

.tab-btn i {
  font-size: 1rem;
}

/* ===== CONTENEURS D'ONGLETS ===== */
.pricing-tab {
  display: none;
  animation: fadeIn 0.3s ease;
}

.pricing-tab.active {
  display: block !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== FILTRES ===== */
.filters-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.filters-row .form-control {
  min-width: 200px;
  padding: 0.625rem 1rem;
  background: rgba(24, 24, 27, 0.8);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 0.5rem;
  font-size: 0.95rem;
  color: #e4e4e7;
  transition: all 0.2s;
}

.filters-row .form-control:focus {
  outline: none;
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.05);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* ===== GROUPES DE CRITÈRES ===== */
.criteria-category-group {
  margin-bottom: 2.5rem;
}

.criteria-category-group h4 {
  color: #6366f1;
  margin-bottom: 1rem;
  border-bottom: 2px solid #e0e7ff;
  padding-bottom: 0.75rem;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ===== TABLEAUX AMÉLIORÉS ===== */
.table-responsive {
  overflow-x: auto;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(17, 24, 39, 0.6);
  color: #e4e4e7;
}

.data-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.data-table thead th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tbody tr {
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  transition: background-color 0.2s;
}

.data-table tbody tr:hover {
  background: rgba(139, 92, 246, 0.1);
}

.data-table tbody td {
  padding: 1rem;
  font-size: 0.9375rem;
  color: #e4e4e7;
}

.data-table tbody td code {
  background: rgba(139, 92, 246, 0.15);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.875rem;
  color: #c9a9ff;
}

.data-table tbody td strong {
  color: #f3f4f6;
  font-weight: 600;
}

/* ===== BADGES DE TYPE ===== */
.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 1.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
}

.type-badge i {
  font-size: 0.75rem;
}

/* ===== GROUPES DE QUOTAS ===== */
.quotas-category-group {
  margin-bottom: 2rem;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 0.75rem;
  overflow: hidden;
  background: rgba(17, 24, 39, 0.4);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
}

.quotas-category-group > div:first-child {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(124, 58, 237, 0.1) 100%);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.quotas-category-group h4 {
  margin: 0;
  color: #e4e4e7;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quota-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  transition: background 0.2s;
  background: rgba(17, 24, 39, 0.3);
}

.quota-item:hover {
  background: rgba(139, 92, 246, 0.1);
}

.quota-item:last-child {
  border-bottom: none;
}

.quota-item strong {
  display: block;
  color: #f3f4f6;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.quota-item small {
  color: #a1a1aa;
  font-size: 0.8125rem;
}

/* ===== CONTROLS FORMULAIRE ===== */
.quota-item input[type="number"] {
  width: 120px;
  padding: 0.625rem 1rem;
  background: rgba(24, 24, 27, 0.8);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  color: #e4e4e7;
  transition: all 0.2s;
}

.quota-item input[type="number"]:focus {
  outline: none;
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.05);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.quota-item input[type="number"]:disabled {
  background: rgba(24, 24, 27, 0.4);
  color: #71717a;
  cursor: not-allowed;
  opacity: 0.6;
}

.quota-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #8b5cf6;
}

.quota-item label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9375rem;
  color: #e4e4e7;
}

/* ===== SWITCH POUR FEATURES ===== */
.switch-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.switch-container input[type="checkbox"] {
  position: relative;
  width: 50px;
  height: 26px;
  appearance: none;
  background: #cbd5e1;
  border-radius: 13px;
  cursor: pointer;
  transition: all 0.3s;
}

.switch-container input[type="checkbox"]:checked {
  background: #10b981;
}

.switch-container input[type="checkbox"]::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.3s;
}

.switch-container input[type="checkbox"]:checked::before {
  left: 26px;
}

.switch-container span {
  font-weight: 500;
  min-width: 70px;
}

/* ===== HEADER FORMULE ===== */
.plan-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem 2rem;
  border-radius: 0.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.plan-header h3 {
  margin: 0;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.plan-header p {
  margin: 0.5rem 0 0 0;
  opacity: 0.95;
  font-size: 0.9375rem;
}

/* ===== STATS CARDS (overview) ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: linear-gradient(145deg, rgba(31, 41, 55, 0.8), rgba(17, 24, 39, 0.8));
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
  transition: all 0.2s;
}

.stat-card:hover {
  box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.4);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.stat-card .stat-icon i {
  font-size: 1.5rem;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #e4e4e7;
  margin-bottom: 0.25rem;
}

.stat-card .stat-label {
  color: #a1a1aa;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ===== BOUTONS ===== */
.btn-icon {
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: #a1a1aa;
  transition: all 0.2s;
  border-radius: 0.375rem;
}

.btn-icon:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.btn-icon i {
  font-size: 1rem;
}

.btn-secondary {
  background: rgba(139, 92, 246, 0.1);
  color: #e4e4e7;
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.5);
  color: #c9a9ff;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #a1a1aa;
}

.empty-state i {
  font-size: 3rem;
  color: #a78bfa;
  margin-bottom: 1.5rem;
  opacity: 0.6;
}

.empty-state p {
  font-size: 1rem;
  margin: 0;
  color: #e4e4e7;
}

/* ===== LOADING ===== */
.loading-placeholder {
  text-align: center;
  padding: 4rem 2rem;
  color: #8b5cf6;
}

.loading-placeholder i {
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* ===== RESPONSIVENESS ===== */
@media (max-width: 768px) {
  .tabs-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .tab-btn {
    white-space: nowrap;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
  
  .quota-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .quota-item > div:last-child {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== TABLEAUX RESPONSIFS ===== */
@media (max-width: 1024px) {
  .data-table {
    font-size: 0.875rem;
  }
  
  .data-table thead th,
  .data-table tbody td {
    padding: 0.75rem;
  }
}

