/* =============================================================================
   La Course des Saveurs de Genève — Système de design
   DA UMG (terroir, vert, gourmand) × structure Wings for Life (moderne, sportif)
   ============================================================================= */

/* ── Polices auto-hébergées ─────────────────────────────────────────────── */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/inter-400.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/inter-ext-400.woff2') format('woff2');
  unicode-range: U+0100-02AF,U+1E00-1E9F,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/assets/fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/inter-600.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+20AC,U+2122,U+2212;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/inter-ext-600.woff2') format('woff2');
  unicode-range: U+0100-02AF,U+1E00-1E9F,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/assets/fonts/inter-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/fraunces-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 900; font-display: swap;
  src: url('/assets/fonts/fraunces-900.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+20AC;
}
@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 900; font-display: swap;
  src: url('/assets/fonts/fraunces-ext-900.woff2') format('woff2');
  unicode-range: U+0100-02AF,U+1E00-1E9F,U+2C60-2C7F,U+A720-A7FF;
}

/* ── Jetons de design ───────────────────────────────────────────────────── */
:root {
  --green-900: #12301d;
  --green-800: #18402a;
  --green-700: #1b4d2e;
  --green-600: #2f6f3e;
  --green-500: #3c8a4d;
  --leaf: #7cb342;
  --leaf-soft: #a7d28a;
  --carotte: #f2792b;
  --tomate: #e23b2e;
  --beet: #b23a6a;
  --cream: #f7f4ec;
  --cream-2: #efe7d6;
  --paper: #fffdf8;
  --ink: #1c241f;
  --muted: #5d675f;
  --line: #e2dccb;
  --white: #ffffff;

  --accent-tomate: var(--tomate);
  --accent-carotte: var(--carotte);
  --accent-feuille: var(--leaf);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --container: 1180px;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 10px rgba(18, 48, 29, 0.06);
  --shadow: 0 16px 40px -18px rgba(18, 48, 29, 0.28);
  --shadow-lg: 0 30px 70px -28px rgba(18, 48, 29, 0.4);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--green-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.2rem);
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--green-700); color: #fff; padding: 0.6rem 1rem;
  border-radius: 0 0 10px 10px; z-index: 200; transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── Typographie ────────────────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-display); font-weight: 900; line-height: 1.05; letter-spacing: -0.01em; }
.display {
  font-size: clamp(2.6rem, 7vw, 5rem);
  letter-spacing: -0.025em;
}
.section-title { font-size: clamp(2rem, 4.5vw, 3.1rem); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 700; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--green-600);
}
.eyebrow::before { content: ''; width: 26px; height: 2px; background: var(--leaf); border-radius: 2px; }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 60ch; }

