/* Aidée — Design tokens du site public.
 *
 * Direction « éditorial chaleureux » (08/06/2026) : registre magazine/print,
 * polices Fraunces + Instrument Sans self-hostées (OFL 1.1, aucun CDN —
 * souveraineté CLAUDE.md), palette papier chaud, grilles asymétriques.
 *
 * Les variables et classes utilitaires « legacy » (--stone-*, .container,
 * .card, .badge) sont conservées pour le tunnel d'inscription.
 */

/* ============ FONTS (self-host, OFL 1.1) ============ */
@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  font-optical-sizing: auto;
}
@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  font-optical-sizing: auto;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/static/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/static/fonts/instrument-sans-latin-wght-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  /* ---- Palette éditoriale ---- */
  --paper: #FBF7F0;        /* fond papier chaud */
  --paper-2: #F5ECDE;      /* fond alterné plus profond */
  --ink: #211C16;          /* encre presque noire, chaude */
  --ink-soft: #5C5448;     /* texte secondaire */
  --line: #E4DACB;         /* filets */
  --line-strong: #D6C9B4;
  --emerald: #047857;      /* accent primaire — santé non clinique */
  --emerald-deep: #065F46;
  --emerald-tint: #E9F1EB;
  --gold: #B45309;         /* accent chaud rare */
  --dark: #211C16;
  --dark-paper: #EDE5D7;

  /* ---- Legacy (tunnel inscription) ---- */
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-700: #047857;
  --emerald-800: #065f46;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-700: #b45309;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --rose-50: #fff1f2;
  --rose-700: #be123c;

  /* ---- Typographie ---- */
  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-sans: var(--f-text); /* alias legacy */

  --text-sm: 0.9375rem;    /* 15px */
  --text-base: 1.125rem;   /* 18px — corps, lisibilité senior */
  --text-lg: 1.3125rem;    /* 21px — lead */
  --text-xl: 1.5rem;
  --text-2xl: 1.875rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;

  /* ---- Espacement ---- */
  --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;

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

  --transition: 200ms ease;

  --maxw: 1180px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --container-narrow: 720px;
  --container: 1024px;
  --container-wide: 1180px;

  --shadow-sm: 0 1px 2px rgba(33, 28, 22, 0.04);
  --shadow-md: 0 4px 12px rgba(33, 28, 22, 0.06);
}

/* ============ Reset ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-text);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; border-radius: 2px; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }

/* ============ Typographie ============ */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
  font-optical-sizing: auto;
}
p { margin: 0; }
.serif-italic { font-family: var(--f-display); font-style: italic; font-weight: 400; }

/* ============ Helpers layout ============ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.micro { font-size: var(--text-sm); color: var(--ink-soft); }

.kicker {
  font-family: var(--f-text);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--emerald);
}
.kicker.muted { color: var(--ink-soft); }

.numeral {
  font-family: var(--f-display);
  font-weight: 400;
  font-style: italic;
  color: var(--line-strong);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  line-height: 1;
}

.link-arrow {
  font-weight: 600;
  color: var(--emerald);
  border-bottom: 1.5px solid var(--emerald-tint);
  padding-bottom: 2px;
}
.link-arrow:hover { border-bottom-color: var(--emerald); }

/* ============ Boutons (pilule) ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font-family: var(--f-text); font-size: 1.0625rem; font-weight: 600;
  padding: 0.85rem 1.5rem; border-radius: 999px;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  min-height: 52px;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.btn-primary { background: var(--emerald); color: #fff; }
.btn-primary:hover { background: var(--emerald-deep); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #fff; }

/* ============ Sections éditoriales ============ */
section.block { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.sec-head { display: grid; grid-template-columns: 1fr; gap: 0.5rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.sec-head .kicker { margin-bottom: 0.4rem; }
.sec-head h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); max-width: 18ch; }

