/* ==========================================================================
   Levainerie — styles
   Mobile-first. Croûte #7B4A2D (marque), farine #F2ECE1 (fond), ardoise #2E3A3F (texte).
   ========================================================================== */

:root {
  --blue: #7B4A2D;
  --blue-dark: #653B23;
  --blue-deep: #2E3A3F;
  --sky: #E2CDB3;
  --sky-soft: #F6EBDD;
  --sky-pale: #FAF6EF;
  --paper: #F2ECE1;
  --white: #FFFFFF;
  --ink: #2E3A3F;
  --muted: #5E6A6E;
  --line: #DDD3C3;
  --crust: #A86A3A;
  --crust-dark: #5A3420;
  --crust-soft: #F6EBDD;
  --ok: #1F7A4D;
  --warn: #B4531A;

  /* Tokens sémantiques DA Levainerie (02b) — fournil au petit matin : farine, croûte, ardoise */
  --primary: #7B4A2D;
  --primary-hover: #653B23;
  --on-primary: #FFFFFF;
  --secondary: #2E3A3F;
  --secondary-hover: #3C4A50;
  --bg: #F2ECE1;
  --surface: #FAF6EF;
  --text: #2E3A3F;
  --text-secondary: #4A5559;
  --text-strong: #1E272A;
  --text-muted: #5E6A6E;
  --text-faint: #B9B2A6;
  --fill: #E9E1D3;
  --border: #DDD3C3;
  --callout-bg: #F6EBDD;
  --callout-text: #5A3420;
  --callout-border: #E2CDB3;

  --f-head: 'Fraunces', Georgia, serif;
  --f-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(46, 58, 63, .06), 0 8px 24px rgba(46, 58, 63, .08);
  --shadow-lg: 0 2px 6px rgba(46, 58, 63, .08), 0 24px 56px rgba(46, 58, 63, .16);
  --container: 1180px;
}

*, *::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(--f-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; transition: color .2s; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--f-head); line-height: 1.15; color: var(--blue-deep); margin: 0 0 var(--s4); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 var(--s4); }
ul, ol { margin: 0 0 var(--s4); padding-left: 1.3em; }
li { margin-bottom: var(--s2); }

.container { width: 100%; max-width: var(--container); 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(--blue); color: #fff; padding: 8px 16px; border-radius: 8px; z-index: 200; }
.skip-link:focus { left: 8px; color: #fff; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(242, 236, 225, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--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: 10px; text-decoration: none; color: var(--blue-deep); }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--blue); color: #fff; display: grid; place-items: center; font-family: var(--f-head); font-weight: 800; font-size: 1.35rem; box-shadow: 0 4px 12px rgba(123, 74, 45, .35); }
.brand-name { font-family: var(--f-head); font-weight: 800; font-size: 1.4rem; letter-spacing: -.02em; }
.nav-toggle { background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px; cursor: pointer; color: var(--blue-deep); display: grid; place-items: center; }
.nav-toggle svg { width: 24px; height: 24px; }
.main-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: var(--s4); display: none; box-shadow: var(--shadow); }
.main-nav.is-open { display: block; }
.main-nav ul { list-style: none; margin: 0 0 var(--s4); padding: 0; }
.main-nav li { margin: 0; }
.main-nav a:not(.btn) { display: block; padding: 10px 4px; color: var(--ink); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--line); }
.main-nav a:not(.btn):hover, .main-nav a.is-active { color: var(--blue); }
.main-nav a.is-active { font-weight: 700; }
@media (min-width: 1020px) {
  .nav-toggle { display: none; }
  .main-nav { position: static; display: flex; align-items: center; gap: var(--s5); background: none; border: 0; padding: 0; box-shadow: none; }
  .main-nav ul { display: flex; gap: var(--s4); margin: 0; }
  .main-nav a:not(.btn) { border: 0; padding: 8px 6px; font-size: .95rem; position: relative; }
  .main-nav a.is-active::after { content: ''; position: absolute; left: 6px; right: 6px; bottom: 0; height: 3px; border-radius: 3px; background: var(--sky); }
}

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 1rem/1 var(--f-body); padding: 15px 24px; border-radius: 999px; border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: transform .2s, background .2s, box-shadow .2s, color .2s; }
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(123, 74, 45, .3); }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--blue-deep); border-color: var(--blue-deep); }
.btn-ghost:hover { background: var(--blue-deep); color: #fff; }
.btn-light { background: #fff; color: var(--blue-deep); }
.btn-light:hover { background: var(--sky); color: var(--blue-deep); }
.btn-sm { padding: 11px 18px; font-size: .92rem; }
.btn-lg { padding: 18px 30px; font-size: 1.05rem; }

.tag { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-dark); background: var(--sky-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: var(--s3); }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--crust-dark); display: block; margin-bottom: var(--s3); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }

