/* index.css - version mobile first & perfectionniste */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #fafafa;
  color: #1e1e1e;
  line-height: 1.5;
  scroll-behavior: smooth;
}

.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1001 !important;
  background: white; /* Enlevez le rgba temporairement */
  /* backdrop-filter: blur(12px); */ /* Commentez ceci pour tester */
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 0.7rem 1rem;
}

/* Modifiez .header-container pour permettre un meilleur contrôle */
.header-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column; /* On empile les éléments sur mobile */
  align-items: center;    /* Centre tout horizontalement */
  gap: 1rem;
  padding: 0.5rem 0;
}

/* ===== LOGO AVEC IMAGE ===== */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-image {
  height: 45px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.logo-image:hover {
  transform: scale(1.05);
}

.logo-text {
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  background: linear-gradient(145deg, #121212, #3a3a3a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

/* Adaptation mobile */
@media (max-width: 599px) {
  .logo-image {
    height: 35px;
  }
  
  .logo-text {
    font-size: 1.3rem;
  }
}

@media (max-width: 399px) {
  .logo-image {
    height: 30px;
  }
  
  .logo-text {
    font-size: 1.1rem;
  }
}

.logo i {
  background: none;
  -webkit-text-fill-color: #2b2b2b;
  font-size: 1.9rem;
}

.filter-bar {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.5rem;

  padding-inline: 1rem;

  width: 100%;
  align-items: center;
  justify-content: flex-start;

  -webkit-overflow-scrolling: touch;
}

/* Personnalisation scrollbar (webkit) */
.filter-bar::-webkit-scrollbar {
  height: 4px;
}
.filter-bar::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 10px;
}
.filter-bar::-webkit-scrollbar-thumb {
  background: #aaa;
  border-radius: 10px;
}

.filter-btn {
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(0,0,0,0.08);
  padding: 0.5rem 1.2rem;
  border-radius: 40px;
  font-weight: 500;
  font-size: 0.9rem;
  color: #444;
  cursor: pointer;
  transition: 0.2s ease;
  backdrop-filter: blur(4px);
  display: inline-flex;      /* pour rester en ligne */
  align-items: center;
  white-space: nowrap;       /* pas de coupure */
  flex-shrink: 0;            /* empêche de rétrécir */
}

.filter-btn i {
  margin-right: 6px;
  font-size: 0.9rem;
}

.filter-btn.active {
  background: #1e1e1e;
  color: white;
  border-color: #1e1e1e;
  box-shadow: 0 6px 14px rgba(0,0,0,0.1);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); 
  gap: 1rem;
  width: 100%;
  min-height: 200px; /* Force une hauteur minimum pour le rendu */
  opacity: 1 !important; /* Force la visibilité */
  visibility: visible !important;
}
/* à partir de 600px, on passe à 3 colonnes */
@media (min-width: 600px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    padding: 0 1.5rem;
    gap: 1.5rem;
  }
}

/* à partir de 900px, 4 colonnes */
@media (min-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    padding: 0 2rem;
  }
  
  .header-container {
    flex-direction: row;        /* Logo et filtres sur une ligne */
    justify-content: space-between; /* Aligne le logo à gauche */
    align-items: center;
    gap: 2rem;                   /* Espace entre logo et filtres */
  }

  .filter-bar {
    margin-top: 1rem;
    width: 100%;
    padding-inline: 0.5rem;
    justify-content: flex-start;
  }
  
      .categories-bar-container {
        padding: 0.6rem 2rem;
    }
    
    .categories-bar {
        justify-content: center; /* Centre les boutons horizontalement */
        flex-wrap: wrap; /* Permet au besoin de passer à la ligne */
    }
}

@media (max-width: 899px) {
  .header-container {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem; /* Réduit le gap global */
  }
  
  .filter-bar {
    margin-top: 1rem;
    width: 100%;
    padding-inline: 0.5rem;
    justify-content: flex-start;
  }
  
    .categories-bar-inner {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .categories-bar-inner::-webkit-scrollbar {
        display: none;
    }
    .categories-bar {
        min-width: max-content; /* Force le scroll si ça dépasse */
        flex-wrap: nowrap;
    }
    
    .categories-bar-container {
        padding: 0.5rem 0.8rem;
    }

}

/* à partir de 1200px, auto-fill avec min 280px (sécurité) */
@media (min-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  }
}

