/* ============================================
   DESIGN ULTRA MODERNE 2026 - ECOMMERCE COMMUN
   Styles centralisés pour toutes les pages ecommerce
   ============================================ */


/* ============================================
   DESIGN ULTRA MODERNE 2026 - ECOMMERCE
   ============================================ */

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

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(45, 134, 89, 0.3); }
  50% { box-shadow: 0 0 40px rgba(45, 134, 89, 0.6); }
}

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

/* Body avec fond doux et élégant */
body {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 50%, #a5d6a7 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(45, 134, 89, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(255, 210, 63, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

main {
  position: relative;
  z-index: 1;
  padding-top: 80px;
}

/* Ajuster le layout pour éviter le double scroll */
.row {
  margin: 0;
}

.col-lg-2, .col-lg-10 {
  padding: 0.5rem;
}

.col-lg-2 {
  max-width: 200px;
}

.section {
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
}

.card-ecommerce {
  width: 100%;
  margin: 0;
}

.card-body {
  width: 100%;
  padding: 1.5rem;
}

#divTableProduit {
  width: 100%;
}

/* Navbar Moderne et Élégante */
.navbar-modern-ecommerce {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  border-bottom: 2px solid rgba(45, 134, 89, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 1.2rem 0;
  transition: all 0.3s ease;
  z-index: 1040;
}

/* Container nav pleine largeur - toujours flex row nowrap */
.navbar-modern-ecommerce .navbar-ecommerce-container {
  width: 100%;
  padding-left: 16px;
  padding-right: 16px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

/* Hamburger toujours visible et aligné */
.navbar-modern-ecommerce .sidenav-trigger {
  color: #2d8659;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Container interne logo/panier/profil */
.navbar-modern-ecommerce .navbar-ecommerce-container > .d-flex {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
}

/* Mobile-only: caché sur desktop */
.mobile-only {
  display: none !important;
}

@media (max-width: 991px) {
  .mobile-only {
    display: flex !important;
  }
  
  /* Forcer le panier et profil à droite */
  .navbar-modern-ecommerce .navbar-ecommerce-container > .d-flex > .mobile-only {
    margin-left: auto !important;
  }
}

/* Panier mobile - badge au-dessus du caddie */
.mobile-cart-btn {
  position: relative;
  padding: 4px 8px 4px 14px !important;
  gap: 4px !important;
  overflow: visible !important;
}

.mobile-cart-btn .cart-icon-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 2px;
}

.mobile-cart-btn .cart-icon-wrapper i {
  font-size: 0.9rem;
}

.mobile-cart-btn .cart-badge-modern {
  position: absolute;
  top: -8px;
  left: -12px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  font-size: 0.6rem;
  line-height: 16px;
  border-radius: 8px;
  background: #ff6b35;
  color: white;
  text-align: center;
}

.mobile-cart-btn #prixPanier {
  font-size: 0.7rem;
  font-weight: 700;
  color: #2d8659;
}

/* Aligner le header à gauche sur grand écran */
.navbar-modern-ecommerce .container {
  justify-content: flex-start !important;
}

.navbar-modern-ecommerce .navbar-brand {
  font-size: 1.5rem;
  font-weight: 900;
  color: #2d8659 !important;
  letter-spacing: -0.5px;
  margin-right: 2rem;
}

/* Cadre principal pour les très grands écrans */
.ecommerce-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
}

.navbar-modern-ecommerce .navbar-brand strong {
  color: #2d8659 !important;
}

.navbar-modern-ecommerce .navbar-brand i {
  color: #2d8659 !important;
}

/* Espacement du bouton hamburger */
.navbar-modern-ecommerce .float-left {
  margin-right: 1.5rem !important;
}

.navbar-modern-ecommerce .sidenav-trigger {
  padding: 0.5rem 0.75rem !important;
  border-radius: 10px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.navbar-modern-ecommerce .sidenav-trigger:hover {
  background: rgba(45, 134, 89, 0.1);
  transform: scale(1.05);
}

.navbar-modern-ecommerce .sidenav-trigger i {
  font-size: 1.3rem;
  color: #2d8659;
}

/* Assurer que le texte du panier est visible */
.navbar-modern-ecommerce .nav-link i.fa-shopping-cart {
  color: #2d8659 !important;
}

.navbar-modern-ecommerce .prix {
  color: #2d8659 !important;
}

.navbar-modern-ecommerce .nav-link {
  color: #555 !important;
  font-weight: 600;
  padding: 0.6rem 1.2rem !important;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 0.3rem;
  position: relative;
}

.navbar-modern-ecommerce .nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, #2d8659 0%, #4aab7f 100%);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar-modern-ecommerce .nav-link:hover {
  background: rgba(45, 134, 89, 0.08);
  color: #2d8659 !important;
  transform: translateY(-2px);
}

