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

header {
  background-color: #c94646; /* Rouge inspiré du drapeau japonais */
}

header li {
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
  height: auto;
}

main,
header,
footer {
  width: 100%;
}

main {
  padding: 20px;
  max-width: 800px;
  margin: auto;
  flex: 1;
}

/* =============================header============================= */

/* Bandeau titre au-dessus du menu */
.top-header {
  background-color: #445469;
  color: #fff;
  text-align: center;
  padding: 8px 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1.3;
}

/* Optionnel: pour bien séparer visuellement du menu */
.top-header + .main-nav {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.top-header h1 {
  font-size: 2.5rem; /* taille du texte (2.5x la taille de base) */
  color: #ffffff; /* couleur blanche */
  font-weight: bold; /* rend le texte encore plus épais */
  text-align: center; /* centré horizontalement */
  margin: 0; /* supprime les marges par défaut */
  padding: 10px 0; /* ajoute un peu d’espace autour */
}

/* =============================footer============================= */

/* Footer principal */
/* Footer principal */
.footer-main {
  background-color: #222;
  color: #fff;
  padding: 40px 20px;
}

/* Conteneur des colonnes */
.footer-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Colonnes */
.footer-left,
.footer-right {
  flex: 1 1 300px;
}

/* Titres H2 en blanc */
.footer-title-left,
.footer-title-right {
  color: #fff;
  margin-bottom: 20px;
}

/* Colonne gauche */
.footer-left-content {
  display: flex;
  flex-direction: column; /* mobile par défaut */
  align-items: center;
  gap: 15px;
}

.footer-avatar {
  width: 150px;
  height: 150px;
  border-radius: 12px;
  object-fit: cover;
}

.footer-bio {
  text-align: justify;
  max-width: 400px;
}

/* Colonne droite : réseaux sociaux avec icônes */
.footer-right .social-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-right .social-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

.footer-right .social-links a img {
  width: 22px;
  height: 22px;
}

.footer-right .social-links a:hover {
  color: #1da1f2;
}

/* Footer secondaire */
.footer-secondary {
  background-color: #111;
  color: #fff;
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
}

.footer-secondary a {
  color: #fff;
  text-decoration: underline;
  margin: 0 5px;
}

.footer-secondary a:hover {
  color: #1da1f2;
}

/* Desktop : avatar + texte côte à côte */
@media (min-width: 1024px) {
  .footer-left-content {
    flex-direction: row;
    align-items: flex-start;
  }

  .footer-bio {
    margin-left: 20px;
  }
}

/* Responsive : mobile/tablette */
@media (max-width: 1023px) {
  .footer-left-content {
    flex-direction: column;
    align-items: center;
  }

  .footer-bio {
    margin-left: 0;
  }

  .footer-right {
    align-items: center;
  }
}

/* =============================Polices de texte============================= */

h1 {
  text-align: center;
  color: #333;
  margin-top: 20px;
}

h2,
h3 {
  text-align: left;
  color: #333;
  margin-top: 20px;
}

p {
  text-align: justify;
  line-height: 1.6; /* espace entre les lignes */
  margin-top: 5px; /* marge au-dessus */
  margin-bottom: 5px; /* marge en dessous */
}

.alinea {
  text-indent: 2em;
}

.center-text {
  text-align: center;
}

li {
  text-align: justify;
  line-height: 1.6; /* espace entre les lignes */
  margin-bottom: 0.5em; /* espace entre les items de liste */
}
/* =============================Barre de navigation============================= */

/* Menu principal desktop horizontal */
.menu {
  list-style: none;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.menu > li {
  position: relative;
}

.menu a,
.submenu-toggle {
  display: block;
  padding: 12px 16px;
  color: #fff;
  text-decoration: none;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  font-weight: bold; /* Met le texte en gras */
}

.menu a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}

/* ============================= Sous-menus ============================= */

/* Style de base (valable partout) */
.sous-menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  background-color: #c94646;
  min-width: 150px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
}

.sous-menu li a {
  display: block;
  padding: 10px 15px;
  color: white;
  text-decoration: none;
}

.sous-menu li a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* ======= DESKTOP ======= */
@media (min-width: 769px) {
  /* On affiche au survol */
  .deroulant:hover .sous-menu {
    display: block;
  }
}

