/* ============================================================
   la-creatine.fr — Redesign "Pharmacopée"
   Design system résolu (clinique + warm + serif + gold + action)
   Adapté du handoff Claude Design (page-home.jsx / styles.css)
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --maxw: 1240px;
  --gutter: 24px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  /* Base — Pharmacopée (clinique + warm cream) */
  --bg:            oklch(0.97 0.014 85);   /* crème */
  --bg-2:          oklch(0.95 0.016 85);
  --surface:       oklch(0.985 0.010 85);
  --surface-2:     oklch(0.955 0.014 85);
  --border:        oklch(0.86 0.018 85);
  --border-strong: oklch(0.72 0.006 90);

  --text:          oklch(0.16 0.018 270);  /* ink */
  --text-2:        oklch(0.32 0.014 270);
  --text-mute:     oklch(0.52 0.010 270);

  --accent:        oklch(0.20 0.02 270);    /* ink éditorial */
  --accent-2:      oklch(0.30 0.02 270);
  --accent-ink:    oklch(1 0 0);

  --accent-gold:   oklch(0.62 0.10 72);     /* filets dorés */

  --action:        oklch(0.58 0.19 32);     /* vermillon — CTAs + scores */
  --action-2:      oklch(0.50 0.18 32);

  --good:          oklch(0.50 0.16 145);
  --warn:          oklch(0.62 0.16 75);
  --bad:           oklch(0.52 0.20 22);

  --font-sans:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Instrument Serif", "Source Serif Pro", Georgia, serif;
  --font-mono:    "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-serif:   "Instrument Serif", "Source Serif Pro", Georgia, serif;

  --display-tracking: -0.015em;
  --hero-weight: 400;            /* serif : volontairement léger */

  --shadow-sm: 0 1px 0 rgba(20,24,40,.04);
  --shadow:    0 12px 40px -16px rgba(20,24,40,.12);
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .6; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: var(--display-tracking);
  font-weight: var(--hero-weight);
  line-height: 1.05;
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 5.6vw, 84px); line-height: 1.0; }
h2 { font-size: clamp(28px, 3.2vw, 48px); line-height: 1.1; }
h3 { font-size: clamp(20px, 1.6vw, 26px); line-height: 1.2; }
h4 { font-size: 17px; font-weight: 600; line-height: 1.3; }

p { color: var(--text-2); }
.lede { font-size: 19px; color: var(--text-2); max-width: 60ch; line-height: 1.55; }
.mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: -0.01em; }

/* ---------- Layout ---------- */
.page { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { width: 100%; max-width: 820px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(48px, 6vw, 96px) 0; }
.section-sm { padding: clamp(32px, 4vw, 56px) 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px; letter-spacing: -0.005em;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
  border: 1px solid transparent; white-space: nowrap; cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--action); color: #fff; border-color: var(--action); }
.btn-primary:hover { background: var(--action-2); border-color: var(--action-2); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn-ghost { color: var(--text); padding: 10px 14px; }
.btn-ghost:hover { background: var(--surface); }
.btn-lg { padding: 14px 22px; font-size: 15px; }

/* ---------- Cards & surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card-hover { transition: border-color .18s, transform .18s; }
.card-hover:hover { border-color: var(--border-strong); }
.surface-2 { background: var(--surface-2); }
.hairline { border: 1px solid var(--border); }
.divider { height: 1px; background: var(--border); width: 100%; }

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2); font-family: var(--font-sans);
}
.pill-mono { font-family: var(--font-mono); font-weight: 500; }
.pill-accent { background: color-mix(in oklch, var(--accent-gold), transparent 84%); color: var(--accent-gold); border-color: color-mix(in oklch, var(--accent-gold), transparent 60%); }
.pill-good { background: color-mix(in oklch, var(--accent-gold), transparent 86%); color: var(--accent-gold); border-color: color-mix(in oklch, var(--accent-gold), transparent 60%); }
.pill-warn { background: color-mix(in oklch, var(--warn), transparent 80%); color: var(--warn); border-color: color-mix(in oklch, var(--warn), transparent 60%); }
.pill-bad  { background: color-mix(in oklch, var(--bad), transparent 80%); color: var(--bad); border-color: color-mix(in oklch, var(--bad), transparent 60%); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--bg), transparent 8%);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.nav-logo {
  display: inline-flex; align-items: baseline; gap: 2px;
  font-family: var(--font-display); font-size: 24px; font-weight: 400;
  letter-spacing: -0.01em; color: var(--text);
}
.nav-logo .dot { color: var(--accent-gold); }
.nav-logo .tld { color: var(--text-mute); font-weight: 400; font-size: 16px; margin-left: 1px; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a {
  padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-2); cursor: pointer; font-weight: 500;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface); }
.nav-burger { display: none; }

/* ---------- Footer ---------- */
.footer { margin-top: auto; border-top: 1px solid var(--border); background: var(--bg-2); padding: 64px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; }
.footer h5 { font-size: 12px; font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 16px; font-weight: 500; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--text-2); font-size: 14px; }
.footer ul a:hover { color: var(--text); }
.footer-base { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--text-mute); font-family: var(--font-mono); gap: 16px; flex-wrap: wrap; }
.footer-disclaimer { margin-top: 18px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 11.5px; color: var(--text-mute); line-height: 1.55; }
.footer-disclaimer strong { color: var(--text-2); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--text-mute); padding: 18px 0 0; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span.sep { opacity: .5; }

