/* ============================================================
   BOUTIQUE UPC — VERSION FINALE CORRIGÉE
   Cohérente avec styles.css + index.html
   ============================================================ */


/* === WRAP & SECTIONS === */
.boutique-section,
.boutique-cart,
.boutique-hero {
  padding: 60px 0;
}

.wrap {
  width: min(1200px, 90%);
  margin: 0 auto;
}


/* === SECTION HEAD === */
.section-head {
  margin-bottom: 40px;
}

.section-head .tag {
  display: inline-block;
  background: var(--rouge);
  color: #fff;
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: 4px;
  margin-bottom: 10px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
  font-weight: 700;
  color: var(--texte);
}

.section-head p {
  margin-top: 10px;
  color: var(--gris);
}


/* === HERO BOUTIQUE === */
.boutique-hero {
  background: var(--pierre-2);
  text-align: center;
}

.boutique-hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  margin: 20px 0 10px;
}

.boutique-hero .lead {
  max-width: 60ch;
  margin: 0 auto;
  color: #444;
}


/* === GRID PRODUITS === */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  padding: 40px 0;
}


/* === CARTE PRODUIT === */
.product-card {
  position: relative;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  transform: translateY(0);
  opacity: 0;
  animation: fadeInZoom 0.8s forwards;
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}


/* === IMAGE PRODUIT === */
.product-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover img {
  transform: scale(1.06);
}


/* === INFO PRODUIT === */
.product-info {
  padding: 22px;
  text-align: center;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.product-info h4 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--texte);
}

.product-info p {
  margin: 0 0 14px;
  font-size: 0.95rem;
  color: #555;
}

.product-info .price {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--rouge);
}


/* === BOUTON === */
.product-card button {
  padding: 12px 20px;
  background: var(--rouge);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background .25s ease;
  margin-top: auto;
}

.product-card button:hover {
  background: var(--rouge-2);
}


/* === BADGE INDISPONIBLE === */
.badge-unavailable {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--rouge);
  color: #fff;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 4px;
  z-index: 10;
}


/* === PRODUIT INDISPONIBLE === */
.product-card.unavailable img {
  filter: grayscale(100%);
  opacity: 0.55;
}

.product-card.unavailable button {
  background: #aaa !important;
  cursor: not-allowed;
}


/* === ANIMATION === */
@keyframes fadeInZoom {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}


/* === PANIER === */
.cart-box .item {
  background: #fff;
  border: 1px solid #eee;
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-box button {
  background: var(--rouge);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.cart-box button:hover {
  background: var(--rouge-2);
}


/* === CHECKOUT === */
#checkout {
  background: var(--rouge);
  color: #fff;
  border: none;
  padding: 14px 22px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
}

#checkout:hover {
  background: var(--rouge-2);
}


/* === SECTION PRODUITS SOMBRE (harmonie index) === */
.boutique-section.dark-section {
  background: var(--pierre-2);
  padding: 60px 0;
}

.boutique-section.dark-section .section-head h2 {
  color: var(--texte);
}

.boutique-section.dark-section .section-head p {
  color: var(--gris);
}

/* Cartes produits sur fond sombre */
.boutique-section.dark-section .product-card {
  background: #fff;
  color: var(--texte);
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.boutique-section.dark-section .product-card img {
  filter: none;
}

.boutique-section.dark-section .product-info h4 {
  color: var(--texte);
}

.boutique-section.dark-section .product-info p {
  color: #555;
}

.boutique-section.dark-section .price {
  color: var(--rouge);
}

/* ============================================================
   MODE SOMBRE UPC — SECTION PRODUITS
   ============================================================ */

.boutique-section.dark-section {
  background: #1b1a17; /* sombre pompier UPC */
  padding: 60px 0;
}

/* Titres */
.boutique-section.dark-section .section-head h2,
.boutique-section.dark-section .section-head h3 {
  color: #f4f2ec; /* clair UPC */
}

/* Sous-titres */
.boutique-section.dark-section .section-head p {
  color: #d6d3cd; /* gris clair UPC */
}

/* Tag */
.boutique-section.dark-section .tag.mono {
  background: #b00;
  color: #fff;
}

/* Cartes produits */
.boutique-section.dark-section .product-card {
  background: #2a2926; /* pierre sombre UPC */
  color: #f4f2ec;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}

/* Images */
.boutique-section.dark-section .product-card img {
  filter: brightness(0.85);
}

/* Titres produits */
.boutique-section.dark-section .product-info h4 {
  color: #f4f2ec;
}

/* Descriptions */
.boutique-section.dark-section .product-info p {
  color: #d6d3cd;
}

/* Prix */
.boutique-section.dark-section .price {
  color: #ff3b3b; /* rouge pompier */
}

/* Boutons */
.boutique-section.dark-section .product-card button {
  background: #b00;
}

.boutique-section.dark-section .product-card button:hover {
  background: #d00;
}