/* ---------- Sections ---------- */
.section { padding: var(--s8) 0; }
.section-alt { background: var(--white); border-block: 1px solid var(--line); }
.section-blue { background: var(--blue-deep); color: #F6EBDD; }
.section-blue h2, .section-blue h3 { color: #fff; }
.section-blue a { color: var(--sky); }
.section-head { max-width: 720px; margin-bottom: var(--s7); }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.section-blue .section-head p { color: #E2CDB3; }
@media (min-width: 768px) { .section { padding: var(--s9) 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; }
  .btn:hover { transform: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: var(--s7) 0 var(--s8); background:
  radial-gradient(900px 400px at 85% -10%, var(--sky-soft), transparent 70%),
  radial-gradient(600px 300px at -10% 100%, var(--crust-soft), transparent 70%), var(--paper); }
.hero-grid { display: grid; gap: var(--s7); align-items: center; }
.hero h1 em { font-style: normal; color: var(--blue); position: relative; white-space: nowrap; z-index: 0; }
.hero h1 em::after { content: ''; position: absolute; left: 0; right: 0; bottom: .06em; height: .22em; background: var(--sky); z-index: -1; border-radius: 4px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s5) 0; }
.hero-stats { display: flex; flex-wrap: wrap; gap: var(--s5); margin: var(--s5) 0 0; padding: 0; list-style: none; }
.hero-stats li { margin: 0; }
.hero-stats strong { display: block; font-family: var(--f-head); font-size: 1.9rem; color: var(--blue); line-height: 1; }
.hero-stats span { font-size: .88rem; color: var(--muted); }
.hero-visual { position: relative; padding-bottom: 40px; }
.hero-img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-card { position: absolute; left: var(--s4); bottom: 0; right: var(--s4); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: var(--s4); border-left: 6px solid var(--crust); }
.hero-card h2 { font-size: 1rem; margin: 0 0 var(--s2); font-family: var(--f-body); letter-spacing: 0; }
.hero-card dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin: 0; }
.hero-card dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.hero-card dd { margin: 0; font-weight: 700; color: var(--blue-deep); font-size: .95rem; }
@media (min-width: 900px) {
  .hero { padding: var(--s8) 0 var(--s9); }
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: var(--s8); }
  .hero-card { left: -40px; right: auto; width: 360px; }
  .hero-img { aspect-ratio: 4 / 4.3; }
}

/* ---------- Grilles / cartes ---------- */
.card-grid { display: grid; gap: var(--s5); grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s, opacity .6s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-media { display: block; overflow: hidden; aspect-ratio: 16 / 10; background: var(--sky-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: var(--s5); display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.2rem; margin-bottom: var(--s3); }
.card-body h3 a { color: var(--blue-deep); text-decoration: none; }
.card-body h3 a:hover { color: var(--blue); }
.card-body p { color: var(--muted); font-size: .98rem; }
.card-body .card-meta { margin: auto 0 0; padding-top: var(--s3); font-size: .84rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-meta svg { width: 15px; height: 15px; }

.cat-grid { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
.cat-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); text-decoration: none; color: var(--ink); display: block; transition: transform .25s, border-color .25s, box-shadow .25s, opacity .6s ease; }
.cat-tile:hover { transform: translateY(-4px); border-color: var(--blue); box-shadow: var(--shadow); color: var(--ink); }
.cat-tile .ico { width: 52px; height: 52px; border-radius: 14px; background: var(--sky-soft); color: var(--blue); display: grid; place-items: center; margin-bottom: var(--s4); }
.cat-tile .ico svg { width: 26px; height: 26px; }
.cat-tile h3 { margin-bottom: var(--s2); }
.cat-tile p { color: var(--muted); font-size: .96rem; margin: 0 0 var(--s3); }
.cat-tile .count { font-size: .85rem; font-weight: 600; color: var(--blue); }

.tool-grid { display: grid; gap: var(--s5); grid-template-columns: 1fr; }
@media (min-width: 700px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
.tool-card { display: flex; gap: var(--s4); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); text-decoration: none; color: var(--ink); transition: transform .25s, box-shadow .25s, border-color .25s, opacity .6s ease; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue); color: var(--ink); }
.tool-card .ico { flex: none; width: 56px; height: 56px; border-radius: 16px; background: var(--blue); color: #fff; display: grid; place-items: center; }
.tool-card .ico svg { width: 28px; height: 28px; }
.tool-card h3 { margin-bottom: 6px; font-size: 1.2rem; }
.tool-card p { margin: 0; color: var(--muted); font-size: .98rem; }
.tool-card .go { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--s3); font-weight: 600; color: var(--blue); font-size: .95rem; }
.tool-card .go svg { width: 16px; height: 16px; }

/* Z-pattern */
.split { display: grid; gap: var(--s6); align-items: center; }
.split + .split { margin-top: var(--s8); }
.split-media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); aspect-ratio: 5 / 4; object-fit: cover; }
.split-copy ul { list-style: none; padding: 0; }
.split-copy li { display: flex; gap: 10px; align-items: flex-start; }
.split-copy li svg { flex: none; width: 20px; height: 20px; color: var(--blue); margin-top: 5px; }
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--s8); }
  .split-reverse .split-media { order: 2; }
}

