/* UX e-commerce catalogue / fiches (tips, stagger, sticky, ripple) */

.shop-ux-card {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease,
    border-color 0.22s ease;
  transition-delay: var(--shop-stagger, 0ms);
}

.shop-ux-card.is-shop-in {
  opacity: 1;
  transform: none;
}

.page-prestations-catalog .prestation-card.shop-ux-card:hover,
.page-livres .livre-card.shop-ux-card:hover {
  border-color: rgba(77, 169, 214, 0.4);
  box-shadow: 0 16px 36px rgba(15, 53, 80, 0.12);
}

.page-prestations-catalog .prestation-card.shop-ux-card:hover .prestation-card-visual--icon i {
  transform: scale(1.08);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-prestations-catalog .prestation-card-visual--icon i {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-prestations-catalog .prestation-card.shop-ux-card:hover .price-amount {
  color: var(--primary-color, #4da9d6);
  transition: color 0.2s ease;
}

/* Toast tips */
.shop-ux-toast-host {
  position: fixed;
  z-index: 1200;
  right: 1rem;
  bottom: 5.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: min(22rem, calc(100vw - 1.5rem));
  pointer-events: none;
}

.shop-ux-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.85rem;
  background: #0f3550;
  color: #f4fafc;
  box-shadow: 0 14px 36px rgba(15, 53, 80, 0.28);
  font-size: 0.88rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.shop-ux-toast.is-in {
  opacity: 1;
  transform: none;
}

.shop-ux-toast.is-out {
  opacity: 0;
  transform: translateY(8px);
}

.shop-ux-toast i {
  color: #7dd4a8;
  margin-top: 0.15rem;
}

.shop-ux-toast-close {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.15rem;
}

/* Badge tooltips */
.shop-ux-tippy {
  position: relative;
  cursor: help;
}

.shop-ux-tippy.is-tip-open::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  transform: translateX(-50%);
  width: max-content;
  max-width: 14rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.45rem;
  background: #0f3550;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.35;
  box-shadow: 0 8px 20px rgba(15, 53, 80, 0.25);
  pointer-events: none;
}

.shop-ux-tippy.is-tip-open::before {
  content: '';
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: calc(100% + 0.15rem);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #0f3550;
}

/* Ripple */
.shop-ux-ripple-host {
  position: relative;
  overflow: hidden;
}

.shop-ux-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0);
  animation: shop-ux-ripple 0.5s ease-out forwards;
  pointer-events: none;
}

@keyframes shop-ux-ripple {
  to {
    transform: scale(2.4);
    opacity: 0;
  }
}

/* Back to top */
.shop-ux-top {
  position: fixed;
  z-index: 1100;
  right: 1rem;
  bottom: 1.15rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: #0f3550;
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 53, 80, 0.28);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
}

.shop-ux-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.shop-ux-top:hover {
  background: #1a5f85;
}

