/* Variables CSS */
:root {
  --primary-color: #3498db;
  --primary-dark: #2980b9;
  --secondary-color: #2c3e50;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --info-color: #16a085;
  --light-bg: #f8f9fa;
  --text-color: #ffffff;
  --text-light: #6c757d;
  --border-color: #dee2e6;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  background-color: #1c2a3a;
  line-height: 1.6;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
}

/* Header & Navigation */
.main-header {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #34495e 100%);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  padding: 1rem 0;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
}

.logo i {
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-menu a {
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.nav-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--primary-color);
}

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

.cart-icon {
  position: relative;
  color: white;
  font-size: 1.3rem;
  padding: 0.5rem;
}

.cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--danger-color);
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: bold;
}

.wheel-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: var(--danger-color);
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: bold;
  min-width: 20px;
  text-align: center;
}

.wheel-notif-badge {
  display: inline-block;
  margin-left: 2px;
  position: relative;
  top: 2px;
  background-color: var(--danger-color);
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: bold;
  min-width: 18px;
  text-align: center;
}

.support-notif-badge {
  position: absolute;
  top: 50%;
  right: -15px;
  transform: translateY(-50%);
  background-color: var(--danger-color);
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: bold;
  min-width: 18px;
  text-align: center;
}

.notif-badge {
  position: absolute;
  top: 50%;
  right: -15px;
  transform: translateY(-50%);
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: bold;
  min-width: 18px;
  text-align: center;
  animation: notif-pulse 2s infinite;
}

@keyframes notif-pulse {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.1); }
}

.user-menu {
  position: relative;
}

.user-button {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  box-shadow: var(--shadow-lg);
  border-radius: 8px;
  min-width: 200px;
  margin-top: 10px;
  overflow: hidden;
}

.user-menu.open .user-dropdown {
  display: block;
}

.user-dropdown a {
  display: block;
  padding: 0.75rem 1rem;
  color: #2a373f;
  transition: background 0.3s ease;
}

.user-dropdown a:hover {
  background-color: var(--light-bg);
  color: var(--primary-color);
}

