/* ==========================================================
   Caprifigue — styles.css
   Mobile-first. Figue #5A2A43 / feuille #4E6B3C / papier #F5F0E6 (DA planche de botanique).
   ========================================================== */

:root {
  /* Palette DA (project-spec art_direction, 02b) */
  --primary: #5A2A43;
  --primary-hover: #4A2237;
  --on-primary: #FFFFFF;
  --secondary: #4E6B3C;
  --secondary-hover: #3F5830;
  --bg: #F5F0E6;
  --surface: #FBF8F2;
  --text: #2A2326;
  --text-secondary: #4A4044;
  --text-strong: #1C1619;
  --text-muted: #6E6267;
  --text-faint: #B8AEA6;
  --fill: #ECE5D6;
  --border: #DDD3C2;
  --white: #FFFFFF;
  --callout-bg: #F1E9D2;
  --callout-text: #5C4515;
  --callout-border: #DCC89A;

  /* Tokens du front, remappés sur la palette */
  --c-primary: var(--primary);
  --c-primary-dark: var(--primary-hover);
  --c-primary-deep: #3A1A2B;
  --c-secondary: var(--secondary);
  --c-secondary-soft: #E4EBDC;
  --c-leaf-light: #C9D8BC;
  --c-sky: var(--fill);
  --c-bg: var(--bg);
  --c-surface: var(--surface);
  --c-ink: var(--text);
  --c-muted: var(--text-muted);
  --c-line: var(--border);
  --c-plum: var(--secondary);
  --c-plum-soft: #E4EBDC;
  --c-ok: #1B7F5A;
  --c-ok-soft: #E3F5EC;
  --c-warn: #9A5B00;
  --c-warn-soft: #FFF3DC;

  --font-head: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(58, 26, 43, .08), 0 2px 8px rgba(58, 26, 43, .06);
  --shadow: 0 8px 28px rgba(58, 26, 43, .12);
  --maxw: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary-dark); text-underline-offset: 3px; }
