/* ===== HERO VIDEO PLEIN ÉCRAN ===== */
.video-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #0a0a0a;
}

.video-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Override pour iframe YouTube plein écran */
.video-hero-iframe {
  inset: unset;  /* reset inset de .video-hero-bg d'abord */
  top: 50%;
  left: 50%;
  /* Couvre le viewport en 16:9 en prenant le max des deux axes */
  width: 177.78vh;  /* 16/9 × 100vh */
  height: 56.25vw;  /* 9/16 × 100vw */
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border: 0;
}

/* Voile sombre sur la vidéo pour garantir la lisibilité du contenu */
.video-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

/* Titre centré par-dessus */
.video-hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.video-hero-title {
  font-size: clamp(28px, 10vw, 130px);
  font-weight: 400;
  color: #ffffff;
  letter-spacing: -2px;
  line-height: 1;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
}

/* Fondu bas vers la couleur de fond du site */
.video-hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 260px;
  background: linear-gradient(to bottom, transparent 0%, #050505 100%);
  z-index: 3;
  pointer-events: none;
}

/* ===== HERO CATEGORIE — style rafter ===== */
.cat-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 100px 60px;
  gap: 60px;
}

.cat-hero-left {
  max-width: 380px;
}

.cat-title {
  font-size: 48px;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.1;
  -webkit-font-smoothing: antialiased;
}

.cat-subtitle {
  margin-top: 14px;
  font-size: 11px;
  font-weight: 500;
  color: #6a6866;
  letter-spacing: 1px;
  line-height: 1.8;
}

.cat-separator {
  width: 40px;
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 28px 0;
}

.cat-desc {
  font-size: 15px;
  font-weight: 400;
  color: #8a8886;
  line-height: 1.7;
  letter-spacing: normal;
}

.cat-hero-right {
  flex: 1;
  max-width: 55%;
}

.cat-hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.cat-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== PROJETS — scroll vertical ===== */
.projects {
  padding: 80px 60px 100px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ===== PROJET FULL — style rafter ===== */
.project-full {
  display: grid;
  grid-template-columns: 1fr 60vw;
  gap: 60px;
  align-items: flex-start;
  padding: 70px 60px 70px 40px;
  margin-left: -40px;
  margin-right: -60px;
  position: relative;
}

.project-full + .project-full {
  position: relative;
}

.project-full + .project-full::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.1) 75%, transparent 100%);
  z-index: 10;
}


.project-full-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.project-full-right {
  width: 60vw;
  padding-right: 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Aperçu vidéo custom */
.project-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: #0a0a0a;
}

.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  filter: brightness(0.88) contrast(1.05);
}

/* Barres letterbox cinématographiques */
.video-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, transparent 22%),
    linear-gradient(to top,    rgba(0,0,0,0.45) 0%, transparent 22%);
  transition: opacity 0.5s ease;
}

/* Curseur PLAY custom */
#play-cursor {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: rgba(255,255,255,0.9);
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s ease;
  white-space: nowrap;
  mix-blend-mode: difference;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#play-cursor .cursor-main {
  font-size: 22px;
  font-weight: 350;
  letter-spacing: 5px;
  line-height: 1;
}

#play-cursor .cursor-sub {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 3px;
  opacity: 0.7;
  margin-top: 3px;
  line-height: 1;
}

.project-video:hover .video-thumb {
  transform: scale(1.04);
}

.project-video:hover .video-overlay {
  opacity: 0.75;
}

.project-video:hover {
  cursor: none;
}

.project-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

/* Cacher le bouton play quand la vidéo YouTube est lancée */
.project-video.video-playing::before,
.project-video.video-playing::after {
  display: none !important;
}

.project-video.video-playing .video-overlay {
  display: none;
}

/* Player natif — pas de bouton play CSS, le navigateur gère */
.native-video::before,
.native-video::after {
  display: none !important;
}

.native-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 3px;
}

.project-full-header {
  margin-bottom: 20px;
}

.project-full-title {
  font-size: clamp(32px, 6vw, 80px);
  font-weight: 600;
  line-height: 0.9;
  margin-bottom: -10px;
  color: #f0efec;
  letter-spacing: normal;
  text-transform: uppercase;
  white-space: nowrap;
}