/* Sticky buy bar (fiche, surtout mobile) */
.shop-ux-sticky-buy {
  position: fixed;
  z-index: 1090;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(15, 53, 80, 0.1);
  box-shadow: 0 -10px 28px rgba(15, 53, 80, 0.1);
  backdrop-filter: blur(8px);
  transform: translateY(110%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.shop-ux-sticky-buy.is-visible {
  transform: none;
}

.shop-ux-sticky-buy-inner {
  max-width: min(1680px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.shop-ux-sticky-buy-inner strong {
  display: block;
  font-size: 0.9rem;
  color: #0f3550;
  max-width: 14rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-ux-sticky-buy-inner span {
  font-size: 0.82rem;
  font-weight: 700;
  color: #4da9d6;
}

@media (min-width: 960px) {
  .shop-ux-sticky-buy {
    display: none;
  }
}

/* Offre de la semaine : pulse discret */
.shop-ux-deal-pulse .prestations-deal-ribbon,
.shop-ux-deal-pulse .livres-deal-ribbon {
  animation: shop-ux-ribbon-pulse 2.4s ease-in-out infinite;
}

@keyframes shop-ux-ribbon-pulse {
  0%,
  100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    transform: translateX(-50%) scale(1);
  }
  50% {
    box-shadow: 0 6px 18px rgba(125, 212, 168, 0.55);
    transform: translateX(-50%) scale(1.04);
  }
}

.prestations-deal-cta,
.livres-deal-cta {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prestations-deal-cta:hover,
.livres-deal-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Sidebar active polish */
.prestations-sidebar-link {
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.prestations-sidebar-link.is-active {
  transform: translateX(2px);
}

/* Pleine page un cran plus large */
.page-nos-offres .container,
.page-nos-offres .prestations-deal-week .container,
.page-livres .container,
.prestation-detail-root .container,
.container--fullpage {
  max-width: min(1760px, 100%);
}

.page-nos-offres .prestations-catalog-layout {
  grid-template-columns: minmax(11rem, 13.5rem) minmax(0, 1fr);
  gap: 1rem 1.25rem;
}

@media (max-width: 960px) {
  .shop-ux-toast-host {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 4.75rem;
    max-width: none;
  }

  .shop-ux-top {
    bottom: 4.75rem;
  }

  .shop-ux-tippy.is-tip-open::after,
  .shop-ux-tippy.is-tip-open::before {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shop-ux-card,
  .shop-ux-toast,
  .shop-ux-top,
  .shop-ux-sticky-buy,
  .shop-ux-deal-pulse .prestations-deal-ribbon,
  .shop-ux-deal-pulse .livres-deal-ribbon,
  .prestation-detail-root .prestation-detail-visual-inner--hero,
  .prestation-detail-root .prestation-buybox-card,
  .shop-ux-faq,
  .prestation-tech-table tr.shop-ux-card {
    animation: none !important;
    transition: none !important;
  }

  .shop-ux-card {
    opacity: 1;
    transform: none;
  }
}

/* Fiche prestation : animations UI */
.prestation-detail-root .prestation-buybox-card {
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.prestation-detail-root .prestation-buybox-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(15, 53, 80, 0.12);
}

.prestation-detail-root .prestation-detail-visual-inner--hero {
  animation: shop-ux-hero-float 5.5s ease-in-out infinite;
}

.prestation-detail-root .prestation-detail-visual-frame {
  overflow: hidden;
  border-radius: 1rem;
}

.prestation-detail-root .prestation-detail-visual-frame img {
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.prestation-detail-root .prestation-detail-visual:hover .prestation-detail-visual-frame img {
  transform: scale(1.04);
}

@keyframes shop-ux-hero-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.prestation-detail-root .prestation-benefits li,
.prestation-detail-root .prestation-includes li,
.prestation-detail-root .prestation-tech-table tr {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--shop-stagger, 0ms);
}

.prestation-detail-root .prestation-benefits li.is-shop-in,
.prestation-detail-root .prestation-includes li.is-shop-in,
.prestation-detail-root .prestation-tech-table tr.is-shop-in {
  opacity: 1;
  transform: none;
}

.prestation-detail-root .shop-ux-faq {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.22s ease,
    box-shadow 0.22s ease;
  transition-delay: var(--faq-stagger, 0ms);
}

.prestation-detail-root .shop-ux-faq.is-shop-in {
  opacity: 1;
  transform: none;
}

.prestation-detail-root .prestation-related-card {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease,
    border-color 0.22s ease;
  transition-delay: var(--shop-stagger, 0ms);
}

.prestation-detail-root .prestation-related-card.is-shop-in {
  opacity: 1;
  transform: none;
}

.prestation-detail-root .prestation-related-card:hover .prestation-related-media i {
  transform: scale(1.1);
}

.prestation-detail-root .prestation-related-media i {
  transition: transform 0.3s ease;
}

.prestation-detail-root .offres-tier__col {
  transition: transform 0.25s ease;
}

.prestation-detail-root .offres-tier__contrast:hover .offres-tier__col--before {
  transform: translateY(-2px);
}

.prestation-detail-root .offres-tier__contrast:hover .offres-tier__col--after {
  transform: translateY(-2px);
}