.navbar-modern-ecommerce .nav-link:hover::before {
  width: 80%;
}

.navbar-modern-ecommerce .dropdown-toggle::after {
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.navbar-modern-ecommerce .dropdown-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* Sidebar Moderne - Fix pour MDB5 - Overlay */
#slide-out {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  height: 100vh !important;
  width: 300px !important;
  z-index: 1055 !important;
  transform: translateX(-100%) !important;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 4px 0 40px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  overflow-x: hidden;
  visibility: hidden !important;
  opacity: 0 !important;
}

#slide-out.show {
  transform: translateX(0) !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Overlay pour fermer le sidebar */
.sidenav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1054;
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidenav-overlay.show {
  display: block;
  opacity: 1;
  pointer-events: all;
}

@media (max-width: 768px) {
  /* Header mobile compact - TOUT SUR UNE LIGNE */
  .navbar-modern-ecommerce {
    padding: 0.5rem 0 !important;
    min-height: 0 !important;
  }

  .navbar-modern-ecommerce .navbar-ecommerce-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 8px !important;
    gap: 8px !important;
    width: 100% !important;
  }

  /* Hamburger */
  .navbar-modern-ecommerce .sidenav-trigger {
    flex-shrink: 0 !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
  }

  .navbar-modern-ecommerce .sidenav-trigger i {
    font-size: 1.1rem !important;
  }

  /* Container logo + panier + profil - prend le reste de l'espace */
  .navbar-modern-ecommerce .navbar-ecommerce-container > .d-flex {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    min-width: 0 !important;
  }
  
  /* Groupe panier + profil à droite */
  .navbar-modern-ecommerce .navbar-ecommerce-container > .d-flex > .d-flex.mobile-only {
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }

  /* Logo/Titre */
  .navbar-modern-ecommerce .navbar-brand {
    flex-shrink: 1 !important;
    min-width: 0 !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .navbar-modern-ecommerce .taille_title {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 0.85rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .navbar-modern-ecommerce .taille_title i {
    font-size: 0.9rem !important;
    margin-right: 4px !important;
  }

  /* Panier mobile */
  .navbar-modern-ecommerce .mobile-only.btn {
    flex-shrink: 0 !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 8px !important;
    font-size: 0.7rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }

  .navbar-modern-ecommerce .mobile-only.btn i {
    font-size: 0.8rem !important;
  }

  .navbar-modern-ecommerce .mobile-only.btn .badge {
    font-size: 0.65rem !important;
    padding: 0.1rem 0.25rem !important;
  }

  .navbar-modern-ecommerce .mobile-only.btn #prixPanier {
    font-size: 0.7rem !important;
  }

  /* Profil mobile */
  .navbar-modern-ecommerce .mobile-only.flex-shrink-0 {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
  }

  .navbar-modern-ecommerce .mobile-only .nav-link {
    height: 32px !important;
    min-height: 32px !important;
    width: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .navbar-modern-ecommerce .mobile-only .nav-link i {
    font-size: 0.9rem !important;
  }

  /* Cacher le toggler bootstrap car on utilise le hamburger custom */
  .navbar-modern-ecommerce .navbar-toggler.test {
    display: none !important;
  }

  .navbar-modern-ecommerce .navbar-collapse.test {
    display: none !important;
  }


  /* Barre de recherche mobile sticky */
  .mobile-search-sticky {
    position: sticky;
    top: 52px; /* hauteur du header mobile */
    z-index: 100;
    background: #fff;
    padding: 10px 0;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 0 0 12px 12px;
  }

  .mobile-search-sticky .form-control {
    border-radius: 999px;
    padding-left: 1rem;
    height: 40px;
    font-size: 0.9rem;
    border: 2px solid rgba(45, 134, 89, 0.3);
  }

  .mobile-search-sticky .form-control:focus {
    border-color: #2d8659;
    box-shadow: 0 0 0 3px rgba(45, 134, 89, 0.15);
  }

  .mobile-search-sticky .form-label {
    margin-left: 1rem;
    font-size: 0.9rem;
  }

  /* Grille mobile 2 colonnes */
  .product-cards-mobile {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .product-card-mobile {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 0;
    width: 100%;
  }

  .pcm-left {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .pcm-left img {
    max-width: 70px;
    height: auto;
  }

  .pcm-body {
    width: 100%;
  }

  .pcm-controls {
    width: 100%;
    justify-content: center;
  }

  /* Layout mobile accueil: masquer colonne filtres desktop */
  .ecommerce-main .col-lg-2.follow-scroll {
    display: none !important;
  }

  /* Prendre toute la largeur pour le contenu principal */
  .ecommerce-main .col-lg-10 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  .ecommerce-main {
    padding: 0 12px !important;
  }

  .ecommerce-main .card-ecommerce {
    border-radius: 18px;
  }

  .ecommerce-main .card-body {
    padding: 1rem;
  }

  /* Sidebar plus étroit sur mobile */
  #slide-out {
    width: 240px !important;
    max-width: 70% !important;
  }
  
  /* Réduire la taille de l'icône home */
  .side-nav .social a i.fa-home {
    font-size: 1.5rem !important;
  }
  
  /* Réduire la taille du texte dans le sidebar */
  .side-nav .collapsible-header,
  .side-nav .collapsible-body a {
    font-size: 0.85rem !important;
    padding: 0.7rem 1rem !important;
  }
  
  /* IMPORTANT: Forcer l'alignement à gauche sur mobile */
  .side-nav .collapsible-header {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
  }
  
  .side-nav .collapsible-header i:first-child {
    font-size: 0.95rem !important;
    margin-right: 0.6rem !important;
    width: 18px !important;
    min-width: 18px !important;
    flex-shrink: 0 !important;
  }
  
  .side-nav .collapsible-header .rotate-icon {
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }
  
  /* Réduire le padding du logo */
  .side-nav .logo-wrapper {
    padding: 1rem 0.75rem !important;
    min-height: 70px !important;
    max-height: 70px !important;
  }
  
  .side-nav .logo-wrapper a {
    min-width: 100px !important;
    min-height: 50px !important;
    padding: 8px !important;
  }
  
  .side-nav .logo-wrapper img {
    width: 80px !important;
    max-height: 40px !important;
  }
  
  /* Réduire la taille du champ de recherche */
  .side-nav .search-form {
    padding: 0.5rem 1rem !important;
  }
  
  .side-nav .search-form .form-control {
    font-size: 0.9rem !important;
    padding: 0.5rem 0.75rem !important;
  }
  
  /* Dropdown du compte au-dessus du sidebar et stable */
  .navbar-modern-ecommerce .dropdown-menu {
    z-index: 1060 !important;
    position: fixed !important;
    margin-top: 0.5rem !important;
  }
  
  /* Empêcher la fermeture automatique du dropdown */
  .navbar-modern-ecommerce .dropdown-toggle[aria-expanded="true"] + .dropdown-menu,
  .navbar-modern-ecommerce .dropdown-menu.show {
    display: block !important;
  }
}

.side-nav {
  background: linear-gradient(180deg, #2d8659 0%, #1e5a3f 100%) !important;
  backdrop-filter: blur(20px);
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Logo dans le sidenav - Design moderne */
.side-nav .logo-wrapper {
  padding: 1rem 1.2rem;
  text-align: left;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.1) 100%);
  position: relative;
  overflow: visible !important;
  min-height: 60px;
  max-height: 60px;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

/* Fond pour le logo pour mieux le voir */
.side-nav .logo-wrapper a {
  background: rgba(255, 255, 255, 0.15) !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  min-width: auto;
  min-height: 40px;
}

/* Assurer que le logo est visible */
.side-nav .logo-wrapper img {
  mix-blend-mode: normal !important;
}

.side-nav .logo-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.side-nav .logo-wrapper a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  position: relative;
  z-index: 10 !important;
}

.side-nav .logo-wrapper img,
.side-nav .logo-wrapper .img-fluid,
.side-nav .logo-wrapper .logo-sidebar {
  max-width: 90px !important;
  width: 90px !important;
  height: auto !important;
  max-height: 45px !important;
  /* Retirer le filtre pour voir le logo original */
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) !important;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 10 !important;
  display: block !important;
  margin: 0 auto !important;
  opacity: 1 !important;
  visibility: visible !important;
  object-fit: contain !important;
  background: transparent !important;
}

/* Si le logo est trop sombre, utiliser cette version avec filtre */
.side-nav .logo-wrapper img.dark-logo {
  filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) !important;
}

