:root {
  --font-base: 'Montserrat', sans-serif;
  --color-primary: #fba765; /* Cozy Nook */
  --color-secondary: #9c7aea; /* Transporter Green */
  --color-highlight: #b81373; /* Tyrian Purple */
  --color-tertiary: #765a3f; /* X Marks the Spot */
  --color-dark: #102c33; /* Black Chasm */
  --color-light: #f1efe8; /* Fuji Snow */
  --color-muted: rgba(241, 239, 232, 0.82);
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-base);
  color: var(--color-dark);
  background-color: var(--color-light);
  scroll-behavior: smooth;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.section {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 6rem 2.5rem;
  background: var(--color-light);
}

[data-reveal].is-hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 1s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-light {
  background: var(--color-light);
}

.section-dark {
  background-color: #1a1a1a;
  color: var(--color-light);
}

.section-dark .section-title {
  color: var(--color-light);
}

.section-dark .section-lead {
  color: rgba(241, 239, 232, 0.85);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
  color: var(--color-secondary);
}

.section-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin-bottom: 2.25rem;
}

.section-title {
  font-size: clamp(2.3rem, 5vw, 3.25rem);
  margin: 0;
  color: var(--color-dark);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  margin-top: 0.9rem;
  width: 140px;
  height: 4px;
  border-radius: 999px;
  background: rgba(109, 79, 181, 0.9);
}

.section-heading.accent-primary .section-title {
  color: var(--color-primary);
}

.section-heading.accent-primary .section-title::after {
  background: rgba(251, 167, 101, 0.9);
}

.section-lead {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  line-height: 1.7;
  margin-bottom: 3rem;
  color: rgba(28, 27, 33, 0.8);
}

.distance {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

.depart {
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hero {
  position: relative;
  height: 100vh;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--color-dark);
  background-image: linear-gradient(rgba(16, 44, 51, 0.6), rgba(16, 44, 51, 0.6)),
    url('backgroundimage.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero .overlay {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 1.5rem;
}

.hero h1 {
  font-size: clamp(2.75rem, 7vw, 5rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: #fff;
}

.hero p {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  margin-bottom: 2rem;
  color: var(--color-muted);
}

.hero-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.hero-actions .cta {
  min-width: 160px;
  padding: 1.12rem 1.75rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 30px rgba(16, 44, 51, 0.22);
  backdrop-filter: blur(6px);
}

.hero-actions .cta:not(.ghost) {
  background: linear-gradient(135deg, rgba(251, 167, 101, 0.98), rgba(251, 141, 88, 0.96));
  color: #fff;
}

.hero-actions .cta.ghost {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
}

.hero-actions .cta:hover,
.hero-actions .cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(16, 44, 51, 0.28);
}

.hero-media-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 180px));
  justify-content: center;
  gap: 1rem;
}

.hero-media-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  box-shadow: 0 14px 30px rgba(16, 44, 51, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.hero-media-button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  width: 100%;
  font: inherit;
  cursor: pointer;
  text-align: inherit;
}

.hero-media-card:hover,
.hero-media-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(16, 44, 51, 0.28);
  background: rgba(255, 255, 255, 0.16);
}

.hero-media-thumb {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.hero-media-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
}

.hero-scroll {
  position: absolute;
  bottom: 3.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero-scroll:hover {
  opacity: 1;
  transform: translateX(-50%) translateY(-3px);
}

.hero-scroll-chevron {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.85);
  border-right: 2px solid rgba(255, 255, 255, 0.85);
  transform: rotate(45deg);
  animation: heroChevron 1.6s ease-in-out infinite;
}

@keyframes heroChevron {
  0%,
  100% {
    transform: rotate(45deg) translateY(0);
  }
  50% {
    transform: rotate(45deg) translateY(4px);
  }
}


.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  border-radius: 14px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cta:hover,
.cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(251, 167, 101, 0.32);
}