/* ===== CARTE PRODUIT (plus fine sur mobile) ===== */
.product-card {
  background: white;
  border-radius: 24px;      /* légèrement plus petit sur mobile */
  overflow: hidden;
  box-shadow: 0 10px 20px -8px rgba(0,0,0,0.06);
  transition: all 0.25s ease;
  border: 1px solid rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  width: 100%;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 30px -12px rgba(0,0,0,0.15);
}

.img-wrapper {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f0f0f0;
}

.img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .img-wrapper img {
  transform: scale(1.03);
}

/* Overlay toujours visible sur mobile ? on améliore le tactile */
.action-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.45), transparent);
  padding: 1rem 0.8rem 0.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0;
  transition: opacity 0.2s;
}

/* sur mobile, on peut l'afficher en permanence pour plus d'accessibilité ? 
   on le laisse apparaître au survol ET au touch (via un petit js event) */
.product-card:hover .action-overlay,
.product-card.touch .action-overlay {   /* classe ajoutée au tap */
  opacity: 1;
}

/* adaptations tactiles : rendre overlay accessible */
@media (hover: none) and (pointer: coarse) {
  /* sur appareils tactiles, on l'affiche légèrement tout le temps (moins fort) */
  .action-overlay {
    opacity: 0.6;            /* toujours visible mais discret */
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
  }
  /* on le monte à 1 quand la carte est active (touch) via JS */
  .product-card.touch .action-overlay {
    opacity: 1;
  }
}

/* ===== LIKE / SHARE BUTTONS : version desktop par défaut ===== */
.like-btn, .share-btn {
  background: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,0,0,0.2);
  transition: 0.15s;
  color: #2d2d2d;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.like-btn {
  color: #ff3b5c;
}

.like-btn .fa-solid { display: none; }
.like-btn.liked .fa-regular { display: none; }
.like-btn.liked .fa-solid { display: inline-block; }

.share-btn {
  width: auto;
  padding: 0 1rem;
  font-size: 1rem;
  background: #ffffffdd;
  backdrop-filter: blur(4px);
}
.share-btn i { 
  font-size: 1.2rem; 
}

/* dropdown partage */
.dropdown-share {
  position: relative;
}
.share-menu {
  position: absolute;
  bottom: 55px;
  right: 0;
  background: white;
  border-radius: 30px;
  box-shadow: 0 20px 35px -8px rgba(0,0,0,0.25);
  display: flex;
  gap: 0.2rem;
  padding: 0.6rem;
  opacity: 0;
  visibility: hidden;
  transition: 0.2s;
  border: 1px solid #eee;
  z-index: 60;
}
.share-menu.show {
  opacity: 1;
  visibility: visible;
}
.share-menu a {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f2f2f2;
  font-size: 1.5rem;
  color: #222;
  transition: 0.15s;
  text-decoration: none;
}
.share-menu a:active { background: #d4d4d4; } /* retour tactile */

/* infos produit */
.product-info {
  padding: 1rem 0.8rem 1.2rem;
  background: white;
}
.product-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
  font-weight: 600;
}
.product-title {
  font-weight: 700;
  font-size: 1rem;          /* adapté mobile */
  margin: 0.1rem 0 0.2rem;
  line-height: 1.3;
}
@media (min-width: 480px) {
  .product-title { font-size: 1.1rem; }
}
.product-price {
  font-weight: 700;
  font-size: 1.2rem;
  color: #121212;
}
.order-btn {
  background: #121212;
  border: none;
  color: white;
  font-weight: 600;
  padding: 0.8rem 0;
  margin-top: 0.8rem;
  border-radius: 50px;
  width: 100%;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: 0.2s;
  cursor: pointer;
  border: 1px solid #121212;
  -webkit-tap-highlight-color: transparent;
}
.order-btn i { font-size: 1.1rem; }
.order-btn:active {
  background: white;
  color: #121212;
}

/* pied de page */
.footer-note {
  text-align: center;
  padding: 1.5rem 1rem;
  color: #6b6b6b;
  border-top: 1px solid #eaeaea;
  background: white;
  font-size: 0.9rem;
}