/* Si le logo est clair, utiliser cette version sans filtre */
.side-nav .logo-wrapper img.light-logo {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) !important;
}

.side-nav .logo-wrapper:hover img,
.side-nav .logo-wrapper:hover .img-fluid {
  transform: scale(1.05);
  filter: brightness(0) invert(1) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

/* Override des classes Bootstrap qui pourraient cacher le logo */
.side-nav .flex-center {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.side-nav .logo-wrapper:hover img {
  transform: scale(1.05);
}

/* Liens du sidenav - Design moderne */
.side-nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-nav .collapsible {
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
}

.side-nav .collapsible-header {
  padding: 0.85rem 1.2rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  position: relative;
  margin: 0.2rem 0.5rem;
  border-radius: 12px;
}

.side-nav .collapsible-header::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: linear-gradient(135deg, #ffd23f 0%, #ff6b35 100%);
  border-radius: 0 4px 4px 0;
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.side-nav .collapsible-header:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  padding-left: 2rem;
  transform: translateX(5px);
}

.side-nav .collapsible-header:hover::before {
  transform: scaleY(1);
}

.side-nav .collapsible-header i:first-child {
  margin-right: 0.75rem;
  font-size: 1rem;
  width: 20px;
  min-width: 20px;
  flex-shrink: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
}

.side-nav .collapsible-header .rotate-icon {
  font-size: 0.85rem;
  transition: transform 0.3s ease;
  color: rgba(255, 255, 255, 0.7);
  margin-left: auto;
  flex-shrink: 0;
}

.side-nav .collapsible-header.open .rotate-icon {
  transform: rotate(180deg);
}

/* Sous-menu collapsible - caché par défaut */
.side-nav .collapsible-body {
  background: rgba(0, 0, 0, 0.2);
  padding: 0;
  margin: 0 0.5rem;
  border-radius: 0 0 12px 12px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

/* Sous-menu ouvert */
.side-nav .collapsible-body.open {
  max-height: 200px;
  padding: 0.5rem 0;
}

.side-nav .collapsible-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-nav .collapsible-body a {
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  display: block;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 0.2rem 0.5rem;
  font-weight: 500;
  position: relative;
}

.side-nav .collapsible-body a::before {
  content: '→';
  position: absolute;
  left: 1.5rem;
  opacity: 0;
  transition: all 0.3s ease;
}

.side-nav .collapsible-body a:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  padding-left: 4rem;
  transform: translateX(5px);
}

/* ============================================
   STYLES PAGE ACTIVE DANS LE SIDEBAR
   ============================================ */

/* Style pour le lien actif dans le menu principal */
.side-nav .collapsible-header.active {
  background: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
  border-left: 4px solid #fff !important;
  padding-left: calc(1.2rem - 4px) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.side-nav .collapsible-header.active i {
  color: white !important;
}

/* Style pour le lien actif dans le sous-menu */
.side-nav .collapsible-body a.active,
.side-nav .collapsible-body li.active a {
  background: rgba(255, 255, 255, 0.25) !important;
  color: white !important;
  font-weight: 700 !important;
  border-left: 3px solid #fff;
  padding-left: calc(2.5rem - 3px) !important;
}

/* Override Materialize styles */
.side-nav .collapsible-body li.active,
.side-nav.fixed .collapsible-body li.active {
  background-color: transparent !important;
}

.side-nav .collapsible-body li.active a,
.side-nav.fixed .collapsible-body li.active a {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.25) !important;
}

.side-nav .collapsible-body a:hover::before {
  opacity: 1;
  left: 2rem;
}

/* Formulaire de recherche dans le sidenav - Design moderne */
.side-nav .search-form {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.1);
}

.side-nav .search-form .form-control {
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: white;
  padding: 0.65rem 1rem;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.side-nav .search-form .form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.side-nav .search-form .form-control:focus {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  color: white;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
  outline: none;
}

/* Social icons dans le sidenav - Design moderne */
.side-nav .social {
  list-style: none;
  padding: 0.75rem 0;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}

.side-nav .social li {
  margin: 0;
}

.side-nav .social a {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.side-nav .social a i {
  font-size: 1.5rem;
}

.side-nav .social a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.side-nav .social li {
  margin: 0;
}

.side-nav .social a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.6rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.side-nav .social a:hover {
  color: white;
  transform: scale(1.15) rotate(5deg);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Overlay pour le sidenav */
.sidenav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: pointer;
  pointer-events: none;
}

.sidenav-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Overlay créé par MDB5 - le cacher si on utilise le nôtre */
.sidenav-backdrop {
  display: none !important;
}

/* Fix navbar pour aligner Profil à droite */
.navbar-nav {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.navbar-nav .nav-item {
  margin-left: 1rem;
}

/* Dropdown Profil amélioré */
.dropdown-menu {
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border-radius: 15px;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}

.dropdown-item {
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  border-radius: 0;
}

.dropdown-item:hover {
  background: rgba(45, 134, 89, 0.1);
  color: #2d8659;
  transform: translateX(5px);
}

.dropdown-item:first-child {
  border-radius: 15px 15px 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 15px 15px;
}

/* Carte Filtres Moderne et Élégante */
.filter-card-modern {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  border: 2px solid rgba(45, 134, 89, 0.15);
  border-radius: 20px;
  padding: 1.5rem 1.2rem;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.filter-card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #2d8659 0%, #4aab7f 50%, #2d8659 100%);
  background-size: 200% 100%;
  animation: gradient-shift 3s ease infinite;
}

.filter-card-modern:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 15px 50px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border-color: rgba(45, 134, 89, 0.3);
}

.filter-card-modern h5 {
  color: #2d8659;
  font-weight: 800;
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  position: relative;
  display: flex;
  align-items: center;
}

.filter-card-modern h5::before {
  content: '';
  width: 4px;
  height: 25px;
  background: linear-gradient(135deg, #2d8659 0%, #4aab7f 100%);
  border-radius: 2px;
  margin-right: 1rem;
}

.form-check {
  margin-bottom: 1rem;
  padding-left: 2.5rem;
}

.form-check-input {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid rgba(45, 134, 89, 0.6) !important;
  background: white !important;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
}

.form-check-input::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: #2d8659;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.form-check-input:checked {
  background-color: white !important;
  border-color: #2d8659 !important;
  border-width: 2px !important;
  box-shadow: 0 0 0 3px rgba(45, 134, 89, 0.2);
}

.form-check-input:checked::before {
  width: 10px;
  height: 10px;
}

.form-check-input:hover {
  border-color: #2d8659 !important;
  box-shadow: 0 0 0 2px rgba(45, 134, 89, 0.15);
}

.form-check-label {
  color: #555;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.form-check-label:hover {
  color: #2d8659;
  transform: translateX(3px);
}

/* Tableau Produits Moderne */
.product-table-modern {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  border: 2px solid rgba(45, 134, 89, 0.15);
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  animation: slide-in 0.8s ease-out;
  font-size: clamp(0.85rem, 0.6vw + 0.6rem, 1rem);
  table-layout: auto;
  width: 100%;
  min-width: 100%;
}

/* Supprimer le scroll interne du tableau et agrandir */
#divTableProduit {
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch;
}

.dataTables_wrapper {
  overflow-x: auto !important;
  overflow-y: visible !important;
  min-height: auto !important;
}

/* Assurer que le tableau peut scroller horizontalement si nécessaire */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Cartes produits mobile */
.product-cards-mobile {
  display: none;
}

.product-card-mobile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(45, 134, 89, 0.08);
}

.pcm-left img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 14px;
  background: transparent;
  padding: 6px;
}