.cta.ghost {
  background: transparent;
  border: 2px solid rgba(241, 239, 232, 0.7);
  color: var(--color-light);
  backdrop-filter: blur(2px);
}

.parcours-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.parcours-card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border-radius: 18px;
  padding: 2.35rem 2.25rem 2.25rem;
  border: 1px solid rgba(16, 44, 51, 0.08);
  box-shadow: 0 18px 42px rgba(16, 44, 51, 0.16);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.parcours-card::before {
  content: '';
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 6px;
  border-radius: 999px;
  background: rgba(109, 79, 181, 0.88);
  box-shadow: 0 10px 22px rgba(109, 79, 181, 0.22);
}

.parcours-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 50px rgba(16, 44, 51, 0.2);
}

.parcours-card .parcours-img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 14px 28px rgba(16, 44, 51, 0.12);
}

.parcours-card .parcours-img-link {
  display: block;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 12px;
}

.parcours-card .parcours-img-link:focus-visible {
  outline: 3px solid rgba(109, 79, 181, 0.6);
  outline-offset: 6px;
}

.parcours-card h3 {
  margin-top: 0;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--color-dark);
}

.parcours-card .distance {
  font-weight: 600;
  color: rgba(109, 79, 181, 0.95);
  margin-bottom: 1.1rem;
}

.parcours-card p {
  margin: 0 0 1.1rem;
  line-height: 1.65;
  color: rgba(16, 44, 51, 0.82);
}

.parcours-card .ages {
  margin-top: 1.4rem;
  font-size: 0.95rem;
  color: rgba(16, 44, 51, 0.6);
  font-style: italic;
}

.parallax {
  position: relative;
  overflow: hidden;
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
}

.parallax::before {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  will-change: transform;
  transform: translate3d(0, var(--parallax-offset, 0), 0);
  z-index: 0;
}

.parallax .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 79, 84, 0.42),
    rgba(16, 44, 51, 0.48)
  );
  z-index: 1;
}

.parallax-soft {
  position: relative;
  color: #fff;
  background: none;
}

.parallax-soft::before {
  content: none;
}

.parallax-soft .section-inner {
  position: relative;
  z-index: 2;
}

.parallax-soft h2 {
  color: var(--color-primary);
}

.parallax-soft .section-lead {
  color: rgba(241, 239, 232, 0.88);
}

.inscriptions-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.inscriptions-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate3d(0, var(--parallax-offset, 0), 0);
}

.inscriptions-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
      180deg,
      rgba(16, 44, 51, 0.25) 0%,
      rgba(16, 44, 51, 0.7) 100%
    );
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.media-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}


.media-card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border-radius: 18px;
  padding: 2.35rem 2.25rem 2.25rem;
  border: 1px solid rgba(16, 44, 51, 0.08);
  box-shadow: 0 18px 42px rgba(16, 44, 51, 0.16);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media-card::before {
  content: '';
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 6px;
  border-radius: 999px;
  background: rgba(251, 167, 101, 0.88);
  box-shadow: 0 10px 22px rgba(251, 167, 101, 0.22);
}

.media-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 50px rgba(16, 44, 51, 0.2);
}

.media-card .media-thumb-link {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(16, 44, 51, 0.15);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.media-card .media-thumb-link:focus-visible {
  outline: 3px solid rgba(251, 167, 101, 0.9);
  outline-offset: 6px;
}

.media-card .media-thumb {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.media-card .media-thumb-link:hover .media-thumb,
.media-card .media-thumb-link:focus-visible .media-thumb {
  transform: scale(1.04);
}

.media-card .media-thumb-link:hover,
.media-card .media-thumb-link:focus-visible {
  box-shadow: 0 18px 40px rgba(16, 44, 51, 0.24);
  transform: translateY(-4px);
}

.media-card .media-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(16, 44, 51, 0) 55%, rgba(16, 44, 51, 0.25) 100%);
}

