
@font-face {
  font-family: "Inter Tight";
  src: url("assets/fonts/inter-tight-v9-latin-100.woff2") format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter Tight";
  src: url("assets/fonts/inter-tight-v9-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ... */

html,
body {
  width: 100%;
  height: 100%;
}

body {
  font-family: "Inter Tight", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: #102648;
  color: #ffffff;
  overflow-x: hidden;
}

/* ---------- GRILLE DE LIGNES VERTICALES ---------- */

.vertical-lines-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Permet de cliquer à travers */
  z-index: 2; /* Au-dessus de la vidéo (z-index: 1) et en dessous du contenu (z-index: 3+) */
}

.vertical-line {
  position: absolute;
  top: 0;
  height: 100%;
  width: 1px;
  background-color: rgba(255, 255, 255, 0.05);
  mix-blend-mode: overlay;
}

/* NOUVEAU : Conteneur principal pour l'animation */
.animation-wrapper {
  position: absolute;
  /* La position est maintenant gérée par GSAP */
  opacity: 0; /* GSAP le positionnera et le rendra visible */
  z-index: 2;
  /* NOUVEAU : Utilisation de Flexbox pour l'alignement interne */
  display: flex;
  flex-direction: column;
  align-items: center; /* Centre les enfants horizontalement */
}

/* Groupe du titre à l'intérieur du wrapper */
.hero-intro-group {
  /* NOUVEAU : Positionnement absolu pour superposition */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* Prend toute la hauteur du wrapper */
}

/* ---------- INTRO HERO ---------- */

/* L'ancienne section #intro est supprimée */

/* ---------- HERO VIDÉO + 3D ---------- */

.hero {
  position: relative;
  height: 100vh; /* Hauteur normale du viewport */
  width: 100%;
  overflow: hidden;
}

.hero-video {
  position: absolute; /* La vidéo défile avec la section */
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1; /* La vidéo est le calque le plus bas */
}

#beluga-canvas {
  position: fixed; /* Le canvas aussi reste fixe */
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4; /* Le béluga est au-dessus de tout */
}

.beluga-waypoints {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 40; /* au-dessus de la grille, sous le carré rouge si besoin */
}

.beluga-waypoints .waypoint {
  position: absolute;
  background: rgba(255, 255, 255, 0.5); /* 50% alpha */
  border-radius: 4px;
  transform-origin: center center;
  transform: translate(-50%, -50%) rotate(0deg);
}

.hero-content {
  position: relative; /* Changé pour que z-index fonctionne sur ses enfants */
  z-index: 3;
  height: 100%;
}

.hero-title {
  position: relative;
  margin: 0;
  font-family: "Inter Tight", system-ui, sans-serif; /* L'espacement est géré par letter-spacing */
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #ffffff;
  white-space: nowrap;
  text-align: center;
  /* Variables CSS pour piloter les animations depuis GSAP */
  --line-top-scale: 0;
  --line-bottom-scale: 0;
}

/* Ligne du haut */
.hero-title::before {
  content: '';
  position: absolute;
  top: 5px; /* On descend la ligne pour la rapprocher du texte */
  left: 0;
  width: 100%;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.5);
  transform: scaleX(var(--line-top-scale));
  transform-origin: left;
}

/* Ligne du bas */
.hero-title::after {
  content: '';
  position: absolute;
  bottom: 5px; /* On monte la ligne pour la rapprocher du texte */
  left: 0;
  width: 100%;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.5);
  transform: scaleX(var(--line-bottom-scale));
  transform-origin: right;
}

.hero-word {
  display: inline-block;
}

.hero-word--the,
.hero-word--project {
  font-weight: 100;
}

.hero-word--beluga {
  font-weight: 700;
}

/* Animation des lettres injectées par JS */
.hero-letter {
  display: inline-block;
  white-space: pre; /* Important pour conserver les espaces si besoin */
  opacity: 0;
  transform: translate(-2px, 4px) scale(0.9);
  filter: blur(6px);
  animation: hero-fadeIn 0.5s ease-out forwards;
}

@keyframes hero-fadeIn {
  to {
    opacity: 1;
    transform: translate(0, 0) scale(1);
    filter: blur(0);
  }
}

.hero-subtitle-line {
  display: block;
}

.hero-subtitle-line--bottom {
  font-weight: 700;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.4rem;
    letter-spacing: 0.18em;
  }
}

/* ---------- GROUPE SVG PORTFOLIO / IMMERSIF ---------- */

.svg-immersif-group {
  position: absolute; /* Positionné par JS */
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Aligne les SVG enfants à gauche */
  gap: 10px; /* Espace entre les deux SVG */
  opacity: 0; /* Invisible par défaut, GSAP le rendra visible */
  pointer-events: none; /* Permet les clics à travers par défaut */
}

