@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;
}

html,
body {
  scroll-behavior: smooth;
  overflow-x: hidden;
  position: relative;
  z-index: 0;
}

main {
  position: relative;
  z-index: 3;
  background-color: white; /* ou autre, pour bien cacher l'image si besoin */
}

.top::before,
.header::before {
  pointer-events: none;
}

.titre-credit {
  text-align: left;
  margin-bottom: 5px;
}

.titre-credit h2 {
  font-size: 28px;
  font-weight: 600;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
  margin: 0;
}

.titre-credit h2::after {
  content: "";
  display: block;
  height: 2px;
  background-color: #d22d2d;
  margin-top: 6px;
  margin-bottom: 5px;
  width: 100%;
}

.main {
  display: flex;
  flex-direction: column;
  padding: 40px 140px;
  gap: 10px;
  background-color: #fff;
}

/* Colonnes */
.main-content {
  display: flex;
  flex-direction: row;
  width: 100%;
  gap: 40px;
  margin-bottom: 150px;
}

.scene-block {
  width: 50%;
  box-sizing: border-box;
}

.scene-block hr {
  border: none;
  height: 1px;
  background-color: #1d1d1b;
  margin: 10px 0;
}

.copyright {
  text-align: center;
  font-size: 18px;
  margin: 0;
}

.btn-mode {
  display: block;
  max-width: 180px;
  margin: 20px auto;
  padding: 10px 20px;
  border: 2px solid #1d1d1b;
  text-decoration: none;
  text-align: center;
  font-weight: bold;
  color: #1d1d1b;
  border-radius: 5px;
  transition: background-color 0.3s, color 0.3s;
}

.btn-mode:hover {
  background-color: #1d1d1b;
  color: white;
}

.photo iframe {
  width: 100%;
  height: 350px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.hr {
  color: #000000;
}

.social-links {
  width: 50%;
  box-sizing: border-box;
  padding-left: 20px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  justify-content: center;
}

.social-links p {
  margin: 0;
  font-size: 18px;
  text-align: center;
  width: 100%;
}

.social-links a {
  display: flex;
  align-items: center;
  margin: 5px;
}

.social-links img {
  width: 50px;
  height: 50px;
  margin-right: 12px;
  transition: transform 0.3s ease;
}

.social-links img[src*="logo_reseau_m.svg"] {
  width: 90px; /* taille plus grande */
  height: auto; /* conserve le ratio */
}

.social-links img[src*="logo_mediatheque_st_vaast.svg"] {
  width: 80px; /* taille plus grande */
  height: auto; /* conserve le ratio */
}

.social-links img[src*="logo_musee.svg"] {
  width: 80px; /* taille plus grande */
  height: auto; /* conserve le ratio */
}

.social-links img:hover {
  transform: scale(1.2);
}

.photo img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.scene-1-container {
  display: flex;
  flex-direction: column;
}

.scene-2-container {
  display: flex;
  flex-direction: row;
}

.scene-2-container .photo {
  order: 1;
}

.scene-2-container .texte {
  order: 2;
}

.scene-1-container .photo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.scene-1 h2,
.scene-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%;
}

#interface {
  width: 100%;
  max-width: 1920px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
}

.texte {
  font-size: 18px;
  line-height: 1.6;
}

.photo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.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);
}

.bottom,
.container,
.choix-jeu {
  z-index: 0;
}

.dropdown-menu {
  position: absolute;
  bottom: 40px; /* Juste au-dessus de la toolbar */
  left: 50%;
  transform: translateX(-50%);
  background: #1d1d1b;
  border-radius: 5px;
  overflow: hidden;
  display: none; /* Masqué par défaut */
  z-index: 1001; /* Au-dessus de la toolbar */
  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;
}

/* Afficher le menu lorsque la classe "active" est ajoutée */
.dropdown-menu.active {
  display: block;
}

@media (max-width: 1024px) and (orientation: portrait) {
  .toolbar {
    height: 70px;
  }

  .toolbar .icon_toolbar {
    height: 25px;
  }

  .container-audio {
    max-height: 70px;
    box-sizing: border-box;
  }

  #interface {
    bottom: 70px;
  }

  .dropdown-menu {
    bottom: 70px; /* Ajusté pour correspondre à la nouvelle hauteur de la toolbar */
  }
}

@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;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: visible !important;
    padding: 20px;
    padding-bottom: 110px !important; /* espace pour la barre */
    box-sizing: border-box;
  }
  .chrome-scroll-spacer {
    height: 1000vh;
    width: 100%;
    pointer-events: none;
    background: transparent;
    display: block;
  }
  #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;
  }
  .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;
  }
  .social-links {
    width: 100%;
    padding: 0;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  .social-links p {
    width: 100%;
    text-align: center;
  }
  .social-links a {
    margin: 5px;
  }
  .social-links img {
    width: 40px;
    height: 40px;
  }
  .social-links img[src*="logo_reseau_m.svg"] {
    width: 70px;
    height: auto;
  }

  .social-links img[src*="logo_mediatheque_st_vaast.svg"] {
    width: 60px;
    height: auto;
  }

  .social-links img[src*="logo_musee.svg"] {
    width: 60px;
    height: auto;
  }

  .social-links img[src*="logo_ville_bleu gris2.svg"] {
    width: 35px;
    height: auto;
  }
  .main-content {
    flex-direction: column;
    gap: 20px;
    margin-bottom: 50px !important; /* espace pour la barre */
  }
  .scene-block {
    width: 100%;
    padding: 0 !important;
  }
  .texte {
    font-size: 16px;
  }
}

@media screen and (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
  .social-links {
    gap: 8px;
  }

  .social-links img {
    width: 40px;
    height: 40px;
  }

  .social-links img[src*="logo_reseau_m.svg"] {
    width: 67px;
    height: auto;
  }

  .social-links img[src*="logo_mediatheque_st_vaast.svg"] {
    width: 60px; /* taille plus grande */
    height: auto; /* conserve le ratio */
  }

  .social-links img[src*="logo_musee.svg"] {
    width: 60px; /* taille plus grande */
    height: auto; /* conserve le ratio */
  }
}

@media screen and (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
  .social-links {
    gap: 8px;
  }

  .social-links img {
    width: 40px;
    height: 40px;
    margin-right: 8px;
  }

  .social-links img[src*="logo_reseau_m.svg"] {
    width: 60px;
    height: auto;
  }
}
