﻿/* ==========================================================================
   CSS RESET — Modern Reset
   Box-sizing border-box · Zéro marges parasites · Accessibilité native
   ========================================================================== */

/* Box sizing global */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Zéro marges et paddings par défaut */
* {
  margin: 0;
  padding: 0;
}

/* Prévention du débordement de texte */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  scroll-behavior: smooth;
}

/* Réduction du mouvement si préféré */
@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;
    scroll-behavior: auto !important;
  }
}

/* Body — ligne de base */
body {
  min-height: 100vh;
  min-height: 100dvh;
  line-height: var(--leading-normal, 1.6);
  font-family: var(--font-body, system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Titres — pas de gras par défaut (contrôle via tokens) */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  overflow-wrap: break-word;
}

/* Paragraphes */
p {
  text-wrap: pretty;
  overflow-wrap: break-word;
}

/* Médias responsifs */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Héritage de polices pour les formulaires */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Textarea sans redimensionnement horizontal */
textarea {
  resize: vertical;
}

/* Boutons — reset du curseur */
button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Liens — reset */
a {
  color: inherit;
  text-decoration: none;
}

/* Listes sans puce dans les rôles de navigation */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Focus visible accessible */
:focus-visible {
  outline: 2px solid var(--color-focus-ring, hsl(239, 84%, 67%));
  outline-offset: 3px;
  border-radius: var(--radius-xs, 0.25rem);
}

/* Table reset */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Classe utilitaire sr-only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
