/* ============================================================
 * Meilleure Santé — design system
 * Identité éditoriale "revue santé" — DISTINCTE de french-doc
 * (vert/serif italic) et des produits (#0461CF). Teal clinique
 * + sérif éditorial Newsreader + sans Inter. Cloisonnement visuel.
 * ============================================================ */

:root {
  /* Surfaces (OKLCH, near-white cool — pas le cream chaud de french-doc) */
  --bg:        oklch(0.986 0.004 185);
  --surface:   oklch(1 0 0);
  --surface-2: oklch(0.975 0.006 185);

  /* Ink */
  --ink:    oklch(0.25 0.02 180);   /* near-black slate — ~15:1 */
  --ink-2:  oklch(0.42 0.02 180);   /* ~8:1 */
  --muted:  oklch(0.53 0.018 180);  /* ~4.7:1 AA */

  /* Brand — teal clinique (≠ #065F46 french-doc, ≠ #0461CF produits) */
  --brand:      oklch(0.56 0.095 197);
  --brand-dark: oklch(0.47 0.095 197);
  --brand-soft: oklch(0.96 0.032 197);

  /* CTA partenaire (téléconsult) — vert d'action, distinct du brand */
  --action:      oklch(0.62 0.14 150);
  --action-dark: oklch(0.54 0.14 150);

  --border:   oklch(0.92 0.008 185);
  --border-2: oklch(0.86 0.01 185);

  --warn-bg:   oklch(0.96 0.04 75);
  --warn-bd:   oklch(0.85 0.09 75);
  --warn-ink:  oklch(0.45 0.11 55);

  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --maxw:      1080px;
  --maxw-read: 720px;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,33,31,0.04), 0 8px 24px rgba(20,33,31,0.05);

  --ease: cubic-bezier(0.25, 1, 0.5, 1);
}

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

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

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; gap: 24px;
  height: 62px;
}
.wordmark {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 21px; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.wordmark .mark-accent { color: var(--brand); }
.site-nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.site-nav a {
  font-size: 14.5px; font-weight: 500; color: var(--ink-2); text-decoration: none;
  transition: color 0.15s var(--ease);
}
.site-nav a:hover { color: var(--brand); }
@media (max-width: 620px) { .site-nav { display: none; } }

/* ── Home hero ──────────────────────────────────────────────── */
.hero { padding: 76px 0 56px; }
.hero__eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 18px;
}
.hero__title {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(2.4rem, 5.5vw, 3.9rem); line-height: 1.08; letter-spacing: -0.025em;
  color: var(--ink); max-width: 16ch; text-wrap: balance;
}
.hero__sub {
  margin-top: 22px; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-2);
  max-width: 56ch; line-height: 1.6;
}
.hero__actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; padding: 13px 22px; border-radius: 11px;
  text-decoration: none; transition: transform 0.15s var(--ease), background 0.15s, box-shadow 0.15s;
}
.btn--primary { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--brand-dark); transform: translateY(-1px); text-decoration: none; }
.btn--ghost { color: var(--ink-2); }
.btn--ghost:hover { color: var(--brand); text-decoration: none; }
.trust-row {
  margin-top: 30px; display: flex; flex-wrap: wrap; gap: 18px;
  font-size: 13.5px; color: var(--muted);
}
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row svg { color: var(--brand); flex-shrink: 0; }

/* ── Guides grid ────────────────────────────────────────────── */
.section { padding: 56px 0; }
.section-head { margin-bottom: 32px; }
.section-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); }
.section-title { font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.02em; margin-top: 8px; color: var(--ink); }
.section-sub { margin-top: 10px; color: var(--ink-2); max-width: 60ch; }

.guides-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.guide-card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; transition: border-color 0.15s, transform 0.15s var(--ease), box-shadow 0.15s;
}
.guide-card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.guide-card h3 { font-family: var(--font-serif); font-weight: 600; font-size: 1.25rem; color: var(--ink); letter-spacing: -0.01em; }
.guide-card p { margin-top: 8px; font-size: 14.5px; color: var(--muted); }
.guide-card .arrow { margin-top: 14px; color: var(--brand); font-weight: 600; font-size: 14px; }