.media-card .media-play::before {
  content: '';
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(16, 44, 51, 0.18);
}

.media-card .media-play::after {
  content: '';
  position: absolute;
  border-style: solid;
  border-width: 6px 0 6px 9px;
  border-color: transparent transparent transparent rgba(16, 44, 51, 0.75);
  transform: translateX(1.5px);
}

.media-card h3 {
  margin: 0;
  color: #171717;
}

/* Informations Pratiques */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.info-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 2.35rem 2.25rem 2.25rem;
  border: 1px solid rgba(16, 44, 51, 0.08);
  box-shadow: 0 18px 42px rgba(16, 44, 51, 0.16);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 50px rgba(16, 44, 51, 0.2);
}

.info-card h3 {
  color: var(--secondary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 1rem;
}

.info-card h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.info-card p {
  color: rgba(28, 27, 33, 0.8);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.info-card .consignes-intro {
  flex-grow: 0;
  margin-bottom: 0.5rem;
}

.info-card .consignes-list {
  margin: 0;
  padding-left: 1.4rem;
}

.info-card .consignes-list li {
  color: rgba(28, 27, 33, 0.8);
  margin-bottom: 0.45rem;
}

.info-card ul {
  margin: 0;
  padding-left: 1.4rem;
}

.info-card li {
  color: rgba(28, 27, 33, 0.8);
  margin-bottom: 0.45rem;
}

.info-card > p + ul {
  flex-grow: 0;
  margin-top: -0.75rem;
}

.info-card .cta {
  align-self: flex-start;
  margin-top: auto;
}

.info-img-link {
  display: block;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  margin-bottom: 1.5rem;
  border-radius: 12px;
}

.info-img-link:focus-visible {
  outline: 3px solid rgba(109, 79, 181, 0.6);
  outline-offset: 6px;
}

.info-img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(16, 44, 51, 0.12);
  transition: transform 0.3s ease;
}

.info-img-link:hover .info-img {
  transform: scale(1.02);
}

.parking-links {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.parking-links li {
  margin-bottom: 0.75rem;
  color: #4a4a55;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.parking-links a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
  font-size: 0.9rem;
}

.parking-links a:hover {
  color: var(--secondary);
}

.repas-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.repas-list li {
  color: #4a4a55;
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.repas-list li::before {
  content: '•';
  color: var(--primary);
  position: absolute;
  left: 0;
  font-weight: bold;
}

.site-footer {
  padding: 2rem 1.5rem 3rem;
  text-align: center;
  background: var(--color-secondary);
  color: rgba(241, 239, 232, 0.85);
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal[aria-hidden='false'] {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 44, 51, 0.65);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  background: var(--color-light);
  padding: 1.5rem;
  border-radius: 16px;
  max-width: min(90vw, 900px);
  width: 100%;
  box-shadow: 0 40px 60px rgba(16, 44, 51, 0.3);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.modal-dialog img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(80vh, 700px);
  border-radius: 12px;
}

.modal-caption {
  margin: 0;
  font-weight: 600;
  color: var(--color-secondary);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--color-secondary);
  color: #fff;
  border: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: var(--color-primary);
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .section {
    min-height: unset;
    padding: 5rem 1.75rem;
  }

  .parallax::before {
    background-attachment: scroll;
  }
}

@media (max-width: 600px) {
  .hero {
    background-attachment: scroll;
    background-position: 70% center;
  }

  .section {
    padding: 4.5rem 1.25rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .hero-media-grid {
    grid-template-columns: repeat(2, minmax(125px, 150px));
    gap: 0.85rem;
  }

  .hero-content {
    padding: 0 1rem;
  }

  .cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .inscriptions-video {
    object-position: left center;
  }
}

@supports (-webkit-touch-callout: none) {
  /* iOS Safari parallax fallback */
  .parallax::before,
  .hero {
    background-attachment: scroll;
  }
}
