/* SENKYS — styles page produit */

/* ── Haut : galerie + résumé ── */
.pp-top { display: grid; grid-template-columns: minmax(0, 1.15fr) 1fr; gap: var(--space-8); align-items: start; padding: var(--space-3) 0 var(--space-8); }
.pp-head { display: grid; grid-template-columns: 72px 1fr; gap: var(--space-4); }
.pp-thumbs { display: flex; flex-direction: column; gap: var(--space-2); }
.pp-thumbs .thumb { width: 72px; height: 72px; cursor: pointer; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-alt); border: 1px solid var(--border); }
.pp-thumbs .thumb img { width: 100%; height: 100%; object-fit: contain; }
.pp-thumbs .thumb.sel { outline: 2px solid var(--accent); border-color: var(--accent); }
.pp-main-img { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4); }
.pp-main-img .ph, .pp-main-img img { aspect-ratio: 1 / 1; width: 100%; max-height: 480px; object-fit: contain; }
.pp-main-img .badge-discount { position: absolute; top: var(--space-4); left: var(--space-4); font-size: var(--text-sm); z-index: 2; }

.pp-summary { padding-top: var(--space-1); }
.pp-title-row { display: flex; align-items: flex-start; gap: var(--space-3); }
.pp-title-row .wish { position: static; width: 40px; height: 40px; flex: 0 0 auto; }
.pp-title { font-size: var(--text-2xl); font-weight: 800; letter-spacing: -0.015em; line-height: 1.12; }
.pp-overview { font-size: var(--text-sm); color: var(--ink-soft); margin: var(--space-4) 0; }
.pp-overview b { color: var(--ink); font-weight: 700; }
.pp-similar { font-size: var(--text-sm); color: var(--ink-soft); margin-bottom: var(--space-5); }

/* ── Graphe d'évolution ── */
.pp-chart { margin-top: var(--space-5); }
.chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.chart-head h3 { font-size: var(--text-md); font-weight: 700; }
.chart-tabs { display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 2px; }
.chart-tabs button { font-size: var(--text-xs); font-weight: 700; padding: 5px var(--space-3); border-radius: 4px; color: var(--ink-mute); }
.chart-tabs button.active { background: var(--accent); color: #fff; }
.chart-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-4); }
.savings { font-size: var(--text-sm); color: var(--ink-soft); margin-top: var(--space-4); display: flex; align-items: center; gap: var(--space-2); }
.savings b { color: var(--ok); }

/* ── Comparaison des prix (pleine largeur) ── */
.cmp-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-5) var(--space-5) var(--space-4); flex-wrap: wrap; }
.cmp-head h2 { font-size: var(--text-lg); font-weight: 800; }
.cmp-title { display: flex; align-items: baseline; gap: var(--space-2); flex-wrap: wrap; }
.pp-specs-title.pp-desc-title { margin: var(--space-5) 0 var(--space-2); }
.cmp-sort { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--ink-soft); }
.cmp-sort .seg { display: flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.cmp-sort .seg button { font-size: var(--text-xs); font-weight: 700; padding: 6px var(--space-3); color: var(--ink-mute); }
.cmp-sort .seg button.active { background: var(--accent); color: #fff; }

.cmp-table { width: 100%; border-collapse: collapse; }
.cmp-table thead th { font-size: var(--text-xs); font-weight: 600; color: var(--ink-mute); text-align: left; padding: var(--space-2) var(--space-4); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-alt); }
.cmp-table td { padding: var(--space-4); border-bottom: 1px solid var(--border); vertical-align: middle; }
.cmp-row:hover { background: var(--surface-alt); }
.ofr-price { font-size: var(--text-lg); font-weight: 800; color: var(--ink); white-space: nowrap; }
.ofr-best { display: none; margin-top: 4px; }
.cmp-row.is-best .ofr-best { display: inline-block; }
.ofr-ship { font-size: var(--text-xs); color: var(--ink-mute); margin-top: 4px; }
.deliv { font-size: var(--text-xs); color: var(--ink-soft); line-height: 1.5; }
.deliv .ok { color: var(--ok); font-weight: 600; }
.merch { display: flex; flex-direction: column; gap: 4px; }
.merch-logo { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 600; color: var(--ink); }
.merch-rate { display: flex; align-items: center; gap: 5px; font-size: var(--text-xs); color: var(--ink-mute); }
.merch-rate .star { color: var(--brass); }
.cmp-cta { text-align: right; white-space: nowrap; }
.cmp-foot { padding: var(--space-4) var(--space-5); font-size: var(--text-xs); color: var(--ink-mute); text-align: right; }

/* ── Spécifications / description / Q&A ── */
.spec-wrap { display: grid; grid-template-columns: 300px 1fr; gap: var(--space-8); align-items: start; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table tr.spec td { font-size: var(--text-sm); padding: var(--space-2) var(--space-4); }
.spec-table tr.spec:nth-child(even) { background: var(--surface-alt); }
.spec-table .sk { color: var(--ink-soft); width: 45%; }
.spec-table .sv { color: var(--ink); font-weight: 600; }

.desc { max-width: 80ch; }
.desc p { color: var(--ink-soft); line-height: 1.7; margin-bottom: var(--space-4); }
.desc p b { color: var(--ink); }
.desc h3 { font-size: var(--text-md); font-weight: 700; margin: var(--space-6) 0 var(--space-3); }
.desc ul, .desc ul.bullets { margin: var(--space-3) 0; padding-left: 0; }
.desc ul li { position: relative; padding-left: var(--space-5); margin-bottom: var(--space-2); color: var(--ink-soft); list-style: none; }
.desc ul li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--brass); }

