/* =============================================
   MODERN BADGES & STATUS DESIGN
   Design moderne avec emojis et couleurs vives
   ============================================= */

/* Badge de base - style moderne */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 50px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Badges colorés avec fond semi-transparent + filtre blanc */
.badge-warning,
.badge.badge-warning,
span.badge-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(245, 158, 11, 0.15) 100%);
  color: #f59e0b;
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.badge-info,
.badge.badge-info,
span.badge-info {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(59, 130, 246, 0.15) 100%);
  color: #3b82f6;
  border: 1.5px solid rgba(59, 130, 246, 0.3);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.badge-success,
.badge.badge-success,
span.badge-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0.15) 100%);
  color: #10b981;
  border: 1.5px solid rgba(16, 185, 129, 0.3);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.badge-danger,
.badge.badge-danger,
span.badge-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(239, 68, 68, 0.15) 100%);
  color: #ef4444;
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.badge-secondary,
.badge.badge-secondary,
span.badge-secondary {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.25) 0%, rgba(148, 163, 184, 0.15) 100%);
  color: #64748b;
  border: 1.5px solid rgba(148, 163, 184, 0.3);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.badge-purple,
.badge.badge-purple,
span.badge-purple {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(139, 92, 246, 0.15) 100%);
  color: #8b5cf6;
  border: 1.5px solid rgba(139, 92, 246, 0.3);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* Badges avec compteurs - inline */
.badge-with-count {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-with-count .count {
  font-size: 0.95em;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  min-width: 1.5rem;
  text-align: center;
}

/* Statuts de dossiers/interventions */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Statuts spécifiques avec emojis */
.status-planifiee { 
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.1) 100%);
  color: #f59e0b; 
  border: 1.5px solid rgba(245, 158, 11, 0.25);
}

.status-en-cours { 
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%);
  color: #3b82f6; 
  border: 1.5px solid rgba(59, 130, 246, 0.25);
}

.status-terminee,
.status-cloturee,
.status-signee { 
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
  color: #10b981; 
  border: 1.5px solid rgba(16, 185, 129, 0.25);
}

.status-annulee,
.status-en-panne { 
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
  color: #ef4444; 
  border: 1.5px solid rgba(239, 68, 68, 0.25);
}

/* Tableaux - cellules avec badges */
table .badge,
table .status-badge {
  font-size: 0.7rem;
  padding: 0.3rem 0.65rem;
}

/* Cards modernes */
.card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* Dark theme adjustments */
body[data-theme="admin"] .badge,
body[data-role="ADMIN"] .badge,
body[data-theme="admin"] .status-badge,
body[data-role="ADMIN"] .status-badge {
  backdrop-filter: blur(12px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body[data-theme="admin"] .badge-warning,
body[data-role="ADMIN"] .badge-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35) 0%, rgba(245, 158, 11, 0.25) 100%);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

body[data-theme="admin"] .badge-info,
body[data-role="ADMIN"] .badge-info {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35) 0%, rgba(59, 130, 246, 0.25) 100%);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.4);
}

body[data-theme="admin"] .badge-success,
body[data-role="ADMIN"] .badge-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35) 0%, rgba(16, 185, 129, 0.25) 100%);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

body[data-theme="admin"] .badge-danger,
body[data-role="ADMIN"] .badge-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35) 0%, rgba(239, 68, 68, 0.25) 100%);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.7rem;
  }
  
  .status-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.65rem;
  }
}