/* trust strip */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-2); }
.strip-inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 0; max-width: var(--maxw); margin: 0 auto; padding: 0.95rem var(--gutter); }
.strip-inner span { font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.13em; color: var(--ink-soft); padding: 0 1.4rem; border-right: 1px solid var(--line-strong); }
.strip-inner span:last-child { border-right: 0; }

/* routine — rangées numérotées */
.routine { display: grid; gap: 0; }
.routine .row { display: grid; grid-template-columns: auto 1fr; gap: 1.3rem 1.6rem; padding: 1.9rem 0; border-top: 1px solid var(--line); align-items: start; }
.routine .row:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .routine .row { grid-template-columns: 5.5rem 3rem 1fr; align-items: center; } }
/* #9A8459 : tan plus profond — contraste 3,34:1 sur le papier (≥3:1 grand texte, WCAG AA).
   --line-strong (#D6C9B4) était à 1,52 → échec contraste (audit Lighthouse 26/06). */
.routine .n { font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: 2.4rem; color: #9A8459; line-height: 1; }
.routine .ic { width: 42px; height: 42px; color: var(--emerald); }
.routine .ic svg { width: 100%; height: 100%; stroke-width: 1.4; }
.routine .tx h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 0.35rem; }
.routine .tx p { color: var(--ink-soft); max-width: 48ch; }

/* statement / pull-quote */
.statement { background: var(--paper-2); }
.statement .wrap { display: grid; grid-template-columns: 1fr; gap: 1.6rem; }
@media (min-width: 820px) { .statement .wrap { grid-template-columns: 1.3fr 0.7fr; gap: 3rem; align-items: end; } }
.statement blockquote { margin: 0; font-family: var(--f-display); font-weight: 400; font-style: italic; font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.12; letter-spacing: -0.01em; }
.statement blockquote b { font-style: normal; font-weight: 600; color: var(--emerald-deep); }
.statement .support p { color: var(--ink-soft); margin-bottom: 0.9rem; }

/* differentiator split + liste de définition */
.split { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; gap: clamp(3rem, 5vw, 5rem); align-items: start; } }
.split .lead-col h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: 1.2rem; }
.split .lead-col p { color: var(--ink-soft); margin-bottom: 1rem; max-width: 42ch; }
.deflist { display: grid; gap: 0; }
.deflist .d { padding: 1.15rem 0; border-top: 1px solid var(--line); }
.deflist .d:last-child { border-bottom: 1px solid var(--line); }
.deflist .d dt { font-family: var(--f-display); font-size: 1.25rem; font-weight: 600; display: flex; align-items: center; gap: 0.6rem; }
.deflist .d dt .mark { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); flex: none; }
.deflist .d dd { margin: 0.35rem 0 0 1.2rem; color: var(--ink-soft); font-size: 1rem; }

/* testimonial */
.testi { text-align: center; }
.testi blockquote { margin: 0 auto; max-width: 24ch; font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: clamp(1.8rem, 4.2vw, 2.9rem); line-height: 1.15; }
.testi .by { margin-top: 1.5rem; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-soft); font-weight: 600; }
.testi .by .ph { color: var(--gold); }

