/* ==========================================================================
   Regengo, tokens.css, v1 (2026-09-24)
   Custom properties + reset minimal. Charge ce fichier AVANT components.css.
   Site clair uniquement : aucun mode sombre.
   Breakpoints (en commentaire, les custom properties ne marchent pas dans
   les media queries) : sm 480px, md 768px, lg 1024px, xl 1280px.
   ========================================================================== */

:root {
  /* ---- Charte (5 couleurs, non négociables) ---------------------------- */
  --green-500: #068466;   /* primaire */
  --green-600: #056b53;   /* hover, et texte vert sur off-white */
  --ink-900:   #1b1e2a;   /* encre */
  --orange-500:#fc9f5b;   /* accent, texte ENCRE dessus, jamais blanc */
  --paper:     #f9f8f7;   /* fond de page */
  --teal-100:  #cef2f6;   /* surlignage */
  --white:     #ffffff;   /* surfaces */

  /* ---- Échelle verte (500 et 600 = charte, le reste dérivé) ------------- */
  --green-50:  #e6f4f0;
  --green-100: #cce9e1;
  --green-200: #9dd4c4;
  --green-300: #6cbea6;
  --green-400: #3aa388;
  --green-700: #045643;
  --green-800: #033f31;
  --green-900: #02291f;

  /* ---- Échelle encre (900 = charte) ------------------------------------ */
  --ink-800: #2a2e3b;
  --ink-700: #3a3e4a;
  --ink-600: #4a4f5d;
  --ink-500: #5b6070;    /* eyebrow, texte secondaire (6,3:1 sur blanc) */
  --ink-400: #7d8290;    /* placeholders uniquement, jamais du texte utile */
  --ink-300: #a4a8b3;
  --ink-200: #d0d2d8;
  --ink-100: #e9eaed;

  /* ---- Orange et teal (dérivés) ----------------------------------------- */
  --orange-100: #ffe9d9;
  --orange-300: #fdc59c;
  --orange-600: #ee8f47;   /* hover de l'accent, encre dessus 6,8:1 */
  --orange-700: #d97a37;
  --teal-50:    #e9f8fa;

  /* ---- Divers charte secondaire ---------------------------------------- */
  --blue-500: #3d52d5;     /* Cinquantenaire, info */
  --red-500:  #f15152;     /* bordures et fonds d'erreur */
  --red-700:  #b8322f;     /* texte d'erreur (5,9:1 sur blanc) */

  /* ---- Sémantiques ------------------------------------------------------ */
  --color-primary:        var(--green-500);
  --color-primary-hover:  var(--green-600);
  --color-on-primary:     var(--white);
  --color-accent:         var(--orange-500);
  --color-accent-hover:   var(--orange-600);
  --color-on-accent:      var(--ink-900);
  --color-bg:             var(--paper);
  --color-fg:             var(--ink-900);
  --color-surface:        var(--white);
  --color-on-surface:     var(--ink-900);
  --color-muted:          #eef3f1;        /* fond de section discret, teinté vert */
  --color-muted-fg:       var(--ink-500);
  --color-border:         rgba(27, 30, 42, 0.10);
  --color-border-strong:  rgba(27, 30, 42, 0.20);
  --color-ring:           var(--green-500);
  --color-link:           var(--green-600); /* passe sur blanc (5,6:1) et sur off-white (5,3:1) */
  --color-highlight:      var(--teal-100);
  --color-error:          var(--red-700);
  --color-error-border:   var(--red-500);
  --color-success-bg:     var(--green-50);
  --color-success-fg:     var(--green-700);

  /* ---- Centres (barre 4 px + point 10 px, toujours avec le nom) --------- */
  --c-evere:             #068466;
  --c-cinquantenaire:    #3d52d5;
  --c-ixelles:           #fc9f5b;
  --c-bruxelles-central: #7b5cc4;   /* proposée, à valider avec Mathieu */
  /* teintes douces (fonds de hero centre, chips, media des cartes) */
  --c-evere-soft:             color-mix(in srgb, var(--c-evere) 12%, var(--white));
  --c-cinquantenaire-soft:    color-mix(in srgb, var(--c-cinquantenaire) 12%, var(--white));
  --c-ixelles-soft:           color-mix(in srgb, var(--c-ixelles) 16%, var(--white));
  --c-bruxelles-central-soft: color-mix(in srgb, var(--c-bruxelles-central) 12%, var(--white));
  /* valeur par défaut du fil de couleur quand aucun centre n'est posé */
  --centre:      var(--ink-200);
  --centre-soft: var(--ink-100);

  /* ---- Pastels de spécialité (texte encre dessus, 5,6:1 minimum) -------- */
  --s-kinesitherapie:        #96ceb4;   /* 9,3:1 */
  --s-osteopathie:           #b1bce6;   /* 8,9:1 */
  --s-massage:               #fba1a1;   /* 8,5:1 */
  --s-coaching-sportif:      #ff7777;   /* 6,4:1 */
  --s-dietetique:            #ffad60;   /* 9,0:1 */
  --s-psychologie:           #e8918d;   /* 7,0:1 ; adouci : le #d9534f de content.json ne fait que 4,2:1 sous l'encre */
  --s-logopedie:             #839aa8;   /* 5,65:1, le plancher */
  --s-medecine-generale:     #f2d060;   /* 11:1 */
  --s-podologie:             #cef2f6;   /* 13:1, proposée */
  --s-medecin-nutritionniste:#d9c8f2;   /* 10,7:1, proposée */

  /* ---- Typographie ------------------------------------------------------ */
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body:    'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --text-display: clamp(2.5rem, 1.5rem + 3.2vw, 4rem);        /* 40 à 64 px : "Vos kinésithérapeutes" tient sur une ligne à 1440 */
  --text-h1:      clamp(2.25rem, 1.5rem + 2.8vw, 3.5rem);     /* 36 à 56 px */
  --text-h2:      clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);     /* 28 à 40 px */
  --text-h3:      clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);   /* 22 à 28 px */
  --text-h4:      1.25rem;                                     /* 20 px */
  --text-lead:    clamp(1.125rem, 1rem + 0.4vw, 1.25rem);     /* 18 à 20 px */
  --text-body:    1rem;
  --text-small:   0.875rem;
  --text-caption: 0.75rem;
  --text-eyebrow: 0.8125rem;

  --leading-display: 1.0;
  --leading-h1: 1.1;
  --leading-h2: 1.15;
  --leading-h3: 1.25;
  --leading-h4: 1.3;
  --leading-lead: 1.5;
  --leading-body: 1.6;

  --tracking-display: -0.02em;
  --tracking-h1: -0.02em;
  --tracking-h2: -0.01em;
  --tracking-eyebrow: 0.08em;

  /* ---- Espacement, base 4/8 --------------------------------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-30: 120px;
  --section-y: clamp(4rem, 2.5rem + 5vw, 7rem);   /* 64 px mobile, 112 px desktop */

  /* ---- Layout ----------------------------------------------------------- */
  --container: 1200px;
  --prose: 720px;
  --gutter: max(20px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));  /* 24 dès md, 32 dès lg, jamais sous l'encoche en paysage */
  --grid-gap: 24px;
  --nav-h: 64px;           /* 80 dès lg */

  /* ---- Rayons ------------------------------------------------------------ */
  --radius-sm: 6px;
  --radius-md: 8px;        /* boutons, inputs */
  --radius-lg: 12px;       /* images */
  --radius-xl: 16px;       /* cartes */
  --radius-2xl: 24px;
  --radius-pill: 999px;
  --radius-arch: 999px 999px var(--radius-2xl) var(--radius-2xl);  /* photo du hero */

  /* ---- Ombres (douces, jamais dures) ------------------------------------ */
  --shadow-sm: 0 2px 8px rgba(27, 30, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(27, 30, 42, 0.10);
  --shadow-lg: 0 8px 32px rgba(27, 30, 42, 0.10);
  --shadow-focus: 0 0 0 2px var(--white), 0 0 0 4px var(--color-ring);

  /* ---- Motion ------------------------------------------------------------ */
  --dur-fast: 150ms;
  --dur: 200ms;
  --dur-slow: 300ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --lift: translateY(-2px);
}

