@import url("../assets/fonts/Montserrat-Regular.ttf");
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/Montserrat-Regular.ttf") format("truetype");
  font-weight: 400;
}
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/Montserrat-Bold.ttf") format("truetype");
  font-weight: 700;
}
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/Montserrat-Black.ttf") format("truetype");
  font-weight: 900;
}
body {
  margin: 0;
  background: #111;
  font-family: "Montserrat", sans-serif;
  position: relative;
  z-index: 1;
}

html,
body {
  scroll-behavior: smooth;
  overflow-x: hidden;
  box-sizing: border-box;
}

main {
  position: relative;
  z-index: 3;
  background-color: white;
}

.scene-block {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.scene-block .texte {
  flex: 2;
}

.scene-block .photo {
  flex: 1;
}

.scene-1-container,
.scene-2-container {
  display: flex;
  flex-direction: row;
}

.scene-2-container .photo {
  order: 1;
}

.scene-2-container .texte {
  order: 2;
}

h2 {
  font-size: 28px;
  font-weight: 600;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
  margin: 0;
}

.scene-1,
.scene-2 {
  margin-bottom: 20px;
}

.scene-1 h2::after,
.scene-2 h2::after {
  content: "";
  display: block;
  height: 2px;
  background-color: #d22d2d;
  margin-top: 6px;
  margin-bottom: 40px;
  width: 100%;
}

hr {
  border: none;
  height: 2px;
  background-color: #000000;
  margin: 3rem 0;
  width: 100%;
  border-radius: 2px;
}

#interface {
  width: 100%;
  max-width: 1920px;
  position: fixed;
  bottom: 40px; /* Décalé au-dessus de la toolbar */
  left: 0;
  right: 0;
  z-index: 1001; /* Plus haut que la toolbar */
}

.main {
  display: flex;
  flex-direction: column;
  padding: 40px 140px 150px 140px;
  gap: 40px;
  background-color: #fff;
  color: #000;
  /* min-height: calc(var(--real-vh, 1vh) * 100 - 70px);  À retirer pour mobile */
}

.popup-content {
  text-align: left;
  white-space: pre-wrap;
  line-height: 1.5;
  padding: 10px;
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  color: #fff;
}

.texte {
  font-size: 18px;
  line-height: 1.6;
}

.photo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.photo img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  margin-bottom: 50px;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 40px auto;
  max-width: 1200px;
  width: 100%;
  z-index: 1;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.bouton-suivant {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 10px;
}

.btn-suivant {
  display: inline-block;
  padding: 10px 20px;
  background-color: #1d1d1b;
  color: #ffffff;
  font-family: "Montserrat", sans-serif;
  text-decoration: none;
  font-size: 16px;
  border-radius: 5%;
  border: 1px solid #1d1d1b;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s, color 0.3s, border-color 0.3s;
}

.btn-suivant:hover {
  background-color: #ffffff00;
  color: rgb(0, 0, 0);
  border: 1px solid #000;
}

.container-audio {
  background: #1d1d1b;
  padding: 10px;
  max-height: 40px;
  border-bottom: 1px solid #fff;
  box-sizing: border-box;
}

.audio-player {
  margin-left: 25%;
  margin-right: 25%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.play-btn {
  width: 20px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.play-btn svg {
  width: 100%;
  height: 100%;
  fill: white;
}

.play-btn svg:hover {
  fill: red;
}

.time {
  color: white;
  font-family: monospace;
  font-size: 14px;
  min-width: 40px;
  text-align: center;
}

.progress-container {
  flex: 1;
  height: 2px;
  background: #fff;
  cursor: pointer;
  position: relative;
}

.progress {
  height: 100%;
  background: red;
  width: 0%;
}

.progress-container:hover {
  height: 4px;
}

.thumb {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  background: red;
  border-radius: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.toolbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 40px;
  background: #1d1d1b;
  z-index: 1000;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  pointer-events: auto;
  overflow-anchor: none;
  touch-action: manipulation !important;
}

.toolbar a,
.toolbar img {
  pointer-events: auto;
}

.toolbar .icon_toolbar {
  height: 20px;
  filter: brightness(0) invert(1);
}

.dropdown-menu {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: #1d1d1b;
  border-radius: 5px;
  overflow: hidden;
  display: none;
  z-index: 1001;
  min-width: 120px;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3);
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: white;
  text-decoration: none;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  text-align: center;
  transition: background-color 0.3s;
}

.dropdown-menu a:hover {
  background-color: #333;
}

.dropdown-menu.active {
  display: block;
}

/* Toujours sous la popup */
.container-audio,
.audio-player {
  position: relative;
  z-index: 10 !important;
}

#image-popup,
#yellow-icon-popup {
  z-index: 1100 !important;
}
#image-backdrop,
#popup-backdrop {
  z-index: 999 !important;
}

#image-popup > div[style*="position: fixed"] {
  pointer-events: auto;
}

/* ----------- MEDIA QUERIES ----------- */
@media screen and (max-width: 768px) {
  html,
  body {
    height: auto !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  .main,
  main {
    height: auto !important;
    padding: 20px;
    padding-bottom: 110px !important;
    box-sizing: border-box;
  }
  #interface {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    width: 100vw;
    padding-bottom: env(safe-area-inset-bottom);
    background: transparent;
  }
  .toolbar {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    z-index: 1002;
    height: 70px !important;
    padding-bottom: env(safe-area-inset-bottom);
    background: #1d1d1b;
    touch-action: manipulation !important;
  }
  .scene-block {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
  }
  .scene-block .texte,
  .scene-block .photo {
    width: 100% !important;
    max-width: 100% !important;
  }
  .audio-player {
    width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }
  .toolbar .icon_toolbar {
    height: 25px !important;
  }
  .dropdown-menu {
    position: absolute !important;
    bottom: 70px !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    min-width: 120px !important;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3);
    z-index: 2000 !important;
  }
  .chrome-scroll-spacer {
    height: 1000vh;
    width: 100%;
    pointer-events: none;
    background: transparent;
    display: block;
  }
  .bouton-suivant {
    width: 100% !important;
    display: flex;
    justify-content: center;
    margin-top: 20px !important;
    margin-bottom: 100px !important;
  }
}

@media screen and (min-width: 600px) and (max-width: 768px) {
  .photo img {
    max-width: 65%;
    margin-bottom: 20px;
  }

  .audio-player {
    margin-left: 11%;
    margin-right: 11%;
    display: flex;
    align-items: center;
    gap: 10px;
  }
}