.user-dropdown hr {
  margin: 0;
  border: none;
  border-top: 1px solid var(--border-color);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  font-weight: 500;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

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

.btn-secondary:hover {
  background-color: #5a6268;
}

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

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

.btn-danger:hover {
  background-color: #c0392b;
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
}

.btn-block {
  display: block;
  width: 100%;
}

/* Hero Section */
/* Fortune Wheel - Style Guizishop Amélioré */
.fortune-wheel {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 8px solid #1f2937;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.4), 0 0 50px rgba(99, 102, 241, 0.3), var(--shadow-lg);
  position: relative;
  background: conic-gradient(
    rgb(234, 234, 58) 0deg 60deg,
    rgb(250, 87, 87) 60deg 120deg,
    rgb(58, 58, 254) 120deg 180deg,
    rgb(52, 236, 52) 180deg 240deg,
    rgb(244, 184, 73) 240deg 300deg,
    rgb(196, 75, 196) 300deg 360deg
  );
  transition: transform 0.1s linear;
}
@keyframes wheel-spin {
  0% { 
    transform: rotate(0deg);
  }
  80% { 
    transform: rotate(1440deg);
  }
  85% { 
    transform: rotate(1410deg);
  }
  90% { 
    transform: rotate(1430deg);
  }
  95% { 
    transform: rotate(1420deg);
  }
  100% { 
    transform: rotate(1420deg);
  }
}
.wheel-pointer {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 22px solid var(--primary-color);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  z-index: 10;
  animation: pointer-pulse 0.5s ease-in-out;
}
@keyframes pointer-pulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.1); }
}
.fortune-wheel .wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffffff, #d1d5db);
  border: 4px solid #374151;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.3), 0 0 15px rgba(99, 102, 241, 0.4);
  z-index: 5;
}
.hero-section {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.hero-description {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.85;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Stats Section */
.stats-section {
  padding: 3rem 0;
  background: #2c3e50;
}

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

.stat-card {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

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

.stat-card i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  opacity: 0.9;
}

/* Categories Section */
.categories-section,
.featured-section,
.latest-section {
  padding: 3rem 0;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  color: white;
}

.section-title i {
  color: var(--primary-color);
}

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

.category-card {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  color: var(--primary-color);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.category-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.category-card p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Products Grid */
.products-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(1, 1fr);
}

.product-card {
  background: linear-gradient(135deg, #2d4559 0%, #3e5c7a 100%);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  color: white;
}

.product-card:hover {
  box-shadow: 0 8px 24px rgba(62, 92, 122, 0.5);
  transform: translateY(-5px);
}

/* Adapter les textes pour le thème sombre */
.product-card .product-category {
  color: rgba(255, 255, 255, 0.75);
}

.product-card .product-name {
  color: white;
}

.product-card .product-description {
  color: rgba(255, 255, 255, 0.85);
}

.product-card .product-stock {
  color: rgba(255, 255, 255, 0.85);
}

.product-card .product-badge {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
}

.product-card .product-payments {
  color: rgba(255, 255, 255, 0.9);
}

.product-card .product-payments ul {
  color: rgba(255, 255, 255, 0.9) !important;
}

@media (min-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .product-card {
    min-width: 0;
  }
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.product-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--light-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Horizontal Category Navigation */
.category-nav {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  overflow: visible;
}

.category-nav .menu {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
}

.category-nav .menu-item {
  position: relative;
  flex: 0 0 auto;
}

.category-nav .menu-link,
.category-nav .menu-parent,
.category-nav .submenu a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  color: #e6eaf0;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 600;
}

.category-nav .menu-link:hover,
.category-nav .menu-parent:hover,
.category-nav .submenu a:hover {
  background-color: var(--light-bg);
  color: var(--primary-color);
}

.category-nav .menu-link.active,
.category-nav .submenu a.active {
  background-color: transparent;
  color: var(--primary-color);
}

.category-nav .submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  display: none;
  min-width: 220px;
  padding: 0.5rem 0;
  z-index: 2000;
}

.category-nav .submenu ul {
  list-style: none;
}

.category-nav .submenu li {
  position: relative;
}

.category-nav .menu-item:hover > .submenu,
.category-nav .menu-item:focus-within > .submenu,
.category-nav .submenu li:hover > .submenu,
.category-nav .submenu li:focus-within > .submenu {
  display: block;
}

/* Keep submenu open via JS-added class */
.category-nav .menu-item.open > .submenu,
.category-nav .submenu li.open > .submenu {
  display: block;
}

.category-nav .submenu .submenu {
  top: 0;
  left: 100%;
}

@media (max-width: 600px) {
  .category-nav {
    overflow-x: auto;
  }
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image.no-image {
  color: var(--text-light);
  font-size: 3rem;
}

.product-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: bold;
  color: white;
}

.product-badge.featured {
  background-color: var(--warning-color);
}

.product-badge.out-of-stock {
  background-color: var(--danger-color);
}

.product-badge.low-stock {
  background-color: var(--warning-color);
}

.product-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-category {
  color: var(--text-light);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-name {
  font-size: 1.2rem;
  margin: 0.5rem 0;
  color: var(--secondary-color);
}

.product-description {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  white-space: pre-line; /* préserver les retours à la ligne */
}
.product-card[data-desc] {
  cursor: pointer;
}
.product-card[data-desc]:active {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.click-hint {
  margin-top: 6px;
  color: var(--primary-color);
  font-size: 0.85rem;
}
.product-modal-desc {
  white-space: pre-line;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.product-price {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--primary-color);
}

.product-stock {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Aligner les boutons "Ajouter au panier" en bas des cartes */
.product-info > .add-to-cart-form,
.product-info > .btn-block,
.product-info > form.add-to-cart-form {
  margin-top: auto;
}

/* Infobulle description produits */
.tooltip {
  position: fixed;
  z-index: 3000;
  background: #fff;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  border-radius: 8px;
  padding: 10px 12px;
  max-width: 360px;
  font-size: 0.95rem;
  line-height: 1.5;
  pointer-events: none;
}

/* Shop Layout */
.shop-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
  padding: 2rem 0;
}

.shop-sidebar {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  height: fit-content;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-section h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.search-form {
  display: flex;
  gap: 0.5rem;
}

.category-list {
  list-style: none;
}
.category-list ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.category-list li {
  margin-bottom: 0.5rem;
}

.category-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.75rem;
  border-radius: 5px;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.category-list a:hover,
.category-list a.active {
  background-color: var(--light-bg);
  color: var(--primary-color);
}

/* Horizontal Category Nav */
.category-nav {
  background: var(--secondary-color);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
}
.category-nav .menu {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
}
.category-nav .menu-item {
  position: relative;
}
.category-nav .menu-link,
.category-nav .menu-parent {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--text-color);
  font-weight: 600;
}
.category-nav .menu-link:hover,
.category-nav .menu-parent:hover {
  background: var(--light-bg);
  color: var(--primary-color);
}
.category-nav .menu-link.active {
  background: rgba(52, 152, 219, 0.12);
  color: var(--primary-color);
}
.category-nav .submenu {
  position: absolute;
  left: 0;
  top: 100%;
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 220px;
  display: none;
  z-index: 2000;
}
.category-nav .menu-item:hover > .submenu {
  display: block;
}
.category-nav .submenu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.category-nav .submenu li {
  position: relative;
}
.category-nav .submenu a,
.category-nav .submenu .menu-parent {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--text-color);
  white-space: nowrap;
}
.category-nav .submenu a:hover,
.category-nav .submenu .menu-parent:hover {
  background: var(--light-bg);
  color: var(--primary-color);
}
.category-nav .submenu .submenu {
  left: 100%;
  top: 0;
}

/* Shop Layout: full width when no sidebar */
.shop-layout.no-sidebar {
  grid-template-columns: 1fr;
}

/* Collapsible category tree */
.category-list .cat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.category-list .cat-toggle {
  background: none;
  border: none;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--text-light);
  cursor: pointer;
}
.category-list .cat-toggle:hover {
  background-color: var(--light-bg);
  color: var(--primary-color);
}
.category-list li.has-children > .children {
  display: none;
  margin-left: 14px;
  padding-left: 10px;
  list-style: none;
}
.category-list li.has-children:hover > .children {
  display: block;
}
.category-list li.open > .children {
  display: block;
}
.category-list .toggle-icon {
  transition: transform 0.2s ease;
}
.category-list li:not(.open) > .cat-row .toggle-icon {
  transform: rotate(-90deg);
}
.category-list li.has-children:hover > .cat-row .toggle-icon {
  transform: rotate(0deg);
}

/* Anchor inside row: compact, pill look */
.category-list .cat-row a {
  flex: 1;
  padding: 6px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
.category-list .cat-row .cat-label {
  flex: 1;
  padding: 6px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  color: var(--text-color);
  cursor: default;
}
.category-list .cat-row:hover {
  background-color: #f9fafb;
}
.category-list .cat-row a:hover {
  background-color: var(--light-bg);
  color: var(--primary-color);
}
.category-list .cat-row a.active {
  background: linear-gradient(
    90deg,
    rgba(52, 152, 219, 0.12) 0%,
    rgba(52, 152, 219, 0.06) 100%
  );
  color: var(--primary-color);
  box-shadow: inset 2px 0 0 0 var(--primary-color);
}
.category-list .cat-row .cat-label.active {
  background: linear-gradient(
    90deg,
    rgba(52, 152, 219, 0.12) 0%,
    rgba(52, 152, 219, 0.06) 100%
  );
  color: var(--primary-color);
  box-shadow: inset 2px 0 0 0 var(--primary-color);
}

.category-list .count-badge {
  margin-left: 8px;
  background: #1f2a37;
  color: #cbd5e1;
  border: 1px solid #334155;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1.6;
}

.category-list .toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
/* (placeholder bullet supprimé) */
.category-list .toolbar .mini-btn {
  font-size: 12px;
  background: #f1f5f9;
  color: #445;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
}
.category-list .toolbar .mini-btn:hover {
  background: #e8eef6;
  color: var(--primary-color);
}

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

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

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

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Alerts */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 5px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Auth Container */
.auth-container {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.auth-wrapper {
  max-width: 450px;
  width: 100%;
}

.auth-box {
  background: white;
  padding: 2.5rem;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
}

/* Variante sombre pour les cartes d'authentification */
.auth-box.auth-dark {
  background: #2d4559;
  color: #f3f7fb;
}
.auth-box.auth-dark h2 {
  color: #ffffff;
}
.auth-box.auth-dark .auth-switch,
.auth-box.auth-dark label {
  color: #e6eef6;
}

.auth-box h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--secondary-color);
}

.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-light);
}