@media (min-width: 768px) {
  :root { --gutter: max(24px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)); }
}
@media (min-width: 1024px) {
  :root { --gutter: max(32px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)); --nav-h: 80px; }
}
/* COURT : téléphone en paysage (MOBILE-SPEC M13) */
@media (max-width: 1023px) and (max-height: 500px) {
  :root { --section-y: 40px; --nav-h: 52px; }
}

/* ==========================================================================
   Reset minimal
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
/* TACTILE : le saut d'ancre au chargement d'une page est instantané, seuls les liens internes glissent */
@media (max-width: 1023px) {
  html { scroll-behavior: auto; }
  html:focus-within { scroll-behavior: smooth; }
}
/* Verrou de défilement : menu ouvert ou dialog modal ouvert */
html.nav-open, html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  background: #f9f8f7;
  color: var(--color-fg);
  font-family: var(--font-body);
  font-size: 1rem; /* suit le réglage de taille de texte */
  line-height: 1.6;
  font-weight: 500;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-optical-sizing: auto;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
h1 { font-size: var(--text-h1); line-height: var(--leading-h1); letter-spacing: var(--tracking-h1); }
h2 { font-size: var(--text-h2); line-height: var(--leading-h2); letter-spacing: var(--tracking-h2); }
h3 { font-size: var(--text-h3); line-height: var(--leading-h3); }
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-optical-sizing: auto;
  font-size: var(--text-h4);
  line-height: var(--leading-h4);
}
h5, h6 { font-size: var(--text-body); line-height: var(--leading-body); font-weight: 700; }

p { text-wrap: pretty; }

a { color: var(--color-link); text-underline-offset: 0.15em; text-decoration-thickness: from-font; }
@media (hover: hover) and (pointer: fine) {
  a:hover { color: var(--green-700); }
}

img, svg, video, picture { display: block; max-width: 100%; height: auto; }
img { font-style: italic; color: var(--ink-500); } /* alt lisible si l'image manque */

button, input, select, textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
button { cursor: pointer; background: none; border: 0; padding: 0; }
a, button, summary, label, [role="tab"] { touch-action: manipulation; }

table { border-collapse: collapse; width: 100%; }

hr { border: 0; border-top: 1px solid var(--color-border); margin: var(--space-8) 0; }

::selection { background: var(--teal-100); color: var(--ink-900); }

:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Reste le dernier bloc du fichier. html:focus-within bat html seul, il faut le citer. */
@media (prefers-reduced-motion: reduce) {
  html, html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
