/*
 * Hero vidéo pleine largeur.
 * Le shortcode doit rester autonome, même inséré dans un bloc Shortcode Gutenberg
 * ou dans un conteneur de thème limité en largeur.
 */
.wp-block-shortcode:has(.pronuptia-home-video-alignfull) {
  width: 100vw;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}

.pronuptia-home-video-alignfull {
  position: relative;
  left: 50%;
  top: var(--pronuptia-home-video-offset, 0px);
  width: 100vw;
  max-width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: 0 !important;
  margin-bottom: var(--pronuptia-home-video-offset, 0px);
  overflow: hidden;
  background: #000;
}

.wp-block-shortcode:has(.pronuptia-home-video-alignfull) .pronuptia-home-video-alignfull {
  left: auto;
  margin-left: 0;
  margin-right: 0;
}

.pronuptia-home-video {
  position: relative;
  width: 100vw;
  height: 720px;
  overflow: hidden;
  background: #000;
}

.pronuptia-home-video::after,
.pronuptia-home-video-bg::after {
  content: "";
  display: var(--pronuptia-home-video-gradient-display, none);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 132px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(var(--pronuptia-home-video-gradient-rgb, 0, 0, 0), 0.76) 0%,
    rgba(var(--pronuptia-home-video-gradient-rgb, 0, 0, 0), 0.48) 54%,
    rgba(var(--pronuptia-home-video-gradient-rgb, 0, 0, 0), 0) 100%
  );
}

.pronuptia-home-video__iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1280px;
  height: 720px;
  min-width: 100vw;
  min-height: 100%;
  transform: translate(-50%, -50%);
  border: 0;
  display: block;
  pointer-events: none;
}

@media (min-aspect-ratio: 16/9) {
  .pronuptia-home-video__iframe {
    width: 100vw;
    height: 56.25vw;
  }
}

@media (max-aspect-ratio: 16/9) {
  .pronuptia-home-video__iframe {
    width: 177.78vh;
    height: 100vh;
  }
}

.pronuptia-home-video__mp4 {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pronuptia-home-video-text {
  --hero-text-duration: 1550ms;
  --hero-text-start-delay: 360ms;
  --hero-text-delay: 230ms;
  --hero-text-ease: cubic-bezier(.16, 1, .3, 1);
  --hero-text-shine: .34;
  --hero-text-scale: var(--pronuptia-home-video-text-scale, 1);

  position: absolute;
  left: 50%;
  bottom: var(--pronuptia-home-video-text-bottom, 33%);
  z-index: 3;
  width: min(92vw, 980px);
  overflow: visible;
  color: #fff;
  text-align: center;
  pointer-events: none;
  transform: translate3d(-50%, 50%, 0) scale(var(--hero-text-scale));
  transform-origin: center center;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.14));
}

.pronuptia-home-video-text__line {
  display: block;
  overflow: visible;
  white-space: nowrap;
}

.pronuptia-home-video-text__line > span {
  position: relative;
  display: inline-block;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 10px, 0);
  text-shadow: none;
  -webkit-mask-image: linear-gradient(100deg, #000 0%, #000 34%, rgba(0,0,0,.72) 43%, rgba(0,0,0,.18) 51%, transparent 62%);
  mask-image: linear-gradient(100deg, #000 0%, #000 34%, rgba(0,0,0,.72) 43%, rgba(0,0,0,.18) 51%, transparent 62%);
  -webkit-mask-size: 320% 100%;
  mask-size: 320% 100%;
  -webkit-mask-position: 155% 0;
  mask-position: 155% 0;
  animation:
    pronuptiaHeroTextWipe var(--hero-text-duration) var(--hero-text-ease) forwards,
    pronuptiaHeroTextUnmask 1ms linear calc(var(--hero-text-duration) + 40ms) forwards;
  will-change: opacity, transform, -webkit-mask-position, mask-position;
}

.pronuptia-home-video-text__line > span::after {
  content: "";
  position: absolute;
  inset: -12% -28%;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 0%, transparent 35%, rgba(255,255,255,0) 42%, rgba(255,255,255,var(--hero-text-shine)) 50%, rgba(255,255,255,.12) 56%, transparent 66%, transparent 100%);
  transform: translate3d(-120%, 0, 0) skewX(-12deg);
  opacity: 0;
  mix-blend-mode: screen;
  animation: pronuptiaHeroTextShine var(--hero-text-duration) var(--hero-text-ease) forwards;
  will-change: opacity, transform;
}

.pronuptia-home-video-text__line--1 > span,
.pronuptia-home-video-text__line--1 > span::after {
  animation-delay: var(--hero-text-start-delay);
}