.pcm-body {
  flex: 1;
  min-width: 0;
}

.pcm-title {
  font-weight: 700;
  color: #2d8659;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.pcm-provenance {
  font-size: 0.7rem;
  color: #888;
  margin-bottom: 4px;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pcm-provenance i {
  color: #2d8659;
  font-size: 0.65rem;
}

/* Provenance dans le tableau desktop */
.product-provenance {
  font-size: 0.75rem;
  color: #888;
  margin-top: 4px;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 5px;
}

.product-provenance i {
  color: #2d8659;
  font-size: 0.7rem;
}

.pcm-desc {
  font-size: 0.8rem;
  color: #666;
  line-height: 1.2;
  margin-bottom: 6px;
}

.pcm-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.pcm-price {
  font-weight: 700;
  color: #2d8659;
}

.pcm-unit {
  font-size: 0.75rem;
  color: #888;
}

.pcm-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pcm-controls .btn-quantity-modern {
  width: 32px;
  height: 32px;
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pcm-controls .pcm-add-btn {
  width: auto;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  display: none;
}

.pcm-controls .pcm-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pcm-controls .trash-icon {
  display: none;
}

.pcm-controls.qty-zero .pcm-stepper {
  display: none;
}

.pcm-controls.qty-zero .pcm-add-btn {
  display: inline-flex;
}

.pcm-controls.qty-one .minus-icon {
  display: none;
}

.pcm-controls.qty-one .trash-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pcm-controls.qty-many .minus-icon {
  display: inline-flex;
}

.pcm-controls.qty-many .trash-icon {
  display: none;
}

.pcm-controls .quant-display {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  color: #2d8659;
}

/* Agrandir le tableau pour afficher tous les produits */
.product-table-modern {
  min-height: auto;
}

.product-table-modern tbody {
  display: table-row-group;
}

/* Ajuster le wrapper DataTable */
.dataTables_scrollBody {
  overflow: visible !important;
  max-height: none !important;
}

/* ========================================
   DATATABLE - LARGEUR FLUIDE
   ======================================== */

/* Table fluide qui prend toute la largeur */
#produit_data,
#produit_data thead,
#produit_data tbody {
  width: 100% !important;
  table-layout: auto !important;
}

/* Assurer que tous les wrappers DataTable prennent toute la largeur */
#divTableProduit,
#divTableProduit .dataTables_wrapper,
#divTableProduit .dataTables_scroll,
#divTableProduit .dataTables_scrollHead,
#divTableProduit .dataTables_scrollBody,
.table-responsive {
  width: 100% !important;
}

/* Colonne Type cachée (colonne 4) */
#produit_data th:nth-child(4),
#produit_data td:nth-child(4) {
  display: none !important;
}