/* mini modale commande (toast) */
.order-toast {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;              /* centré sur mobile */
  background: #1e1e1e;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 60px;
  font-weight: 500;
  box-shadow: 0 15px 30px -10px black;
  z-index: 200;
  transform: translateY(150%);
  opacity: 0;
  transition: 0.3s;
  border: 1px solid #3d3d3d;
  text-align: center;
  max-width: 400px;
  margin: 0 auto;           /* centrage horizontal */
}
.order-toast.show {
  transform: translateY(0);
  opacity: 1;
}
.order-toast i { margin-right: 8px; color: #25d366; }



/*Medias queries*/


/* ===== RÉDUCTION POUR MOBILES (écrans < 600px) ===== */
@media (max-width: 599px) {
  .like-btn {
    width: 36px;           /* au lieu de 44px */
    height: 36px;
    font-size: 1.1rem;     /* icône plus petite */
  }

  .share-btn {
    padding: 0 0.7rem;     /* moins de padding horizontal */
    height: 36px;          /* aligné avec le like */
    font-size: 0.85rem;    /* texte plus petit */
  }
  .share-btn i {
    font-size: 1rem;       /* icône partager réduite */
    margin-right: 4px;
  }

  /* adapter le dropdown pour rester proportionnel */
  .share-menu {
    bottom: 45px;          /* remonte légèrement */
    padding: 0.4rem;
  }
  .share-menu a {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }
}

/* ===== SI TU VEUX ENCORE PLUS PETIT SUR TRÈS PETITS ÉCRANS ( < 400px ) ===== */
@media (max-width: 399px) {
  .like-btn {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  .share-btn {
    height: 32px;
    padding: 0 0.6rem;
    font-size: 0.75rem;
  }
  .share-btn i {
    font-size: 0.9rem;
    margin-right: 3px;
  }
  .share-menu a {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
}


/* ===== ANIMATIONS DES COEURS - VERSION PROFESSIONNELLE ===== */

/* Structure de base du bouton like */
.like-btn {
  position: relative;
  overflow: visible;
  transition: transform 0.2s ease;
}

/* État normal - coeur vide */
.like-btn .fa-regular {
  display: inline-block;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* État liké - coeur plein */
.like-btn .fa-solid {
  display: none;
  color: #ff3b5c;
  filter: drop-shadow(0 0 8px #ff3b5c);
}

.like-btn.liked .fa-regular {
  display: none;
}

.like-btn.liked .fa-solid {
  display: inline-block;
  animation: heartPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Animation de pop du coeur */
@keyframes heartPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.4); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* Effet de vague (ripple) */
.like-btn.liked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: rgba(255, 59, 92, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
  z-index: -1;
}

@keyframes ripple {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.8;
  }
  70% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0.3;
  }
  100% {
    transform: translate(-50%, -50%) scale(3);
    opacity: 0;
  }
}

/* Confettis de coeurs (uniquement quand on like, pas quand on unlike) */
@keyframes floatHeart {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) scale(1.5) rotate(var(--rot));
  }
}

.confetti-heart {
  position: fixed;
  color: #ff3b5c;
  font-size: 1rem;
  pointer-events: none;
  z-index: 9999;
  animation: floatHeart 1s ease-out forwards;
  --tx: 0px;
  --ty: -60px;
  --rot: 0deg;
}

/* Adaptation mobile */
@media (max-width: 599px) {
  .like-btn.liked::after {
    width: 120%;
    height: 120%;
  }
  
  .confetti-heart {
    font-size: 0.8rem;
  }
}

/* Petite touche subtile au survol */
.like-btn:hover:not(.liked) .fa-regular {
  animation: heartPop 0.3s ease;
  color: #ff3b5c;
}

/* ===== ANIMATIONS DE TRANSITION POUR LES PRODUITS ===== */

/* Loader élégant */
.loader-container {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: white;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
  margin: 20px 0;
}

.loader-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid #f0f0f0;
  border-top: 4px solid #121212;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loader-text {
  font-size: 1.1rem;
  color: #666;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.loader-text::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
  display: inline-block;
  width: 24px;
  text-align: left;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

/* Message d'absence de produits */
.no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  background: white;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
  font-size: 1.2rem;
  color: #888;
  animation: fadeIn 0.5s ease;
}

.no-products i {
  font-size: 3rem;
  color: #ddd;
  margin-bottom: 20px;
  display: block;
}

/* Animation d'apparition des cartes produits */
.product-card {
  opacity: 1;
  animation: cardAppear 0.5s ease forwards;
  transform-origin: center;
  z-index: 1;
}