/* Styles pour l'accessibilité, pour les utilisateurs de claviers (naviguer avec tab) */
.menu a:focus {
  outline: 2px solid #fff;
  outline-offset: -2px;
}

/*=============================Prend en compte les petits écrans (remplissage de l'écran)=============================*/

/* Smooth scrolling pour défilement fluide */

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #d3e9ff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Assure que tout le contenu prend max 100% */
body > * {
  box-sizing: border-box;
}

/*=============================Styles pour les petits écrans, pour afficher la barre de navigation en mode vertical==============================*/

/* ===== PC ===== */
.menu-toggle {
  display: none; /* caché par défaut */
  width: 100%; /* occupe toute la largeur */
  max-width: 400px; /* facultatif : limite si tu veux pas qu’il devienne énorme */
  padding: 14px 0; /* padding horizontal à 0 pour coller à la largeur */
  font-size: 18px;
  background: #c94646;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: center; /* texte centré */
  font-weight: bold;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    margin: auto;
    padding: 10px 14px;
    font-size: 18px;
    background: #c94646;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
  }

  /* Menu caché par défaut, visible quand .active */
  .menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .menu.active {
    display: flex;
  }

  /* On retire la bordure du li */
  .menu > li {
    border-top: none;
  }

  .menu a,
  .submenu-toggle {
    display: block;
    text-align: center;
    padding: 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  /* Sous-menus en colonne, dans le flux */
  .sous-menu {
    position: relative;
    top: auto;
    left: auto;
    min-width: unset;
    display: none;
    background: #474eb9;
    margin: 0;
    padding: 0;
    box-shadow: none;
    z-index: 1;
  }

  .deroulant.open > .sous-menu {
    display: block;
  } /* OUVERT quand .open */

  /* Petite indent visuelle des items de sous-menu */
  .sous-menu li a {
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3); /* Ligne de séparation */
    padding: 12px 20px 12px 28px;
  }

  .sous-menu li:last-child {
    border-bottom: none; /* Pas de ligne après le dernier */
  }

  /* Le header reste au-dessus et à la largeur du viewport */
  header {
    position: relative;
    z-index: 10;
  }
}

/* =============================Pour la taille des différentes images============================= */

.responsive-img {
  display: block;
  margin: 20px auto; /* centre l’image horizontalement */
  max-width: 100%; /* l’image ne sera jamais plus large que son conteneur */
  height: auto; /* garde les proportions naturelles */
  border-radius: 8px; /* coins arrondis */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); /* petite ombre */
}

.img-small {
  width: 200px;
  height: auto;
}

.img-medium {
  width: 350px;
  height: auto;
}

.img-large {
  width: 600px;
  height: auto;
}

/* =============================Pour mettre les images cote à cote============================= */

.image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* par défaut 2 images */
  gap: 10px; /* espace entre les images */
}

.image-grid.three {
  grid-template-columns: repeat(3, 1fr); /* 3 images sur une ligne */
}

.image-grid img {
  width: 100%;
  height: auto;
  border-radius: 8px; /* optionnel pour arrondir les coins */
}

/* =============================Styles pour les boutons de ville============================= */
.btn {
  display: block; /* un bouton par ligne */
  text-align: center; /* texte centré */
  background-color: #c94646; /* couleur de fond */
  color: white; /* texte blanc */
  padding: 12px 20px; /* espace autour du texte */
  margin: 10px auto; /* espace entre les boutons */
  width: 200px; /* largeur fixe */
  border-radius: 8px; /* coins arrondis */
  text-decoration: none; /* enlever le soulignement */
  font-size: 18px;
  transition: background 0.3s;
}

.btn:hover {
  background-color: #c94646; /* couleur au survol */
}

/* =============================Section Image à coté du texte============================= */

.section {
  display: flex;
  align-items: center; /* centre verticalement image et texte */
  gap: 20px; /* espace entre image et texte */
  margin: 20px 0; /* espace avant/après la section */
  flex-wrap: wrap; /* permet au texte de passer sous l'image sur petit écran */
}

.section .texte {
  flex: 1; /* texte prend tout l'espace restant */
}

.section img {
  max-width: 300px; /* largeur de l'image */
  width: 100%; /* responsive */
  border-radius: 8px;
}

.section.inverse {
  flex-direction: row-reverse; /* inverse image et texte */
}

/* =============================Table des matières============================= */

