/* ===== BASE ===== */
body {
  background-color: #161616;
  color: #f3f1f6;
  font-family: "Figtree", Arial, Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  transition: background-color 0.8s ease, color 0.8s ease;
  overflow-y: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body::-webkit-scrollbar {
  display: none;
}

@font-face {
  font-family: "Hakgyoansim";
  src: url("../fonts/Hakgyoansim/HakgyoansimRikodeoR.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

/* ===== NAVIGATION ===== */
nav {
  width: 100%;
  height: 100px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.menu-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 3% 5%;
}

.noise::before {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  content: "";
  opacity: 0.02;
  z-index: 1000;
  pointer-events: none;
  background: url("noise.gif");
}

/* ===== ROLLING TEXT ===== */
/* Menu */
.burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.burger span {
  width: 18px;
  height: 1.5px;
  background-color: #f3f1f6;
  display: block;
}

.logo {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
}

.logo img {
  width: 20%;
  display: flex;
}

#logo {
  font-style: italic;
  font-weight: bolder;
  font-size: 22px !important;
  filter: blur(0px);
  letter-spacing: 3px;
  color: #f3f1f6;
  font-family: "times", serif;
  opacity: 1;
  text-transform: lowercase;
}

.bouttons {
  display: flex;
  flex-direction: row;
  gap: 15px;
}

button {
  all: unset; /* Réinitialise les styles par défaut */
  display: inline-block; /* Nécessaire pour appliquer vos styles */
}

.button_2 {
  width: 54px; /* Largeur fixe, ajuste si besoin */
  height: 54px; /* Hauteur fixe, ajuste si besoin */
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0 4px; /* Optionnel : petit espace entre les boutons */
  border: 1px solid #f3f1f6;
  color: #f3f1f6;
  opacity: 0.75;
}

.button_2 button {
  text-decoration: none;
  padding: 15px 20px;
  font-size: calc(1vw + 0.28rem);
  display: inline-block;
  transition: background-color 0.4s ease, transform 0.7s ease;
}

.button_2:hover {
  background-color: #d4d2d270;
  backdrop-filter: blur(100px);
  -webkit-backdrop-filter: blur(6px); /* pour Safari */
}

.button_2 a {
  text-decoration: none;
  padding: 10px 10px;
  font-size: calc(1vw - 0.05rem);
  display: inline-block;
}

.menu {
  width: 90%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1% 4%;
}

.rolling-text {
  display: inline-block;
  font-size: 16px;
  line-height: 25px;
  height: 25px;
  text-decoration: none;
  overflow: hidden;
  color: #f3f1f6;
  opacity: 0.5;
  filter: blur(0.4px);
  padding: 0px 15px;
}

.onglet_active {
  opacity: 1;
  filter: blur(0px);
}

.rolling-text:hover {
  filter: blur(0px);
}

.rolling-text:hover .letter,
.rolling-text.play .letter {
  transform: translateY(-100%);
}

.rolling-text .block:last-child {
  opacity: 1;
}

.rolling-text .letter {
  display: inline-block;
  transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1);
}

.letter:nth-child(1) {
  transition-delay: 0s;
}

.letter:nth-child(2) {
  transition-delay: 0.015s;
}

.letter:nth-child(3) {
  transition-delay: 0.03s;
}

.letter:nth-child(4) {
  transition-delay: 0.045;
}

.letter:nth-child(5) {
  transition-delay: 0.06s;
}

.letter:nth-child(6) {
  transition-delay: 0.075s;
}

.letter:nth-child(7) {
  transition-delay: 0.09s;
}

.letter:nth-child(8) {
  transition-delay: 0.105s;
}

.letter:nth-child(9) {
  transition-delay: 0.12s;
}
/* ===== FRISE CONTAINER ===== */
.frise-container {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}
.ligne-partition {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 90%;
  max-width: 1400px;
  transform: translate(-50%, -50%);
  z-index: 1;
}

/* ===== NOTES ===== */
.note {
  position: absolute;
  cursor: pointer;
  transition: filter 0.5s cubic-bezier(0.76, 0, 0.24, 1),
    opacity 0.5s cubic-bezier(0.76, 0, 0.24, 1),
    transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
  z-index: 2;
  opacity: 0.7;
  transform: scale(0.99);
}

.note:hover,
.note.active {
  filter: blur(0);
  opacity: 1;
  z-index: 5;
  transform: scale(1);
}

.note img {
  width: 100%;
  display: block;
  transition: filter 0.5s cubic-bezier(0.76, 0, 0.24, 1),
    opacity 0.9s cubic-bezier(0.76, 0, 0.24, 1),
    transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
  opacity: 0.8;
  transform: scale(0.99);
}

.note:hover img,
.note.active img {
  filter: blur(0);
  opacity: 1;
  transform: scale(1);
  margin: 10px 0px;
}

/* Note positions */
.note-1 {
  left: 8%;
  top: 32%;
  width: 15%;
  transform: translateY(1.5%);
}
.note-2 {
  top: 27%;
  left: 34%;
  width: 10%;
  transform: translateY(1.5%);
}
.note-3 {
  left: 48%;
  top: 33%;
  width: 10%;
  transform: translateY(1.5%);
}
.note-4 {
  left: 63%;
  top: 30%;
  width: 10%;
  transform: translateY(1.5%);
}

.note-4 img {
  width: 20%;
}

.note-5 {
  left: 80%;
  top: 32%;
  width: 10%;
}

/* ===== HOVER-CONTENT ===== */
.hover-content {
  display: none;
  position: absolute;
  padding: 6px;
  color: white;
  pointer-events: none;
  filter: blur(4px);
  transition: filter 0.5s ease;
  z-index: 10;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.note:hover .hover-content,
.note.active .hover-content {
  display: flex;
}
.note.active .hover-content {
  filter: blur(0) !important;
}
.hover-content img {
  width: 120px;
  height: auto;
}

.note-content {
  transition: filter 0.3s ease, opacity 0.3s ease;
  filter: blur(5px);
  opacity: 0.5;
  display: none;
  width: 200px; /* exemple de largeur pour forcer le retour à la ligne */
  white-space: normal; /* permet le retour à la ligne */
}

.note-content.active {
  filter: blur(0);
  opacity: 1;
}

/* Hover content positions */
.note-1 .hover-content {
  bottom: 93%;
  left: 0;
}
.note-2 .hover-content {
  top: 110%;
  right: 0%;
}
.note-3 .hover-content {
  bottom: 110%;
}
.note-4 .hover-content {
  bottom: -230%;
  left: 0;
}
.note-5 .hover-content {
  bottom: 100%;
  left: 15%;
}

/* ===== LAYOUT BLOCS TEXTE ===== */
/* Blocs de textes */
.main-container-y {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 90%;
  padding: 5%;
}

.container-left {
  flex: 1; /* Prend tout l'espace disponible à gauche */
  text-align: left; /* Aligne le texte à gauche */
  position: relative; /* Permet un positionnement normal */
}

.container-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  overflow: hidden; /* Cache les parties des images en dehors du conteneur */
  position: sticky;
  top: 0;
  height: 100vh;
  opacity: 1 !important;
  visibility: visible !important;
}

.desktopContentSection {
  height: 100vh;
  opacity: 0;
}

.photo {
  position: absolute;
  top: 50px;
  right: 80px;
  width: 500px;
  height: 80vh;
  transition: clip-path 1.5s ease, opacity 1.5s ease;
  object-fit: cover;
}

.animated-heading {
  color: white;
  opacity: 0.75;
  font-family: "Figtree", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 50px;
  position: static; /* Supprime tout positionnement absolu */
  margin: 0; /* Réinitialise les marges */
  margin-bottom: 20px;
}

.animated-text {
  color: white;
  font-family: "Figtree", Tahoma, Geneva, Verdana, sans-serif;
  transform: translate(-0%, -0%);
  text-align: left;
  font-size: 18px;
  line-height: 2;
  position: static; /* Supprime tout positionnement absolu */
  margin: 0; /* Réinitialise les marges */
  animation: none;
}

.consigne {
  position: absolute;
  top: 13%;
  left: 5%;
  font-style: italic;
  animation: unblur 2s ease-out forwards; /* Animation pour enlever le flou */
}

.scroll-text {
  font-family: "Figtree", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 15px;
  font-weight: lighter;
  position: fixed;
  bottom: 50px;
  left: 50%;
  text-transform: uppercase;
  animation: arrow-bounce 1s infinite alternate;
}

@keyframes arrow-bounce {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(20px);
  }
}

