:root {
  --earth: #1a1208;
  --moss: #2d4a1e;
  --sage: #5a7a45;
  --lime: #a8c640;
  --sand: #d4b896;
  --cream: #f4ede0;
  --rust: #c4440a;
  --sky: #87b8c4;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--earth);
  color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* HERO - CENTRÉ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(to bottom, rgba(26,18,8,0.55) 0%, rgba(26,18,8,0.3) 40%, rgba(26,18,8,0.75) 100%),
    url('/assets/img/hero-bg.jpg') center/cover no-repeat;
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge {
  display: inline-block;
  background: var(--lime);
  color: var(--earth);
  padding: 0.4rem 1rem;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  font-family: 'DM Sans', sans-serif;
}

.hero-content h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(5rem, 15vw, 12rem);
  font-weight: 700;
  line-height: 0.85;
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: 3px 3px 15px rgba(0,0,0,0.5);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
  text-align: center;
}

.hero-content h1 .text-lime {
  color: var(--lime);
}

  margin: 0;
  padding: 0;
  line-height: 0.85;
}

  color: var(--lime);
}


.subtitle {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-align: center;
}

.hero-date-box {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--lime);
  padding: 0.5rem 1.25rem;
  border-radius: 2px;
  margin-bottom: 0.75rem;
}

.date-icon {
  font-size: 1.2rem;
}

.date-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  color: var(--earth);
  letter-spacing: 0.08em;
  font-weight: 700;
}

.cta-btn {
  display: inline-block;
  background: var(--lime);
  color: var(--earth);
  padding: 0.9rem 2rem;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.3s;
}

.cta-btn:hover {
  background: var(--cream);
  transform: translateY(-2px);
}

.scroll-hint {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.1rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 10px); }
}

/* SECTION */
.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--lime);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--cream);
  margin-bottom: 1rem;
  text-transform: uppercase;
}

/* RACES GRID */
.races-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.race-card-preview {
  background: rgba(255,255,255,0.05); color: var(--cream);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 1.75rem;
  transition: all 0.3s;
}

.race-card-preview:hover {
  border-color: var(--lime);
  background: rgba(168,198,64,0.05);
  transform: translateY(-4px);
}

.race-card {
  background: rgba(255,255,255,0.05); color: var(--cream);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 1.75rem;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.race-card:hover {
  border-color: var(--lime);
  background: rgba(168,198,64,0.05);
  transform: translateY(-4px);
}

.race-card.selected {
  border-color: var(--lime);
  background: rgba(168,198,64,0.08);
}

.race-check {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: transparent;
  transition: all 0.2s;
}

.race-card.selected .race-check {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--earth);
}

.race-dist {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--lime);
  margin-bottom: 0.75rem;
}

.race-type {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.race-info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--sand);
}

.race-info-item .icon {
  font-size: 1rem;
}

.race-price {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  color: var(--lime);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.race-spots {
  margin-top: 1rem;
}

.spots-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.spots-fill {
  height: 100%;
  background: var(--lime);
  transition: width 0.4s;
}

.spots-text {
  font-size: 0.75rem;
  color: var(--sand);
  font-family: 'DM Mono', monospace;
}

/* FORM */
.reg-form {
  max-width: 700px;
  margin: 2rem auto 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--sand);
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}

.form-group input,
.form-group select {
  background: rgba(255,255,255,0.05); color: var(--cream);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 2px;
  padding: 0.8rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--cream);
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--lime);
  background: rgba(168,198,64,0.05);
}

/* REPAS */
.repas-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.repas-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.05); color: var(--cream);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 2px;
}

.repas-info {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.repas-info strong {
  color: var(--cream);
  font-size: 0.95rem;
}

.repas-prix {
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  color: var(--lime);
  font-weight: 600;
}

.repas-qty {
  display: flex;
  align-items: center;
  gap: 0;
}

.qty-btn {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--cream);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-minus { border-radius: 2px 0 0 2px; }
.qty-plus { border-radius: 0 2px 2px 0; }

.qty-btn:hover {
  background: var(--lime);
  color: var(--earth);
  border-color: var(--lime);
}

.qty-input {
  width: 50px;
  height: 36px;
  text-align: center;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.12);
  border-left: none;
  border-right: none;
  color: var(--cream);
  font-family: 'DM Mono', monospace;
  font-size: 0.95rem;
  font-weight: 600;
}

/* PRICE SUMMARY */
.price-summary {
  background: rgba(168,198,64,0.05);
  border: 1px solid rgba(168,198,64,0.15);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
}

.price-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  color: var(--sand);
  margin-bottom: 0.5rem;
}

.price-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cream);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.price-total span {
  color: var(--lime);
  font-size: 1.4rem;
}

/* SUBMIT */
.submit-btn {
  width: 100%;
  background: var(--lime);
  color: var(--earth);
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 1.1rem;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.2s;
  margin-top: 1.5rem;
}

.submit-btn:hover {
  background: var(--cream);
  transform: translateY(-2px);
}

.submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* PAGE HEADER */
.page-header {
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 1.5rem 2rem;
  margin-bottom: 3rem;
}

.page-header h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: var(--cream);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--sand);
  font-size: 0.9rem;
}

.back-link {
  display: inline-block;
  color: var(--lime);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  transition: all 0.2s;
}

.back-link:hover {
  color: var(--cream);
}

@media(max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 2rem; }
}

/* Hero date box updated */
.hero-date-box {
  margin-top: 1.5rem !important;
}

.date-text {
  font-size: 3rem !important;
  font-weight: 700;
}

/* ===== MOBILE RESPONSIVE ===== */
@media(max-width: 768px) {
  .hero-content h1 {
    font-size: clamp(3rem, 12vw, 6rem);
  }
  
  .badge {
    font-size: 1.2rem;
    padding: 0.3rem 0.8rem;
  }
  
  .hero-date-box {
    padding: 0.4rem 1rem;
  }
  
  .date-text {
    font-size: 1.8rem !important;
  }
  
  .subtitle {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
  }
  
  .cta-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.8rem;
  }
  
  .section {
    padding: 2.5rem 1rem;
  }
  
  .section-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  
  .races-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .race-card, .race-card-preview {
    padding: 1.25rem;
  }
  
  .race-dist {
    font-size: 2.5rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .page-header {
    padding: 1rem;
    margin-bottom: 2rem;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
  
  .repas-row {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
  
  .repas-qty {
    align-self: flex-end;
  }
  
  .price-summary {
    padding: 1rem;
  }
  
  .scroll-hint {
    bottom: 0.5rem;
    font-size: 0.6rem;
  }
  
  .hero {
    padding: 1.5rem;
    min-height: 100svh;
  }
}

@media(max-width: 400px) {
  .hero-content h1 {
    font-size: clamp(2.5rem, 11vw, 5rem);
  }
  
  .badge {
    font-size: 1rem;
  }
  
  .date-text {
    font-size: 1.4rem !important;
  }
  
  .race-dist {
    font-size: 2rem;
  }
  
  .qty-btn {
    width: 32px;
    height: 32px;
  }
  
  .qty-input {
    width: 40px;
    height: 32px;
  }
}

/* GPX Link */
.gpx-link {
  display: inline-block;
  color: var(--lime);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gpx-link:hover {
  color: var(--cream);
}

/* Forcer fond foncé sur tous les champs */
.form-group input,
.form-group select,
.form-group input[type="date"] {
  background: rgba(255,255,255,0.05) !important;
  color: var(--cream) !important;
  color-scheme: dark;
}

/* Dropdown select dark */
.form-group select option {
  background: #1a1208;
  color: #f4ede0;
}
