/* ============================================================
   BASE V4 — LNK Studio
   Reset moderne + typographie de base + utilitaires
   Source : docs/refonte-v4/03-design-system.md
   Ne PAS charger sur les pages V3 (elles utilisent styles.css)
   ============================================================ */

/* ---- RESET ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  width: 100%;
}

body {
  width: 100%;
  max-width: 100%;
  background: var(--lnk-mint-white);
  color: var(--lnk-text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

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

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

/* Listes : puces par défaut (contenu rédactionnel) */
ul, ol {
  padding-left: var(--space-5);
  margin: 0 0 var(--space-4);
}

ul {
  list-style: disc;
}

ol {
  list-style: decimal;
}

li {
  margin-bottom: var(--space-1);
}

li::marker {
  color: var(--lnk-text-secondary);
}

/* Listes sans puces : navigation, cards, features */
nav ul, nav ol,
.no-list,
.no-list ul,
.no-list ol {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

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

a:hover {
  text-decoration: underline;
}

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

/* ---- TYPOGRAPHIE DE BASE ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--lnk-text-primary);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 800;
  line-height: 1.15;
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 800;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
}

h4 {
  font-size: var(--fs-lg);
  font-weight: 700;
}

h5, h6 {
  font-size: var(--fs-md);
  font-weight: 600;
}

p {
  margin: 0 0 var(--space-4);
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

strong, b {
  font-weight: 600;
}

em, i {
  font-style: italic;
}

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

code, pre, kbd, samp {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.9em;
}

code {
  background: var(--lnk-neutral-100);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
}

pre {
  background: var(--lnk-neutral-100);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

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

blockquote {
  border-left: 3px solid var(--lnk-deep-green);
  padding-left: var(--space-4);
  font-style: italic;
  color: var(--lnk-text-secondary);
  margin: var(--space-5) 0;
}

hr {
  border: none;
  border-top: 1px solid var(--lnk-border);
  margin: var(--space-6) 0;
}

/* ---- PROSE (zones de lecture longue) ---- */
/* Case studies, pages éditoriales, blog, docs. PAS pour les cards/heroes. */
.prose p,
.prose ul,
.prose ol,
.prose blockquote {
  max-width: var(--max-read, 65ch);
}

.prose p {
  text-wrap: pretty;
}

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

.skip-link {
  position: fixed;
  z-index: 9999;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--lnk-deep-green);
  color: var(--lnk-mint-white);
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--duration-fast) var(--ease-out);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  text-decoration: none;
}

/* ---- FOCUS VISIBLE (V4) ---- */
:focus-visible {
  outline: 2px solid var(--lnk-deep-green);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Masque l'outline uniquement lorsque l'élément n'est pas dans l'état focus-visible. */
:focus:not(:focus-visible) {
  outline: none;
}

/* ---- PREFERS-REDUCED-MOTION ---- */
@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;
  }
}
