/* Variables globales pour le thème */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #FCDEE2;
  --bg-tertiary: #fff5f7;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --accent-primary: #B84867;
  --accent-secondary: #ff97b1;
  --border-color: #ffd6e0;
  --shadow: rgba(255, 192, 203, 0.15);
  --navbar-bg: #FCDEE2;
  --card-bg: #ffffff;
}

/* Thème sombre */
[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-tertiary: #3a3a3a;
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --text-tertiary: #808080;
  --accent-primary: #ff8ba7;
  --accent-secondary: #ffaec2;
  --border-color: #4a4a4a;
  --shadow: rgba(0, 0, 0, 0.3);
  --navbar-bg: rgba(26, 26, 26, 0.95);
  --card-bg: #2d2d2d;
}

/* Bouton de basculement du thème */
.theme-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border: 3px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  box-shadow: 0 4px 20px var(--shadow);
  transition: all 0.3s ease;
  z-index: 9999;
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 6px 30px var(--shadow);
}

.theme-toggle:active {
  transform: scale(0.95);
}

/* Animation de transition du thème */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* Appliquer les variables aux éléments principaux */
.navbar {
  background: var(--navbar-bg) !important;
  border-bottom-color: var(--border-color) !important;
}

.navbar-menu a {
  color: var(--text-primary) !important;
}

.footer {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

.product-card,
.cart-summary,
.admin-card {
  background: var(--card-bg) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

input, textarea, select {
  background: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

/* Icônes du bouton thème */
.theme-toggle .fa-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .fa-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .fa-moon {
  display: block;
}
