/* ============================================
   Variables CSS
   ============================================ */
:root {
  /* Couleurs principales */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #f472b6;
  --success: #10b981;
  --success-dark: #059669;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-dark: #dc2626;

  /* Neutres */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  --gradient-success: linear-gradient(135deg, var(--success) 0%, #34d399 100%);
  --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  --gradient-silver: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
  --gradient-bronze: linear-gradient(135deg, #d97706 0%, #b45309 100%);

  /* Ombres */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Rayons de bordure */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition: 200ms ease;
  --transition-slow: 300ms ease;
}

/* ============================================
   Reset et Base
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}

/* ============================================
   Layout principal
   ============================================ */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================
   Header
   ============================================ */
.header {
  background: var(--gradient-primary);
  color: white;
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  font-size: 1.75rem;
}

.logo h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.admin-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.admin-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

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

/* ============================================
   Navigation Tabs
   ============================================ */
.nav-tabs {
  display: flex;
  background: white;
  padding: 0.5rem;
  gap: 0.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid var(--gray-200);
}

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

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
  transition: var(--transition);
  white-space: nowrap;
  flex: 1;
  min-width: 70px;
}

.nav-tab:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

.nav-tab.active {
  background: var(--primary);
  color: white;
}

.tab-icon {
  font-size: 1.25rem;
}

/* ============================================
   Contenu principal
   ============================================ */
.main-content {
  flex: 1;
  padding: 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1.5rem;
  letter-spacing: -0.025em;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

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

/* ============================================
   Cartes de badges
   ============================================ */
.badges-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.activity-group {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.activity-header {
  background: var(--gradient-primary);
  color: white;
  padding: 1rem 1.25rem;
  font-size: 1.125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.activity-icon {
  font-size: 1.5rem;
}

.activity-badges {
  padding: 1rem;
  display: grid;
  gap: 1rem;
}

.badge-card {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: var(--transition);
  border: 1px solid var(--gray-200);
}

.badge-card:hover {
  transform: translateX(4px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
}

.badge-icon {
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.badge-info {
  flex: 1;
  min-width: 0;
}

.badge-name {
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.25rem;
}

.badge-description {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

.badge-points {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--gradient-gold);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ============================================
   Sélecteur personnalisé
   ============================================ */
.select-wrapper {
  margin-bottom: 1.5rem;
}

.custom-select {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  background: white;
  color: var(--gray-800);
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
}

.custom-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.custom-input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  background: white;
  color: var(--gray-800);
  transition: var(--transition);
}

.custom-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ============================================
   Badges du participant
   ============================================ */
.participant-badges {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.participant-header {
  background: var(--gradient-primary);
  color: white;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 1rem;
}

.participant-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.participant-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 0.875rem;
  opacity: 0.9;
}

.participant-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badges-list {
  display: grid;
  gap: 0.75rem;
}

.badge-item {
  background: white;
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.badge-item-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.badge-item-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.badge-item-name {
  font-weight: 600;
  color: var(--gray-800);
}

.badge-item-date {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.badge-item-points {
  background: var(--gradient-gold);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.no-badges {
  text-align: center;
  padding: 3rem;
  color: var(--gray-500);
}

.no-badges-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* ============================================
   Classement
   ============================================ */
.classement-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.classement-item {
  background: white;
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}

.classement-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.classement-item.top-1 {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #fbbf24;
}

.classement-item.top-2 {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border-color: #9ca3af;
}

.classement-item.top-3 {
  background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
  border-color: #d97706;
}

.classement-rang {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.top-1 .classement-rang {
  background: var(--gradient-gold);
  color: white;
  font-size: 1.25rem;
}

.top-2 .classement-rang {
  background: var(--gradient-silver);
  color: white;
}

.top-3 .classement-rang {
  background: var(--gradient-bronze);
  color: white;
}

.classement-rang:not(.top-1):not(.top-2):not(.top-3) {
  background: var(--gray-200);
  color: var(--gray-600);
}

.classement-info {
  flex: 1;
  min-width: 0;
}

.classement-name {
  font-weight: 600;
  color: var(--gray-800);
}

.classement-badges-count {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.classement-points {
  text-align: right;
}

.points-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.points-label {
  font-size: 0.625rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   Statistiques des badges
   ============================================ */
.stats-grid {
  display: grid;
  gap: 1rem;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.stat-card-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-card-details h4 {
  font-weight: 600;
  color: var(--gray-800);
}

.stat-card-details p {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.stat-card-count {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.count-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.count-label {
  font-size: 0.625rem;
  color: var(--gray-500);
  text-transform: uppercase;
}

/* ============================================
   Formulaire de demande
   ============================================ */
.demande-form {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.submit-btn {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn.success {
  background: var(--gradient-success);
}

.btn-icon {
  font-size: 1.25rem;
}

.message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  font-weight: 500;
}

.message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.hidden {
  display: none !important;
}

/* ============================================
   Section Admin
   ============================================ */
.admin-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--gray-200);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gray-200);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: var(--transition);
}

.logout-btn:hover {
  background: var(--gray-300);
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.admin-tab {
  flex: 1;
  padding: 0.75rem;
  background: var(--gray-100);
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
}

.admin-tab:hover {
  background: var(--gray-200);
}

.admin-tab.active {
  background: var(--primary);
  color: white;
}

.admin-content {
  display: none;
}

.admin-content.active {
  display: block;
}

/* ============================================
   Liste des demandes
   ============================================ */
.demandes-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.demande-card {
  background: white;
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.demande-card.en_attente {
  border-left: 4px solid var(--warning);
}

.demande-card.validee {
  border-left: 4px solid var(--success);
  opacity: 0.7;
}

.demande-card.refusee {
  border-left: 4px solid var(--danger);
  opacity: 0.7;
}

.demande-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.demande-participant {
  font-weight: 600;
  color: var(--gray-800);
}

.demande-badge-name {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.demande-date {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.demande-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.demande-status.en_attente {
  background: #fef3c7;
  color: #92400e;
}

.demande-status.validee {
  background: #d1fae5;
  color: #065f46;
}

.demande-status.refusee {
  background: #fee2e2;
  color: #991b1b;
}

.demande-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.action-btn {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.action-btn.approve {
  background: var(--success);
  color: white;
}

.action-btn.approve:hover {
  background: var(--success-dark);
}

.action-btn.reject {
  background: var(--danger);
  color: white;
}

.action-btn.reject:hover {
  background: var(--danger-dark);
}

.no-demandes {
  text-align: center;
  padding: 3rem;
  color: var(--gray-500);
}

/* ============================================
   Modal
   ============================================ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.3s ease;
}

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

.modal-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--gray-800);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.cancel-btn {
  flex: 1;
  padding: 0.75rem;
  background: var(--gray-200);
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: var(--transition);
}

.cancel-btn:hover {
  background: var(--gray-300);
}

.modal-actions .submit-btn {
  flex: 1;
  padding: 0.75rem;
}

.error-message {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  left: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--gray-800);
  color: white;
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  pointer-events: auto;
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--danger);
}

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

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

/* ============================================
   Responsive Design
   ============================================ */
@media (min-width: 640px) {
  .nav-tab {
    flex-direction: row;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
  }

  .tab-icon {
    font-size: 1rem;
  }

  .tab-text {
    font-size: 0.875rem;
  }

  .activity-badges {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .demande-form {
    max-width: 500px;
    margin: 0 auto;
  }

  .toast-container {
    left: auto;
    max-width: 400px;
  }
}

@media (min-width: 768px) {
  .main-content {
    padding: 2rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .logo h1 {
    font-size: 1.5rem;
  }

  .classement-list {
    max-width: 600px;
    margin: 0 auto;
  }
}

@media (min-width: 1024px) {
  .badges-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .activity-group {
    height: fit-content;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   Animations supplémentaires
   ============================================ */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.badge-icon:hover {
  animation: pulse 0.5s ease;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* ============================================
   Admin Panel - Gestion des entités
   ============================================ */
.admin-panel {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.panel-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gray-100);
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.item-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.item-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.item-info {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.25rem;
}

.item-details {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.item-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.item-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--gray-200);
  color: var(--gray-700);
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.625rem;
  font-weight: 500;
}

.item-tag.primary {
  background: var(--primary);
  color: white;
}

.item-tag.gold {
  background: var(--gradient-gold);
  color: white;
}

.item-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: 1rem;
  flex-shrink: 0;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-200);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
}

.icon-btn:hover {
  background: var(--gray-300);
}

.icon-btn.edit:hover {
  background: var(--primary);
  color: white;
}

.icon-btn.delete:hover {
  background: var(--danger);
  color: white;
}

/* Textarea */
.custom-textarea {
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
}

/* Delete modal */
.delete-message {
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.submit-btn.danger {
  background: var(--danger);
}

.submit-btn.danger:hover {
  background: var(--danger-dark);
}

/* Admin tabs responsive */
.admin-tabs {
  flex-wrap: wrap;
}

.admin-tab {
  flex: 1 1 auto;
  min-width: 80px;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
}

@media (min-width: 640px) {
  .admin-tab {
    font-size: 0.875rem;
    padding: 0.75rem;
  }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--gray-500);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

/* Badge card in admin */
.badge-admin-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.badge-admin-info {
  flex: 1;
  min-width: 0;
}

.badge-admin-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.badge-admin-name {
  font-weight: 600;
  color: var(--gray-800);
}

.badge-admin-activite {
  background: var(--primary);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.625rem;
  font-weight: 500;
}

.badge-admin-description {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

.badge-admin-points {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--gradient-gold);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Activité card */
.activite-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.activite-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.activite-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.activite-name {
  font-weight: 600;
  color: var(--gray-800);
}

.activite-count {
  font-size: 0.75rem;
  color: var(--gray-500);
}

/* ============================================
   Custom Icons
   ============================================ */
.custom-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
}

.activite-icon .custom-icon {
  width: 40px;
  height: 40px;
}

.badge-icon {
  width: 48px;
  height: 48px;
}

/* File input styling */
.file-input {
  padding: 0.5rem;
  cursor: pointer;
}

.file-input::file-selector-button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  margin-right: 1rem;
  font-weight: 500;
  transition: var(--transition);
}

.file-input::file-selector-button:hover {
  background: var(--primary-dark);
}

/* Icon preview */
.icon-preview {
  margin-top: 0.5rem;
  width: 60px;
  height: 60px;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.icon-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.icon-preview-large {
  width: 80px;
  height: 80px;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.icon-preview-large img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview-placeholder {
  font-size: 0.75rem;
  color: var(--gray-400);
  text-align: center;
}

/* Remove icon button */
.remove-icon-btn {
  background: var(--danger);
  color: white;
  border: none;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.remove-icon-btn:hover {
  background: var(--danger-dark);
}

/* Badge admin card with icon */
.badge-admin-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.badge-admin-icon-container {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: var(--gray-100);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.badge-admin-icon-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.badge-admin-emoji {
  font-size: 1.5rem;
}

.badge-admin-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* Modal large */
.modal-content-large {
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}
