/* BLGen — page introduction vidéo (plein écran cinématographique) */

html,
body.video-intro-body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #000;
}

/* Conteneur vidéo plein écran */
.video-intro-stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  background: #000;
}

/* Couche arrière-plan — masquée sur desktop */
.video-intro-player-bg {
  display: none;
}

/* Couche principale — desktop : cover plein écran */
.video-intro-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  z-index: 1;
  background: #000;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Overlay fade avant redirection */
.video-intro-fade {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity 0.4s ease;
}

.video-intro-fade.is-active {
  opacity: 1;
}

/* BLGen discret — superposé à la vidéo */
.video-intro-brand {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 1.35rem 1.5rem 2rem;
  text-align: center;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.42) 0%,
    rgba(0, 0, 0, 0.18) 55%,
    transparent 100%
  );
  animation: brandFadeIn 1s ease 0.3s both;
}

.video-intro-brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.06em;
  line-height: 1;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.video-intro-brand-tag {
  margin-top: 0.4rem;
  font-family: var(--sans);
  font-size: 0.5rem;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

/* Passer — discret, superposé */
.video-intro-skip {
  position: fixed;
  top: 1.15rem;
  right: 1.15rem;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.75);
  padding: 0.45rem 0.85rem;
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(184, 169, 138, 0.35);
  border-radius: 2rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.video-intro-skip:hover {
  color: #fff;
  border-color: var(--gold);
  background: rgba(0, 0, 0, 0.45);
}

/* Fallback : lancer manuellement si autoplay bloqué */
.video-fallback {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: rgba(20, 20, 20, 0.85);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 14px 24px;
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.video-fallback.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Bouton LANCER LA VIDÉO — toujours visible (toutes les intros) */
#videoFallback.video-fallback {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Visibilité Google — bouton en bas, sous « STRATÉGIE SEO LOCALE & GOOGLE BUSINESS » */
.video-intro-body--visibilite-google #videoFallback.video-fallback {
  top: auto;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
}

@keyframes brandFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Mobile : arrière-plan cover flouté + vidéo principale contain ── */
@media (max-width: 768px) {
  html,
  body.video-intro-body,
  .video-intro-stage {
    width: 100vw;
    height: 100dvh;
    background: #000;
  }

  .video-intro-stage::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.22);
    pointer-events: none;
  }

  .video-intro-player-bg {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    filter: blur(32px) brightness(0.52) saturate(1.05);
    opacity: 0.9;
    z-index: 0;
    pointer-events: none;
  }

  .video-intro-player {
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    background: transparent;
  }

  .video-intro-brand {
    padding: 0.85rem 1rem 1.25rem;
  }

  .video-intro-brand-name {
    font-size: 1.15rem;
  }

  .video-intro-brand-tag {
    font-size: 0.45rem;
    letter-spacing: 0.38em;
  }

  .video-intro-skip {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.52rem;
  }
}

/* ── Tablette : même système deux couches ── */
@media (min-width: 769px) and (max-width: 1024px) {
  html,
  body.video-intro-body,
  .video-intro-stage {
    background: #000;
  }

  .video-intro-stage::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.18);
    pointer-events: none;
  }

  .video-intro-player-bg {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    filter: blur(24px) brightness(0.58) saturate(1.05);
    opacity: 0.88;
    z-index: 0;
    pointer-events: none;
  }

  .video-intro-player {
    z-index: 2;
    object-fit: contain;
    object-position: center center;
    background: transparent;
  }
}

/* ── Desktop : vidéo nette plein écran, sans flou ni scale ── */
@media (min-width: 1025px) {
  .video-intro-stage::after {
    content: none;
  }

  .video-intro-player-bg {
    display: none !important;
  }

  .video-intro-player {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    object-fit: cover;
    object-position: center center;
    transform: none;
    filter: none;
    z-index: 0;
    background: #000;
  }

  .video-intro-brand {
    top: 24px;
    left: 50%;
    right: auto;
    width: auto;
    padding: 0;
    transform: translateX(-50%);
    z-index: 100;
    background: none;
    animation: brandFadeInDesktop 1s ease 0.3s both;
  }

  .video-intro-brand-name {
    color: #faf8f5;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
  }

  .video-intro-brand-tag {
    color: #d4c4a8;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
  }

  .video-intro-skip {
    top: 24px;
    right: 32px;
    z-index: 100;
  }
}

