/* RESET utile */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #f5f5f5;
  color: #222;
  font-family: system-ui, sans-serif;
  line-height: 1.6;
}

/* Mise en page générale */
main {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.text-green {
  color: #8dc63f;
}

/* Titres */
h1,
h2,
h3 {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 1px;
}

/* ================= */
/* ===== HERO ====== */
/* ================= */

.hero-image {
  width: 100%;
  height: 450px;
  background-image: url("images/groupe2.webp");
  background-size: cover;
  background-position: center -50px;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 2rem;
  position: relative;
}

.hero-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: white;
  text-align: center;
}

.hero-content h1 {
  font-size: 5rem;
}

.hero-subtitle {
  font-size: 2.5rem;
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 1px;
  margin-top: 0.5rem;
  color: #e0e0e0;
}

/* ========================= */
/* === SECTION INTRO TRAIL ==*/
/* ========================= */

.intro-trail {
  width: 100%;
  margin: 3rem 0;
  padding: 0 1rem;
}

.intro-wide {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 2rem 0;
}

.intro-text {
  flex: 1;
}

.intro-text h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.intro-text p {
  font-size: 1.15rem;
  line-height: 1.85;
  margin-bottom: 0.8rem;
}

/* IMAGE large à droite */
.intro-image-frame {
  flex: 0 0 40%;
  aspect-ratio: 5/5;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

.intro-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsive INTRO */
@media (max-width: 900px) {
  .intro-wide {
    flex-direction: column;
    text-align: center;
  }

  .intro-image-frame {
    width: 90%;
    max-width: 320px;
  }
}

/* ========================= */
/* ====== NOS COURSES ====== */
/* ========================= */

.courses-section {
  margin: 3rem 0 4rem;
}

.courses-title {
  font-size: 4rem;
  text-align: center;
  margin-bottom: 2.5rem;
}

.courses-title span {
  color: #8dc63f;
}

.course-card {
  background: #ffffff;
  border-radius: 32px;
  padding: 2.2rem 2.4rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  margin-bottom: 2.2rem;

  display: flex;
  flex-direction: column;
}

.course-content {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 1.8rem;
}

.course-left {
  flex: 1;
}

.course-right {
  flex: 1;
}

.course-left h3 {
  margin-top: 0;
  font-size: 3rem;
}

.course-distance-main {
  font-size: 1.1rem;
  font-weight: 600;
  color: #8dc63f;
  margin-bottom: 0.4rem;
}

.course-meta {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 0.8rem;
}

.course-meta span+span::before {
  content: "•";
  margin: 0 0.4rem;
}

.course-description {
  font-size: 0.98rem;
  color: #444;
  line-height: 1.7;
}

/* Carte GPX */
.course-map {
  width: 100%;
  height: 320px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background: #f0f0f0;
}

/* Boutons */
.course-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.course-btn {
  padding: 0.6rem 1.8rem;
  border-radius: 999px;
  border: 2px solid #8dc63f;
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  color: #8dc63f;
  font-size: 0.98rem;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.course-btn.primary {
  background: #8dc63f;
  color: #fff;
}

.course-btn:hover {
  transform: translateY(-1px);
}

.course-btn.primary:hover {
  background: #222;
}

.course-btn.secondary:hover {
  background: #f5f5f5;
}

.course-btn.small {
  padding: 0.4rem 1.1rem;
  font-size: 0.9rem;
}

.download-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

/* ========================= */
/* === INFOS PRATIQUES ===== */
/* ========================= */

.infos-pratiques {
  margin: 4rem 0;
}

.infos-container {
  display: flex;
  gap: 3rem;
  align-items: stretch;
}

.infos-image {
  flex: 0 0 35%;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  min-height: 400px;
}

.infos-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.infos-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.info-card {
  background: white;
  border-radius: 20px;
  padding: 1.8rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}

.info-card:hover {
  transform: translateY(-3px);
}

.info-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  background: #f0f9e8;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8dc63f;
}

.info-card h3 {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
  color: #222;
}

.info-card p,
.info-card li {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
}

.info-card ul {
  list-style: none;
  margin: 0.5rem 0;
  padding-left: 0.5rem;
}

.info-card li::before {
  content: "›";
  color: #8dc63f;
  font-weight: bold;
  margin-right: 0.5rem;
}

.info-sub {
  margin-top: 0.8rem;
  font-weight: 600;
  color: #8dc63f;
}

.info-note {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  font-style: italic;
  color: #777;
}

/* ============================= */
/* ======= RESPONSIVE ========== */
/* ============================= */

@media (max-width: 900px) {
  .course-content {
    flex-direction: column;
  }

  .course-right {
    width: 100%;
  }

  .course-map {
    height: 260px;
  }

  .infos-container {
    flex-direction: column;
  }

  .infos-image {
    height: 300px;
    min-height: auto;
  }
}

@media (max-width: 600px) {
  .hero-image {
    height: 300px;
    background-position: center;
  }

  .hero-content h1 {
    font-size: 2rem;
    line-height: 1.1;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .intro-text h2 {
    font-size: 2rem;
  }

  .courses-title {
    font-size: 3rem;
  }

  .course-left h3 {
    font-size: 2.4rem;
  }

  .course-card {
    padding: 1.7rem 1.6rem;
  }
}

/* Loading Spinner for Maps */
.course-map.loading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  margin-left: -15px;
  border: 3px solid #ddd;
  border-top-color: #8dc63f;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 10;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}