/* ==========================================================
   Spondy'Raid — Version B « Carnet de raid »
   Papier crème, courbes de niveau, dossard, typo condensée.
   Mer de Corse (bleu nuit) + corail + violet de l'équipe.
   ========================================================== */
:root {
  --paper:   #f6f0e4;
  --paper-2: #ede4d3;
  --ink:     #13213b;
  --ink-2:   #2b3a55;
  --muted:   #5b6577;
  --sea:     #1d5f78;
  --coral:   #ff5e3a;
  --violet:  #7a4fd6;
  --sand:    #e8c98f;
  --white:   #ffffff;
  --line:    rgba(19, 33, 59, .14);
  --radius:  6px;
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --body:    "Inter", system-ui, -apple-system, sans-serif;
  --hand:    "Caveat", "Comic Sans MS", cursive;
  --topo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600'%3E%3Cg fill='none' stroke='%2313213b' stroke-opacity='.09' stroke-width='1.2'%3E%3Cpath d='M300 120c90 0 170 50 175 140s-60 170-160 175-190-40-200-130 95-185 185-185z'/%3E%3Cpath d='M300 160c70 0 130 40 135 105s-45 130-120 133-145-30-152-98 67-140 137-140z'/%3E%3Cpath d='M302 200c50 0 92 28 95 72s-32 90-84 92-100-22-104-68 43-96 93-96z'/%3E%3Cpath d='M305 240c28 0 52 16 54 42s-18 50-48 51-56-12-58-38 24-55 52-55z'/%3E%3Cpath d='M300 80c115 0 210 65 215 180s-75 215-205 220-235-55-245-165 120-235 235-235z'/%3E%3Cpath d='M300 40c140 0 250 80 255 220s-90 260-250 265-280-70-290-200 145-285 285-285z'/%3E%3Cpath d='M-20 560c80-30 160-10 230 20s170 40 260 0 140-30 160-20'/%3E%3Cpath d='M-20 600c80-30 160-10 230 20s170 40 260 0 140-30 160-20'/%3E%3Cpath d='M-20 520c90-40 170-15 240 15s160 35 250-5 130-25 150-15'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 64px; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sea); }
.container { width: min(1160px, 100% - 32px); margin-inline: auto; }

h1, h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: .95; letter-spacing: .005em; margin: 0; }
h2 { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.04; }
h3 { font-size: 1.15rem; margin: 0 0 .4rem; }

.kicker {
  font-size: .76rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--coral); margin: 0 0 .7rem;
}
.handwritten { font-family: var(--hand); color: var(--violet); font-size: 1.6rem; line-height: 1; display: block; margin-bottom: .4rem; }
.handwritten--big { font-size: clamp(3rem, 9vw, 5.5rem); color: var(--coral); margin: 0 0 1rem; }
.small-note { margin-top: 2.5rem; font-size: .88rem; opacity: .75; }
.tiny { font-size: .78rem; color: var(--muted); margin: .7rem 0 0; text-align: center; }

.topo { background-image: var(--topo); background-size: 600px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 1em 1.7em;
  background: var(--coral); color: var(--white);
  border: 2px solid var(--coral);
  border-radius: var(--radius);
  font: 700 .95rem/1 var(--body); letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn--small { padding: .65em 1.1em; font-size: .8rem; box-shadow: 3px 3px 0 var(--paper); }
.btn--block { width: 100%; }
.btn--light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.is-disabled { background: var(--paper-2); border-color: var(--paper-2); color: var(--muted); box-shadow: none; pointer-events: none; }
.link-arrow { font-weight: 600; color: var(--ink); text-underline-offset: 4px; }

.version-switch {
  position: fixed; right: calc(12px + env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  padding: .5em .9em; border-radius: 999px;
  background: var(--ink); color: var(--paper); text-decoration: none;
  font-size: .78rem; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.25);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: .85rem max(16px, calc((100% - 1160px) / 2));
  background: var(--ink); color: var(--paper);
}
.nav__logo { display: flex; align-items: center; gap: .55rem; font-family: var(--display); font-size: 1.5rem; text-transform: uppercase; color: var(--paper); text-decoration: none; letter-spacing: .02em; }
.nav__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 4px rgba(122,79,214,.3); }
.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav__links a:not(.btn) { color: rgba(246,240,228,.8); text-decoration: none; font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.nav__links a:not(.btn):hover { color: var(--white); }
.nav__burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav__burger span { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--paper); }
@media (max-width: 880px) {
  .nav__burger { display: block; }
  .nav__links { position: absolute; inset: 100% 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; padding: .4rem 16px 1.2rem; background: var(--ink); display: none; }
  .nav__links.is-open { display: flex; }
  .nav__links a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav__links .btn { margin-top: 1rem; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 3rem; border-bottom: 2px solid var(--ink); }
.hero__grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(3.6rem, 11vw, 8.2rem); isolation: isolate; }
.hl { color: var(--violet); position: relative; white-space: nowrap; }
.hl::after { content: ""; position: absolute; left: -.05em; right: -.05em; bottom: .06em; height: .16em; background: var(--sand); z-index: -1; transform: skew(-12deg); }
.hero__lead { font-size: clamp(1rem, 2vw, 1.15rem); max-width: 560px; color: var(--ink-2); margin: 1.6rem 0 2rem; }
.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; }

