/* ============================================
   IMPORTS - Design System & Components
   ============================================ */

/* Design Tokens - CSS Variables */
@import url('./design-tokens.css');

/* Component System */
@import url('./components/buttons.css');
@import url('./components/cards.css');
@import url('./components/toast.css');
@import url('./components/forms.css');
@import url('./components/modal.css');
@import url('./components/loading.css');
@import url('./components/modern-forms.css');

/* ============================================
   BASE STYLES
   ============================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg-primary, #F9FAFB);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-primary, #F9FAFB);
  color: var(--text-primary, #111827);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  background: #FFFFFF;
  color: #1F2937;
  padding: 1rem 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #E5E7EB;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
}

.nav-brand h1 {
  font-size: 1.5rem;
}

.nav-brand a {
  color: #1F2937;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.server-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-tertiary, #334155);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  border: 1px solid var(--primary-20, rgba(79, 70, 229, 0.2));
  cursor: pointer;
  transition: all 0.2s ease;
}

.server-selector:hover {
  background: var(--bg-hover, #475569);
  border-color: var(--primary-40, rgba(79, 70, 229, 0.4));
  transform: translateY(-1px);
}

.server-selector .server-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.server-selector-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.server-selector .server-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--light);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-change-server {
  background: var(--primary, #4F46E5);
  border: 1px solid var(--primary, #4F46E5);
  color: var(--text-primary, #FFFFFF);
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-change-server:hover {
  background: var(--primary-dark, #4338CA);
  border-color: var(--primary-dark, #4338CA);
  transform: translateY(-1px);
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-links a {
  color: var(--light);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: background 0.3s;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 25px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-large, .btn-discord {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--light);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.btn-secondary {
  background: var(--gray);
  color: var(--light);
}

.btn-secondary:hover {
  background: #7289da;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
}

.btn-discord {
  background: var(--primary);
  color: var(--light);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  font-size: 1.1rem;
}

.btn-discord:hover {
  background: var(--primary-dark);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 0;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--darker);
}

.hero p {
  font-size: 1.3rem;
  color: var(--gray);
  margin-bottom: 2rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.feature-card {
  background: var(--light);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
  color: var(--darker);
}

/* Login Page */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4F46E5 0%, #4338CA 100%);
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

.login-card {
  background: #FFFFFF;
  padding: 3rem;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 450px;
  width: 90%;
  text-align: center;
  position: relative;
  z-index: 1;
  animation: slideUp 0.5s ease-out;
}

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

.login-header h1 {
  font-size: 5rem;
  margin-bottom: 1rem;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.login-header h2 {
  color: #1F2937;
  margin-bottom: 0.5rem;
  font-size: 2rem;
  font-weight: 700;
}

.login-header p {
  color: #6B7280;
  margin-bottom: 2.5rem;
  font-size: 1rem;
  line-height: 1.5;
}

.btn-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #5865F2;
  color: white;
  padding: 1rem 2rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
  width: 100%;
}

.btn-discord:hover {
  background: #4752C4;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.6);
}

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

.btn-discord svg {
  width: 28px;
  height: 28px;
}

.login-footer {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: #9CA3AF;
  padding-top: 1.5rem;
  border-top: 1px solid #E5E7EB;
}

.login-footer a {
  color: #4F46E5;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.login-footer a:hover {
  color: #4338CA;
  text-decoration: underline;
}

/* Dark mode pour login */
body.dark-mode .login-container {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
}

