/* =========================================
   GLOBAL / BASE
========================================= */

body {
  font-family: 'Open Sans', sans-serif;
  background-color: #1A1F2B;
  color: #F4F4F4;
}

h1, h2, h3, .navbar-brand, .card-title {
  font-family: 'Oswald', sans-serif;
  color: #D4AF37;
}

/* =========================================
   TYPO & TEXT UTILITIES
========================================= */

.neon-text {
  font-size: 4rem;
  color: #fff;
  text-shadow: 0 0 5px #ff005e, 0 0 10px #ff005e, 0 0 20px #ff005e, 0 0 40px #ff005e, 0 0 80px #ff005e;
  animation: glow 1.5s infinite alternate;
}

@keyframes glow {
  0% {
    text-shadow: 0 0 5px #ff005e, 0 0 10px #ff005e, 0 0 20px #ff005e, 0 0 40px #ff005e, 0 0 80px #ff005e;
  }
  100% {
    text-shadow: 0 0 10px #00d4ff, 0 0 20px #00d4ff, 0 0 40px #00d4ff, 0 0 80px #00d4ff, 0 0 160px #00d4ff;
  }
}

.text-muted {
  color: #A0A0A0 !important;
}

.text-primary {
  color: #58A5FF !important;
}

.text-danger {
  color: #ff6f61 !important;
}

.text-success {
  color: #4CAF50 !important;
}

.text-warning {
  color: #FFD700 !important;
}

/* =========================================
   CARDS & LISTS
========================================= */

.card {
  background-color: #2A2F3D;
  border: 1px solid #7E8A97;
  color: #F4F4F4;
  cursor: pointer;
  transition: 0.2s;
  min-width: 250px;
  margin-right: 1rem;
}

.card:hover {
  transform: scale(1.05);
}

.card-img-top {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 10px;
}

.selected {
  border: 2px solid #D4AF37 !important;
  background: #333a4d !important;
}

.quantity-controls {
  display: none;
  margin-top: 10px;
  justify-content: center;
  align-items: center;
}

.cart {
  margin-top: 30px;
  padding: 15px;
  border: 1px solid #7E8A97;
  border-radius: 5px;
  background: #2A2F3D;
}

/* =========================================
   BADGES (TOP/BOTTOM, STOCK, HIGHLIGHTS)
========================================= */

.badge-top-left,
.badge-bottom-left,
.badge-bottom-right,
.stock-badge {
  position: absolute;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 5px;
}

.badge-top-left {
  top: 10px;
  left: 10px;
}

.stock-badge {
  top: 10px;
  right: 10px;
}

.badge-bottom-left {
  bottom: 10px;
  left: 10px;
}

.badge-bottom-right {
  bottom: 10px;
  right: 10px;
}

/* Types de badges produits */
.cheapest {
  background: #58A5FF;
  color: white;
}

.best-value {
  background: #D4AF37;
  color: #1A1F2B;
}

.best-product {
  background: #ff6f61;
  color: white;
}

/* Stock */
.in-stock {
  background-color: #4caf50;
  color: white;
}

.low-stock {
  background-color: #ff9800;
  color: white;
  animation: pulse 1.5s infinite;
}

.out-of-stock {
  background-color: #f44336;
  color: white;
}

/* =========================================
   ANIMATIONS GLOBALES
========================================= */

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* =========================================
   BUTTONS
========================================= */

.btn-primary {
  background-color: #D4AF37;
  color: #1A1F2B;
  border: none;
}

.btn-primary:hover {
  background-color: #b38e2e;
  color: #fff;
}

.btn-secondary {
  background-color: #58A5FF;
  color: white;
}

.btn-secondary:hover {
  background-color: #3f8dd4;
}

.btn-outline-primary {
  color: #58A5FF;
  border-color: #58A5FF;
}

.btn-outline-primary:hover {
  background-color: #58A5FF;
  color: white;
}

.btn-success {
  background-color: #D4AF37;
  border: none;
  color: #1A1F2B;
}

.btn-success:hover {
  background-color: #b38e2e;
  color: white;
}

.btn-close {
  color: white;
  background-color: white;
}

/* Bouton commander spécial */