/* Dossard */
.bib {
  position: relative;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 2rem 1.8rem 1.6rem;
  text-align: center;
  transform: rotate(2.5deg);
  box-shadow: 10px 12px 0 var(--ink);
}
.bib__pin { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #b9c0cc 45%, #6b7487); }
.bib__pin--tl { top: 10px; left: 10px; } .bib__pin--tr { top: 10px; right: 10px; }
.bib__pin--bl { bottom: 10px; left: 10px; } .bib__pin--br { bottom: 10px; right: 10px; }
.bib__event { margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--coral); }
.bib__number { font-family: var(--display); font-size: clamp(2.6rem, 6vw, 3.8rem); line-height: 1; margin: .5rem 0 .3rem; color: var(--ink); letter-spacing: .01em; }
.bib__names { font-weight: 700; font-size: 1.1rem; margin: 0 0 1.2rem; }
.bib__names span { color: var(--violet); }
.bib__footer { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px dashed var(--line); padding-top: 1rem; font-weight: 700; font-size: .95rem; }
.bib__footer small { display: block; font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.bib__note { position: absolute; bottom: -2.6rem; right: 0; margin: 0; font-family: var(--hand); font-size: 1.6rem; color: var(--violet); transform: rotate(-4deg); }

.countdown { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem; margin-top: 4rem; font-family: var(--display); text-transform: uppercase; }
.countdown__label { font-size: 1.4rem; color: var(--coral); }
.countdown__num { font-size: clamp(2.6rem, 6vw, 3.6rem); line-height: 1; }
.countdown__num--sm { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.countdown__unit { font-family: var(--body); font-size: .8rem; font-weight: 600; color: var(--muted); margin-right: .5rem; }
.countdown__sep { font-size: 2rem; color: var(--line); margin: 0 .4rem; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .bib { max-width: 420px; margin: 1rem auto 0; }
}

/* ---------- Ticker ---------- */
.ticker { background: var(--violet); color: var(--white); overflow: hidden; border-bottom: 2px solid var(--ink); }
.ticker__track { display: flex; width: max-content; animation: ticker 32s linear infinite; }
.ticker span { font-family: var(--display); text-transform: uppercase; font-size: 1.3rem; padding: .7rem 1.4rem; white-space: nowrap; }
.ticker span::after { content: "✦"; margin-left: 2.8rem; color: var(--sand); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; border-bottom: 2px solid var(--ink); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink a { color: var(--sand); }
.section--sea { background: var(--sea); color: var(--paper); }
.section--sea .kicker, .section--ink .kicker { color: var(--sand); }
.topo--light { background-color: var(--paper-2); }
.section__head { display: flex; gap: 1.4rem; align-items: flex-start; margin-bottom: 3rem; }
.section__num { font-family: var(--display); font-size: clamp(3rem, 8vw, 5rem); line-height: .8; color: transparent; -webkit-text-stroke: 2px var(--coral); }
.section__intro { max-width: 720px; font-size: 1.08rem; color: var(--ink-2); margin: -1rem 0 3rem; }

.card { border-radius: var(--radius); }

/* ---------- Team ---------- */
.team { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.team__text h3 { font-size: 1.3rem; }
.team__text h3 em { font-family: var(--hand); font-style: normal; color: var(--violet); font-size: 1.6rem; font-weight: 600; }
.team__text p { color: var(--ink-2); margin: 0 0 1.8rem; }
.polaroid { margin: 0; background: var(--white); padding: 12px 12px 0; box-shadow: 0 14px 30px rgba(19,33,59,.18); border: 1px solid var(--line); }
.polaroid--left { transform: rotate(-4deg); }
.polaroid--right { transform: rotate(3.5deg); }
.polaroid__img { aspect-ratio: 4 / 5; display: grid; place-items: center; background: linear-gradient(160deg, var(--violet), var(--sea)); color: rgba(255,255,255,.8); font-size: .85rem; font-weight: 600; }
.polaroid__img { overflow: hidden; }
.polaroid__photo { width: 100%; height: 100%; object-fit: cover; }
.polaroid__photo--perrine { object-position: 70% center; }
.polaroid__photo--aline { object-position: 50% 20%; }
.polaroid__img--alt { background: linear-gradient(160deg, var(--coral), var(--violet)); }
.polaroid figcaption { font-family: var(--hand); font-size: 1.7rem; text-align: center; padding: .4rem 0 .6rem; }
@media (max-width: 860px) {
  .team { grid-template-columns: 1fr 1fr; }
  .team__text { grid-column: 1 / -1; grid-row: 2; }
}

.pullquote {
  margin: 5rem auto 0; max-width: 900px; text-align: center;
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.1;
}
.pullquote::before { content: "“"; display: block; font-size: 4em; line-height: .6; color: var(--coral); }

/* ---------- Spondy ---------- */
.spondy { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); }
.spondy__intro { font-size: 1.12rem; margin: 0; color: rgba(246,240,228,.85); }
.spondy__list { list-style: none; counter-reset: n; margin: 0; padding: 0; }
.spondy__list li { counter-increment: n; display: grid; grid-template-columns: 3.2rem 1fr; padding: 1.1rem 0; border-top: 1px solid rgba(246,240,228,.18); color: rgba(246,240,228,.8); }
.spondy__list li:last-child { border-bottom: 1px solid rgba(246,240,228,.18); }
.spondy__list li::before { content: "0" counter(n); font-family: var(--display); font-size: 1.6rem; color: var(--coral); grid-row: span 2; line-height: 1.1; }
.spondy__list strong { color: var(--white); display: block; }
@media (max-width: 860px) { .spondy { grid-template-columns: 1fr; } }

/* ---------- Route ---------- */
.route { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; position: relative; }
.route::before { content: ""; position: absolute; top: 24px; left: 24px; right: 24px; border-top: 3px dashed var(--ink); }
.route__stop { position: relative; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 3.6rem 1.2rem 1.4rem; margin-top: 24px; }
.route__marker { position: absolute; top: -24px; left: 1.2rem; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 3px solid var(--ink); font-weight: 800; font-size: 1.1rem; }
.route__stop.is-done .route__marker { background: var(--ink); color: var(--paper); }
.route__stop.is-current { background: var(--white); box-shadow: 6px 6px 0 var(--coral); }
.route__stop.is-current .route__marker { background: var(--coral); border-color: var(--coral); }
.route__stop--finish .route__marker { background: var(--violet); border-color: var(--violet); }
.route__when { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--coral); }
.route__stop h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 1.6rem; margin: .2rem 0 .4rem; }
.route__stop p:last-of-type { margin: 0; color: var(--ink-2); font-size: .93rem; }
.route__here { position: absolute; top: -3.4rem; right: .6rem; font-family: var(--hand); font-size: 1.5rem; color: var(--coral); transform: rotate(-6deg); }
@media (max-width: 900px) {
  .route { grid-template-columns: 1fr; gap: 2.4rem; padding-left: 0; }
  .route::before { top: 0; bottom: 0; left: 24px; right: auto; border-top: 0; border-left: 3px dashed var(--ink); }
  .route__stop { margin-top: 0; margin-left: 0; padding: 1.2rem 1.2rem 1.2rem 4.4rem; }
  .route__marker { top: 1rem; left: 0; }
  .route__here { position: static; display: block; margin-top: .6rem; transform: none; }
}

/* ---------- Budget ---------- */
.budget-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.progress-card { background: var(--white); border: 2px solid var(--ink); border-radius: 10px; padding: 2rem; box-shadow: 8px 8px 0 var(--violet); }
.progress-card__label { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.progress-card__raised { font-family: var(--display); font-size: clamp(3.4rem, 9vw, 5.5rem); line-height: 1; margin: .3rem 0 .2rem; }
.progress-card__goal { margin: 0 0 1.6rem; color: var(--ink-2); }
.progress { height: 22px; border: 2px solid var(--ink); border-radius: 999px; background: repeating-linear-gradient(90deg, var(--paper) 0 10px, var(--paper-2) 10px 20px); overflow: visible; position: relative; }
.progress__bar { position: relative; height: 100%; width: 0; border-radius: 999px; background: var(--coral); transition: width 1.4s cubic-bezier(.2,.8,.2,1); }
.progress__bar::after { content: "🏃‍♀️"; position: absolute; right: -14px; top: -34px; font-size: 1.5rem; transform: scaleX(-1); }
.progress__scale { display: flex; justify-content: space-between; font-size: .75rem; font-weight: 600; color: var(--muted); margin-top: .4rem; }
.progress-card__meta { margin: 1rem 0 0; color: var(--ink-2); }

.budget h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 1.8rem; margin-bottom: 1rem; }
.budget ul { list-style: none; margin: 0 0 1.8rem; padding: 0; }
.budget li { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.budget li em { display: block; font-style: normal; font-size: .85rem; color: var(--muted); }
.budget li.total { border-bottom: 0; border-top: 2px solid var(--ink); font-weight: 800; font-size: 1.1rem; }
.budget__note { margin: 0; padding: 1.2rem 1.4rem; background: var(--white); border: 2px dashed var(--violet); border-radius: 10px; color: var(--ink-2); }
@media (max-width: 860px) { .budget-grid { grid-template-columns: 1fr; } }

/* ---------- Tickets ---------- */
.tickets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.ticket {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  padding: 1.8rem 1.6rem;
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
.ticket::before, .ticket::after { content: ""; position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: var(--sea); border: 2px solid var(--ink); transform: translateY(-50%); }
.ticket::before { left: -13px; } .ticket::after { right: -13px; }
.ticket__tag { margin: 0 0 .8rem; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--coral); }
.ticket h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 2rem; }
.ticket p { color: var(--ink-2); }
.ticket .btn { margin-top: auto; }
.ticket--accent { background: var(--violet); color: var(--white); }
.ticket--accent p { color: rgba(255,255,255,.88); }
.ticket--accent .ticket__tag { color: var(--sand); }
.socials { display: flex; justify-content: center; gap: .6rem; margin-top: 1rem; }
.social { font-size: .8rem; font-weight: 700; text-decoration: none; color: var(--ink); border-bottom: 2px solid var(--coral); }
@media (max-width: 900px) { .tickets { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- Partner ---------- */
.partner { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.partner__steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.partner__steps li { counter-increment: s; position: relative; padding: 0 0 1.6rem 4rem; }
.partner__steps li::before { content: counter(s); position: absolute; left: 0; top: -.3rem; font-family: var(--display); font-size: 2.6rem; line-height: 1; color: var(--violet); }
.partner__steps strong { display: block; font-size: 1.05rem; }
.partner__steps span { color: var(--ink-2); }

.price-ticket { display: grid; grid-template-columns: 1fr; background: var(--white); border: 2px solid var(--ink); border-radius: 10px; box-shadow: 8px 8px 0 var(--coral); overflow: hidden; }
.price-ticket__main { padding: 2rem; text-align: center; border-bottom: 2px dashed var(--ink); background: var(--topo) center / 500px, var(--white); }
.price-ticket__label { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--coral); }
.price-ticket__price { font-family: var(--display); font-size: clamp(3.4rem, 8vw, 4.6rem); line-height: 1; margin: .4rem 0 .2rem; }
.price-ticket__price small { font-size: 1.4rem; color: var(--muted); }
.price-ticket__ttc { margin: 0; color: var(--ink-2); font-weight: 600; }
.price-ticket__stub { padding: 1.4rem 2rem 1.6rem; text-align: center; }
.price-ticket__contact { display: inline-block; margin-top: 1rem; font-size: .88rem; font-weight: 600; color: var(--ink); }
@media (max-width: 860px) { .partner { grid-template-columns: 1fr; } }

.logos { margin-top: 5rem; text-align: center; }
.logos__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-top: 1rem; }
.logo-slot { aspect-ratio: 3 / 2; display: grid; place-items: center; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-size: .85rem; font-weight: 600; }

/* ---------- Contact / Footer ---------- */
.contact { padding: clamp(4rem, 10vw, 7rem) 0; text-align: center; background-color: var(--paper-2); border-bottom: 2px solid var(--ink); }
.contact p:not(.handwritten) { font-size: 1.1rem; color: var(--ink-2); margin: 0 auto 2rem; max-width: 520px; }
.footer { background: var(--ink); color: rgba(246,240,228,.7); padding: 2.4rem 0 4rem; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem 2rem; }
.footer p { margin: 0; }
.footer__brand { font-family: var(--display); font-size: 1.6rem; text-transform: uppercase; color: var(--paper); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.ticket.reveal.is-visible, .progress-card.reveal.is-visible { transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker__track { animation: none; }
  .progress__bar { transition: none; }
}
