/* ==========================================================
   Copeauforge — styles.css
   ========================================================== */
:root {
  --primary: #4A3426;
  --primary-dark: #3A281D;
  --primary-ink: #1E1611;
  --secondary: #3E5C6E;
  --secondary-light: #B7C6CF;
  --secondary-soft: #E4EAED;
  --bg: #EDE3D0;
  --surface: #F7F1E6;
  --ink: #2B211A;
  --ink-soft: #4E4136;
  --line: #D3C4A8;
  --wood: #8C5A2E;
  --wood-soft: #F3E7D3;
  --danger: #B3261E;
  --danger-soft: #FDECEA;
  --radius: 16px;
  --radius-lg: 28px;
  --shadow: 0 6px 24px rgba(46, 33, 25, .08);
  --shadow-lg: 0 18px 48px rgba(46, 33, 25, .16);
  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 32px; --s6: 48px; --s7: 72px; --s8: 96px;
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
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: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; color: var(--primary-ink); margin: 0 0 var(--s3); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2.25rem, 5.2vw, 3.75rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); }
p { margin: 0 0 var(--s3); }
ul, ol { padding-left: 1.25rem; margin: 0 0 var(--s3); }
li { margin-bottom: var(--s2); }
strong { color: var(--primary-ink); }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--s3); }
.narrow { max-width: 820px; }
.section { padding-block: var(--s7); }
.section-alt { background: var(--secondary-soft); }
.section-head { max-width: 720px; margin-bottom: var(--s5); }
.section-head p { color: var(--ink-soft); font-size: 1.15rem; }
.eyebrow { display: inline-flex; align-items: center; gap: var(--s2); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); background: var(--secondary-soft); padding: 6px 14px; border-radius: 999px; margin-bottom: var(--s3); }
.eyebrow i, .eyebrow svg { width: 16px; height: 16px; }
.lead { font-size: 1.25rem; color: var(--ink-soft); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--primary); color: #fff; padding: 8px 16px; z-index: 200; border-radius: 8px; }
.skip-link:focus { left: 8px; color: #fff; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(247,241,230,.92); 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(--s3); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.45rem; color: var(--primary-ink); letter-spacing: -.02em; }
.brand-name span { color: var(--primary); }
.nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; cursor: pointer; padding: 0 11px; }
.nav-toggle span { display: block; height: 2px; background: var(--primary-ink); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.main-nav { position: absolute; inset: 68px 0 auto 0; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; padding: var(--s3); }
.main-nav.open { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.main-nav li { margin: 0; }
.main-nav a { display: block; padding: 12px 14px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 500; transition: background .2s, color .2s; }
.main-nav a:hover { background: var(--secondary-soft); color: var(--primary-dark); }
.main-nav a.active { background: var(--primary); color: #fff; }

@media (min-width: 1080px) {
  .nav-toggle { display: none; }
  .main-nav { position: static; display: block; background: none; border: 0; box-shadow: none; padding: 0; }
  .main-nav ul { display: flex; gap: 2px; }
  .main-nav a { padding: 8px 11px; font-size: .92rem; }
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: .9rem; margin-bottom: var(--s3); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.breadcrumbs li { margin: 0; color: var(--ink-soft); }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--primary); }
.breadcrumbs a { color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: var(--s2); padding: 14px 26px; 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, .btn i { width: 18px; height: 18px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(74,52,38,.28); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-ghost:hover { background: var(--primary); color: #fff; }
.btn-light { background: var(--surface); color: var(--primary-dark); }
.btn-light:hover { background: var(--secondary); color: #fff; transform: translateY(-2px); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s4); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: var(--s6) var(--s7); overflow: hidden; background:
  radial-gradient(900px 400px at 85% -10%, rgba(62,92,110,.16), transparent 60%),
  radial-gradient(600px 300px at -5% 100%, rgba(185,114,46,.10), transparent 60%), var(--bg); }
.hero-grid { display: grid; gap: var(--s5); align-items: center; }
.hero h1 em { font-style: normal; color: var(--primary); position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .22em; background: var(--secondary-light); z-index: -1; border-radius: 4px; }
.hero-media { position: relative; }
.hero-media img { border-radius: var(--radius-lg) var(--radius-lg) 120px var(--radius-lg); box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3.4; object-fit: cover; width: 100%; }
.hero-badge { position: absolute; left: -8px; bottom: -22px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px 18px; display: flex; gap: 12px; align-items: center; max-width: 290px; border: 1px solid var(--line); }
.hero-badge .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--secondary); color: #fff; display: grid; place-items: center; flex: none; }
.hero-badge strong { display: block; font-family: var(--font-head); font-size: 1.1rem; line-height: 1.2; }
.hero-badge span { font-size: .85rem; color: var(--ink-soft); line-height: 1.35; display: block; }
.page-hero { padding-block: var(--s5) var(--s6); background: linear-gradient(180deg, var(--secondary-soft), var(--bg)); border-bottom: 1px solid var(--line); }
.page-hero p.lead { max-width: 760px; }
.page-hero-grid { display: grid; gap: var(--s5); align-items: center; }
.page-hero-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.meta-pills { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--primary-ink); }
.pill i, .pill svg { width: 15px; height: 15px; color: var(--primary); }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: var(--s7); }
  .page-hero-grid { grid-template-columns: 1.15fr .85fr; }
}

/* ---------- Layout blocks ---------- */
.split { display: grid; gap: var(--s5); align-items: center; }
.split img { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; aspect-ratio: 16/11; object-fit: cover; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--s7); }
  .split.reverse > :first-child { order: 2; }
}
.cards { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s, border-color .25s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--secondary); }
.card h3 { margin-bottom: var(--s2); }
.card p { color: var(--ink-soft); flex: 1; }
.card .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--secondary-soft); color: var(--primary); display: grid; place-items: center; margin-bottom: var(--s3); }
.card .more { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; margin-top: var(--s2); }
.card .more i, .card .more svg { width: 16px; height: 16px; }
.card-media { padding: 0; overflow: hidden; }
.card-media img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.card-media .card-body { padding: var(--s4); display: flex; flex-direction: column; flex: 1; }
a.card-link { text-decoration: none; color: inherit; display: block; height: 100%; }
a.card-link:hover { color: inherit; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--wood); background: var(--wood-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: var(--s2); align-self: flex-start; }

