/* === Styles généraux === */
body {
  margin: 0;
  padding: 0;
  background: url('original-memoire-3.jpg') no-repeat center center fixed;
  background-size: contain;
  background-color: #fff;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

h1 {
  margin: 20px;
  background-color: rgba(255, 255, 255, 0.85);
  padding: 10px 20px;
  border-radius: 14px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  font-size: 1.8rem;
  line-height: 1.3;
  max-width: 90%;
}

/* === Conteneurs === */
.button-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  max-width: 900px;
  padding: 0 10px;
}

.overlay {
  background-color: rgba(255, 255, 255, 0.3);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px;
  box-sizing: border-box;
}

.content {
  max-width: 800px;
  width: 100%;
}

.box {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 15px 25px;
  margin: 10px 0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  font-size: 1.1rem;
  line-height: 1.6;
}

.center {
  text-align: center;
  margin: 20px 0;
}

/* === Boutons principaux (bleus) === */
.btn, .btn-retour {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 12px 18px;
  font-size: 1.15rem;
  font-weight: bold;
  color: white;
  border: none;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 3px 5px rgba(0,0,0,0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  width: 230px;
  min-height: 70px;
  text-align: center;
  line-height: 1.25;
}

/* Dégradés différents */
.btn {
  background: linear-gradient(145deg, #0078D7, #005ea6);
}

.btn-retour {
  background: linear-gradient(145deg, #28a745, #218838);
}

/* Effet lumineux avant survol */
.btn::before, .btn-retour::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0.25) 0%,
    rgba(255,255,255,0.05) 30%,
    transparent 80%
  );
  transform: translateX(-100%) rotate(25deg);
  transition: transform 0.8s ease;
}

.btn:hover::before, .btn-retour:hover::before {
  transform: translateX(100%) rotate(25deg);
}

/* Survol */
.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.btn-retour:hover {
  background: linear-gradient(145deg, #34ce57, #28a745);
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Texte secondaire sur boutons */
.btn i {
  display: block;
  font-size: 0.95rem;
  font-style: italic;
  font-weight: normal;
  color: #e0e0e0;
  margin-top: 4px;
  line-height: 1.15;
}

/* Conteneur bouton vert */
.retour-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 40px;
}

/* === Chronomètre === */
#chronoGlobal {
  position: fixed;
  top: 10px;
  right: 20px;
  background: rgba(0, 102, 204, 0.85);
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1rem;
  z-index: 999;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  /* display: none; */
}
#chronoContainer {
  position: fixed;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.8);
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  font-weight: bold;
}
#pauseBtn {
  font-size: 15px;
  padding: 2px 6px;
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 6px;
  color: #444;
  cursor: pointer;
  transition: 0.2s;
}
#pauseBtn:hover {
  background: #eee;
}

/* === Éléments divers === */


.btn-retour {
  width: 140px;
  min-height: 25px;
  text-align: center;
  line-height: 1.25;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
}

button {
  background-color: #0066cc;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 1.1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease;
  margin: 5px;
}

button:hover {
  background-color: #004b99;
  transform: scale(1.03);
}

input#userAnswer {
  width: 100%;
  padding: 10px;
  margin: 15px 0;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

#definitionText {
  font-style: italic;
  color: #555;
  margin-bottom: 10px;
}

.feedback {
  font-weight: bold;
  margin-top: 10px;
}

#realAnswer {
  margin-top: 10px;
  color: #333;
  font-weight: bold;
}

.score {
  text-align: right;
  font-weight: bold;
  margin-top: 15px;
}

.hidden {
  display: none;
}

/* Crédit IA discret */
.credit-ia {
  position: fixed;
  bottom: 10px;
  right: 10px;
  font-size: 0.8rem;
  color: rgba(0,0,0,0.5);
  background-color: rgba(255,255,255,0.3);
  padding: 4px 8px;
  border-radius: 6px;
  backdrop-filter: blur(2px);
  z-index: 1000;
}

/* === Responsive Design === */
@media (max-width: 1024px) {
  .btn, .btn-retour {
    width: 45%;
    min-height: 65px;
    font-size: 1.05rem;
  }
}

@media (max-width: 768px) {
  body {
    background-size: cover;
    padding: 20px 0;
  }

  .btn, .btn-retour {
    width: 80%;
    min-height: 60px;
    font-size: 1.05rem;
  }

  h1 {
    font-size: 1.6rem;
    margin-bottom: 25px;
  }

  .btn i {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .btn, .btn-retour {
    width: 90%;
    font-size: 1rem;
    min-height: 55px;
  }

  h1 {
    font-size: 1.3rem;
    padding: 8px 12px;
  }

  .btn i {
    font-size: 0.85rem;
  }
}