/* dark — manifeste engagement */
.dark { background: var(--dark); color: var(--dark-paper); }
.dark .kicker { color: #8FD0B2; }
.dark h2 { color: #fff; font-size: clamp(2rem, 4.4vw, 3rem); }
.manifest { display: grid; gap: 0; margin-top: 2.5rem; }
.manifest .m { display: grid; grid-template-columns: auto 1fr; gap: 1.3rem; padding: 1.5rem 0; border-top: 1px solid rgba(255,255,255,.14); align-items: baseline; }
.manifest .m:last-child { border-bottom: 1px solid rgba(255,255,255,.14); }
@media (min-width: 760px) { .manifest .m { grid-template-columns: 4rem 14rem 1fr; align-items: baseline; } }
.manifest .mn { font-family: var(--f-display); font-style: italic; color: #8FD0B2; font-size: 1.5rem; }
.manifest .mt { font-family: var(--f-display); font-size: 1.35rem; font-weight: 600; color: #fff; }
.manifest .md { color: #C9BFAE; font-size: 1rem; }
.manifest .md a { color: #8FD0B2; border-bottom: 1px solid rgba(143,208,178,.4); }

/* final cta */
.final { text-align: center; padding: clamp(4rem, 8vw, 7rem) 0; }
.final h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 18ch; margin: 0 auto 1.2rem; }
.final h2 em { font-style: italic; font-weight: 400; color: var(--emerald-deep); }
.final p { color: var(--ink-soft); font-size: 1.25rem; margin-bottom: 2rem; }

/* ============ Artifact produit (compte-rendu) ============ */
.artifact { position: relative; }
.sms { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem 1.2rem; box-shadow: 0 1px 0 var(--line); max-width: 330px; margin: 0 0 -2.2rem auto; position: relative; z-index: 2; }
.sms .hd { font-size: 0.8125rem; font-weight: 600; color: var(--ink-soft); letter-spacing: 0.02em; margin-bottom: 0.55rem; display: flex; align-items: center; gap: 0.4rem; }
.sms .bubble { background: var(--paper-2); border-radius: 4px 14px 14px 14px; padding: 0.8rem 0.9rem; font-size: 1rem; line-height: 1.5; }
.sms .bubble a { color: var(--emerald-deep); font-weight: 600; }
.report { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.6rem 1.6rem 1.4rem; box-shadow: 0 26px 50px -34px rgba(33,28,22,.5); }
.report .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.report .top .meta { font-size: 0.8125rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.1em; }
.report .top h2 { font-size: 1.5rem; font-weight: 600; margin-top: 0.25rem; }
.report .pill { font-size: 0.8125rem; font-weight: 600; color: var(--emerald-deep); background: var(--emerald-tint); padding: 0.3rem 0.7rem; border-radius: 999px; white-space: nowrap; }
.report .lead { font-size: 0.9375rem; color: var(--ink-soft); margin: 1rem 0 1.15rem; font-style: italic; font-family: var(--f-display); }
.verbatim { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.verbatim:last-child { border-bottom: 0; }
.verbatim .cat { font-family: var(--f-text); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.13em; color: var(--emerald); display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.verbatim .cat svg { width: 15px; height: 15px; }
.verbatim q { font-family: var(--f-display); font-size: 1.0625rem; font-style: italic; font-weight: 400; color: var(--ink); quotes: "«\00a0" "\00a0»"; line-height: 1.45; }

/* ============ Prose (pages texte : légal, sécurité) ============ */
.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 1rem; }
.prose h3 { font-size: 1.3rem; font-weight: 600; margin: 0 0 0.5rem; }
.prose p { color: var(--ink-soft); line-height: 1.75; }
.prose p + p { margin-top: 1rem; }
.prose .block-group { padding: 2.2rem 0; border-top: 1px solid var(--line); }
.prose .block-group:first-of-type { border-top: 0; }
.prose ul.clean { list-style: none; padding: 0; margin: 0.6rem 0 0; display: flex; flex-direction: column; gap: 0.6rem; }
.prose ul.clean li { color: var(--ink-soft); padding-left: 1.1rem; border-left: 2px solid var(--emerald-tint); }
.todo { background: #FBEAD2; color: #7A4A12; padding: 0 0.3em; border-radius: 4px; }

/* ============ Legacy utilitaires (tunnel inscription) ============ */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-xl); padding: var(--space-8); transition: border-color var(--transition); }
.card:hover { border-color: var(--emerald); }
.badge { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-3); background: var(--emerald-tint); color: var(--emerald-deep); border-radius: 999px; font-size: var(--text-sm); font-weight: 600; }

/* ============ Reveal au scroll ============ */
.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; }
  html { scroll-behavior: auto; }
}