/* Délai progressif pour chaque carte */
.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }
.product-card:nth-child(7) { animation-delay: 0.35s; }
.product-card:nth-child(8) { animation-delay: 0.4s; }
.product-card:nth-child(9) { animation-delay: 0.45s; }
.product-card:nth-child(10) { animation-delay: 0.5s; }
.product-card:nth-child(11) { animation-delay: 0.55s; }
.product-card:nth-child(12) { animation-delay: 0.6s; }
.product-card:nth-child(n+13) { animation-delay: 0.65s; }

@keyframes cardAppear {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Animation de changement de filtre */
.product-grid {
  transition: opacity 0.3s ease;
}

.product-grid.fade-out {
  opacity: 0.5;
  pointer-events: none;
}

.product-grid.fade-in {
  opacity: 1;
}

/* Animation de survol améliorée */
.product-card {
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1),
              box-shadow 0.3s ease,
              border-color 0.2s ease;
}

.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 30px 40px -15px rgba(0,0,0,0.2);
}

/* Animation de l'image au survol */
.img-wrapper img {
  transition: transform 0.6s cubic-bezier(0.2, 0, 0, 1);
}

.product-card:hover .img-wrapper img {
  transform: scale(1.08);
}

/* Animation des boutons */
.order-btn {
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
  position: relative;
  overflow: hidden;
}

.order-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.order-btn:hover::before {
  width: 300px;
  height: 300px;
}

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

/* Animation des filtres */
.filter-btn {
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.filter-btn:hover::before {
  width: 200px;
  height: 200px;
}

.filter-btn.active {
  transform: scale(1.05);
}

/* Animation du message d'erreur */
.error-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #fff3f3;
  border-radius: 30px;
  color: #dc3545;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.error-message button {
  background: #dc3545;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s ease;
}

.error-message button:hover {
  background: #c82333;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(220, 53, 69, 0.2);
}

/* Animation du toast */
.order-toast {
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55),
              opacity 0.3s ease;
}

.order-toast.show {
  transform: translateY(0) scale(1);
}

.order-toast:not(.show) {
  transform: translateY(150%) scale(0.9);
}

@keyframes cardAppearMobile {
    0% {
      opacity: 0;
      transform: translateY(20px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }

/* Responsive */
@media (max-width: 599px) {
  .product-card {
    animation: cardAppearMobile 0.4s ease forwards;
  }
  
  .filter-btn.active {
    transform: scale(1.03);
  }
}

/* ========== FLÈCHE RETOUR EN HAUT ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #121212;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    border: 2px solid white;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: white;
    color: #121212;
    border-color: #121212;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.back-to-top:active {
    transform: translateY(0);
    transition: 0.1s;
}

/* Animation de pulsation légère quand le bouton apparaît */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 4px 25px rgba(0, 0, 0, 0.4);
    }
    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
}

.back-to-top.visible {
    animation: pulse 2s infinite;
}

/* Version responsive pour mobile */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Si vous voulez que la flèche soit au-dessus du footer-note */
.footer-note {
    position: relative;
    z-index: 1;
}

.back-to-top {
    z-index: 1000;
}


/* ===== NOUVEAUX STYLES POUR LE SITE COMPLET ===== */

/* Barre de recherche */
.search-bar {
  flex: 1;
  max-width: 500px;
  margin: 0 20px;
}

.search-form {
  display: flex;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 12px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  font-size: 16px;
  transition: all 0.3s;
  font-family: 'Inter', sans-serif;
}

.search-input:focus {
  border-color: #121212;
  outline: none;
  box-shadow: 0 0 0 4px rgba(0,0,0,0.05);
}

.search-btn {
  position: absolute;
  right: 5px;
  top: 5px;
  background: #121212;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
}

.search-btn:hover {
  background: #333;
  transform: scale(1.05);
}

/* Menu utilisateur */
.user-menu {
  display: flex;
  gap: 15px;
  align-items: center;
}

.user-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
  font-size: 12px;
  transition: all 0.3s;
  position: relative;
}

.user-menu-item i {
  font-size: 20px;
  margin-bottom: 4px;
}

.user-menu-item:hover {
  color: #121212;
  transform: translateY(-2px);
}