.auth-switch a {
  color: var(--primary-color);
  font-weight: bold;
}

/* Cart */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
  padding: 2rem 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr 150px 180px 150px 50px; /* + colonne paiement */
  gap: 1.5rem;
  align-items: center;
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.cart-item-image {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--light-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-image.no-image {
  color: var(--text-light);
  font-size: 2rem;
}

.cart-item-info h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: #2c3e50;
}

.cart-item-price {
  color: #6c757d;
}

.cart-item-payment label {
  font-weight: 600;
  color: #2c3e50;
}

.cart-item-payment .form-control {
  min-width: 160px;
}

.cart-item-payment small {
  color: #6c757d;
}

.cart-item-quantity label {
  color: #2c3e50;
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}

.cart-item-subtotal {
  text-align: right;
}

.cart-item-subtotal .subtotal-label {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.cart-item-subtotal .subtotal-amount {
  color: #2c3e50;
  font-weight: 600;
  font-size: 1.1rem;
}

.cart-summary {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  height: fit-content;
}

.cart-summary h3 {
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  color: #2c3e50;
}

.summary-line.total {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--primary-color);
  border-bottom: none;
  margin-top: 1rem;
}

.summary-items {
  color: #2c3e50;
}

/* Badges (admin/payment) */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
}
.badge-success {
  background: #27ae60;
  color: #fff;
}
.badge-warning {
  background: #f39c12;
  color: #fff;
}
.badge-danger {
  background: #e74c3c;
  color: #fff;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.empty-state i {
  font-size: 5rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.empty-state p {
  color: var(--text-light);
  margin-bottom: 2rem;
}

/* Footer */
.main-footer {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #34495e 100%);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

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

.footer-section h3,
.footer-section h4 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-section a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.2rem;
}

.social-links a:hover {
  background: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 2000;
}
.modal.open {
  display: block;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.modal-content {
  position: relative;
  max-width: 600px;
  margin: 10vh auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  color: #2c3e50;
}
.modal-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--light-bg);
  color: #2c3e50;
}
.modal-header h3 {
  color: #2c3e50;
}
.modal-body {
  padding: 1.5rem;
  color: #2c3e50;
}
.modal-body * {
  color: #2c3e50;
}
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  color: #2c3e50;
}
.product-modal-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* Lightbox image plein écran */
#image-lightbox.modal {
  display: none;
}
#image-lightbox.modal.open {
  display: block;
}
#image-lightbox .modal-content {
  max-width: unset;
  width: auto;
  background: transparent;
  box-shadow: none;
  margin: 0 auto; /* occupe tout le viewport */
  height: 100vh; /* pour permettre le scroll interne */
}
#image-lightbox .modal-header {
  position: fixed;
  top: 16px;
  right: 16px;
}
#image-lightbox .modal-body {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%; /* remplir le conteneur pour le scroll */
  overflow: auto; /* scroll vertical et horizontal si nécessaire */
  -ms-touch-action: pan-y;
  touch-action: pan-y;
  overscroll-behavior: contain;
}
.image-lightbox-img {
  max-width: 92vw;
  max-height: none; /* autoriser hauteur > viewport pour scroll */
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}
.tutorial-list {
  padding-left: 1.25rem;
  margin: 0.5rem 0 1rem;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
}