/* ===== DIVERS ===== */
@keyframes unblur {
  0% {
    opacity: 0;
    filter: blur(9px);
  }
  100% {
    opacity: 0.8;
    filter: blur(0px);
  }
}

#progress-overlay {
  position: absolute;
  top: 40%;
  left: 5%;
  width: 90%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
  z-index: 0;
}

#progress-overlay .progress-bar {
  width: 0%;
  height: 100%;
  background: #ffffff;
  transition: width 0.5s ease-in-out;
}

.note img {
  transition: filter 0.3s ease;
}

.note.active img {
  filter: brightness(1.3) saturate(1.5);
}

.hover-content p:last-child {
  opacity: 0.3; /* ou 0 pour cacher, selon style */
  transition: opacity 0.3s ease;
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

.hover-content p:last-child.active {
  opacity: 1;
  pointer-events: auto;
  height: auto;
}

.note p {
  font-size: 20px;
  font-weight: bold;
  color: #ffffff;
  margin: 5px 0;
  text-align: center;
  font-family: "Hakgyoansim", serif;
  width: 140%;
}

.mobile-warning {
  display: none;
  font-size: 1.3rem;
  color: #fff;
  background: #161616;
  text-align: center;
  padding: 40px 20px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  z-index: 2000;
  font-family: "Figtree", Arial, sans-serif;
  font-weight: bold;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.15);
  animation: unblur 2s ease-out forwards; /* Animation pour enlever le flou */
}