.pronuptia-home-video-text__line--2 > span,
.pronuptia-home-video-text__line--2 > span::after {
  animation-delay: calc(var(--hero-text-start-delay) + var(--hero-text-delay));
}

.pronuptia-home-video-text__line--3 > span,
.pronuptia-home-video-text__line--3 > span::after {
  animation-delay: calc(var(--hero-text-start-delay) + (var(--hero-text-delay) * 2));
}

.pronuptia-home-video-text__line--1 {
  font-family: "DM Serif Display", sans-serif !important;
  font-size: clamp(44px, 8vw, 138px);
  font-weight: 300 !important;
  line-height: .96;
  letter-spacing: 0;
  font-synthesis: none;
}

.pronuptia-home-video-text__line--2 {
  margin-top: clamp(16px, 1.45vw, 26px);
  font-family: "DM Serif Display", sans-serif !important;
  font-size: clamp(25px, 4.2vw, 78px);
  font-style: italic;
  font-weight: 300 !important;
  line-height: .96;
  letter-spacing: 0;
  font-synthesis: none;
}

.pronuptia-home-video-text--script-line-2 .pronuptia-home-video-text__line--2 {
  margin-top: clamp(2px, .25vw, 7px);
  font-family: "Qwigley", "DM Serif Display", cursive !important;
  font-size: clamp(54px, 8.1vw, 150px);
  font-style: normal;
  font-weight: 400 !important;
  line-height: .66;
}

.pronuptia-home-video-text__line--3 {
  margin-top: clamp(7px, 1vw, 14px);
  font-family: "DM Serif Display", sans-serif !important;
  font-size: clamp(15px, 2.15vw, 34px);
  font-style: italic;
  font-weight: 300 !important;
  line-height: 1.05;
  letter-spacing: 0;
  font-synthesis: none;
}

@keyframes pronuptiaHeroTextWipe {
  0% {
    visibility: hidden;
    opacity: 0;
    transform: translate3d(0, 10px, 0);
    -webkit-mask-position: 155% 0;
    mask-position: 155% 0;
  }

  1% {
    visibility: visible;
    opacity: 0;
  }

  14% {
    opacity: 0;
  }

  32% {
    opacity: .72;
    transform: translate3d(0, 4px, 0);
  }

  64% {
    opacity: 1;
  }

  100% {
    visibility: visible;
    opacity: 1;
    transform: translate3d(0, 0, 0);
    -webkit-mask-position: 0% 0;
    mask-position: 0% 0;
  }
}

@keyframes pronuptiaHeroTextShine {
  0% {
    opacity: 0;
    transform: translate3d(-120%, 0, 0) skewX(-12deg);
  }

  18% {
    opacity: 0;
  }

  40% {
    opacity: .64;
  }

  68% {
    opacity: .2;
  }

  100% {
    opacity: 0;
    transform: translate3d(115%, 0, 0) skewX(-12deg);
  }
}

@keyframes pronuptiaHeroTextUnmask {
  to {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

.pronuptia-has-video-bg {
  position: relative;
  overflow: hidden;
  background: #000;
}

.pronuptia-has-video-bg::before {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.pronuptia-has-video-bg > .pronuptia-home-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.pronuptia-has-video-bg > .stk-row,
.pronuptia-has-video-bg > .stk-block-content {
  position: relative;
  z-index: 2;
}

.pronuptia-home-video-bg__iframe {
  position: absolute;
  top: var(--pronuptia-home-video-focal-y, 50%);
  left: 50%;
  width: 177.78vh;
  height: 100%;
  min-width: 100%;
  min-height: 56.25vw;
  transform: translate(-50%, -50%);
  border: 0;
  display: block;
  pointer-events: none;
}

.pronuptia-home-video-bg__mp4 {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center var(--pronuptia-home-video-focal-y, 50%);
  pointer-events: none;
}

@media (min-aspect-ratio: 16/9) {
  .pronuptia-home-video-bg__iframe {
    width: 100%;
    height: 56.25vw;
  }
}

@media (max-width: 767px) {
  .pronuptia-home-video {
    height: 520px;
  }

  .pronuptia-home-video-text {
    --hero-text-scale: var(--pronuptia-home-video-text-scale-mobile, var(--pronuptia-home-video-text-scale, 1));

    left: 50%;
    width: 94vw;
    bottom: var(--pronuptia-home-video-text-bottom-mobile, var(--pronuptia-home-video-text-bottom, 33%));
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pronuptia-home-video-text__line > span {
    opacity: 1;
    transform: none;
    visibility: visible;
    -webkit-mask-image: none;
    mask-image: none;
    animation: none;
  }

  .pronuptia-home-video-text__line > span::after {
    display: none;
  }
}