.layout { display: grid; gap: var(--s5); padding-block: var(--s6) var(--s7); }
@media (min-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr) 330px; gap: var(--s6); align-items: start; }
  .sidebar { position: sticky; top: 92px; }
}
.prose h2 { margin-top: var(--s6); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--s4); }
.prose img { border-radius: var(--radius); margin-block: var(--s4); }
.sidebar .box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); margin-bottom: var(--s3); box-shadow: var(--shadow); }
.sidebar h2, .sidebar h3 { font-size: 1.15rem; margin-bottom: var(--s2); }
.fiche { list-style: none; padding: 0; margin: 0; }
.fiche li { display: flex; justify-content: space-between; gap: var(--s3); padding: 10px 0; border-bottom: 1px dashed var(--line); margin: 0; font-size: .95rem; }
.fiche li:last-child { border-bottom: 0; }
.fiche span:first-child { color: var(--ink-soft); }
.fiche span:last-child { font-weight: 600; text-align: right; color: var(--primary-ink); }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { margin: 0; }
.link-list a { display: flex; gap: 10px; align-items: center; padding: 9px 0; text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--line); }
.link-list li:last-child a { border-bottom: 0; }
.link-list .num { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; font-size: .8rem; display: grid; place-items: center; flex: none; font-weight: 700; }

/* ---------- Steps ---------- */
ol.steps { list-style: none; padding: 0; counter-reset: step; margin: var(--s4) 0; }
ol.steps > li { counter-increment: step; position: relative; padding: var(--s3) var(--s3) var(--s3) 68px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: var(--s3); }
ol.steps > li::before { content: counter(step); position: absolute; left: 16px; top: 16px; width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff; font-family: var(--font-head); font-weight: 700; display: grid; place-items: center; font-size: 1.1rem; }
ol.steps h3 { font-size: 1.15rem; margin-bottom: 6px; }
ol.steps p:last-child { margin-bottom: 0; }