/* Page Header */
.page-header {
  padding: 2rem 0;
  margin-bottom: 2rem;
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
  color: white;
}

/* Notifications Banner */
.notifications-banner {
  margin-bottom: 2rem;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #2d4559 0%, #3e5c7a 100%);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  border-left: 4px solid var(--primary-color);
  animation: notification-slide-in 0.3s ease-out;
}

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

.notification-item.notification-order_status {
  border-left-color: var(--primary-color);
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-icon i {
  color: white;
  font-size: 1.1rem;
}

.notification-content {
  flex: 1;
}

.notification-content strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: white;
}

.notification-content p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  margin: 0;
}

.notification-time {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
}

/* Orders */
.order-card {
  background: white;
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  overflow: hidden;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: var(--light-bg);
  border-bottom: 1px solid var(--border-color);
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #2d4559 0%, #3e5c7a 100%);
  color: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.empty-state i {
  font-size: 5rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
}
.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #fff;
}
.empty-state p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2rem;
}
.status-ready {
  background-color: #eadcf7; /* violet clair */
  color: #5e2a86; /* violet foncé */
}

.status-completed {
  background-color: #d4edda;
  color: #155724;
}

.status-cancelled {
  background-color: #f8d7da;
  color: #721c24;
}

.order-details,
.order-items,
.order-footer {
  padding: 1.5rem;
}