.project-full-artist {
  display: block;
  margin-top: 8px;
  font-size: clamp(18px, 3vw, 34px);
  font-weight: 500;
  color: #f0efec;
}

/* Bande 5 images horizontale */
.project-strip {
  display: flex;
  gap: 4px;
  width: 100%;
  margin-bottom: 30px;
}

.strip-img {
  flex: 1;
  min-height: 50px;
  border-radius: 2px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: opacity 0.4s ease;
}

.strip-img:hover {
  opacity: 0.8;
}

.strip-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-full-bottom {
  display: flex;
  flex-direction: column;
}

.project-full-date {
  font-weight: 400;
  font-size: 17px;
  color: #5a5856;
}



.project-credits-wrapper {
  display: flex;
  gap: 8px;
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0.5px;
  line-height: 1.4;
}

.project-credits-label {
  font-weight: 500;
  color: #5a5856;
  font-size: 8px;
  letter-spacing: 0.5px;
  padding-top: 2px;
  white-space: nowrap;
}

.project-credits {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.credit {
  display: flex;
  gap: 16px;
}

.credit-role {
  font-weight: 350;
  color: #f0efec;
  min-width: 230px;
  text-align: left;
  text-transform: uppercase;
  font-size: 8px;
}

.credit-name {
  font-weight: 350;
  color: #8a8886;
}

/* ===== REELS — page réseaux sociaux ===== */
.reels-hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hero background — mosaïque de reels */
.reels-hero {
  background: #0a0a0a;
}

.reels-hero-mosaic {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  z-index: 0;
}

.reels-hero-mosaic video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.7) contrast(1.05);
}

.reels-section {
  padding: 60px 60px 100px;
}

/* Grille 3 colonnes clean */
.reels-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 60px 120px;
  max-width: 1150px;
  margin: 0 auto;
}

.reel-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

/* Vidéo wrap vertical */
.reel-video-wrap {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 3px;
  overflow: hidden;
  background: #0a0a0a;
  cursor: pointer;
}

.reel-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.88) contrast(1.05);
  transition: filter 0.4s ease, object-fit 0s;
}

/* Au hover ou en lightbox : vidéo affichée en format natif (pas de crop) */
.reel-video-wrap:hover video,
.reel-video-wrap.expanded video {
  filter: brightness(1);
  object-fit: contain;
  transform: none;
}

.reel-video-wrap:hover {
  cursor: none;
}

/* Overlay titre au hover */
.reel-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 14px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.reel-video-wrap:hover .reel-overlay {
  opacity: 1;
}

.reel-overlay-title {
  font-size: 11px;
  font-weight: 500;
  color: #f0efec;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Infos sous la vidéo — style page musique */
.reel-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.reel-artist {
  font-size: 24px;
  font-weight: 400;
  color: #f0efec;
  letter-spacing: normal;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
}

.reel-title {
  font-size: 15px;
  font-weight: 400;
  color: #5a5856;
  letter-spacing: normal;
  text-transform: capitalize;
  white-space: nowrap;
  overflow: hidden;
}

/* Footer position static pour le scroll */
.projects + footer {
  position: static;
  margin-top: 40px;
}

/* ===== REEL LIGHTBOX — FLIP zoom ===== */
#reel-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 5, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

#reel-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.reel-video-wrap.reel-zooming {
  position: fixed !important;
  z-index: 9100;
  width: var(--reel-w) !important;
  height: var(--reel-h) !important;
  left: var(--reel-x) !important;
  top: var(--reel-y) !important;
  aspect-ratio: auto !important;
  margin: 0 !important;
  transition:
    left 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  border-radius: 8px;
}

/* Panel credits à droite */
#reel-credits {
  position: fixed;
  z-index: 9101;
  color: #f0efec;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.2s,
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
  pointer-events: none;
  max-width: 340px;
}

#reel-credits.active {
  opacity: 1;
  transform: translateX(0);
}

#reel-credits .credits-client {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #8a8886;
  margin-bottom: 8px;
  display: block;
}

