/* base.css - Color palette, typography, and base styles */

:root {
  /* Color Palette - Cartographic Bauhaus */
  --azur: #2B6CB0;           /* Azur Atlantique - liens, CTA */
  --sable: #F2E9DA;          /* Sable - fond principal doux */
  --nocturne: #0F172A;       /* Nocturne - titres/texte fort */
  --corail: #F56565;         /* Corail - petits accents, badges */
  --sauge: #5C7A6E;          /* Sauge - étiquettes, états secondaires */

  /* Semantic colors */
  --bg: var(--sable);
  --ink: var(--nocturne);
  --link: var(--azur);
  --accent: var(--corail);
  --secondary: var(--sauge);

  /* Design tokens */
  --radius: 14px;
  --space: clamp(16px, 2vw, 28px);
  --shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  --transition: 200ms ease;

  /* Typography scale */
  --h1-size: clamp(2.5rem, 4vw, 3.5rem);
  --h2-size: clamp(2rem, 3vw, 2.8rem);
  --h3-size: clamp(1.5rem, 2.5vw, 2rem);
  --text-base: 1rem;
  --text-small: 0.875rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
.h1, .h2, .h3, .h4, h1, h2, h3, h4 {
  font-family: "Bodoni Moda", serif;
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1.2;
  margin: 0 0 1rem 0;
}

.h1, h1 {
  font-size: var(--h1-size);
}

.h2, h2 {
  font-size: var(--h2-size);
}

.h3, h3 {
  font-size: var(--h3-size);
}

.h4, h4 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1rem 0;
}

.mono {
  font-family: "JetBrains Mono", monospace;
}

/* Links */
a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: color-mix(in srgb, var(--link) 80%, black);
}

a:focus {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* Lists */
ul, ol {
  margin: 0 0 1rem 0;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

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

/* Accessibility */
.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;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: color-mix(in srgb, var(--azur) 20%, transparent);
  color: var(--nocturne);
}

/* Smooth scrolling for reduced motion */
@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;
  }
}