.svg-immersif {
  display: block;
  height: auto;
  pointer-events: auto; /* Réactive les événements sur les SVG */
}

.svg-immersif--portfolio {
  width: 100%; /* Prend 100% de la largeur du parent (.svg-immersif-group) */
}

.svg-immersif--morph {
  width: 30%; /* 30% de la largeur du parent, qui est la même que celle du portfolio */
}


/* ---------- SECTION PORTFOLIO / IMMERSIF ---------- */

.portfolio-section {
  position: absolute;
  /* Positionné par rapport au .hero */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3; /* Au-dessus de la grille et de la vidéo, sous le béluga */
  pointer-events: none; /* Permet les clics à travers la section */
  display: flex;
  justify-content: center; /* Centre le .svg-block horizontalement */
}

.svg-block {
  position: absolute; /* Positionné par JS */
  margin-top: 10px; /* Marge de 10px sous l'animation-wrapper */
  pointer-events: auto; /* Active les événements sur ce bloc spécifique */
}

.svg-right-stack {
  position: relative; /* Contexte de positionnement pour les SVG */
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* Aligne les enfants (SVG) à droite */
  gap: 10px; /* Espace entre les deux SVG */
}

.svg-item {
  display: block;
  height: auto;
}

.svg-item--logo {
  width: 100%; /* Le logo prend toute la largeur du .svg-block */
}

.svg-item--morph {
  /* La largeur est 30% de la largeur de son conteneur (.svg-right-stack),
     qui est elle-même déterminée par la largeur du .svg-item--logo. */
  width: 30%;
}


/* ---------- SECTIONS GÉNÉRALES ---------- */

section {
  padding: 6rem 10vw;
}

/* Conteneur pour le scroll, pour que le canvas 3D puisse être en fixed */
.scroll-container {
  position: relative;
  z-index: 1; /* Assure que le contenu est au-dessus du canvas */
}

/* ---------- OVERLAY ORIENTATION / LARGEUR ---------- */

#orientation-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(
    circle at top,
    #0a4a78 0%,
    #01101f 60%,
    #000814 100%
  );
  color: #eaf6ff;
  display: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 9999;
}

#orientation-overlay .overlay-content {
  max-width: 720px;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#orientation-overlay .overlay-gif {
  height: 680px;
  width: auto;
  margin-bottom: 2rem;
  border-radius: 24px;
  filter: hue-rotate(190deg) saturate(1.3) brightness(1.1);
}

#orientation-overlay .overlay-content p {
  color: #dfefff;
  font-size: 2rem;
  line-height: 1.6;
  text-align: center;
}

/* ---------- SECTION À PROPOS ---------- */

.about {
  background: #102648;
}

.about p {
  max-width: 28rem;
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.9;
}

/* ---------- SECTIONS 01 / 02 ---------- */

.step {
  background: #102648;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.step .container {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.step h2 {
  font-size: clamp(3rem, 6vw, 4.2rem);
  font-weight: 700;
}

.step h3 {
  font-size: 1.1rem;
  max-width: 24rem;
  line-height: 1.3;
  text-transform: uppercase;
}

.step p {
  max-width: 24rem;
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0.9;
}

/* ---------- RESPONSIVE TABLETTE ---------- */

@media (max-width: 1024px) {
  .hero-content {
    padding: 0 6vw;
  }

  section {
    padding: 4rem 6vw;
  }

  .step .container {
    max-width: 100%;
  }
}

/* ---------- RESPONSIVE MOBILE ---------- */

@media (max-width: 768px) {
  .hero {
    height: 100vh;
  }

  .hero-content {
    align-items: flex-start;
    justify-content: flex-end;
    padding: 0 6vw 3rem 6vw;
  }

  .hero-content .label {
    font-size: 0.7rem;
  }

  .about p,
  .step p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .step h3 {
    font-size: 1rem;
    max-width: 100%;
  }

  section {
    padding: 3.5rem 6vw;
  }
}

/* ---------- BELUGA JOURNEY SECTION ---------- */

.beluga-journey {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

/* Grille : en fond, mais visible */
.beluga-journey-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.beluga-journey-grid .vertical-lines-container {
  position: absolute;
  inset: 0;
}

/* Canvas Three.js : au-dessus de la grille */
.beluga-canvas-wrapper {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 20;
}

#beluga-canvas-journey {
  width: 100%;
  height: 100%;
  display: block;
}

