/* ========================
   RESET GLOBAL
======================== */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: Arial, sans-serif;
  color: #fff;
  text-align: center;
  overflow-x: hidden; /* 🔑 empêche tout débordement mobile */
}

/* ========================
   BACKGROUND GLOBAL
======================== */
body {
  background-image: url("images/og-image.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
}

/* Overlay semi-transparent */
.background {
  min-height: 100vh;
  width: 100%;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 0;
}

/* Contenu central */
.overlay {
  width: 100%;
  max-width: 900px;
  padding: 70px 20px 30px;
  background: transparent;
  position: relative;
  overflow: hidden; /* 🔑 empêche les enfants de déborder */
}

/* ========================
   Language Switch Buttons
======================== */
.lang-switch {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  gap: 10px;
}

.lang-switch button {
  background: rgba(0,0,0,0.7);
  border: 1px solid #fff;
  padding: 4px;
  border-radius: 50%;
  cursor: pointer;
}

.lang-switch img {
  width: 32px;
  height: auto;
  display: block;
}

/* ========================
   Titres et intro
======================== */
h1 {
  color: #e50914;
  margin-bottom: 10px;
}

.intro {
  margin-bottom: 30px;
  font-size: 16px;
}

/* ========================
   Quiz
======================== */
.question {
  display: none;
  margin-bottom: 30px;
}

.question.active {
  display: block;
}

.question h2 {
  font-size: 18px;
  margin-bottom: 15px;
}

/* Réponses */
.answers {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.answer {
  width: 180px;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.3);
  transition: transform 0.25s ease, border-color 0.25s ease;
  background: #000;
}

.answer:hover {
  transform: scale(1.05);
  border-color: #e50914;
}

.answer img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.answer p {
  margin: 8px 0;
  font-size: 14px;
}

/* ========================
   RÉSULTAT (FIX MOBILE)
======================== */
#result {
  display: none;
  margin: 40px auto 0;
  padding: 20px;
  background: rgba(17,17,17,0.95);
  border-radius: 8px;
  border: 2px solid #e50914;
  width: 100%;
  max-width: 420px; /* limite desktop */
}

#result h2 {
  color: #e50914;
  font-size: 20px;
}

#result p {
  font-size: 16px;
}

#result img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block;
  margin: 15px auto 0;
  border-radius: 10px;
}

/* ========================
   Zone pub & footer
======================== */
.ad-zone {
  margin: 30px 0;
}

footer {
  margin-top: 40px;
  font-size: 12px;
  opacity: 0.7;
}

/* ========================
   RESPONSIVE MOBILE
======================== */
@media (max-width: 600px) {
  .overlay {
    padding: 60px 10px 20px;
  }

  #result {
    max-width: 90vw; /* 🔑 jamais plus large que l’écran */
  }

  .answer img {
    height: 140px;
  }

  .lang-switch img {
    width: 28px;
  }
}
