/* =========================================================================
   CERVIN COLISEUM — vidéo de présentation (accueil)
   CTA « Voir la vidéo de présentation » dans le hero + modale « cinéma ».
   L'iframe YouTube (youtube-nocookie.com) n'existe qu'une fois la modale ouverte : js/video.js.
   ========================================================================= */

/* ---------- CTA du hero ---------- */
.hero__head { display: flex; flex-direction: column; align-items: flex-start; }
.hero__film {
  display: inline-flex; align-items: center; gap: 16px; margin-bottom: clamp(22px, 3vw, 34px);
  color: var(--ink); text-align: left; border-radius: 999px;
}
.hero__head .hero__title { margin-bottom: clamp(16px, 2.2vw, 26px); }

.hero__film-orb {
  position: relative; flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(10, 11, 13, .28);
  backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
  overflow: hidden; isolation: isolate; transition: border-color .5s var(--ease), color .5s var(--ease);
}
.hero__film-orb::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--ink);
  transform: scale(0); transition: transform .6s var(--ease);
}
.hero__film-orb svg { width: 14px; height: 14px; margin-left: 3px; fill: currentColor; transition: transform .6s var(--ease); }
/* halo discret : un anneau qui respire autour de l'orbe */
.hero__film-ring { position: absolute; inset: -1px; border-radius: 50%; border: 1px solid var(--ink-3); pointer-events: none; animation: filmRing 3.2s var(--ease) infinite; }
@keyframes filmRing { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(1.55); opacity: 0; } }
.hero__film-orb-wrap { position: relative; flex: none; }

.hero__film-txt { display: flex; flex-direction: column; gap: 6px; }
.hero__film-t {
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; line-height: 1.45;
  max-width: 19ch; text-wrap: balance;
}
.hero__film-k { color: var(--ink-3); }
.hero__film-k .num { letter-spacing: .08em; }

.hero__film:hover .hero__film-orb, .hero__film:focus-visible .hero__film-orb { color: var(--bg); border-color: var(--ink); }
.hero__film:hover .hero__film-orb::before, .hero__film:focus-visible .hero__film-orb::before { transform: scale(1); }
.hero__film:hover .hero__film-orb svg { transform: scale(1.08); }
.hero__film:focus-visible { outline-offset: 6px; }

/* grand écran : le CTA prend place à droite du titre, sur sa ligne de base */
@media (min-width: 1200px) {
  .hero__head { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: clamp(32px, 4vw, 80px); }
  .hero__head .hero__title { margin-bottom: clamp(14px, 1.5vw, 24px); }
  .hero__film { margin-bottom: calc(clamp(14px, 1.5vw, 24px) + .6vw); flex-direction: row; }
}
@media (max-width: 600px) {
  .hero__film { gap: 14px; }
  .hero__film-orb { width: 52px; height: 52px; }
}

/* ---------- modale ---------- */
.vfilm {
  --vf-w: min(1280px, calc(100vw - 2 * var(--pad)), calc((100svh - 190px) * 16 / 9));
  position: fixed; inset: 0; z-index: 960; display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  opacity: 0; visibility: hidden; transition: opacity .55s var(--ease), visibility 0s .55s;
}
.vfilm[hidden] { display: none; }
.vfilm.is-open { opacity: 1; visibility: visible; transition: opacity .55s var(--ease), visibility 0s; }
.vfilm__backdrop {
  position: absolute; inset: 0; background: rgba(6, 7, 8, .84);
  backdrop-filter: blur(16px) saturate(1.1); -webkit-backdrop-filter: blur(16px) saturate(1.1);
}
.vfilm__panel {
  position: relative; width: var(--vf-w); display: grid; gap: 14px;
  transform: translateY(26px) scale(.985); transition: transform .8s var(--ease);
}
.vfilm.is-open .vfilm__panel { transform: none; }

.vfilm__head, .vfilm__foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.vfilm__head .label { color: var(--ink-2); }
.vfilm__close {
  flex: none; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center;
  color: var(--ink); background: rgba(10, 11, 13, .4); transition: background-color .3s, border-color .3s, color .3s;
}
.vfilm__close:hover, .vfilm__close:focus-visible { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.vfilm__close svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.3; }

.vfilm__frame {
  position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; border-radius: var(--radius);
  background: #000; box-shadow: 0 40px 120px rgba(0, 0, 0, .6), 0 0 0 1px var(--line);
}
.vfilm__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; filter: blur(2px); transform: scale(1.02); }
.vfilm__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .7s var(--ease); }
.vfilm__frame iframe.is-ready { opacity: 1; }
/* attente du lecteur : fine ligne de chargement, dans l'esprit de l'intro */
.vfilm__wait { position: absolute; left: 50%; top: 50%; width: 120px; height: 1px; margin-left: -60px; background: var(--line-2); overflow: hidden; }
.vfilm__wait::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--ink); animation: filmWait 1.4s var(--ease-in-out) infinite; }
@keyframes filmWait { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
.vfilm__frame.is-ready .vfilm__wait { display: none; }
.vfilm__offline { position: absolute; inset: auto 0 0; padding: 18px 20px; text-align: center; color: var(--ink-2); font-size: .95rem; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }

.vfilm__title {
  font-family: var(--f-display); font-weight: 300; font-size: clamp(1.15rem, 1.6vw, 1.6rem); line-height: 1.2; letter-spacing: -.01em;
}
.vfilm__title em { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: 1.12em; color: var(--stone); }
.vfilm__foot .label { flex: none; }

/* pendant l'ouverture : curseur système (le curseur personnalisé ne suit pas au-dessus de l'iframe) */
html.vfilm-open .cursor { opacity: 0 !important; }
html.custom-cursor-enabled.vfilm-open .vfilm, html.custom-cursor-enabled.vfilm-open .vfilm * { cursor: auto !important; }
html.custom-cursor-enabled.vfilm-open .vfilm button, html.custom-cursor-enabled.vfilm-open .vfilm__backdrop { cursor: pointer !important; }

/* téléphone en paysage : la vidéo prend toute la hauteur, le bouton fermer flotte */
@media (max-height: 520px) and (orientation: landscape) {
  .vfilm { --vf-w: min(calc(100vw - 2 * 72px), calc((100svh - 24px) * 16 / 9)); padding: 12px; }
  .vfilm__head { position: absolute; top: 0; left: 100%; margin-left: 12px; }
  .vfilm__head .label, .vfilm__foot { display: none; }
  .vfilm__close { width: 46px; height: 46px; }
}
@media (max-width: 600px) and (orientation: portrait) {
  .vfilm { --vf-w: calc(100vw - 2 * 16px); }
  .vfilm__close { width: 48px; height: 48px; }
  .vfilm__foot { align-items: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__film-ring { display: none; }
  .vfilm__panel { transform: none; }
}
