/* ===== Foinette — design system ===== */
:root {
  --primary: #5F7A3E;
  --primary-dark: #4E6633;
  --primary-deep: #2E2A25;
  --secondary: #E2C46E;
  --sky: #F3ECD8;
  --sky-2: #E8DFC4;
  --hay: #E2C46E;
  --hay-dark: #6E5512;
  --hay-soft: #F7ECCB;
  --ink: #2E2A25;
  --muted: #6A6358;
  --line: #E2D9C3;
  --white: #fff;
  --ok: #17794a;
  --ok-bg: #e5f6ec;
  --warn: #8a5a00;
  --warn-bg: #fff2d1;
  --bad: #B4513A;
  --bad-bg: #F6E3DD;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(46, 42, 37, .10);
  --shadow-sm: 0 3px 10px rgba(46, 42, 37, .08);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 104px;
  --font-title: 'Fraunces', Georgia, serif;
  --font-body: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.7; color: var(--ink); background: #FBF7EC; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-dark); text-underline-offset: 3px; }
a:hover { color: var(--primary); }
:focus-visible { outline: 3px solid var(--hay); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-title); line-height: 1.15; color: var(--primary-deep); margin: 0 0 var(--s4); font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.3rem); letter-spacing: -.01em; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 var(--s4); }
ul, ol { padding-left: 1.25rem; margin: 0 0 var(--s4); }
li { margin-bottom: var(--s2); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
i[data-lucide], svg.lucide { width: 1.15em; height: 1.15em; vertical-align: -0.2em; }

.container { width: min(100% - 2.5rem, 1180px); margin-inline: auto; }
.container--narrow { width: min(100% - 2.5rem, 820px); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--primary-deep); color: #fff; padding: 8px 16px; border-radius: 8px; z-index: 200; }
.skip-link:focus { left: 8px; }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(251,247,236,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: var(--s4); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--primary-deep); }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--primary); color: var(--hay); box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); }
.brand-mark i, .brand-mark svg { width: 24px; height: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--font-title); font-size: 1.5rem; font-weight: 800; }
.brand-text small { font-size: .72rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; font-weight: 700; }
.brand--light { color: #fff; }
.brand--light .brand-text small { color: var(--secondary); }

.nav-toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--line); background: #fff; border-radius: 12px; cursor: pointer; padding: 0; position: relative; }
.nav-toggle span { position: absolute; left: 12px; right: 12px; height: 2.5px; background: var(--primary-deep); border-radius: 2px; transition: .25s; }
.nav-toggle span:nth-child(1) { top: 15px; } .nav-toggle span:nth-child(2) { top: 22px; } .nav-toggle span:nth-child(3) { top: 29px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: var(--s1); }
.main-nav li { margin: 0; position: relative; }
.main-nav a { display: inline-flex; align-items: center; gap: 4px; padding: 10px 14px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: .98rem; color: var(--primary-deep); transition: background .2s, color .2s; }
.main-nav a:hover, .main-nav a.is-active { background: var(--sky); color: var(--primary-dark); }
.main-nav .nav-cta a { margin-left: 8px; color: #fff; }
.main-nav .nav-cta a:hover { background: var(--primary-dark); color: #fff; }
.has-sub .sub { position: absolute; top: 100%; left: 0; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; display: none; flex-direction: column; align-items: stretch; gap: 0; }
.has-sub:hover .sub, .has-sub:focus-within .sub { display: flex; }
.has-sub .sub a { display: flex; border-radius: 10px; }

@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .main-nav { position: fixed; inset: 72px 0 0 0; background: #fff; padding: var(--s5); transform: translateX(100%); transition: transform .3s; overflow-y: auto; visibility: hidden; }
  .main-nav.is-open { transform: none; visibility: visible; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .main-nav a { padding: 14px 16px; font-size: 1.1rem; border-radius: 14px; }
  .has-sub .sub { display: flex; position: static; box-shadow: none; border: 0; border-left: 3px solid var(--secondary); border-radius: 0; margin-left: 16px; padding: 0 0 0 8px; }
  .main-nav .nav-cta a { margin: 12px 0 0; justify-content: center; }
  body.nav-open { overflow: hidden; }
}

/* ===== Boutons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 26px; background: var(--primary); color: #fff !important; border: 2px solid var(--primary); border-radius: 999px; font: 800 1rem var(--font-body); text-decoration: none; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; box-shadow: 0 6px 16px rgba(95,122,62,.28); }
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: .92rem; box-shadow: none; }
.btn-hay { background: var(--hay); border-color: var(--hay); color: var(--primary-deep) !important; box-shadow: 0 6px 16px rgba(226,196,110,.4); }
.btn-hay:hover { background: #D4B45A; border-color: #D4B45A; }
.btn-ghost { background: transparent; color: var(--primary-dark) !important; box-shadow: none; }
.btn-ghost:hover { background: var(--sky); border-color: var(--primary); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }

/* ===== Sections ===== */
.section { padding: var(--s8) 0; }
.section--tint { background: var(--sky); }
.section--hay { background: var(--hay-soft); }
.section--deep { background: var(--primary-deep); color: #F3ECD8; }
.section--deep h2, .section--deep h3 { color: #fff; }
.section-head { max-width: 760px; margin-bottom: var(--s6); }
.section-head.center { margin-inline: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--primary-dark); background: var(--sky-2); padding: 6px 14px; border-radius: 999px; margin-bottom: var(--s4); }
.eyebrow--hay { background: var(--hay-soft); color: var(--hay-dark); border: 1px solid #EAD9A0; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 680px; }

/* ===== Hero ===== */
.hero { position: relative; padding: var(--s7) 0 var(--s9); background: radial-gradient(1200px 500px at 90% -10%, var(--sky-2), transparent 60%), linear-gradient(180deg, var(--sky), #fff); overflow: hidden; }
.hero-grid { display: grid; gap: var(--s7); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }
.hero h1 em { font-style: normal; color: var(--primary); background: linear-gradient(transparent 62%, rgba(226,196,110,.55) 62%); }
.hero-media { position: relative; }
.hero-media img { width: 100%; aspect-ratio: 4/3.4; object-fit: cover; border-radius: 40% 60% 55% 45% / 45% 40% 60% 55%; box-shadow: var(--shadow); border: 8px solid #fff; }
.float-card { position: absolute; background: #fff; border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow); font-size: .9rem; line-height: 1.35; max-width: 220px; border: 1px solid var(--line); }
.float-card strong { display: block; font-family: var(--font-title); font-size: 1.5rem; color: var(--primary); }
.float-card.a { left: -4%; bottom: 8%; }
.float-card.b { right: 0; top: 2%; border-color: #EAD9A0; background: var(--hay-soft); }
.float-card.b strong { color: var(--hay-dark); }
@media (max-width: 600px) { .float-card.a { left: 0; } .float-card { max-width: 170px; padding: 10px 12px; } }
.trust-row { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); margin-top: var(--s5); padding: 0; list-style: none; }
.trust-row li { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem; margin: 0; color: var(--primary-deep); }
.trust-row i { color: var(--hay-dark); }

.page-hero { padding: var(--s6) 0 var(--s7); background: linear-gradient(180deg, var(--sky), #fff); border-bottom: 1px solid var(--line); }
.page-hero--hay { background: linear-gradient(180deg, var(--hay-soft), #fff); }
.page-hero-grid { display: grid; gap: var(--s6); align-items: center; }
@media (min-width: 900px) { .page-hero-grid.has-img { grid-template-columns: 1.2fr .8fr; } }
.page-hero-img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; width: 100%; box-shadow: var(--shadow); }
.meta-line { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); font-size: .9rem; color: var(--muted); margin-top: var(--s4); }
.meta-line span { display: inline-flex; align-items: center; gap: 6px; }

.breadcrumbs { padding: var(--s4) 0 0; font-size: .88rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0 0 var(--s4); }
.breadcrumbs li { margin: 0; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--line); }
.breadcrumbs a { color: var(--primary-dark); text-decoration: none; font-weight: 700; }

/* ===== Grilles & cartes ===== */
.grid { display: grid; gap: var(--s5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s, border-color .25s; position: relative; }
a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--secondary); }
.card h3 { margin-bottom: var(--s2); }
.card p:last-child { margin-bottom: 0; }
.card-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--sky-2); color: var(--primary-dark); margin-bottom: var(--s4); }
.card-icon.hay { background: var(--hay-soft); color: var(--hay-dark); }
.card-icon i, .card-icon svg { width: 26px; height: 26px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--primary-dark); margin-top: var(--s3); }
.card--hay { background: var(--hay-soft); border-color: #EAD9A0; }
.card--img { padding: 0; overflow: hidden; }
.card--img img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.card--img .card-body { padding: var(--s5); }

/* Z-pattern */
.split { display: grid; gap: var(--s6); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--s8); }
  .split.reverse .split-media { order: 2; }
}
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.split-media { position: relative; }
.split-media .tag { position: absolute; left: 16px; bottom: -16px; background: var(--hay); color: var(--primary-deep); font-weight: 800; padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow-sm); font-size: .92rem; }

/* Prose */
.prose { max-width: 760px; }
.prose h2 { margin-top: var(--s7); }
.prose h3 { margin-top: var(--s6); }
.prose img { border-radius: var(--radius); margin: var(--s5) 0; }
.layout-toc { display: grid; gap: var(--s7); }
@media (min-width: 1000px) { .layout-toc { grid-template-columns: 250px minmax(0, 1fr); } }
.toc { position: sticky; top: 96px; align-self: start; background: var(--sky); border-radius: var(--radius); padding: var(--s5); font-size: .95rem; }
.toc h2 { font-size: 1rem; font-family: var(--font-body); text-transform: uppercase; letter-spacing: .08em; margin-bottom: var(--s3); }
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin-bottom: 6px; }
.toc a { text-decoration: none; font-weight: 700; display: block; padding: 4px 0; }
.toc a::before { content: counter(toc) ". "; color: var(--hay-dark); }
@media (max-width: 999px) { .toc { position: static; } }

/* Callouts */
.callout { display: flex; gap: var(--s4); border-radius: var(--radius); padding: var(--s5); margin: var(--s5) 0; border: 1px solid; }
.callout > i, .callout > svg { flex: 0 0 auto; width: 28px; height: 28px; margin-top: 2px; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout strong.t { display: block; font-family: var(--font-title); font-size: 1.15rem; margin-bottom: 4px; }
.callout--info { background: var(--sky); border-color: var(--sky-2); color: var(--primary-deep); }
.callout--hay { background: var(--hay-soft); border-color: #EAD9A0; color: #4a3504; }
.callout--warn { background: var(--warn-bg); border-color: #f1d28a; color: #5c3b00; }
.callout--danger { background: var(--bad-bg); border-color: #f4b8b1; color: #6f140d; }
.callout--ok { background: var(--ok-bg); border-color: #b8e4c8; color: #0d4a2c; }

/* Pastilles de statut */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: .82rem; font-weight: 800; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.info { background: var(--sky-2); color: var(--primary-dark); }

/* Tableaux */
.table-wrap { overflow-x: auto; margin: var(--s5) 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .97rem; min-width: 520px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--sky); font-family: var(--font-title); color: var(--primary-deep); font-size: .98rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #FDFAF2; }
caption { text-align: left; padding: var(--s3) var(--s4); font-weight: 700; color: var(--muted); caption-side: bottom; font-size: .88rem; }

/* Citations & sources */
.cite { font-size: .7em; line-height: 0; margin-left: 1px; }
.cite a { text-decoration: none; font-weight: 800; color: var(--primary-dark); padding: 0 1px; }
.cite a:hover { background: var(--hay-soft); }
.sources-list { padding-left: 1.4rem; }
.sources-list li { margin-bottom: var(--s4); scroll-margin-top: 100px; }
.sources-list li:target { background: var(--hay-soft); border-radius: 8px; padding: 6px 10px; }
.src-note { display: block; color: var(--muted); font-size: .94rem; }
.sources-block h2 { font-size: 1.5rem; }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: var(--s3); overflow: hidden; }
.faq summary { cursor: pointer; padding: 18px 56px 18px 20px; font-weight: 800; color: var(--primary-deep); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: var(--primary); transition: transform .2s; }
.faq details[open] summary::after { content: "−"; }
.faq details[open] { border-color: var(--secondary); box-shadow: var(--shadow-sm); }
.faq-body { padding: 0 20px 18px; }

/* ===== Outils / formulaires ===== */
.tool { background: #fff; border: 2px solid var(--secondary); border-radius: 24px; padding: var(--s5); box-shadow: var(--shadow); margin: var(--s5) 0; }
@media (min-width: 700px) { .tool { padding: var(--s6); } }
.tool-head { display: flex; gap: var(--s3); align-items: center; margin-bottom: var(--s5); }
.tool-head h2, .tool-head h3 { margin: 0; font-size: 1.5rem; }
.tool-grid { display: grid; gap: var(--s6); }
@media (min-width: 900px) { .tool-grid { grid-template-columns: 1fr 1.1fr; } }
.field { margin-bottom: var(--s4); }
.field label, .field legend, fieldset legend { display: block; font-weight: 800; margin-bottom: 6px; color: var(--primary-deep); font-size: .96rem; }
.field .hint { display: block; font-weight: 400; font-size: .85rem; color: var(--muted); margin-top: 4px; }
input[type=number], input[type=text], input[type=date], input[type=search], select { width: 100%; padding: 13px 16px; border: 2px solid var(--line); border-radius: 12px; font: 600 1rem var(--font-body); color: var(--ink); background: #fff; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(226,196,110,.55); }
input[type=range] { width: 100%; accent-color: var(--primary); }
fieldset { border: 0; padding: 0; margin: 0 0 var(--s4); min-width: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; margin-bottom: 8px; cursor: pointer; font-weight: 600; transition: border-color .2s, background .2s; }
.check:hover { border-color: var(--secondary); }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--primary); flex: 0 0 auto; }
.check:has(input:checked) { background: var(--sky); border-color: var(--primary); }
.result { background: var(--sky); border-radius: 18px; padding: var(--s5); margin-top: var(--s4); }
.tool-grid > .result, .tool-grid > div > .result:first-child { margin-top: 0; }
.result h3 { font-size: 1.15rem; margin-top: var(--s4); }
.result h3:first-child { margin-top: 0; }
.result-big { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
.stat { background: #fff; border-radius: 14px; padding: 14px 16px; border: 1px solid var(--sky-2); }
.stat .n { display: block; font-family: var(--font-title); font-size: 1.9rem; font-weight: 800; color: var(--primary); line-height: 1.15; }
.stat .n small { font-size: .95rem; color: var(--muted); font-family: var(--font-body); font-weight: 700; }
.stat .l { font-size: .85rem; font-weight: 700; color: var(--muted); }
.stat.hay .n { color: var(--hay-dark); }
.stat.full { grid-column: 1 / -1; }
.timeline { list-style: none; padding: 0; margin: var(--s4) 0 0 8px; border-left: 3px solid var(--secondary); }
.timeline li { padding: 0 0 var(--s3) var(--s4); position: relative; margin: 0; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: 8px; width: 15px; height: 15px; background: var(--hay); border-radius: 50%; border: 3px solid #fff; }
.verdict { display: flex; align-items: center; gap: var(--s4); padding: var(--s4) var(--s5); border-radius: 16px; font-weight: 800; border: 2px solid; margin-bottom: var(--s4); }
.verdict.ok { background: var(--ok-bg); border-color: #9dd8b5; color: var(--ok); }
.verdict.warn { background: var(--warn-bg); border-color: #efce80; color: var(--warn); }
.verdict.bad { background: var(--bad-bg); border-color: #f0a79f; color: var(--bad); }
.verdict i, .verdict svg { width: 32px; height: 32px; flex: 0 0 auto; }
.verdict .v-title { font-family: var(--font-title); font-size: 1.35rem; display: block; line-height: 1.2; }
.verdict .v-sub { font-weight: 600; font-size: .95rem; color: inherit; opacity: .9; display: block; }
.crit-list { list-style: none; padding: 0; margin: 0; }
.crit-list li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--sky-2); margin: 0; align-items: flex-start; }
.crit-list li:last-child { border-bottom: 0; }
.crit-list i, .crit-list svg { flex: 0 0 auto; margin-top: 3px; }
.crit-list .c-ok { color: var(--ok); } .crit-list .c-warn { color: var(--warn); } .crit-list .c-bad { color: var(--bad); }
.suggest { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; max-height: 280px; overflow-y: auto; background: #fff; }
.suggest:empty { display: none; }
.suggest li { margin: 0; }
.suggest button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; background: transparent; border: 0; border-bottom: 1px solid var(--line); font: 700 1rem var(--font-body); cursor: pointer; text-align: left; color: var(--ink); }
.suggest button:hover, .suggest button:focus-visible { background: var(--sky); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--s3) 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; background: #fff; border: 2px solid var(--line); font: 700 .92rem var(--font-body); color: var(--primary-deep); text-decoration: none; cursor: pointer; transition: .2s; }
.chip:hover { border-color: var(--primary); background: var(--sky); }
.chip.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip.ok::before, .chip.warn::before, .chip.bad::before { content: ""; width: 9px; height: 9px; border-radius: 50%; }
.chip.ok::before { background: var(--ok); } .chip.warn::before { background: #d9961b; } .chip.bad::before { background: var(--bad); }
.chip.is-on::before { background: #fff; }

/* Races */
.breed { display: flex; flex-direction: column; }
.breed dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: var(--s3) 0; font-size: .95rem; }
.breed dt { font-weight: 800; color: var(--primary-deep); }
.breed dd { margin: 0; }

/* Hay stripe */
.hay-divider { height: 18px; background: repeating-linear-gradient(115deg, var(--hay) 0 3px, transparent 3px 9px); opacity: .55; }
.hay-edge { height: 28px; background: var(--hay-soft); transform: scaleY(-1); margin-bottom: -1px; clip-path: polygon(0 100%, 0 40%, 2% 70%, 4% 30%, 6% 75%, 8% 25%, 10% 70%, 12% 35%, 14% 80%, 16% 30%, 18% 70%, 20% 25%, 22% 75%, 24% 30%, 26% 80%, 28% 35%, 30% 70%, 32% 25%, 34% 75%, 36% 30%, 38% 70%, 40% 35%, 42% 80%, 44% 30%, 46% 75%, 48% 25%, 50% 70%, 52% 35%, 54% 80%, 56% 30%, 58% 70%, 60% 25%, 62% 75%, 64% 30%, 66% 70%, 68% 35%, 70% 80%, 72% 25%, 74% 75%, 76% 30%, 78% 70%, 80% 35%, 82% 80%, 84% 30%, 86% 70%, 88% 25%, 90% 75%, 92% 30%, 94% 70%, 96% 35%, 98% 75%, 100% 40%, 100% 100%); }

/* Ration pyramide */
.pyramid { display: grid; gap: 10px; }
.pyr { display: flex; align-items: center; gap: var(--s4); padding: 18px 22px; border-radius: 16px; color: var(--primary-deep); font-weight: 700; }
.pyr strong { font-family: var(--font-title); font-size: 1.2rem; display: block; }
.pyr .pct { font-family: var(--font-title); font-size: 1.5rem; font-weight: 800; min-width: 84px; }
.pyr.p1 { background: var(--hay); } .pyr.p2 { background: #bfeaa8; } .pyr.p3 { background: var(--secondary); } .pyr.p4 { background: #ffd9c2; } .pyr.p5 { background: #eee; }
.pyr.p1 { width: 100%; } .pyr.p2 { width: 94%; } .pyr.p3 { width: 88%; } .pyr.p4 { width: 82%; } .pyr.p5 { width: 76%; }
@media (max-width: 600px) { .pyr.p2, .pyr.p3, .pyr.p4, .pyr.p5 { width: 100%; } .pyr { padding: 14px 16px; } }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: var(--s4); }
.steps li { counter-increment: step; position: relative; padding: var(--s4) var(--s4) var(--s4) 76px; background: #fff; border: 1px solid var(--line); border-radius: 16px; margin: 0; }
.steps li::before { content: counter(step); position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; background: var(--primary); color: #fff; border-radius: 50%; display: grid; place-items: center; font: 800 1.2rem var(--font-title); }
.steps strong { color: var(--primary-deep); }

/* Urgences */
.urgence { border-left: 6px solid var(--bad); }
.urgence.j { border-left-color: #d9961b; }

/* Aliment liste */
.food-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); list-style: none; padding: 0; }
.food-list li { margin: 0; }
.food-list a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; font-weight: 800; color: var(--primary-deep); background: #fff; transition: .2s; }
.food-list a:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* Footer */
.site-footer { background: var(--primary-deep); color: #E2D9C3; }
.footer-grid { display: grid; gap: var(--s6); padding: var(--s7) 0 var(--s6); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer-title { font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--secondary); margin-bottom: var(--s4); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--secondary); text-decoration: underline; }
.footer-note { display: flex; gap: 10px; font-size: .9rem; background: rgba(255,255,255,.08); padding: 12px 14px; border-radius: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding: var(--s4) 0 var(--s5); font-size: .88rem; color: #B9B1A2; }
.footer-bottom p { margin: 0; }

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

/* Bandeau CTA */
.cta-band { background: linear-gradient(120deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; border-radius: 28px; padding: var(--s7) var(--s6); display: grid; gap: var(--s5); align-items: center; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(var(--hay), transparent 70%); opacity: .35; pointer-events: none; }
.cta-band h2 { color: #fff; margin-bottom: var(--s2); }
.cta-band p { margin: 0; color: #F3ECD8; }
.cta-band .btn { position: relative; z-index: 1; }
@media (min-width: 800px) { .cta-band { grid-template-columns: 1fr auto; } }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s4); margin: var(--s5) 0; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: var(--s4) var(--s5); }
.kpi .n { font-family: var(--font-title); font-weight: 800; font-size: 2rem; color: var(--primary); display: block; line-height: 1.1; }
.kpi .l { font-size: .9rem; color: var(--muted); font-weight: 700; }

@media print { .site-header, .site-footer, .nav-toggle, .btn-row { display: none !important; } }

/* ===== BLOC SOUS-MENU OUTILS — sans JavaScript (hover + focus-within) ===== */
.nav-item{position:relative;display:inline-flex;align-items:center}
.nav-item.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)}
.nav-item.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:1020px){
.nav-item{display:block}
.nav-item.has-sub::after{display:none}
.nav-item.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}
}

/* 05b délégué : jetons absents du front + pastille des liens de sous-menu */
:root{--surface:#FFFFFF;--fill:#F3ECD8;--text-muted:#6A6358;--text-secondary:#4A443C}
.main-nav .sub-nav a{border-radius:8px}

/* ===== 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` : 1180 px.
 *
 * `!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 --- */
.section-head{max-width:none!important}   /* styles.css : 760px */
.lead{max-width:none!important}   /* styles.css : 680px */
.prose{max-width:none!important}   /* styles.css : 760px */
.source-list{max-width:none!important}   /* styles.css : 820px */
/* --- relevé automatique : fin --- */

/* 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)}

/* ===== 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(--primary-deep);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(--primary-dark);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(--primary-dark,#4E6633);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)}

/* 06a délégué : jetons attendus par l’enveloppe, absents du front */
:root{--text-strong:#1E1B17;--text:#2E2A25;--border:#E2D9C3;--font-heading:var(--font-title);--font-mono:ui-monospace,SFMono-Regular,Menlo,monospace;--callout-bg:#F7ECCB;--callout-border:#E2C46E;--callout-text:#5C4A14}
