/**
 * Detail product page v2 — July 2026 design
 * Scoped custom styles (Tailwind utilities used inline in markup).
 */
.dpv2-root {
  font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.dpv2-root .dpv2-thumbnail.active {
  border-color: #dc2626;
}

.dpv2-root #dpv2-bg-blur {
  filter: blur(20px) brightness(0.9);
  transform: scale(1.15);
}

.dpv2-root .dpv2-img-zoom-lens {
  position: absolute;
  border: 2px solid #dc2626;
  border-radius: 8px;
  width: 120px;
  height: 120px;
  background-color: rgba(255, 255, 255, 0.2);
  pointer-events: none;
  z-index: 30;
  opacity: 0;
  transition: opacity 0.2s;
}

.dpv2-root .dpv2-img-zoom-result {
  background-repeat: no-repeat;
  background-color: #fff;
}

.dpv2-root.dpv2-focus-mode-active #dpv2-dim-overlay {
  opacity: 1;
  pointer-events: auto;
}

.dpv2-root.dpv2-focus-mode-active #dpv2-gallery-section {
  z-index: 60;
  position: relative;
}

.dpv2-root #dpv2-gallery-section {
  scroll-margin-top: 1rem;
  /* Keep section out of sticky stacking contexts during normal scroll */
  isolation: auto;
}

/* Acheter — assombrir seulement au survol / clic (pas d'autres effets) */
.dpv2-root .dpv2-btn-acheter {
  background-color: #dc2626;
  color: #fff;
  border: none;
  box-shadow: none;
  transform: none;
  transition: background-color 0.15s ease;
}

.dpv2-root .dpv2-btn-acheter:hover,
.dpv2-root .dpv2-btn-acheter:active {
  background-color: #991b1b;
  color: #fff;
  box-shadow: none;
  transform: none;
}

/* Detail cart row — do not inherit red card-button styles from commerce-bridge */
.dpv2-root .dpv2-cart-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.dpv2-root .dpv2-cart-actions .ci-btn-cart {
  width: 100%;
  flex: 1 1 auto;
  height: auto;
  min-height: 2.75rem;
  padding: 0.625rem 1rem;
  background: #fff;
  color: #111827;
  border: 2px solid #d1d5db;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.dpv2-root .dpv2-cart-actions .ci-btn-cart:hover,
.dpv2-root .dpv2-cart-actions .ci-btn-cart:focus {
  background: #f9fafb;
  color: #111827;
  border-color: #d1d5db;
}
.dpv2-root .dpv2-cart-actions .dpv2-btn-acheter {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
}
@media (min-width: 640px) {
  .dpv2-root .dpv2-cart-actions {
    flex-direction: row;
  }
  .dpv2-root .dpv2-cart-actions .ci-btn-cart {
    width: 60%;
    flex: 1 1 60%;
  }
  .dpv2-root .dpv2-cart-actions .dpv2-btn-acheter {
    width: 40%;
    flex: 1 1 40%;
  }
}

/* Favoris heart — top-left of gallery (same component as product cards) */
.dpv2-root #dpv2-gallery-container .ci-fav-heart {
  top: 8px;
  left: 8px;
  z-index: 20;
}

/* Promo label sits ABOVE the image (document flow) — scrolls with page, never over header */
.dpv2-root .dpv2-promo-badge {
  position: relative;
  z-index: 1;
  background-color: #16a34a;
  color: #fff;
}

/* Google avis — compact on phone to avoid horizontal overflow */
.dpv2-root .dpv2-google-avis {
  max-width: 100%;
}

@media (max-width: 639px) {
  .dpv2-root .dpv2-google-avis__label {
    display: none !important;
  }

  .dpv2-root .dpv2-google-avis {
    gap: 0.25rem;
    white-space: normal;
  }
}

.dpv2-root .dpv2-aica-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

.dpv2-root .dpv2-aica-logo-spin {
  animation: dpv2AicaSpin 1.2s linear infinite;
}

@keyframes dpv2AicaSpin {
  to { transform: rotate(360deg); }
}

