/* ================= 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);
}

/* ================= TITRE PAGE ================= */
h1 {
  margin-top: 140px;
  margin-bottom: 80px;
  text-align: center;
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--noir);
}

h1::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: var(--jaune);
  margin: 20px auto 0;
}

/* ================= 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;
  }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 600px) {
  .training-schedule {
    padding: 60px 20px;
  }
}

.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;
  }
}

/* ================= EVENEMENTS – FORMAT ARTICLE ================= */

.events-title {
  margin-top: 140px;
  margin-bottom: 80px;
  text-align: center;
}

.events-title h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--noir);
}

.events-title h1::after {
  content: "";
  display: block;
  width: 90px;
  height: 4px;
  background: var(--jaune);
  margin: 22px auto 0;
}

/* ================= CONTAINER GLOBAL ================= */

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

/* ================= ARTICLE ================= */

.event-card {
  padding: 0 0 80px;
  margin-bottom: 80px;
  border-bottom: 1px solid #e5e5e5;
}

/* ================= TITRE ARTICLE ================= */

.event-card h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 25px;
  color: var(--noir);
  line-height: 1.2;
  position: relative;
  padding-bottom: 15px;
}

.event-card h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--jaune),
    transparent
  );
}

/* ================= TEXTE ================= */

.event-card p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
  margin-bottom: 28px;

  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* ================= GALERIE ARTICLE PROPRE ================= */

.event-images-wrapper {
  margin-top: 30px;
}

/* grille stable */
.event-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;

  /* état réduit */
  max-height: 420px;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

/* état réduit : montre seulement 4 images */
.event-images.reduced {
  max-height: calc(180px * 2 + 16px); /* 4 images = 2 lignes si 2 colonnes environ */
}

/* état ouvert */
.event-images.expanded {
  max-height: 3000px;
}


/* cacher les images supplémentaires par défaut */
.event-images img.hidden {
  display: none;
}

/* images uniformisées */
.event-images img {
  width: 100%;
  height: 180px;              /* HAUTEUR FIXE = alignement */
  object-fit: cover;         /* recadrage propre */
  background: #eee;
  border-radius: 6px;
  display: block;
  transition: opacity 0.2s ease;
}

.event-images img:hover {
  opacity: 0.9;
}

/* ================= FIX BOUTON VOIR PLUS ================= */

.show-more-btn {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;

  margin-top: 20px;
  background: none;
  border: none;
  padding: 0;

  font-size: 0.95rem;
  font-weight: 700;
  color: var(--jaune);
  cursor: pointer;
}

.show-more-btn:hover {
  text-decoration: underline;
}

/* ================= SÉPARATION ARTICLES ================= */

.event-card {
  position: relative;
}

.event-card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -40px;
  width: 120px;
  height: 3px;
  background: var(--jaune);
}

/* ================= AXE DE LECTURE ================= */

.events-container {
  position: relative;
}

.events-container::before {
  content: "";
  position: absolute;
  left: -40px;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(0,0,0,0.15),
    transparent
  );
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {
  .event-card h2 {
    font-size: 1.8rem;
  }

  .event-card p {
    font-size: 1rem;
  }

  .event-images {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }

  .event-images img {
    height: 110px;
  }
}