/* ---------- Callouts ---------- */
.callout { display: flex; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--radius); margin: var(--s4) 0; border: 1px solid; }
.callout > i, .callout > svg { flex: none; width: 24px; height: 24px; margin-top: 2px; }
.callout p:last-child { margin-bottom: 0; }
.callout.tip { background: var(--secondary-soft); border-color: var(--secondary); }
.callout.tip > i, .callout.tip > svg { color: var(--primary); }
.callout.warn { background: var(--wood-soft); border-color: #E9C79B; }
.callout.warn > i, .callout.warn > svg { color: var(--wood); }
.callout.danger { background: var(--danger-soft); border-color: #F2B8B5; }
.callout.danger > i, .callout.danger > svg { color: var(--danger); }

.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 32px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--secondary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }
.crosslist { list-style: none; padding: 0; }
.crosslist li { position: relative; padding-left: 32px; }
.crosslist li::before { content: "!"; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--wood-soft); color: var(--wood); font-weight: 800; font-size: .8rem; display: grid; place-items: center; border: 1px solid #E9C79B; }

/* ---------- Path (projets) ---------- */
.path { list-style: none; padding: 0; margin: 0; position: relative; display: grid; gap: var(--s4); }
.path::before { content: ""; position: absolute; left: 27px; top: 8px; bottom: 8px; width: 3px; background: linear-gradient(var(--secondary), var(--primary)); border-radius: 3px; }
.path > li { position: relative; margin: 0; padding-left: 76px; }
.path .badge { position: absolute; left: 0; top: 0; width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; border: 4px solid var(--bg); box-shadow: 0 0 0 2px var(--primary); z-index: 1; }
.section-alt .path .badge { border-color: var(--secondary-soft); }
.path-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.path-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.path-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.path-card .body { padding: var(--s4); }
.path-card h3 { margin-bottom: 6px; }
.path-card p { color: var(--ink-soft); }
.skills { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: var(--s2) 0 0; }
.skills li { margin: 0; font-size: .8rem; font-weight: 600; background: var(--secondary-soft); color: var(--primary-ink); padding: 4px 10px; border-radius: 999px; }
@media (min-width: 760px) {
  .path-card { grid-template-columns: 280px 1fr; }
  .path-card img { height: 100%; aspect-ratio: auto; }
  .path::before { left: 31px; }
  .path > li { padding-left: 92px; }
  .path .badge { width: 64px; height: 64px; font-size: 1.7rem; }
}

/* ---------- FAQ ---------- */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: var(--s2); padding: 0 var(--s4); transition: border-color .2s; }
.faq details[open] { border-color: var(--primary); }
.faq summary { cursor: pointer; font-weight: 600; padding: var(--s3) 0; list-style: none; display: flex; justify-content: space-between; gap: var(--s3); color: var(--primary-ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--primary); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: var(--s4) 0; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; min-width: 560px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--secondary-soft); color: var(--primary-ink); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