@keyframes brandFadeInDesktop {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Desktop — Visibilité Google uniquement : hero vidéo 100vh, logo superposé */
@media (min-width: 1025px) {
  .video-intro-body--visibilite-google {
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background: #1c1b1a;
  }

  .video-intro-body--visibilite-google .video-intro-brand {
    position: fixed;
    top: 35px;
    left: 50%;
    right: auto;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 0;
    margin: 0;
    transform: translateX(-50%);
    display: block;
    text-align: center;
    flex: none;
    order: unset;
    z-index: 100;
    background: none;
    pointer-events: none;
    animation: brandFadeInDesktop 1s ease 0.3s both;
  }

  .video-intro-body--visibilite-google .video-intro-brand-name {
    color: #faf8f5;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
  }

  .video-intro-body--visibilite-google .video-intro-brand-tag {
    color: #b8a98a;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
  }

  .video-intro-body--visibilite-google .video-intro-skip {
    position: fixed;
    top: 30px;
    right: 35px;
    z-index: 110;
  }

  .video-intro-body--visibilite-google .video-intro-stage {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #1c1b1a;
  }

  .video-intro-body--visibilite-google .video-intro-stage::before,
  .video-intro-body--visibilite-google .video-intro-stage::after {
    content: none;
  }

  .video-intro-body--visibilite-google .video-intro-player-bg {
    display: none !important;
  }

  .video-intro-body--visibilite-google .video-intro-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    object-fit: contain;
    object-position: center center;
    transform: none;
    filter: none;
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
    z-index: 0;
  }
}

/* ── Menu NFC & Réseaux sociaux : contain + fond anthracite ── */
@media (max-width: 1024px) {
  html,
  body.video-intro-body--menu-nfc,
  body.video-intro-body--reseaux-sociaux,
  .video-intro-body--menu-nfc .video-intro-stage,
  .video-intro-body--reseaux-sociaux .video-intro-stage {
    background: #242321;
  }

  .video-intro-body--menu-nfc .video-intro-stage,
  .video-intro-body--reseaux-sociaux .video-intro-stage {
    width: 100vw;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .video-intro-body--menu-nfc .video-intro-stage::after,
  .video-intro-body--reseaux-sociaux .video-intro-stage::after {
    content: none;
  }

  .video-intro-body--menu-nfc .video-intro-player-bg,
  .video-intro-body--reseaux-sociaux .video-intro-player-bg {
    display: none !important;
  }

  .video-intro-body--menu-nfc .video-intro-player,
  .video-intro-body--reseaux-sociaux .video-intro-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    object-position: center center;
    transform: none;
    filter: none;
    background: transparent;
    z-index: 2;
  }
}

@media (min-width: 1025px) {
  .video-intro-body--menu-nfc,
  .video-intro-body--reseaux-sociaux {
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background: #242321;
  }

  .video-intro-body--menu-nfc .video-intro-skip,
  .video-intro-body--reseaux-sociaux .video-intro-skip {
    position: fixed;
    top: 30px;
    right: 35px;
    z-index: 110;
  }

  .video-intro-body--menu-nfc .video-intro-stage,
  .video-intro-body--reseaux-sociaux .video-intro-stage {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #242321;
  }

  .video-intro-body--menu-nfc .video-intro-stage::before,
  .video-intro-body--menu-nfc .video-intro-stage::after,
  .video-intro-body--reseaux-sociaux .video-intro-stage::before,
  .video-intro-body--reseaux-sociaux .video-intro-stage::after {
    content: none;
  }

  .video-intro-body--menu-nfc .video-intro-player-bg,
  .video-intro-body--reseaux-sociaux .video-intro-player-bg {
    display: none !important;
  }

  .video-intro-body--menu-nfc .video-intro-player,
  .video-intro-body--reseaux-sociaux .video-intro-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    object-fit: contain;
    object-position: center center;
    transform: none;
    filter: none;
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
    z-index: 0;
  }
}

/* Paysage mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .video-intro-brand {
    padding: 0.65rem 1rem 0.85rem;
  }

  .video-intro-brand-name {
    font-size: 1rem;
  }
}