.table-matieres {
  background: #f9f9f9;
  padding: 15px;
  border: 1px solid #ddd;
  margin-bottom: 20px;
  border-radius: 8px;
}

.table-matieres ul {
  list-style: none;
  padding: 0;
}

.table-matieres li {
  margin: 5px 0;
}

.table-matieres a {
  text-decoration: none;
  color: #0073e6;
}

.table-matieres a:hover {
  text-decoration: underline;
}

/* =============================pour contact.html============================= */

.contact-links a {
  display: flex;
  align-items: center;
  gap: 8px; /* espace entre l’icône et le texte */
  text-decoration: none; /* on enlève le soulignement par défaut */
  color: #0073e6; /* bleu lien */
  font-weight: 500;
  margin: 8px 0;
  transition: color 0.3s ease, transform 0.2s ease;
}

.contact-links a:hover {
  color: #005bb5; /* bleu plus foncé au survol */
  text-decoration: underline; /* souligne quand on passe la souris */
  transform: translateX(4px); /* petit effet de décalage */
}

.contact-links img {
  width: 24px;
  height: 24px;
}

/* =============================Planning tableau============================= */

table {
  width: 100%;
  border-collapse: collapse;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

thead {
  background: #4caf50; /* Vert agréable */
  color: white;
}

th,
td {
  padding: 12px 15px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #ddd;
}

/* Alternance de couleur sur les lignes */
tbody tr:nth-child(even) {
  background: #f9f9f9;
}

/* Liste des activités */
td ul {
  margin: 0;
  padding-left: 20px;
}

td ul li {
  margin: 4px 0;
}

/* Effet hover sur les lignes */
tbody tr:hover {
  background: #f1f1f1;
  transition: 0.3s;
}

/* =============================Bouton "Retour en haut"============================= */
#backToTop {
  opacity: 0; /* invisible par défaut */
  visibility: hidden; /* évite les clics fantômes */
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  font-size: 18px;
  border: none;
  outline: none;
  background-color: #333;
  color: white;
  cursor: pointer;
  padding: 12px;
  border-radius: 50%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: opacity 0.5s ease, visibility 0.5s ease; /* fondu fluide */
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
}

/* =============================Popup pour le téléchargement============================= */

/* Style de la popup */
.popup {
  display: none; /* cachée par défaut */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 999;
}
.popup-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  max-width: 300px;
}
.popup-actions {
  margin-top: 15px;
  display: flex;
  justify-content: space-around;
}
.popup-actions button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
#donateYes {
  background: #4caf50;
  color: white;
}
#donateNo {
  background: #f44336;
  color: white;
}

/* =============================Remerciements============================= */

.merci-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

.merci-message {
  text-align: center;
  margin-bottom: 40px;
}

.merci-message h1 {
  font-size: 2.2rem;
  color: #000000;
  margin-bottom: 15px;
}

.merci-message p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
}

.donateurs h2 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #474eb9;
}

/* Style du tableau */
.table-donateurs {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table-donateurs th,
.table-donateurs td {
  border: 1px solid #ddd;
  padding: 12px 16px;
  text-align: left;
}

.table-donateurs th {
  background: #c94646;
  color: #fff;
  font-weight: bold;
  text-align: center;
}

.table-donateurs tr:nth-child(even) {
  background: #f9f9f9;
}

.table-donateurs tr:hover {
  background: #f1f1f1;
}

/* =============================Vidéo YouTube============================= */

/* Conteneur responsive pour les vidéos YouTube */
.video-container {
  position: relative;
  width: 100%;
  max-width: 800px; /* largeur max (tu peux changer) */
  margin: 20px auto; /* centre horizontalement */
  padding-bottom: 56.25%; /* ratio 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 10px; /* arrondi optionnel */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* ombre optionnelle */
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* =============================Inverser une image horizontalement ============================= */

img.inverser-horizontal {
  transform: scaleX(-1);
}

/* =============================Bannière cookies ============================= */

/* Bannière cookies */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #222;
  color: #fff;
  padding: 15px;
  text-align: center;
  font-size: 0.9em;
  z-index: 1000;
}

#cookie-banner p {
  margin: 0 0 10px;
}

#cookie-banner button {
  margin: 0 5px;
  padding: 8px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

#accept-cookies {
  background: #4caf50;
  color: white;
}

#decline-cookies {
  background: #f44336;
  color: white;
}