a:hover { color: var(--c-primary); }
:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; color: var(--c-primary-deep); margin: 0 0 var(--s4); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 var(--s4); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s4); }
@media (min-width: 768px) { .container { padding: 0 var(--s6); } }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--c-primary-deep); color: #fff; padding: var(--s2) var(--s4); border-radius: var(--s2); z-index: 200; }
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(251, 248, 242, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--c-line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: var(--s4); }
.brand { display: inline-flex; align-items: center; gap: var(--s3); text-decoration: none; color: var(--c-primary-deep); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-head); font-size: 1.35rem; }
.brand-text small { font-size: .72rem; color: var(--c-muted); letter-spacing: .04em; text-transform: uppercase; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--c-line); background: #fff; border-radius: var(--s3); cursor: pointer; color: var(--c-primary-deep); }
.main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--c-line); box-shadow: var(--shadow); padding: var(--s4); max-height: calc(100vh - 68px); overflow: auto; }
.main-nav.is-open { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav a { display: flex; align-items: center; gap: var(--s1); padding: var(--s3) var(--s2); text-decoration: none; color: var(--c-ink); font-weight: 600; border-radius: var(--s2); }
.main-nav a:hover { background: var(--c-sky); color: var(--c-primary-dark); }
.main-nav .is-active > a { color: var(--c-primary); }
.main-nav .sub { padding-left: var(--s4); border-left: 2px solid var(--c-secondary); margin-bottom: var(--s2); }
.main-nav .sub a { font-weight: 500; font-size: .95rem; }
.main-nav [data-lucide], .main-nav svg.lucide { width: 16px; height: 16px; }
.nav-cta { margin-top: var(--s3); }
.nav-cta .btn { width: 100%; justify-content: center; color: #fff; }

@media (min-width: 1020px) {
  .nav-toggle { display: none; }
  .main-nav { display: block; position: static; box-shadow: none; border: 0; padding: 0; background: transparent; max-height: none; overflow: visible; }
  .main-nav > ul { display: flex; align-items: center; gap: var(--s1); }
  .main-nav > ul > li { position: relative; }
  .main-nav .sub { display: none; position: absolute; top: 100%; left: 0; min-width: 330px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: var(--s2); margin: 0; }
  .main-nav .has-sub:hover .sub, .main-nav .has-sub:focus-within .sub { display: block; }
  .main-nav .sub a { padding: var(--s2) var(--s3); }
  .nav-cta { margin: 0 0 0 var(--s2); }
  .nav-cta .btn { width: auto; }
}

/* ---------- Boutons, chips, badges ---------- */
.btn { display: inline-flex; align-items: center; gap: var(--s2); padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .2s, background .2s, box-shadow .2s, color .2s; font-family: inherit; line-height: 1.2; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--c-primary); color: #fff; box-shadow: 0 6px 16px rgba(90, 42, 67, .3); }
.btn-primary:hover { background: var(--c-primary-dark); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: #fff; color: var(--c-primary-dark); border-color: var(--c-primary); }
.btn-ghost:hover { background: var(--c-sky); color: var(--c-primary-dark); transform: translateY(-2px); }
.btn-sm { padding: 10px 18px; font-size: .95rem; }
.btn-light { background: #fff; color: var(--c-primary-deep); }
.btn-light:hover { background: var(--c-leaf-light); color: var(--c-primary-deep); transform: translateY(-2px); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; background: var(--c-secondary-soft); color: var(--c-primary-deep); border-radius: 999px; font-size: .85rem; font-weight: 600; margin-bottom: var(--s4); text-decoration: none; }
.chip svg { width: 16px; height: 16px; }
.chip-link:hover { background: var(--c-leaf-light); color: var(--c-primary-deep); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.badge-type { background: var(--c-primary); color: #fff; }
.badge-cycle { background: var(--c-secondary-soft); color: var(--c-primary-deep); }
.badge-plum { background: var(--c-plum-soft); color: var(--c-plum); }
.badge-warn { background: var(--c-warn-soft); color: var(--c-warn); }
.badge-ok { background: var(--c-ok-soft); color: var(--c-ok); }

/* ---------- Sections ---------- */
.section { padding: var(--s8) 0; }
.section-sky { background: var(--c-sky); }
.section-title { margin-bottom: var(--s6); }
.section-head { max-width: 720px; margin-bottom: var(--s6); }
.section-head p { color: var(--c-muted); font-size: 1.1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; font-weight: 700; color: var(--c-plum); margin-bottom: var(--s2); display: block; }

/* reveal */
.js .reveal-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal-on-scroll.revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal-on-scroll { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Home hero ---------- */
.hero { position: relative; background: linear-gradient(160deg, var(--c-sky) 0%, #fff 70%); overflow: hidden; padding: var(--s7) 0 var(--s8); }
.hero::before { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(78, 107, 60, .18), rgba(78, 107, 60, 0) 70%); top: -160px; right: -120px; }
.hero-grid { position: relative; display: grid; gap: var(--s7); align-items: center; }
.hero h1 { margin-bottom: var(--s5); }
.hero h1 em { font-style: normal; color: var(--c-primary); background: linear-gradient(transparent 62%, var(--c-leaf-light) 62%); }
.hero .lead { font-size: 1.2rem; color: var(--c-muted); max-width: 580px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
.hero-visual { position: relative; max-width: 460px; margin: 0 auto; width: 100%; }
.hero-visual img { border-radius: 220px 220px var(--radius) var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.float-card { position: absolute; background: #fff; border-radius: var(--radius-sm); padding: var(--s3) var(--s4); box-shadow: var(--shadow); font-size: .9rem; line-height: 1.35; max-width: 220px; border-left: 4px solid var(--c-primary); }
.float-card strong { display: block; font-family: var(--font-head); color: var(--c-primary-deep); font-size: 1rem; }
.float-card.fc-1 { left: -10px; bottom: 56px; }
.float-card.fc-2 { right: -10px; top: 40px; border-left-color: var(--c-plum); }
@media (min-width: 900px) {
  .hero { padding: var(--s8) 0 var(--s9); }
  .hero-grid { grid-template-columns: 1.15fr .85fr; }
  .float-card.fc-1 { left: -56px; }
  .float-card.fc-2 { right: -32px; }
}

/* ---------- Cards ---------- */
.cards { display: grid; gap: var(--s5); }
@media (min-width: 700px) { .cards-2 { grid-template-columns: repeat(2, 1fr); } .cards-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } .cards-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 700px) and (max-width: 999px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } }
.card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: var(--s5); box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s, border-color .25s; display: flex; flex-direction: column; }
.card h3 { margin-bottom: var(--s2); }
.card p { color: var(--c-muted); font-size: .98rem; flex: 1; }
.card-link { text-decoration: none; color: inherit; }
.card-link:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--c-secondary); color: inherit; }
.card-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--c-secondary-soft); color: var(--c-primary-dark); display: inline-flex; align-items: center; justify-content: center; margin-bottom: var(--s4); }
.card-kicker { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--c-plum); margin-bottom: var(--s1); }
.card-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--c-primary); margin-top: var(--s2); }
.card-more svg { width: 16px; height: 16px; transition: transform .2s; }
.card-link:hover .card-more svg { transform: translateX(4px); }

.pillar { position: relative; overflow: hidden; }
.pillar::after { content: attr(data-n); position: absolute; right: 16px; top: 4px; font-family: var(--font-head); font-size: 5rem; font-weight: 700; color: var(--c-sky); line-height: 1; z-index: 0; }
.pillar > * { position: relative; z-index: 1; }

/* ---------- Split ---------- */
.split { display: grid; gap: var(--s7); align-items: center; }
.split-img img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.reverse .split-img { order: 2; }
  .split-img { position: relative; }
  .split-img::before { content: ''; position: absolute; inset: 24px -24px -24px 24px; border: 3px solid var(--c-secondary); border-radius: var(--radius); z-index: -1; }
  .split.reverse .split-img::before { inset: 24px 24px -24px -24px; }
}

