:root{
  --bg:#ffffff;
  --text:#1D1D1B;
  --border:#e7e7e7;
  --shadow: 0 16px 50px -18px rgba(29,29,27,.18);
  --red:#DC2A1C;
  --radius:18px;
  --max:1120px;
  --snow1:#ffffff;
  --snow2:#f6f7f8;
  --contactbg:#eceeef;
}
*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.6;
}
a{ color:var(--red); text-decoration:none; }
a:hover{ text-decoration:underline; }
.container{ max-width:var(--max); margin:0 auto; padding:0 20px; }

/* Hero */
.hero{ position:relative; height:92vh; min-height:640px; overflow:hidden; }
.hero-bg{
  position:absolute; inset:0;
  background: url("assets/hero.jpg");
  background-size:cover;
  background-position: center 70%; /* show more “lower” part (more skier if present) */
  transform:scale(1.02);
  opacity:.72;
}
.hero-overlay{
  position:absolute; inset:0;
  background:
    radial-gradient(1000px 600px at 50% 12%, rgba(255,255,255,.72) 0%, rgba(255,255,255,.28) 58%, rgba(255,255,255,.10) 100%),
    linear-gradient(180deg, rgba(29,29,27,.16) 0%, rgba(29,29,27,.08) 55%, rgba(29,29,27,.22) 100%);
  pointer-events:none;
}
.hero-content{
  position:relative; z-index:2; height:100%;
  display:flex; flex-direction:column; align-items:center; text-align:center;
}
.hero-spacer{ height:92px; }
.hero-logo{
  width:min(760px, 92vw);
  height:auto;
  filter: drop-shadow(0 18px 45px rgba(0,0,0,.10));
}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:999px; padding:12px 18px; font-weight:800;
  border:2px solid transparent;
  box-shadow: 0 10px 30px -18px rgba(0,0,0,.18);
}
.btn-outline{
  background: rgba(255,255,255,.92);
  color: var(--red);
  border-color: var(--red);
}
.btn-outline:hover{ text-decoration:none; filter:brightness(.98); }

/* Icon-only outline button same size as others */
.btn-outline-icon{
  width: 188px; /* roughly similar presence to text button */
  height: 46px;
  padding: 0;
}
.btn-outline-icon img{ width: 24px; height: 24px; display:block; }

/* Sections */
.section{ padding:64px 0; }
.section-snow{
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
  background:
    radial-gradient(800px 300px at 10% 10%, rgba(0,0,0,.03) 0%, rgba(0,0,0,0) 70%),
    radial-gradient(700px 260px at 90% 30%, rgba(0,0,0,.025) 0%, rgba(0,0,0,0) 72%),
    linear-gradient(180deg, var(--snow1) 0%, var(--snow2) 100%);
}
.section-contact{
  background: var(--contactbg);
  border-top: 1px solid rgba(0,0,0,.06);
}
html {
  scroll-padding-top: 90px;
} 
/* Headings */
.section-head{ margin-bottom:18px; }
.section-head.center{ text-align:center; margin-bottom:22px; }
.section-head h2{ margin:0; font-size:28px; line-height:1.15; letter-spacing:.01em; }
.heading-underline{
  width:44px; height:3px; background:var(--red);
  border-radius:999px;
  margin-top:10px;
}
.section-head.center .heading-underline{ margin-left:auto; margin-right:auto; }