body.dark-mode .login-card {
  background: #1E293B;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

body.dark-mode .login-header h2 {
  color: #F8FAFC;
}

body.dark-mode .login-header p {
  color: #94A3B8;
}

body.dark-mode .login-footer {
  color: #64748B;
  border-top-color: #334155;
}

body.dark-mode .login-footer a {
  color: #818CF8;
}

body.dark-mode .login-footer a:hover {
  color: #A5B4FC;
}

/* Dashboard */
.dashboard {
  display: flex;
  min-height: calc(100vh - 60px);
  width: 100%;
}

.sidebar {
  width: 250px;
  background: var(--bg-secondary, #F9FAFB);
  padding: 2rem 0;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.sidebar-section h3 {
  padding: 0 1.5rem;
  color: var(--text-secondary, #6B7280);
  font-size: 0.9rem;
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-weight: var(--font-weight-semibold, 600);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-primary, #111827);
  text-decoration: none;
  transition: all 0.2s ease;
}

.sidebar-link:hover {
  background: var(--bg-tertiary, #F3F4F6);
}

.sidebar-link.active {
  background: var(--primary, #4F46E5);
  color: var(--text-primary, #FFFFFF);
  border-left: 4px solid var(--primary-dark, #4338CA);
}

.sidebar-link span {
  font-size: 1.3rem;
}

body.dark-mode .sidebar {
  background: var(--bg-primary, #0F172A);
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .sidebar-link {
  color: var(--text-primary, #F8FAFC);
}

body.dark-mode .sidebar-link:hover {
  background: var(--bg-tertiary, #334155);
}

/* Content */
.content {
  flex: 1;
  padding: 0;
  overflow-y: auto;
  width: 100%;
  max-width: 100%;
  background: var(--bg-primary, #F9FAFB);
}

body.dark-mode .content {
  background: var(--bg-primary, #0F172A);
}

.section {
  display: none;
  padding: 2em;
}

.section.active {
  display: block;
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: 2rem;
  color: var(--darker);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--gray);
}

/* Guilds Grid */
.guilds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.guild-card {
  background: var(--light);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.guild-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.guild-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--light);
  flex-shrink: 0;
}

.guild-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.guild-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--darker);
}

.guild-info p {
  color: var(--gray);
  font-size: 0.9rem;
}

/* Tabs Navigation par Catégories */
.tabs-navigation {
  margin: 2rem 0;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.tabs-categories {
  display: flex;
  flex-direction: column;
}

.tab-category {
  border-bottom: 1px solid #E5E7EB;
}

.tab-category:last-child {
  border-bottom: none;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: transparent;
  border-bottom: 1px solid #E5E7EB;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.category-header:hover {
  background: #F9FAFB;
}

.category-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-icon {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  line-height: 1;
  flex-shrink: 0;
}

.category-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
}

.category-chevron {
  font-size: 0.875rem;
  color: #9CA3AF;
  transition: transform 0.3s ease;
  display: inline-block;
  line-height: 1;
}

.tab-category.collapsed .category-chevron {
  transform: rotate(-90deg);
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: transparent;
  max-height: 1000px;
  overflow: hidden;
  opacity: 1;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.3s ease,
              padding 0.3s ease;
}

.tab-category.collapsed .category-tabs {
  max-height: 0;
  opacity: 0;
  padding: 0 1rem;
}

.tab {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #F9FAFB;
  border: 2px solid transparent;
  padding: 1rem 1.25rem;
  cursor: pointer;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  color: #6B7280;
  font-weight: 500;
  text-align: left;
}

.tab-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.tab-label {
  flex: 1;
}

.tab:hover {
  background: #EEF2FF;
  border-color: #C7D2FE;
  color: #4F46E5;
  transform: translateY(-2px);
}

.tab:hover .tab-icon {
  transform: scale(1.15);
}

.tab.active {
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
  border-color: #4F46E5;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.tab.active .tab-icon {
  transform: scale(1.1);
}

.tab.active .tab-label {
  font-weight: 600;
}

.tab.active:hover {
  background: linear-gradient(135deg, #4338CA 0%, #4F46E5 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

/* Stats Cards */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

/* Overview: summary cards */
.stats-header {
  margin-bottom: 1.5rem;
}

.stats-subtitle {
  color: var(--gray);
  margin-top: 0.5rem;
}

.stats-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat-summary-card {
  background: var(--bg-secondary, #FFFFFF);
  border: 1px solid var(--border-color, #E5E7EB);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.04));
}

.stat-summary-icon {
  font-size: 1.4rem;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light, rgba(88,101,242,.1));
  color: var(--primary, #5865F2);
}

.stat-summary-content h4 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--gray);
}

.stat-summary-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--darker);
}

.stat-summary-label {
  font-size: 0.8rem;
  color: var(--gray);
}

/* Overview grid details */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.overview-card {
  background: var(--card-bg, var(--bg-secondary, #fff));
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 14px;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.04));
}

.overview-card.span-2 {
  grid-column: span 2;
}

.overview-title {
  color: var(--gray);
  font-size: .9rem;
}

.overview-value {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 4px;
}

.overview-sub {
  color: var(--gray);
  font-size: .8rem;
  margin-top: 6px;
}

/* Dark mode overrides */
body.dark-mode .stat-summary-card,
body.dark-mode .overview-card {
  background: var(--bg-secondary, #1E293B);
  border-color: var(--border-color, #334155);
}

.stat-card {
  background: var(--light);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.stat-icon {
  font-size: 2.5rem;
}

.stat-info h4 {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--darker);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin: 2rem 0;
  border-bottom: 2px solid var(--gray-light);
}

.tab {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--gray);
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}

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

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

.tab-panel {
  display: none;
  padding: 2rem;
  background: var(--bg-secondary, #FFFFFF);
  border-radius: var(--radius-lg, 0.75rem);
  box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
}

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

body.dark-mode .tab-panel {
  background: var(--bg-secondary, #1E293B);
  box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.3));
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

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

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--gray-light);
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

/* Toggle Switch - Design professionnel et clean */
.toggle {
  display: flex;
  align-items: center;
  gap: var(--spacing-md, 1rem);
  cursor: pointer;
  user-select: none;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  position: relative;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.toggle-label {
  font-weight: var(--font-weight-medium, 500);
  color: var(--text-primary, #111827);
  font-size: var(--text-base, 1rem);
  cursor: pointer;
  order: 2;
}

.toggle-slider,
.toggle .slider {
  position: relative;
  display: inline-block;
  width: 3rem;
  height: 1.75rem;
  background: var(--gray-300, #D1D5DB);
  border-radius: var(--radius-full, 9999px);
  transition: var(--transition-base, all 0.2s ease);
  flex-shrink: 0;
  order: 1;
}

.toggle-slider::after,
.toggle .slider::after {
  content: '';
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--bg-primary, #FFFFFF);
  border-radius: var(--radius-full, 9999px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.12));
}

/* Hover State - Plus doux */
.toggle:hover .toggle-slider,
.toggle:hover .slider {
  background: var(--gray-400, #9CA3AF);
}

/* Checked State */
.toggle input:checked + .toggle-slider,
.toggle input:checked + .slider {
  background: var(--primary, #4F46E5);
}

.toggle input:checked + .toggle-slider::after,
.toggle input:checked + .slider::after {
  transform: translateX(1.25rem);
}

.toggle:hover input:checked + .toggle-slider,
.toggle:hover input:checked + .slider {
  background: var(--primary-dark, #4338CA);
}

/* Animation au focus (accessibilité) */
.toggle:focus-within .toggle-slider,
.toggle:focus-within .slider {
  box-shadow: 0 0 0 3px var(--primary-10, rgba(79, 70, 229, 0.1));
}

/* Dark Mode */
body.dark-mode .toggle-label {
  color: var(--text-primary, #F8FAFC);
}

body.dark-mode .toggle-slider {
  background: var(--bg-tertiary, #334155);
}

body.dark-mode .toggle-slider::after {
  background: var(--bg-primary, #0F172A);
}

/* Checkbox Grid */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

/* Loading */
.loading {
  text-align: center;
  padding: 3rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--gray-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Leaderboard */
.leaderboard-list {
  background: var(--light);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 2rem;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--gray-light);
}

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

.leaderboard-rank {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--gray);
  width: 40px;
}

.leaderboard-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 1rem;
}

.leaderboard-info {
  flex: 1;
}

.leaderboard-value {
  font-weight: bold;
  color: var(--primary);
}

/* Footer */
footer {
  background: var(--darker);
  color: var(--light);
  text-align: center;
  padding: 2rem 0;
  margin-top: 4rem;
}

/* Error Message */
.error-message {
  background: #fee;
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 1rem;
  border-radius: 5px;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .features {
    grid-template-columns: 1fr;
  }
}

/* Configuration Forms */
.config-section {
  background: var(--bg-primary, #FFFFFF);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 100%;
  overflow-x: hidden;
}

.config-section h3 {
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.config-section h4 {
  color: var(--text-primary, #111827);
  margin: 2rem 0 1rem;
  font-size: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color, #E5E7EB);
}

.range-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.range-inputs input {
  flex: 1;
}

.range-inputs span {
  color: var(--gray);
  font-weight: bold;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  min-height: 40px;
  padding: 8px;
  background: var(--gray-light);
  border-radius: 6px;
}

.tag-item {
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.tag-item button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  margin: 0;
}

.rewards-list, .rules-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.reward-item, .rule-item, .level-reward, .autoreply-rule {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  border: 2px solid #e9ecef;
  display: flex;
  gap: 10px;
  align-items: center;
}

.reward-content, .rule-content {
  flex: 1;
}

/* Auto-Reply Categories */
.autoreply-categories {
  margin-bottom: 2rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.category-card {
  background: #FFFFFF;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.3s ease;
}

.category-card:hover {
  border-color: #4F46E5;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
  transform: translateY(-2px);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.category-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.category-info {
  flex: 1;
}

.category-info h5 {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1F2937;
}

.category-info p {
  margin: 0;
  font-size: 0.85rem;
  color: #6B7280;
}

.category-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid #E5E7EB;
}

.example-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #EEF2FF;
  color: #4F46E5;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.custom-rules-section {
  padding-top: 2rem;
  border-top: 2px solid #E5E7EB;
}

/* Auto-Reply Rule Cards - Enhanced */
.autoreply-rule-container {
  display: flex;
  gap: 1.5rem;
  background: #FFFFFF;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.autoreply-rule-container:hover {
  border-color: #4F46E5;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.rule-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rule-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rule-field label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1F2937;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.rule-field input[type="text"],
.rule-field textarea,
.rule-field select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #E5E7EB;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background: #F9FAFB;
}

.rule-field input[type="text"]:focus,
.rule-field textarea:focus,
.rule-field select:focus {
  outline: none;
  border-color: #4F46E5;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.rule-response-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rule-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
  padding-left: 1.5rem;
  border-left: 2px solid #E5E7EB;
}

.rule-actions .toggle {
  margin: 0;
}

.rule-actions .btn-danger {
  white-space: nowrap;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
}

/* Rule Options Inline (Regex & Case Sensitive) */
.rule-options-inline {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.toggle-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  user-select: none;
}

.toggle-inline input[type="checkbox"] {
  display: none;
}

.toggle-slider-inline {
  position: relative;
  width: 36px;
  height: 20px;
  background: #E5E7EB;
  border-radius: 20px;
  transition: background 0.3s ease;
  flex-shrink: 0;
}

.toggle-slider-inline::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-inline input[type="checkbox"]:checked + .toggle-slider-inline {
  background: #4F46E5;
}

.toggle-inline input[type="checkbox"]:checked + .toggle-slider-inline::after {
  transform: translateX(16px);
}

.toggle-label-inline {
  font-size: 0.85rem;
  font-weight: 500;
  color: #6B7280;
  white-space: nowrap;
}

.toggle-inline input[type="checkbox"]:checked ~ .toggle-label-inline {
  color: #4F46E5;
}

.rule-field code {
  background: #F3F4F6;
  color: #4F46E5;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: 'Courier New', monospace;
}

.btn-danger {
  background: var(--danger);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.btn-danger:hover {
  background: #C93437;
  transform: translateY(-2px);
}

#embed-options {
  background: var(--gray-light);
  padding: 15px;
  border-radius: 8px;
  margin-top: 10px;
}

/* Animations pour notifications */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Commands Section */
#commands-container {
  margin-top: 20px;
}

.command-category {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.command-category h3 {
  color: var(--primary);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
}

.commands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}

/* Résumé des commandes */
.commands-summary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

.commands-summary p {
  margin: 0;
  font-size: 1.1rem;
}

/* Header de catégorie */
.command-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 30px 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary);
}

.command-category-header:first-of-type {
  margin-top: 0;
}

.command-category-header h3 {
  margin: 0;
  color: var(--dark);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.command-count {
  background: var(--primary);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Container de catégorie */
.command-category-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

/* Catégories de commandes */
.command-category {
  margin-bottom: 2.5rem;
}

.category-header-cmd {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
  border-radius: 12px;
  margin-bottom: 1rem;
  border-left: 4px solid #4F46E5;
}

.category-icon-cmd {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.category-info-cmd {
  flex: 1;
}

.category-title-cmd {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1F2937;
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
}

.category-description-cmd {
  font-size: 0.875rem;
  color: #6B7280;
  margin: 0;
  line-height: 1.4;
}

.category-count-cmd {
  font-size: 0.875rem;
  font-weight: 600;
  color: #4F46E5;
  background: #EEF2FF;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  white-space: nowrap;
}

/* Grid des commandes */
.commands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

/* Carte de commande */
.command-card {
  background: #FFFFFF;
  border: 2px solid #E5E7EB;
  border-radius: 10px;
  padding: 1.25rem;
  transition: all 0.3s ease;
  cursor: default;
}

.command-card:hover {
  border-color: #4F46E5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.command-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.command-name {
  font-weight: 700;
  color: #4F46E5;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-family: 'Courier New', monospace;
}

.command-description {
  color: #6B7280;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Résultats de recherche */
.search-results-header {
  padding: 1.5rem;
  background: #F9FAFB;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  border-left: 4px solid #10B981;
}

.search-results-header h3 {
  font-size: 1.1rem;
  color: #1F2937;
  margin: 0 0 0.5rem 0;
}

.search-results-header p {
  font-size: 0.875rem;
  color: #6B7280;
  margin: 0;
}

.command-usage {
  background: var(--darker);
  color: var(--light);
  padding: 6px 10px;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  display: inline-block;
}

/* Sous-commandes et paramètres */
.command-subcommands {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-light);
}

.command-subcommands strong {
  color: var(--dark);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 8px;
}

.command-subcommands ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.command-subcommands li {
  margin-bottom: 6px;
  padding: 6px 10px;
  background: white;
  border-radius: 6px;
  border-left: 3px solid var(--primary);
}

.command-subcommands code {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.command-subcommands .sub-desc {
  color: var(--gray);
  font-size: 0.85rem;
  display: block;
  margin-top: 4px;
}

.command-params {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-light);
}

.command-params strong {
  color: var(--dark);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 8px;
}

.param-tag {
  display: inline-block;
  background: var(--gray-light);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-right: 6px;
  margin-bottom: 6px;
}

.param-required {
  color: #E74C3C;
  font-weight: 600;
  margin-left: 4px;
}

.param-optional {
  color: var(--gray);
  font-weight: 500;
  margin-left: 4px;
}

.commands-loading {
  text-align: center;
  padding: 40px;
  color: var(--gray);
}

.command-card.hidden {
  display: none;
}

/* Commands Config Section */
.command-config-item {
  background: white;
  border: 2px solid var(--gray-light);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.command-config-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.1);
}

.command-config-item.disabled {
  opacity: 0.6;
  background: var(--gray-light);
}

.command-config-info {
  flex: 1;
}

.command-config-name {
  font-weight: bold;
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.command-config-description {
  color: var(--gray);
  font-size: 0.9rem;
}

.command-config-category {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  margin-top: 6px;
}

.command-config-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

.command-config-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.command-config-toggle label {
  font-size: 0.9rem;
  color: var(--gray);
}

/* Settings Section */
.settings-container {
  max-width: 900px;
  margin: 0 auto;
}

.settings-card {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.settings-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(88, 101, 242, 0.1);
}

.settings-card h3 {
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-card .card-description {
  margin: 0 0 20px 0;
  color: var(--gray);
  font-size: 0.9rem;
}

.settings-card p {
  margin: 8px 0;
  color: var(--gray);
}

.settings-card strong {
  color: var(--dark);
}

/* Toggle Row pour les paramètres */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  background: var(--gray-light);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-row:hover {
  background: var(--bg-hover, #F3F4F6);
}

body.dark-mode .toggle-row:hover {
  background: var(--bg-hover, #374151);
}

.toggle-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.toggle-title {
  font-weight: 600;
  color: var(--dark);
  font-size: 1rem;
}

.toggle-desc {
  font-size: 0.85rem;
  color: var(--gray);
}

/* Info Grid pour les informations du bot */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px;
  background: var(--gray-light);
  border-radius: 8px;
}

.info-label {
  font-size: 0.85rem;
  color: var(--gray);
  font-weight: 500;
}

.info-value {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--primary);
}

/* Actions pour les paramètres */
.settings-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

.settings-actions button {
  min-width: 200px;
}

/* Bot Stats Grid */
.bot-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.stat-item {
  background: var(--gray-light);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 8px;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
}

/* Button Group */
.button-group {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.button-group button {
  flex: 1;
  min-width: 200px;
}

/* Form Text Helper */
.form-text {
  display: block;
  margin-top: 5px;
  font-size: 0.85rem;
  color: var(--gray);
}

/* Global Config List */
.global-config-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.global-config-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  background: white;
  border: 2px solid var(--gray-light);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.global-config-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.15);
  transform: translateY(-2px);
}

.global-config-item .config-icon {
  font-size: 2.5rem;
  min-width: 50px;
  text-align: center;
}

.global-config-item .config-info {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  flex: 1;
}

.global-config-item .config-info > div {
  flex: 1;
}

.global-config-item .config-name {
  font-weight: bold;
  color: var(--dark);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.global-config-item .config-desc {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.global-config-item .config-details {
  font-size: 0.85rem;
  margin-top: 6px;
}

.global-config-item .config-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.config-status {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.config-status.active {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.config-status.inactive {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 6px;
}

.config-subtitle {
  color: var(--gray);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.config-subtitle strong {
  color: var(--primary);
}

/* Config Details Grid */
.config-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.config-detail-card {
  background: var(--gray-light);
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid var(--primary);
}

.config-detail-card h4 {
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 1.1rem;
}

.config-detail-card p {
  margin: 8px 0;
  font-size: 0.9rem;
  color: var(--gray);
}

.config-detail-card strong {
  color: var(--dark);
}

.config-detail-card span {
  color: var(--darker);
  font-weight: 500;
}

.config-detail-card .btn-secondary {
  margin-top: 12px;
  display: inline-block;
}

/* Activity List */
.activity-list {
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  padding: 12px;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  align-items: center;
  gap: 12px;
}

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

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

.activity-content {
  flex: 1;
}

.activity-title {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 2px;
}

.activity-desc {
  font-size: 0.85rem;
  color: var(--gray);
}

.activity-time {
  font-size: 0.75rem;
  color: var(--gray);
  white-space: nowrap;
}

/* Responsive pour les tabs */
@media (max-width: 768px) {
  .navbar .container {
    flex-wrap: wrap;
    gap: 10px;
  }

  .nav-center {
    width: 100%;
    order: 3;
    margin-top: 10px;
  }

  .server-selector {
    width: 100%;
    justify-content: space-between;
  }

  .server-selector .server-name {
    max-width: 150px;
  }

  .tabs {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  
  .tab {
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
  }
  
  .config-section {
    padding: 1rem;
  }

  .commands-grid {
    grid-template-columns: 1fr;
  }

  .settings-card {
    padding: 15px;
  }
}

/* ===== NOTIFICATIONS ===== */
.notification-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  pointer-events: none;
}

.notification {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  transform: translateX(500px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: all;
  border-left: 4px solid;
  min-width: 300px;
  max-width: 400px;
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.notification-message {
  flex: 1;
  color: var(--dark);
  font-size: 0.95rem;
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  color: var(--gray);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  flex-shrink: 0;
}

.notification-close:hover {
  background: var(--gray-light);
  color: var(--dark);
}

/* Types de notifications */
.notification-success {
  border-left-color: var(--secondary);
  background: #f0fdf4;
}

.notification-success .notification-icon {
  color: var(--secondary);
}

.notification-error {
  border-left-color: var(--danger);
  background: #fef2f2;
}

.notification-error .notification-icon {
  color: var(--danger);
}

.notification-warning {
  border-left-color: var(--warning);
  background: #fefce8;
}

.notification-warning .notification-icon {
  color: #ca8a04;
}

.notification-info {
  border-left-color: var(--primary);
  background: #eff6ff;
}

.notification-info .notification-icon {
  color: var(--primary);
}

.notification-loading {
  border-left-color: var(--gray);
  background: white;
}

.notification-loading .notification-icon {
  animation: spin 1s linear infinite;
  color: var(--primary);
}

/* Responsive pour notifications */
@media (max-width: 768px) {
  .notification-container {
    top: 70px;
    right: 10px;
    left: 10px;
    max-width: 100%;
  }

  .notification {
    min-width: auto;
    max-width: 100%;
  }
}

/* ===== ANIMATIONS AMÉLIORÉES ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

/* ===== SEARCH BAR ===== */
.search-bar {
  margin: 20px 0;
}

.search-bar .form-control {
  padding: 12px 16px;
  font-size: 1rem;
  border-radius: 25px;
  border: 2px solid var(--gray-light);
  background: white;
  transition: all 0.3s;
}

.search-bar .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.1);
}

.search-bar .form-control::placeholder {
  color: var(--gray);
}

/* ===== MEMBERS LIST ===== */
.members-list {
  background: white;
  border-radius: 12px;
  padding: 10px;
  max-height: 600px;
  overflow-y: auto;
}

.members-list .leaderboard-item {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: background 0.2s;
}

.members-list .leaderboard-item:hover {
  background: var(--gray-light);
}

.members-list .leaderboard-item:last-child {
  margin-bottom: 0;
}

/* ===== SCROLLBAR CUSTOM ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--gray-light);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--gray);
  border-radius: 10px;
  transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ===== BACK BUTTON ===== */
.back-button {
  margin-bottom: 20px;
}

.back-button button {
  background: white;
  border: 2px solid var(--gray-light);
  color: var(--dark);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-button button:hover {
  background: var(--gray-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(-4px);
}

/* ===== UTILITY CLASSES ===== */
.text-muted {
  color: var(--gray);
}

.text-primary {
  color: var(--primary);
}

.text-danger {
  color: var(--danger);
}

.text-success {
  color: var(--secondary);
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-none {
  display: none !important;
}

.d-block {
  display: block !important;
}

.d-flex {
  display: flex !important;
}

.flex-column {
  flex-direction: column;
}

.align-items-center {
  align-items: center;
}

.justify-content-center {
  justify-content: center;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* Modal System */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-container {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  z-index: 9999;
}

.modal-header {
  padding: 20px 25px;
  border-bottom: 2px solid var(--gray-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: var(--primary);
  font-size: 1.3rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--gray-light);
  color: var(--danger);
}

.modal-body {
  padding: 25px;
}

.modal-footer {
  padding: 20px 25px;
  border-top: 2px solid var(--gray-light);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Spinner pour le modal */
.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 15px;
  border: 4px solid var(--gray-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================================ */
/* DARK MODE */
/* ============================================================================ */
body.dark-mode {
  background: var(--bg-primary, #0F172A);
  color: var(--text-primary, #F8FAFC);
}

body.dark-mode .navbar {
  background: #1E293B !important;
  color: #F8FAFC !important;
  border-bottom-color: #334155 !important;
}

body.dark-mode .navbar .container {
  background: transparent !important;
}

body.dark-mode .nav-brand a {
  color: #F8FAFC !important;
}

body.dark-mode .nav-links {
  color: #F8FAFC !important;
}

body.dark-mode .nav-links .user-info {
  color: #F8FAFC !important;
}

body.dark-mode .server-selector {
  background: #334155 !important;
  border-color: rgba(79, 70, 229, 0.3) !important;
}

body.dark-mode .server-selector:hover {
  background: #475569 !important;
  border-color: rgba(79, 70, 229, 0.5) !important;
}

body.dark-mode .server-selector .server-name {
  color: #F8FAFC !important;
}

body.dark-mode .btn-change-server {
  background: #4F46E5 !important;
  color: #FFFFFF !important;
  border: none !important;
}

body.dark-mode .btn-change-server:hover {
  background: #4338CA !important;
}

body.dark-mode .dashboard {
  background: var(--bg-primary, #0F172A);
}

body.dark-mode .sidebar {
  background: #2f3136;
  border-right-color: #202225;
}

body.dark-mode .sidebar-link {
  color: #b9bbbe;
}

body.dark-mode .sidebar-link:hover {
  background: #393c43;
  color: #fff;
}

body.dark-mode .sidebar-link.active {
  background: #5865F2;
  color: #fff;
}

body.dark-mode .main-content {
  background: #36393f;
}

body.dark-mode .section-header {
  border-bottom-color: #202225;
}

body.dark-mode .section-header h2 {
  color: #fff;
}

body.dark-mode .section-header p {
  color: #b9bbbe;
}

body.dark-mode .settings-card,
body.dark-mode .guild-card,
/* Catégories de commandes - Mode sombre */
body.dark-mode .category-header-cmd {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  border-left-color: #6366F1;
}

body.dark-mode .category-title-cmd {
  color: #F8FAFC;
}

body.dark-mode .category-description-cmd {
  color: #94A3B8;
}

body.dark-mode .category-count-cmd {
  color: #A5B4FC;
  background: rgba(99, 102, 241, 0.2);
}

body.dark-mode .command-card {
  background: #1E293B;
  border-color: #334155;
}

body.dark-mode .command-card:hover {
  border-color: #6366F1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

body.dark-mode .command-name {
  color: #A5B4FC;
}

body.dark-mode .command-description {
  color: #94A3B8;
}

body.dark-mode .search-results-header {
  background: #1E293B;
  border-left-color: #10B981;
}

body.dark-mode .search-results-header h3 {
  color: #F8FAFC;
}

body.dark-mode .search-results-header p {
  color: #94A3B8;
}

body.dark-mode .settings-card h3,
body.dark-mode .guild-card h3 {
  color: #fff;
}

body.dark-mode .command-category-header h3 {
  color: #fff;
}

body.dark-mode .command-category-header {
  border-bottom-color: #5865F2;
}

body.dark-mode .commands-summary {
  background: linear-gradient(135deg, #4752C4 0%, #3c45a3 100%);
}

body.dark-mode .form-group label {
  color: #b9bbbe;
}

body.dark-mode input[type="text"],
body.dark-mode input[type="number"],
body.dark-mode input[type="url"],
body.dark-mode textarea,
body.dark-mode select {
  background: #202225;
  border-color: #40444b;
  color: #dcddde;
}

body.dark-mode input[type="text"]:focus,
body.dark-mode input[type="number"]:focus,
body.dark-mode input[type="url"]:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
  border-color: #5865F2;
  background: #292b2f;
}

body.dark-mode .help-text {
  color: #72767d;
}

body.dark-mode .tab {
  color: #b9bbbe;
}

body.dark-mode .tab:hover {
  background: #393c43;
  color: #fff;
}

body.dark-mode .tab.active {
  background: #5865F2;
  color: #fff;
  border-bottom-color: #5865F2;
}

body.dark-mode .stat-item {
  background: #202225;
}

body.dark-mode .stat-label {
  color: #b9bbbe;
}

body.dark-mode .stat-value {
  color: #fff;
}

/* Cartes de statistiques (stats.js module) */
body.dark-mode .stat-card {
  background: #2f3136;
  border-color: #202225;
}

body.dark-mode .stat-card h3 {
  color: #fff;
}

body.dark-mode .stat-card p {
  color: #b9bbbe;
}

body.dark-mode .stat-card .stat-number {
  color: #fff;
}

/* Graphiques en mode sombre */
body.dark-mode .chart-container {
  background: #2f3136;
  border-color: #202225;
}

body.dark-mode #stats-period-select {
  background: #40444b;
  color: #fff;
  border-color: #202225;
}

/* Override TOUS les backgrounds blancs en mode sombre */
body.dark-mode .tab-panel,
body.dark-mode .config-section,
body.dark-mode .form-section,
body.dark-mode .panel,
body.dark-mode .container,
body.dark-mode .box,
body.dark-mode .card-body,
body.dark-mode .level-reward-item,
body.dark-mode .level-reward,
body.dark-mode .rule-item,
body.dark-mode .auto-reply-rule,
body.dark-mode .autoreply-rule,
body.dark-mode .reward-item,
body.dark-mode .channel-item,
body.dark-mode .role-item,
body.dark-mode .member-item,
body.dark-mode .command-item {
  background: var(--bg-primary, #0F172A) !important;
  border-color: var(--border-color, #334155) !important;
}

/* Labels et textes en mode sombre */
body.dark-mode .config-section label,
body.dark-mode .form-section label,
body.dark-mode .level-reward-item label,
body.dark-mode .level-reward label,
body.dark-mode .reward-item label,
body.dark-mode .rule-item label,
body.dark-mode .autoreply-rule label,
body.dark-mode p,
body.dark-mode span,
body.dark-mode li {
  color: #dcddde !important;
}

body.dark-mode .guild-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(88, 101, 242, 0.3);
}

body.dark-mode .modal-content {
  background: #36393f;
}

body.dark-mode .modal-header {
  border-bottom-color: #202225;
}

body.dark-mode .modal-header h3 {
  color: #fff;
}

body.dark-mode .modal-footer {
  border-top-color: #202225;
}

/* Éléments spécifiques */
body.dark-mode .stat-item,
body.dark-mode .info-item {
  background: #2f3136 !important;
  color: #dcddde !important;
}

body.dark-mode .stat-item strong,
body.dark-mode .info-item strong {
  color: #ffffff !important;
}

/* Tous les boutons en mode sombre */
body.dark-mode button,
body.dark-mode .btn,
body.dark-mode .button {
  background: #5865f2 !important;
  color: white !important;
  border-color: #5865f2 !important;
}

body.dark-mode button:hover,
body.dark-mode .btn:hover,
body.dark-mode .button:hover {
  background: #4752c4 !important;
}

body.dark-mode button.danger,
body.dark-mode .btn-danger {
  background: #ed4245 !important;
  border-color: #ed4245 !important;
}

body.dark-mode button.secondary,
body.dark-mode .btn-secondary {
  background: #4f545c !important;
  border-color: #4f545c !important;
}

/* Selects et dropdowns */
body.dark-mode select,
body.dark-mode .select-wrapper select {
  background: #2f3136 !important;
  color: #dcddde !important;
  border-color: #202225 !important;
}

body.dark-mode option {
  background: #2f3136 !important;
  color: #dcddde !important;
}

/* Tableaux */
body.dark-mode table {
  background: #2f3136 !important;
  color: #dcddde !important;
}

body.dark-mode table th {
  background: #202225 !important;
  color: #ffffff !important;
  border-bottom-color: #40444b !important;
}

body.dark-mode table td {
  border-bottom-color: #40444b !important;
  color: #dcddde !important;
}

body.dark-mode table tr:hover {
  background: #36393f !important;
}

/* Textarea */
body.dark-mode textarea {
  background: #2f3136 !important;
  color: #dcddde !important;
  border-color: #202225 !important;
}

body.dark-mode textarea::placeholder {
  color: #72767d !important;
}

/* Checkboxes et radios */
body.dark-mode .checkbox-wrapper,
body.dark-mode .radio-wrapper {
  background: transparent !important;
}

body.dark-mode .checkbox-label,
body.dark-mode .radio-label {
  color: #dcddde !important;
}

/* Badges et tags */
body.dark-mode .badge,
body.dark-mode .tag {
  background: #5865f2 !important;
  color: white !important;
}

body.dark-mode .badge.success {
  background: #3ba55d !important;
}

body.dark-mode .badge.warning {
  background: #faa61a !important;
}

body.dark-mode .badge.danger {
  background: #ed4245 !important;
}

/* Tabs en mode sombre - Navigation par Catégories */
body.dark-mode .tabs-navigation {
  background: #1E293B;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .tab-category {
  border-bottom-color: #334155;
}

body.dark-mode .category-header {
  background: transparent;
  border-bottom-color: #334155;
}

body.dark-mode .category-header:hover {
  background: rgba(30, 41, 59, 0.5);
}

body.dark-mode .category-title {
  color: #E2E8F0;
}

body.dark-mode .category-chevron {
  color: #64748B;
}

body.dark-mode .category-tabs {
  background: transparent;
}

body.dark-mode .tab {
  background: #0F172A;
  color: #94A3B8;
  border-color: transparent;
}

body.dark-mode .tab:hover {
  background: #312E81;
  border-color: #4F46E5;
  color: #A5B4FC;
}

body.dark-mode .tab.active {
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
  color: #FFFFFF;
  border-color: #4F46E5;
}

body.dark-mode .tab.active:hover {
  background: linear-gradient(135deg, #4338CA 0%, #4F46E5 100%);
}

/* Headers de section */
body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4, 
body.dark-mode h5, 
body.dark-mode h6 {
  color: #ffffff !important;
}

body.dark-mode .section-title {
  color: #ffffff !important;
  border-bottom-color: #40444b !important;
}

/* Liens */
body.dark-mode a:not(.nav-link):not(.sidebar-link) {
  color: #00b0f4 !important;
}

body.dark-mode a:not(.nav-link):not(.sidebar-link):hover {
  color: #00c8ff !important;
}

/* Code et pre */
body.dark-mode code,
body.dark-mode pre {
  background: #202225 !important;
  color: #dcddde !important;
  border-color: #40444b !important;
}

/* Alerts et notifications */
body.dark-mode .alert,
body.dark-mode .notification {
  background: #2f3136 !important;
  color: #dcddde !important;
  border-color: #40444b !important;
}

body.dark-mode .alert-success {
  border-left-color: #3ba55d !important;
}

body.dark-mode .alert-warning {
  border-left-color: #faa61a !important;
}

body.dark-mode .alert-danger {
  border-left-color: #ed4245 !important;
}

body.dark-mode .alert-info {
  border-left-color: #00b0f4 !important;
}

/* Auto-Reply Categories - Dark Mode */
body.dark-mode .category-card {
  background: #1E293B;
  border-color: #334155;
}

body.dark-mode .category-card:hover {
  border-color: #4F46E5;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

body.dark-mode .category-info h5 {
  color: #F8FAFC;
}

body.dark-mode .category-info p {
  color: #94A3B8;
}

body.dark-mode .category-examples {
  border-top-color: #334155;
}

body.dark-mode .example-badge {
  background: #312E81;
  color: #A5B4FC;
}

body.dark-mode .custom-rules-section {
  border-top-color: #334155;
}

body.dark-mode .autoreply-rule-container {
  background: #1E293B;
  border-color: #334155;
}

body.dark-mode .autoreply-rule-container:hover {
  border-color: #4F46E5;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

body.dark-mode .rule-field label {
  color: #F8FAFC;
}

body.dark-mode .rule-field input[type="text"],
body.dark-mode .rule-field textarea,
body.dark-mode .rule-field select {
  background: #0F172A;
  border-color: #334155;
  color: #F8FAFC;
}

body.dark-mode .rule-field input[type="text"]:focus,
body.dark-mode .rule-field textarea:focus,
body.dark-mode .rule-field select:focus {
  background: #1E293B;
  border-color: #4F46E5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

body.dark-mode .rule-field small {
  color: #94A3B8 !important;
}

body.dark-mode .rule-actions {
  border-left-color: #334155;
}

body.dark-mode .toggle-slider-inline {
  background: #334155;
}

body.dark-mode .toggle-slider-inline::after {
  background: #F8FAFC;
}

body.dark-mode .toggle-inline input[type="checkbox"]:checked + .toggle-slider-inline {
  background: #4F46E5;
}

body.dark-mode .toggle-label-inline {
  color: #94A3B8;
}

body.dark-mode .toggle-inline input[type="checkbox"]:checked ~ .toggle-label-inline {
  color: #818CF8;
}

body.dark-mode .rule-field code {
  background: #0F172A;
  color: #818CF8;
}

/* Scrollbars pour navigateurs webkit */
body.dark-mode ::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

body.dark-mode ::-webkit-scrollbar-track {
  background: #2f3136;
}

body.dark-mode ::-webkit-scrollbar-thumb {
  background: #202225;
  border-radius: 6px;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
  background: #36393f;
}

/* Dividers */
body.dark-mode hr {
  border-color: #40444b !important;
}

/* Pagination */
body.dark-mode .pagination {
  background: transparent !important;
}

body.dark-mode .pagination button,
body.dark-mode .pagination a {
  background: #2f3136 !important;
  color: #dcddde !important;
  border-color: #40444b !important;
}

body.dark-mode .pagination button.active,
body.dark-mode .pagination a.active {
  background: #5865f2 !important;
  color: white !important;
}

/* Loader / Spinner */
body.dark-mode .loader,
body.dark-mode .spinner {
  border-color: #40444b !important;
  border-top-color: #5865f2 !important;
}

/* Empty states */
body.dark-mode .empty-state {
  color: #72767d !important;
}

body.dark-mode .empty-state-icon {
  color: #4f545c !important;
}

/* Tooltips */
body.dark-mode .tooltip {
  background: #18191c !important;
  color: #dcddde !important;
}

/* ============================================================================ */
/* COMPACT MODE */
/* ============================================================================ */
body.compact-mode .settings-card {
  padding: 15px;
}

body.compact-mode .form-group {
  margin-bottom: 12px;
}

body.compact-mode input[type="text"],
body.compact-mode input[type="number"],
body.compact-mode input[type="url"],
body.compact-mode textarea,
body.compact-mode select {
  padding: 8px 12px;
  font-size: 13px;
}

body.compact-mode .btn-primary,
body.compact-mode .btn-secondary,
body.compact-mode .btn-danger {
  padding: 8px 16px;
  font-size: 13px;
}

body.compact-mode .tab {
  padding: 10px 16px;
  font-size: 13px;
}

body.compact-mode .section-header h2 {
  font-size: 22px;
}

body.compact-mode .section-header p {
  font-size: 13px;
}

body.compact-mode .sidebar-link {
  padding: 10px 15px;
  font-size: 13px;
}

body.compact-mode .guild-card {
  padding: 15px;
}

body.compact-mode .stat-item {
  padding: 12px;
}

body.compact-mode .command-card {
  padding: 12px;
}

body.compact-mode .command-category-header {
  margin: 20px 0 10px 0;
}

body.compact-mode .command-category-header h3 {
  font-size: 1.2rem;
}

body.compact-mode .commands-summary {
  padding: 15px;
  margin-bottom: 20px;
}

body.compact-mode .commands-summary p {
  font-size: 1rem;
}

body.compact-mode .command-category-container {
  gap: 12px;
}

/* ============================================================================ */
/* STATISTIQUES AVANCÉES */
/* ============================================================================ */
.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--primary, #4F46E5);
}

.stats-header h3 {
  margin: 0;
  color: var(--text-primary, #111827);
  font-size: 1.6rem;
  font-weight: var(--font-weight-bold, 700);
}

.stats-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Cartes de résumé des stats */
.stats-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
  padding: 0;
}

.stat-summary-card {
  background: linear-gradient(135deg, var(--primary, #4F46E5) 0%, var(--primary-dark, #4338CA) 100%);
  border-radius: var(--radius-lg, 0.75rem);
  padding: 2rem;
  color: white;
  box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-summary-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-2xl, 0 25px 50px -12px rgba(0, 0, 0, 0.25));
}

.stat-summary-icon {
  font-size: 3rem;
  background: rgba(255, 255, 255, 0.25);
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  flex-shrink: 0;
}

.stat-summary-content {
  flex: 1;
}

.stat-summary-content h4 {
  margin: 0 0 8px 0;
  font-size: 1rem;
  opacity: 0.95;
  font-weight: 500;
}

.stat-summary-value {
  margin: 0;
  font-size: 2.5rem;
  font-weight: bold;
}

.stat-summary-label {
  font-size: 0.85rem;
  opacity: 0.85;
  font-weight: 400;
}

/* Graphiques */
.stats-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 30px;
  padding: 0;
  margin-top: 2rem;
}

.chart-container {
  background: var(--bg-secondary, #FFFFFF);
  border-radius: var(--radius-lg, 0.75rem);
  padding: 2rem;
  box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
  border: 1px solid var(--border-color, #E5E7EB);
}

.chart-container h4 {
  color: var(--text-primary, #111827);
  font-size: 1.1rem;
  font-weight: var(--font-weight-semibold, 600);
  margin-bottom: 1.5rem;
}

body.dark-mode .chart-container {
  background: var(--bg-tertiary, #334155);
  border-color: var(--border-color, #475569);
}

body.dark-mode .chart-container h4 {
  color: var(--text-primary, #F8FAFC);
}

.chart-container h4 {
  margin: 0 0 20px 0;
  color: var(--dark);
  font-size: 1.1rem;
}

.chart-container canvas {
  max-height: 300px;
}

/* Dark mode pour les stats */
body.dark-mode .stats-header h3 {
  color: #fff;
}

body.dark-mode .stats-header {
  border-bottom-color: #5865F2;
}

body.dark-mode .chart-container {
  background: #2f3136;
}

body.dark-mode .chart-container h4 {
  color: #fff;
}

/* Compact mode pour les stats */
body.compact-mode .stats-summary-cards {
  gap: 15px;
}

body.compact-mode .stat-summary-card {
  padding: 15px;
}

body.compact-mode .stat-summary-icon {
  width: 50px;
  height: 50px;
  font-size: 2rem;
}

body.compact-mode .stat-summary-value {
  font-size: 1.6rem;
}

body.compact-mode .stats-charts {
  gap: 20px;
}

body.compact-mode .chart-container {
  padding: 20px;
}

/* ============================================================================ */
/* GESTION DES COMMANDES */
/* ============================================================================ */

.commands-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.commands-categories {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.command-category {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.category-header {
  margin-bottom: 0;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.category-header h4 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: #2c2f33;
}

.category-description {
  color: #72767d;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.category-toggle {
  margin-top: 12px;
}

.commands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}

.command-item {
  background: #f8f9fa;
  border: 2px solid #e3e5e8;
  border-radius: 8px;
  padding: 15px;
  transition: all 0.2s ease;
}

.command-item:hover {
  border-color: #5865f2;
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.1);
}

.command-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.command-info {
  flex: 1;
}

.command-info strong {
  color: #5865f2;
  font-size: 1rem;
  font-family: 'Courier New', monospace;
}

.command-description {
  color: #72767d;
  font-size: 0.85rem;
  margin-top: 5px;
  line-height: 1.4;
}

/* Toggle switch pour les commandes */
.command-toggle,
.category-toggle-all {
  position: relative;
  cursor: pointer;
}

/* Mode sombre pour les commandes */
body.dark-mode .command-category {
  background: #2f3136;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .category-header {
  border-bottom-color: #40444b;
}

body.dark-mode .category-header h4 {
  color: #ffffff;
}

body.dark-mode .category-description {
  color: #b9bbbe;
}

body.dark-mode .command-item {
  background: #36393f;
  border-color: #202225;
}

body.dark-mode .command-item:hover {
  border-color: #5865f2;
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.2);
}

body.dark-mode .command-info strong {
  color: #00b0f4;
}

body.dark-mode .command-description {
  color: #b9bbbe;
}

/* Responsive */
@media (max-width: 768px) {
  .commands-grid {
    grid-template-columns: 1fr;
  }
  
  .commands-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .commands-controls .search-bar {
    width: 100% !important;
    min-width: 100% !important;
  }
}