#reel-credits .credits-title {
  font-size: 38px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: normal;
  color: #f0efec;
  margin: 0 0 24px 0;
  text-transform: none;
}

#reel-credits .credits-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 60vh;
  overflow-y: auto;
}

#reel-credits .credit-line {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 11px;
  line-height: 1.5;
  margin-bottom: 6px;
}

#reel-credits .credit-role {
  color: #6a6866;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 8px;
}

#reel-credits .credit-name {
  color: #d0cfcd;
}

#reel-credits .credits-label {
  display: block;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #6a6866;
  margin-bottom: 10px;
}

.reel-video-wrap.reel-zooming video {
  filter: brightness(1) contrast(1) !important;
  transform: none !important;
}

.reel-video-wrap.reel-zooming:hover video {
  transform: none !important;
}

body.reel-locked {
  overflow: hidden;
}

/* Bouton close lightbox */
#reel-close-btn {
  display: flex;
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9200;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.3s ease;
  padding: 0;
}

#reel-close-btn.active {
  opacity: 1;
  pointer-events: auto;
}

#reel-close-btn:active {
  transform: scale(0.85);
}

#reel-close-btn svg {
  width: 22px;
  height: 22px;
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 1.5;
  stroke-linecap: round;
  transition: stroke 0.2s ease;
}

#reel-close-btn:hover svg {
  stroke: #fff;
}

/* ===== RESPONSIVE — TABLETTE (901-1024px) ===== */
@media (max-width: 1024px) {
  .video-hero-title {
    font-size: 80px;
  }

  .projects {
    padding: 60px 30px 80px;
    gap: 40px;
  }

  .project-full {
    grid-template-columns: 1fr 50vw;
    gap: 30px;
    padding: 40px 30px;
    margin-left: 0;
    margin-right: 0;
  }

  .project-full-right {
    width: 50vw;
    padding-right: 0;
  }

  .project-full-title {
    font-size: 48px !important;
  }

  .project-full-artist {
    font-size: 24px;
  }

  .credit-role {
    min-width: 140px;
  }

  .reels-section {
    padding: 40px 30px 80px;
  }

  .reels-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 40px;
    max-width: 100%;
  }

  .reel-artist {
    font-size: 18px;
  }

  .cat-hero {
    padding: 80px 30px;
    gap: 40px;
  }
}

/* ===== RESPONSIVE — TABLETTE ÉTROITE / PETITE FENÊTRE (769-900px) ===== */
/* À ces largeurs le layout 2 colonnes est trop serré : on stack verticalement */
@media (min-width: 769px) and (max-width: 900px) {
  .project-full {
    grid-template-columns: 1fr !important;
    gap: 24px;
    padding: 40px 24px;
  }

  .project-full-right {
    width: 100% !important;
    max-width: 720px;
  }

  .project-full-title {
    font-size: 56px !important;
  }

  .project-credits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 24px;
  }

  .credit {
    display: flex;
    gap: 10px;
  }

  .credit-role {
    min-width: 120px;
    font-size: 9px;
  }

  .credit-name {
    font-size: 11px;
  }

  .reels-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== RESPONSIVE — MOBILE (≤768px) ===== */
