/* ---------- VIDEOS ----------
 * Médias : LES PROJETS/VIDEOS/ (chemins dans videos.html, mediaUrl).
 * Dossiers : AURAVIZION, MMI LAN, Animation, CADRAGE, LOGOS.
 */

@font-face {
  font-family: "Trade Gothic Next LT Pro Cn";
  src: url("Typos/Trade%20Gothic%20Next%20LT%20Pro%20Cn.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-videos: "Futura", "Century Gothic", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --font-videos-projets: "Trade Gothic Next LT Pro Cn", var(--font-videos);
}

html {
  height: 100%;
}

body.page-videos-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #000;
  color: #fff;
  font-family: var(--font-videos);
  -webkit-font-smoothing: antialiased;
  /* Repères avant mesure JS (syncVideosPageChrome) */
  --videos-header-h: 4.25rem;
  --videos-subnav-h: 3.2rem;
  --videos-footer-h: 5.75rem;
}

/* Colonne : vidéo sous le header fixe */
.page-videos {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-top: calc(var(--videos-header-h) + var(--videos-subnav-h));
  padding-bottom: 0;
  background: transparent;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.page-videos.est-affiche {
  opacity: 1;
}

/* Header principal sur fond noir */
.videos-nav-wrap {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.videos-back {
  flex-shrink: 0;
  font-size: var(--site-footer-text-size, 0.88rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.videos-back:hover {
  color: var(--nav-hover, #00ff0c);
}

@media (max-width: 900px) {
  .videos-back { display: none; }
}

.videos-page-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  padding-top: env(safe-area-inset-top, 0px);
  background: #000;
  border-bottom: none;
}

.videos-header-main {
  padding: 10px clamp(12px, 4vw, 2rem) 6px;
}

.videos-subnav-inner {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: var(--max-w, 1320px);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  position: relative;
  padding: 0 clamp(12px, 4vw, 2rem) 10px;
}

/* Bandeau de sélection projets dissocié, transparent, sous le header principal */
.videos-subnav {
  position: fixed;
  top: var(--videos-header-h);
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  pointer-events: none;
}

.videos-subnav .videos-subnav-inner {
  pointer-events: auto;
}

body.page-videos-body .nav-main a {
  color: #fff;
}

body.page-videos-body .nav-main a:hover {
  color: var(--nav-hover, #00ff0c);
}

.block-videos {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.block-videos .videos-zone {
  position: absolute;
  inset: 0;
}

/* ---------- Sous-nav projets vidéo ---------- */
.videos-projets-nav {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2vw, 24px) clamp(16px, 3vw, 40px);
  min-height: 0;
  padding: 4px 8px;
}

@media (max-width: 1100px) {
  .videos-projet-btn {
    font-size: 12px;
    padding: 6px 4px;
  }

  .videos-projet-btn.is-active {
    font-size: 1.55em;
  }
}

.videos-projet-btn {
  font-family: var(--font-videos-projets);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.65);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 6px;
  transition: color 0.35s ease, font-size 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.videos-projet-btn:hover {
  color: rgba(255, 255, 255, 0.95);
}

.videos-projet-btn.is-active {
  color: #fff;
  font-size: 1.85em;
  transform: scale(1);
  animation: videos-projet-active 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes videos-projet-active {
  0% {
    transform: scale(0.92);
    opacity: 0.7;
  }
  60% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ---------- Zone vidéo plein écran ---------- */
.videos-zone {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: #000;
}

.videos-fond-wrapper {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.videos-fond-layers {
  position: absolute;
  inset: 0;
}

.videos-fond.videos-fond-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.85s ease;
  z-index: 1;
}

.videos-fond.videos-fond-layer.videos-fond-layer--visible {
  opacity: 1;
  z-index: 2;
}

.videos-fond--vertical {
  object-fit: contain;
  background-color: #000;
}

.videos-fond-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.15) 35%,
    rgba(0, 0, 0, 0.25) 100%
  );
}

/* ---------- Centre : miniature + titre ---------- */
.videos-contenu {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  /* Espace sous le bandeau fixe et au-dessus du footer fixe (variables mesurées en JS) */
  padding: calc(var(--videos-header-h, 4.25rem) + clamp(28px, 5vh, 56px)) clamp(16px, 4vw, 48px)
    calc(var(--videos-footer-h, 5.75rem) + clamp(28px, 5vh, 56px));
}

.videos-centre {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vh, 20px);
  max-width: min(560px, 78vw);
  pointer-events: auto;
}

.videos-miniature-link {
  display: block;
  line-height: 0;
  border-radius: clamp(6px, 1vw, 12px);
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.videos-miniature-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.65);
}

.videos-miniature-img {
  display: block;
  width: 100%;
  max-width: min(480px, 70vw);
  height: auto;
  vertical-align: middle;
}

/* Miniatures portrait (Mmi Lan, Tournage Chung Chun, etc.) : ~¼ largeur, ~⅓ hauteur viewport comme la maquette */
.videos-miniature-img.videos-miniature-img--vertical {
  width: auto;
  max-width: min(300px, 28vw);
  max-height: min(38vh, 520px);
  height: auto;
  object-fit: contain;
}

.videos-titre {
  margin: 0;
  text-align: center;
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

/* ---------- Zones clic précédent / suivant ---------- */
.videos-side-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(22%, 180px);
  z-index: 12;
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

/* Désactivé : invisible et sans interception (évite les bandes assombries sur les côtés) */
.videos-side-hit:disabled {
  cursor: default;
  pointer-events: none;
  visibility: hidden;
}

.videos-side-hit:focus {
  outline: none;
}

.videos-side-hit:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: -2px;
}

.videos-side-hit--prev {
  left: 0;
}

.videos-side-hit--next {
  right: 0;
}

/* ---------- Bandeaux vignettes latérales ---------- */
.videos-bandeau {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 11;
  width: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.videos-bandeau-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.videos-bandeau--gauche {
  left: clamp(8px, 2vw, 20px);
}

.videos-bandeau--droite {
  right: clamp(8px, 2vw, 20px);
}

.videos-zone:not(.videos-zone--has-carousel) .videos-bandeau {
  opacity: 0;
  visibility: hidden;
}

.videos-thumb-btn {
  display: block;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #111;
  line-height: 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.videos-thumb-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.videos-thumb-btn img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

body.videos-project-auravizion .videos-bandeau {
  width: 120px;
}

body.videos-project-auravizion .videos-thumb-btn {
  width: 240px;
}

@media (max-width: 900px) {
  body.videos-project-auravizion .videos-bandeau {
    width: 84px;
  }

  body.videos-project-auravizion .videos-thumb-btn {
    width: 168px;
  }

  .videos-bandeau {
    width: 72px;
  }

  .videos-thumb-btn {
    width: 120px;
  }
}

/* ---------- Fondu transition projet ---------- */
.videos-transition {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.videos-transition.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Pied de page fixe en bas de l’écran (même rôle que sur les autres pages) */
body.page-videos-body .site-footer.videos-page-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  flex-shrink: 0;
  margin-top: 0;
  background: none;
  border-top: none;
  box-shadow: none;
  padding-top: clamp(1rem, 5vw, 2rem);
  padding-right: 1rem;
  padding-left: 1rem;
  padding-bottom: calc(clamp(1rem, 5vw, 2rem) + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

body.page-videos-body .videos-page-footer .footer-inner {
  pointer-events: auto;
}

body.page-videos-body .site-footer .footer-links a {
  color: #fff;
}

body.page-videos-body .site-footer .footer-links a:hover {
  color: var(--nav-hover, #00ff0c);
}

body.page-videos-body .site-footer .footer-links span {
  color: rgba(255, 255, 255, 0.85);
}

body.page-videos-body .videos-page-footer .videos-footer-brand {
  display: inline-flex;
  align-items: center;
  font-size: var(--site-footer-text-size, 0.88rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: left;
  color: #fff;
  font-family: inherit;
  padding: 0;
  margin: 0;
  line-height: 1.2;
  cursor: default;
  user-select: none;
}

body.page-videos-body .burger span {
  background: #fff;
}