/* ── Boutons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.95rem 1.6rem; border: 2px solid transparent; border-radius: 999px;
  font-weight: 700; font-size: 1rem; line-height: 1; cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background-color 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--green-600); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--green-700); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-accent { background: var(--carotte); color: #3a1c06; box-shadow: var(--shadow); }
.btn-accent:hover { background: #ff8a3d; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-ghost { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.5); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.22); border-color: #fff; }
.btn-outline { background: transparent; color: var(--green-700); border-color: var(--green-600); }
.btn-outline:hover { background: var(--green-600); color: #fff; }
.btn-lg { padding: 1.1rem 2rem; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ── En-tête / navigation ───────────────────────────────────────────────── */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background-color 0.3s, box-shadow 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header .nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 74px; gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 900; font-size: 1.18rem; color: #fff; }
.brand .logo-mark { width: 38px; height: 38px; flex: none; }
/* Logo officiel Côté Jardin / UMG sur pastille blanche (lisible sur tous fonds). */
.brand-logo { height: 40px; width: auto; flex: none; background: #fff; border-radius: 9px; padding: 5px 9px; box-shadow: 0 2px 8px rgba(18, 48, 29, 0.18); }
.brand-logo.sm { height: 34px; padding: 4px 7px; border-radius: 8px; }
.brand small { display: block; font-family: var(--font-body); font-weight: 600; font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a { color: #fff; font-weight: 600; font-size: 0.95rem; opacity: 0.92; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }
.nav-actions { display: flex; align-items: center; gap: 0.7rem; }

.site-header.scrolled { background: rgba(247, 244, 236, 0.92); backdrop-filter: saturate(140%) blur(10px); box-shadow: var(--shadow-sm); border-color: var(--line); }
.site-header.scrolled .brand,
.site-header.scrolled .nav-links a { color: var(--ink); }
.site-header.scrolled .brand small { opacity: 0.7; }
.site-header.scrolled .btn-ghost { background: transparent; color: var(--green-700); border-color: var(--green-600); }
.site-header.scrolled .btn-ghost:hover { background: var(--green-600); color: #fff; }

.nav-toggle { display: none; background: none; border: 0; padding: 0.4rem; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: currentColor; border-radius: 2px; margin: 5px 0; transition: 0.25s; }
/* Masqué par défaut (desktop) ; n'apparaît qu'en mobile via la media query. */
.mobile-menu { display: none; }
.site-header { color: #fff; }
.site-header.scrolled { color: var(--ink); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  color: #fff; padding: 120px 0 70px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(124, 179, 66, 0.5), transparent 55%),
    radial-gradient(120% 120% at 0% 110%, rgba(242, 121, 43, 0.35), transparent 55%),
    linear-gradient(160deg, #1c4a2c 0%, #12301d 60%, #0f2718 100%);
}
.hero-veg { position: absolute; inset: 0; pointer-events: none; opacity: 0.5; }
.hero-veg svg { position: absolute; }
.hero-grid { position: relative; z-index: 2; display: grid; gap: 2rem; }
.hero-eyebrow { color: var(--leaf-soft); }
.hero h1 { margin: 1.1rem 0 1.3rem; max-width: 16ch; }
.hero h1 .tint { color: var(--leaf-soft); }
.hero-lead { color: rgba(255, 255, 255, 0.86); font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 52ch; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.6rem 0 1.9rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 0.5rem 0.95rem; border-radius: 999px; font-weight: 600; font-size: 0.92rem;
  backdrop-filter: blur(4px);
}
.chip svg { width: 18px; height: 18px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* Compte à rebours */
.countdown { display: flex; gap: 0.7rem; margin-top: 2.2rem; }
.countdown .cd-unit {
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm); padding: 0.7rem 0.9rem; min-width: 68px; text-align: center;
  backdrop-filter: blur(4px);
}
.countdown .cd-num { font-family: var(--font-display); font-weight: 900; font-size: 1.9rem; line-height: 1; }
.countdown .cd-lbl { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.8; margin-top: 0.35rem; }

.scroll-cue { position: absolute; left: 50%; bottom: 1.4rem; transform: translateX(-50%); z-index: 3; color: rgba(255,255,255,0.7); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.scroll-cue .dot { width: 22px; height: 34px; border: 2px solid rgba(255,255,255,0.5); border-radius: 12px; position: relative; }
.scroll-cue .dot::after { content:''; position:absolute; left:50%; top:7px; width:4px; height:7px; background:#fff; border-radius:2px; transform:translateX(-50%); animation: cue 1.6s infinite; }
@keyframes cue { 0%{opacity:0; transform:translate(-50%,0);} 30%{opacity:1;} 100%{opacity:0; transform:translate(-50%,10px);} }

/* ── Sections génériques ────────────────────────────────────────────────── */
section { position: relative; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head .lead { margin-top: 0.9rem; }
.bg-paper { background: var(--paper); }
.bg-cream2 { background: var(--cream-2); }
.bg-green { background: linear-gradient(160deg, #1c4a2c, #12301d); color: #fff; }
.bg-green .lead, .bg-green .eyebrow { color: rgba(255,255,255,0.8); }
.bg-green .eyebrow { color: var(--leaf-soft); }

/* ── Bande de statistiques ──────────────────────────────────────────────── */
.stats {
  margin-top: -2.5rem; position: relative; z-index: 5;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
}
.stat { background: var(--paper); padding: 1.8rem 1.4rem; text-align: center; }
.stat .num { font-family: var(--font-display); font-weight: 900; font-size: clamp(2rem, 4vw, 2.9rem); color: var(--green-700); line-height: 1; }
.stat .lbl { margin-top: 0.5rem; color: var(--muted); font-weight: 600; font-size: 0.9rem; }

/* ── Cartes de courses ──────────────────────────────────────────────────── */
.races-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.race-card {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.8rem 1.6rem 1.7rem; display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  overflow: hidden;
}
.race-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--accent, var(--green-500)); }
.race-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.race-card .badge {
  align-self: flex-start; background: color-mix(in srgb, var(--accent) 16%, white);
  color: color-mix(in srgb, var(--accent) 72%, black); font-weight: 700; font-size: 0.74rem;
  text-transform: uppercase; letter-spacing: 0.08em; padding: 0.35rem 0.7rem; border-radius: 999px;
}
.race-card h3 { font-size: 1.5rem; margin: 0.9rem 0 0.2rem; }
.race-card .distance { font-family: var(--font-display); font-weight: 900; font-size: 3rem; color: var(--accent); line-height: 1; margin: 0.5rem 0 0.3rem; }
.race-card .summary { color: var(--muted); font-size: 0.96rem; margin: 0.6rem 0 1.1rem; }
.race-card .race-highlights { display: grid; gap: 0.5rem; margin-bottom: 1.2rem; }
.race-card .race-highlights li { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.92rem; }
.race-card .race-highlights li svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--accent); }
.race-card .race-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.race-card .price { font-weight: 800; color: var(--ink); }
.race-card .price small { display:block; font-weight:600; color: var(--muted); font-size: 0.72rem; }

/* ── Ateliers / parcours ────────────────────────────────────────────────── */
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.atelier-list { display: grid; gap: 1rem; }
.atelier {
  display: flex; gap: 1rem; align-items: flex-start; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-sm); transition: transform 0.25s var(--ease);
}
.atelier:hover { transform: translateX(4px); }
.atelier .ic { width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--leaf) 22%, white); }
.atelier .ic svg { width: 30px; height: 30px; }
.atelier h4 { font-family: var(--font-body); font-weight: 700; font-size: 1.05rem; }
.atelier p { color: var(--muted); font-size: 0.92rem; }

.team-teaser {
  background: linear-gradient(165deg, #20512f, #133622); color: #fff;
  border-radius: var(--radius-lg); padding: clamp(1.8rem, 4vw, 2.6rem); box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.team-teaser .eyebrow { color: var(--leaf-soft); }
.team-teaser h3 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0.7rem 0 0.6rem; }
.team-teaser p { color: rgba(255,255,255,0.85); margin-bottom: 1.4rem; }
.team-teaser .steps { display: grid; gap: 0.7rem; margin-bottom: 1.6rem; }
.team-teaser .steps li { display: flex; gap: 0.7rem; align-items: center; }
.team-teaser .steps .n { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--leaf); color: #11331c; font-weight: 800; display: grid; place-items: center; font-size: 0.85rem; }

/* ── Sélecteur « Trouvez votre course » ─────────────────────────────────── */
.finder { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.6rem, 4vw, 2.4rem); box-shadow: var(--shadow); }
.finder-q { margin-bottom: 1.4rem; }
.finder-q p { font-weight: 700; margin-bottom: 0.7rem; }
.opt-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.opt {
  border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 0.6rem 1.1rem;
  font-weight: 600; transition: 0.2s; color: var(--ink);
}
.opt:hover { border-color: var(--leaf); }
.opt[aria-pressed='true'] { border-color: var(--green-600); background: var(--green-600); color: #fff; }
.finder-result { margin-top: 1rem; padding: 1.3rem; border-radius: var(--radius); background: color-mix(in srgb, var(--leaf) 14%, white); border: 1px solid color-mix(in srgb, var(--leaf) 35%, white); display: none; }
.finder-result.show { display: block; animation: pop 0.4s var(--ease); }
.finder-result .r-name { font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; color: var(--green-700); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Valeurs ────────────────────────────────────────────────────────────── */
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.value { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: var(--radius-lg); padding: 1.7rem; }
.value .ic { width: 54px; height: 54px; border-radius: 16px; background: rgba(124,179,66,0.2); display: grid; place-items: center; margin-bottom: 1rem; }
.value .ic svg { width: 30px; height: 30px; color: var(--leaf-soft); }
.value h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.2rem; color: #fff; margin-bottom: 0.4rem; }
.value p { color: rgba(255,255,255,0.78); font-size: 0.95rem; }

/* ── Partenaires ────────────────────────────────────────────────────────── */
.partners { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }
.partner { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 0.9rem 1.3rem; text-align: center; box-shadow: var(--shadow-sm); }
.partner .p-name { font-weight: 700; color: var(--green-700); }
.partner .p-role { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq { display: grid; gap: 0.8rem; max-width: 820px; margin-inline: auto; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 1.3rem; box-shadow: var(--shadow-sm); transition: box-shadow 0.2s; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; padding: 1.15rem 0; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { width: 24px; height: 24px; flex: none; position: relative; }
.faq summary .plus::before, .faq summary .plus::after { content: ''; position: absolute; inset: 50% 0 auto 0; height: 2px; background: var(--green-600); transition: transform 0.25s; }
.faq summary .plus::after { transform: rotate(90deg); }
.faq details[open] summary .plus::after { transform: rotate(0); }
.faq details p { padding: 0 0 1.2rem; color: var(--muted); }

/* ── Bandeau CTA ────────────────────────────────────────────────────────── */
.cta-band { text-align: center; }
.cta-band .inner { background: linear-gradient(160deg, var(--carotte), #e2562a); color: #2a1405; border-radius: var(--radius-lg); padding: clamp(2.4rem, 6vw, 4rem); box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.cta-band h2 { color: #2a1405; font-size: clamp(2rem, 4.5vw, 3rem); }
.cta-band p { max-width: 48ch; margin: 0.8rem auto 1.8rem; font-weight: 500; }
.cta-band .btn-primary { background: #18402a; }
.cta-band .btn-primary:hover { background: #0f2a1b; }

/* ── Pied de page ───────────────────────────────────────────────────────── */
.site-footer { background: var(--green-900); color: rgba(255,255,255,0.82); padding: 3.5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { font-family: var(--font-body); font-weight: 700; color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 1rem; }
.site-footer a { color: rgba(255,255,255,0.78); display: inline-block; padding: 0.25rem 0; transition: color 0.2s; }
.site-footer a:hover { color: #fff; }
.footer-brand .brand { color: #fff; margin-bottom: 0.9rem; }
.footer-brand p { font-size: 0.92rem; max-width: 36ch; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.85rem; }

/* ── Animations d'apparition ────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay='1'] { transition-delay: 0.08s; }
.reveal[data-delay='2'] { transition-delay: 0.16s; }
.reveal[data-delay='3'] { transition-delay: 0.24s; }

/* ── Utilitaires ────────────────────────────────────────────────────────── */
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.visually-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; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .races-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .values-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
/* Bascule en menu hamburger dès 900px pour éviter une nav desktop trop serrée. */
@media (max-width: 900px) {
  .nav-links, .nav-actions .btn-cta-desktop { display: none; }
  .nav-toggle { display: block; }
  .site-header.menu-open { background: var(--cream); color: var(--ink); }
  .mobile-menu {
    position: fixed; inset: 74px 0 auto 0; background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 1.2rem clamp(1.1rem, 4vw, 2.2rem) 1.6rem; flex-direction: column; gap: 0.4rem; z-index: 99;
    box-shadow: var(--shadow);
  }
  .mobile-menu.open { display: flex; }
  .mobile-menu a { padding: 0.7rem 0; font-weight: 700; border-bottom: 1px solid var(--line); }
  .mobile-menu .btn { margin-top: 0.8rem; }
}
@media (max-width: 720px) {
  .hero { min-height: auto; padding-top: 110px; }
  .countdown .cd-unit { min-width: 58px; padding: 0.6rem; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* =============================================================================
   Sous-pages (inscription, équipe, confidentialité) + formulaires + web-app
   ============================================================================= */

body.subpage { padding-top: 0; background: var(--cream); }
body.subpage .site-header { position: sticky; background: rgba(247, 244, 236, 0.94); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--ink); }
body.subpage .site-header .brand,
body.subpage .site-header .nav-links a { color: var(--ink); }
body.subpage .site-header .brand small { opacity: 0.7; }
body.subpage .site-header .btn-ghost { background: transparent; color: var(--green-700); border-color: var(--green-600); }

.page-hero { background: linear-gradient(160deg, #1c4a2c, #12301d); color: #fff; padding: 3rem 0 3.2rem; }
.page-hero .eyebrow { color: var(--leaf-soft); }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-top: 0.6rem; }
.page-hero p { color: rgba(255, 255, 255, 0.85); max-width: 56ch; margin-top: 0.7rem; }
.page-main { padding: clamp(2rem, 5vw, 3.5rem) 0 4rem; }
.page-narrow { max-width: 760px; }

/* ── Formulaires ─────────────────────────────────────────────────────────── */
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.6rem); box-shadow: var(--shadow); }
.form-grid { display: grid; gap: 1.2rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field { display: grid; gap: 0.4rem; }
.field > label { font-weight: 700; font-size: 0.92rem; }
.field .req { color: var(--tomate); }
.field input, .field select, .field textarea {
  font: inherit; padding: 0.8rem 1rem; border: 2px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); transition: border-color 0.2s, box-shadow 0.2s; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(60, 138, 77, 0.15); }
.field .hint { font-size: 0.82rem; color: var(--muted); }
.field.invalid input, .field.invalid select { border-color: var(--tomate); }
.field .err { font-size: 0.82rem; color: var(--tomate); font-weight: 600; display: none; }
.field.invalid .err { display: block; }

/* Sélection de course (cartes radio) */
.race-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.race-pick label {
  position: relative; border: 2px solid var(--line); border-radius: 16px; padding: 1rem; cursor: pointer;
  background: #fff; transition: 0.2s; display: block;
}
.race-pick input { position: absolute; opacity: 0; pointer-events: none; }
.race-pick label:hover { border-color: var(--leaf); }
.race-pick input:checked + .pick-body { color: var(--green-700); }
.race-pick label:has(input:checked) { border-color: var(--green-600); background: color-mix(in srgb, var(--green-600) 8%, white); box-shadow: var(--shadow-sm); }
.race-pick .pick-dist { font-family: var(--font-display); font-weight: 900; font-size: 1.6rem; }
.race-pick .pick-name { font-weight: 700; font-size: 0.95rem; }
.race-pick .pick-meta { font-size: 0.8rem; color: var(--muted); }

/* Case à cocher consentement */
.check { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.92rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green-600); flex: none; }
.check a { color: var(--green-700); text-decoration: underline; }

/* Honeypot anti-bot (invisible aux humains) */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Alertes */
.alert { border-radius: 14px; padding: 1rem 1.2rem; font-weight: 600; display: none; }
.alert.show { display: block; }
.alert-error { background: #fdecea; color: #a02218; border: 1px solid #f5c6c0; }
.alert-success { background: #e7f5ea; color: #1b5e2a; border: 1px solid #bfe3c6; }

/* ── Web-app équipe ──────────────────────────────────────────────────────── */
.app-bg { background: linear-gradient(170deg, #1c4a2c 0%, #12301d 70%); min-height: 100vh; color: #fff; }
.app-wrap { max-width: 720px; margin-inline: auto; padding: 1.2rem clamp(1rem, 4vw, 1.6rem) 3rem; }
.app-top { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0 1.4rem; }
.app-top .brand { color: #fff; font-size: 1rem; }
.app-card { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: var(--radius-lg); padding: clamp(1.4rem, 4vw, 2rem); box-shadow: var(--shadow-lg); }
.app-card.light { background: var(--paper); color: var(--ink); }
.app-tabs { display: flex; gap: 0.4rem; background: rgba(255,255,255,0.08); padding: 0.3rem; border-radius: 999px; margin-bottom: 1.4rem; }
.app-tabs button { flex: 1; border: 0; background: transparent; color: rgba(255,255,255,0.8); padding: 0.6rem; border-radius: 999px; font-weight: 700; }
.app-tabs button[aria-selected='true'] { background: #fff; color: var(--green-700); }
.app-field { display: grid; gap: 0.4rem; margin-bottom: 1rem; }
.app-field label { font-weight: 700; font-size: 0.9rem; }
.app-field input { font: inherit; padding: 0.85rem 1rem; border-radius: 12px; border: 2px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.08); color: #fff; }
.app-field input::placeholder { color: rgba(255,255,255,0.5); }
.app-field input:focus { outline: none; border-color: var(--leaf); background: rgba(255,255,255,0.12); }

.team-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.team-name { font-family: var(--font-display); font-weight: 900; font-size: 1.8rem; }
.team-code-pill { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(124,179,66,0.2); border: 1px solid rgba(124,179,66,0.4); padding: 0.4rem 0.9rem; border-radius: 999px; font-weight: 700; letter-spacing: 0.04em; }

.score-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin-bottom: 1.4rem; }
.score-box { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14); border-radius: 16px; padding: 1rem; text-align: center; }
.score-box .v { font-family: var(--font-display); font-weight: 900; font-size: 1.8rem; }
.score-box .k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.8; }

.progress { height: 10px; background: rgba(255,255,255,0.14); border-radius: 999px; overflow: hidden; margin-bottom: 1.4rem; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--leaf), var(--carotte)); border-radius: 999px; transition: width 0.6s var(--ease); }

.station-list { display: grid; gap: 0.7rem; }
.station {
  display: flex; align-items: center; gap: 0.9rem; width: 100%; text-align: left;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: 16px;
  padding: 0.9rem 1rem; color: #fff; transition: 0.2s;
}
.station:hover:not([disabled]) { background: rgba(255,255,255,0.12); transform: translateX(3px); }
.station .st-ic { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,0.1); display: grid; place-items: center; flex: none; font-weight: 800; }
.station .st-main { flex: 1; }
.station .st-title { font-weight: 700; }
.station .st-sub { font-size: 0.82rem; opacity: 0.75; }
.station .st-state { font-size: 0.8rem; font-weight: 700; }
.station.done { opacity: 0.85; }
.station.done .st-ic { background: rgba(124,179,66,0.3); }
.badge-ok { color: #aef0bc; }
.badge-ko { color: #ffc9a6; }

/* Modale de jeu */
.modal-backdrop { position: fixed; inset: 0; background: rgba(8, 24, 14, 0.7); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 1rem; z-index: 200; }
.modal-backdrop.show { display: flex; }
.modal { background: var(--paper); color: var(--ink); border-radius: var(--radius-lg); padding: clamp(1.4rem, 4vw, 2rem); max-width: 480px; width: 100%; box-shadow: var(--shadow-lg); animation: pop 0.35s var(--ease); }
.modal h3 { font-size: 1.4rem; }
.modal .q { margin: 0.8rem 0 1.2rem; font-weight: 600; }
.options { display: grid; gap: 0.6rem; margin-bottom: 1.2rem; }
.options button { text-align: left; padding: 0.85rem 1rem; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-weight: 600; transition: 0.18s; }
.options button:hover:not([disabled]) { border-color: var(--leaf); }
.options button[aria-pressed='true'] { border-color: var(--green-600); background: color-mix(in srgb, var(--green-600) 10%, white); }
.options button.correct { border-color: var(--green-600); background: #e7f5ea; }
.options button.wrong { border-color: var(--tomate); background: #fdecea; }
.options button[disabled] { cursor: default; }
.modal .access { margin-bottom: 1rem; }
.modal-foot { display: flex; gap: 0.6rem; justify-content: flex-end; }

/* Classement */
.board { display: grid; gap: 0.5rem; }
.board-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 0.8rem; align-items: center; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 0.7rem 1rem; }
.board-row .rk { font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; opacity: 0.8; }
.board-row .nm { font-weight: 700; }
.board-row .pts { font-weight: 800; color: var(--leaf-soft); }
.board-row.me { border-color: var(--leaf); background: rgba(124,179,66,0.16); }
.board-row.top1 .rk { color: #ffd66b; opacity: 1; }

.qr-box { display: grid; place-items: center; gap: 0.8rem; text-align: center; }
.qr-box img { width: 200px; height: 200px; background: #fff; border-radius: 14px; padding: 8px; }
.big-code { font-family: var(--font-display); font-weight: 900; font-size: 1.8rem; letter-spacing: 0.06em; }

.muted-light { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.spinner { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .race-pick { grid-template-columns: 1fr; }
  .score-row { grid-template-columns: 1fr 1fr 1fr; }
}

/* ── Saisie des participants (création d'équipe) ─────────────────────────── */
.member-row { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; }
.member-row input { flex: 1; font: inherit; padding: 0.85rem 1rem; border-radius: 12px; border: 2px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.08); color: #fff; }
.member-row input::placeholder { color: rgba(255,255,255,0.5); }
.member-row input:focus { outline: none; border-color: var(--leaf); background: rgba(255,255,255,0.12); }
.member-remove { flex: none; width: 42px; height: 42px; border-radius: 12px; border: 2px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.06); color: #fff; font-size: 1.3rem; line-height: 1; }
.member-remove:hover { border-color: var(--tomate); color: #ffc9a6; }
.member-add { margin: 0.2rem 0 0.4rem; padding: 0.6rem 1.1rem; }
.member-add[disabled] { opacity: 0.4; }
.member-hint { font-size: 0.8rem; color: rgba(255,255,255,0.6); margin-bottom: 0.4rem; }