/* About */
.about-long{ max-width: 90ch; margin: 0 auto 22px; color:#2a2a2a; font-size:16px; }
.about-long p{ margin: 0 0 14px; }
.about-long p:last-child{ margin-bottom:0; }

/* Values */
.values-images{
  display:grid;
  gap:14px;
  grid-template-columns: 1fr;
  align-items:stretch;
  margin-top: 26px;
}
.value-img{
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  padding:14px;
  box-shadow: var(--shadow);
  display:flex;
  align-items:center;
  justify-content:center;
}
.value-img img{ width:100%; max-width: 260px; height:auto; display:block; }
@media (min-width: 620px){
  .values-images{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .value-img img{ max-width: 240px; }
}
@media (min-width: 980px){
  .values-images{ grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .value-img img{ max-width: 210px; }
}
/* Mobile tweaks for values */
@media (max-width: 768px) {
  .values-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    justify-items: center;
  }

  .value-img {
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
  }

  .value-img img {
    width: 90%;
    height: auto;
  }

  /* Last icon centered on odd count */
  .value-img:last-child {
    grid-column: 1;
    justify-self: center;
  }
}

/* Cards */
.card{
  background:#fff; border:1px solid var(--border); border-radius:var(--radius);
  padding:20px; box-shadow: var(--shadow);
}
.card h3{ margin:0 0 8px; font-size:18px; }
.card-center{ text-align:center; }
.card-center h3{ text-align:center; }

/* Inscription */
.inscription-card{ max-width: 900px; margin: 0 auto; }
.lead{ margin:0 0 18px; color:#333; font-size:16px; }
.fees{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
  margin: 16px 0 22px;
}
.fee{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  background: rgba(0,0,0,.02);
}
.fee span{ font-weight:700; color:#222; }
.fee strong{ font-weight:900; color:#111; }
@media (min-width: 760px){
  .fees{ grid-template-columns: 1fr 1fr; }
}
.inscription-action{ text-align:center; }

/* Events */
.events-split{
  display: grid;
  gap: 18px;
  align-items: start;
  margin-top: 8px;

  /* Mobile layout (image first) */
  grid-template-columns: 1fr;
  grid-template-areas:
    "media"
    "list";
}

/* Assign grid areas */
.events-media{ grid-area: media; }
.events-list{ 
  grid-area: list;
  display:flex;
  flex-direction:column;
  gap:12px;
}

/* Event card styling (unchanged) */
.event{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px;
  box-shadow: var(--shadow);
}

.event-date{
  font-weight:900;
  color:var(--red);
  letter-spacing:.04em;
  text-transform:uppercase;
  font-size:12px;
}

.event h3{
  margin:8px 0 6px;
  font-size:18px;
}

.event-place{
  color:#333;
  font-weight:700;
}

.event-desc{
  margin:10px 0 0;
  color:#555;
  font-size:14px;
}

/* Media styling */
.events-media{
  border-radius:var(--radius);
  overflow:hidden;
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  background:#fff;
  max-height:320px;
}

.events-media img{
  width:100%;
  height:100%;
  max-height:320px;
  object-fit:cover;
  display:block;
}

/* Desktop layout */
@media (min-width: 980px){
  .events-split{
    grid-template-columns: 1.15fr .85fr;
    grid-template-areas: "list media";
    gap:22px;
  }

  .events-media{ max-height:360px; }
  .events-media img{ max-height:360px; }
}

/* Anchor stability fix (important) */
#evenements{
  scroll-margin-top: 80px; /* adjust to your mobile header height */
}

/* Committee */
.committee-grid{
  display:grid;
  gap:10px;
  grid-template-columns: 1fr;
  color:#222;
  font-size:14px;
}
@media (min-width: 860px){
  .committee-grid{ grid-template-columns: 1fr 1fr; }
}

/* Contact grid */
.contact-grid{ display:grid; gap:14px; grid-template-columns: 1fr; }
.contact-grid.centered{ align-items:stretch; }
.meta{ color:#555; font-size:14px; margin:0 0 14px; text-align:center; }
@media (min-width: 860px){
  .contact-grid{ grid-template-columns: 1fr 1fr; gap:18px; }
}

/* Footer */
.site-footer{ background:#111; color:#fff; padding:20px 0; }
.footer-inner{
  display:flex; flex-direction:column; gap:10px;
  align-items:flex-start; justify-content:space-between;
}
.footer-meta{ color:rgba(255,255,255,.72); font-size:13px; }
.footer-links a{ color:#fff; opacity:.80; font-weight:700; }
.footer-links a:hover{ opacity:1; text-decoration:none; }
@media (min-width: 860px){
  .footer-inner{ flex-direction:row; align-items:center; }
}


/* Unified outline button width */
:root{
  --outline-btn-width: 188px;
}
.btn-outline{
  min-width: var(--outline-btn-width);
}

/* Inscription buttons row */
.action-row{
  display:flex;
  gap:12px;
  justify-content:center;
  flex-wrap:wrap;
}
/* Contact / Instagram marks */
.contact-card .contact-mark {
  width: 120px;
  margin: 0 auto 12px;
  display: block;
}

.insta-card .insta-mark {
  width: 64px;
  margin: 6px auto 12px;
  display: block;
}
.is-hidden {
  display: none !important;
}
.events-placeholder-text {
  text-align: center;
  font-style: italic;
  color: #666;
  margin-top: 2rem;
}
.events-placeholder-text span {
  display: block;
  margin-top: 0.5rem;
  color: #888;
}




/* =============================
   Results Section (1–2–1 refined)
   ============================= */

/* Hero image */
.results-hero {
  max-width: 480px;
  margin: 0 auto 24px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.results-hero img {
  width: 100%;
  display: block;
}

/* Overall layout */
.results-layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Rows */
.results-row {
  width: 100%;
}

.results-row.single-row,
.results-row.double-row {
  display: flex;
  gap: 24px;
}

/* Cards */
.results-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  width: 100%;
}

/* Middle row: 2 cards */
.results-row.double-row .results-card {
  width: 50%;
}

/* Logos */
/* default for mobile */
.results-logo {
  display: block;
  max-height: 48px;
  margin: 0 auto 12px;
}

/* desktop: larger logos */
@media (min-width: 860px) {
  .results-logo {
    max-height: 64px;   /* increase from 48px */
  }
}
.podium-emoji {
  font-size: 1.4em;
  line-height: 1;
  vertical-align: text-bottom;
}

/* =============================
   PROS – centered block, same row layout
   ============================= */

.results-row.single-row:not(.juniors-row) .podium {
  max-width: 420px;
  margin: 0 auto;
}

.results-row.single-row:not(.juniors-row) .result-row {
  grid-template-columns: 1fr auto;
}

.results-row.single-row:not(.juniors-row) .result-event {
  text-align: right;
}


/* =============================
   Juniors 
   ============================= */

/* Juniors – stacked ranks with 2-column results */
.podium-juniors {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Rank block */
.junior-rank {
  display: flex;
  flex-direction: column;
  gap: 10px; /* existing gap */
  margin-bottom: 20px; /* space after each rank block */
}

/* Centered rank title */
.rank-title {
  text-align: center;
  font-weight: 800;
  font-size: 15px;
}

/* Two-column result grid per rank */
/* Junior results rows */
.rank-results {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* two columns */
  column-gap: 128px;   /* horizontal space between name/event combos */
  row-gap: 12px;      /* vertical space between rows */
}

.result-row {
  display: grid;
  grid-template-columns: 1fr auto; /* name left, event right */
  gap: 12px; /* horizontal gap between name and event */
  align-items: baseline;
}

/* Names and events same font size */
.result-name,
.result-event {
  font-size: 14px !important;  /* force same size */
  font-weight: 400;
  line-height: 1.3;
}


.result-event {
  text-align: right;
  white-space: nowrap; /* keep on one line */
}


/* Mobile: single column */
@media (max-width: 860px) {
  .rank-results {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 860px) {
  .result-name,
  .result-event {
    font-size: 15px;
  }
}

@media (max-width: 860px) {
  .result-name,
  .result-event {
    font-size: 14px;
  }
}

/* =============================
   Result rows
   ============================= */

.result-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: baseline;
}

.result-name {
  font-weight: 400; /* normal weight */
}

.result-event {
  font-size: 13px;
  color: #555;
  text-align: right;
  white-space: nowrap;
}

/* =============================
   Responsive
   ============================= */

@media (max-width: 860px) {
  .results-row.double-row {
    flex-direction: column;
  }

  .results-row.double-row .results-card {
    width: 100%;
  }

  .juniors-row .podium {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .result-row {
    gap: 8px;
  }

  .result-event {
    font-size: 12px;
  }
}


/* =============================
   Top-of-Hero Navigation
   ============================= */

/* Desktop */
.site-nav {

  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  padding: 14px 40px;
  background: transparent;
  z-index: 1000;
  gap: 24px;
}

.menu-links {
  display: flex;
  gap: 24px;
}

.menu-links a {
  color: var(--red);
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
}

.menu-links a:hover {
  text-decoration: underline;
}

/* Hamburger button */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 28px;
  color: var(--red);
  cursor: pointer;
  z-index: 1001;
}

/* Mobile */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    color: var(--red);
  }
.menu-links {
  z-index: 1090;
}

  .menu-links {
    position: fixed;
    top: 50px;           /* right under nav */
    right: 0;
    left: 0;
    background: rgba(255,255,255,0.95);
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    display: none;        /* hidden initially */
  }

  .menu-links.show {
    display: flex;        /* show on toggle */
  }

  .menu-links a {
    font-size: 18px;
    margin: 8px 0;
    text-align: center;
  }
}

/* =============================
   Supporters Section
   ============================= */
.supporters-blurb {
  text-align: center;
  font-style: italic;
  color: var(--red);
  margin-bottom: 16px;
}
.supporters-logos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
  margin-top: 24px;
  justify-items: center;
  align-items: center;
}

.supporters-logos a {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.supporters-logos img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  filter: grayscale(100%);
  opacity: 0.85;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.supporters-logos img.logo-square {
  max-height: 110%;  /* bump just the square ones */
}

/* subtle hover, still understated */
.supporters-logos a:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* Mobile */
@media (max-width: 1024px) {
  .supporters-logos {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .supporters-logos {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}

@media (max-width: 768px) {
  .supporters-logos a {
    height: 80px;
  }
}

  .supporters-logos img {
    max-height: 48px;
  }
/* =============================
   Page layout for sticky footer
   ============================= */
/* Sticky footer layout */
html, body {
  height: 100%;
  margin: 0;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* ensures wrapper fills the viewport */
}

main {
  flex: 1; /* pushes footer to the bottom if content is short */
}

.site-footer {
  /* optional styling */
  background: #2a2a2a;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.center {
  text-align: center;
}
/* Hybrid floating → fixed menu */
.site-nav.scrolled {
  position: fixed;        /* sticks to top */
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255,255,255,0.95); /* light background after scroll */
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
}

/* Links change color when scrolled */
.site-nav.scrolled .menu-links a {
  color: var(--red); /* dark text for contrast */
}

/* Hamburger toggle color when scrolled */
.site-nav.scrolled .menu-toggle {
  color: var(--red);
}

/* Optional: make floating links white again when not scrolled */
.site-nav .menu-links a {
  color: var(--red);
}
.site-nav .menu-toggle {
  color: var(--red);
}
/* Nav links hover - desktop and mobile */
.menu-links a:hover {
  color: #ff4a3a; /* slightly brighter red */
  text-decoration: underline; /* optional, gives feedback */
}
body.no-hero .site-nav {
  background: rgba(255,255,255,0.95);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.menu-toggle {
  position: relative;
  z-index: 1100;
  pointer-events: auto;
}
/* =============================
   Normalize results line spacing
   ============================= */

/* Applies to all result rows */
.results-row .result-row {
  line-height: 1.3;       /* consistent spacing between lines */
  margin-bottom: 4px;     /* small gap between rows */
}

/* Names and events same font size and weight across all categories */
.result-name,
.result-event {
  font-size: 14px !important;  /* force uniform size */
  font-weight: 400;
  line-height: 1.3;
}

/* For Juniors section rows specifically */
.junior-rank .rank-results .result-row {
  line-height: 1.3;
  margin-bottom: 4px;
}
/* --- New Event Layout Rules --- */

/* 1. Sets up the side-by-side layout for desktop */
.event-flex-container {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 15px;
}

/* 2. Styles the image without using "float" */
.event-img {
  width: 120px;
  height: auto;
  border-radius: 4px;
  flex-shrink: 0; /* Important: stops the image from getting squished */
}

/* 3. The text area */
.event-body {
  flex-grow: 1;
}

/* 4. Centers the button specifically under the text column */
.event-button-wrapper {
  margin-top: 20px;
  width: 100%;
  display: flex !important;
  justify-content: center !important;
}

.event-button-wrapper .btn {
  margin: 0 !important;
  max-width: 200px; /* Adjust as needed */
}

/* 5. MOBILE FIX: Stacks everything when the screen is narrow */
@media (max-width: 600px) {
  .event-flex-container {
    flex-direction: column; /* Moves image above text */
    align-items: center;    /* Centers everything horizontally */
    text-align: center;     /* Centers the text for a better mobile look */
  }

  .event-img {
    margin-bottom: 15px;
    width: 140px; /* Slightly bigger on mobile to fill the space */
  }
}