@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;
  font-family: "Montserrat", sans-serif;
  background: none;
  position: relative;
  z-index: 0;
}

html,
body {
  scroll-behavior: smooth;
  overflow-x: hidden;
  position: relative;
  z-index: 0;
}

html {
  position: relative;
  height: 100%;
}

.header {
  position: relative;
  height: 150px;
  overflow: hidden;
  z-index: 2;
}

.bg-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  max-height: 150px;
  min-height: 100vh;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.logo-header {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-height: 35px;
  z-index: 2;
}

.h1 {
  position: absolute;
  bottom: 20px;
  left: 140px;
  color: white;
  font-size: 36px;
  text-transform: uppercase;
  margin: 0;
  z-index: 2;
  font-weight: 700;
}

.voile-noir {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.background-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center top;
  z-index: -2;
  pointer-events: none;
}

.background-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.main {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  padding: 40px 60px;
  gap: 40px;
  color: #000;
  flex-wrap: wrap;
}

.question-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 80px;
}

.bloc-question {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.question-box {
  position: relative;
  background-color: #fff;
  padding: 40px;
  max-width: 700px;
  width: 90%;
  border-radius: 5px;
  z-index: 2;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.question-box p {
  font-family: "Montserrat", sans-serif;
  font-size: 22px;
  margin: 0;
}

.reponse-container {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.champ-reponse {
  width: 100%;
  max-width: 150px;
  padding: 12px 16px;
  font-size: 18px;
  border: 2px solid #ffffff;
  border-radius: 5px;
  font-family: "Montserrat", sans-serif;
}

.btn-valider {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background-color: #ffffff;
  color: rgb(0, 0, 0);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.btn-valider:hover {
  background-color: #1d1d1b;
  color: #fff;
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  padding-bottom: 40px;
  border: 0.5px solid;
  border-radius: 5px;
  z-index: 1000;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #1d1d1b;
  opacity: 0.5;
  z-index: 999;
  pointer-events: none;
}

.popup p {
  font-family: "Montserrat", sans-serif;
  font-size: 18px;
  margin: 0 0 10px 0;
}

.icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 10px 0;
}

.answer-icon,
.location-icon {
  width: 40px;
  height: 40px;
}

.answer-icon img,
.location-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.popup button,
.popup .btn-suivant {
  margin-top: 10px;
  padding: 5px 20px;
  cursor: pointer;
  background: #1d1d1b;
  color: white;
  border: 1px solid transparent;
  border-radius: 5px;
  text-decoration: none;
  display: inline-block;
  box-sizing: border-box;
}

.popup .btn-suivant:hover,
.popup button:hover {
  background: #ffffff;
  border: 1px solid #000;
  color: #000;
}

#interface {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 999;
}

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

/* Barre d'outils fixe */
.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;
}

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

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

.off {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
  filter: brightness(0) invert(1) opacity(0.5);
}

.dropdown-menu {
  position: absolute;
  bottom: 40px;
  left: 0;
  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;
}

/* Responsive */
@media (min-width: 769px) {
  .icons {
    justify-content: center;
  }
}

@media (max-width: 1024px) {
  .toolbar {
    height: 70px;
  }
  .toolbar .icon_toolbar {
    height: 25px;
  }
  .container-audio {
    max-height: 70px;
    box-sizing: border-box;
  }
  #interface {
    bottom: 70px;
  }
  .dropdown-menu {
    bottom: 70px;
  }
}

@media screen and (max-width: 768px) {
  .logo-header {
    height: 40px;
  }
  .background-image {
    background-position: center top;
  }
  .h1 {
    font-size: 25px;
    text-align: left;
    left: 20px;
  }
  .main {
    flex-direction: column;
    align-items: center;
  }
  .reponse-container {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
  }
  .champ-reponse {
    width: 100%;
    max-width: 150px;
  }
  .btn-valider {
    width: 44px;
    height: 44px;
  }
  .question-container {
    min-height: 50vh;
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .question-box {
    width: 100%;
    max-width: 700px;
    padding: 24px 16px;
    box-sizing: border-box;
  }
  .texte {
    font-size: 16px;
    order: 1;
    width: 100%;
  }
  .btn-suivant {
    margin-top: 20px;
    order: 3;
  }
  .audio-player {
    margin-left: 0%;
    margin-right: 0%;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .dropdown-menu {
    left: auto;
    right: 0;
    transform: none;
    min-width: 100px;
  }
  .popup {
    max-width: 280px;
    padding: 10px;
    padding-bottom: 20px;
  }
  .popup p {
    margin: 0 0 6px 0;
  }
  .icons {
    flex-direction: row;
    gap: 20px;
    flex-wrap: nowrap;
    justify-content: center;
  }
  .answer-icon,
  .location-icon {
    width: 35px;
    height: 35px;
  }
  .compass {
    width: 60px;
    height: 60px;
  }
  #compass-arrow {
    background-size: 70%;
  }
  .popup button,
  .popup .btn-suivant {
    margin-top: 6px;
    padding: 3px 14px;
    font-size: 12px;
  }
  .popup a[href*="google.com/maps"] {
    font-size: 12px;
  }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
  html,
  body {
    overflow: hidden;
    height: 100%;
    margin: 0;
  }
  .question-container {
    position: absolute;
    top: 150px;
    bottom: 40px;
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }
  .question-box {
    width: 100%;
    max-width: 700px;
    padding: 24px 16px;
    box-sizing: border-box;
    margin: 0 auto;
  }
}

/* Correction universelle iOS/Android scroll + barre interface fixe */
@media (max-width: 768px) {
  html,
  body {
    height: 100%;
    min-height: 100vh;
    overflow: hidden !important;
  }
  main,
  .main {
    min-height: calc(var(--real-vh, 1vh) * 100 - 70px) !important;
    max-height: calc(var(--real-vh, 1vh) * 100 - 70px) !important;
    overflow-y: auto !important;
    padding-bottom: 90px !important;
    box-sizing: border-box;
  }
}

/* Empêche le scroll vertical inutile sur desktop */
@media (min-width: 1025px) {
  html,
  body {
    height: 100vh;
    overflow: hidden;
  }
  main {
    /* min-height: 100vh; */
    box-sizing: border-box;
    /* overflow: auto; */
  }
}
