/* vente.css */

body.vente-page {
  background: #f4f4f4;
  color: #222;
  font-family: 'TAModernTimes', sans-serif;
  margin: 0;
  padding: 0;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 80px;
}

.cadeau-banner {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
}

.cadeau-icon {
  width: 48px;
  height: 48px;
  background-image: url('../img/gift-icon.svg');
  background-size: cover;
  animation: shakeGift 1.5s infinite;
  cursor: pointer;
}

@keyframes shakeGift {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(10deg); }
  50% { transform: rotate(-10deg); }
  75% { transform: rotate(5deg); }
}

.popup-personnalisation {
  display: none;
  position: fixed;
  z-index: 10000;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  color: black;
}

.popup-personnalisation.visible {
  display: flex;
}

.popup-content {
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  position: relative;
  color: black;
}

.popup-content h2 {
  font-family: 'TAModernTimes';
  margin-bottom: 1rem;
  color: black;
}

.popup-content p {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: black;
}

.btn-formulaire {
  display: inline-block;
  padding: 0.6rem 1rem;
  background: #000;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  border-radius: 6px;
  font-size: 1rem;
  transition: background 0.3s ease;
}

.btn-formulaire:hover {
  background: #444;
}

.popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
  font-size: 1.5rem;
}

.filtrage-header {
  text-align: center;
  margin: 2rem auto 1rem;
}

.toggle-filtres {
  padding: 0.5rem 1rem;
  border: 2px solid #222;
  background: none;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
  border-radius: 5px;
  color: black;
}

.toggle-filtres:hover {
  background: #000000;
  color: white;
}

.filtres-budget {
  display: none;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.filtres-budget.visible {
  display: flex;
}

.filtres-budget button {
  padding: 0.4rem 0.8rem;
  border: none;
  background: #222;
  color: #fff;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: 0.3s;
}

.filtres-budget button.active {
  background: #e91e63;
}

.filtres-budget button:hover {
  background: #000;
}

.reset-filters {
  background: transparent;
  border: 1px solid #999;
  padding: 0.4rem 0.8rem;
  color: #333;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-left: 1rem;
}

.vente-main h1 {
  text-align: center;
  font-size: 2rem;
  margin: 6rem 1rem 1rem;
  font-family: 'Watch', sans-serif;
  color: black;
}

.produits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  padding: 1rem;
  max-width: 1200px;
  margin: auto;
}

.produit-card {
  perspective: 1000px;
  position: relative;
  height: 300px;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.card-front,
.card-back {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  overflow: hidden;
  backface-visibility: hidden;
}

.card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.card-front .prix-produit {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 2px 8px;
  font-size: 0.75rem;
  border-radius: 5px;
  font-weight: bold;
}

.card-back {
  background: #00000091;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: rotateY(180deg);
  padding: 1rem;
  font-size: 0.9rem;
  text-align: center;
}

.card-back h2 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.card-back p {
  font-size: 0.9rem;
  margin: 0;
}

.voir-btn {
  margin-top: 0.5rem;
  padding: 0.4rem 1rem;
  background: #000;
  color: #fff;
  border: none;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.85rem;
}

.produit-card:hover .card-inner {
  transform: rotateY(180deg);
}

.pagination {
  text-align: center;
  margin: 2rem auto 0;
}

.pagination button {
  margin: 0 0.3rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid #222;
  background: #fff;
  color: #000;
  font-weight: bold;
  cursor: pointer;
  border-radius: 4px;
}

.pagination button:hover {
  background: #eee;
}

/* Fond animé étoiles vertes */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(0,255,0,0.08) 1px, transparent 1px);
  background-size: 20px 20px;
  animation: sparkle 4s linear infinite;
  z-index: 0;
}

@keyframes sparkle {
  0% { background-position: 0 0; }
  100% { background-position: 20px 20px; }
}

@media (max-width: 768px) {
  .produits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .popup-content {
    width: 90%;
    padding: 1rem;
  }
  .btn-formulaire {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
  .card-front .prix-produit {
    font-size: 0.65rem;
    padding: 2px 6px;
  }
}
