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

/* ================= HERO ================= */
.hero {
  height: 100vh; /* occupe tout l'écran */
  background: url("../img/baniere1.jpg") no-repeat center center;
  background-size: cover;
  background-attachment: fixed; /* ← clé : image fixe */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.2); /* assombrit l'image pour lisibilité */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  padding: 0 20px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  color: #f7c600;
}

.hero p {
  font-size: 1.2rem;
  margin-top: 10px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1rem;
  }
}


/* ================= ACTUALITÉS – CARTES ================= */

/* ================= ACTUALITÉS ================= */

.news-feed {
  padding: 80px 20px;
  background: #f5f5f5;
}

.news-feed h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2rem;
  font-weight: 800;
}

/* GRILLE */
.news-container {
  max-width: 1200px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

@media (max-width: 900px) {
  .news-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .news-container {
    grid-template-columns: 1fr;
  }
}

/* CARTE */
.news-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

/* ZONE IMAGE (taille FIXE) */
.news-image {
  width: 100%;
  height: 180px;
  background: #eee;

  display: flex;
  align-items: center;
  justify-content: center;
}

.news-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* CONTENU TEXTE (taille LIBRE) */
.news-content {
  padding: 16px;
}

.news-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.news-content p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #555;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;   /* nombre de lignes */
  line-clamp: 4;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: calc(1.5em * 4);
  white-space: normal; /* OBLIGATOIRE ici */
}

.news-card h3 {
  word-wrap: break-word; /* force le retour à la ligne si mot trop long */
  overflow-wrap: break-word; /* compatibilité moderne */
  white-space: normal; /* permet le retour à la ligne normal */
}

.news-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.news-card:hover {
    transform: scale(1.05); /* grossit légèrement */
    box-shadow: 0 20px 40px rgba(0,0,0,0.2); /* ombre plus marquée */
}

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


/* ================= PLANNING ENTRAINEMENTS ================= */

.training-schedule {
  padding: 80px 60px;
  background-color: var(--blanc);
}

.training-schedule h2 {
  text-align: center;
  margin-bottom: 50px;
  font-size: 2rem;
  color: var(--noir);
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 25px;
}

/* Carte jour */
.day-card {
  background-color: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.day-card h3 {
  margin-bottom: 15px;
  font-size: 1.2rem;
  color: var(--jaune);
}

/* ESPACEMENT ENTRE LES ENTRAÎNEMENTS D'UN MÊME JOUR */
.day-card .session {
  margin-bottom: 12px;
}

/* Supprimer l'espace après la dernière session */
.day-card .session:last-child {
  margin-bottom: 0;
}

/* Session */
.session {
  background-color: #f7f7f7;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.9rem;
  background-color: #f7f7f7;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.9rem;
  transition: 
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease;
}

.session:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  background-color: #fff;
}

.session span {
  transition: transform 0.25s ease;
}

.session:hover span {
  transform: translateX(4px);
}

/* Disciplines */
.session.swim { border-left: 5px solid #1e90ff; }
.session.bike { border-left: 5px solid #f7c600; }
.session.run  { border-left: 5px solid #e74c3c; }
.session.Muscu { border-left: 5px solid #8e44ad; }

.session .time {
  font-weight: 600;
}

.session .title {
  font-weight: 700;
}

.session .place {
  font-size: 0.85rem;
  color: #666;
}

/* Jour OFF */
.off {
  color: #999;
  font-style: italic;
}

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


/* ================= PARTENAIRES ================= */
.partners {
  padding: 80px 60px;
  background-color: #f7f7f7;
  text-align: center;
}

.partners h2 {
  font-size: 2rem;
  margin-bottom: 40px;
  color: var(--noir);
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 30px;
  align-items: center;
  justify-items: center;
}

.partners-grid img {
  max-width: 100%;
  height: 60px;
  object-fit: contain;
  filter: grayscale(50%);
  transition: filter 0.3s, transform 0.3s;
  border-radius: 10%;
}

.partners-grid a:hover img {
  filter: grayscale(0%);
  transform: scale(1.1);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .partners {
    padding: 60px 20px;
  }

  .partners-grid img {
    height: 50px;
  }
}

.session-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.session-modal.active {
  display: flex;
}

.modal-content {
  position: relative; /* <-- essentiel pour que la croix reste cliquable */
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  animation: pop 0.3s ease;
}

@keyframes pop {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-content h3 {
  color: var(--jaune);
  margin-bottom: 15px;
}

.modal-content p {
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  z-index: 10; /* assure qu'elle reste au-dessus */
}

.news-text {
  display: block;
  display: -webkit-box;       /* Chrome, Safari, Edge */
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5em;         /* hauteur d’une ligne */
  max-height: calc(1.5em * 4); /* limite à 4 lignes */
  position: relative;
  word-break: break-word;     /* coupe les mots trop longs */
}

/* ajout des points de suspension */
.news-text::after {
  content: '…';
  position: absolute;
  bottom: 0;
  right: 0;
  padding-left: 5px;
  background: white;          /* ou la couleur du fond de la carte */
}

/* Désactive complètement le fond fixe sur mobile */
@media (max-width: 768px) {
  .hero {
    background: url("../img/baniere1.jpg") center center / cover no-repeat;
    background-attachment: scroll;
  }
}