/* ==========================================================================
   SUD MOTORS 2026 — BASE
   Reset moderne + styles fondamentaux. Aucun style de composant ici.
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* ---------- Scrollbar rouge — la signature dans les détails ---------- */
::-webkit-scrollbar {
  width: 11px;
}

::-webkit-scrollbar-track {
  background: var(--c-bg-alt);
}

::-webkit-scrollbar-thumb {
  background: var(--c-accent);
  border-radius: 999px;
  border: 2px solid var(--c-bg-alt);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--c-accent-hover);
}

/* Firefox (la règle standard y désactiverait le style webkit ailleurs,
   donc on la limite à Firefox) */
@supports (-moz-appearance: none) {
  html {
    scrollbar-color: var(--c-accent) var(--c-bg-alt);
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--c-text);
  background-color: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
  line-height: 1.1;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p {
  color: var(--c-text-soft);
  max-width: 65ch;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul[class],
ol[class] {
  list-style: none;
}

/* Conteneur central */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Section standard */
.section {
  padding-block: var(--space-xl);
}

/* Accessibilité : focus visible au clavier */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}

/* Accessibilité : contenu réservé aux lecteurs d'écran (et aux moteurs) */
.sr-only-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Accessibilité : liens d'évitement */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-s);
  z-index: 1000;
  padding: var(--space-xs) var(--space-s);
  background: var(--c-accent);
  color: var(--c-on-accent);
  border-radius: var(--radius-s);
}

.skip-link:focus {
  top: var(--space-s);
}

/* ---------- Révélations au scroll (classes posées par reveal.js) ----------
   .rv n'existe que si le JS tourne : sans lui, tout reste visible. */
.rv {
  opacity: 0;
  transform: translateY(26px);
}

.rv-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s var(--ease-out),
              transform 0.8s var(--ease-out);
  transition-delay: calc(var(--rv-i, 0) * 120ms);
}

/* Respect du choix utilisateur : réduire les animations */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