/* Parcours */
.path { display: grid; gap: var(--s4); counter-reset: step; grid-template-columns: 1fr; }
@media (min-width: 800px) { .path { grid-template-columns: repeat(4, 1fr); } }
.path-step { position: relative; background: rgba(255,255,255,.07); border: 1px solid rgba(226, 205, 179, .3); border-radius: var(--radius); padding: var(--s5); counter-increment: step; }
.path-step::before { content: counter(step); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--sky); color: var(--blue-deep); font-weight: 800; margin-bottom: var(--s3); font-family: var(--f-head); }
.path-step h3 { font-size: 1.1rem; color: #fff; }
.path-step p { font-size: .95rem; color: #E9E1D3; margin: 0 0 var(--s3); }
.path-step a { font-weight: 600; }

/* ---------- Fiche fournée ---------- */
.fiche { background: #FFFDF8; border: 1px solid var(--line); border-left: 6px solid var(--crust); border-radius: var(--radius); padding: var(--s5); margin: var(--s6) 0; box-shadow: var(--shadow); background-image: repeating-linear-gradient(transparent 0, transparent 31px, rgba(123, 74, 45, .07) 32px); }
.fiche-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); justify-content: space-between; margin-bottom: var(--s4); }
.fiche-head h2 { font-size: 1.25rem; margin: 0; font-family: var(--f-head); }
.article-body .fiche-head h2 { margin-top: 0; }
.fiche-id { font-weight: 700; font-size: .85rem; background: var(--crust-soft); color: var(--crust-dark); padding: 5px 12px; border-radius: 999px; }
.fiche-table { width: 100%; border-collapse: collapse; margin: 0 0 var(--s4); font-size: .98rem; }
.fiche-table th, .fiche-table td { text-align: left; padding: 9px 4px; border-bottom: 1px dashed rgba(138, 79, 16, .3); vertical-align: top; }
.fiche-table th { width: 42%; color: var(--muted); font-weight: 500; }
.fiche-table td { font-weight: 600; color: var(--blue-deep); }
.fiche-verdict { margin: 0; padding: var(--s4); background: var(--sky-pale); border-radius: 10px; font-size: .98rem; }
.fiche-verdict strong { color: var(--blue-deep); }

/* ---------- Page head / breadcrumb ---------- */
.page-head { padding: var(--s6) 0 var(--s6); background: linear-gradient(180deg, var(--sky-pale), var(--paper)); border-bottom: 1px solid var(--line); }
.page-head h1 { max-width: 22ch; font-size: clamp(2rem, 5vw, 3.1rem); }
.page-head .lead { margin-bottom: 0; }
.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: var(--s4); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.breadcrumb li { margin: 0; display: flex; gap: 6px; }
.breadcrumb li + li::before { content: '›'; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue); }
.meta-row { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); font-size: .9rem; color: var(--muted); margin-top: var(--s4); }
.meta-row span { display: inline-flex; align-items: center; gap: 6px; }
.meta-row svg { width: 16px; height: 16px; }

