/* Animation titre hero */
@keyframes apparition {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  animation: apparition 1s ease;
}

.hero p {
  animation: apparition 1.5s ease;
}

/* Barre de navigation */
header {
  background-color: #1a3a5c;
  padding: 15px 30px;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav a {
  color: white;
  text-decoration: none;
  margin-right: 25px;
  font-size: 16px;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

#toggle-theme {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  float: right;
  margin-top: -5px;
}

#toggle-theme img {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
}

/* Dark mode */
body.dark {
  background-color: #0d1b2a;
  color: #e0e0e0;
}

body.dark header {
  background-color: #0a2540;
}

body.dark .hero {
  background-color: #0a2540;
}

body.dark .description h2 {
  color: #7eb8f7;
  border-bottom-color: #7eb8f7;
}

body.dark .galerie h2 {
  color: #7eb8f7;
  border-bottom-color: #7eb8f7;
}

body.dark th {
  background-color: #0a2540;
}

body.dark td {
  border-bottom-color: #2a4a6a;
}

body.dark tr:nth-child(even) {
  background-color: #1a2f45;
}

body.dark footer {
  background-color: #0a2540;
}

body.dark .description a {
  color: #7eb8f7;
}

/* Style général de la page */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f5f8fc;
  color: #1a3a5c;
}

/* Section hero */
.hero {
  background-color: #1a3a5c;
  color: white;
  text-align: center;
  padding: 50px 20px;
}

.hero h1 {
  font-size: 40px;
  margin-bottom: 10px;
}

.hero p {
  font-size: 18px;
}

/* Section description */
.description {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

.description h2 {
  color: #1a3a5c;
  font-size: 28px;
  border-bottom: 2px solid #1a3a5c;
  padding-bottom: 8px;
}

.description p {
  font-size: 16px;
  line-height: 1.7;
}

/* Galerie d'images */
.galerie {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

.galerie h2 {
  color: #1a3a5c;
  font-size: 28px;
  border-bottom: 2px solid #1a3a5c;
  padding-bottom: 8px;
}

.images {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

figure {
  width: 250px;
  margin: 0;
}

figure img {
  width: 250px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

figcaption {
  font-size: 14px;
  color: #555;
  margin-top: 6px;
  text-align: center;
}

/* Tableau */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

th {
  background-color: #1a3a5c;
  color: white;
  padding: 12px;
  text-align: left;
}

td {
  padding: 12px;
  border-bottom: 1px solid #d0dce8;
}

tr:nth-child(even) {
  background-color: #e8f0f7;
}

/* Barres de progression */
.barre-fond {
  background-color: #d0dce8;
  border-radius: 10px;
  height: 25px;
  width: 100%;
  margin-bottom: 15px;
}

.barre {
  background-color: #1a3a5c;
  height: 25px;
  border-radius: 10px;
  color: white;
  font-size: 13px;
  text-align: right;
  padding-right: 10px;
  line-height: 25px;
  width: 0%;
}

/* Lien externe */
.description a {
  color: #1a3a5c;
  font-weight: bold;
  text-decoration: underline;
}

.description a:hover {
  color: #2e6da4;
}

/* Bouton retour en haut */
#retour-haut {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #1a3a5c;
  color: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
}

#retour-haut.visible {
  opacity: 1;
}

/* Footer */
footer {
  background-color: #1a3a5c;
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 60px;
  font-size: 14px;
}