@media (max-width: 768px) {
  #play-cursor {
    display: none !important;
  }

  .video-hero {
    height: 45vh;
  }

  .video-hero-title {
    font-size: 36px;
    font-weight: 350;
    letter-spacing: 2px;
    padding: 0 16px;
    text-align: center;
  }

  .video-hero-iframe {
    /* Garder visible sur mobile — cover via min-width/min-height */
    inset: unset;
    top: 50%;
    left: 50%;
    width: 177.78vh;
    height: 56.25vw;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    border: 0;
  }

  .video-hero-fade {
    height: 120px;
  }

  .projects {
    padding: 30px 16px 60px;
    gap: 40px;
  }

  .project-full {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0;
    margin: 0;
  }

  .project-full-right {
    width: 100%;
    padding-right: 0;
  }

  .project-full-title {
    font-size: 48px !important;
    white-space: normal;
    line-height: 0.95;
    font-weight: 600;
  }

  .project-full-artist {
    font-size: 30px;
    margin-top: 6px;
  }

  .project-full-date {
    font-size: 14px;
    color: #5a5856;
  }

  .project-full-header {
    margin-bottom: 10px;
  }

  .project-strip {
    gap: 2px;
    margin-bottom: 10px;
  }

  /* Crédits compacts — 3 colonnes, une seule ligne par crédit */
  .project-credits-wrapper {
    font-size: 9px;
    gap: 4px;
    flex-direction: column;
  }

  .project-credits-label {
    font-size: 5px;
    margin-bottom: 1px;
  }

  .project-credits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
  }

  .credit {
    display: flex;
    gap: 4px;
  }

  .credit-role {
    min-width: 0;
    font-size: 4px;
    line-height: 1.5;
  }

  .credit-name {
    font-size: 4px;
    line-height: 1.5;
  }

  /* Separateur + espace entre projets */
  .project-full + .project-full {
    padding-top: 30px;
  }

  .project-full + .project-full::before {
    left: 16px;
    right: 16px;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.1) 20%, rgba(255,255,255,0.1) 80%, transparent 100%);
  }

  /* Cat hero */
  .cat-hero {
    flex-direction: column;
    padding: 70px 16px 30px;
    gap: 24px;
    min-height: auto;
  }

  .cat-hero-right {
    max-width: 100%;
  }

  .cat-title {
    font-size: 28px;
  }

  .cat-desc {
    font-size: 13px;
  }

  /* Reels */
  .reels-section {
    padding: 20px 16px 60px;
  }

  .reels-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 12px;
    max-width: 100%;
  }

  .reel-artist {
    font-size: 28px;
  }

  .reel-title {
    font-size: 16px;
  }

  /* Play cursor : caché sur mobile */
  #play-cursor {
    display: none !important;
  }

  /* Bouton play visible sur mobile — flou pur */
  .project-video::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    border-radius: 50%;
    z-index: 5;
    pointer-events: none;
    background: transparent;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,0.5) 0%, transparent 65%);
    mask-image: radial-gradient(circle, rgba(0,0,0,0.5) 0%, transparent 65%);
  }

  .project-video::before {
    content: '';
    position: absolute;
    top: 50%;
    left: calc(50% + 4px);
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 20px 0 20px 34px;
    border-color: transparent transparent transparent rgba(255,255,255,0.35);
    z-index: 6;
    pointer-events: none;
  }

  /* Footer static pour scroll */
  .projects + footer {
    margin-top: 20px;
  }

  /* Reel lightbox mobile — credits sous la vidéo */
  #reel-credits {
    max-width: 100% !important;
    padding: 16px 20px !important;
  }

  #reel-credits .credits-title {
    font-size: 18px;
  }

  #reel-credits .credits-list {
    max-height: 30vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    row-gap: 0;
  }

}

/* ===== RESPONSIVE — PETIT MOBILE (≤480px) ===== */
@media (max-width: 480px) {
  .video-hero {
    height: 40vh;
  }

  .video-hero-title {
    font-size: 28px;
    font-weight: 350;
  }

  .project-full-title {
    font-size: 40px !important;
  }

  .project-full-artist {
    font-size: 26px;
  }

  .reels-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 100%;
    padding: 0 16px;
  }

  .reel-artist {
    font-size: 24px;
  }

  .reel-title {
    font-size: 14px;
  }

  .video-hero-title {
    font-size: 28px;
    font-weight: 350;
  }
}

/* ===== PERFORMANCE : GPU faible ===== */
html[data-perf-level="0"] #reel-backdrop,
html[data-perf-level="1"] #reel-backdrop {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(5, 5, 5, 0.92) !important;
}

/* Connexion lente : pas de vidéos hero, juste les posters */
html[data-perf-level="0"] .reels-hero-mosaic video,
html[data-perf-level="0"] #reel-bg-hover { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .reel-video-wrap.reel-zooming { transition: none !important; }
  #reel-credits { transition: none !important; }
  .reels-hero-mosaic video { display: none !important; }
}