.cart-icon {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff3b5c;
  color: white;
  font-size: 10px;
  font-weight: bold;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Navigation principale */
.main-nav {
  background: white;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  margin-top: 15px;
  padding: 0 20px;
}

.nav-menu {
  display: flex;
  list-style: none;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0;
  gap: 30px;
  flex-wrap: wrap;
}

.nav-item {
  position: relative;
}

.nav-item > a {
  display: block;
  padding: 15px 0;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.3s;
}

.nav-item > a:hover {
  color: #121212;
}

.nav-item > a i {
  font-size: 12px;
  margin-left: 5px;
}

/* ===== STYLE DU DROPDOWN - IDENTIQUE SUR MOBILE ET DESKTOP ===== */

/* Style de base du dropdown (commun à tous les écrans) */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    padding: 12px 0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    border: 1px solid rgba(0,0,0,0.05);
}

/* Au survol sur desktop */
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Style des liens dans le dropdown */
.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.dropdown-menu li a i {
    width: 20px;
    color: #666;
    font-size: 14px;
}

.dropdown-menu li a:hover {
    background: #f5f5f5;
    color: #121212;
    padding-left: 25px;
}

/* Icône de la flèche */
.dropdown > a i {
    font-size: 12px;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

/* ===== VERSION MOBILE - MÊME STYLE MAIS OUVERTURE AU CLIC ===== */
@media (max-width: 768px) {
    /* Même style visuel que desktop */
    .dropdown-menu {
        position: absolute;  /* Garder le positionnement absolu */
        top: 100%;
        z-index: 9999;
        left: 0;
        min-width: 200px;
        max-height: 300px;
        overflow-y: auto;
        background: white;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s ease;
        padding: 10px 0;
        border: 1px solid #eee;
        /* Pas de fixed, pas de bottom:0, on garde le flux normal */
    }
    
    /* Ouverture au clic via la classe active */
    .dropdown.active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    /* Animation de la flèche */
    .dropdown.active > a i {
        transform: rotate(180deg);
    }
    
    /* Style des liens adapté au tactile */
    .dropdown-menu li a {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    /* Overlay pour fermer en cliquant ailleurs (optionnel) */
    body.dropdown-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.3);
        z-index: 999;
        pointer-events: none;
    }
}

/* Pour les très petits écrans, ajuster la position */
@media (max-width: 480px) {
    .dropdown-menu {
        min-width: 180px;
        left: -20px; /* Ajuster si nécessaire */
    }
}

/* Footer amélioré */
.site-footer {
  background: #1a1a1a;
  color: #fff;
  padding: 60px 0 0;
  margin-top: 60px;
}

.footer-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.footer-section h4 {
  color: #fff;
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-section h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: #ff3b5c;
}

.footer-section p {
  color: #999;
  line-height: 1.6;
  margin-bottom: 20px;
}

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

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a {
  color: #999;
  text-decoration: none;
  transition: all 0.3s;
}

.footer-section ul li a:hover {
  color: #fff;
  padding-left: 5px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: #333;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s;
}

.social-links a:hover {
  background: #ff3b5c;
  transform: translateY(-3px);
}

.newsletter-form {
  display: flex;
  margin-bottom: 20px;
}

.newsletter-form input {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 50px 0 0 50px;
  font-family: 'Inter', sans-serif;
}

.newsletter-form button {
  background: #ff3b5c;
  color: white;
  border: none;
  padding: 0 20px;
  border-radius: 0 50px 50px 0;
  cursor: pointer;
  transition: all 0.3s;
}

.newsletter-form button:hover {
  background: #e62e4d;
}

.payment-methods {
  display: flex;
  gap: 15px;
  font-size: 30px;
  color: #999;
}

.footer-bottom {
  margin-top: 60px;
  padding: 20px;
  text-align: center;
  border-top: 1px solid #333;
  color: #999;
}

.footer-bottom a {
  color: #fff;
  text-decoration: none;
}

