/* ============================================================
   BASE — Design tokens + reset
   ============================================================ */

:root {
  /* Couleurs — mode clair */
  --color-bg:           #ffffff;
  --color-bg-2:         #f7f7f7;
  --color-bg-3:         #eeeeee;
  --color-text:         #111111;
  --color-text-2:       #555555;
  --color-text-3:       #999999;
  --color-accent:       #F4A261;
  --color-accent-hover: #e8914f;
  --color-accent-light: rgba(244, 162, 97, 0.12);
  --color-accent-text:  #ffffff;
  --color-border:       #e8e8e8;
  --color-border-strong:#cccccc;
  --color-overlay:      rgba(0, 0, 0, 0.72);

  /* Ombres */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.07);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.09);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);

  /* Typographie */
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs:   0.75rem;
  --font-size-sm:   0.875rem;
  --font-size-base: 1rem;
  --font-size-lg:   1.125rem;
  --font-size-xl:   1.25rem;
  --font-size-2xl:  1.5rem;
  --font-size-3xl:  1.875rem;
  --font-size-4xl:  2.25rem;
  --font-size-5xl:  3rem;

  /* Espacement */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Rayons */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* Layout */
  --container-max:  1360px;
  --container-pad:  clamp(1rem, 4vw, 2.5rem);
  --header-height:  64px;
  --grid-cols:      4;
  --grid-gap:       20px;

  /* Transitions */
  --t-fast: 150ms ease;
  --t-base: 200ms ease;
  --t-slow: 350ms ease;
}

/* Dark mode */
[data-theme="dark"] {
  --color-bg:           #0f0f0f;
  --color-bg-2:         #1a1a1a;
  --color-bg-3:         #242424;
  --color-text:         #f0f0f0;
  --color-text-2:       #a0a0a0;
  --color-text-3:       #666666;
  --color-border:       #2a2a2a;
  --color-border-strong:#3a3a3a;
  --color-overlay:      rgba(0, 0, 0, 0.82);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.7);
}

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

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

body {
  font-family: var(--font);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color var(--t-slow), color var(--t-slow);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul, ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 600;
  color: var(--color-text);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -9999px;
  left: var(--sp-4);
  z-index: 9999;
  padding: var(--sp-2) var(--sp-4);
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 600;
}
.skip-link:focus {
  top: var(--sp-4);
}

/* Utilitaires */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

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