/* ==========================================================
   REID Racing – feuille de style principale
   Pour personnaliser les couleurs : modifiez les variables
   dans :root ci-dessous, c'est le seul endroit nécessaire.
   ========================================================== */

/* ---- Police décorative (logo et grands titres) ---- */
@font-face {
  font-family: "Race Sport";
  src: url("../fonts/RaceSport.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---- Variables globales ---- */
:root {
  --black:   #000;
  --white:   #fff;
  --orange:  #ff6a00;
  --paper:   #f3f3f1;
  --ink-soft:#4a4a4a;
  --line:    #d6d6d6;

  /* Polices */
  --race:    "Race Sport", Impact, "Arial Black", sans-serif;
  --display: "Inter", system-ui, "Segoe UI", sans-serif;
  --body:    "Inter", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Largeur maximale du contenu */
  --max: 1100px;

  /* ---- Couleurs des cases partenaires ----
     Modifiez ces valeurs pour changer le fond de chaque niveau.
     --tile-bg-XXX   : couleur de fond de la case
     --tile-border-XXX : couleur du contour (optionnel, sinon transparent)     */
  --tile-bg-official:  #020202;
  --tile-bg-diamond: #020202; 
  --tile-bg-platinum: #020202;   /* Gris acier sombre */
  --tile-bg-gold:     #020202;   /* Brun doré sombre */
  --tile-bg-silver:   #020202;   /* Gris ardoise */
  --tile-bg-bronze:   #020202;   /* Brun bronze sombre */
  --tile-bg-support:  #020202;   /* Gris bleuté neutre */
  --tile-bg-inkind:   #020202;   /* Gris bleuté neutre */
  --tile-bg-default:  #020202;   /* Fallback pour toute case sans niveau */
}

/* ---- Réinitialisation minimale ---- */
*, *::before, *::after { box-sizing: border-box; }
html  { scroll-behavior: smooth; }
img   { max-width: 100%; display: block; }
a     { color: inherit; }
p     { margin: 0 0 1rem; }
body  {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
}

/* ---- Focus visible (accessibilité) ---- */
:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--orange);
}

/* ---- Lien "aller au contenu" (accessibilité, visible au focus) ---- */
.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; }

/* ---- Conteneur centré ---- */
.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}


/* ==========================================================
   EN-TÊTE
   ========================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #000; color: #fff;
  border-bottom: 1px solid #292929;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px;
}

/* Logo + nom */
.brand {
  display: flex; align-items: center; gap: .75rem;
  text-decoration: none;
  font-family: var(--race); font-size: 1.5rem; letter-spacing: .02em;
}
.brand img { height: 30px; width: auto; }

/* Navigation principale */
.nav {
  display: flex; align-items: center; gap: .25rem;
  margin-left: auto;
  font-family: var(--display);   /* police propre pour les liens de nav */
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: .01em;
}
.nav a {
  padding: .5rem .8rem;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: border-color .15s;
}
.nav a:hover                { border-bottom-color: #fff; }
.nav a[aria-current="page"] { border-bottom-color: var(--orange); }

/* Boutons d'action (langue, menu mobile) */
.header-actions { display: flex; align-items: center; gap: .5rem; }
.lang-btn, .menu-btn {
  font-family: var(--display);
  font-size: .875rem; font-weight: 600;
  color: #fff; background: transparent;
  border: 2px solid #fff; padding: .3rem .7rem; cursor: pointer;
}
.lang-btn:hover, .menu-btn:hover { background: #fff; color: #000; }

/* Menu hamburger : visible seulement en mobile */
.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; }
}

/* Bandes de pneus décoratives : désactivées dans ce thème */
.tread, .tread--slim { display: none !important; }


/* ==========================================================
   HERO (page d'accueil) ET EN-TÊTE DES PAGES INTERNES
   Les deux utilisent une image de couverture définie par CSS
   (voir la section "Images de couverture" tout en bas).
   ========================================================== */
.hero, .page-head {
  position: relative; isolation: isolate;
  background: #101216; color: #fff;
  text-align: center; overflow: hidden;
}

/* Ligne blanche séparant le titre du sous-titre */
.hero-divider {
  width: 200px;
  height: 4px;
  background-color: #FFFFFF;
  border-radius: 10px;
  margin: 1rem auto 24px;
}

/* Couche 1 : image de fond semi-transparente */
.hero::before, .page-head::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background-image: var(--cover-image);
  background-size: cover; background-position: var(--cover-position, center);
  opacity: 1;
}

/* Couche 2 : voile noir par-dessus */
.hero::after, .page-head::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: rgba(0, 0, 0, .40);
}

/* Vidéo optionnelle : derrière le titre et le filtre noir.
   Photo et vidéo se sélectionnent dans data/site.json, section covers. */
.cover-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  pointer-events: none;
}
/* Le filtre passe DEVANT la vidéo, mais derrière le contenu. */
.hero:has(.cover-video)::after,
.page-head:has(.cover-video)::after { z-index: 0; pointer-events: none; }
.hero:has(.cover-video) > :not(.cover-video),
.page-head:has(.cover-video) > :not(.cover-video) {
  position: relative;
  z-index: 1;
}

/* Grand titre dans le hero */
.hero h1, .page-head h1 {
  font-family: var(--race); font-weight: 300;
  font-size: clamp(3.75rem, 15vw, 10.5rem);
  line-height: .88; letter-spacing: .01em; margin: 0 0 1.5rem;
  text-shadow: 0 3px 18px rgba(0,0,0,.55);
}

/* Contenu centré dans le hero */
.hero-inner { padding: clamp(5rem, 12vw, 9rem) 0; }
.hero p { max-width: 34rem; font-size: 1.25rem; margin: 1rem auto 0; }

/* Scène de dunes (hero.js) — affichée en bas du hero */
.hero-scene {
  display: none;  /*changer "none" en "display" pour montrer l'animation*/
  width: 100%;
  /* La hauteur est définie par hero.js (BAJA.HAUTEUR_SCENE) */
  overflow: hidden;
  line-height: 0;      /* évite un gap sous le SVG */
}

/* En-tête pages internes */
.page-head {
  min-height: 60vh;
  padding: clamp(5rem, 12vw, 9rem) 0;
  display: flex; align-items: center; justify-content: center;
}
.page-head .container { position: relative; }
.page-head h1         { font-size: clamp(2.75rem, 9vw, 6rem); line-height: .95; margin: 0 auto; }
.page-head .lead      { max-width: 38rem; font-size: 1.5rem; margin: 0 auto 2.25rem; }


/* ==========================================================
   BOUTONS
   ========================================================== */
.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 GÉNÉRIQUES
   ========================================================== */
.section          { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--paper   { background: var(--paper); }
.section--black   { background: #000; color: #fff; }

/* Titre de section : grand, police display, sans ornement */
.section-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1; margin: 0 0 1.5rem;
}
/* Les pseudo-éléments décoratifs de l'ancienne version sont masqués */
.section-title::before, .section-title::after { display: none !important; }

/* Mise en page deux colonnes */
.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; } }

/* Image avec bordure gauche orange */
.frame-img { border-left: 8px solid var(--orange); }
.frame-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.narrow { max-width: 40rem; }


