/* Styles principaux */
:root {
  --primary-color: #2980b9;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --text-color: #333;
  --background-color: #f9f9f9;
  --container-width: 800px;
  --header-height: 60px;
  --footer-height: 60px;
  --border-radius: 5px;
  --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 20px;
  background-color: #fff;
  box-shadow: var(--box-shadow);
  min-height: calc(100vh - var(--header-height) - var(--footer-height) - 40px);
}

header {
  background-color: #2c3e50;
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 20px;
}

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

.logo img {
  height: 50px;
  margin-right: 15px;
  object-fit: cover;
}

.logo h1 {
  font-size: 1.5rem;
  margin: 0;
}

nav {
  background-color: var(--secondary-color);
  display: flex;
  justify-content: center;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 999;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 15px 20px;
  display: inline-block;
  transition: background-color 0.3s;
}

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

main {
  padding-top: calc(var(--header-height) + 50px);
  padding-bottom: var(--footer-height);
}

h1, h2, h3 {
  color: var(--primary-color);
}

.exercise-title {
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.exercise-content {
  margin-bottom: 30px;
}

.exercise-image {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  display: block;
}

.questions-container {
  background-color: #f5f5f5;
  padding: 20px;
  border-radius: var(--border-radius);
  margin-top: 30px;
}

.question {
  margin-bottom: 30px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 20px;
}

.question:last-child {
  border-bottom: none;
}

.question-text {
  font-weight: bold;
  margin-bottom: 10px;
}

.answer-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  margin-bottom: 10px;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-item input[type="checkbox"] {
  margin: 0;
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.btn {
  padding: 8px 15px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

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

.btn-solution:hover {
  background-color: #1c638e;
}

.btn-reset {
  background-color: #f39c12;
  color: white;
}

.btn-reset:hover {
  background-color: #d68910;
}

.solution {
  background-color: #e8f4fc;
  padding: 15px;
  border-left: 4px solid var(--primary-color);
  margin-top: 15px;
  display: none;
}

footer {
  background-color: #2c3e50;
  color: white;
  padding: 20px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-height);
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

footer p {
  margin-left: 20px;
}

.dark-mode-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.reset-exercise {
  display: block;
  margin: 30px auto;
  padding: 10px 20px;
  background-color: #f39c12;
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: bold;
}

.reset-exercise:hover {
  background-color: #d68910;
}

.external-btn {
  display: inline-block;
  padding: 12px 25px;
  background-color: #e74c3c;
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  margin-top: 15px;
  font-weight: bold;
  font-size: 1.1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  border: 2px solid #c0392b;
}

.external-btn:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.external-links {
  margin-top: 40px;
  padding: 20px;
  border-top: 1px solid #ddd;
  background-color: #f8f9fa;
  border-radius: var(--border-radius);
}

/* Responsive styles */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
  }
  
  nav a {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
  
  .container {
    padding: 15px;
  }
  
  .button-group {
    flex-direction: column;
  }
}
