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

/* ================= VARIABLES ================= */
:root {
  --jaune: #f7c600;
  --noir: #111;
  --blanc: #fff;
}

/* ================= GLOBAL ================= */
body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--blanc);
  color: var(--noir);
}

/* ================= HEADER ================= */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--noir);
  padding: 20px 40px;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header.scrolled {
  padding: 10px 40px;
  background-color: rgba(17,17,17,0.95);
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.header-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ================= LOGO ================= */
.logo img {
  height: 60px;
  transition: height 0.3s ease;
}

.header.scrolled .logo img {
  height: 45px;
}

/* ================= NAVIGATION ================= */
.menu {
  list-style: none;
  display: flex;
  gap: 20px;
}

.menu li {
  position: relative;
}

.menu > li > a {
  color: var(--blanc);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 5px;
  display: block;
  transition: color 0.3s;
}

/* hover liens principaux */
.menu > li > a:hover {
  color: var(--jaune);
}

/* ================= SOUS-MENUS ================= */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--noir);
  list-style: none;
  min-width: 180px;
  display: none;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.submenu li a {
  color: var(--blanc);
  padding: 12px 15px;
  font-size: 14px;
  display: block;
  text-decoration: none;
}

/* hover sous-menu */
.submenu li a:hover {
  background-color: var(--jaune);
  color: var(--noir);
}

/* affichage desktop */
.dropdown:hover .submenu {
  display: block;
}

/* ================= BURGER ================= */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.burger span {
  width: 25px;
  height: 3px;
  background-color: var(--jaune);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .burger {
    display: flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    background-color: var(--noir);
    display: none;
    flex-direction: column;
  }

  .nav.active {
    display: flex;
  }

  .menu {
    flex-direction: column;
    gap: 0;
  }

  .menu > li > a {
    padding: 15px;
    border-top: 1px solid #222;
  }

  .submenu {
    position: static;
    display: none;
    box-shadow: none;
  }

  .dropdown.open .submenu {
    display: block;
  }
}

@media (max-width: 500px) {
  .header {
    padding: 10px 20px;
  }

  .logo img {
    height: 45px;
  }
}

.social-icons {
  display: flex;
  gap: 15px;          /* espace entre les icônes */
  justify-content: center; /* centré horizontalement */
  margin-top: 20px;   /* ou à ajuster selon l'emplacement */
}

.social-icons a img {
  width: 32px;        /* taille des icônes */
  height: 32px;
  transition: transform 0.3s, opacity 0.3s;
}

.social-icons a:hover img {
  transform: scale(1.2); /* léger zoom au survol */
  opacity: 0.8;          /* effet visuel */
}

@media (max-width: 500px) {
  .social-icons a img {
    width: 24px;
    height: 24px;
  }
}

/* ================= PAGE ÉDITION 10KM ================= */
.edition-10km {
  max-width: 1100px;
  margin: 160px auto 120px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 60px; /* espacement entre sections */
}

/* ================= TITRE ================= */
.edition-titre {
  font-size: 2.6rem;
  font-weight: 800;
  text-align: center;
  color: #111;
  position: relative;
  margin-bottom: 40px;
}

.edition-titre::after {
  content: "";
  display: block;
  width: 90px;
  height: 4px;
  background: #f7c600;
  margin: 22px auto 0;
}

/* ================= DESCRIPTION ================= */
.edition-description {
  max-width: 820px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.7;
  color: #333;
  white-space: pre-line;
  overflow-wrap: anywhere;
  text-align: justify;
}

/* ================= GALERIE PRINCIPALE ================= */
.edition-galerie {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}


/* ================= PARCOURS ================= */
.edition-parcours {
  margin-top: 30px;
}

.edition-parcours h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 15px;
  text-align: center;
}

.parcours-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}


/* ================= RÉSULTATS ================= */
.edition-resultats {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 32px;
  background: #f8f8f8;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.edition-resultats h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #111;
  text-align: center;
}

.edition-resultats a {
  display: inline-block;
  margin: 0 10px 8px 0;
  font-weight: 600;
  color: #111;
  text-decoration: underline;
  transition: color 0.25s ease;
  position: relative;
}

.edition-resultats a:hover {
  color: #f7c600;
}

.edition-resultats a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 3px;
  background: var(--jaune);
  transition: width 0.3s ease;
}

.edition-resultats a:hover::after {
  width: 100%;
}

/* ================= PARTENAIRES ================= */
.edition-partenaires {
  margin-top: 80px;
  padding-top: 50px;
  border-top: 1px solid #e6e6e6;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 35px;
  align-items: center;
  justify-items: center;
}

.edition-partenaires h3 {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 40px;
  color: #111;
}

.partenaire {
  text-align: center;
  max-width: 180px;
}

.partenaire img {
  width: 100%;
  max-width: 150px;
  height: auto;
  border-radius: 12px;
  margin-bottom: 10px;
  transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  padding: 10px;
  background-color: #fff;
}

