/* ==========================================================================
   DEV'n DONE Design System v1.0 — Base
   Reset minimal, typographie globale, focus, accessibilité.
   Dépend de : tokens.css
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  hanging-punctuation: first last;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  font-synthesis: none;                 /* Lilita One n'a qu'une graisse */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Chaque contexte de surface repeint son fond et sa couleur de texte */
.surface-night, .surface-raised, .surface-ivory, .surface-orange {
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; margin: 0; padding: 0; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
p, li, dd { overflow-wrap: break-word; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }

::selection { background: var(--dnd-orange); color: var(--dnd-night); }

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
:focus:not(:focus-visible) { outline: none; }

/* ---------- Typographie ------------------------------------------------ */

.t-display, .t-h1, .t-h2, .t-h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
}
.t-display { font-size: var(--text-display); line-height: var(--leading-display); letter-spacing: var(--tracking-display); }
.t-h1      { font-size: var(--text-h1); line-height: var(--leading-h1); letter-spacing: var(--tracking-h1); }
.t-h2      { font-size: var(--text-h2); line-height: var(--leading-h2); }
.t-h3      { font-size: var(--text-h3); line-height: var(--leading-h3); letter-spacing: 0.005em; }

.t-body-lg { font-size: var(--text-body-lg); line-height: var(--leading-body-lg); }
.t-body    { font-size: var(--text-body); line-height: var(--leading-body); }
.t-body-sm { font-size: var(--text-body-sm); line-height: 1.6; }

.t-label {
  font-family: var(--font-ui);
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.t-tech { font-family: var(--font-mono); font-size: var(--text-tech); line-height: 1.6; }
.t-caption {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  line-height: 1.45;
  letter-spacing: var(--tracking-caption);
  color: var(--text-subtle);
}

.t-muted  { color: var(--text-muted); }
.t-subtle { color: var(--text-subtle); }
.t-accent { color: var(--accent-text); }
.t-signal { color: var(--signal-text); }
.t-measure { max-width: var(--measure); }

/* Le point final orange des accroches : « Done. » */
.t-dot { color: var(--accent-deco); }

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

/* ---------- Accessibilité ----------------------------------------------- */

.sr-only {
  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: fixed; left: var(--space-4); top: calc(-1 * var(--space-9));
  z-index: var(--z-toast);
  padding: var(--space-3) var(--space-4);
  background: var(--dnd-orange); color: var(--dnd-night);
  font-weight: var(--weight-bold); text-decoration: none;
  border-radius: var(--radius-md);
  transition: top var(--duration-base) var(--ease-out);
}
.skip-link:focus { top: var(--space-4); }

@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;
  }
}
