@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 {
  scroll-behavior: smooth;
  padding-bottom: 140px;
}

.top {
  position: relative;
  min-height: 800px;
  background: url("../assets/photos_webp/bg_pc.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 40px 10px 0 10px;
  align-items: center;
  text-align: center;
  z-index: 1;
}

/* Pour s'assurer que le contenu passe au-dessus du filtre */
.top * {
  position: relative;
  z-index: 1;
}

#logo_accueil {
  max-height: 200px;
  margin-bottom: 0;
  margin-top: 20px;
  animation: slideInFromTop 1s ease-out forwards,
    float 2s ease-in-out infinite 1s;
}

@keyframes slideInFromTop {
  0% {
    transform: translateY(-100px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

h1 {
  font-size: 72px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 5px;
}

.separator {
  width: 300px;
  border: 1px solid white;
  margin: 2px auto;
}

h2 {
  font-size: 28px;
  text-transform: uppercase;
  text-align: center;
  font-weight: 600;
  margin-top: 5px;
}

h3 {
  font-size: 22px;
  text-transform: uppercase;
  text-align: center;
  font-weight: bold;
  margin-top: 200px;
}

#logo_header {
  max-height: 60px;
  margin-top: 60px;
  margin-bottom: 10px;
}

.top::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #1d1d1b;
  opacity: 0.75;
  z-index: 0;
}

.top .cta-button {
  text-transform: uppercase;
  background-color: transparent;
  border: 2px solid white;
  color: white;
  padding: 12px 24px;
  font-size: 30px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s, color 0.3s;
  margin-top: 20px;
  margin-bottom: 30px;
}

.top .cta-button:hover {
  background-color: white;
  color: #1d1d1b;
}

.bottom {
  min-height: 10vh;
  padding-top: 10vh;
  background-size: cover;
  background-position: center;
}

h4 {
  font-size: 28px;
  text-transform: uppercase;
  text-align: center;
  font-weight: bold;
  margin-top: 5px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

button:hover,
.btn:hover {
  background-color: #1d1d1d;
  color: #fff;
}

.mode-jeu {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  padding: 40px 0;
}

.mode-jeu article {
  max-width: 300px;
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
}

.choix-jeu {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}

.choix-jeu h4 {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 40px;
}

.choix-jeu .modes {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 30px;
  align-items: stretch;
  flex-direction: row;
}

.choix-jeu .mode {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  min-width: 300px;
  max-width: 400px;
  text-align: left;
  padding: 20px;
  border-radius: 5px;
}

.choix-jeu .mode h5 {
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

.choix-jeu .mode p {
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 15px;
}

.centered-paragraph {
  text-align: center;
}

.btn-mode-1,
.btn-mode-2 {
  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-1:hover,
.btn-mode-2:hover {
  background-color: #1d1d1b;
  color: white;
}

.audio-note {
  font-style: italic;
  margin-top: 40px;
  font-size: 18px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

#photo_lecteur_audio {
  display: block;
  margin: auto;
  width: 600px;
  max-width: 90%;
  height: auto;
}

.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;
}

.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;
}

.bottom,
.container,
.choix-jeu {
  z-index: 0;
}

@media (max-width: 1024px) {
  .top {
    background-attachment: scroll;
    background-size: contain;
    background-position: center top;
  }
}

@media (max-width: 1024px) {
  .toolbar {
    height: 70px;
  }
  .toolbar .icon_toolbar {
    height: 25px;
  }
  .dropdown-menu {
    bottom: 70px;
  }
  h1 {
    margin-top: 20px;
    margin-bottom: 30px;
  }
  .separator {
    margin: 15px auto;
  }
  h2 {
    margin-top: 30px;
    margin-bottom: 25px;
  }
}

@media (max-width: 768px) {
  #logo_header {
    max-height: 30px;
  }
  h1 {
    font-size: 25px;
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
  }
  h2 {
    font-size: 18px;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
  }
  h3,
  h4 {
    font-size: 18px;
    text-align: center;
  }
  .separator {
    margin: 20px auto;
    width: 200px;
  }
  p,
  li,
  .choix-jeu .mode p,
  .footer-content p,
  .audio-note {
    font-size: 16px;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
  }
  .bottom {
    padding-left: 15px;
    padding-right: 15px;
  }
  .bottom .cta-button {
    max-width: 180px;
    font-size: 16px;
    padding: 10px 12px;
  }
  #logo_accueil {
    margin-bottom: 30px;
    margin-top: 0;
  }
  .top .cta-button {
    font-size: 18px;
    padding: 10px 20px;
  }
  .mode-jeu {
    flex-direction: column;
    align-items: center;
  }
  .choix-jeu .mode {
    padding: 15px;
  }
  .choix-jeu .mode h5 {
    font-size: 16px;
  }
  .choix-jeu .modes {
    flex-direction: column;
    align-items: center;
    flex-wrap: nowrap;
  }
  .dropdown-menu {
    left: auto;
    right: 0;
    transform: none;
    min-width: 100px;
  }
  #interface {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    width: 100vw;
    /* Pour iOS safe area */
    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;
    /* Pour iOS safe area */
    padding-bottom: env(safe-area-inset-bottom);
  }
}

@media (max-width: 768px) {
  html,
  body {
    height: 100%;
    min-height: 100vh;
    overflow: hidden !important; /* Empêche le scroll sur le body */
  }
  main,
  .main {
    /* Hauteur dynamique pour le scroll */
    min-height: calc(var(--real-vh, 1vh) * 100 - 70px) !important;
    max-height: calc(var(--real-vh, 1vh) * 100 - 70px) !important;
    overflow-y: auto !important;
    /* Espace pour la barre d'interface */
    padding-bottom: 70px !important;
    box-sizing: border-box;
  }
}
