/* ---------- RESET DE BASE ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---------- BODY ---------- */
body {
  font-family: Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: blanchedalmond;
}

/* ---------- CONTAINER ---------- */
.container {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* titre/texte en haut, boutons en bas */
  height: 100%;
  max-width: 800px; /* Un peu plus large pour l'espace */
  width: 100%;
  padding: 20px;
}

.main-title {
  font-size: 2.5em;          /* plus grand pour mieux le voir */
  font-weight: bold;
  margin-bottom: 30px;       /* espace avant le bloc texte */
  text-align: center;
}

/* ---------- HEADER ---------- */
.header {
  text-align: center;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: center;   /* centre verticalement tout le bloc texte */
  gap: 20px;                 /* espace entre les paragraphes et le titre */
}

/* ---------- BLOC TEXTE AVEC FOND ---------- */
.head-text-wrapper {
  background-color: #ffffffcc;   /* blanc semi-transparent */
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.head-text-wrapper p {
  font-size: 1.1em;
  line-height: 1.55;
  color: #333;
  margin-bottom: 15px;
}

.head-text-wrapper p:last-child {
  margin-bottom: 0;
}

/* Question spécifique */
.question {
  margin-top: 20px;
  font-size: 1.2em;
  font-weight: bold;
}

/* ---------- TITRE ---------- */
.header h1 {
  font-size: 2em;
  margin-bottom: 15px;
}

/* ---------- BOUTONS ---------- */
.buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}
/* Nouvelle grille pour les choix */
.buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    flex-grow: 1;
    padding-bottom: 20px;
}

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

/* Boutons larges et modernes */
button {
  width: 330px;
  height: 100px;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  border-radius: 14px;

  display: flex;
  justify-content: center;
  align-items: center;

  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  transition: 0.25s ease;
  color: #2c3e50;
}

/* Dégradé pour plus joli style */
#abandon {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

#commencer {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
}

/* Hover */
button:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 8px 22px rgba(0,0,0,0.22);
}

/* ---------- RESPONSIVE MOBILE ---------- */
@media (max-width: 480px) {

  .container {
    height: auto;
    min-height: 100vh;
    padding: 10px;
  }

  .buttons {
    flex-direction: column;
    gap: 15px;
  }

  button {
    width: 100%;
    height: 90px;
    font-size: 20px;
    border-radius: 12px;
  }

  .head-text-wrapper {
    padding: 18px;
  }

  .head-text-wrapper p,
  .question {
    font-size: 1em;
  }
}

/* ---------- CHATBOT IFRAME ---------- */
#chatbot-iframe {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 500px;  /* Largeur suffisante pour contenir le chatbot */
  height: 800px; /* Hauteur suffisante pour contenir le chatbot */
  border: none; /* Remplace l'attribut frameborder="0" */
  background-color: transparent;
  z-index: 1001; /* S'assure qu'il est au-dessus des autres éléments */
  /*! pointer-events: none; */ /* Laisse passer les clics par défaut */
}


/* --- BAD CHOICE RECTANGLES --- */
.bad-choice-slot {
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;       /* Empêche l'image de dépasser */
    margin: 10px;
}

/* --- Images dans les slots --- */
.bad-choice-slot img {
    width: 100%;            /* Prend toute la largeur du slot */
    height: 100%;           /* Prend toute la hauteur */
    object-fit: contain;    /* Conserve les proportions, pas de déformation */
    object-position: center;
    display: block;
}

.results h2{
        margin-bottom: 15px;
    }

.result-item {
        margin-bottom: 15px;
    }

/* --- Responsive Mobile --- */
@media (max-width: 600px) {

    .wrapper {
        grid-template-areas:
            "top"
            "center"
            "left"
            "right"
            "bottom";
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 10px;
        height: auto;
        padding: 5px;
    }

    .bad-choice-slot {
        width: 120px;
        height: 120px;
    }

    .choice-box {
        width: 100%;
        max-width: 250px;
    }

    .choice-box button {
        font-size: 14px;
        padding: 8px;
    }

    #question-container {
        font-size: 14px;
        margin-bottom: 15px;
        padding: 5px;
    }

    .result-item {
        font-size: 14px;
        padding: 10px;
        margin-bottom: 2px;
    }
}