/**
 * Folies Secrètes — Bouton vidéo premium stvideo (click-to-play)
 * Position stvideo : 14 (colonne achat)
 * Scope : body#product — uniquement si un lien .st_popup_video existe
 * Version : 20260716-ps648-premium-v2
 */

body#product .fs-product-buy-premium a.st_popup_video.pro_right_item,
body#product .product-information.fs-product-buy-premium a.st_popup_video.pro_right_item,
body#product a.st_popup_video.fs-stvideo-btn.pro_right_item {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 0.7rem;
  margin: 1.15rem 0 0.35rem !important;
  padding: 0.7rem 1.25rem 0.7rem 0.75rem !important;
  width: 100% !important;
  max-width: 22rem;
  min-height: 3rem;
  box-sizing: border-box;
  text-decoration: none !important;
  color: var(--fs-ink, #1a1716) !important;
  background: linear-gradient(165deg, #fffefb 0%, #f7f1ea 55%, #f3ebe3 100%) !important;
  border: 1.5px solid rgba(184, 149, 107, 0.55) !important;
  border-radius: 0.85rem !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 10px 28px rgba(26, 23, 22, 0.06);
  font-family: var(--fs-font-sans, "Manrope", system-ui, sans-serif);
  font-size: 0.875rem !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3 !important;
  cursor: pointer;
  transition:
    border-color 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Masquer le texte natif éventuel hors span structuré */
body#product a.st_popup_video.fs-stvideo-btn {
  font-size: 0.875rem !important;
}

body#product a.st_popup_video .fs-stvideo-btn__icon,
body#product a.st_popup_video.fs-stvideo-btn::before {
  content: none;
}

body#product a.st_popup_video .fs-stvideo-btn__icon {
  display: inline-flex;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(184, 149, 107, 0.14);
  border: 1px solid rgba(184, 149, 107, 0.45);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23b8956b' d='M9 7.2v9.6l8.2-4.8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 54% center;
  background-size: 0.95rem 0.95rem;
  transition:
    background-color 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    background-image 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Compat anciens liens sans span (PS27 avant override thème) */
body#product a.st_popup_video.pro_right_item:not(.fs-stvideo-btn)::before {
  content: "";
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: rgba(184, 149, 107, 0.14);
  border: 1px solid rgba(184, 149, 107, 0.45);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23b8956b' d='M9 7.2v9.6l8.2-4.8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 54% center;
  background-size: 0.95rem 0.95rem;
}

body#product a.st_popup_video.pro_right_item:not(.fs-stvideo-btn) {
  font-size: 0 !important;
  color: transparent !important;
}

body#product a.st_popup_video.pro_right_item:not(.fs-stvideo-btn)::after {
  content: "Découvrir le produit en vidéo";
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fs-ink, #1a1716);
  line-height: 1.3;
}

body#product a.st_popup_video .fs-stvideo-btn__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: inherit;
  white-space: normal;
}

body#product a.st_popup_video.pro_right_item:hover,
body#product a.st_popup_video.pro_right_item:focus-visible {
  border-color: var(--fs-gold, #b8956b) !important;
  background: #fffefb !important;
  color: var(--fs-ink, #1a1716) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 16px 36px rgba(26, 23, 22, 0.09);
  transform: translateY(-1px);
  outline: none;
}

body#product a.st_popup_video.pro_right_item:hover .fs-stvideo-btn__icon,
body#product a.st_popup_video.pro_right_item:focus-visible .fs-stvideo-btn__icon,
body#product a.st_popup_video.pro_right_item:hover::before,
body#product a.st_popup_video.pro_right_item:focus-visible::before {
  background-color: var(--fs-gold, #b8956b);
  border-color: var(--fs-gold, #b8956b);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fffefb' d='M9 7.2v9.6l8.2-4.8z'/%3E%3C/svg%3E");
}

body#product a.st_popup_video.pro_right_item:focus-visible {
  outline: 2px solid rgba(184, 149, 107, 0.65);
  outline-offset: 2px;
}

body#product .fs-stvideo-model-note {
  margin: 0.25rem 0 0.75rem;
  max-width: 22rem;
  font-family: var(--fs-font-sans, "Manrope", system-ui, sans-serif);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--fs-ink-soft, #6a6461);
}

@media (max-width: 991px) {
  body#product .fs-product-buy-premium a.st_popup_video.pro_right_item,
  body#product a.st_popup_video.fs-stvideo-btn.pro_right_item {
    max-width: 100%;
    margin-top: 1.2rem !important;
    justify-content: center;
  }

  body#product .fs-stvideo-model-note {
    max-width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  body#product a.st_popup_video.pro_right_item {
    min-height: 3.1rem;
    padding: 0.8rem 1.1rem 0.8rem 0.8rem !important;
  }
}