/* Timeline calendrier */
.timeline { margin: var(--s5) 0; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: var(--s5); }
.tl-row { display: grid; grid-template-columns: 70px 1fr; gap: var(--s3); align-items: center; margin-bottom: var(--s3); font-size: .9rem; }
.tl-row:last-child { margin-bottom: 0; }
.tl-label { font-weight: 700; color: var(--c-primary-deep); }
.tl-bar { position: relative; height: 32px; background: var(--c-sky); border-radius: 8px; }
.tl-seg { position: absolute; top: 0; bottom: 0; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 600; color: #fff; padding: 0 6px; white-space: nowrap; overflow: hidden; }
.tl-seg.a { background: var(--c-primary); }
.tl-seg.b { background: var(--c-plum); }
.tl-months { display: grid; grid-template-columns: 70px 1fr; gap: var(--s3); font-size: .7rem; color: var(--c-muted); margin-bottom: var(--s2); }
.tl-months > span:last-child { display: grid; grid-template-columns: repeat(12, 1fr); text-align: center; }
@media (min-width: 640px) { .tl-row, .tl-months { grid-template-columns: 100px 1fr; } }

/* ---------- Diagnostic quick picks ---------- */
.symptoms { display: grid; gap: var(--s3); }
@media (min-width: 640px) { .symptoms { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .symptoms { grid-template-columns: repeat(5, 1fr); } }
.symptom { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s5); background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); text-decoration: none; color: var(--c-ink); font-weight: 600; line-height: 1.35; transition: transform .2s, border-color .2s, box-shadow .2s; }
.symptom:hover { transform: translateY(-4px); border-color: var(--c-primary); box-shadow: var(--shadow); color: var(--c-ink); }
.symptom svg { width: 28px; height: 28px; color: var(--c-primary); }
.symptom small { font-weight: 400; color: var(--c-muted); }

