/* Partage — Évolutions Weapzy
 * Styles autonomes : le CSS compilé du thème (Tailwind purgé) ne contient pas
 * les classes nécessaires, et il n'y a pas de chaîne de compilation sur le serveur.
 */

:root {
  --pw-coral-from: var(--color-coral-from, #e94b4c);
  --pw-coral-to: var(--color-coral-to, #e71d73);
  --pw-ink: var(--color-black, #3c3c3b);
  --pw-radius: 12px;
  --pw-shadow: 0 6px 24px rgba(60, 60, 59, .18);
  --pw-sticky-h: 64px;
}

/* ---------------------------------------------------------------------------
 * Landing pages : logo, visuel d'en-tête, espacements
 * ------------------------------------------------------------------------ */

/* Logo légèrement plus grand (48 → 58 px). */
body.pw-lp #site-header img {
  height: 58px;
  width: auto;
}

/* Texte du visuel d'en-tête aligné à gauche, comme sur l'accueil. */
body.pw-lp main.single-landing-page > .relative:first-child > .absolute {
  text-align: left;
  padding-left: max(1.25rem, 5.8vw);
  padding-right: 1.25rem;
}

body.pw-lp main.single-landing-page > .relative:first-child > .absolute > h1 {
  max-width: 17em;
  line-height: 1.15;
}

body.pw-lp main.single-landing-page > .relative:first-child > .absolute > .text-center {
  text-align: left;
}

@media (min-width: 768px) {
  body.pw-lp main.single-landing-page > .relative:first-child > .absolute {
    padding-right: 40%;
  }
}

/* Espacement entre blocs réduit de moitié (80 → 40 px par bloc). */
body.pw-lp main.single-landing-page article > section.bevel--none {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

@media (max-width: 767px) {
  body.pw-lp main.single-landing-page article > section.bevel--none {
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
  }
}

/* ---------------------------------------------------------------------------
 * Barre fixe des landing pages
 * ------------------------------------------------------------------------ */

.pw-stickybar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  background: #fff;
  box-shadow: var(--pw-shadow);
  transform: translateY(-110%);
  visibility: hidden;
  transition: transform .3s ease, visibility 0s linear .3s;
  font-family: inherit;
}

.pw-stickybar.is-visible {
  transform: translateY(0);
  visibility: visible;
  transition: transform .3s ease, visibility 0s;
}

body.admin-bar .pw-stickybar {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .pw-stickybar {
    top: 46px;
  }
}

.pw-stickybar__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 1280px;
  min-height: var(--pw-sticky-h);
  margin: 0 auto;
  padding: .5rem 1.25rem;
}

.pw-stickybar__logo {
  flex: none;
  display: block;
  line-height: 0;
}

.pw-stickybar__logo img {
  height: 44px;
  width: auto;
}

.pw-stickybar__text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--pw-ink);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.pw-stickybar__button {
  flex: none;
  margin-left: auto;
  display: inline-block;
  padding: .75rem 1.5rem;
  border-radius: var(--pw-radius);
  background: linear-gradient(to right, var(--pw-coral-from), var(--pw-coral-to));
  color: #fff !important;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(233, 66, 88, .35);
  transition: transform .2s ease, box-shadow .2s ease;
}

.pw-stickybar__button:hover,
.pw-stickybar__button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(233, 66, 88, .45);
}

@media (max-width: 767px) {
  .pw-stickybar__inner {
    gap: .5rem;
    padding: .45rem .75rem;
    min-height: 56px;
  }

  .pw-stickybar__logo img {
    height: 28px;
  }

  .pw-stickybar__text {
    font-size: .75rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Le bouton passe sur deux lignes pour laisser la place au texte. */
  .pw-stickybar__button {
    max-width: 36%;
    padding: .5rem .7rem;
    font-size: .75rem;
    white-space: normal;
  }
}

@media (max-width: 380px) {
  .pw-stickybar__text {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pw-stickybar {
    transition: none;
  }
}

/* ---------------------------------------------------------------------------
 * Vidéo en façade (bloc « 3 vidéos » et pop-up)
 * ------------------------------------------------------------------------ */

.pw-video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--pw-radius);
  background: #1d1d1b;
}

.pw-video__play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.pw-video__play img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.pw-video__play:hover img {
  transform: scale(1.03);
}

.pw-video__icon {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(to right, var(--pw-coral-from), var(--pw-coral-to));
  color: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .35);
  transform: translate(-50%, -50%);
  transition: transform .2s ease;
}

