/* =========================================
   TEMPLATE — PACK
   Même logique visuelle que Flyer
========================================= */

/* =========================
   PAGE
========================= */

body.pack-page .page-title{
  margin-top: 2rem;
}

/* Section pack */
.template-pack-section{
  padding: 3rem 0 4rem;
  margin-bottom: 4rem;
}

/* =========================
   GRILLE PRINCIPALE
========================= */

#template-gallery.template-pack-container{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 380px));
  justify-content: center;
  gap: 30px;

  max-width: 1320px;
  margin: 1.5rem auto 0;
  padding: 0 20px;
}

/* =========================
   ITEM
========================= */

.template-pack-item{
  width: 100%;
  max-width: 380px;
  margin: 0 auto;

  position: relative;
  overflow: hidden;

  background: #fff;
  box-shadow: 0 0 12px rgba(0,0,0,0.1);
}

.template-pack-item img{
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.template-pack-wrapper{
  position: relative;
}

.template-pack-wrapper:hover img{
  transform: scale(1.05);
}

/* =========================
   OVERLAY
========================= */

.template-pack-overlay{
  position: absolute;
  inset: 0;

  background: rgba(0,0,0,0.75);
  color: #fff;

  padding: 20px;

  opacity: 0;
  transition: opacity 0.3s ease;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;
  gap: 10px;

  box-sizing: border-box;
}

.template-pack-wrapper:hover .template-pack-overlay{
  opacity: 1;
}

.template-pack-wrapper:focus-within .template-pack-overlay{
  opacity: 1;
}

.template-pack-wrapper:focus-visible{
  outline: 2px solid var(--cta);
  outline-offset: 4px;
}

.template-pack-overlay h3{
  font-size: clamp(1rem, 2.2vw, 1.1rem);
  margin: 0;
}

.template-pack-overlay p{
  font-size: clamp(0.82rem, 1.9vw, 0.95rem);
  margin: 0;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px){
  #template-gallery.template-pack-container{
    grid-template-columns: minmax(260px, 380px);
    gap: 20px;
    padding: 0 16px;
  }
}

/* =========================
   ACCESSIBILITÉ
========================= */

@media (prefers-reduced-motion: reduce){
  .template-pack-item img,
  .template-pack-overlay{
    transition: none;
  }

  .template-pack-wrapper:hover img{
    transform: none;
  }
}

