/* =========================================================================
   Arsalane Soutien — Système de design : tokens, réinitialisation, typographie
   ========================================================================= */
:root {
  /* Couleurs de marque — vert pin profond, neutres chauds */
  --brand-900: #143d2e;
  --brand-800: #1a4d3a;
  --brand-700: #1f5c46;
  --brand-600: #2f6f4f;
  --brand-500: #3d8261;
  --brand-100: #e4efe8;
  --brand-050: #f0f6f2;

  --gold-600: #b98a3a;
  --gold-500: #c99a3f;
  --gold-100: #f6ecd8;

  /* Neutres */
  --ink-900: #1a1d1a;
  --ink-800: #22271f;
  --ink-700: #333a31;
  --ink-500: #5b615a;
  --ink-400: #6b6f68;
  --ink-300: #9aa096;

  --canvas: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --surface-sunken: #f1efe9;
  --border: #e4e2da;
  --border-strong: #d3d0c5;

  /* Sémantique */
  --success-700: #256b43;
  --success-100: #e2f0e6;
  --warning-700: #9a6516;
  --warning-100: #f7ecd8;
  --danger-700: #a63a3a;
  --danger-100: #f6e2e0;
  --info-700: #276781;
  --info-100: #e0eef3;

  --positive: #256b43;
  --negative: #a63a3a;

  /* Rayons */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 9px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* Ombres — discrètes */
  --shadow-xs: 0 1px 2px rgba(26, 29, 26, 0.06);
  --shadow-sm: 0 1px 3px rgba(26, 29, 26, 0.08), 0 1px 2px rgba(26, 29, 26, 0.04);
  --shadow-md: 0 4px 12px rgba(26, 29, 26, 0.08), 0 2px 4px rgba(26, 29, 26, 0.04);
  --shadow-lg: 0 12px 32px rgba(26, 29, 26, 0.12);

  /* Espacement */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Typographie */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-mono: "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;

  --sidebar-w: 248px;
  --header-h: 60px;
  --content-max: 1180px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--ink-800);
  background: var(--canvas);
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 650;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}

a {
  color: var(--brand-700);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

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

::selection { background: var(--brand-100); }

:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

.icon { flex: none; vertical-align: middle; }

/* Utilitaires ---------------------------------------------------------- */
.u-muted { color: var(--ink-400); }
.u-small { font-size: var(--text-sm); }
.u-xs { font-size: var(--text-xs); }
.u-strong { font-weight: 650; }
.u-nowrap { white-space: nowrap; }
.u-right { text-align: right; }
.u-center { text-align: center; }
.u-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.u-tnum { font-variant-numeric: tabular-nums; }
.u-hidden { display: none !important; }
.u-mt-0 { margin-top: 0 !important; }
.u-mt-2 { margin-top: var(--space-2); }
.u-mt-3 { margin-top: var(--space-3); }
.u-mt-4 { margin-top: var(--space-4); }
.u-mt-5 { margin-top: var(--space-5); }
.u-mb-3 { margin-bottom: var(--space-3); }
.u-mb-4 { margin-bottom: var(--space-4); }
.u-mb-5 { margin-bottom: var(--space-5); }
.u-flex { display: flex; }
.u-flex-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.u-flex-center { display: flex; align-items: center; gap: var(--space-2); }
.u-gap-2 { gap: var(--space-2); }
.u-gap-3 { gap: var(--space-3); }
.u-wrap { flex-wrap: wrap; }
.u-grow { flex: 1; }

.amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount--positive { color: var(--positive); }
.amount--negative { color: var(--negative); }

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

.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
