:root {
  --bg: #f6f1e8;
  --paper: #fffdf8;
  --ink: #17171c;
  --muted: #6b6760;
  --line: #e6dfd2;
  --red: #e23d2e;
  --red-dark: #b82c20;
  --navy: #1e2a4a;
  --green: #1f8a4c;
  --yellow: #ffcf3f;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(30, 25, 15, 0.08);
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo span { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--red); color: #fff; font-size: 1rem; }
.nav { display: flex; gap: 24px; align-items: center; }
.nav a:not(.btn) { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav a:not(.btn):hover { color: var(--ink); }
@media (max-width: 720px) { .nav a:not(.btn) { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 999px; border: 2px solid var(--ink); background: var(--ink); color: #fff; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s; font-family: inherit; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-red { background: var(--red); border-color: var(--red); }
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-sm { padding: 9px 16px; font-size: .9rem; }
.btn-block { width: 100%; }

/* Hero */
.hero { padding: 64px 0 40px; }
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 520px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 20px; }
.badges { display: flex; gap: 18px; flex-wrap: wrap; font-size: .92rem; color: var(--muted); }
.badges b { color: var(--ink); }
.hero-visual { position: relative; aspect-ratio: 4/5; border-radius: 32px; background: radial-gradient(circle at 50% 35%, #fff 0, #f3e3cc 60%, #ecd5b6 100%); box-shadow: var(--shadow); overflow: hidden; display: grid; place-items: center; }
.hero-visual svg { width: 72%; height: auto; }
.hero-tag { position: absolute; background: var(--paper); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); font-size: .85rem; font-weight: 600; }
.hero-tag.t1 { top: 22px; left: 22px; }
.hero-tag.t2 { bottom: 26px; right: 22px; }
@media (max-width: 860px) { .hero .container { grid-template-columns: 1fr; } .hero-visual { max-width: 420px; margin-inline: auto; width: 100%; } }

/* Sections */
section { padding: 72px 0; }
.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.kicker { display: inline-block; font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; margin-bottom: 14px; }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.sport-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.sport-tile { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius); padding: 22px 14px; text-align: center; text-decoration: none; transition: border-color .15s, transform .15s; }
.sport-tile:hover { border-color: var(--ink); transform: translateY(-2px); }
.sport-tile .emoji { font-size: 2.4rem; display: block; margin-bottom: 6px; }
.sport-tile b { font-family: var(--font-display); font-size: 1.1rem; }
.sport-tile.soon { opacity: .55; pointer-events: none; }
.sport-tile.soon small { display: block; color: var(--muted); font-size: .75rem; }

.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 340px)); gap: 20px; justify-content: center; }
.price-card { background: var(--paper); border: 2px solid var(--line); border-radius: 26px; padding: 30px; position: relative; }
.price-card.featured { border-color: var(--ink); box-shadow: var(--shadow); }
.price-card .price { font-family: var(--font-display); font-size: 2.8rem; font-weight: 800; margin: 8px 0; }
.price-card ul { padding: 0; list-style: none; margin: 18px 0 24px; }
.price-card li { padding: 6px 0 6px 26px; position: relative; }
.price-card li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.ribbon { position: absolute; top: -13px; left: 30px; background: var(--red); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }

