/* =========================================
   TEMPLATE — DETAIL CARTE
   Aligné avec la page collection
========================================= */

/* 1) SAS BLANC : le dégradé ne touche pas le header */
body.template-page .template-main{
  padding-top: 4rem; /* espace blanc avant le dégradé */
}

/* =========================
   Override espace bas uniquement page détail
========================= */
body.template-page.template-detail-page .template-main{
  padding-bottom: 1rem;
}

/* 2) SECTION : même dégradé que la collection (animé) */
.template-section.template-detail{
  margin-top: 0;              /* c'est le main qui crée l'espace blanc */
  padding: 5rem 1rem 6rem;    /* respiration interne */

  background: linear-gradient(
    120deg,
    rgba(34, 58, 88, 1),
    rgba(70, 110, 155, 1),
    rgba(34, 58, 88, 1)
  );
  background-size: 220% 220%;
  animation: bpwGradientMove 14s ease-in-out infinite;
}

/* respecte reduced motion */
@media (prefers-reduced-motion: reduce){
  .template-section.template-detail{ animation: none; }
}

/* 3) PLATEAU BLANC CENTRAL */
.template-detail-grid{
  max-width: 1080px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 20px 60px rgba(0,0,0,.12);
  padding: 3rem;

  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3.5rem;
}

/* Image */
.template-detail-cover img{
  width: 100%;
  height: auto;
  display: block;
}

/* Colonne droite */
.template-detail-info{
  display: flex;
  flex-direction: column;
}

/* Titre */
.template-detail-title{
  margin: 0 0 1rem;
  font-size: 1.9rem;
  line-height: 1.2;
}

/* Meta */
.template-detail-meta{
  margin-bottom: 1rem;
}

/* Description */
.template-detail-description{
  margin-bottom: 1.6rem;
  line-height: 1.7;
}

/* Prix */
.template-detail-price{
  font-size: 1.4rem;
  font-weight: 800;
  margin: .2rem 0 1.5rem;
}

/* 5) CTA : bouton achat = même style que le HUB */
.template-detail-cta{
  margin-bottom: .8rem;
}

/* Sur la page détail, le hover doit être direct (pas de .hub-card:hover) */
.template-detail-cta .hub-btn:hover{
  background: var(--cta-hover);
  transform: translateY(-2px);
}

/* état désactivé */
.template-detail-cta .hub-btn.is-disabled,
.template-detail-cta .hub-btn[aria-disabled="true"]{
  opacity: .55;
  pointer-events: none;
}

/* Notes */
.template-detail-note{
  font-size: .95rem;
  line-height: 1.55;
  margin: .8rem 0 0;
  opacity: .9;
}

/* Mention juridique produit numérique */
.template-detail-digital{
  margin-top: 8px;
  font-size: 0.85rem;
  line-height: 1.55;
  color: #666;
  max-width: 420px;
}

/* 6) Bloc pack */
.template-detail-files{
  margin-top: 1.2rem;
  padding-top: .8rem;
}

.template-detail-files h2{
  font-size: 1.05rem;
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Liste fichiers */
.template-file-list{
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.template-file-list li{
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px dashed rgba(0,0,0,.12);
}

.template-file-label{
  font-weight: 600;
}

.template-file-type{
  font-weight: 800;
  opacity: .75;
}

/* Responsive */
@media (max-width: 980px){
  body.template-page .template-main{
    padding-top: 2.2rem;
  }

  .template-detail-grid{
    grid-template-columns: 1fr;
    padding: 2rem;
    gap: 2rem;
  }
}