/* ── Responsive ── */
@media (max-width: 1000px) {
  .pp-top, .spec-wrap { grid-template-columns: 1fr; }

  /* Galerie : une seule colonne, image en grand au-dessus, miniatures en ligne */
  .pp-head { display: flex; flex-direction: column; gap: var(--space-3); }
  .pp-main-img { order: 1; width: 100%; }
  .pp-main-img .ph, .pp-main-img img { max-height: none; }
  .pp-thumbs { order: 2; flex-direction: row; flex-wrap: wrap; gap: var(--space-2); }
  .pp-thumbs .thumb { width: 64px; height: 64px; }
}
@media (max-width: 820px) {
  .pp-title { font-size: var(--text-xl); }

  /* Tableau de comparaison → cartes empilées avec CTA visible */
  .cmp-table thead { display: none; }
  .cmp-table, .cmp-table tbody, .cmp-table tr, .cmp-table td { display: block; width: 100%; }
  .cmp-table tr.cmp-row { border: 1px solid var(--border); border-radius: var(--radius); margin: 0 var(--space-4) var(--space-3); padding: var(--space-4); }
  .cmp-table tr.cmp-row:hover { background: #fff; }
  .cmp-table td { border: none; padding: 3px 0; }
  .cmp-cta { text-align: left; margin-top: var(--space-3); }
  .cmp-cta .btn { width: 100%; }
}

/* ── CTA collant (mobile + desktop) ── */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(247,243,236,0.99), rgba(247,243,236,0.86));
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 20px rgba(28,31,35,0.10);
  transform: translateY(130%);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.sticky-cta.show { transform: translateY(0); }
.sticky-cta .container { padding: 0 var(--space-4); display: flex; justify-content: center; }
.sticky-cta-btn {
  width: 100%; max-width: 680px; font-size: var(--text-base); font-weight: 800;
  padding: 15px var(--space-5);
}
/* Battement + reflet, partagés par le bouton collant et le CTA principal de la
   fiche : un seul jeu d'animations, pour qu'ils ne divergent jamais. */
.sticky-cta-btn,
.pp-cta-main {
  position: relative; overflow: hidden;
  animation: sticky-pulse 1.7s ease-in-out infinite;
}
.sticky-cta-btn::after,
.pp-cta-main::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-20deg); animation: sticky-shine 2.4s ease-in-out infinite;
}
/* Le battement agrandit le bouton de 2,5 % : sans cette marge, le débord
   viendrait lécher le bloc de caractéristiques juste au-dessus. */
