/* ==========================================================================
   Robbi Digital — base : reset, typographie, couleurs (depuis tokens.css)
   ========================================================================== */

/* Reset léger */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem; /* les ancres ne passent pas sous l'en-tête */
}

body {
  min-height: 100vh;
  background: var(--rd-paper);
  color: var(--rd-ink);
  font-family: var(--rd-font);
  font-weight: var(--rd-weight-regular);
  font-size: var(--rd-text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

input,
button,
textarea,
select { font: inherit; color: inherit; }

button { cursor: pointer; background: none; border: 0; padding: 0; }

/* :where() = priorité nulle : les marges propres à chaque composant restent prioritaires */
:where(ul[role="list"], ol[role="list"]) { list-style: none; padding: 0; }

/* Typographie */
h1, h2, h3, h4 {
  font-weight: var(--rd-weight-semibold);
  line-height: 1.12;
  letter-spacing: var(--rd-tracking-tight);
  text-wrap: balance;
}

h1 { font-size: var(--rd-text-3xl); line-height: 1.02; }
h2 { font-size: var(--rd-text-2xl); line-height: 1.06; }
h3 { font-size: var(--rd-text-xl); }
h4 { font-size: var(--rd-text-lg); }

p,
li { text-wrap: pretty; }

p { max-width: var(--rd-measure); }

strong, b { font-weight: var(--rd-weight-semibold); }

small { font-size: var(--rd-text-sm); }

/* Liens : soulignés, discrets, nets */
a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--rd-stone);
  transition: text-decoration-color var(--rd-duration-fast) var(--rd-ease-out);
}
a:hover { text-decoration-color: currentColor; }

/* Focus visible : le carré orange de la marque */
:focus-visible {
  outline: 2px solid var(--rd-orange);
  outline-offset: 3px;
  border-radius: 0;
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: var(--rd-ink); color: var(--rd-paper); }

hr {
  border: 0;
  border-top: 1px solid var(--rd-line);
}

/* Utilitaires d'accessibilité */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--rd-space-3);
  top: var(--rd-space-3);
  z-index: 100;
  padding: var(--rd-space-2) var(--rd-space-3);
  background: var(--rd-ink);
  color: var(--rd-paper);
  font-weight: var(--rd-weight-semibold);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Mouvement réduit : tout s'affiche, rien ne bouge */
@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;
  }
}
