/* Styles spécifiques au quiz des syllabes */

/* En-tête du quiz */
.quiz-header {
  text-align: center;
  margin-bottom: 20px;
}

.quiz-header h2 {
  color: var(--primary);
  margin-bottom: 8px;
}

.quiz-header p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Contrôles du quiz */
.quiz-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  background-color: white;
  padding: 16px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.level-selector, .mode-selector {
  display: flex;
  gap: 10px;
}

.level-btn, .mode-btn {
  background-color: var(--primary-light);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 8px 16px;
  cursor: pointer;
  font-family: 'Comic Neue', cursive;
  font-weight: bold;
  transition: var(--transition);
}

.level-btn:hover, 
.level-btn.active,
.mode-btn:hover,
.mode-btn.active {
  background-color: var(--primary);
}

.mode-btn {
  background-color: var(--secondary-light);
}

.mode-btn:hover,
.mode-btn.active {
  background-color: var(--secondary);
}

/* Conteneur principal du quiz */
.quiz-container {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--box-shadow);
}

/* Barre de progression */
.quiz-progress {
  margin-bottom: 24px;
}

.progress-text {
  font-weight: bold;
  margin-bottom: 8px;
  text-align: center;
  color: var(--text-light);
}

.progress-bar {
  height: 16px;
  background-color: #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--success);
  border-radius: 8px;
  transition: width 0.3s ease;
}

/* Question */
.quiz-question {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
}

.question-audio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.audio-btn {
  background-color: var(--primary);
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.audio-btn:hover {
  background-color: var(--primary-dark);
  transform: scale(1.05);
}

.audio-btn img {
  width: 40px;
  height: 40px;
}

.question-audio p {
  font-size: 14px;
  color: var(--text-light);
  margin: 0;
}

.question-image {
  width: 250px;
  height: 200px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.question-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.question-text {
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  color: var(--primary-dark);
  font-family: 'Baloo 2', cursive;
}

/* Options */
.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.option-btn {
  background-color: white;
  border: 2px solid var(--primary-light);
  border-radius: var(--border-radius);
  padding: 16px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80px;
}

.option-btn:hover {
  background-color: var(--primary-light);
  color: white;
  transform: translateY(-2px);
}

.option-btn.correct {
  background-color: var(--success);
  border-color: var(--success);
  color: white;
}

.option-btn.incorrect {
  background-color: #ff6b6b;
  border-color: #ff6b6b;
  color: white;
}

.option-btn.disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Feedback */
.quiz-feedback {
  background-color: #f8f9fe;
  border-radius: var(--border-radius);
  padding: 16px;
  margin-top: 16px;
  text-align: center;
}

.quiz-feedback.hidden {
  display: none;
}

.feedback-content {
  margin-bottom: 16px;
  font-size: 18px;
}

.feedback-content.correct {
  color: var(--success);
}

.feedback-content.incorrect {
  color: #ff6b6b;
}

/* Modal des résultats */
.score-display {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

.score-circle {
  width: 120px;
  height: 120px;
  background-color: var(--primary-light);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32px;
  font-weight: bold;
  color: white;
  font-family: 'Baloo 2', cursive;
}

#score-message {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary);
}

/* Animations */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.bounce-animation {
  animation: bounce 0.5s;
}

.pulse-animation {
  animation: pulse 0.5s;
}

/* Styles responsifs */
@media (max-width: 768px) {
  .quiz-controls {
    flex-direction: column;
    gap: 16px;
  }
  
  .level-selector, .mode-selector {
    width: 100%;
    justify-content: center;
  }
  
  .quiz-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .quiz-container {
    padding: 16px;
  }
  
  .question-image {
    width: 200px;
    height: 160px;
  }
  
  .audio-btn {
    width: 50px;
    height: 50px;
  }
  
  .audio-btn img {
    width: 30px;
    height: 30px;
  }
}
/* Modal (popup) */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  border-radius: var(--border-radius);
  max-width: 90%;
  width: 500px;
  padding: 32px;
  text-align: center;
  position: relative;
  animation: zoomIn 0.3s forwards;
}

@keyframes zoomIn {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal.hidden {
  display: none;
}

.trophy-image {
  width: 150px;
  height: auto;
  margin: 16px 0;
}