.pw-video__icon svg {
  margin-left: 4px;
}

.pw-video__play:hover .pw-video__icon,
.pw-video__play:focus-visible .pw-video__icon {
  transform: translate(-50%, -50%) scale(1.1);
}

.pw-video__play:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -6px;
}

.pw-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------------------------------------------------------------------------
 * Bloc « 3 vidéos »
 * ------------------------------------------------------------------------ */

/* Même gouttière que les blocs « Texte » du thème (px-4 / lg:px-24). */
.pw-videos3__inner {
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 1024px) {
  .pw-videos3__inner {
    padding: 0 6rem;
  }
}

.pw-videos3__title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .pw-videos3__title {
    font-size: 2rem;
  }
}

.pw-videos3__text {
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .pw-videos3__text {
    font-size: 1.25rem;
  }
}

.pw-videos3__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.pw-videos3__grid[data-count="1"] {
  grid-template-columns: minmax(0, 1fr);
  max-width: 900px;
}

.pw-videos3__grid[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pw-videos3__item {
  margin: 0;
}

.pw-videos3__caption {
  margin-top: .6rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

/* Mobile : défilement horizontal, la page ne s'allonge pas. */
@media (max-width: 767px) {
  .pw-videos3__grid,
  .pw-videos3__grid[data-count="2"] {
    display: flex;
    gap: .75rem;
    margin: 0 -1rem;
    padding: 0 1rem .5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 1rem;
    -webkit-overflow-scrolling: touch;
  }

  .pw-videos3__grid .pw-videos3__item {
    flex: 0 0 84%;
    scroll-snap-align: start;
  }

  .pw-videos3__grid[data-count="1"] .pw-videos3__item {
    flex-basis: 100%;
  }
}

.pw-videos3__empty {
  padding: 2rem;
  border: 2px dashed #c9c9c9;
  border-radius: var(--pw-radius);
  text-align: center;
}

/* Couleurs du texte sur les fonds de couleur des landing pages. */
body.pw-lp .pw-videos3 .pw-videos3__title,
body.pw-lp .pw-videos3 .pw-videos3__caption {
  color: inherit;
}

/* ---------------------------------------------------------------------------
 * Pop-up de campagne (accueil)
 * ------------------------------------------------------------------------ */

.pw-popup {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity .25s ease;
}

.pw-popup[hidden] {
  display: none;
}

.pw-popup.is-open {
  opacity: 1;
}

.pw-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 29, 27, .72);
}

.pw-popup__dialog {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  border-radius: 16px;
  background: #fff;
  color: var(--pw-ink);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  transform: translateY(12px);
  transition: transform .25s ease;
  outline: none;
}

.pw-popup.is-open .pw-popup__dialog {
  transform: translateY(0);
}

.pw-popup__close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--pw-ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
  cursor: pointer;
}

.pw-popup__close:hover,
.pw-popup__close:focus-visible {
  color: var(--pw-coral-from);
}

.pw-popup__media .pw-video,
.pw-popup__media .pw-popup__image {
  display: block;
  width: 100%;
  border-radius: 16px 16px 0 0;
}

.pw-popup__media .pw-popup__image {
  height: auto;
  max-height: 55vh;
  object-fit: cover;
}

.pw-popup__body {
  padding: 1.5rem 1.5rem 1.75rem;
  text-align: center;
}

.pw-popup__dialog > .pw-popup__body:first-of-type {
  padding-top: 3.5rem;
}

.pw-popup__title {
  margin: 0 0 .75rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.pw-popup__text {
  font-size: 1rem;
  line-height: 1.6;
}

.pw-popup__text p {
  margin: 0 0 .75rem;
}

.pw-popup__cta {
  display: inline-block;
  margin-top: .5rem;
  padding: .85rem 2rem;
  border-radius: var(--pw-radius);
  background: linear-gradient(to right, var(--pw-coral-from), var(--pw-coral-to));
  color: #fff !important;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none !important;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(233, 66, 88, .35);
}

.pw-popup__cta:hover,
.pw-popup__cta:focus-visible {
  box-shadow: 0 4px 16px rgba(233, 66, 88, .5);
}

@media (min-width: 768px) {
  .pw-popup__title {
    font-size: 1.875rem;
  }

  .pw-popup__text {
    font-size: 1.125rem;
  }
}

body.pw-popup-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .pw-popup,
  .pw-popup__dialog {
    transition: none;
  }
}
