/* =============================================================================
 * Hecteo - Base : reset, elements HTML, typographie
 * Depend de : common-tokens.css, common-fonts.css
 * ========================================================================== */

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

* {
  margin: 0;
}

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--h-font-family-body);
  font-size: var(--h-font-size-base);
  font-weight: var(--h-font-weight-regular);
  line-height: var(--h-font-leading-normal);
  color: var(--h-c-text);
  background-color: var(--h-c-bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

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

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

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

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

fieldset {
  min-width: 0;
  padding: 0;
  border: 0;
}

[hidden] {
  display: none !important;
}

/* --- Typographie ------------------------------------------------------------ */
h1,
h2,
h3,
h4,
h5,
h6,
.h-display {
  font-family: var(--h-font-family-display);
  font-weight: var(--h-font-weight-semibold);
  line-height: var(--h-font-leading-tight);
  letter-spacing: var(--h-font-tracking-tight);
  color: var(--h-c-text);
}

h1 { font-size: var(--h-font-size-4xl); letter-spacing: var(--h-font-tracking-tighter); }
h2 { font-size: var(--h-font-size-3xl); }
h3 { font-size: var(--h-font-size-2xl); }
h4 { font-size: var(--h-font-size-xl); }
h5 { font-size: var(--h-font-size-lg); }
h6 { font-size: var(--h-font-size-md); letter-spacing: var(--h-font-tracking-normal); }

@media (min-width: 768px) {
  h1 { font-size: var(--h-font-size-5xl); }
}

small,
.h-text-sm {
  font-size: var(--h-font-size-sm);
}

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

code,
kbd,
samp,
pre {
  font-family: var(--h-font-family-mono);
  font-size: 0.9em;
}

code {
  padding: 0.15em 0.4em;
  color: var(--h-c-brand-text);
  background-color: var(--h-c-brand-subtle);
  border-radius: var(--h-radius-xs);
}

pre {
  padding: var(--h-space-4);
  overflow-x: auto;
  color: var(--h-c-text);
  background-color: var(--h-c-bg-sunken);
  border: 1px solid var(--h-c-border-subtle);
  border-radius: var(--h-radius-lg);
}

pre code {
  padding: 0;
  color: inherit;
  background: none;
}

kbd {
  padding: 0.15em 0.45em;
  font-size: var(--h-font-size-xs);
  color: var(--h-c-text-muted);
  background-color: var(--h-c-bg-surface);
  border: 1px solid var(--h-c-border);
  border-bottom-width: 2px;
  border-radius: var(--h-radius-xs);
}

a {
  color: var(--h-c-text-link);
  text-decoration: none;
  text-underline-offset: 0.2em;
  transition: color var(--h-motion-duration-fast) var(--h-motion-ease-standard);
}

a:hover {
  text-decoration: underline;
}

hr {
  height: 1px;
  border: 0;
  background-color: var(--h-c-border);
}

::selection {
  color: var(--h-c-brand-text);
  background-color: var(--h-c-brand-subtle);
}

/* --- Accessibilite ---------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--h-c-brand);
  outline-offset: 2px;
  border-radius: var(--h-radius-xs);
}

.h-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.h-skip-link {
  position: absolute;
  top: var(--h-space-2);
  left: var(--h-space-2);
  z-index: var(--h-z-tooltip);
  padding: var(--h-space-2) var(--h-space-4);
  font-weight: var(--h-font-weight-semibold);
  color: var(--h-c-on-brand);
  background-color: var(--h-c-brand);
  border-radius: var(--h-radius-md);
  transform: translateY(-200%);
  transition: transform var(--h-motion-duration-fast) var(--h-motion-ease-out);
}

.h-skip-link:focus {
  transform: translateY(0);
}

/* --- Barres de defilement ---------------------------------------------------- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--h-c-border-strong) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background-color: var(--h-c-border-strong);
  border: 3px solid transparent;
  border-radius: var(--h-radius-full);
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--h-c-text-subtle);
  background-clip: content-box;
}

/* --- Preferences utilisateur -------------------------------------------------- */
@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;
  }
}

/* --- Impression --------------------------------------------------------------- */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  .h-no-print {
    display: none !important;
  }
}