/* ===== ACTIVER/DESACTIVER LE SON ===== */
canvas {
  width: 100%;
  height: 100%;
}

#enable-sound {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: absolute;
  top: 750px;
  left: 50px;
}

/* ===== VERSION TÉLÉPHONE ===== */
@media (max-width: 1000px) {
  body {
    overflow: hidden !important;
  }

  .main-container-y,
  .container-left,
  .container-right,
  .scroll-text {
    display: none;
  }

  .consigne {
    top: 17%;
    line-height: 2;
    font-size: 8px;
  }

  .note p {
    font-size: 10px;
    margin: 0px 0px;
    width: 140%;
  }

  .note-content {
    width: 100%;
    font-size: 9px;
  }

  .hover-content img {
    width: 50%;
    display: flex;
    flex-direction: row;
  }

  .note-4 .hover-content {
    top: 65%;
  }

  .note-2 .hover-content {
    top: 72%;
  }

  .burger {
    display: flex;
  }

  .onglet {
    display: none;
    flex-direction: column;
    background: #161616;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 1rem;
    z-index: 9999999;
  }

  .onglet.open {
    display: flex;
  }

  .menu {
    position: relative;
    flex-wrap: wrap;
  }

  .bouttons {
    gap: 4%;
  }
}

@media (max-width: 660px) {
  .frise-container,
  .main-container-y,
  .consigne,
  .scroll-text,
  .container-right,
  .container-left {
    display: none !important;
  }
  .mobile-warning {
    display: block;
  }
  nav.menu {
    position: static;
    width: 100vw;
    z-index: 3000;
  }
}
