/* Styles généraux */
:root {
  --primary-color: #2980b9; /* Bleu principal pour la navigation */
  --secondary-color: #3498db; /* Bleu secondaire */
  --accent-color: #e74c3c; /* Rouge pour les accents */
  --present-color: #27ae60; /* Vert pour le discours indirect au présent */
  --passe-color: #f39c12; /* Orange pour le discours indirect au passé */
  --question-color: #9b59b6; /* Violet pour les questions indirectes */
  --text-color: #333; /* Couleur de texte principale */
  --background-color: #fff; /* Fond principal */
  --card-background: #f8f9fa; /* Fond des cartes */
  --header-footer-bg: #2c3e50; /* Fond du header et footer */
  --header-footer-text: #ecf0f1; /* Texte du header et footer */
  --button-verify: #2ecc71; /* Vert pour le bouton vérifier */
  --button-solution: #3498db; /* Bleu pour le bouton solution */
  --button-reset: #f1c40f; /* Jaune pour le bouton réinitialiser */
  --correct-answer: #2ecc71; /* Vert pour les réponses correctes */
  --wrong-answer: #e74c3c; /* Rouge pour les réponses incorrectes */
}

/* Mode sombre */
[data-theme="dark"] {
  --text-color: #ecf0f1;
  --background-color: #2c3e50;
  --card-background: #34495e;
  --header-footer-bg: #1a252f;
  --header-footer-text: #ecf0f1;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  transition: background-color 0.3s, color 0.3s;
}

/* Header et navigation */
header {
  background-color: var(--header-footer-bg);
  color: var(--header-footer-text);
  padding: 1rem;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  margin-right: 10px;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 500;
}

.theme-switch {
  background: none;
  border: none;
  color: var(--header-footer-text);
  font-size: 1.5rem;
  cursor: pointer;
}

nav {
  background-color: var(--primary-color);
  display: flex;
  justify-content: space-around;
  position: fixed;
  top: 70px;
  width: 100%;
  z-index: 999;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 1rem;
  display: block;
  text-align: center;
  flex-grow: 1;
  transition: background-color 0.3s;
}

nav a:hover, nav a.active {
  background-color: var(--secondary-color);
}

/* Contenu principal */
main {
  max-width: 1200px;
  margin: 130px auto 80px;
  padding: 0 20px;
}

.section-title {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
}

.card {
  background-color: var(--card-background);
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

/* Styles spécifiques pour le discours indirect */
.present-rule {
  border-left: 4px solid var(--present-color);
}

.passe-rule {
  border-left: 4px solid var(--passe-color);
}

.question-rule {
  border-left: 4px solid var(--question-color);
}

.example {
  background-color: rgba(52, 152, 219, 0.1);
  padding: 1rem;
  border-radius: 4px;
  margin: 1rem 0;
}

.direct {
  color: var(--accent-color);
  font-weight: bold;
}

.indirect {
  color: var(--primary-color);
  font-weight: bold;
}

.highlight-present {
  background-color: rgba(39, 174, 96, 0.2);
  padding: 0 3px;
}

.highlight-passe {
  background-color: rgba(243, 156, 18, 0.2);
  padding: 0 3px;
}

.highlight-question {
  background-color: rgba(155, 89, 182, 0.2);
  padding: 0 3px;
}

/* Tableaux */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border: 1px solid #ddd;
}

th {
  background-color: var(--primary-color);
  color: white;
}

tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Exercices interactifs */
.exercise {
  background-color: var(--card-background);
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.exercise-title {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.exercise-content {
  margin-bottom: 1rem;
}

.exercise-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.exercise-item:last-child {
  border-bottom: none;
}

.exercise-buttons {
  display: flex;
  gap: 10px;
  margin-top: 1rem;
}

.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s;
}

.btn-verify {
  background-color: var(--button-verify);
  color: white;
}

.btn-solution {
  background-color: var(--button-solution);
  color: white;
}

.btn-reset {
  background-color: var(--button-reset);
  color: var(--text-color);
}

.feedback {
  margin-top: 0.5rem;
  font-weight: 500;
}

.correct {
  color: var(--correct-answer);
}

.incorrect {
  color: var(--wrong-answer);
}

/* Inputs pour les exercices */
input[type="text"] {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 100%;
  max-width: 300px;
}

.radio-group, .checkbox-group {
  margin: 0.5rem 0;
}

.radio-option, .checkbox-option {
  margin: 0.25rem 0;
}

/* Footer */
footer {
  background-color: var(--header-footer-bg);
  color: var(--header-footer-text);
  padding: 1rem;
  position: fixed;
  bottom: 0;
  width: 100%;
  text-align: left;
}

/* Responsive */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    position: static;
  }
  
  main {
    margin-top: 80px;
  }
  
  .exercise-buttons {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

/* Classes utilitaires */
.text-center {
  text-align: center;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}