/* ---------- Article ---------- */
.article-wrap { padding: var(--s6) 0 var(--s8); }
.article-layout { display: grid; gap: var(--s7); }
@media (min-width: 1000px) { .article-layout { grid-template-columns: minmax(0, 1fr) 320px; } .article-aside { position: sticky; top: 92px; align-self: start; } }
.article-hero-img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 16 / 8; object-fit: cover; margin-bottom: var(--s6); }
.article-body { max-width: 74ch; min-width: 0; }
.article-body h2 { margin-top: var(--s7); scroll-margin-top: 90px; }
.article-body h3 { margin-top: var(--s5); }
.article-body table { width: 100%; border-collapse: collapse; margin: var(--s5) 0; font-size: .95rem; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.article-body th { background: var(--blue-deep); color: #fff; text-align: left; padding: 10px 12px; font-weight: 600; }
.article-body td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.article-body .fiche-table { background: transparent; box-shadow: none; border-radius: 0; margin: 0 0 var(--s4); }
.article-body .fiche-table th { background: transparent; color: var(--muted); font-weight: 500; padding: 9px 4px; }
.article-body .fiche-table td { border-top: 0; padding: 9px 4px; }
.table-scroll { overflow-x: auto; }
.table-scroll table { min-width: 560px; }
.callout { background: var(--sky-pale); border-left: 5px solid var(--blue); border-radius: 10px; padding: var(--s4) var(--s5); margin: var(--s5) 0; }
.callout.warn { background: var(--crust-soft); border-left-color: var(--crust); }
.callout p:last-child { margin-bottom: 0; }
.callout strong:first-child { color: var(--blue-deep); }
.cta-tool { display: flex; gap: var(--s4); align-items: center; flex-wrap: wrap; background: var(--blue-deep); color: #fff; border-radius: var(--radius); padding: var(--s5); margin: var(--s6) 0; }
.cta-tool p { margin: 0; flex: 1 1 260px; }
.cta-tool strong { font-family: var(--f-head); font-size: 1.2rem; display: block; }

.aside-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); margin-bottom: var(--s4); }
.aside-card h2 { font-size: .85rem; font-family: var(--f-body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: var(--s3); }
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li { margin: 0; counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 8px 0; text-decoration: none; color: var(--ink); font-size: .95rem; border-bottom: 1px solid var(--line); }
.toc a::before { content: counter(toc); color: var(--blue); font-weight: 700; }
.toc a:hover { color: var(--blue); }
.aside-card ul { list-style: none; padding: 0; margin: 0; }
.aside-card li { margin: 0; }
.aside-card li a { display: block; padding: 8px 0; font-size: .95rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.aside-card.tool-aside { background: var(--blue); color: #fff; border: 0; }
.aside-card.tool-aside h2 { color: var(--sky); }
.aside-card.tool-aside p { font-size: .95rem; }

.faq { margin-top: var(--s7); }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: var(--s3); padding: 0 var(--s5); }
.faq summary { cursor: pointer; padding: var(--s4) 0; font-weight: 600; color: var(--blue-deep); list-style: none; display: flex; justify-content: space-between; gap: var(--s4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.5rem; line-height: 1; color: var(--blue); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); }

.related { padding: var(--s8) 0; background: var(--white); border-top: 1px solid var(--line); }

/* ---------- Outils (calculateurs) ---------- */
.calc { display: grid; gap: var(--s5); margin: var(--s6) 0; }
@media (min-width: 900px) { .calc { grid-template-columns: 1fr 1fr; align-items: start; } }
.calc-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s5); box-shadow: var(--shadow); }
.calc-panel h2 { font-size: 1.3rem; display: flex; align-items: center; gap: 10px; }
.calc-panel h2 svg { color: var(--blue); width: 24px; height: 24px; }
.field { margin-bottom: var(--s4); }
.field label, .field .label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--blue-deep); }
.field .hint { font-size: .82rem; color: var(--muted); margin: 4px 0 0; }
.field input[type=number], .field input[type=datetime-local], .field select, .field input[type=text] { width: 100%; font: inherit; padding: 12px 14px; border: 1.5px solid #DDD3C3; border-radius: 10px; background: #fff; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(123, 74, 45, .15); }
.field-row { display: grid; gap: var(--s4); grid-template-columns: 1fr 1fr; }
.field input[type=range] { width: 100%; accent-color: var(--blue); }
.range-out { float: right; font-weight: 700; color: var(--blue); }
.seg { display: inline-flex; background: var(--sky-pale); border-radius: 999px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 9px 16px; border-radius: 999px; font: 600 .9rem var(--f-body); color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.seg button.is-on { background: var(--blue); color: #fff; }
.calc-result { background: var(--blue-deep); color: #fff; border-radius: var(--radius-lg); padding: var(--s5); box-shadow: var(--shadow-lg); }
.calc-result h2 { color: #fff; font-size: 1.3rem; }
.big-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); margin-bottom: var(--s5); }
.big-stat { background: rgba(255,255,255,.09); border-radius: 12px; padding: var(--s4); }
.big-stat span { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--sky); }
.big-stat strong { font-family: var(--f-head); font-size: 1.9rem; line-height: 1.1; }
.big-stat small { display: block; font-size: .85rem; color: #E2CDB3; font-weight: 500; }
.result-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.result-table th, .result-table td { text-align: left; padding: 9px 4px; border-bottom: 1px solid rgba(255,255,255,.15); }
.result-table th { color: #E2CDB3; font-weight: 500; }
.result-table td:last-child, .result-table thead th:last-child { text-align: right; }
.result-table td { font-weight: 600; }
.notice { font-size: .88rem; color: #E2CDB3; margin-top: var(--s4); }
.notice.dark { color: var(--muted); }
.alert { background: var(--crust-soft); color: var(--crust-dark); border-radius: 10px; padding: 10px 14px; font-size: .9rem; margin-bottom: var(--s4); display: none; }
.alert.is-on { display: block; }

.timeline { list-style: none; margin: 0 0 var(--s5); padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: rgba(226, 205, 179, .45); }
.timeline li { position: relative; padding: 0 0 var(--s4) 38px; margin: 0; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--sky); border: 3px solid var(--blue-deep); box-shadow: 0 0 0 2px var(--sky); }
.timeline .when { font-weight: 700; color: var(--sky); font-size: .92rem; display: block; }
.timeline .what { font-weight: 600; display: block; }
.timeline .note { font-size: .88rem; color: #E2CDB3; display: block; }
.timeline li.is-end::before { background: var(--crust); box-shadow: 0 0 0 2px var(--crust); }

.symptom-grid { display: grid; gap: var(--s3); grid-template-columns: 1fr; margin-bottom: var(--s6); }
@media (min-width: 640px) { .symptom-grid { grid-template-columns: repeat(2, 1fr); } }
.symptom-btn { text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: var(--s4); font: 600 1rem var(--f-body); color: var(--blue-deep); cursor: pointer; display: flex; gap: 12px; align-items: center; transition: border-color .2s, background .2s, transform .2s; }
.symptom-btn:hover { border-color: var(--blue); transform: translateY(-2px); }
.symptom-btn[aria-pressed=true] { background: var(--blue); color: #fff; border-color: var(--blue); }
.symptom-btn svg { flex: none; width: 22px; height: 22px; }
.cause { background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--blue); border-radius: 12px; padding: var(--s5); margin-bottom: var(--s4); }
.cause h3 { margin-bottom: var(--s2); }
.cause .prob { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-bottom: var(--s3); }
.prob.high { background: #F6EBDD; color: var(--warn); }
.prob.mid { background: var(--crust-soft); color: var(--crust-dark); }
.prob.low { background: var(--sky-soft); color: var(--blue-dark); }
.cause ul { margin-bottom: var(--s3); }

/* ---------- Tableaux / listes fournées ---------- */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; min-width: 720px; font-size: .95rem; }
.data-table th { background: var(--blue-deep); color: #fff; text-align: left; padding: 12px 14px; font-weight: 600; white-space: nowrap; }
.data-table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.data-table tr:hover td { background: var(--sky-pale); }
.data-table .fid { font-weight: 700; color: var(--crust-dark); white-space: nowrap; }

/* ---------- Prose (pages légales, à propos) ---------- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: var(--s7); }
.prose h3 { margin-top: var(--s5); }
.principles { display: grid; gap: var(--s4); grid-template-columns: 1fr; margin: var(--s6) 0; }
@media (min-width: 760px) { .principles { grid-template-columns: repeat(3, 1fr); } }
.principle { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); }
.principle svg { width: 28px; height: 28px; color: var(--blue); margin-bottom: var(--s3); }
.principle h3 { font-size: 1.1rem; }
.principle p { color: var(--muted); font-size: .96rem; margin: 0; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--blue) 0%, var(--blue-deep) 100%); color: #fff; border-radius: var(--radius-lg); padding: var(--s7) var(--s5); text-align: center; box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; }
.cta-band p { max-width: 56ch; margin: 0 auto var(--s5); color: #E9E1D3; }

/* Contact */
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s6); box-shadow: var(--shadow); max-width: 640px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-deep); color: #E9E1D3; padding: var(--s8) 0 var(--s5); margin-top: 0; }
.footer-grid { display: grid; gap: var(--s6); grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #E9E1D3; text-decoration: none; }
.site-footer a:hover { color: var(--sky); text-decoration: underline; }
.footer-title { font-family: var(--f-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--sky); margin-bottom: var(--s4); }
.brand-light { color: #fff !important; margin-bottom: var(--s4); }
.footer-brand p { font-size: .95rem; max-width: 38ch; }
.footer-bottom { border-top: 1px solid rgba(226, 205, 179, .25); margin-top: var(--s7); padding-top: var(--s5); font-size: .88rem; }
.footer-bottom p { margin: 0; }

/* 404 */
.notfound { text-align: center; padding: var(--s9) 0; }
.notfound .lead { margin-inline: auto; }
.notfound .num { font-family: var(--f-head); font-size: clamp(5rem, 20vw, 10rem); font-weight: 800; color: var(--sky); line-height: 1; margin: 0; }

@media print {
  .site-header, .site-footer, .article-aside, .cta-tool, .related { display: none; }
  body { background: #fff; }
  .reveal-on-scroll { opacity: 1; transform: none; }
}

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

/* ===== Ajustements Levainerie du sous-menu Outils (05b délégué) =====
   Le front bascule en drawer sous 1020 px (et non 850) ; ses liens de nav ont
   une spécificité .main-nav a:not(.btn) qui écrase le bloc générique. */
:root { --font-body: var(--f-body); }
.main-nav .sub-nav a { padding: 9px 12px; font-size: 13px; font-weight: 700; border-bottom: 0; }
.main-nav .sub-nav a.sub-nav-all { color: var(--primary); }
@media (min-width: 1020px) { .footer-grid { grid-template-columns: 1.4fr repeat(4, 1fr); } }
@media (max-width: 1019px) {
  .main-nav .nav-item { display: block; }
  .main-nav .has-sub::after { display: none; }
  .main-nav .sub-nav { position: static; display: flex; min-width: 0; margin: 4px 0 8px 2px; padding: 2px 0 2px 14px; border: 0; border-left: 2px solid var(--line); box-shadow: none; background: transparent; gap: 0; }
  .main-nav .sub-nav a { white-space: normal; padding: 7px 0; border-left: 0; }
  .main-nav .sub-nav a small { display: none; }
}

/* ===== 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(--container) */
.lead{max-width:none!important}   /* styles.css : 62ch */
.section-head{max-width:none!important}   /* styles.css : 720px */
.page-head h1{max-width:none!important}   /* styles.css : 22ch */
.article-body{max-width:none!important}   /* styles.css : 74ch */
.prose{max-width:none!important}   /* styles.css : 72ch */
.cta-band p{max-width:none!important}   /* styles.css : 56ch */
.footer-brand p{max-width:none!important}   /* styles.css : 38ch */
.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.05fr .95fr }  (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)}

/* ===== BLOC OUTILS 05c — rendu serveur, ancre de résultat, choix de coupe ===== */
.lv-resultat-ancre { height: 0; outline: none; scroll-margin-top: 96px; }
html:has(#resultat[autofocus]) { scroll-behavior: auto; }
@media (min-width: 900px) {
  .calc { position: relative; }
  .calc > .lv-resultat-ancre { position: absolute; top: 0; left: 0; width: 1px; }
}
.calc-panel .btn { width: 100%; margin-top: var(--s2, 8px); }
.calc-result p { color: var(--callout-bg, #F6EBDD); }
.calc-result .btn-light { margin-top: var(--s2, 8px); }
.lv-coupes { border: 0; padding: 0; margin: 0 0 var(--s4, 16px); display: grid; gap: var(--s3, 12px); grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.lv-coupes legend { margin-bottom: var(--s3, 12px); padding: 0; }
.lv-coupe-choix { display: flex; flex-direction: column; align-items: center; gap: var(--s2, 8px); padding: var(--s3, 12px); border: 2px solid var(--border, #DDD3C3); border-radius: 12px; background: var(--surface, #FAF6EF); cursor: pointer; text-align: center; font-size: .92rem; font-weight: 600; color: var(--text, #2E3A3F); }
.lv-coupe-choix:hover, .lv-coupe-choix:has(input:checked) { border-color: var(--primary, #7B4A2D); background: var(--callout-bg, #F6EBDD); }
.lv-coupe-choix input { accent-color: var(--primary, #7B4A2D); width: 20px; height: 20px; }
.lv-coupe { max-width: 100%; height: auto; }
.lv-causes { padding-left: 1.2em; margin: 0; }
.lv-causes li { margin-bottom: var(--s4, 16px); }
.lv-causes h3 { color: var(--white, #FFFFFF); font-size: 1.1rem; margin-bottom: 6px; }
.lv-causes a { color: var(--callout-border, #E2CDB3); font-weight: 600; }

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