/* Page produit détaillée */
.product-detail-container {
  max-width: 1440px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.product-images {
  position: relative;
}

.main-image {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 20px;
}

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

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.thumbnail {
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.3s;
}

.thumbnail.active, .thumbnail:hover {
  opacity: 1;
  transform: scale(1.05);
}

.thumbnail img {
  width: 100%;
  height: 80px;
  object-fit: cover;
}

.product-info-detail {
  padding: 20px;
}

.product-category {
  color: #999;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.product-title-detail {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
}

.product-price-detail {
  font-size: 28px;
  font-weight: 700;
  color: #121212;
  margin-bottom: 30px;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
}

.stars {
  color: #ffc107;
  font-size: 18px;
}

.reviews-count {
  color: #666;
}

.product-description {
  margin-bottom: 30px;
  line-height: 1.8;
  color: #666;
}

/* Options de produit */
.product-options {
  margin-bottom: 30px;
}

.option-group {
  margin-bottom: 20px;
}

.option-label {
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}

.size-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.size-btn {
  width: 50px;
  height: 50px;
  border: 2px solid #e0e0e0;
  background: white;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.size-btn:hover, .size-btn.active {
  background: #121212;
  color: white;
  border-color: #121212;
}

.color-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.color-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #e0e0e0;
  cursor: pointer;
  transition: all 0.3s;
}

.color-btn:hover, .color-btn.active {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px white, 0 0 0 4px #121212;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  width: fit-content;
  padding: 5px;
}

.qty-btn {
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s;
}

.qty-btn:hover {
  background: #f5f5f5;
  border-radius: 50%;
}

.qty-input {
  width: 50px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  border: none;
}

/* Boutons d'action */
.product-actions {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

.add-to-cart-btn {
  flex: 2;
  background: #121212;
  color: white;
  border: none;
  padding: 16px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.add-to-cart-btn:hover {
  background: #333;
  transform: translateY(-2px);
}

.wishlist-btn {
  flex: 1;
  background: white;
  color: #121212;
  border: 2px solid #121212;
  padding: 16px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.wishlist-btn:hover {
  background: #121212;
  color: white;
}

/* Section avis */
.reviews-section {
  max-width: 1440px;
  margin: 60px auto;
  padding: 0 20px;
}

.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.reviews-header h2 {
  font-size: 24px;
}

.write-review-btn {
  background: none;
  border: 2px solid #121212;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.write-review-btn:hover {
  background: #121212;
  color: white;
}

.review-card {
  background: white;
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.reviewer-name {
  font-weight: 600;
}

.review-date {
  color: #999;
  font-size: 14px;
}

.review-text {
  color: #666;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .product-detail-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .search-bar {
    order: 3;
    max-width: 100%;
    margin: 10px 0;
  }
  
  .user-menu span {
    display: none;
  }
  
  .nav-menu {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 10px 0;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .footer-container {
    grid-template-columns: 1fr;
  }
}

/* Ajouter à index.css */

/* Header scrollé */
.sticky-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 9999;
    border-left: 4px solid;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left-color: #28a745;
}

.notification-success i {
    color: #28a745;
}

.notification-warning {
    border-left-color: #ffc107;
}

.notification-warning i {
    color: #ffc107;
}

/* Toast panier */
.cart-toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #121212;
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: translateY(150%);
    transition: transform 0.3s ease;
    z-index: 9999;
}

.cart-toast.show {
    transform: translateY(0);
}

.cart-toast i {
    color: #4CAF50;
    font-size: 20px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 30px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section produits similaires */
.similar-products {
    max-width: 1440px;
    margin: 60px auto;
    padding: 0 20px;
}

.similar-products h2 {
    font-size: 24px;
    margin-bottom: 30px;
}

/* Informations livraison */
.delivery-info {
    margin-top: 30px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 16px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item i {
    width: 24px;
    color: #121212;
    font-size: 18px;
}

.info-item span {
    color: #666;
    font-size: 14px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 1px solid #eee;
}

.page-link:hover, .page-link.active {
    background: #121212;
    color: white;
    border-color: #121212;
}

/* Badges et labels */
.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff3b5c;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

.badge-new {
    background: #4CAF50;
}

.badge-sale {
    background: #ff3b5c;
}

/* Loading states */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Responsive amélioré */
@media (max-width: 768px) {
    .notification {
        left: 20px;
        right: 20px;
        transform: translateY(-200%);
        width: auto;
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .modal-content {
        padding: 20px;
    }
}

/* ===== CORRECTIONS POUR MOBILE ===== */

/* Header - meilleur agencement mobile */
@media (max-width: 768px) {
    .sticky-header {
        padding: 0.5rem 0.5rem;
    }
    
    .header-container {
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.3rem 0;
    }
    
    /* Logo plus compact */
    .logo {
        flex: 0 0 auto;
    }
    
    .logo-image {
        height: 30px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    /* Barre de recherche - prend toute la largeur en dessous */
    .search-bar {
        order: 3;
        flex: 0 0 100%;
        max-width: 100%;
        margin: 0.3rem 0;
    }
    
    .search-input {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .search-btn {
        width: 34px;
        height: 34px;
        right: 3px;
        top: 3px;
    }
    
    /* Menu utilisateur plus compact */
    .user-menu {
        gap: 8px;
        margin-left: auto;
    }
    
    .user-menu-item {
        font-size: 10px;
    }
    
    .user-menu-item i {
        font-size: 18px;
        margin-bottom: 2px;
    }
    
    .user-menu-item span {
        display: none; /* Cache le texte sur mobile, seulement les icônes */
    }
    
    .cart-count {
        width: 16px;
        height: 16px;
        font-size: 9px;
        top: -5px;
        right: -5px;
    }
}

/* Navigation mobile - version avec dropdown fonctionnel */
@media (max-width: 768px) {
    .main-nav {
        margin-top: 0.5rem;
        padding: 0 0.5rem;
        width: 100%;
        position: relative;
    }
    
    .nav-menu {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 1rem;
        padding: 0.2rem 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .nav-menu::-webkit-scrollbar {
        display: none;
    }
    
    .nav-item {
        position: relative;
        flex-shrink: 0;
    }
    
    .nav-item > a {
        padding: 10px 0;
        font-size: 14px;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 4px;
    }
    
    .nav-item > a i {
        display: inline-block;
        font-size: 10px;
        transition: transform 0.3s ease;
    }
}


/* Grille de produits - ajustement pour petits écrans */
@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
        padding: 0 0.5rem;
        margin: 1rem auto;
    }
    
    .product-card {
        border-radius: 16px;
    }
    
    .product-info {
        padding: 0.6rem 0.4rem 0.8rem;
    }
    
    .product-title {
        font-size: 0.8rem;
        line-height: 1.2;
        margin: 0.1rem 0;
    }
    
    .product-price {
        font-size: 1rem;
    }
    
    .order-btn {
        padding: 0.5rem 0;
        font-size: 0.8rem;
        margin-top: 0.5rem;
    }
    
    .order-btn i {
        font-size: 0.9rem;
    }
}

/* Très petits écrans */
@media (max-width: 360px) {
    .product-grid {
        gap: 0.4rem;
    }
    
    .product-title {
        font-size: 0.7rem;
    }
    
    .product-price {
        font-size: 0.9rem;
    }
}

/* Overlay actions - mieux adapté au tactile */
@media (max-width: 768px) {
    .action-overlay {
        opacity: 0.8 !important; /* Toujours visible sur mobile */
        padding: 0.5rem 0.4rem;
    }
    
    .like-btn, .share-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .share-btn {
        padding: 0 0.4rem;
        font-size: 0.7rem;
    }
    
    .share-btn i {
        font-size: 0.8rem;
        margin-right: 2px;
    }
    
    .share-menu {
        bottom: 40px;
    }
    
    .share-menu a {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}

/* Footer - version mobile */
@media (max-width: 768px) {
    .site-footer {
        padding: 40px 0 0;
        margin-top: 40px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 20px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .newsletter-form {
        max-width: 300px;
        margin: 0 auto 20px;
    }
    
    .footer-bottom {
        margin-top: 30px;
        padding: 15px;
        font-size: 12px;
    }
}

/* Toast notifications - mieux positionné sur mobile */
@media (max-width: 768px) {
    .order-toast {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        max-width: none;
        border-radius: 40px;
    }
    
    .notification {
        top: 10px;
        left: 10px;
        right: 10px;
        transform: translateY(-200%);
        font-size: 0.9rem;
        padding: 12px 15px;
    }
}

/* Amélioration du scroll des filtres */
.filter-bar {
    padding: 0.5rem 0.5rem;
    margin: 0 -0.5rem;
    width: calc(100% + 1rem);
}

@media (max-width: 768px) {
    .filter-bar {
        margin-top: 0.5rem;
        padding: 0.2rem 0.5rem;
    }
    
    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
    
    .filter-btn i {
        font-size: 0.8rem;
        margin-right: 4px;
    }
}

/* Fix pour les images qui débordent */
.img-wrapper {
    aspect-ratio: 3/4;
    max-height: none;
}

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

/* Amélioration du touch sur les boutons */
button, 
.order-btn, 
.filter-btn, 
.like-btn, 
.share-btn,
.nav-item a {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Fix pour le header sticky sur mobile */
.sticky-header {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* Animation pour l'overlay */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== NOUVEAU : BARRE DE FILTRES COMME DANS TIFLELAKAY ===== */
/* CORRECTIONS URGENTES POUR LES FILTRES SUR MOBILE */

/* S'assurer que la barre de filtres est visible et fonctionnelle */
.filter-bar-container {
    width: 100%;
    background: white;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 0.8rem 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    z-index: 100;
}

.filter-bar-container::-webkit-scrollbar {
    display: none;
}

.filter-bar {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    min-width: max-content;
}

.filter-btn {
    background: #f5f5f5;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 40px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.filter-btn i {
    font-size: 1rem;
    color: #666;
}

.filter-btn.active {
    background: #121212;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.filter-btn.active i {
    color: white;
}

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

/* Assurer que la grille de produits s'affiche correctement */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem;
    max-width: 1440px;
    margin: 0 auto;
    min-height: 300px;
}

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

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

/* DEBUG - Ajouter une bordure temporaire pour voir les éléments */
.filter-btn {
    border: 1px solid transparent;
}

/* Correction pour mobile */
@media (max-width: 767px) {
    .filter-bar {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .filter-btn i {
        font-size: 0.9rem;
    }
    
    /* S'assurer que le header sticky n'écrase rien */
    .sticky-header {
        position: relative;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Animation pour le changement de filtre */
.product-grid.fade-out {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.product-grid.fade-in {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ===== BARRE DE CATÉGORIES CENTRÉE ===== */
.categories-bar-container {
    width: 100%;
    background: white;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 0.6rem 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-top: 0.2rem;
}


/* Ajout d'un conteneur interne pour centrer sur desktop */
.categories-bar-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: center; /* ← Centre sur desktop */
}


.categories-bar-container::-webkit-scrollbar {
    display: none;
}

.categories-bar {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: nowrap;       /* Pas de retour à la ligne → scroll horizontal */
    padding: 2px 0;          /* Petit espace pour que le box-shadow soit visible */
}

.category-btn {
    background: #f5f5f5;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.85rem;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.category-btn i {
    font-size: 0.9rem;
    color: #666;
}

.category-btn.active {
    background: #121212;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.category-btn.active i {
    color: white;
}

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

/* Style pour le menu utilisateur simplifié */
.user-menu-item span:not(.cart-count) {
    display: none; /* Cache le texte, garde seulement les icônes */
}

.user-menu {
    gap: 15px;
}

.user-menu-item i {
    font-size: 1.3rem;
}

.cart-count {
    top: -5px;
    right: -8px;
}

/* Responsive */
@media (max-width: 768px) {
    .categories-bar-container {
        padding: 0.5rem 0.8rem;
    }
    
    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .category-btn i {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .categories-bar {
        gap: 0.4rem;
    }
    
    .category-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
}

/* CORRECTION POUR HEADER STICKY SUR MOBILE */
@media (max-width: 768px) {
    .sticky-header {
        position: sticky !important; /* Force le sticky même sur mobile */
        top: 0 !important;
        z-index: 1001 !important;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    /* Ajustement pour que le contenu ne passe pas sous le header */
    main {
        padding-top: 0.5rem;
    }
    
    /* Correction pour la barre de catégories */
    .categories-bar-container {
        background: white;
        border-top: 1px solid #eee;
        margin-top: 0;
    }
}

/* Pour très petits écrans */
@media (max-width: 480px) {
    .sticky-header {
        padding: 0.3rem 0.5rem;
    }
}

/* Badge pour les favoris dans le header */
.favorite-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff3b5c;
    color: white;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none; /* Caché par défaut */
}

/* Style pour le lien actif dans le menu */
.user-menu-item.active i {
    color: #ff3b5c;
}

/* Styles pour l'icône des favoris */
.user-menu-item .fa-heart {
    transition: color 0.3s ease;
}

/* Style quand il y a des favoris */
.user-menu-item.has-favorites .fa-heart {
    color: #ff3b5c;
}

/* Style au survol */
.user-menu-item:hover .fa-heart {
    transform: scale(1.1);
}

/* Animation quand on ajoute un favori */
@keyframes heartBeat {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.user-menu-item.has-favorites .fa-heart {
    animation: heartBeat 0.4s ease;
}

/* Badge des favoris */
.favorite-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff3b5c;
    color: white;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none; /* Caché par défaut */
    transition: all 0.3s ease;
}

