body {
  font-family: Arial, sans-serif;
  background: #f8f8f8;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 800px;
  margin: auto;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

h1 {
  text-align: center;
  color: #333;
}

.question {
  margin: 20px 0;
  font-size: 1.2em;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid #007bff;
}

.question h3 {
  margin-top: 0;
  color: #007bff;
}

.answers {
  margin: 20px 0;
}

.answer-item {
  margin: 10px 0;
}

.answer-btn {
  width: 100%;
  padding: 15px;
  border-radius: 8px;
  border: 2px solid #ddd;
  background: #fff;
  cursor: pointer;
  transition: all 0.3s;
  text-align: left;
  font-size: 1em;
}

.answer-btn:hover:not(:disabled) {
  border-color: #007bff;
  box-shadow: 0 2px 4px rgba(0,123,255,0.2);
}

.answer-btn.selected {
  border-color: #007bff;
  background: #e7f3ff;
}

.answer-btn:disabled {
  cursor: not-allowed;
  opacity: 0.9;
}

/* Nouveaux styles pour les résultats visuels */
.answer-btn.user-correct {
  background: #d4edda !important;
  border-color: #28a745 !important;
  color: #155724;
  box-shadow: 0 0 10px rgba(40, 167, 69, 0.3);
}

.answer-btn.user-incorrect {
  background: #f8d7da !important;
  border-color: #dc3545 !important;
  color: #721c24;
  box-shadow: 0 0 10px rgba(220, 53, 69, 0.3);
}

.answer-btn.missed-correct {
  background: #fff3cd !important;
  border-color: #ffc107 !important;
  color: #856404;
  box-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

.checkbox {
  font-weight: bold;
  margin-right: 10px;
  color: #007bff;
}

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

#validate-btn {
  padding: 12px 30px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  cursor: pointer;
  transition: background 0.3s;
}

#validate-btn:hover:not(:disabled) {
  background: #218838;
}

#validate-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.results-section {
  margin-top: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px solid #dee2e6;
}

.results-section h4 {
  margin-top: 0;
  font-size: 1.3em;
  color: #333;
}

/* Styles pour les scores colorés */
.score {
  font-size: 1.4em;
  font-weight: bold;
  margin: 15px 0;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  border: 2px solid;
}

.score-excellent {
  background: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.score-good {
  background: #cce7ff;
  border-color: #007bff;
  color: #004085;
}

.score-neutral {
  background: #fff3cd;
  border-color: #ffc107;
  color: #856404;
}

.score-bad {
  background: #f8d7da;
  border-color: #dc3545;
  color: #721c24;
}

.score-total {
  font-size: 1.1em;
  font-weight: bold;
  margin: 10px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  text-align: center;
}

/* Page finale améliorée */
.final-results {
  text-align: center;
  padding: 40px 20px;
}

.final-results h2 {
  font-size: 2.5em;
  margin-bottom: 30px;
  color: #333;
}

.final-score-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  border-radius: 15px;
  margin: 30px 0;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.final-score {
  font-size: 3em;
  font-weight: bold;
  margin-bottom: 10px;
}

.final-percentage {
  font-size: 2em;
  margin-bottom: 15px;
  opacity: 0.9;
}

/* Suppression des styles d'appréciation */
.appreciation,
.appreciation-excellent,
.appreciation-good,
.appreciation-ok,
.appreciation-weak,
.appreciation-bad {
  display: none;
}

.stats-container {
  margin: 40px 0;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 15px;
  border: 1px solid #dee2e6;
}

.stats-container h3 {
  margin-top: 0;
  margin-bottom: 25px;
  color: #333;
  font-size: 1.5em;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.stat-item {
  padding: 20px;
  border-radius: 12px;
  border: 2px solid;
  text-align: center;
}

.stat-item.excellent {
  background: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.stat-item.good {
  background: #cce7ff;
  border-color: #007bff;
  color: #004085;
}

.stat-item.neutral {
  background: #fff3cd;
  border-color: #ffc107;
  color: #856404;
}

.stat-item.bad {
  background: #f8d7da;
  border-color: #dc3545;
  color: #721c24;
}

.stat-number {
  font-size: 2.5em;
  font-weight: bold;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 1em;
  font-weight: 500;
}

.final-actions {
  margin-top: 40px;
}

.restart-btn {
  padding: 15px 30px;
  font-size: 1.2em;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

.restart-btn:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,123,255,0.4);
}

.answer-review {
  margin: 15px 0;
  padding: 15px;
  border-radius: 8px;
  border: 2px solid;
}

.answer-review.correct-answer {
  border-color: #28a745;
  background: #d4edda;
}

.answer-review.incorrect-answer {
  border-color: #dc3545;
  background: #f8d7da;
}

.answer-review.user-selected {
  box-shadow: 0 0 0 3px rgba(0,123,255,0.2);
}

.answer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.status-icon {
  font-size: 1.2em;
}

.answer-text {
  flex: 1;
  font-weight: 500;
}

.selected-badge {
  background: #007bff;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: bold;
}

.explanation {
  padding: 10px;
  background: rgba(255,255,255,0.7);
  border-radius: 5px;
  border-left: 3px solid #6c757d;
  font-style: italic;
}

#next-btn {
  display: block;
  margin: 20px auto 0;
  padding: 12px 30px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  cursor: pointer;
  transition: background 0.3s;
}

#next-btn:hover {
  background: #0056b3;
}

/* Styles pour la page d'accueil */
.header {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 15px;
  margin-bottom: 40px;
}

.header h1 {
  margin: 0;
  font-size: 2.5em;
}

.subtitle {
  margin: 10px 0 0 0;
  font-size: 1.2em;
  opacity: 0.9;
}

.chapters-list h2 {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
}

.chapter-card {
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 12px;
  padding: 25px;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s;
}

.chapter-card:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.chapter-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.chapter-header h3 {
  color: #007bff;
  margin: 0;
  font-size: 1.2em;
}

.chapter-title {
  font-size: 1.4em;
  font-weight: bold;
  color: #333;
}

.chapter-description {
  color: #666;
  margin-bottom: 20px;
  font-style: italic;
}

.chapter-actions {
  text-align: right;
}

.start-quiz-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 1.1em;
  cursor: pointer;
  transition: background 0.3s;
}

.start-quiz-btn:hover {
  background: #218838;
}

/* Styles pour la page de quiz */
.quiz-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #dee2e6;
}

.back-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.back-btn:hover {
  background: #5a6268;
}

.chapter-info h1 {
  margin: 0;
  color: #333;
  font-size: 1.8em;
}

.chapter-info p {
  margin: 5px 0 0 0;
  color: #666;
  font-style: italic;
}

.error {
  text-align: center;
  padding: 40px;
  background: #f8d7da;
  border: 2px solid #dc3545;
  border-radius: 12px;
  color: #721c24;
}

.error button {
  margin-top: 20px;
  background: #dc3545;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
}

.home-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  cursor: pointer;
  transition: background 0.3s;
  margin-left: 15px;
}

.home-btn:hover {
  background: #5a6268;
}

.footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  color: #666;
  font-style: italic;
}

