/* Styles pour le système de quiz */

/* Conteneur principal du quiz */
.quiz-container {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 600px;
  background: #fff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  overflow-y: auto;
}

.quiz-container.show {
  transform: translateX(0);
}

/* En-tête du quiz */
.quiz-header {
  padding: 1rem;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quiz-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #333;
}

/* Barre de progression */
.quiz-progress {
  flex: 1;
  margin: 0 1rem;
}

.quiz-progress .progress {
  height: 6px;
  background-color: #e9ecef;
  border-radius: 3px;
  margin-top: 0.25rem;
}

.quiz-progress .progress-bar {
  background-color: #0d6efd;
  transition: width 0.3s ease;
}

/* Contenu du quiz */
.quiz-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.quiz-question {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Options du quiz */
.quiz-options {
  margin-bottom: 1.5rem;
}

.quiz-options .form-check {
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.quiz-options .form-check:hover {
  background-color: #f8f9fa;
}

.quiz-options .form-check-input {
  margin-top: 0.3em;
}

.quiz-options .form-check-label {
  width: 100%;
  padding-left: 0.5rem;
  cursor: pointer;
}

/* Feedback */
.quiz-feedback {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 0.375rem;
}

.quiz-feedback .alert {
  margin-bottom: 0;
}

/* Pied de page du quiz */
.quiz-footer {
  padding: 1rem;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Bouton de quiz dans la barre d'outils */
.btn-quiz {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #0d6efd;
  color: white;
  border: none;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-quiz:hover {
  background-color: #0b5ed7;
  color: white;
}

/* Mode sombre */
[data-theme="dark"] .quiz-container {
  background-color: #212529;
  color: #f8f9fa;
}

[data-theme="dark"] .quiz-header,
[data-theme="dark"] .quiz-footer {
  background-color: #2c3034;
  border-color: #373b3e;
}

[data-theme="dark"] .quiz-options .form-check {
  background-color: #2c3034;
  border-color: #373b3e;
}

[data-theme="dark"] .quiz-options .form-check:hover {
  background-color: #373b3e;
}

[data-theme="dark"] .quiz-options .form-check-input {
  background-color: #495057;
  border-color: #6c757d;
}

[data-theme="dark"] .quiz-options .form-check-input:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

/* Réactivité */
@media (max-width: 768px) {
  .quiz-container {
    max-width: 100%;
  }
  
  .quiz-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .quiz-progress {
    width: 100%;
    margin: 0.5rem 0 0;
  }
  
  .quiz-footer {
    flex-direction: column;
  }
  
  .quiz-footer .btn {
    width: 100%;
    margin: 0.25rem 0;
  }
}
