/* Hero Murphy (Cloudbizz) — le film complet « la loi de Murphy, retournée » en fond.
   Injecté par lib/neoo-cloudbizz-shell.mjs sur /murphy.html, /en/ et /nl-be/.
   Le still de fin (.mx-poster) reste sous la vidéo : repli sans JavaScript, mouvement réduit,
   économie de données, échec de lecture, et raccord invisible de la boucle
   (dernière image du film = still). */

/* La barre Cloudbizz flotte sur le film : la hero occupe tout le premier écran. */
body.murphy-page > .cb-native-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
}

.murphy-page .mxh-hero,
.murphy-page .mxh-hero .mx-static-copy {
  min-height: 100vh;
  min-height: 100svh;
}

.murphy-page .mxh-hero .mx-static-copy {
  box-sizing: border-box;
  width: min(calc(100% - 64px), 1520px);
  padding: 148px 28px 112px;
}

.murphy-page .mxh-film {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms var(--mx-ease, cubic-bezier(.23, 1, .32, 1));
}

.murphy-page .mxh-hero.mxh-film-on .mxh-film { opacity: 1; }
.murphy-page .mxh-hero.mxh-film-failed .mxh-film { display: none; }

/* Le film est plus vif que le still : voile de lecture renforcé à gauche et sous la barre. */
.murphy-page .mxh-hero .mx-static-veil {
  background:
    linear-gradient(180deg, rgba(4, 6, 14, .62) 0%, rgba(4, 6, 14, 0) 20%),
    linear-gradient(90deg, rgba(4, 6, 14, .9) 0%, rgba(4, 6, 14, .8) 30%, rgba(4, 6, 14, .4) 58%, rgba(4, 6, 14, .08) 100%),
    linear-gradient(0deg, rgba(4, 6, 14, .88) 0%, rgba(4, 6, 14, 0) 34%);
}

/* Pause / lecture (WCAG 2.2.2) : l'anneau suit la progression du film. */
.murphy-page .mxh-toggle {
  position: absolute;
  right: calc(max(32px, (100% - 1520px) / 2) + 28px);
  bottom: 40px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #eef4ff;
  background: rgba(8, 11, 24, .58);
  box-shadow: inset 0 0 0 1px rgba(214, 226, 255, .16), 0 10px 30px rgba(4, 6, 14, .45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
}

.murphy-page .mxh-toggle[hidden] { display: none; }
.murphy-page .mxh-toggle:hover { background: rgba(22, 30, 58, .78); }
.murphy-page .mxh-toggle:active { transform: scale(.96); }
.murphy-page .mxh-toggle:focus-visible { outline: 3px solid #567eff; outline-offset: 3px; }

.murphy-page .mxh-toggle svg {
  width: 48px;
  height: 48px;
  overflow: visible;
}

.murphy-page .mxh-toggle circle {
  fill: none;
  stroke-width: 2;
}

.murphy-page .mxh-toggle__track { stroke: rgba(214, 226, 255, .18); }

.murphy-page .mxh-toggle__ring {
  stroke: url(#mxh-ring-gradient);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transform: rotate(-90deg);
  transform-box: fill-box;
  transform-origin: center;
}

.murphy-page .mxh-toggle__pause {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
}

.murphy-page .mxh-toggle__play { fill: currentColor; }
.murphy-page .mxh-toggle[data-state="playing"] .mxh-toggle__play,
.murphy-page .mxh-toggle:not([data-state="playing"]) .mxh-toggle__pause { display: none; }

/* Téléphones et tablettes en portrait : le film occupe le haut, le texte se pose en bas. */
@media (max-width: 600px), (orientation: portrait) and (max-width: 1024px) {
  .murphy-page .mxh-hero .mx-static-copy {
    align-content: end;
    padding-top: 196px;
    padding-bottom: 96px;
  }

  .murphy-page .mxh-hero .mx-static-veil {
    background:
      linear-gradient(180deg, rgba(4, 6, 14, .6) 0%, rgba(4, 6, 14, .14) 24%, rgba(4, 6, 14, .42) 40%, rgba(4, 6, 14, .86) 56%, rgba(4, 6, 14, .95) 100%);
  }

  .murphy-page .mxh-toggle { bottom: 28px; }
}

/* Téléphones : version portrait du film, recadrée sur Murphy ; le still suit le même cadrage. */
@media (max-width: 600px) {
  .murphy-page .mxh-hero .mx-poster { background-position: 59% center; }
  .murphy-page .mxh-film { object-position: center; }

  .murphy-page .mxh-hero .mx-static-copy {
    width: calc(100% - 48px);
    padding-inline: 0;
  }

  .murphy-page .mxh-toggle { right: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .murphy-page .mxh-film,
  .murphy-page .mxh-toggle { transition: none; }
}
