:root {
  --bg: #f6f1df;
  --surface: #fffdf5;
  --text: #1c2d47;
  --muted: #5a6780;
  --primary: #17375f;
  --secondary: #ccae63;
  --accent: #8f6fc6;
  --border: #dde3ee;
  --shadow: 0 12px 28px rgba(16, 34, 62, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Barlow", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  width: min(1100px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.section {
  padding: 4.5rem 0;
}

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

.section-contrast {
  background: linear-gradient(180deg, #eef3fb 0%, #f4f7fd 100%);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  margin-bottom: 1.25rem;
}

p {
  margin-top: 0;
  margin-bottom: 0.9rem;
}

.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-carousel {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-stamp-shell {
  position: absolute;
  z-index: 1;
  width: min(34vw, 320px);
  aspect-ratio: 1 / 1;
  bottom: -4.8rem;
  right: -2.8rem;
  background: #f6f1df;
  border-radius: 999px;
  display: grid;
  place-items: start;
  padding: 0.75rem;
  pointer-events: none;
  overflow: hidden;
}

.hero-stamp {
  width: 88%;
  height: 88%;
  object-fit: contain;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(11, 25, 44, 0.58), rgba(11, 25, 44, 0.35));
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fefefe;
  text-align: left;
}

.eyebrow {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.16);
  padding: 0.45rem 0.65rem;
  border-radius: 0.45rem;
}

h1 {
  font-size: clamp(2.6rem, 7.5vw, 5.4rem);
  margin: 0.8rem 0;
}

.hero-subtitle {
  max-width: 28ch;
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
}

.hero-date {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.8rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.btn-primary {
  background: var(--secondary);
  color: #112444;
}

.btn-secondary {
  background: var(--primary);
  color: #f6f8fc;
}

.quick-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(8px);
  background: rgba(246, 241, 223, 0.82);
  border-bottom: 1px solid rgba(23, 55, 95, 0.2);
}

.nav-items {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  padding: 0.8rem 0;
}

.nav-items a {
  white-space: nowrap;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.nav-items a:hover,
.nav-items a:focus-visible {
  color: #041833;
  text-decoration: underline;
}

.intro-text {
  font-size: 1.08rem;
  max-width: 78ch;
}

.project-layout {
  display: block;
}

.project-side {
  position: sticky;
  top: 5.6rem;
  border-radius: 1rem;
  border: 1px solid rgba(23, 55, 95, 0.2);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.project-side img {
  width: 100%;
  height: auto;
  display: block;
}

.signature {
  font-weight: 700;
  color: var(--primary);
}

.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.2rem;
  align-items: start;
}

.support-card {
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.support-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.support-logo-circle {
  width: clamp(220px, 24vw, 300px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: #f3ead2;
  border: 4px solid #e1cf9b;
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.support-logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kicker {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 0.9rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.race-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.race-card.route-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(23, 55, 95, 0.24), var(--shadow);
}

.race-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.distance {
  font-size: 1.25rem;
  font-weight: 800;
}

.route-btn {
  border: 1px solid rgba(23, 55, 95, 0.3);
  border-radius: 999px;
  background: #f7fbff;
  color: var(--primary);
  font-weight: 700;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.route-btn:hover,
.route-btn:focus-visible {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.race-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.route-info-link {
  text-align: center;
  border: 1px solid rgba(23, 55, 95, 0.3);
  border-radius: 999px;
  background: #ffffff;
  color: var(--primary);
  font-weight: 700;
  padding: 0.55rem 0.8rem;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.route-info-link {
  text-decoration: none;
}

.route-info-link:hover,
.route-info-link:focus-visible {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.route-display {
  --route-connector-left: 50%;
  margin-top: 0.25rem;
  background: #ffffff;
  border-radius: 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.route-display.route-display-linked {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(23, 55, 95, 0.22), var(--shadow);
  position: relative;
}

.route-display.route-display-linked::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-left: 2px solid var(--primary);
  border-top: 2px solid var(--primary);
  transform: translateX(-50%) rotate(45deg);
  top: -10px;
  left: var(--route-connector-left);
  border-top-left-radius: 3px;
}

.route-display-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
  margin-bottom: 0.7rem;
  color: var(--primary);
}

.route-display-description {
  margin: 0 0 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

.route-display img {
  width: 100%;
  border-radius: 0.8rem;
  border: 1px solid rgba(23, 55, 95, 0.18);
}

.route-display-fallback {
  margin-top: 0.35rem;
  color: var(--muted);
}

.race-red {
  border-top: 6px solid #d64949;
}
.race-blue {
  border-top: 6px solid #2f74cf;
}
.race-green {
  border-top: 6px solid #3a9d66;
}
.race-yellow {
  border-top: 6px solid #d5ab2e;
}
.race-white {
  border-top: 6px solid #c0c6d1;
}

.section-subtitle {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  color: var(--muted);
}

.team-carousel-controls {
  display: none;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.team-card {
  background: #ffffff;
  border-radius: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-width: 0;
  align-self: start;
}

.team-card-content {
  position: relative;
}

.team-card.team-card-collapsed .team-card-content {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

.team-card.team-card-collapsed .team-card-content::after {
  content: "...";
  position: absolute;
  right: 0.1rem;
  bottom: 0;
  padding-left: 0.3rem;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #ffffff 55%);
  color: var(--primary);
  font-weight: 700;
}

.team-card-toggle {
  margin-top: 0.7rem;
  border: 1px solid rgba(23, 55, 95, 0.32);
  border-radius: 999px;
  background: #f7fbff;
  color: var(--primary);
  font-weight: 700;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}

.team-photo-placeholder {
  width: 112px;
  height: 112px;
  border-radius: 999px;
  overflow: hidden;
  margin: 0 auto 0.75rem;
  background: #e9eef7;
  border: 2px solid rgba(23, 55, 95, 0.22);
}

.team-photo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.team-photo-charlotte img {
  object-position: center 37%;
}

.team-photo-angelique img {
  object-position: center 4%;
  transform: scale(1.08) translateX(4px);
}

.team-photo-marine img {
  object-position: center 18%;
}

.team-photo-amelie img {
  object-position: center 6%;
}

.team-photo-mathilde img {
  object-position: center 26%;
}

.team-photo-marion img {
  object-position: center 19%;
}

.team-photo-virginie img {
  object-position: center 10%;
}

.team-photo-laurie img {
  object-position: center 62%;
}

.meta {
  font-weight: 600;
  color: var(--muted);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.values-grid article {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1rem;
}

.value-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eef3fb;
  color: var(--primary);
  font-size: 1.1rem;
  margin: 0 auto 0.55rem;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.partner-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1rem;
}

.partner-extra {
  position: relative;
}

.partner-extra.partner-extra-collapsed {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

.partner-extra.partner-extra-collapsed::after {
  content: "...";
  position: absolute;
  right: 0.1rem;
  bottom: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #ffffff 55%);
  padding-left: 0.35rem;
  color: var(--primary);
  font-weight: 700;
}

.partner-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.65rem;
  justify-content: center;
}

.partner-actions .btn {
  margin-top: 0;
  font-family: "Barlow", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.2;
}

.partner-toggle:hover {
  cursor: pointer;
}

.logo-placeholder {
  margin-bottom: 0.65rem;
  border-radius: 0.6rem;
  overflow: hidden;
  border: 1px solid rgba(23, 55, 95, 0.14);
  background: #ffffff;
}

.logo-placeholder img {
  width: 100%;
  height: 96px;
  object-fit: contain;
  object-position: center;
  display: block;
}

.logo-placeholder-index img {
  transform: scale(1.38);
  transform-origin: center;
}

.logo-placeholder-multi img {
  transform: scale(0.9);
  transform-origin: center;
}

blockquote {
  margin: 0;
  font-style: italic;
  color: var(--muted);
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.story-gallery {
  display: block;
}

.reco-carousel {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  height: 420px;
}

.reco-side-label {
  background: linear-gradient(180deg, #17375f 0%, #254c7c 100%);
  color: #f8fbff;
  padding: 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  border-right: 3px solid #0a1f3d;
  z-index: 1;
}

.reco-side-label p {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
  color: #f8fbff;
}

.reco-side-label small {
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.9;
  color: #f8fbff;
}

.reco-main {
  position: relative;
  background: #edf2f9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem;
  overflow: hidden;
}

.reco-main img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.reco-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.3rem;
  height: 2.3rem;
  border: 0;
  border-radius: 999px;
  background: rgba(12, 29, 53, 0.78);
  color: #ffffff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.reco-nav-prev {
  left: 0.7rem;
}

.reco-nav-next {
  right: 0.7rem;
}

.center {
  text-align: center;
}

.hashtag {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.social-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
}

.social-links a {
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(23, 55, 95, 0.22);
  border-radius: 999px;
  text-decoration: none;
  background: #ffffff;
}

.final-line {
  font-size: 1.3rem;
  font-family: "Fraunces", Georgia, serif;
}

.footer-links {
  margin-top: 1.1rem;
}

.footer-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  text-decoration: underline;
}

.copyright {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.seo-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1000px) {
  .project-side {
    position: static;
    max-width: 420px;
    margin: 0 auto;
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .values-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .partners-grid {
    grid-template-columns: 1fr;
  }

  .story-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .support-side {
    align-items: center;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 3.4rem 0;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-stamp-shell {
    display: none;
  }

  .hero-content {
    text-align: center;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  #trail-support .btn-secondary {
    display: table;
    margin: 1rem auto 0;
  }

  .route-display {
    margin-top: 0.75rem;
  }

  .route-display.route-display-linked::before {
    display: none;
  }

  .route-display.route-display-inline {
    margin-top: 0.65rem;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(23, 55, 95, 0.22), var(--shadow);
  }

  .team-carousel-controls {
    display: flex;
    gap: 0.55rem;
    margin-bottom: 0.75rem;
  }

  .carousel-btn {
    border: 1px solid rgba(23, 55, 95, 0.4);
    background: #fff;
    color: var(--primary);
    border-radius: 0.5rem;
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.1rem;
    cursor: pointer;
  }

  .team-grid {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 92%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 0.1rem;
    padding-bottom: 0.3rem;
    touch-action: auto;
  }

  .team-card {
    scroll-snap-align: start;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .story-gallery {
    display: block;
  }

  .reco-carousel {
    grid-template-columns: 1fr;
    height: 360px;
  }

  .reco-side-label {
    text-align: center;
    padding: 0.85rem;
    border-right: 0;
    border-bottom: 3px solid #0a1f3d;
  }

  .reco-main img {
    max-width: 100%;
    max-height: 100%;
  }
}