/* ---------- Widgets ---------- */
.widget { background: var(--surface); border: 2px solid var(--secondary); border-radius: var(--radius-lg); padding: var(--s4); box-shadow: var(--shadow); margin: var(--s5) 0; }
.widget h2, .widget h3 { margin-bottom: var(--s2); }
.widget > p { color: var(--ink-soft); }
.field-row { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-block: var(--s3); }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--primary-ink); }
.field input, .field select { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; background: var(--surface); color: var(--ink); }
.field input:focus, .field select:focus { border-color: var(--primary); outline: 3px solid rgba(74,52,38,.2); }
.result { background: var(--secondary-soft); border-radius: var(--radius); padding: var(--s3) var(--s4); margin-top: var(--s3); border-left: 5px solid var(--primary); }
.result .big { font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: var(--primary-ink); line-height: 1.1; display: block; }
.result p { margin: 6px 0 0; color: var(--ink-soft); font-size: .98rem; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--primary-ink), var(--primary)); color: #fff; border-radius: var(--radius-lg); padding: var(--s6) var(--s4); text-align: center; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; width: 360px; height: 360px; right: -90px; top: -120px; border-radius: 50%; background: rgba(183,198,207,.16); }
.cta-band h2 { color: #fff; position: relative; z-index: 1; }
.cta-band p { color: #EDE3D0; max-width: 640px; margin-inline: auto; position: relative; z-index: 1; }
.cta-band .btn-row { justify-content: center; position: relative; z-index: 1; }

/* ---------- Misc ---------- */
.stats { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-top: var(--s5); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3) var(--s4); }
.stat strong { display: block; font-family: var(--font-head); font-size: 2rem; color: var(--primary); line-height: 1.1; }
.stat span { font-size: .9rem; color: var(--ink-soft); }
.overlap { margin-top: calc(var(--s6) * -1); position: relative; z-index: 2; }
.two-col { display: grid; gap: var(--s4); }
@media (min-width: 760px) { .two-col { grid-template-columns: 1fr 1fr; } }
.nav-prev-next { display: grid; gap: var(--s3); margin-top: var(--s5); }
.nav-prev-next a { display: block; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; transition: border-color .2s, transform .2s; }
.nav-prev-next a:hover { border-color: var(--primary); transform: translateY(-2px); }
.nav-prev-next small { display: block; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; }
.nav-prev-next strong { font-family: var(--font-head); font-size: 1.15rem; }
@media (min-width: 700px) { .nav-prev-next { grid-template-columns: 1fr 1fr; } .nav-prev-next .next { text-align: right; } }
.diagram { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3); }
.diagram svg { width: 100%; height: auto; display: block; }
.toggle-group { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s3); }
.toggle-group button { font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; color: var(--primary-ink); transition: all .2s; }
.toggle-group button[aria-pressed="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-ink); color: #E3D7C0; padding-top: var(--s7); margin-top: var(--s7); }
.site-footer a { color: #E3D7C0; text-decoration: none; }
.site-footer a:hover { color: var(--secondary-light); text-decoration: underline; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-name span { color: var(--secondary-light); }
.footer-grid { display: grid; gap: var(--s5); grid-template-columns: 1fr; padding-bottom: var(--s5); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-title { font-family: var(--font-body); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--secondary-light); margin-bottom: var(--s3); }
.footer-brand p { margin-top: var(--s3); max-width: 340px; font-size: .95rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding-block: var(--s4); font-size: .88rem; display: grid; gap: var(--s2); }
.footer-bottom p { margin: 0; }
.footer-safe { color: #B7C6CF; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }

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

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

/* ===== ADAPTATION SOUS-MENU OUTILS (copeauforge) — tokens du front, drawer sous 1080 px, footer 5 colonnes ===== */
.sub-nav{--text-muted:var(--ink-soft);--text-secondary:var(--ink);--fill:var(--secondary-soft)}
.main-nav li.nav-item{display:block;position:relative}
.main-nav .sub-nav a{border-radius:0}
@media (max-width:1079px){
.main-nav .has-sub::after{display:none}
.main-nav .sub-nav{position:static;display:flex;min-width:0;margin:2px 0 6px 14px;padding:0 0 0 12px;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 10px;font-size:.9rem}
.main-nav .sub-nav a small{display:none}
}
@media (min-width:1080px){.main-nav li.nav-item{display:flex;align-items:center}}
@media (min-width:800px){.footer-grid{grid-template-columns:1.3fr repeat(4,1fr)}}

/* ===== BLOC LARGEUR UNIFIÉE — toutes les pages à la largeur de la home ===== */
/*
 * Posé par 05c-outils-opti, une fois les pages d'outils en place.
 *
 * Le builder du front réserve `.container` (largeur de la home) aux pages
 * d'accueil et de service, et applique une colonne étroite aux pages de contenu
 * via `.guide-narrow` / `.article-narrow` / `.content-narrow` selon le builder.
 * Résultat : outils, piliers et pages éditoriales sont plus étroits que la home,
 * ce qui se voit immédiatement en passant de l'une à l'autre — et prive les
 * tableaux et les simulateurs de la largeur dont ils ont besoin.
 *
 * `!important` est ici délibéré, pas une facilité. Ce bloc est appendu à
 * `styles.css`, mais la contrainte de largeur est souvent déclarée dans une
 * feuille chargée APRÈS (`article.css` sur le builder Otomatic). À spécificité
 * égale, la dernière feuille gagne : sans `!important`, le bloc serait posé,
 * validé, et pourtant sans effet — un échec indiscernable d'un succès.
 *
 * Les CONTRÔLES de formulaire, eux, restent plafonnés : un `select` ou un
 * `input` étiré sur toute la largeur de la page n'est pas une préférence de
 * style, c'est une régression d'usage.
 */
.guide-narrow,
.article-narrow,
.content-narrow{max-width:none!important}

.guide-narrow select,.guide-narrow input[type=number],.guide-narrow input[type=text],
.article-narrow select,.article-narrow input[type=number],.article-narrow input[type=text],
.content-narrow select,.content-narrow input[type=number],.content-narrow input[type=text]{max-width:520px}

/*
 * Conteneurs posés par l'orchestrateur lui-même (pages légales, plan du site)
 * et par les blocs d'enrichissement des builders : `.wrap`, `.article-layout`,
 * `.narrow-content`. Sur les fronts qui ne les stylent pas — le cas de tout
 * builder non melodine — ces pages s'affichaient bord à bord, sans gouttière,
 * donc PLUS larges que la home : l'inverse exact du défaut corrigé au-dessus,
 * et invisible tant qu'on ne regarde que les pages d'outils.
 *
 * Les règles ci-dessous ne mordent que si la feuille du front ne définit pas
 * déjà ces classes, puisqu'elles sont posées en fin de feuille sans `!important`
 * et à spécificité minimale.
 */
.wrap,
.narrow-content,
.article-layout{width:min(1140px,calc(100% - 40px));margin-inline:auto}
.article-body{max-width:72ch}

@media(max-width:650px){
.wrap,
.narrow-content,
.article-layout{width:min(100% - 28px,1140px)}
}