/* ---------- Score / bars ---------- */
.score { display: inline-flex; align-items: baseline; gap: 4px; font-family: var(--font-mono); font-weight: 600; }
.score-big { font-size: 38px; line-height: 1; color: var(--action); font-family: var(--font-display); }
.score-med { font-size: 22px; color: var(--text); }
.score-denom { color: var(--text-mute); font-size: .5em; font-weight: 400; }
.rank { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--accent-gold); }
.bar { position: relative; height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.bar-fill { position: absolute; inset: 0 auto 0 0; background: var(--action); border-radius: 999px; }

/* ---------- Placeholder image ---------- */
.placeholder {
  position: relative;
  background: repeating-linear-gradient(135deg, color-mix(in oklch, var(--text), transparent 92%) 0 8px, transparent 8px 16px), var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-mute); font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; overflow: hidden;
}
.placeholder::after { content: attr(data-label); padding: 4px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; }

/* ---------- Stat block ---------- */
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-family: var(--font-display); font-size: clamp(36px, 4vw, 56px); font-weight: var(--hero-weight); letter-spacing: var(--display-tracking); color: var(--text); line-height: 1; }
.stat-num .unit { font-size: .5em; color: var(--text-mute); margin-left: 4px; }
.stat-lbl { font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-mute); }

/* ---------- helpers ---------- */
.accent { color: var(--action); }
.text-mute { color: var(--text-mute); }
.text-2 { color: var(--text-2); }
.mono-num { font-family: var(--font-mono); font-feature-settings: "tnum"; }

.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 40px; gap: 24px; flex-wrap: wrap; }
.section-head .left { max-width: 64ch; }
.section-head h2 { margin-top: 8px; }

.banner { background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 32px; }

/* ============================================================
   OVERLAY pages WP rendues par Astra (catégories, articles)
   Scopé sous body.lc-redesign — applique la peau Pharmacopée
   ============================================================ */
body.lc-redesign .prose { color: var(--text-2); font-size: 17px; line-height: 1.7; }
body.lc-redesign .prose p { margin-bottom: 18px; }
body.lc-redesign .prose h2 { margin: 40px 0 16px; font-size: clamp(26px, 2.4vw, 34px); }
body.lc-redesign .prose h3 { margin: 32px 0 12px; }
body.lc-redesign .prose ul, body.lc-redesign .prose ol { margin: 0 0 18px 24px; color: var(--text-2); }
body.lc-redesign .prose li { margin-bottom: 8px; }
body.lc-redesign .prose blockquote { margin: 24px 0; padding: 18px 22px; border-left: 3px solid var(--accent-gold); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; color: var(--text); }
body.lc-redesign .prose strong { color: var(--text); }
body.lc-redesign .prose a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent-gold); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px var(--gutter) 16px; gap: 2px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; border-radius: var(--radius-sm); }
  .nav-burger { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
}
