/* ============================================
   boutique.css — v2
   Catalogue produits côté client.
   Design premium avec hover effects et badges.
   ============================================ */

.boutique-entete {
  background: linear-gradient(135deg, var(--nuit) 0%, #1a3a55 60%, var(--nuit-clair) 100%);
  color: var(--sable);
  padding: 50px 0 44px;
  position: relative;
  overflow: hidden;
}

/* Cercle décoratif en arrière-plan */
.boutique-entete::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 93, 44, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.boutique-entete h1 {
  font-size: clamp(26px, 4vw, 38px);
  color: white;
  margin-bottom: 8px;
}

.boutique-entete p {
  color: rgba(243, 233, 210, 0.8);
  font-size: 15px;
}

/* ---------- Grille produits ---------- */
.grille-produits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
  margin: 32px 0 80px;
}

/* ---------- Carte produit ---------- */
.carte-produit {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(19, 42, 62, 0.07);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.carte-produit:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(19, 42, 62, 0.16);
}

/* Image produit */
.carte-produit-image {
  width: 100%;
  height: 200px;
  background-color: var(--sable);
  overflow: hidden;
  position: relative;
}

.carte-produit-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carte-produit:hover .carte-produit-image img {
  transform: scale(1.08);
}

/* Overlay "Voir le produit" au survol */
.carte-produit-image::after {
  content: "Voir le produit →";
  position: absolute;
  inset: 0;
  background-color: rgba(19, 42, 62, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  font-family: var(--police-corps);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.carte-produit:hover .carte-produit-image::after {
  opacity: 1;
}

/* Contenu texte */
.carte-produit-contenu {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.carte-produit-nom {
  font-family: var(--police-titre);
  font-weight: 600;
  font-size: 16px;
  color: var(--nuit);
  margin-bottom: 10px;
  line-height: 1.3;
  flex: 1;
}

.carte-produit-bas {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.carte-produit-prix {
  color: var(--corail);
  font-weight: 700;
  font-size: 16px;
}

/* Bouton + panier */
.carte-produit-bouton {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--nuit);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.carte-produit-bouton:hover:not(:disabled) {
  background-color: var(--corail);
  transform: scale(1.15);
}

.carte-produit-bouton:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* Badges stock */
.badge-dispo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background-color: rgba(30, 158, 92, 0.10);
  color: var(--succes);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
  width: fit-content;
}

.badge-rupture {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background-color: rgba(214, 69, 69, 0.10);
  color: var(--erreur);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
  width: fit-content;
}

/* Shimmer skeleton loading */
.skeleton-carte {
  border-radius: 16px;
  height: 290px;
  background: linear-gradient(90deg, #f5f1e8 25%, #ede8dd 50%, #f5f1e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

/* Barre de recherche */
.barre-recherche {
  width: 100%;
  padding: 13px 18px 13px 44px;
  border-radius: 999px;
  border: 1.5px solid #E4DECF;
  font-family: var(--police-corps);
  font-size: 14.5px;
  background-color: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%235C6B66' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 14px center;
  color: var(--nuit);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--ombre-douce);
}

.barre-recherche:focus {
  outline: none;
  border-color: var(--sarcelle);
  box-shadow: 0 0 0 3px rgba(14, 138, 136, 0.12);
}

/* Bandeau catégories amélioré */
.bandeau-categories {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 22px 0 16px;
  scrollbar-width: none;
}
.bandeau-categories::-webkit-scrollbar { display: none; }

.categorie-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.categorie-item:hover { transform: translateY(-3px); }

.categorie-icone {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background-color: var(--sable);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(19,42,62,0.06);
}

.categorie-item:hover .categorie-icone,
.categorie-item.actif .categorie-icone {
  background-color: var(--corail);
  box-shadow: 0 4px 12px rgba(232, 93, 44, 0.35);
}

.categorie-item span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gris-texte);
  text-align: center;
}

/* Responsive */
@media (max-width: 600px) {
  .grille-produits {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }
  .carte-produit-image {
    height: 150px;
  }
  .carte-produit-image::after {
    display: none; /* Pas de hover overlay sur mobile */
  }
}
