/* ==========================================================================
   produit.css — Page fiche produit
   Layout 2 colonnes desktop : galerie (gauche) + buybox sticky (droite).
   Sections détail empilées en dessous, container narrow pour la lecture.
   ========================================================================== */

/* ==========================================================================
   FIL D'ARIANE
   ========================================================================== */

.breadcrumb {
  background-color: var(--color-bg-light);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--fs-sm);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  color: var(--color-text-muted);
}

.breadcrumb__item a {
  color: var(--color-text-muted);
  text-decoration: none;
}
.breadcrumb__item a:hover { color: var(--color-cta); }

.breadcrumb__item[aria-current="page"] {
  color: var(--color-text);
  font-weight: var(--fw-medium);
}

.breadcrumb__sep {
  color: var(--color-border-strong);
}

/* ==========================================================================
   PRODUCT HERO (galerie + buybox)
   ========================================================================== */

.product-hero {
  padding-block: var(--space-6);
}

@media (min-width: 1024px) {
  .product-hero { padding-block: var(--space-7); }
}

.product-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 1024px) {
  .product-hero__grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 1fr);
    gap: var(--space-7);
    align-items: start;
  }
}

/* ==========================================================================
   GALERIE
   ========================================================================== */

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.gallery__main {
  position: relative;
  background-color: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.gallery__main-btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: zoom-in;
}

.gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery__main-btn:hover img {
  transform: scale(1.02);
}

.gallery__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: var(--color-text-muted);
  background: linear-gradient(135deg, #EEEDEA 0%, #F7F5F2 100%);
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}

.gallery__thumb {
  display: block;
  aspect-ratio: 1 / 1;
  background-color: var(--color-bg-light);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  transition: border-color var(--transition-base);
}

.gallery__thumb img,
.gallery__thumb-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery__thumb-placeholder {
  background: linear-gradient(135deg, #EEEDEA 0%, #F7F5F2 100%);
}

.gallery__thumb:hover {
  border-color: var(--color-border-strong);
}

.gallery__thumb.is-active {
  border-color: var(--color-cta);
}

/* Mention photo non contractuelle — discrète, sous la galerie */
.gallery__notice {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  font-style: italic;
  margin: var(--space-2) 0 0;
  line-height: 1.5;
}

.gallery__notice[hidden] { display: none; }

/* ==========================================================================
   BLOC ÉCONOMIE vs NEUF (sobre, premium, pas agressif)
   ========================================================================== */

.savings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  padding: var(--space-4);
  background-color: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-block: var(--space-2);
}

.savings__row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.savings__label {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  font-weight: var(--fw-medium);
}

.savings__value {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
}

.savings__value--strike {
  text-decoration: line-through;
  color: var(--color-text-muted);
  font-weight: var(--fw-medium);
}

.savings__value--evo {
  color: var(--color-text);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
}

.savings__economie {
  grid-column: 1 / -1;
  padding-top: var(--space-3);
  border-top: 1px dashed var(--color-border-strong);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.savings__economie-label {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  font-weight: var(--fw-medium);
}

.savings__economie-amount {
  font-family: var(--font-body);
  font-weight: var(--fw-bold);
  color: var(--color-cta);
  font-size: var(--fs-md);
}

.savings__economie-pct {
  font-weight: var(--fw-bold);
}

.savings__note {
  grid-column: 1 / -1;
  font-size: 11px;
  color: var(--color-text-muted);
  font-style: italic;
  margin: 0;
  line-height: 1.5;
}

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  background-color: rgba(11, 26, 47, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-4);
  cursor: zoom-out;
  animation: fade-in 200ms ease;
}

.lightbox__img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.lightbox__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 44px;
  height: 44px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-base);
}

.lightbox__close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   BUYBOX (bloc achat)
   ========================================================================== */

.buybox {
  background-color: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (min-width: 1024px) {
  .buybox {
    position: sticky;
    top: 100px;
    padding: var(--space-6);
  }
}

.buybox__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
}

.buybox__brand {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.buybox__title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  line-height: var(--lh-tight);
  margin: 0;
}

@media (min-width: 1024px) {
  .buybox__title {
    font-size: var(--fs-3xl);
  }
}