/* ---------- Article ---------- */
.article-hero { background: linear-gradient(160deg, var(--c-sky), #fff 75%); padding: var(--s6) 0 var(--s7); border-bottom: 1px solid var(--c-line); }
.article-hero-grid { display: grid; gap: var(--s6); align-items: center; }
.article-hero h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
.article-hero .lead { font-size: 1.15rem; color: var(--c-muted); }
.article-hero-img img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.meta { display: flex; flex-wrap: wrap; gap: var(--s4); font-size: .88rem; color: var(--c-muted); margin: var(--s4) 0 0; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg { width: 16px; height: 16px; }
@media (min-width: 900px) { .article-hero-grid { grid-template-columns: 1.25fr .75fr; } }

.crumbs { margin-bottom: var(--s4); font-size: .85rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; color: var(--c-muted); }
.crumbs li + li::before { content: '›'; margin-right: 6px; color: var(--c-muted); }
.crumbs a { color: var(--c-primary-dark); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs li[aria-current] { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.article-layout { display: block; padding-top: var(--s7); padding-bottom: var(--s7); }
.toc { display: none; }
@media (min-width: 1000px) {
  .article-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: var(--s8); align-items: start; }
  .toc { display: block; position: sticky; top: 96px; }
}
.toc-title { font-family: var(--font-head); font-weight: 700; color: var(--c-primary-deep); margin-bottom: var(--s3); font-size: 1.05rem; }
.toc ul { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--c-line); }
.toc a { display: block; padding: 6px 0 6px var(--s4); margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--c-muted); font-size: .9rem; line-height: 1.4; }
.toc a:hover { color: var(--c-primary); }
.toc a.on { color: var(--c-primary-dark); border-left-color: var(--c-primary); font-weight: 600; }

.prose { max-width: 760px; }
.prose h2 { margin-top: var(--s7); padding-top: var(--s2); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--s6); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 var(--s5); }
.prose li { margin-bottom: var(--s2); }
.prose li::marker { color: var(--c-primary); }
.prose strong { color: var(--c-primary-deep); }
.prose figure { margin: var(--s6) 0; }
.prose figure img { border-radius: var(--radius); width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.prose figcaption { font-size: .85rem; color: var(--c-muted); margin-top: var(--s2); }

/* Encadrés */
.why, .callout, .warn-box { border-radius: var(--radius); padding: var(--s5); margin: var(--s6) 0; border-left: 6px solid var(--c-primary); background: #fff; box-shadow: var(--shadow-sm); }
.why { background: linear-gradient(135deg, var(--c-secondary-soft), #fff 80%); border-left-color: var(--c-primary); }
.why-title, .callout-title { display: flex; align-items: center; gap: var(--s2); font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; color: var(--c-primary-deep); margin-bottom: var(--s2); }
.why-title svg, .callout-title svg { width: 22px; height: 22px; flex: none; }
.why > :last-child, .callout > :last-child, .warn-box > :last-child { margin-bottom: 0; }
.callout { border-left-color: var(--callout-border); background: var(--callout-bg); color: var(--callout-text); }
.callout .callout-title { color: var(--callout-text); }
.warn-box { border-left-color: #C98400; background: var(--c-warn-soft); }
.warn-box .callout-title { color: var(--c-warn); }

/* Tables */
.table-wrap { overflow-x: auto; margin: var(--s5) 0; border: 1px solid var(--c-line); border-radius: var(--radius); background: #fff; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
.table-wrap th, .table-wrap td { padding: var(--s3) var(--s4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--c-line); }
.table-wrap th { background: var(--c-primary-deep); color: #fff; font-weight: 600; font-size: .85rem; letter-spacing: .03em; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap tbody tr:nth-child(even) { background: var(--c-bg); }
.table-wrap td:first-child { font-weight: 600; color: var(--c-primary-deep); }

/* Causes (fiches de diagnostic) */
.prose .causes { list-style: none; padding: 0; margin: var(--s5) 0; }
.prose .causes > li { position: relative; background: #fff; border: 1px solid var(--c-line); border-left: 6px solid var(--c-primary); border-radius: var(--radius); padding: var(--s5); margin-bottom: var(--s4); box-shadow: var(--shadow-sm); }
.prose .causes h3 { margin: 0 0 var(--s2); font-size: 1.15rem; }
.prose .causes p { margin-bottom: var(--s2); }
.prose .causes .test { background: var(--c-sky); border-radius: var(--radius-sm); padding: var(--s3) var(--s4); font-size: .95rem; margin-top: var(--s3); }
.prose .causes .test strong { color: var(--c-primary-dark); }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-sm); margin-bottom: var(--s3); overflow: hidden; }
.faq summary { cursor: pointer; padding: var(--s4) var(--s5); font-weight: 600; color: var(--c-primary-deep); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.5rem; line-height: 1; color: var(--c-primary); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] summary { background: var(--c-sky); }
.faq-a { padding: var(--s4) var(--s5) var(--s2); }

/* ---------- Widgets ---------- */
.widget { background: #fff; border: 2px solid var(--c-secondary); border-radius: var(--radius); padding: var(--s5); margin: var(--s6) 0; box-shadow: var(--shadow); }
.widget-title { display: flex; align-items: center; gap: var(--s2); font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; color: var(--c-primary-deep); margin-bottom: var(--s4); }
.widget-title svg { color: var(--c-primary); }
.widget label, .widget .lbl { display: block; font-weight: 600; font-size: .95rem; margin-bottom: var(--s2); color: var(--c-primary-deep); }
.widget select, .widget input[type=range] { width: 100%; }
.widget select { padding: 12px 14px; border: 1px solid var(--c-line); border-radius: var(--radius-sm); font: inherit; background: #fff; color: var(--c-ink); }
.widget .row { display: grid; gap: var(--s4); margin-bottom: var(--s4); }
@media (min-width: 640px) { .widget .row.cols-2 { grid-template-columns: 1fr 1fr; } }
.widget input[type=range] { accent-color: var(--c-primary); }
.range-val { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: var(--c-primary); }
.result { background: var(--c-sky); border-radius: var(--radius-sm); padding: var(--s4) var(--s5); border-left: 5px solid var(--c-primary); margin-top: var(--s4); }
.result h3 { margin: 0 0 var(--s2); font-size: 1.1rem; }
.result p:last-child { margin-bottom: 0; }
.result.ok { background: var(--c-ok-soft); border-left-color: var(--c-ok); }
.result.warn { background: var(--c-warn-soft); border-left-color: #C98400; }
.result.alert { background: var(--c-plum-soft); border-left-color: var(--c-plum); }
.opt-list { display: grid; gap: var(--s2); margin: var(--s4) 0; }
.opt { text-align: left; padding: 14px 18px; border: 2px solid var(--c-line); border-radius: var(--radius-sm); background: #fff; font: inherit; font-weight: 500; cursor: pointer; color: var(--c-ink); transition: border-color .2s, background .2s; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.opt:hover { border-color: var(--c-primary); background: var(--c-sky); }
.opt svg { width: 18px; height: 18px; color: var(--c-primary); flex: none; }
.diag-progress { height: 6px; background: var(--c-sky); border-radius: 99px; overflow: hidden; margin-bottom: var(--s4); }
.diag-progress span { display: block; height: 100%; background: var(--c-primary); width: 0; transition: width .3s; }
.link-btn { background: none; border: 0; color: var(--c-primary-dark); font: inherit; font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Hubs ---------- */
.page-hero { background: linear-gradient(160deg, var(--c-sky), #fff 80%); padding: var(--s7) 0; border-bottom: 1px solid var(--c-line); }
.page-hero .lead { font-size: 1.15rem; color: var(--c-muted); max-width: 720px; }
.hub-list { display: grid; gap: var(--s5); }
.hub-item { display: grid; gap: var(--s5); background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s; }
.hub-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.hub-item img { width: 100%; height: 100%; min-height: 180px; object-fit: cover; }
.hub-item-body { padding: var(--s5); }
.hub-item-body h2 { font-size: 1.4rem; }
@media (min-width: 800px) { .hub-item { grid-template-columns: 300px 1fr; } .hub-item-body { padding: var(--s5) var(--s5) var(--s5) 0; } }

/* ---------- Registre ---------- */
.filters { display: grid; gap: var(--s3); background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: var(--s4); margin-bottom: var(--s6); box-shadow: var(--shadow-sm); }
@media (min-width: 800px) { .filters { grid-template-columns: 2fr 1fr 1fr auto; align-items: end; } }
.filters label { font-size: .8rem; font-weight: 700; color: var(--c-primary-deep); text-transform: uppercase; letter-spacing: .06em; display: block; margin-bottom: 4px; }
.filters input, .filters select { width: 100%; padding: 12px 14px; border: 1px solid var(--c-line); border-radius: var(--radius-sm); font: inherit; background: #fff; color: var(--c-ink); }
.counter { font-size: .95rem; color: var(--c-muted); margin: 0 0 var(--s4); }
.fiche-card .badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s3); }
.fiche-card h3 { margin-bottom: 2px; }
.fiche-card .syn { font-size: .85rem; color: var(--c-muted); margin-bottom: var(--s3); font-style: italic; flex: none; }
.empty-slot { border: 2px dashed var(--c-secondary); background: transparent; box-shadow: none; align-items: flex-start; justify-content: center; }
.empty-slot:hover { transform: none; }
.empty-slot a { color: var(--c-primary); font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
[hidden] { display: none !important; }

.fiche-layout { display: grid; gap: var(--s6); padding: var(--s7) 0; }
@media (min-width: 1000px) { .fiche-layout { grid-template-columns: 340px minmax(0, 1fr); align-items: start; } .fiche-side { position: sticky; top: 96px; } }
.fiche-id { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.fiche-id h2 { background: var(--c-primary-deep); color: #fff; font-size: 1rem; margin: 0; padding: var(--s3) var(--s5); font-family: var(--font-body); letter-spacing: .04em; text-transform: uppercase; }
.fiche-id dl { margin: 0; padding: var(--s2) var(--s5) var(--s4); }
.fiche-id dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--c-plum); margin-top: var(--s3); }
.fiche-id dd { margin: 2px 0 0; font-weight: 500; }
.undoc { color: var(--c-muted); font-style: italic; font-weight: 400; }
.sources { list-style: none; padding: 0 !important; margin: 0 0 var(--s5) !important; }
.sources li { padding: var(--s3) var(--s4); background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-sm); margin-bottom: var(--s2); font-size: .95rem; display: flex; gap: var(--s3); align-items: flex-start; }
.sources .src-type { flex: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-primary-deep); color: #EADFE4; padding: var(--s8) 0 var(--s5); margin-top: var(--s8); }
.footer-grid { display: grid; gap: var(--s6); }
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer a { color: #EADFE4; text-decoration: none; }
.site-footer a:hover { color: var(--c-leaf-light); text-decoration: underline; }
.brand-light { color: #fff; }
.brand-light small { color: var(--c-leaf-light); }
.site-footer .brand-text strong { color: #fff; }
.footer-brand p { margin-top: var(--s4); font-size: .95rem; max-width: 340px; }
.footer-title { font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--c-leaf-light); margin-bottom: var(--s3); }
.footer-title a { color: var(--c-leaf-light); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: var(--s2); font-size: .92rem; line-height: 1.45; }
.footer-bottom { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid rgba(255, 255, 255, .15); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); font-size: .85rem; }
.footer-bottom p { margin: 0; }
.footer-scope { color: var(--c-leaf-light); }

/* ---------- Bandeau CTA ---------- */
.cta-band { background: linear-gradient(120deg, var(--c-primary), var(--c-primary-deep)); color: #fff; border-radius: var(--radius); padding: var(--s7) var(--s5); display: grid; gap: var(--s5); align-items: center; box-shadow: var(--shadow); }
.cta-band h2 { color: #fff; margin-bottom: var(--s2); }
.cta-band p { margin: 0; color: #F1E6EB; }
@media (min-width: 800px) { .cta-band { grid-template-columns: 1fr auto; padding: var(--s7); } }

.principles { display: grid; gap: var(--s5); }
@media (min-width: 800px) { .principles { grid-template-columns: repeat(3, 1fr); } }
.principle { border-top: 4px solid var(--c-primary); padding-top: var(--s4); }
.principle:nth-child(2) { border-top-color: var(--c-plum); }
.principle:nth-child(3) { border-top-color: var(--c-secondary); }
.principle h3 { font-size: 1.15rem; }
.principle p { color: var(--c-muted); }

.scope-list { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; padding: 0; margin: var(--s4) 0 0; }
.scope-list li { background: #fff; border: 1px dashed var(--c-muted); color: var(--c-muted); border-radius: 999px; padding: 4px 14px; font-size: .88rem; text-decoration: line-through; }

.stat-row { display: grid; gap: var(--s4); grid-template-columns: repeat(3, 1fr); margin-top: var(--s6); }
.stat { text-align: center; padding: var(--s4); background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); }
.stat strong { display: block; font-family: var(--font-head); font-size: 1.8rem; color: var(--c-primary); line-height: 1.1; }
.stat span { font-size: .8rem; color: var(--c-muted); }

.notfound { text-align: center; padding: var(--s9) 0; }
.notfound .big { font-family: var(--font-head); font-size: clamp(5rem, 18vw, 9rem); color: var(--c-secondary); line-height: 1; font-weight: 700; }

/* ===== BLOC SOUS-MENU OUTILS — sans JavaScript (hover + focus-within) ===== */
.nav-item{position:relative;display:inline-flex;align-items:center}
.has-sub>a::after{content:"";display:inline-block;width:5px;height:5px;margin-left:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-2px)}
.has-sub::after{content:"";position:absolute;top:100%;left:0;right:0;height:18px}
.sub-nav{position:absolute;top:calc(100% + 18px);left:-16px;z-index:30;min-width:296px;flex-direction:column;gap:1px;padding:8px;background:var(--surface);border:1px solid var(--line);box-shadow:0 18px 34px rgba(31,58,77,.14);display:none}
.has-sub:hover>.sub-nav,.has-sub:focus-within>.sub-nav{display:flex}
.sub-nav a{display:block;padding:9px 12px;font-size:13px;font-weight:700;line-height:1.25;white-space:nowrap;border-left:2px solid transparent}
.sub-nav a small{display:block;margin-top:2px;font-family:var(--font-body);font-size:11px;font-weight:400;color:var(--text-muted)}
.sub-nav a:hover,.sub-nav a:focus{background:var(--fill);color:var(--primary);border-left-color:var(--primary)}
.sub-nav a:hover small,.sub-nav a:focus small{color:var(--text-secondary)}
.sub-nav-all{margin-top:5px;border-top:1px solid var(--line);padding-top:11px!important;color:var(--primary)}
@media(max-width:850px){
.nav-item{display:block}
.has-sub::after{display:none}
.has-sub>a::after{transform:rotate(45deg) translateY(-2px)}
.sub-nav{position:static;display:flex;min-width:0;margin:9px 0 4px 2px;padding:2px 0 2px 14px;border:0;border-left:2px solid var(--line);box-shadow:none;background:transparent;gap:0}
.sub-nav a{white-space:normal;padding:7px 0;font-size:13px;border-left:0}
.sub-nav a small{display:none}
.sub-nav a:hover,.sub-nav a:focus{background:transparent}
.sub-nav-all{padding-top:8px!important}
}

/* ===== Sous-menu Outils : cohabitation avec la nav du front (05b délégué) ===== */
:root { --line: var(--border); }
.main-nav .has-sub > a::after { content: none; }
.main-nav li.nav-item { display: list-item; }
.main-nav .sub .sub-nav-all { border-top: 1px solid var(--c-line); margin-top: var(--s1); color: var(--c-primary); }
.footer-stack nav + nav { margin-top: var(--s5); }

/* ===== BLOC LARGEUR UNIFIÉE — toutes les pages à la largeur de la home ===== */
/*
 * Posé par 06a2-largeur-contenu. Les sélecteurs ci-dessous ont été RELEVÉS
 * dans les feuilles réellement chargées par le front, pas devinés : c'est la
 * correction du défaut d'origine, où une liste de classes supposées rendait
 * le bloc inerte sans que rien ne le signale.
 *
 * Largeur de référence relevée sur `.container` : la largeur de `.container`.
 *
 * `!important` est délibéré. Une contrainte peut être déclarée dans une
 * feuille chargée APRÈS celle-ci, ou plus bas dans ce même fichier par un
 * bloc appendu ultérieurement : à spécificité égale elle gagnerait, et le
 * bloc serait posé, validé, et sans effet.
 *
 * Les contrôles de formulaire, les images et les cartes sont épargnés.
 *
 * Ce qui suit la borne « relevé automatique : fin » est CONSERVÉ au rejeu :
 * c'est là que vivent les règles tranchées à la main. N'écris rien au-dessus.
 */

/* --- relevé automatique : début --- */
.container{max-width:none!important}   /* styles.css : var(--maxw) */
.section-head{max-width:none!important}   /* styles.css : 720px */
.hero .lead{max-width:none!important}   /* styles.css : 580px */
.hero-visual{max-width:none!important}   /* styles.css : 460px */
.prose{max-width:none!important}   /* styles.css : 760px */
.page-hero .lead{max-width:none!important}   /* styles.css : 720px */
.footer-brand p{max-width:none!important}   /* styles.css : 340px */
.source-list{max-width:none!important}   /* styles.css : 820px */

/* Grilles à deux colonnes relevées, NON collapsées d'office : une grille de
   cartes se collapserait à tort. À trancher au brief 06a2, puis à écrire
   SOUS la borne de fin ci-dessous. */
/*   .hero-grid { grid-template-columns: 1.15fr .85fr }  (styles.css) */
/* --- relevé automatique : fin --- */

/* Règles tranchées à la main, conservées au rejeu de 06a2. */
/* Règles tranchées à la main, conservées au rejeu de 06a2. */
.content-narrow{max-width:none!important}
.content-narrow select,.content-narrow input[type=number],.content-narrow input[type=text]{max-width:520px}
.article-layout{width:min(1140px,calc(100% - 40px));margin-inline:auto}
.article-body{max-width:72ch}
.article-layout{width:min(100% - 28px,1140px)}

/* ===== Ancre de résultat des outils (05c) ===== */
.tool-anchor { scroll-margin-top: 96px; outline: none; }
html:has(#resultat[autofocus]) { scroll-behavior: auto; }
.tub-q { border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding: var(--s3) var(--s4); margin: 0 0 var(--s4); }
.tub-q label { display: inline-flex; align-items: center; gap: var(--s2); margin-right: var(--s4); min-height: 44px; }
.result .test { font-size: .95rem; color: var(--c-muted); }

/* ===== ENVELOPPE + OUVERTURE NORMÉE (couches 1 et 2 du gabarit) ===== */
.author-card{display:flex;gap:18px;align-items:flex-start;margin:0 0 22px;padding:20px 22px;background:var(--fill);border-left:3px solid var(--primary)}
.author-card .author-avatar{flex:0 0 auto;line-height:0}
.author-card .author-img{object-fit:cover}
.author-footer .author-card .author-img{width:88px;height:88px;object-fit:cover;border-radius:var(--radius-round, 50%)}
.author-footer .author-card .author-monogram{width:88px;height:88px;font-size:30px}
.author-name{margin:0;font-family:var(--font-heading);font-size:16px;font-weight:700;line-height:1.3}
.author-name a{color:var(--text-strong)}
.author-name a:hover{color:var(--primary)}
.author-job{display:block;margin-top:3px;font-size:11px;font-weight:400;text-transform:uppercase;letter-spacing:1.1px;color:var(--text-muted)}
.author-legit{margin:11px 0 0;font-size:14.5px;line-height:1.5;font-weight:600;color:var(--text-strong)}
.author-bio{margin:7px 0 0;font-size:13.5px;line-height:1.55;color:var(--text-secondary)}
.author-links{margin:10px 0 0;font-size:13px}
.author-links a{color:var(--primary);font-weight:700;border-bottom:1px solid currentColor}
.page-dates{display:flex;flex-wrap:wrap;gap:6px 20px;margin:0 0 22px;font-size:12px;color:var(--text-muted)}
.page-dates time{font-family:var(--font-mono);font-variant-numeric:tabular-nums;color:var(--text-secondary)}
.method-note{margin:0 0 26px;padding:17px 19px;background:var(--callout-bg);border:1px solid var(--callout-border);border-left:3px solid var(--primary)}
.method-note-title{margin:0 0 6px;font-family:var(--font-heading);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1.2px;color:var(--callout-text)}
.method-note p:last-child{margin:0;font-size:14px;line-height:1.6;color:var(--callout-text)}
.opening{margin:0 0 34px}
.opening .answer{margin:0;padding:22px 24px;background:var(--secondary);color:var(--white);font-family:var(--font-heading);font-size:clamp(17px,1.9vw,20px);line-height:1.45;letter-spacing:-.2px}
.essentials{margin:0;padding:20px 24px;background:var(--surface);border:1px solid var(--border);border-top:0}
.essentials-title{margin:0 0 10px;font-family:var(--font-heading);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1.2px;color:var(--text-muted)}
.essentials ul{margin:0;padding:0;list-style:none}
.essentials li{position:relative;padding:7px 0 7px 22px;font-size:15px;line-height:1.5;color:var(--text)}
.essentials li::before{content:"";position:absolute;left:0;top:15px;width:8px;height:2px;background:var(--primary)}
.scope{margin:0;padding:14px 24px;background:var(--fill);border:1px solid var(--border);border-top:0;font-size:13.5px;line-height:1.55;color:var(--text-secondary)}
.scope span{font-family:var(--font-heading);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1.1px;color:var(--text-muted);margin-right:6px}
.scope a{color:var(--secondary);font-weight:700;border-bottom:1px solid currentColor}
.scope a:hover{color:var(--primary)}
.update-log{margin:0;padding:20px 22px;border-top:2px solid var(--secondary);background:var(--fill)}
.update-log-title{margin:0 0 9px;font-family:var(--font-heading);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1.2px;color:var(--text-muted)}
.update-log ul{margin:0;padding:0;list-style:none}
.update-log li{padding:6px 0;font-size:13.5px;line-height:1.5;color:var(--text-secondary);border-bottom:1px solid var(--border)}
.update-log li:last-child{border-bottom:0}
.update-log time{font-family:var(--font-mono);font-variant-numeric:tabular-nums;font-weight:500;color:var(--text-strong)}
@media(max-width:640px){.author-card{padding:16px}.opening .answer{padding:18px}.essentials,.scope{padding:16px 18px}}

/* Signature de tête — identité et dates sur une seule ligne. Le parcours de
   l'auteur n'est pas ici : il se lit en pied, via .author-footer. */
.author-byline{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 18px;margin:0 0 26px;padding-bottom:14px;border-bottom:1px solid var(--border,#D3CEC1);font-size:13px;color:var(--text-secondary,#4A554D)}
.byline-author a{color:var(--secondary,#3A4A3F);font-weight:700;border-bottom:1px solid currentColor}
.byline-author a:hover{color:var(--primary,#A65E2E)}
.author-byline .page-dates{margin:0;gap:6px 18px}

/* Pied d'article — la carte auteur complète, détachée du corps du texte. */
.author-footer{margin:38px 0 22px;border-top:2px solid var(--secondary,#3A4A3F)}
.author-footer .author-card{margin:0}

/* Signature dans le hero d'article (blog) : le hero est un aplat sombre, la
   signature doit y passer en blanc. Sans cette règle, elle hérite des couleurs
   pensées pour un fond clair et devient illisible (contraste ~1,1:1). */
.guide-hero .author-byline,
.guide-hero .author-byline .page-dates,
.guide-hero .byline-author a,
.guide-hero .page-dates time{color:#FFFFFF}
.guide-hero .author-byline{border-bottom-color:rgba(255,255,255,.28)}

/* ===== SOURCES — liens sortants cités près de l'affirmation ===== */
.source-note a[rel~="nofollow"]{color:var(--secondary);font-weight:600;border-bottom:1px solid var(--text-faint)}
.source-note a[rel~="nofollow"]:hover{color:var(--primary);border-bottom-color:var(--primary)}
.tool-table a[rel~="nofollow"]{font-weight:600;text-decoration:none;border-bottom:1px solid var(--text-faint)}
.tool-table a[rel~="nofollow"]:hover{color:var(--primary);border-bottom-color:var(--primary)}
.source-list{list-style:none;margin:0;padding:0;max-width:820px}
.source-list li{padding:10px 0;border-bottom:1px solid var(--line);font-size:14px}
.source-list li:last-child{border-bottom:0}
.source-list span{display:block;margin-top:2px;font-size:11px;color:var(--text-muted)}

/* ===== HERO PLEINE SECTION (home) — image de fond sur toute la section, voile figue ===== */
.hero.hero-full { background-color: var(--c-primary-deep); background-size: cover; background-position: center; background-repeat: no-repeat; min-height: clamp(460px, 72vh, 720px); display: flex; align-items: center; }
.hero.hero-full::before { content: ''; position: absolute; inset: 0; width: auto; height: auto; border-radius: 0; background: linear-gradient(100deg, rgba(42, 20, 32, .88) 0%, rgba(58, 26, 43, .72) 45%, rgba(58, 26, 43, .30) 100%); top: 0; right: 0; }
.hero.hero-full > .container { position: relative; z-index: 1; width: 100%; }
.hero.hero-full .hero-grid { grid-template-columns: 1fr !important; }
.hero.hero-full .hero-grid > div { max-width: 720px; }
.hero.hero-full h1 { color: #fff; }
.hero.hero-full h1 em { color: #fff; background: linear-gradient(transparent 62%, rgba(201, 216, 188, .55) 62%); }
.hero.hero-full .lead { color: #F1E6EB; }
.hero.hero-full .chip { background: rgba(255, 255, 255, .16); color: #fff; }
.hero.hero-full .btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .75); }
.hero.hero-full .btn-ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }

/* ===== PADDING LATÉRAL — toutes les pages (après le bloc 06a2, qui lève la largeur de référence) ===== */
.container { max-width: var(--maxw) !important; padding-left: clamp(16px, 4vw, 32px) !important; padding-right: clamp(16px, 4vw, 32px) !important; }
.container.article-layout { width: 100% !important; max-width: var(--maxw) !important; margin-inline: auto; padding-left: clamp(16px, 4vw, 32px) !important; padding-right: clamp(16px, 4vw, 32px) !important; }

/* 07c — visuels générés (illustrations botaniques) */
.brand-text .brand-logo { display: block; height: 34px; width: auto; max-width: 100%; }
.brand-text .brand-logo + small { margin-top: 3px; }
.author-card > .author-img { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.prose figure img { aspect-ratio: auto; height: auto; object-fit: contain; background: var(--bg); }
.prose figure.planche { margin: var(--s5) 0 var(--s6); }
.fig-statut { display: block; font-style: italic; margin-top: 2px; }
.article-hero-img img, .split-img img { aspect-ratio: 16 / 10; }