/* Effet overlay très subtil */
.img-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 1s ease;
  pointer-events: none;
}

/* HOVER */
.img-box:hover img {
  transform: scale(1.05);
  filter: brightness(1.05);
}

.partenaire a {
  display: inline-block;
  font-weight: 600;
  color: #111;
  text-decoration: none;
  font-size: 0.95rem;
}

.partenaire a:hover {
  text-decoration: underline;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .edition-titre {
    font-size: 2rem;
  }

  .edition-description {
    font-size: 1rem;
  }


  .edition-resultats {
    padding: 22px;
  }
}

@media (max-width: 480px) {
  .edition-10km {
    margin-top: 140px;
  }

  .edition-galerie {
    gap: 12px;
  }

}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(
    rgba(0,0,0,0.035) 1px,
    transparent 1px
  );
  background-size: 18px 18px;
  pointer-events: none;
  z-index: -1;
}

.edition-parcours h3::after,
.edition-resultats h3::after,
.edition-partenaires h3::after {
  content: "";
  display: block;
  width: 70px;
  height: 4px;
  background: var(--jaune);
  margin: 14px auto 0;
  border-radius: 2px;
}

.parcours-description {
  max-width: 820px;
  margin: 0 auto 35px;
  padding: 26px 30px;
  background: linear-gradient(
    to right,
    rgba(247,198,0,0.08),
    rgba(247,198,0,0.02)
  );
  border-radius: 16px;
  line-height: 1.7;
  font-size: 1.05rem;
  color: #333;
}

.edition-parcours {
  padding: 45px 35px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 14px 35px rgba(0,0,0,0.08);
}

/* ===== SYSTEME IMAGE UNIVERSEL ===== */

.img-box {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3; /* format standard */
  overflow: hidden;
  border-radius: 14px;
  background: #f2f2f2;
}

.img-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* IMPORTANT : plus joli pour zoom */
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.8s ease;
}


/* Permet de centrer une section verticalement dans la fenêtre */
.anchored-section {
  display: flex;
  flex-direction: column;
  justify-content: center; /* centre verticalement */
  min-height: 100vh;       /* prend toute la hauteur de la fenêtre */
  scroll-margin-top: 0;    /* ignore le header si fixe */
}

#parcours,
#resultats,
#partenaires {
  scroll-margin-top: 100px; /* ajuster selon la hauteur de ton header */
}

/* Lien inscription identique aux résultats */
.edition-inscription .lien-inscription {
  display: inline-block;
  margin: 0 10px 8px 0;
  font-weight: 600;
  color: #111;
  text-decoration: underline;
  position: relative;
  transition: color 0.25s ease;
}

.edition-inscription .lien-inscription:hover {
  color: #f7c600;
}

.edition-inscription .lien-inscription::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 3px;
  background: var(--jaune);
  transition: width 0.3s ease;
}

/* Bloc inscription identique aux résultats */
.edition-inscription {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 32px;
  background: #f8f8f8;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.edition-inscription h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #111;
  position: relative;
}

.edition-inscription h3::after {
  content: "";
  display: block;
  width: 70px;
  height: 4px;
  background: var(--jaune);
  margin: 14px auto 0;
  border-radius: 2px;
}

.edition-inscription a {
  display: inline-block;
  margin: 0 10px 8px 0;
  font-weight: 600;
  color: #111;
  text-decoration: underline;
  position: relative;
  transition: color 0.25s ease;
}

.edition-inscription a:hover {
  color: #f7c600;
}

.edition-inscription a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 3px;
  background: var(--jaune);
  transition: width 0.3s ease;
}

.edition-inscription a:hover::after {
  width: 100%;
}


.edition-autres h3 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 20px;
  position: relative;
}

.edition-autres h3::after {
  content: "";
  display: block;
  width: 70px;
  height: 4px;
  background: var(--jaune);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ================= AUTRES CONTENUS RESPONSIVE ================= */

.autres-contenu {
  max-width: 820px;
  margin: 0 auto;
  padding: 26px 30px;
  background: linear-gradient(
    to right,
    rgba(247,198,0,0.08),
    rgba(247,198,0,0.02)
  );
  border-radius: 16px;
  line-height: 1.7;
  font-size: 1.05rem;
  color: #333;

  /* IMPORTANT POUR RESPONSIVE */
  overflow-wrap: anywhere;
  word-break: break-word;
}

.autres-contenu img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 15px auto;
}

.autres-contenu iframe,
.autres-contenu video {
  max-width: 100%;
  width: 100%;
  height: auto;
}

.autres-contenu table {
  width: 100%;
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
}

.autres-contenu a {
  word-break: break-word;
}

/* Responsive mobile */
@media (max-width: 768px) {
  .autres-contenu {
    padding: 20px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .autres-contenu {
    padding: 16px;
    font-size: 0.95rem;
  }
}