.btn-commander {
  background: linear-gradient(135deg, #ff4d4d, #ff9900);
  color: white;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 1.2rem;
  padding: 15px 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: pulse 1.5s infinite;
}

.btn-commander:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
  background: linear-gradient(135deg, #ff6600, #ff1a1a);
}

/* =========================================
   NAVBAR & SEARCH
========================================= */

.navbar {
  background-color: #1A1F2B;
}

.navbar-toggler {
  background-color: #D4AF37;
  border: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='black' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Barre de recherche dans la navbar */

.navbar-search {
  opacity: 0;
  transform: translateY(-10px);
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Quand la navbar a la classe 'scrolled', la barre de recherche s'affiche */
.navbar.scrolled .navbar-search {
  display: flex !important;
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  margin-left: 1rem;
}

.input-group-text {
  background-color: #ffc107;
  border: none;
  color: #000;
}

.searchInput {
  border: 2px solid #ffc107;
  background-color: #fffbe6;
}

/* =========================================
   HERO HEADER
========================================= */

.hero-header {
  position: relative;
  background-color: #000; /* reste identique */
  color: white;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  overflow: hidden;
}

/* L'image remplace l'ancien background-image */
.hero-lcp-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;        /* = background-size: cover */
  object-position: center;  /* = background-position: center */
  z-index: 0;
}

/* Ombre overlay */
.hero-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

/* Le contenu doit être au-dessus : */
.hero-header h1,
.hero-header p,
.hero-header a {
  position: relative;
  z-index: 2;
}


/* Responsive size adjustment */
@media (max-width: 768px) {
  .hero-header {
    background-size: 90%;
  }
}

@media (max-width: 480px) {
  .hero-header {
    background-size: 120%;
  }
}

/* =========================================
   HORIZONTAL SCROLL / CATEGORY SECTIONS
========================================= */

.horizontal-scroll {
  display: flex;
  overflow-x: auto;
  padding: 1rem;
  scroll-padding-left: 1rem;
  scroll-padding-right: 1rem;
  gap: 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.horizontal-scroll > .card {
  flex: 0 0 auto;
  transition: transform 0.2s;
  scroll-snap-align: start;
  min-width: 240px;
  max-width: 80vw;
}

.horizontal-scroll > .card:hover {
  transform: scale(1.05);
  z-index: 10;
}

.category-section {
  overflow: hidden;
  padding: 1rem 0;
  position: relative;
}

.category-section .horizontal-scroll {
  overflow-x: auto;
  overflow-y: visible;
  position: relative;
  padding-top: 1rem;
  padding-bottom: 2rem;
  margin: 0;
}

/* Dégradés de bord pour masquer le débordement visuel au hover */
.category-section::before,
.category-section::after {
  content: "";
  position: absolute;
  top: 3rem;
  bottom: 0;
  width: 1rem;
  z-index: 5;
  pointer-events: none;
}

.category-section::after {
  right: 0;
  background: linear-gradient(to left, #1A1F2B 0%, transparent 100%);
}

.category-section::before {
  left: 0;
  background: linear-gradient(to right, #1A1F2B 0%, transparent 100%);
}

/* =========================================
   FLOATING CART BUTTON
========================================= */

#floating-cart-button {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: 90%;
  max-width: 420px;
  display: none;
  cursor: pointer;

  background-color: #D4AF37;
  color: #1A1F2B;
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;

  border-radius: 50px;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);

  /* Dans ta version actuelle, la dernière règle garde cette transition uniquement */
  transition: opacity 0.3s ease;
}

#floating-cart-button:hover {
  background-color: #b38e2e;
  transform: translateX(-50%) scale(1.03);
  color: white;
}

#floating-cart-button > div {
  flex: 1;
  text-align: center;
}

.cart-icon {
  font-size: 1.5rem;
  animation: cartIdle 3s infinite;
}

/* Animation idle (petit rebond) */
@keyframes cartIdle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* Animation de vibration quand ajout produit */
.cart-icon.vibrate {
  animation: cartVibrate 0.4s;
}

@keyframes cartVibrate {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(10deg); }
  50% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
  100% { transform: rotate(0deg); }
}

/* Version mobile : bouton plus compact */
@media (max-width: 600px) {
  #floating-cart-button {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
  }
  .cart-icon {
    font-size: 1.3rem;
  }
}

/* Ligne prix (par ex. dans le bouton) */
.price-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

/* =========================================
   CART DETAILS & ITEMS LIST
========================================= */

#cart {
  background-color: #2A2F3D;
  border: 1px solid #7E8A97;
  border-radius: 8px;
  color: #F4F4F4;
}

#cart h3 {
  font-family: 'Oswald', sans-serif;
  color: #D4AF37;
}

/* Version simple (list-group) conservée via styles plus précis ici */
#cart-items li {
  background-color: #333a4d;
  border: 1px solid #7E8A97;
  margin-bottom: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

#cart-items .btn {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
}

