/* Titre des blocs produits */
.titre-bloc {
  font-size: 2rem;
  font-weight: bold;
  margin: 60px 0 30px 0;
  text-align: center;
  color: #7a4c15;
  letter-spacing: 1px;
  z-index: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Lien "Voir tous" à côté du titre */
.voir-tous-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(122, 76, 21, 0.1);
  color: #7a4c15;
  padding: 8px;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  width: 32px;
  height: 32px;
}

.voir-tous-link:hover {
  background: #7a4c15;
  color: white;
  transform: translateX(3px);
  text-decoration: none;
}

.voir-tous-link svg {
  width: 20px;
  height: 20px;
}

/* CSS commun responsive pour TOUTES les pages */
html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
#main {
  width: 100%;
  min-height: 200px;
  margin: 0;
  padding: 40px 0 0px 0;
  z-index: 1;
  position: relative;
}
header#header {
  position: static;
}
#main .content-block {
  width: 100%;
  min-height: 312px; /* correspond à la hauteur d'une flip-card */
  margin: 0 0 60px 0;
  padding: 0;
  transition: min-height 0.2s;
  overflow: visible;
}
#main .content-block:empty {
  min-height: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  overflow: hidden;
}
#foot {
  width: 100%;
  min-height: 120px;
  background: #f5f5f5;
  text-align: center;
  padding: 40px 0 10px 0;
  margin: 0;
  position: relative;
  z-index: 2;
}
.produits-flip {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}
.flip-card {
  background: transparent;
  width: 200px;
  height: 312px;
  /* 250px + 25% = 312px */
  perspective: 1200px;
  position: relative;
}

/* Lien cliquable autour de la carte */
.flip-card-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  pointer-events: none; /* Empêche le flip au clic */
}

/* Flip uniquement au hover de la carte */
.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

/* Agrandir le texte du nom quand l'image flip */
.flip-card:hover .nom-produit {
  font-size: 16px;
  transition: font-size 0.3s ease;
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}
.flip-card-front img, .flip-card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin-top: 0;
}
.flip-card-back {
  transform: rotateY(180deg);
}

/* Overlay pour les infos produit et bouton panier - au-dessus du flip */
.product-info-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  padding: 12px 8px 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.product-info-overlay .btn-panier {
  pointer-events: auto;
}

.nom-produit {
  text-align: center;
  margin-top: 0;
  margin-bottom: 4px;
  font-weight: bold;
  padding-top: 0;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
  font-size: 13px;
  line-height: 1.2;
}

/* Informations produit et actions */
.product-info {
  text-align: center;
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.prix-produit {
  text-align: center;
  margin: 4px 0 8px 0;
  font-size: 14px;
  color: #ffeb3b;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* Bouton Panier (centré, petit, rond) */
.btn-panier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  font-size: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #c20450ff;
  color: white;
  width: 32px;
  height: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  padding: 0;
}

.btn-panier svg {
  width: 24px;
  height: 24px;
  stroke: white;
  stroke-width: 2.5;
}

.btn-panier:hover {
  background: #ab0466ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(194, 4, 80, 0.4);
}

.btn-panier:active {
  transform: translateY(0);
}

.btn-panier:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Bouton Panier (centré, largeur limitée) */
.btn-panier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 2px 6px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-family: inherit;
  background: #ab0466ff;
  color: white;
  max-width: 120px;
}

.btn-panier:hover {
  background: #ab0466ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.btn-panier:active {
  transform: translateY(0);
}

.btn-panier:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 900px) {
  .flip-card {
    width: 45vw;
    height: 37.5vw;
    min-width: 140px;
    min-height: 225px;
    max-width: 220px;
    max-height: 375px;
  }
}
@media (max-width: 600px) {
  .produits-flip {
    gap: 10px;
  }
  .flip-card {
    width: 90vw;
    height: 62.5vw;
    min-width: 120px;
    min-height: 150px;
    max-width: 100vw;
    max-height: 275px;
  }
  #main {
    padding: 120px 2vw 120px 2vw;
  }
}
