/* Aidée — Design tokens du site public (Sprint #141 J3, 5 juin 2026)
 *
 * Source : rapport DA/UX silver-tech 5/06 + AIPD §3.5 accessibilité seniors.
 * Palette 5 couleurs strictes + échelle d'espacement Tailwind par défaut.
 * Stack system fonts (pas de Google Fonts, souveraineté CLAUDE.md).
 */

:root {
  /* Palette — 5 couleurs strictes */
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-700: #047857;  /* primaire — santé non clinique */
  --emerald-800: #065f46;  /* primaire hover */

  --amber-50: #fffbeb;     /* fond hero chaleureux */
  --amber-100: #fef3c7;
  --amber-700: #b45309;    /* accent badges, étoiles */

  --stone-50: #fafaf9;     /* fond neutre principal — réchauffé vs zinc froid */
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;    /* bordures */
  --stone-600: #57534e;    /* texte secondaire */
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;    /* texte primaire */

  /* Rouge réservé aux erreurs uniquement */
  --rose-50: #fff1f2;
  --rose-700: #be123c;

  /* Système typographique — system fonts, no Google Fonts */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Variable",
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Tailles (base 18px conforme AIPD §3.5 seniors) */
  --text-sm: 0.875rem;     /* 14px — labels secondaires */
  --text-base: 1.125rem;   /* 18px — corps texte par défaut */
  --text-lg: 1.25rem;      /* 20px — lead paragraphs */
  --text-xl: 1.5rem;       /* 24px — H4, sous-titres */
  --text-2xl: 1.875rem;    /* 30px — H3 */
  --text-3xl: 2.25rem;     /* 36px — H2 */
  --text-4xl: 3rem;        /* 48px — H1 desktop */

  /* Échelle d'espacement Tailwind par défaut */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Rayons */
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;

  /* Transitions — une seule règle globale */
  --transition: 200ms ease;

  /* Conteneurs */
  --container-narrow: 720px;
  --container: 1024px;
  --container-wide: 1200px;

  /* Ombres minimales — pas d'ombres lourdes (calm tech) */
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-md: 0 4px 12px rgba(28, 25, 23, 0.06);
}

/* === Reset minimal === */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--stone-900);
  background: var(--stone-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--emerald-700);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--emerald-800); }
a:focus-visible {
  outline: 2px solid var(--emerald-700);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* === Typographie === */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--stone-900);
  margin: 0;
}
h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

@media (max-width: 768px) {
  h1 { font-size: 2rem; }  /* 32px mobile */
  h2 { font-size: 1.625rem; }
  h3 { font-size: 1.375rem; }
}

p { margin: 0; }
p + p { margin-top: var(--space-4); }

/* === Composants utilitaires === */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-6); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--space-6); }
.container-wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 var(--space-6); }

@media (min-width: 768px) {
  .container, .container-narrow, .container-wide {
    padding: 0 var(--space-8);
  }
}

.section { padding: var(--space-16) 0; }
@media (min-width: 768px) {
  .section { padding: var(--space-24) 0; }
}

/* CTAs — boutons accessibles ≥ 48×48 px */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 48px;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: var(--text-base);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition);
}
.btn-primary {
  background: var(--emerald-700);
  color: white;
  border-color: var(--emerald-700);
}
.btn-primary:hover { background: var(--emerald-800); border-color: var(--emerald-800); color: white; }
.btn-ghost {
  background: white;
  color: var(--stone-700);
  border-color: var(--stone-200);
}
.btn-ghost:hover { border-color: var(--stone-600); color: var(--stone-900); }

/* Cards — bordure qui s'active au hover, pas de shadow lourd */
.card {
  background: white;
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--emerald-700); }

/* === Badges (pour Confiance, Conformité) === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background: var(--emerald-50);
  color: var(--emerald-800);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 600;
}

/* === Fade-in au scroll subtil (200-400ms) === */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity 400ms ease, transform 400ms ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
