
/* Base du site */

html {
  overflow-y: scroll;
}

@font-face {
  font-family: "Jost";
  src: url("fonts/jost/Jost-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Jost";
  src: url("fonts/jost/Jost-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Jost";
  src: url("fonts/jost/Jost-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Jost";
  src: url("fonts/jost/Jost-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Jost";
  src: url("fonts/jost/Jost-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #111111;
  font-family: 'Jost', sans-serif;
  font-weight: 500;
}

/* En-tête */



header {
  position: fixed;
  top: 48%;
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  font-family: 'Jost', sans-serif;
  font-weight: 800;
  font-size: clamp (13px, 1.4vw, 7px);
  letter-spacing: 0.35em;
  z-index: 10;
}

header p {
  margin: 0;
}



/* Showreel */

.showreel-container {
  width: 60%;
  max-width: 1200px;
  aspect-ratio: 16 / 9;
  position: relative;
  margin: 45px auto 0;
}

.showreel-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Navigation */

nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 45px 20px;
  font-size: 13px;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
}

nav a {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 1130px) {
  header {
    position: absolute;
    top: 0;
    left: 0;
    transform: none;
    padding: 20px 15px;
    font-size: 10px;
    letter-spacing: 7px;
    gap: 15px;
  }

  .showreel-container {
    width: 100%;
    margin-top: 35px;
  }

  nav {
    gap: 12px;
    margin-top: 30px;
    font-size: 12px;
  }
}

/* Vidéo sans interface, avec clic pour le son */

.showreel-container iframe {
  pointer-events: none;
}

.video-click-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
  
}

main {
  position: relative;
  top: 46vh;
  transform: translateY(-50%);
}

nav a {
  position: relative;
  color: inherit;
  text-decoration: none;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: #999999;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

nav a:hover::after {
  transform: scaleX(1);
}

/* Lien cliquable vers Vimeo */
.showreel-link {
  position: absolute;
  inset: 0;
  display: block;
  cursor: pointer;
}

/* Liens du header */
header a {
  color: inherit;
  text-decoration: none;
}

header a::after {
  display: none;
}

/* Navigation sur téléphone uniquement */
@media (max-width: 600px) {
  nav {
    font-size: 10px;
    gap: 8px;
    row-gap: 12px;
    margin-left: 10px;
    margin-right: 10px;
  }
}

/* Fondu d'entrée et de sortie du contenu */
.page-transition {
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* Apparition du contenu à l'arrivée */
body.page-loaded .page-transition {
  opacity: 1;
}

/* Disparition du contenu au départ */
body.page-leaving .page-transition {
  opacity: 0;
}

/* Le header reste indépendant du fondu */
header {
  opacity: 1;
}

/* Fond noir pendant le chargement, puis blanc au démarrage */
.showreel-container {
  background-color: #000000;
  transition: background-color 0.6s ease;
}

/* Passage au blanc lorsque la vidéo démarre */
.showreel-container.has-started {
  background-color: #ffffff;
}

.showreel-container iframe {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.showreel-container iframe.is-ready {
  opacity: 1;
}

/* Showreel vidéo hébergée */
.showreel-container video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.showreel-container video.is-ready {
  opacity: 1;
}

header h1 {
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
}
