:root {
  --primary-color: #0a2342;
  --accent-color: #f4c430;
  --background-color: #f9f9f9;
  --text-color: #333;
  --border-color: #e0e0e0;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
}

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

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  padding-bottom: 120px; /* Espace pour la nav mobile */
}

/* Navigation */
.navbar {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1a365d 100%) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.main-content {
  margin-top: 120px; /* Espace pour navbar + alert */
  min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1a365d 100%);
  border-radius: 20px !important;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1a365d 100%);
}

/* Cards */
.product-card {
  transition: all 0.3s ease;
  border: none;
  border-radius: 15px;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.product-card .card-img-top {
  transition: transform 0.3s ease;
}

.product-card:hover .card-img-top {
  transform: scale(1.05);
}

/* Badges */
.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 20px;
}

/* Buttons */
.btn {
  border-radius: 10px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1a365d 100%);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1a365d 0%, var(--primary-color) 100%);
  transform: translateY(-2px);
}

.btn-warning {
  background: linear-gradient(135deg, var(--accent-color) 0%, #e6b800 100%);
  border: none;
  color: var(--primary-color);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #e6b800 0%, var(--accent-color) 100%);
  transform: translateY(-2px);
}

/* Navigation mobile */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--border-color);
  padding: 0.5rem 0;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-color);
  padding: 0.5rem;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--primary-color);
  background-color: rgba(10, 35, 66, 0.1);
}

.mobile-nav-link i {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.mobile-nav-link span {
  font-size: 0.75rem;
  font-weight: 500;
}

/* Barre de recherche fixe */
.search-bar-fixed {
  position: fixed;
  bottom: 70px;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--border-color);
  padding: 0.75rem 0;
  z-index: 999;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

@media (min-width: 992px) {
  .search-bar-fixed {
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 1rem 0;
  }

  body {
    padding-bottom: 0;
  }

  .main-content {
    margin-top: 100px;
  }
}

/* Forms */
.form-control {
  border-radius: 10px;
  border: 2px solid var(--border-color);
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(10, 35, 66, 0.25);
}

.form-control-lg {
  padding: 1rem 1.25rem;
  font-size: 1.1rem;
}

/* Alerts */
.alert {
  border-radius: 15px;
  border: none;
  padding: 1rem 1.5rem;
}

.alert-warning {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  color: #856404;
}

.alert-info {
  background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
  color: #0c5460;
}

.alert-success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
}

.alert-danger {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
}

/* Price styling */
.price-section {
  font-size: 1.1rem;
}

.price-section .text-decoration-line-through {
  font-size: 0.9rem;
}

/* Seller info */
.seller-info img {
  border: 2px solid white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Loading states */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1a365d;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-section {
    padding: 2rem !important;
    text-align: center;
  }

  .hero-section .display-4 {
    font-size: 2rem;
  }

  .product-card {
    margin-bottom: 1rem;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #1a1a1a;
    --text-color: #ffffff;
    --border-color: #333333;
  }

  .card {
    background-color: #2d2d2d;
    border-color: var(--border-color);
  }

  .mobile-nav {
    background-color: #2d2d2d;
    border-color: var(--border-color);
  }

  .search-bar-fixed {
    background-color: #2d2d2d;
    border-color: var(--border-color);
  }
}

/* Print styles */
@media print {
  .navbar,
  .mobile-nav,
  .search-bar-fixed,
  .btn {
    display: none !important;
  }

  .main-content {
    margin-top: 0;
  }

  body {
    padding-bottom: 0;
  }
}
/* dark mode support */
@media (prefers-color-scheme: dark) {
  body, .bg-white, .card, .modal-content {
    background-color: #181818 !important;
    color: #f1f1f1 !important;
  }
  .card, .modal-content {
    border-color: #333 !important;
  }
  .btn, .btn-primary, .btn-secondary {
    color: #fff !important;
    background-color: #333 !important;
    border-color: #444 !important;
  }
  .form-control, input, textarea, select {
    background-color: #222 !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
  }
  .navbar, .navbar-light, .navbar.bg-white {
    background-color: #222 !important;
    color: #f1f1f1 !important;
  }
  .text-dark, .text-black {
    color: #f1f1f1 !important;
  }
  .bg-light, .bg-white {
    background-color: #181818 !important;
  }
  /* Ajoute d'autres classes selon tes besoins */
   a, .link, .nav-link {
    color: #8ab4f8 !important;
  }
  a:hover, .nav-link:hover {
    color: #b3d4fc !important;
  }
  .text-muted, .text-secondary {
    color: #b0b0b0 !important;
  }
  .text-primary {
    color: #8ab4f8 !important;
  }
  .text-warning {
    color: #ffe082 !important;
  }
  .text-success {
    color: #81c784 !important;
  }
  .text-danger {
    color: #ff8a80 !important;
  }
  .bg-light, .bg-white {
    background-color: #181818 !important;
  }
  .btn-light {
    background-color: #333 !important;
    color: #fff !important;
    border-color: #444 !important;
  }
  .btn-outline-primary {
    color: #8ab4f8 !important;
    border-color: #8ab4f8 !important;
  }
  .btn-outline-primary:hover {
    background-color: #8ab4f8 !important;
    color: #181818 !important;
  }
  .badge.bg-danger {
    background-color: #b71c1c !important;
    color: #fff !important;
  }
  .badge.bg-success {
    background-color: #388e3c !important;
    color: #fff !important;
  }
  .badge.bg-info {
    background-color: #1976d2 !important;
    color: #fff !important;
  }
}