/* Alignement vertical des cellules */
#produit_data th,
#produit_data td {
  vertical-align: middle !important;
  padding: clamp(0.5rem, 0.45vw + 0.4rem, 0.9rem) clamp(0.6rem, 0.55vw + 0.4rem, 1rem) !important;
  font-size: clamp(0.8rem, 0.55vw + 0.55rem, 0.98rem) !important;
}

/* Centrer le contenu des cellules prix et quantité */
#produit_data td:nth-child(5),
#produit_data td:nth-child(6) {
  text-align: center !important;
}

/* ============================================
   PRIX UNITAIRE - Colonne 5 (après Type cachée)
   ============================================ */
#produit_data td:nth-child(5) {
  color: #2d8659 !important;
  font-weight: 600 !important;
  font-size: clamp(0.9rem, 0.6vw + 0.6rem, 1.1rem) !important;
  white-space: nowrap;
}

#produit_data td:nth-child(5) small {
  display: block;
  color: #666 !important;
  font-weight: 400 !important;
  font-size: 0.75rem !important;
  margin-top: 2px;
}

/* ============================================
   BARRE DE RECHERCHE DESKTOP
   ============================================ */
.desktop-search-bar {
  display: block;
  max-width: 500px;
  margin: 0 auto 1.5rem auto;
}

