/* ==========================================================
   REID Racing - feuille de style
   Couleurs : noir, blanc, orange. Modifiez les variables ici.
   ========================================================== */
:root {
  --black: #000;
  --white: #fff;
  --orange: #ff6a00;
  --paper: #f3f3f1;
  --ink-soft: #4a4a4a;
  --line: #d6d6d6;
  --display: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Black", sans-serif;
  --body: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1rem; }

:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--orange);
}

.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--orange); color: #000; padding: .75rem 1rem; font-weight: 700;
}
.skip:focus { left: 0; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

/* ---------- En-tete ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #000; color: #fff;
  border-bottom: 4px solid var(--orange);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px;
}
.brand {
  display: flex; align-items: center; gap: .75rem;
  text-decoration: none; font-family: var(--display); font-size: 1.5rem; letter-spacing: .02em;
}
.brand img { height: 50px; width: auto; }
.nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.nav a {
  padding: .5rem .8rem; text-decoration: none;
  border-bottom: 3px solid transparent;
}
.nav a:hover { border-bottom-color: #fff; }
.nav a[aria-current="page"] { border-bottom-color: var(--orange); }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.lang-btn, .menu-btn {
  font: inherit; font-weight: 700; color: #fff; background: transparent;
  border: 2px solid #fff; padding: .3rem .7rem; cursor: pointer;
}
.lang-btn:hover, .menu-btn:hover { background: #fff; color: #000; }
.menu-btn { display: none; }

@media (max-width: 860px) {
  .menu-btn { display: inline-block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; margin: 0;
    background: #000; padding: .5rem 1.25rem 1rem;
    border-bottom: 4px solid var(--orange);
  }
  .nav.open { display: flex; }
  .nav a { padding: .75rem 0; }
}

/* ---------- Bande de pneu (element signature) ---------- */
.tread {
  height: 44px;
  background: url("../images/tread.svg") repeat-x;
  background-size: auto 44px;
}
.tread--slim { height: 28px; background-size: auto 28px; }

/* ---------- Accueil ---------- */
.hero { background: #000; color: #fff; overflow: hidden; }
.hero-inner { padding: clamp(3rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4rem); }
.hero h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(3.75rem, 15vw, 10.5rem);
  line-height: .88; letter-spacing: .01em; margin: 0 0 1.5rem;
}
.hero p { max-width: 34rem; font-size: 1.25rem; }

/* Scène de dunes sous le titre */
.hero-scene { width: 100%; height: clamp(150px, 20vw, 220px); }
.hero-scene svg { display: block; width: 100%; height: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.btn {
  display: inline-block; font: inherit; font-weight: 700; line-height: 1.2;
  padding: .85rem 1.5rem; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--orange); color: #000; border: 3px solid var(--orange);
}
.btn:hover { background: #fff; color: #000; border-color: #000; }
.btn--ghost { background: transparent; color: #fff; border-color: #fff; }
.btn--ghost:hover { background: #fff; color: #000; border-color: #fff; }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--paper { background: var(--paper); }
.section--black { background: #000; color: #fff; }
.section-title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1; margin: 0 0 1.5rem;
}
.section-title::after {
  content: ""; display: block; width: 64px; height: 8px; margin-top: .7rem;
  background: var(--orange); transform: skewX(-30deg); transform-origin: left;
}

.split {
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.frame-img { border-left: 8px solid var(--orange); }
.frame-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.narrow { max-width: 40rem; }

/* ---------- En-tete des pages internes ---------- */
.page-head { background: #000; color: #fff; padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.page-head h1 {
  font-family: var(--display); font-weight: 400; margin: 0 0 1rem;
  font-size: clamp(2.75rem, 9vw, 6rem); line-height: .95; letter-spacing: .01em;
}
.page-head .lead { max-width: 38rem; font-size: 1.2rem; margin: 0 0 2.25rem; }

/* ---------- Equipe ---------- */
.team-group { margin-top: 2.75rem; }
.team-group:first-child { margin-top: 0; }
.team-group h2 {
  font-family: var(--display); font-weight: 400; font-size: 1.9rem;
  margin: 0 0 1.25rem; padding-bottom: .4rem; border-bottom: 2px solid #000;
}
.member-grid {
  display: grid; gap: 1.75rem 1.25rem; list-style: none; margin: 0; padding: 0;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.member img {
  width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--paper);
  border-bottom: 6px solid var(--orange);
}
.member strong { display: block; margin-top: .65rem; }
.member span { color: var(--ink-soft); font-size: .95rem; }

/* ---------- Competitions ---------- */
.comp-block + .comp-block { margin-top: 3.5rem; }
.comp-list { list-style: none; margin: 0; padding: 0; }
.comp {
  display: grid; grid-template-columns: 6rem 1fr; gap: 1rem 1.5rem;
  padding: 1.25rem 0; border-top: 2px solid #000;
}
.comp:last-child { border-bottom: 2px solid #000; }
.comp-year { font-family: var(--display); font-size: 2.4rem; line-height: 1; }
.comp h3 { margin: 0 0 .2rem; font-size: 1.25rem; }
.comp p { margin: 0; color: var(--ink-soft); }
.comp .comp-result {
  margin-top: .6rem; padding-left: .7rem; border-left: 6px solid var(--orange);
  color: #000; font-weight: 700;
}
.empty { color: var(--ink-soft); }
@media (max-width: 520px) { .comp { grid-template-columns: 1fr; gap: .25rem; } }

/* ---------- Partenaires ---------- */
.tier + .tier { margin-top: 2.5rem; }
.tier h3 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; margin: 0 0 1rem; }
.logo-grid {
  display: grid; gap: 1rem; list-style: none; margin: 0; padding: 0;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.tier--main .logo-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.logo-tile {
  display: flex; align-items: center; justify-content: center;
  min-height: 110px; padding: 1rem; text-align: center; font-weight: 700;
  text-decoration: none; background: #fff; border: 2px solid #000;
}
.tier--main .logo-tile { min-height: 150px; font-size: 1.15rem; }
a.logo-tile:hover { border-color: var(--orange); box-shadow: 6px 6px 0 var(--orange); }
.logo-tile img { max-height: 80px; width: auto; }
.partner-cta { margin-top: 3.5rem; }

/* ---------- Histoire ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 6px solid var(--orange); max-width: 44rem; }
.timeline li { padding: 0 0 2.25rem 1.5rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .year { font-family: var(--display); font-size: 2.1rem; line-height: 1; }
.timeline h3 { margin: .3rem 0 .4rem; font-size: 1.2rem; }
.timeline p { margin: 0; color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2.5rem; }
.contact-grid h2 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; margin: 0 0 .75rem; }
.contact-grid ul { list-style: none; margin: 0; padding: 0; }
.contact-grid li { margin-bottom: .4rem; }
.contact-grid a { font-weight: 700; text-decoration-thickness: 3px; text-decoration-color: var(--orange); text-underline-offset: 4px; }

/* ---------- Formulaire (fenetre) ---------- */
dialog {
  width: 100%; max-width: min(580px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem);
  padding: 0; border: 0; border-top: 8px solid var(--orange); overflow: auto;
}
dialog::backdrop { background: rgba(0, 0, 0, .72); }
.dlg-body { padding: 1.5rem; }
.dlg-body h2 { font-family: var(--display); font-weight: 400; font-size: 2rem; margin: 0 0 .5rem; }
.field { display: grid; gap: .3rem; margin-bottom: 1rem; }
.field label { font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; padding: .65rem .75rem;
  border: 2px solid #000; border-radius: 0; background: #fff; color: #000;
}
.field textarea { min-height: 110px; resize: vertical; }
.field--check { grid-template-columns: auto 1fr; align-items: start; gap: .6rem; }
.field--check input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; accent-color: #000; }
.field--check label { font-weight: 400; font-size: .95rem; }
.hp { position: absolute; left: -9999px; }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.form-actions .btn--ghost { color: #000; border-color: #000; }
.form-actions .btn--ghost:hover { background: #000; color: #fff; }
.form-status { padding: .75rem 1rem; margin: 0 0 1rem; background: var(--paper); border-left: 6px solid #000; }
.form-status[data-state="success"] { border-left-color: var(--orange); }
.form-status[data-state="error"] { border-left-color: #b00020; }
.form-status:empty { display: none; }

/* ---------- Pied de page ---------- */
.site-footer { background: #000; color: #fff; }
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem;
  padding: 1.5rem 0; font-size: .95rem;
}
.footer-inner p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