/* ── Method / trust block ───────────────────────────────────── */
.method { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.method-step h4 { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.method-step p { font-size: 14px; color: var(--muted); }
.method-step .step-k { font-family: var(--font-serif); font-size: 1.4rem; color: var(--brand); font-weight: 600; }

/* ── Article ────────────────────────────────────────────────── */
.article { max-width: var(--maxw-read); margin: 0 auto; padding: 40px 24px 72px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }
.article h1 {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.85rem); line-height: 1.12; letter-spacing: -0.025em;
  color: var(--ink); text-wrap: balance;
}
.byline {
  margin: 20px 0 0; padding-bottom: 22px; border-bottom: 1px solid var(--border);
  font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
}
.byline strong { color: var(--ink-2); font-weight: 600; }
.byline a { color: var(--brand-dark); }
.byline .review-pending { color: var(--warn-ink); font-weight: 600; }

.answer-box {
  background: var(--brand-soft); border: 1px solid color-mix(in oklch, var(--brand) 25%, var(--border));
  border-radius: var(--radius); padding: 22px 24px; margin: 32px 0;
}
.answer-box h2 { font-family: var(--font-sans); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-dark); margin-bottom: 12px; }
.answer-box ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.answer-box li { position: relative; padding-left: 24px; font-size: 15.5px; color: var(--ink); }
.answer-box li::before { content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

.article-body { font-size: 17.5px; }
.article-body h2 {
  font-family: var(--font-serif); font-weight: 600; font-size: 1.6rem; letter-spacing: -0.015em;
  color: var(--ink); margin: 44px 0 14px; line-height: 1.25;
}
.article-body h3 { font-size: 1.2rem; font-weight: 700; color: var(--ink); margin: 28px 0 10px; }
.article-body p { margin: 0 0 18px; color: var(--ink-2); }
.article-body ul, .article-body ol { margin: 0 0 18px 22px; color: var(--ink-2); }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body a { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 2px; }

/* CTA partenaire (téléconsult) — flux sortant rel=sponsored */
.cta-block {
  background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius);
  padding: 26px; margin: 34px 0; box-shadow: var(--shadow);
}
.cta-block p { font-size: 15px; color: var(--ink-2); margin-bottom: 16px; }
.cta-block__btn {
  display: inline-flex; align-items: center; gap: 8px; background: var(--action); color: #fff;
  font-weight: 600; font-size: 15px; padding: 13px 22px; border-radius: 11px; text-decoration: none;
  transition: background 0.15s, transform 0.15s var(--ease);
}
.cta-block__btn:hover { background: var(--action-dark); transform: translateY(-1px); text-decoration: none; }
.cta-block__note { display: block; margin-top: 12px; font-size: 12.5px; color: var(--muted); }

/* Callouts */
.callout { border-radius: 12px; padding: 16px 18px; margin: 24px 0; font-size: 15px; }
.callout--info { background: var(--brand-soft); border: 1px solid color-mix(in oklch, var(--brand) 20%, var(--border)); color: var(--ink-2); }
.callout--warn { background: var(--warn-bg); border: 1px solid var(--warn-bd); color: var(--warn-ink); }
.callout strong { color: inherit; }

/* FAQ */
.faq { margin: 40px 0; }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__item summary {
  cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600; color: var(--ink); font-size: 16px;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; color: var(--brand); font-weight: 400; font-size: 22px; transition: transform 0.2s var(--ease); }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { padding: 0 0 18px; color: var(--ink-2); font-size: 15.5px; }

/* Disclaimer + sources */
.disclaimer {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; margin: 22px 0; font-size: 13.5px; color: var(--muted); line-height: 1.6;
}
.disclaimer strong { color: var(--ink-2); }
.sources { margin: 32px 0 0; font-size: 13.5px; color: var(--muted); }
.sources h2 { font-family: var(--font-sans); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.sources ul { margin-left: 18px; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); background: var(--surface-2); padding: 44px 0; margin-top: 40px; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.foot-brand { max-width: 320px; }
.foot-brand .wordmark { font-size: 19px; }
.foot-brand p { margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.foot-col h5 { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.foot-col a { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 8px; text-decoration: none; }
.foot-col a:hover { color: var(--brand); }
.foot-legal { width: 100%; border-top: 1px solid var(--border); margin-top: 24px; padding-top: 18px; font-size: 12.5px; color: var(--muted); }

/* ── Références fiables ─────────────────────────────────────── */
.ref-intro { max-width: 62ch; margin: 0 auto 8px; text-align: center; }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 8px; }
.ref-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; display: flex; flex-direction: column; }
.ref-meta { font-size: 11px; font-weight: 700; color: var(--brand); letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 9px; }
.ref-card h3 { font-family: var(--font-serif); font-weight: 600; font-size: 1.2rem; color: var(--ink); letter-spacing: -0.01em; }
.ref-card p { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); }
.ref-use { margin-top: 11px; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.ref-use strong { color: var(--ink-2); font-weight: 600; }
.ref-card .ext { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 6px; color: var(--brand-dark); font-weight: 600; font-size: 14px; }
.ref-card .ext:hover { text-decoration: underline; }
.ref-urgence { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin-top: 8px; }
.ref-urgence ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.ref-urgence li { font-size: 14px; color: var(--ink-2); }
.ref-urgence .num { font-weight: 700; color: var(--ink); }

/* ── Sélecteur de langue ────────────────────────────────────── */
.lang-switch { display: flex; gap: 1px; margin-inline-start: 14px; flex-shrink: 0; align-items: center; }
.lang-switch a { font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 7px; border-radius: 6px; text-decoration: none; transition: color .15s, background .15s; }
.lang-switch a:hover { color: var(--brand); }
.lang-switch a.active { color: var(--brand); background: var(--brand-soft); }
@media (max-width: 620px) { .lang-switch { margin-inline-start: auto; } }

/* ── RTL (arabe) ────────────────────────────────────────────── */
[dir="rtl"] .site-nav { margin-left: 0; margin-right: auto; }
[dir="rtl"] .answer-box li { padding-left: 0; padding-right: 24px; }
[dir="rtl"] .answer-box li::before { left: auto; right: 0; }
[dir="rtl"] .article-body ul, [dir="rtl"] .article-body ol { margin-left: 0; margin-right: 22px; }
[dir="rtl"] .faq__item summary { flex-direction: row-reverse; }
[dir="rtl"] .lang-switch { margin-inline-start: 14px; }