.dpv2-root .dpv2-aica-word {
  font-family: "Zen Dots", sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.dpv2-root .dpv2-aica-disclaimer {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 0.15rem;
}

.dpv2-root .dpv2-aica-info-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: #9ca3af;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.dpv2-root .dpv2-aica-info-btn:hover,
.dpv2-root .dpv2-aica-info-btn[aria-expanded="true"] {
  background: #6b7280;
}

.dpv2-root .dpv2-aica-info-pop {
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: max-content;
  max-width: 240px;
  padding: 0.5rem 0.7rem;
  background: #1f2937;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  border-radius: 0.5rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  white-space: normal;
}

.dpv2-root .dpv2-aica-info-pop.hidden {
  display: none;
}

@media (max-width: 600px) {
  .dpv2-root .dpv2-aica-info-pop {
    left: auto;
    right: 0;
    top: calc(100% + 8px);
    transform: none;
  }
}

.dpv2-root .dpv2-aica-thinking {
  font-style: italic;
  font-weight: 500;
  color: #6b7280;
}

.dpv2-root .dpv2-aica-pulse {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dpv2-root .dpv2-aica-pulse .pulse-line {
  position: relative;
  width: 100%;
  height: 20px;
  border-radius: 5px;
  background: #e8e9eb;
  overflow: hidden;
}

.dpv2-root .dpv2-aica-pulse .pulse-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: -38%;
  width: 38%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(239, 68, 68, 0) 0%,
    rgba(239, 68, 68, 0.25) 12%,
    #ef4444 30%,
    #ef4444 100%
  );
  filter: drop-shadow(0 0 7px rgba(239, 68, 68, 0.45));
  animation: dpv2EmpForward 1.95s cubic-bezier(0.22, 0.7, 0.25, 1) infinite;
}

.dpv2-root .dpv2-aica-pulse .pulse-line:nth-child(1)::after { animation-delay: 0s; }
.dpv2-root .dpv2-aica-pulse .pulse-line:nth-child(2)::after { animation-delay: 0.16s; }
.dpv2-root .dpv2-aica-pulse .pulse-line:nth-child(3)::after { animation-delay: 0.32s; }
.dpv2-root .dpv2-aica-pulse .pulse-line:nth-child(4)::after { animation-delay: 0.48s; }

@keyframes dpv2EmpForward {
  0% { left: -38%; }
  52% { left: 100%; }
  100% { left: 100%; }
}

.dpv2-root .dpv2-lire-plus {
  font-weight: 600;
  color: #d90429;
  text-decoration: underline;
  white-space: nowrap;
  margin-left: 0.15rem;
}

.dpv2-root .dpv2-lire-plus:hover {
  color: #9f021e;
}

.dpv2-root #dpv2-aica-overview {
  scroll-margin-top: 5.5rem;
}

.dpv2-root #dpv2-ai-description {
  font-weight: 400;
}

.dpv2-root .dpv2-aica-overview-body {
  width: 100%;
  color: #111827;
  font-size: 0.95rem;
  line-height: 1.55;
  font-weight: 400;
}

.dpv2-root .dpv2-aica-overview-body p {
  margin: 0.4rem 0;
}

.dpv2-root .dpv2-aica-overview-body p:first-child {
  margin-top: 0;
}

.dpv2-root .dpv2-aica-overview-body strong {
  font-weight: 400;
  color: #111827;
}

.dpv2-root .dpv2-aica-overview-body ul,
.dpv2-root .dpv2-aica-overview-body ol {
  margin: 0.45rem 0 0.45rem 1.35rem;
}

.dpv2-root .dpv2-aica-overview-body ul {
  list-style: disc;
}

.dpv2-root .dpv2-aica-overview-body ol {
  list-style: decimal;
}

.dpv2-root .dpv2-aica-overview-body li {
  margin: 0.2rem 0;
}

@media (max-width: 600px) {
  .dpv2-root .dpv2-aica-pulse {
    gap: 11px;
  }
  .dpv2-root .dpv2-aica-pulse .pulse-line {
    height: 17px;
  }
}
