/* ============================================================
   RESET.CSS — Les Sondeurs
   Reset moderne basé sur Andy Bell's Modern CSS Reset
   + ajustements pour accessibilité et performance
   ============================================================ */

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

/* 2. Suppression des marges/paddings par défaut */
* {
  margin: 0;
  padding: 0;
}

/* 3. Base HTML */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 16px;
  height: 100%;
}

/* 4. Corps du document */
body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

/* 6. Formulaires — héritage de la police */
input,
button,
textarea,
select {
  font: inherit;
}

/* 7. Typographie — éviter le débordement */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
  hyphens: auto;
}

/* 8. Liens */
a {
  text-decoration: none;
  color: inherit;
}

/* 9. Listes */
ul,
ol {
  list-style: none;
}

/* 10. Boutons */
button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
}

/* 11. Tableaux */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* 12. Focus visible pour accessibilité */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Masquer l'outline pour la souris, le garder au clavier */
:focus:not(:focus-visible) {
  outline: none;
}

/* 13. Suppression des animations pour les utilisateurs sensibles */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 14. Sélection de texte */
::selection {
  background-color: var(--color-primary-light);
  color: var(--color-primary-xdark);
}

/* 15. Scrollbar personnalisée */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-dark);
}

/* 16. hr */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0;
}

/* 17. blockquote */
blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: 1.25rem;
  font-style: italic;
}

/* 18. code */
code,
pre {
  font-family: var(--font-mono);
  font-size: 0.875em;
}