.order-player,
.order-handler,
.order-notes {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 6px;
  background-color: var(--light-bg);
}

.order-handler {
  background-color: #e3f2fd;
  border-left: 3px solid #2196f3;
}

.order-handler i {
  color: #2196f3;
  margin-right: 0.5rem;
}

.order-items-table {
  width: 100%;
  border-collapse: collapse;
}

.order-items-table th,
.order-items-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.order-items-table th {
  background-color: var(--light-bg);
  font-weight: 600;
}

.order-footer {
  background: var(--light-bg);
  border-top: 1px solid var(--border-color);
}

.order-total {
  text-align: right;
}

.total-amount {
  font-size: 1.5rem;
  color: var(--primary-color);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 0.5rem 0.75rem;
  background: var(--secondary-color);
  color: white;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.2s ease;
  min-width: 38px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover:not(.disabled):not(.active) {
  background: var(--primary-color);
  transform: translateY(-1px);
}

.pagination-btn.active {
  background: var(--primary-color);
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.4);
}

.pagination-btn.disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
}

.pagination-info {
  color: rgba(255, 255, 255, 0.7);
  margin-left: 1rem;
  font-size: 0.9rem;
}

/* Utilities */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-light);
}

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

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

/* Responsive */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .stats-grid,
  .categories-grid,
  .products-grid {
    grid-template-columns: 1fr;
  }

  .shop-layout {
    grid-template-columns: 1fr;
  }

  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-item {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* Feedback slider */
.feedback-slider { position: relative; display: flex; align-items: center; gap: 12px; }
.feedback-slider .slider-btn { background: var(--primary-color); color: #fff; border: none; border-radius: 50%; width: 36px; height: 36px; display:flex;align-items:center;justify-content:center; cursor: pointer; box-shadow: var(--shadow); }
.feedback-slider .slider-btn:disabled { opacity: .5; cursor: default; }
.feedback-slider .slider-viewport { overflow: hidden; flex: 1; }
.feedback-slider .slider-track { display: flex; gap: 12px; transition: transform .35s ease; will-change: transform; }
.feedback-slider .slider-item { flex: 0 0 auto; width: calc((100% - 24px) / 3); }
.feedback-card { background: linear-gradient(135deg, #2d4559 0%, #3e5c7a 100%); border-radius: 10px; padding: 16px; box-shadow: var(--shadow); color: white; min-height: 140px; }
.feedback-stars { font-size: 1.1rem; margin-bottom: 6px; }
.feedback-comment { margin: 6px 0 8px; color: rgba(255,255,255,0.9); font-style: italic; }
.feedback-meta { font-size: .9rem; color: rgba(255,255,255,0.8); }

@media (max-width: 992px) {
  .feedback-slider .slider-item { width: calc((100% - 12px) / 2); }
}
@media (max-width: 600px) {
  .feedback-slider .slider-item { width: 100%; }
}

/* --- Boutique: Modale produit en thème sombre + scroll interne --- */
#product-modal .modal-content {
  background: linear-gradient(135deg, #2d4559 0%, #3e5c7a 100%);
  color: #fff;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
#product-modal .modal-header {
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}
#product-modal .modal-header h3 { color: #fff; }
#product-modal .modal-body {
  color: #fff;
  overflow-y: auto;
}
#product-modal .modal-body * { color: #fff; }
.product-modal-desc {
  max-height: 50vh; /* scroll interne pour longues descriptions */
  overflow-y: auto;
}
/* Indication de scroll (optionnel) */
.product-modal-desc::-webkit-scrollbar { width: 8px; }
.product-modal-desc::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 8px; }
.product-modal-desc::-webkit-scrollbar-track { background: rgba(255,255,255,0.1); }

/* Bloquer le scroll de la page quand une modale est ouverte */
body.modal-open { overflow: hidden; }

/* --- Panier: appliquer le même thème sombre --- */
.cart-item {
  background: linear-gradient(135deg, #2d4559 0%, #3e5c7a 100%);
  color: #fff;
}
.cart-item-info h3,
.cart-item-price,
.cart-item-payment label,
.cart-item-quantity label,
.cart-item-subtotal .subtotal-label,
.cart-item-subtotal .subtotal-amount { color: #fff; }
.cart-summary {
  background: linear-gradient(135deg, #2d4559 0%, #3e5c7a 100%);
  color: #fff;
}
.cart-summary h3,
.summary-line,
.summary-items { color: #fff; }
.summary-line { border-bottom-color: rgba(255,255,255,0.2); }

/* Les inputs dans le panier restent lisibles */
.cart-item .form-control,
.cart-summary .form-control {
  background: rgba(255,255,255,0.9);
  color: #2c3e50;
}

/* --- Mes commandes: appliquer le même thème sombre aux cartes --- */
.order-card {
  background: linear-gradient(135deg, #2d4559 0%, #3e5c7a 100%);
  color: #fff;
}
.order-header,
.order-footer {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.order-items-table th,
.order-items-table td { color: #fff; border-bottom-color: rgba(255,255,255,0.15); }
.order-items-table th { background: rgba(255,255,255,0.08); }
.order-date { color: rgba(255,255,255,0.85); }
.total-amount { color: #fff; }

/* --- Harmonisation supplémentaire (recherche boutique + profil) --- */
/* Boutique: bloc de recherche + catégories en sombre */
.category-nav {
  background: linear-gradient(135deg, #2d4559 0%, #3e5c7a 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #fff;
}
.category-nav .search-form .form-control {
  background: rgba(255, 255, 255, 0.95);
  color: #2c3e50;
}
.category-nav .search-form .btn {
  box-shadow: var(--shadow);
}
/* Pills: passer en sombre avec contraste blanc */
.category-nav .menu-link,
.category-nav .menu-parent,
.category-nav .submenu a {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff !important;
}
.category-nav .menu-link:hover,
.category-nav .menu-parent:hover,
.category-nav .submenu a:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff !important;
}
.category-nav .menu-link.active,
.category-nav .submenu a.active {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #fff !important;
}
.category-nav .submenu {
  background: linear-gradient(135deg, #2d4559 0%, #3e5c7a 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Profil: cartes en sombre, champs lisibles */
.profile-section {
  background: linear-gradient(135deg, #2d4559 0%, #3e5c7a 100%) !important;
  color: #fff !important;
}
.profile-section label,
.profile-section .form-group label {
  color: rgba(255, 255, 255, 0.92) !important;
}
.profile-section .form-group label i { color: rgba(255,255,255,0.92) !important; }
.profile-section h2,
.profile-section dl dt,
.profile-section dl dd,
.profile-section .order-date { color: #fff !important; }
.profile-section .form-control {
  background: rgba(255, 255, 255, 0.95);
  color: #2c3e50;
}
.profile-section .form-control::placeholder { color: #4b5563; }
.profile-section .badge { filter: saturate(1.1); }

/* Active catégorie: bleu pour meilleure distinction */
.category-nav .menu-link.active,
.category-nav .submenu a.active {
  background: var(--primary-color) !important;
  color: #fff !important;
  border-color: transparent !important;
}

/* Boutons d'information dans le contenu */
.info-btn {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  margin: 0.25rem 0.25rem 0.25rem 0;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white !important;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid transparent;
}

.info-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
  background: var(--primary-dark);
}

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

.info-btn i {
  margin-right: 0.5rem;
}