.club { background: var(--navy); color: #fff; border-radius: 32px; padding: 48px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
.club p { color: #c9d1e6; }
.club-prices { display: grid; gap: 10px; }
.club-prices div { display: flex; justify-content: space-between; background: rgba(255,255,255,.08); padding: 14px 18px; border-radius: 14px; }
@media (max-width: 760px) { .club { grid-template-columns: 1fr; padding: 32px 22px; } }

.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 12px 0 0; color: var(--muted); }

.cta-band { text-align: center; padding: 80px 0; }

.site-footer { border-top: 1px solid var(--line); padding: 36px 0; font-size: .9rem; color: var(--muted); }
.site-footer .container { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* Configurateur */
.config-page { padding: 40px 0 80px; }
.config-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
@media (max-width: 900px) { .config-layout { grid-template-columns: 1fr; } .summary { position: static !important; } }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 28px; margin-bottom: 20px; }
.panel h2 { font-size: 1.4rem; display: flex; align-items: center; gap: 10px; }
.panel h2 .n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .9rem; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label { display: block; border: 2px solid var(--line); border-radius: 16px; padding: 16px 10px; text-align: center; cursor: pointer; background: #fff; transition: border-color .15s; height: 100%; }
.choice label img { border-radius: 10px; margin: 0 auto 8px; aspect-ratio: 3/4; object-fit: cover; background: var(--bg); }
.choice input:checked + label { border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 18%, transparent); }
.choice input:focus-visible + label { outline: 3px solid var(--navy); outline-offset: 2px; }
.choice .emoji { font-size: 2rem; display: block; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch label { display: block; width: 40px; height: 40px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch input:checked + label { box-shadow: 0 0 0 3px var(--ink); }
.swatch input:focus-visible + label { outline: 3px solid var(--navy); outline-offset: 3px; }
.field { margin-bottom: 18px; }
.field > label, .field-label { display: block; font-weight: 600; margin-bottom: 8px; }
.field small { color: var(--muted); display: block; margin-top: 6px; }
input[type=text], input[type=email], input[type=number], input[type=password], textarea, select { width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; background: #fff; color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); }
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; font-size: .93rem; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--red); flex-shrink: 0; }
.dropzone { border: 2px dashed var(--line); border-radius: 18px; padding: 28px; text-align: center; cursor: pointer; background: #fff; transition: border-color .15s; display: block; }
.dropzone:hover, .dropzone.drag { border-color: var(--red); }
.dropzone img { max-height: 260px; margin: 0 auto 12px; border-radius: 12px; }
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; font-size: .85rem; }
.tips div { background: var(--bg); border-radius: 12px; padding: 10px; }
@media (max-width: 520px) { .tips { grid-template-columns: 1fr; } }
.summary { position: sticky; top: 92px; }
.summary dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 20px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; text-align: right; }
.alert { padding: 14px 18px; border-radius: 14px; margin: 14px 0; font-size: .95rem; }
.alert-error { background: #fdecea; color: #8a1c13; }
.alert-info { background: #eaf1fd; color: #1b3b78; }
.alert-ok { background: #e7f6ec; color: #145c33; }
[hidden] { display: none !important; }

/* Page création */
.track { padding: 40px 0 80px; }
.track-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .track-layout { grid-template-columns: 1fr; } }
.stage { background: var(--paper); border: 1px solid var(--line); border-radius: 28px; aspect-ratio: 3/4; display: grid; place-items: center; overflow: hidden; position: relative; }
.stage img { width: 100%; height: 100%; object-fit: contain; }
.loader { text-align: center; padding: 30px; }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 5px solid var(--line); border-top-color: var(--red); animation: spin 1s linear infinite; margin: 0 auto 18px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.progressbar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 14px; width: 220px; margin-inline: auto; }
.progressbar i { display: block; height: 100%; background: var(--red); transition: width .5s; }
.timeline { list-style: none; padding: 0; margin: 0 0 24px; }
.timeline li { display: flex; gap: 12px; align-items: center; padding: 8px 0; color: var(--muted); }
.timeline li::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0; }
.timeline li.done { color: var(--ink); }
.timeline li.done::before { background: var(--green); border-color: var(--green); }
.timeline li.current { color: var(--ink); font-weight: 700; }
.timeline li.current::before { border-color: var(--red); background: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 20%, transparent); }
.thumbs { display: flex; gap: 10px; margin-top: 12px; }
.thumbs button { width: 64px; height: 84px; border-radius: 10px; border: 2px solid var(--line); padding: 0; overflow: hidden; background: #fff; cursor: pointer; }
.thumbs button.active { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-options { display: grid; gap: 10px; margin: 16px 0; }
.product-option label { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.product-option label span { text-align: left; }
.product-option small { color: var(--muted); display: block; font-weight: 400; }
.total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; }
.reassure { display: grid; gap: 6px; font-size: .88rem; color: var(--muted); margin-top: 16px; }

.legal { padding: 48px 0 80px; max-width: 800px; }
.legal h2 { font-size: 1.5rem; margin-top: 2em; }
.config-layout > div:first-child { counter-reset: panel; }
.config-layout > div:first-child > .panel:not([hidden]) h2 .n::before { counter-increment: panel; content: counter(panel); }

/* Visionneuse 3D du configurateur */
.viewer-panel { padding: 14px; }
.viewer3d { aspect-ratio: 4 / 5; width: 100%; border-radius: 18px; background: radial-gradient(circle at 50% 38%, #fff 0, #f3e7d6 62%, #ead9c0 100%); overflow: hidden; touch-action: none; cursor: grab; }
.viewer3d:active { cursor: grabbing; }
.viewer3d canvas { display: block; width: 100% !important; height: 100% !important; }
.viewer-hint { font-size: .78rem; color: var(--muted); text-align: center; margin: 10px 4px 8px; }
.palette { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.palette div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .7rem; color: var(--muted); text-align: center; }
.palette i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
@media (max-width: 900px) { .viewer-panel { order: -1; } .viewer3d { max-height: 60vh; } }

.stage .stage-3d { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.stage .stage-loading { position: relative; pointer-events: none; }
.thumbs .thumb-3d { font-weight: 800; font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); }