.buybox__accroche {
  color: var(--color-text-muted);
  margin: 0;
  line-height: var(--lh-loose);
}

.buybox__price {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-block: var(--space-3);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.buybox__price-amount {
  font-family: var(--font-body);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  line-height: 1.1;
}

.buybox__price-amount--devis {
  color: var(--color-cta);
  font-size: var(--fs-2xl);
}

.buybox__price-note {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.buybox__reassurance {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.buybox__reassurance li {
  position: relative;
  padding-left: 24px;
  font-size: var(--fs-sm);
  color: var(--color-text);
  line-height: 1.5;
  margin: 0;
}

.buybox__reassurance li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  background-color: var(--color-cta);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") no-repeat center / contain;
}

.buybox__cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.buybox__pdf {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--color-cta);
  text-decoration: none;
  font-weight: var(--fw-medium);
}

.buybox__pdf:hover {
  color: var(--color-cta-hover);
}

.buybox__pdf .icon {
  width: 16px;
  height: 16px;
}

.buybox__back {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  align-self: flex-start;
}

.buybox__back:hover {
  color: var(--color-cta);
}

/* ==========================================================================
   SECTIONS DÉTAIL
   ========================================================================== */

.product-sections {
  padding-block: var(--space-6);
}

.product-section {
  padding-block: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.product-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.product-section[hidden] {
  display: none;
}

.product-section h2 {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-4);
}

@media (min-width: 768px) {
  .product-section h2 {
    font-size: var(--fs-2xl);
  }
}

.muted {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.prose p {
  line-height: var(--lh-loose);
  color: var(--color-text);
}

/* ----- Tableau caractéristiques ----- */
.spec-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.spec-table th,
.spec-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--color-border);
}

.spec-table tr:last-child th,
.spec-table tr:last-child td {
  border-bottom: 0;
}

.spec-table th {
  font-weight: var(--fw-semibold);
  color: var(--color-text-muted);
  background-color: var(--color-bg-light);
  width: 40%;
  white-space: nowrap;
}

@media (max-width: 639px) {
  .spec-table th { width: 45%; }
}

/* ----- Process steps (reconditionnement) ----- */
.process-steps {
  list-style: none;
  margin: var(--space-3) 0;
  padding: 0;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.process-steps li {
  position: relative;
  padding: var(--space-3) var(--space-4) var(--space-3) calc(var(--space-7) + 8px);
  background-color: var(--color-bg-light);
  border-radius: var(--radius-md);
  font-size: var(--fs-base);
  margin: 0;
  counter-increment: step;
}

.process-steps li::before {
  content: counter(step);
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--color-cta);
  color: var(--color-text-on-cta);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
}

.process-cert {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background-color: rgba(0, 191, 165, 0.08);
  border: 1px solid rgba(0, 191, 165, 0.2);
  color: var(--color-text);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  margin-top: var(--space-3);
}

.process-cert .icon {
  color: var(--color-cta);
  width: 20px;
  height: 20px;
}

.process-cert[hidden] { display: none; }

/* ==========================================================================
   COMPLÉMENTAIRES
   ========================================================================== */

.product-section--complementaires {
  background-color: var(--color-bg-light);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--space-7);
  margin-top: var(--space-6);
}

.product-section--complementaires h2 {
  margin-bottom: var(--space-5);
  text-align: center;
}

/* ==========================================================================
   STICKY CTA MOBILE
   ========================================================================== */

.product-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-sticky);
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-bg-white);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 12px rgba(11, 26, 47, 0.06);
}

.product-sticky[hidden] { display: none; }

.product-sticky [data-sticky-primary] {
  flex: 1;
}

.product-sticky [data-sticky-secondary] {
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  /* Sur desktop, le buybox sticky suffit, on cache la barre */
  .product-sticky { display: none !important; }
}

/* ==========================================================================
   PAGE D'ERREUR PRODUIT
   ========================================================================== */

.product-error {
  padding-block: var(--space-8) var(--space-9);
}

.product-error[hidden] { display: none; }

.product-error h1 {
  margin-bottom: var(--space-3);
}

.product-error p {
  color: var(--color-text-muted);
  font-size: var(--fs-md);
  max-width: 520px;
  margin: 0 auto var(--space-5);
  line-height: var(--lh-loose);
}