.desktop-search-bar .search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.desktop-search-bar .search-icon {
  position: absolute;
  left: 1rem;
  color: #2d8659;
  font-size: 1rem;
  z-index: 2;
  pointer-events: none;
}

.desktop-search-bar .form-control {
  padding: 0.85rem 1rem 0.85rem 2.8rem;
  border-radius: 50px;
  border: 2px solid rgba(45, 134, 89, 0.3);
  font-size: 1rem;
  background: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.desktop-search-bar .form-control:focus {
  border-color: #2d8659;
  box-shadow: 0 4px 20px rgba(45, 134, 89, 0.15);
  outline: none;
}

.desktop-search-bar .form-control::placeholder {
  color: #999;
}

/* Cacher sur mobile */
@media (max-width: 991px) {
  .desktop-search-bar {
    display: none !important;
  }
}

/* Afficher uniquement sur desktop */
.desktop-only {
  display: block;
}

@media (max-width: 991px) {
  .desktop-only {
    display: none !important;
  }
}

/* Images des produits */
#produit_data td:first-child img {
  max-width: 80px;
  height: auto;
  object-fit: contain;
}

.product-table-modern thead {
  background: linear-gradient(135deg, #2d8659 0%, #4aab7f 100%);
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.product-table-modern thead::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.product-table-modern thead th {
  border: none;
  padding: clamp(0.6rem, 0.4vw + 0.4rem, 1.1rem) clamp(0.5rem, 0.5vw + 0.4rem, 0.9rem);
  font-weight: 700;
  font-size: clamp(0.75rem, 0.5vw + 0.55rem, 0.95rem) !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: white;
  position: relative;
  z-index: 2;
  text-align: center;
  vertical-align: middle;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  background: rgba(30, 90, 63, 0.3);
}

/* Largeurs en pourcentage pour s'adapter à la largeur disponible */
.product-table-modern thead th:first-child {
  width: 8%;
  min-width: 80px;
}

.product-table-modern thead th:nth-child(2) {
  width: 18%;
  min-width: 120px;
}

.product-table-modern thead th:nth-child(3) {
  width: 22%;
  min-width: 140px;
}

.product-table-modern thead th:nth-child(4) {
  width: 10%;
  min-width: 80px;
}

.product-table-modern thead th:nth-child(5) {
  width: 15%;
  min-width: 100px;
}

.product-table-modern thead th:last-child {
  width: 27%;
  min-width: 140px;
}

/* Effet au survol des colonnes */
.product-table-modern thead th:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Icônes dans les en-têtes */
.product-table-modern thead th .header-icon {
  display: inline-block;
  margin-right: 0.5rem;
  font-size: 1rem;
  opacity: 0.95;
}

.product-table-modern tbody tr {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.product-table-modern tbody tr:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.02) translateX(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.product-table-modern tbody td {
  padding: clamp(0.5rem, 0.45vw + 0.4rem, 0.9rem) clamp(0.5rem, 0.5vw + 0.4rem, 0.9rem);
  vertical-align: middle;
  color: #333;
  font-weight: 500;
  text-align: center;
  font-size: clamp(0.8rem, 0.55vw + 0.55rem, 0.95rem) !important;
}

/* Alignement des colonnes dans le tbody pour correspondre au thead */
.product-table-modern tbody td:first-child {
  width: 8%;
  min-width: 80px;
  padding: 0.8rem 0.4rem;
}

.product-table-modern tbody td:nth-child(2) {
  width: 18%;
  min-width: 120px;
  text-align: left;
  padding-left: 0.8rem;
  padding-right: 0.8rem;
}

.product-table-modern tbody td:nth-child(3) {
  width: 22%;
  min-width: 140px;
  text-align: left;
  padding-left: 0.8rem;
  padding-right: 0.8rem;
}

.product-table-modern tbody td:nth-child(4) {
  width: 10%;
  min-width: 80px;
  padding-left: 0.8rem;
  padding-right: 0.8rem;
}

.product-table-modern tbody td:nth-child(5) {
  width: 15%;
  min-width: 100px;
  padding-left: 0.8rem;
  padding-right: 0.8rem;
}

.product-table-modern tbody td:last-child {
  width: 27%;
  min-width: 140px;
  padding-left: 0.8rem;
  padding-right: 0.8rem;
}

.product-table-modern tbody img {
  width: 80px;
  height: 80px;
  max-width: 80px;
  max-height: 80px;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: block;
  margin: 0 auto;
}

.product-table-modern tbody tr:hover img {
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.product-table-modern tbody td h6 {
  color: #2d8659;
  font-weight: 700;
  font-size: clamp(0.85rem, 0.6vw + 0.6rem, 1.05rem) !important;
}

/* Boutons Quantité Modernes */
.btn-quantity-modern {
  background: linear-gradient(135deg, #2d8659 0%, #4aab7f 100%);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(45, 134, 89, 0.3);
}

.btn-quantity-modern:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(45, 134, 89, 0.4);
}

.btn-quantity-modern:active {
  transform: scale(0.95);
}

.quant-display {
  font-size: 1.3rem;
  font-weight: 700;
  color: #2d8659;
  min-width: 45px;
  text-align: center;
  display: inline-block;
}

/* Section Total Moderne */
.total-section-modern {
  background: linear-gradient(135deg, #2d8659 0%, #4aab7f 100%);
  color: white;
  padding: 2.5rem;
  border-radius: 25px;
  margin-top: 2rem;
  box-shadow: 0 8px 30px rgba(45, 134, 89, 0.3);
  animation: slide-in 1s ease-out;
}

.total-section-modern h4 {
  color: white;
  font-weight: 700;
  margin-bottom: 1.5rem;
  font-size: 1.6rem;
}

.btn-finaliser-modern {
  background: white;
  color: #2d8659;
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.btn-finaliser-modern:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  color: #1e5a3f;
}

.price-display-modern {
  color: white;
  font-weight: 800;
  font-size: 1.8rem;
}

/* Badge Panier */
.cart-badge-modern {
  background: #ff6b35;
  color: white;
  border-radius: 50px;
  padding: 0.3rem 0.8rem;
  font-weight: 700;
}

/* Modal Panier Moderne */
.cart-modal .modal-content {
  border-radius: 20px;
  border: none;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.cart-modal .modal-header {
  background: linear-gradient(135deg, #2d8659 0%, #4aab7f 100%);
  color: white;
  border-bottom: none;
  padding: 1.5rem 2rem;
}

.cart-modal .modal-title {
  color: white !important;
  font-weight: 700;
  font-size: 1.5rem;
}

.cart-modal .btn-close {
  filter: brightness(0) invert(1);
  opacity: 1;
}

.cart-modal .modal-body {
  padding: 2rem;
  max-height: 60vh;
  overflow-y: auto;
}

.cart-modal .table {
  margin-bottom: 0;
}

.cart-modal .table thead {
  background: linear-gradient(135deg, #2d8659 0%, #4aab7f 100%);
  color: white;
}

.cart-modal .table thead th {
  border: none;
  padding: 1rem;
  font-weight: 700;
  color: white;
}

.cart-modal .table tbody tr {
  transition: all 0.3s ease;
}

.cart-modal .table tbody tr:hover {
  background: rgba(45, 134, 89, 0.05);
  transform: translateX(5px);
}

.cart-modal .table tbody td {
  padding: 1.2rem 1rem;
  vertical-align: middle;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.cart-modal .deleteProduitPanier {
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 50%;
}

.cart-modal .deleteProduitPanier:hover {
  background: rgba(220, 53, 69, 0.1);
  transform: scale(1.2);
}

.cart-modal .modal-footer {
  border-top: 2px solid rgba(45, 134, 89, 0.1);
  padding: 1.5rem 2rem;
  background: rgba(45, 134, 89, 0.02);
}

.cart-modal .btn-danger {
  background: #dc3545;
  border: none;
  border-radius: 50px;
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.cart-modal .btn-danger:hover {
  background: #c82333;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.cart-modal #commander {
  background: linear-gradient(135deg, #2d8659 0%, #4aab7f 100%);
  border: none;
  border-radius: 50px;
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  color: white;
  transition: all 0.3s ease;
}

.cart-modal #commander:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(45, 134, 89, 0.4);
  background: linear-gradient(135deg, #1e5a3f 0%, #2d8659 100%);
}

/* Images des produits dans le panier */
.cart-product-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.cart-product-image:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cart-product-placeholder {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 1.5rem;
}

.cart-modal .table tbody td:first-child {
  width: 80px;
  text-align: center;
  padding: 1rem 0.5rem;
}

.cart-modal .table thead th:first-child {
  width: 80px;
  text-align: center;
}

/* ============================================
   TOAST NOTIFICATIONS 2026
   ============================================ */
.toast-container-modern {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
  max-height: calc(100vh - 150px);
  overflow: hidden;
}

/* Limiter le nombre de toasts visibles */
.toast-container-modern .toast-modern:nth-child(n+3) {
  display: none;
}

/* Toasts compacts sur mobile */
@media (max-width: 768px) {
  .toast-container-modern {
    top: auto;
    bottom: 80px;
    right: 10px;
    left: 10px;
    gap: 0.5rem;
  }
  
  .toast-modern {
    min-width: auto;
    max-width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
  }
  
  .toast-modern .toast-header {
    margin-bottom: 0.25rem;
    gap: 0.5rem;
  }
  
  .toast-modern .toast-icon {
    font-size: 1.1rem;
  }
  
  .toast-modern .toast-title {
    font-size: 0.85rem;
  }
  
  .toast-modern .toast-body {
    font-size: 0.8rem;
    line-height: 1.3;
  }
  
  .toast-modern .toast-close {
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1rem;
  }
}

.toast-modern {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 2px solid rgba(45, 134, 89, 0.2);
  border-radius: 20px;
  padding: 1.2rem 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  min-width: 300px;
  max-width: 400px;
  pointer-events: all;
  animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.toast-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, #2d8659 0%, #4aab7f 100%);
}

.toast-modern.success::before {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.toast-modern.error::before {
  background: linear-gradient(135deg, #dc3545 0%, #ff6b6b 100%);
}

.toast-modern.info::before {
  background: linear-gradient(135deg, #17a2b8 0%, #5dade2 100%);
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.toast-modern.hiding {
  animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast-modern .toast-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.toast-modern .toast-icon {
  font-size: 1.5rem;
  color: #2d8659;
}

.toast-modern.success .toast-icon {
  color: #28a745;
}

.toast-modern.error .toast-icon {
  color: #dc3545;
}

.toast-modern.info .toast-icon {
  color: #17a2b8;
}

.toast-modern .toast-title {
  font-weight: 700;
  font-size: 1rem;
  color: #333;
  margin: 0;
}

.toast-modern .toast-body {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
}

.toast-modern .toast-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: #999;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: all 0.2s ease;
}

.toast-modern .toast-close:hover {
  color: #333;
  transform: rotate(90deg);
}

/* ============================================
   SKELETON LOADERS 2026
   ============================================ */
.skeleton-loader {
  background: linear-gradient(
    90deg,
    rgba(240, 240, 240, 0.8) 0%,
    rgba(250, 250, 250, 0.8) 50%,
    rgba(240, 240, 240, 0.8) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-table-row {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-image {
  width: 80px;
  height: 80px;
  border-radius: 12px;
}

.skeleton-text {
  flex: 1;
  height: 20px;
  border-radius: 4px;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-text.medium {
  width: 80%;
}

.skeleton-button {
  width: 100px;
  height: 40px;
  border-radius: 20px;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.loading-overlay.show {
  opacity: 1;
  visibility: visible;
}

.spinner-modern {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(45, 134, 89, 0.1);
  border-top-color: #2d8659;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.spinner-modern::after {
  content: '';
  display: block;
  width: 40px;
  height: 40px;
  margin: 6px;
  border: 3px solid rgba(45, 134, 89, 0.1);
  border-top-color: #4aab7f;
  border-radius: 50%;
  animation: spin 0.6s linear infinite reverse;
}

/* Responsive */
@media (max-width: 768px) {
  .filter-card-modern {
    padding: 1.5rem;
    border-radius: 20px;
  }
  
  .product-table-modern {
    font-size: clamp(0.82rem, 0.6vw + 0.55rem, 0.95rem) !important;
    border-radius: 20px;
  }

  /* Mobile: afficher les cartes, cacher la table */
  .product-cards-mobile {
    display: grid;
  }

  #divTableProduit {
    display: none;
  }
  
  .product-table-modern tbody img {
    width: 100px;
    height: auto;
    max-height: 100px;
  }
  
  .btn-quantity-modern {
    min-width: 50px;
    min-height: 44px;
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
  }
  
  /* Assurer que le dropdown mobile fonctionne */
  .mobile-only .dropdown-menu {
    max-height: 300px;
    overflow-y: auto;
  }
}
  