/* Nouvelle structure cart-item-row */

#cart-items .cart-item-row {
  background-color: #333a4d;
  border: 1px solid #7E8A97;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;

  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

#cart-items .item-info {
  display: flex;
  flex-direction: column;
  flex: 1 1 60%;
}

#cart-items .item-name {
  font-weight: 600;
  font-size: 0.95rem;
}

#cart-items .item-subtotal {
  font-size: 0.9rem;
}

#cart-items .item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 40%;
}

@media (max-width: 576px) {
  #cart-items .cart-item-row {
    flex-direction: column;
    align-items: flex-start;
  }

  #cart-items .item-actions {
    margin-top: 0.5rem;
    justify-content: flex-start;
  }
}

/* =========================================
   ORDER TABLE (RÉCAP COMMANDE)
========================================= */

.order-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background-color: #1f1f2e;
  color: #f1f1f1;
  overflow: hidden;
  font-size: 0.95rem;
}

.order-table thead {
  background-color: #2d2d3f;
}

.order-table th,
.order-table td {
  padding: 12px 16px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid #333;
}

.order-table td:nth-child(3),
.order-table td:nth-child(4),
.order-table tfoot td {
  text-align: right;
}

.order-table tfoot td {
  background-color: #2d2d3f;
  font-weight: bold;
  border-top: 2px solid #444;
}

.order-table .total-label {
  text-align: right;
  padding-right: 16px;
  color: #f9d342;
}

.order-table .total-amount {
  color: #f9d342;
}

/* =========================================
   LIVRAISON / ICÔNES / PAIEMENT
========================================= */

#livraison-details {
  font-size: 0.99em;
}

.icons-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  justify-items: center;
  align-items: center;
  margin: 20px 0;
}

.icons-container img {
  max-width: 100%;
  height: auto;
  max-height: 60px;
}

/* Méthodes de paiement */

.pay-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.pay-methods img {
  height: 35px;
  object-fit: contain;
  background: #fff;
  padding: 0px;
  border-radius: 5px;
}

/* =========================================
   DROPDOWN PERSONNALISÉ (CATEGORIES)
========================================= */

.custom-dropdown {
  background-color: #1A1F2B;
  border: 1px solid #D4AF37;
  border-radius: 8px;
  padding: 0.5rem 0;
  min-width: 220px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.custom-dropdown .dropdown-item {
  color: #F4F4F4;
  font-family: 'Oswald', sans-serif;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.custom-dropdown .dropdown-item:hover,
.custom-dropdown .dropdown-item:focus {
  background-color: #333a4d;
  color: #D4AF37;
}

/* =========================================
   COUPON / FOOTER
========================================= */

.coupon-section {
  margin-top: 20px;
}

.footer {
  background-color: #1A1F2B;
  padding: 20px 0;
  text-align: center;
  color: #7E8A97;
  margin-top: 40px;
}

/* =========================================
   SOCIAL ICONS
========================================= */

.social {
  overflow: hidden;
  margin-top: 10px;
  text-align: center;
}

.social li {
  margin: 0px 10px;
  display: inline-block;
}

.social li a {
  background-color: #D4AF37;
  color: #1A1F2B;
  text-align: center;
  width: 36px;
  height: 36px;
  line-height: 36px;
  border-radius: 50%;
  display: inline-block;
  font-size: 16px;
  -webkit-transition: all 0.3s ease 0s;
  -moz-transition: all 0.3s ease 0s;
  -o-transition: all 0.3s ease 0s;
  transition: all 0.3s ease 0s;
}

.social li a:hover {
  background-color: #b38e2e;
  color: #fff;
}

.icon{
  /* animation: pulse 1.5s infinite; */
}

/* Facebook hover */
.icon.facebook:hover {
  background-color: #1877F2;
  color: #fff;
}

/* Instagram hover avec dégradé */
.icon.instagram:hover {
  background: linear-gradient(45deg, #FCAF45, #E1306C, #833AB4);
  color: #fff;
}

/* =========================================
   RESPONSIVE TEXT / BUTTONS GENERAUX
========================================= */

@media (max-width: 768px) {
  h2 {
    font-size: 1.5rem;
    text-align: center;
  }

  h3 {
    font-size: 1.25rem;
    padding-left: 1rem;
  }

  .card-body p,
  .card-body h5 {
    font-size: 0.9rem;
  }

  .quantity-controls .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }

  .cart {
    font-size: 0.9rem;
    padding: 1rem;
  }

  .btn-success {
    width: 100%;
    font-size: 1rem;
  }
}
