/* Reset de base */
body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background-color: #ffffff;
  color: #1a1a1a;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden; /* Évite scroll horizontal */
}

header h1 {
  font-family: "Georgia", serif;
  color: #002855;
} 

h2, h3 {
  font-family: "Georgia", serif;
  color: #686868;
  margin-top: 0;
}

/* HEADER */
header {
  background: linear-gradient(to right, #002855 0%, #ffffff 50%, #e1000f 100%);
  color: white;
  padding: 0.2rem 0;
  border-bottom: 4px solid #c0aa58;
  position: sticky;
  top: 0;
  z-index: 3000; /* Plus haut que tout */
  width: 100%;
  box-sizing: border-box;
}

.header-container {
  max-width: 1200px;
  margin: auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  position: relative; /* Pour positionnement menu burger */
}

/* LOGO */
.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 60px;
  margin-right: 15px;
}

.logo h1 {
  font-size: 1.8rem;
  margin: 0;
}

.lien_titre_parti {
  color: inherit;
  text-decoration: none;
}

/* NAVIGATION */
.main-nav {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.main-nav a {
  color: #002855;
  text-decoration: none;
  font-weight: 600;
  position: relative;
}

.main-nav a:hover {
  color: #131212;
  text-decoration: underline;
}

/* Boutons du menu */
.main-nav .btn-primary {
  background-color: #c0aa58;
  color: #002855;
  padding: 8px /* 16px*/; 
  border-radius: 4px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.main-nav .btn-primary:hover {
  background-color: #a08b45;
}

/* Bouton Dark Mode */
#darkModeToggle {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: inherit;
  /* margin-left: 10px; */
  user-select: none;
}

/* Burger menu */
.burger-menu {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: white;
  position: absolute;
  right: 20px;
  top: 20px;
  z-index: 3500; /* Plus haut que le header */
}

/* LAYOUT */
.container {
  display: flex;
  align-items: flex-start;
  max-width: 1500px;
  margin: auto;
  padding: 1em;
  box-sizing: border-box;
}

/* SIDEBAR */
.sidebar {
  flex: 0 0 250px;
  position: sticky;
  top: 64px; /* Hauteur header (ajustée) pour espace sous header */
  align-self: flex-start;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: #f5f3f3;
  padding: 1rem;
  box-sizing: border-box;
  border-right: 1px solid #ccc;
  transition: none;
}

/* Style du bouton du menu déroulant */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-btn {
  background: none;
  border: none;
  color: inherit;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 1em;
}

/* Style du contenu du menu déroulant (masqué par défaut) */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  border-radius: 4px;
}

/* Style des liens dans le menu déroulant */
.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

/* Changement de couleur au survol */
.dropdown-content a:hover {
  background-color: #f1f1f1;
}

/* Afficher le menu déroulant au survol */
.dropdown:hover .dropdown-content {
  display: block;
}


/* Responsive Sidebar */
@media (max-width: 768px) {
  .burger-menu {
    display: block;
  }

  .main-nav {
    text-align: left;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    height: 100vh;
    width: 260px;
    background-color: white;
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
    transition: left 0.3s ease;
    z-index: 3200;
    padding: 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar.active {
    left: 0;
  }

  /* Contenu décalé quand sidebar visible */
  .content {
    transition: margin-left 0.3s ease;
    width: 100%;
    margin-left: 0;
  }

  .content.sidebar-active {
    margin-left: 260px;
  }
}

/* Sidebar contenu */
.sidebar h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #64748b;
  padding-bottom: 0.5rem;
}

.sidebarr {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem 0;
}

.engagement {
  background-color: #002855;
  color: white;
  padding: 1rem;
  text-align: center;
  font-weight: bold;
  border-left: 5px solid #c0aa58;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  border-radius: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.engagement img {
  height: 60px;
  width: 60px;
  transition: transform 0.3s ease;
}

.engagement span {
  font-family: "Georgia", serif;
  font-weight: bold;
  font-size: 1.1rem;
}

.engagement:hover {
  transform: scale(1.15);
  cursor: pointer;
}

/* CONTENT */
.content {
  flex-grow: 1;
  padding: 2rem;
  background: white;
  box-sizing: border-box;
  min-height: calc(100vh - 64px);
}
main h1, h2, h3, p{
  text-align: center;
}
/* Carrousel */
.hero-carousel {
  max-width: 800px; /* largeur max raisonnable sur desktop */
  margin: 0 auto;   /* centrage horizontal */
  overflow: hidden;
}

.hero-carousel img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain; /* pour garder la proportion de l'image */
  max-height: 150px;   /* limite hauteur max */
}

.video-section {
  margin-bottom: 2rem;
}

.video-section h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  text-align: center;
}

/* Lecteur vidéo : limité en largeur et centré */
.lecteur {
  width: 100%;
  max-width: 280px; /* limite largeur max */
  height: auto;
  display: block;
  margin: 0 auto; /* centre horizontalement */
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

/* FOOTER */
footer {
  background-color: #002855;
  color: white;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

.RS img {
  width: 24px;
  height: auto;
  margin: 0 8px;
  vertical-align: middle;
}



/* DARK MODE */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

/* body.dark-mode a {
  color: #90caf9;
}

body.dark-mode a:hover {
  color: #bbdefb;
} */

body.dark-mode header {
  background: linear-gradient(to right, #1b2a48 0%, #ffffff 50%, #8b0000 100%);
  border-bottom-color: #c0aa58;
}

/* body.dark-mode .main-nav a {
  color: #90caf9;
} */

body.dark-mode .btn-primary {
  background-color: #c0aa58;
  color: #121212;
}

body.dark-mode .btn-primary:hover {
  background-color: #a08b45;
}

body.dark-mode .sidebar {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

body.dark-mode .content {
  background-color: #121212;
}

/* Bloquer scroll du body quand sidebar ouverte */
body.sidebar-active {
  overflow: hidden;
}