.pp-cta-main { margin-top: var(--space-5); }
@keyframes sticky-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 14px rgba(47,111,74,0.35); }
  50%      { transform: scale(1.025); box-shadow: 0 8px 26px rgba(47,111,74,0.55); }
}
@keyframes sticky-shine {
  0% { left: -60%; } 60%, 100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
  .sticky-cta-btn, .sticky-cta-btn::after,
  .pp-cta-main, .pp-cta-main::after { animation: none; }
}

/* ---------- DESCRIPTION REPLIÉE (résumé de la fiche) ---------- */
/* <details> natif : pas une ligne de JavaScript, et le texte complet reste
   dans le DOM — donc lisible par Google et par un lecteur d'écran, replié ou
   non. L'amorce s'efface à l'ouverture pour ne pas répéter la première phrase. */
.pp-desc {
  margin-bottom: var(--space-4);
  border-left: 2px solid var(--border);
  padding-left: var(--space-4);
}
.pp-desc-sum {
  list-style: none; cursor: pointer;
  font-size: var(--text-sm); line-height: 1.6; color: var(--ink-soft);
}
.pp-desc-sum::-webkit-details-marker { display: none; }
.pp-desc-peek {
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden;
}
.pp-desc[open] .pp-desc-peek { display: none; }
.pp-desc-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: var(--space-1);
  font-weight: 700; font-size: var(--text-xs); color: var(--accent);
  text-transform: uppercase; letter-spacing: .04em;
}
.pp-desc-toggle::before { content: "Lire la description"; }
.pp-desc[open] .pp-desc-toggle::before { content: "Replier"; }
/* Chevron dessiné en CSS : pivote à l'ouverture, aucune image à charger. */
.pp-desc-toggle::after {
  content: ""; width: 6px; height: 6px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform .18s ease;
}
.pp-desc[open] .pp-desc-toggle::after { transform: rotate(-135deg) translate(-2px, -2px); }
.pp-desc-sum:hover .pp-desc-toggle { color: var(--accent-ink); }
.pp-desc-full {
  margin-top: var(--space-3);
  font-size: var(--text-sm); line-height: 1.7; color: var(--ink-soft);
}
.pp-desc-full > *:last-child { margin-bottom: 0; }

/* ---------- CARACTÉRISTIQUES (au-dessus des offres) ---------- */
.pp-specs {
  margin-bottom: var(--space-5);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-4) var(--space-2);
}
.pp-specs-title {
  font-size: var(--text-xs); font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-mute);
  margin: 0 0 var(--space-3);
}
.pp-specs-list { margin: 0; display: grid; gap: 0; }
/* Deux colonnes dès qu'il y a la place : une liste d'une seule colonne étire
   inutilement le résumé et repousse le bouton d'offre sous la ligne de flottaison. */
@media (min-width: 560px) { .pp-specs-list { grid-template-columns: 1fr 1fr; column-gap: var(--space-5); } }
.pp-spec {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-3);
  padding: 7px 0; border-bottom: 1px solid var(--border);
  font-size: var(--text-sm);
}
.pp-spec dt { color: var(--ink-mute); white-space: nowrap; }
.pp-spec dd {
  margin: 0; font-weight: 600; color: var(--ink);
  text-align: right; overflow-wrap: anywhere;
}
.pp-spec dd a { color: var(--accent); }
/* Dernière ligne de chaque colonne sans filet : évite un trait qui flotte. */
.pp-spec:last-child { border-bottom: 0; }
@media (min-width: 560px) {
  .pp-spec:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
}

/* ---------- CTA de fin de section (top des ventes) ---------- */
.pp-cta-row { margin: var(--space-5) 0 0; text-align: center; }
.pp-cta-more {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-weight: 700; font-size: var(--text-sm);
  padding: 11px var(--space-5);
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--surface); color: var(--accent);
  transition: border-color .15s ease, transform .15s ease;
}
.pp-cta-more:hover {
  border-color: var(--accent); text-decoration: none; transform: translateY(-1px);
}
.pp-cta-more svg { transition: transform .15s ease; }
.pp-cta-more:hover svg { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) {
  .pp-cta-more, .pp-cta-more svg, .pp-desc-toggle::after { transition: none; }
}