/* CARRÉ-GUIDE : overlay au-dessus de tout dans la section */
#beluga-guide-square {
  position: absolute;
  width: 80px;
  height: 80px;
  background: rgba(255, 0, 0, 0.6); /* visible en debug */
  transform-origin: center center;
  pointer-events: none;
  z-index: 999; /* plus haut que tout autre élément de beluga-journey */
}

/* ---------- SCROLL TO TYPE (JOURNEY) ---------- */
.scroll-to-type-wrapper {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 120;
}

.scroll-to-type-container {
  position: absolute;
  top: 35vh; /* Position verticale plus basse, au niveau du premier waypoint */
  transform: translateX(0);
  pointer-events: none;
}

.scroll-to-type-line-wrapper {
  display: inline-block;
  transform: translateY(0);
  will-change: transform;
}

.scroll-to-type-text-box {
  position: relative;
  max-width: 38ch;
  color: #ffffff;
  font-family: "Neue Haas Grotesk Text Pro", "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: clamp(1.2rem, 1.8vw, 1.4rem);
  line-height: 1.6;
  letter-spacing: 0.01em;
  text-align: left;
  word-break: keep-all;
}

.scroll-to-type-text-box .char-span {
  display: inline-block;
  white-space: pre;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.08s ease, transform 0.08s ease;
}

.scroll-to-type-text-box .char-span.active {
  opacity: 1;
  transform: translateY(0);
}

.scroll-to-type-cursor {
  display: inline-block;
  width: 0.7em;
  height: 1.1em;
  background: #55b6c4;
  border-radius: 2px;
  margin-left: 0.05em;
  vertical-align: baseline;
  animation: cursor-blink 0.9s steps(1) infinite;
}

@keyframes cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

body.beluga-scroll-locked {
  overflow: hidden;
}

body.beluga-scroll-locked {
  overflow: hidden;
}

/* ---------- OVERLAY SCROLL INTRO ---------- */
#beluga-scroll-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: auto; /* Capture tous les clics/scrolls */
  background: transparent;
}

/* ===========================
   3D Carousel section
   =========================== */

.carousel-3d {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: #0a1b35; /* Variante plus profonde du fond principal */
  color: #ffffff;
  overflow: hidden;
}

.carousel-3d__inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-3d__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 50; /* Au-dessus du fond, sous le canvas Beluga global si nécessaire */
}

.carousel-3d__viewport {
  position: relative;
  width: min(1100px, 90vw);
  height: min(650px, 70vh);
  perspective: 1400px;
  margin-inline: auto;
}

.carousel-3d__track {
  position: relative;
  width: 100%;
  height: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  transform-style: preserve-3d;
}

.carousel-3d__item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform-origin: 50% 50%;
  backface-visibility: hidden;
  will-change: transform, opacity, filter;
  transition: opacity 0.35s ease-out;
}

.carousel-3d__item.is-active {
  opacity: 1;
}

.carousel-3d__card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: radial-gradient(circle at top, #163a6b 0, #050e1e 55%, #020715 100%);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.carousel-3d__media {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-3d__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.carousel-3d__content {
  padding: 2.5rem 2.5rem 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

/* Typo alignée sur le reste du site */
.carousel-3d__title {
  font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(2.1rem, 3vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.carousel-3d__text {
  font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  line-height: 1.7;
  color: rgba(240, 246, 255, 0.9);
  max-width: 32rem;
}

/* Accent visuel rappelant le bleu Beluga */
.carousel-3d__title::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 2px;
  margin-right: 12px;
  background: linear-gradient(90deg, #55b6c4, transparent);
  vertical-align: middle;
}

/* Hover subtil sur l'image */
.carousel-3d__card:hover .carousel-3d__media img {
  transform: scale(1.06);
}

/* Responsive tablette */
@media (max-width: 1024px) {
  .carousel-3d {
    padding: 4rem 0;
  }

  .carousel-3d__viewport {
    width: 92vw;
    height: 70vh;
  }

  .carousel-3d__card {
    grid-template-columns: 1.4fr 1.8fr;
    border-radius: 20px;
  }

  .carousel-3d__content {
    padding: 2rem 2rem 2rem 1.75rem;
  }
}

/* Responsive mobile */
@media (max-width: 768px) {
  .carousel-3d__sticky {
    align-items: flex-start;
  }

  .carousel-3d__viewport {
    width: 94vw;
    height: 75vh;
  }

  .carousel-3d__card {
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .carousel-3d__content {
    padding: 1.75rem 1.5rem 1.75rem;
  }

  .carousel-3d__title {
    letter-spacing: 0.12em;
    font-size: clamp(1.7rem, 5vw, 2.1rem);
  }

  .carousel-3d__text {
    font-size: 0.95rem;
  }
}
