* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Header du jeu */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: #2c3e50;
  padding: 1rem 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.game-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.player-stats {
  display: flex;
  gap: 2rem;
  font-weight: bold;
  font-size: 1.1rem;
}

.player-stats > div {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

header h1 {
  font-size: 2.5rem;
  margin: 0;
  background: linear-gradient(45deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

header p {
  font-size: 1.1rem;
  color: #7f8c8d;
  text-align: center;
  margin: 0;
}

.progress-bar {
  width: 100%;
  max-width: 400px;
  height: 8px;
  background: rgba(0,0,0,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #45a049);
  width: 0%;
  transition: width 0.3s ease;
}

/* Écrans de jeu */
.game-screen {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 70vh;
}

.game-screen.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

/* Écran d'accueil */
.welcome-content {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.welcome-content h2 {
  font-size: 2.5rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.welcome-content p {
  font-size: 1.2rem;
  color: #7f8c8d;
  margin-bottom: 2rem;
}

.game-rules {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 15px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: left;
}

.game-rules h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
  text-align: center;
}

.game-rules ul {
  list-style: none;
  padding: 0;
}

.game-rules li {
  padding: 0.5rem 0;
  font-size: 1.1rem;
  color: #2c3e50;
}

.difficulty-selector {
  margin: 2rem 0;
}

.difficulty-selector h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
}

.difficulty-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.difficulty-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 25px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.difficulty-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.difficulty-btn.selected {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  transform: scale(1.05);
}

/* Boutons du jeu */
.game-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 25px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  margin: 0.5rem;
}

.game-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.game-btn.primary {
  background: linear-gradient(135deg, #4CAF50, #45a049);
}

.game-btn.secondary {
  background: linear-gradient(135deg, #ff9800, #f57c00);
}

/* Écran de jeu principal */
.game-container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.level-info {
  text-align: center;
  margin-bottom: 2rem;
}

.level-info h2 {
  color: #2c3e50;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.level-info p {
  color: #7f8c8d;
  font-size: 1.1rem;
}

.game-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.scenario-container {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 15px;
  padding: 2rem;
  border: 2px solid #dee2e6;
}

.scenario {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #2c3e50;
}

.choices-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.choices-container h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
  text-align: center;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.choice-btn {
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 15px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  font-size: 1rem;
  color: #2c3e50;
}

.choice-btn:hover {
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.choice-btn.correct {
  border-color: #4CAF50;
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
}

.choice-btn.incorrect {
  border-color: #e74c3c;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
}

.game-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Écran de résultat */
.result-content {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.result-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.result-content h2 {
  color: #2c3e50;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.result-content p {
  font-size: 1.2rem;
  color: #7f8c8d;
  margin-bottom: 2rem;
}

.result-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
  text-align: left;
}

.explanation, .tips {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 15px;
  padding: 1.5rem;
}

.explanation h3, .tips h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
}

.tips ul {
  list-style: none;
  padding: 0;
}

.tips li {
  padding: 0.5rem 0;
  color: #2c3e50;
}

.score-earned {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  padding: 1rem 2rem;
  border-radius: 25px;
  font-size: 1.2rem;
  font-weight: bold;
  margin: 2rem 0;
  display: inline-block;
}

/* Écran de fin de niveau */
.level-complete-content {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.level-complete-content h2 {
  color: #2c3e50;
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.level-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 1.5rem;
  border-radius: 15px;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: bold;
}

.achievements {
  margin: 2rem 0;
}

.achievements h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
}

#achievements-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.achievement {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #2c3e50;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
}

/* Écran de fin de jeu */
.game-over-content {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.game-over-content h2 {
  color: #2c3e50;
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.final-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.final-stat {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 1.5rem;
  border-radius: 15px;
  text-align: center;
}

.certificate {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  border-radius: 15px;
  padding: 2rem;
  margin: 2rem 0;
  color: #2c3e50;
}

.certificate h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.certificate-badge {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  padding: 1rem 2rem;
  border-radius: 25px;
  font-size: 1.2rem;
  font-weight: bold;
  display: inline-block;
  margin-top: 1rem;
}

.game-actions {
  margin-top: 2rem;
}

/* Panneau d'aide */
.help-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.help-panel.hidden {
  display: none;
}

.help-content {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  max-width: 500px;
  text-align: center;
}

.help-content h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
}

.help-content p {
  color: #7f8c8d;
  margin-bottom: 1.5rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: #2c3e50;
  margin-top: 2rem;
}

footer p {
  margin-bottom: 0.5rem;
}

footer small {
  color: #7f8c8d;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .player-stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .game-content {
    grid-template-columns: 1fr;
  }
  
  .result-details {
    grid-template-columns: 1fr;
  }
  
  .difficulty-buttons {
    flex-direction: column;
  }
  
  .game-controls {
    flex-direction: column;
  }
  
  .welcome-content,
  .game-container,
  .result-content,
  .level-complete-content,
  .game-over-content {
    padding: 1.5rem;
  }
  
  header h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .game-screen {
    padding: 1rem;
  }
  
  .welcome-content h2,
  .result-content h2,
  .level-complete-content h2,
  .game-over-content h2 {
    font-size: 2rem;
  }
  
  .player-stats > div {
    font-size: 1rem;
    padding: 0.3rem 0.8rem;
  }
} 