/*
Theme Name: BATI-MESURE Pro
Theme URI: https://www.bati-mesure.fr/
Author: BATI-MESURE
Author URI: https://www.bati-mesure.fr/
Description: Thème WordPress léger et sur mesure pour BATI-MESURE : prestations RE2020, infiltrométrie, ventilation, acoustique, conseils, formulaire de devis sécurisé et API AutoFacture.
Version: 1.8.7
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: bati-mesure-pro
License: GPL-2.0-or-later
*/

:root {
  --bm-navy: #0b1f33;
  --bm-navy-2: #102a43;
  --bm-teal: #0f766e;
  --bm-teal-dark: #0b5f59;
  --bm-mint: #dff7f2;
  --bm-lime: #d9f06b;
  --bm-orange: #f59e0b;
  --bm-white: #ffffff;
  --bm-ink: #14202b;
  --bm-muted: #5f6f7e;
  --bm-line: #dce5eb;
  --bm-soft: #f4f8fa;
  --bm-shadow: 0 20px 50px rgba(11, 31, 51, .10);
  --bm-radius: 22px;
  --bm-radius-sm: 14px;
  --bm-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--bm-ink);
  background: var(--bm-white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--bm-teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--bm-teal-dark); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.bm-container { width: min(calc(100% - 40px), var(--bm-max)); margin-inline: auto; }
.bm-narrow { width: min(calc(100% - 40px), 820px); margin-inline: auto; }
.bm-section { padding: 90px 0; }
.bm-section--soft { background: var(--bm-soft); }
.bm-section--dark { background: var(--bm-navy); color: var(--bm-white); }
.bm-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--bm-teal);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.bm-kicker::before { content: ""; width: 28px; height: 3px; border-radius: 999px; background: var(--bm-lime); }
.bm-section--dark .bm-kicker { color: var(--bm-mint); }
.bm-section-title { max-width: 780px; margin: 0 0 18px; color: var(--bm-navy); font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1.08; letter-spacing: -.035em; }
.bm-section--dark .bm-section-title { color: var(--bm-white); }
.bm-section-intro { max-width: 760px; margin: 0 0 42px; color: var(--bm-muted); font-size: 1.08rem; }
.bm-section--dark .bm-section-intro { color: #c6d4df; }

.bm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--bm-teal);
  color: var(--bm-white);
  font-weight: 800;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.bm-btn:hover { color: var(--bm-white); background: var(--bm-teal-dark); transform: translateY(-2px); box-shadow: 0 12px 24px rgba(15, 118, 110, .24); }
.bm-btn--light { background: var(--bm-white); color: var(--bm-navy); }
.bm-btn--light:hover { background: var(--bm-mint); color: var(--bm-navy); }
.bm-btn--ghost { border-color: rgba(255,255,255,.45); background: transparent; color: var(--bm-white); }
.bm-btn--ghost:hover { background: rgba(255,255,255,.1); }
.bm-btn--outline { border-color: var(--bm-line); background: var(--bm-white); color: var(--bm-navy); }
.bm-btn--outline:hover { border-color: var(--bm-teal); background: var(--bm-mint); color: var(--bm-navy); }

.bm-skip-link { position: fixed; top: 8px; left: 8px; z-index: 9999; transform: translateY(-160%); padding: 10px 14px; border-radius: 8px; background: var(--bm-navy); color: var(--bm-white); }
.bm-skip-link:focus { transform: none; }

.bm-topbar { background: var(--bm-navy); color: #dce7ef; font-size: .9rem; }
.bm-topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 38px; }
.bm-topbar a { color: var(--bm-white); text-decoration: none; }
.bm-topbar__links { display: flex; gap: 20px; flex-wrap: wrap; }

.bm-header { position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid rgba(11,31,51,.08); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); }
.admin-bar .bm-header { top: 32px; }
.bm-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 78px; }
.bm-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--bm-navy); text-decoration: none; }
.bm-brand:hover { color: var(--bm-navy); }
.bm-brand__mark { width: 42px; height: 42px; flex: 0 0 auto; }
.bm-brand__text { display: grid; line-height: 1.05; }
.bm-brand__name { font-size: 1.1rem; font-weight: 900; letter-spacing: .04em; }
.bm-brand__tagline { margin-top: 5px; color: var(--bm-muted); font-size: .69rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.custom-logo { max-height: 54px; width: auto; }

.bm-nav { display: flex; align-items: center; gap: 22px; }
.bm-nav > ul { display: flex; align-items: center; gap: 24px; margin: 0; padding: 0; list-style: none; }
.bm-nav a { color: var(--bm-navy); font-size: .94rem; font-weight: 750; text-decoration: none; }
.bm-nav a:hover, .bm-nav .current-menu-item > a { color: var(--bm-teal); }
.bm-menu-toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--bm-line); border-radius: 12px; background: var(--bm-white); color: var(--bm-navy); }
.bm-menu-toggle span { display: block; width: 21px; height: 2px; margin: 5px auto; border-radius: 2px; background: currentColor; }

.bm-hero { position: relative; overflow: hidden; padding: 95px 0 70px; background: linear-gradient(135deg, var(--bm-navy) 0%, #0d354b 64%, #0f766e 145%); color: var(--bm-white); }
.bm-hero::before { content: ""; position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(rgba(255,255,255,.25) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.25) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to right, transparent, #000 35%, #000); }
.bm-hero::after { content: ""; position: absolute; width: 440px; height: 440px; right: -160px; top: -190px; border: 80px solid rgba(217,240,107,.13); border-radius: 50%; }
.bm-hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.18fr .82fr; align-items: center; gap: 70px; }
.bm-hero h1 { max-width: 840px; margin: 0 0 24px; font-size: clamp(2.7rem, 6vw, 5.35rem); line-height: .98; letter-spacing: -.055em; }
.bm-hero h1 span { color: var(--bm-lime); }
.bm-hero__lead { max-width: 720px; margin: 0 0 32px; color: #dce7ef; font-size: clamp(1.06rem, 2vw, 1.28rem); }
.bm-hero__actions { display: flex; flex-wrap: wrap; gap: 13px; }
.bm-hero__trust { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.bm-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(255,255,255,.08); color: #eaf2f7; font-size: .88rem; font-weight: 700; }
.bm-pill::before { content: "✓"; color: var(--bm-lime); font-weight: 900; }
.bm-measure-panel { position: relative; min-height: 430px; padding: 28px; border: 1px solid rgba(255,255,255,.16); border-radius: 28px; background: rgba(255,255,255,.08); box-shadow: 0 28px 70px rgba(0,0,0,.22); backdrop-filter: blur(12px); }
.bm-measure-panel__ring { position: absolute; inset: 50% auto auto 50%; width: 258px; height: 258px; transform: translate(-50%, -51%); border: 1px solid rgba(255,255,255,.23); border-radius: 50%; }
.bm-measure-panel__ring::before, .bm-measure-panel__ring::after { content: ""; position: absolute; inset: 26px; border: 1px dashed rgba(217,240,107,.42); border-radius: 50%; }
.bm-measure-panel__ring::after { inset: 62px; border-style: solid; }
.bm-measure-panel__needle { position: absolute; left: 50%; top: 50%; width: 104px; height: 4px; transform: rotate(-35deg); transform-origin: left center; border-radius: 999px; background: var(--bm-lime); box-shadow: 0 0 20px rgba(217,240,107,.4); }
.bm-measure-panel__center { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; transform: translate(-50%,-50%); border: 5px solid var(--bm-navy); border-radius: 50%; background: var(--bm-lime); }
.bm-measure-panel__stat { position: absolute; width: 170px; padding: 15px 16px; border: 1px solid rgba(255,255,255,.16); border-radius: 16px; background: rgba(11,31,51,.74); }
.bm-measure-panel__stat strong { display: block; color: var(--bm-white); font-size: 1.35rem; }
.bm-measure-panel__stat span { color: #bcd0dc; font-size: .82rem; }
.bm-measure-panel__stat--a { left: 20px; top: 24px; }
.bm-measure-panel__stat--b { right: 20px; bottom: 24px; }
.bm-measure-panel__label { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); color: #dbe8ef; font-size: .82rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }

.bm-metrics { position: relative; z-index: 2; margin-top: -28px; }
.bm-metrics__grid { display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; border: 1px solid var(--bm-line); border-radius: var(--bm-radius); background: var(--bm-white); box-shadow: var(--bm-shadow); }
.bm-metric { padding: 26px 24px; }
.bm-metric + .bm-metric { border-left: 1px solid var(--bm-line); }
.bm-metric strong { display: block; color: var(--bm-navy); font-size: 1.5rem; line-height: 1.1; }
.bm-metric span { display: block; margin-top: 6px; color: var(--bm-muted); font-size: .9rem; }

.bm-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.bm-card { position: relative; overflow: hidden; min-height: 100%; padding: 28px; border: 1px solid var(--bm-line); border-radius: var(--bm-radius); background: var(--bm-white); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.bm-card:hover { transform: translateY(-5px); border-color: #bdd7d3; box-shadow: var(--bm-shadow); }
.bm-card__icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 22px; border-radius: 16px; background: var(--bm-mint); color: var(--bm-teal); }
.bm-card__icon svg { width: 28px; height: 28px; }
.bm-card h3 { margin: 0 0 10px; color: var(--bm-navy); font-size: 1.3rem; line-height: 1.25; }
.bm-card p { margin: 0 0 18px; color: var(--bm-muted); }
.bm-card__link { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; text-decoration: none; }
.bm-card__link::after { content: "→"; transition: transform .2s ease; }
.bm-card__link:hover::after { transform: translateX(4px); }

.bm-split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 70px; }
.bm-feature-list { display: grid; gap: 16px; margin: 28px 0 0; padding: 0; list-style: none; }
.bm-feature-list li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.bm-feature-list li::before { content: "✓"; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bm-mint); color: var(--bm-teal); font-weight: 900; }
.bm-visual { position: relative; min-height: 480px; overflow: hidden; border-radius: 30px; background: linear-gradient(145deg, #e8f6f2, #f5f8fb); }
.bm-visual::before { content: ""; position: absolute; inset: 40px; border: 1px solid rgba(15,118,110,.22); border-radius: 24px; }
.bm-visual__building { position: absolute; left: 15%; right: 15%; bottom: 12%; height: 62%; border: 10px solid var(--bm-navy); background: rgba(255,255,255,.75); clip-path: polygon(0 28%, 50% 0, 100% 28%, 100% 100%, 0 100%); }
.bm-visual__building::before { content: ""; position: absolute; inset: 34% 12% 12%; background: linear-gradient(90deg, transparent 48%, var(--bm-line) 48%, var(--bm-line) 52%, transparent 52%), linear-gradient(transparent 47%, var(--bm-line) 47%, var(--bm-line) 53%, transparent 53%); }
.bm-visual__pulse { position: absolute; left: 50%; top: 52%; width: 130px; height: 130px; transform: translate(-50%,-50%); border: 8px solid var(--bm-teal); border-radius: 50%; box-shadow: 0 0 0 18px rgba(15,118,110,.12), 0 0 0 36px rgba(15,118,110,.06); }
.bm-visual__badge { position: absolute; right: 26px; top: 28px; max-width: 190px; padding: 15px 17px; border-radius: 15px; background: var(--bm-navy); color: var(--bm-white); box-shadow: var(--bm-shadow); }
.bm-visual__badge strong { color: var(--bm-lime); }

.bm-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: bmstep; }
.bm-step { counter-increment: bmstep; padding: 26px; border-radius: var(--bm-radius); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.bm-step::before { content: "0" counter(bmstep); display: block; margin-bottom: 20px; color: var(--bm-lime); font-size: 1.75rem; font-weight: 900; }
.bm-step h3 { margin: 0 0 8px; color: var(--bm-white); }
.bm-step p { margin: 0; color: #c2d1dc; font-size: .94rem; }

.bm-zone { display: grid; grid-template-columns: .95fr 1.05fr; gap: 42px; align-items: stretch; }
.bm-zone__map { position: relative; min-height: 420px; overflow: hidden; border-radius: 28px; background: var(--bm-navy); }
.bm-zone__map::before { content: ""; position: absolute; inset: 0; opacity: .2; background-image: radial-gradient(circle at 30% 30%, var(--bm-lime) 0 2px, transparent 3px), radial-gradient(circle at 68% 55%, var(--bm-mint) 0 2px, transparent 3px), linear-gradient(35deg, transparent 48%, rgba(255,255,255,.25) 49%, rgba(255,255,255,.25) 50%, transparent 51%); background-size: 70px 70px, 90px 90px, 120px 120px; }
.bm-zone__pin { position: absolute; left: 48%; top: 43%; width: 78px; height: 78px; transform: translate(-50%,-50%) rotate(45deg); border: 10px solid rgba(255,255,255,.75); border-radius: 50% 50% 50% 0; background: var(--bm-teal); box-shadow: 0 20px 40px rgba(0,0,0,.28); }
.bm-zone__pin::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; transform: translate(-50%,-50%); border-radius: 50%; background: var(--bm-lime); }
.bm-zone__label { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); width: calc(100% - 48px); padding: 18px; border-radius: 15px; background: rgba(255,255,255,.92); color: var(--bm-navy); text-align: center; font-weight: 800; }
.bm-zone__content { padding: 24px 0; }
.bm-chip-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.bm-chip { padding: 9px 13px; border: 1px solid var(--bm-line); border-radius: 999px; background: var(--bm-white); color: var(--bm-navy); font-size: .9rem; font-weight: 750; }

.bm-post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.bm-post-card { overflow: hidden; border: 1px solid var(--bm-line); border-radius: var(--bm-radius); background: var(--bm-white); }
.bm-post-card__visual { height: 160px; background: linear-gradient(135deg, var(--bm-navy), var(--bm-teal)); position: relative; }
.bm-post-card__visual::after { content: ""; position: absolute; width: 120px; height: 120px; right: -15px; bottom: -35px; border: 22px solid rgba(217,240,107,.35); border-radius: 50%; }
.bm-post-card__body { padding: 24px; }
.bm-post-card__meta { color: var(--bm-teal); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.bm-post-card h3 { margin: 8px 0 12px; color: var(--bm-navy); font-size: 1.18rem; line-height: 1.3; }
.bm-post-card p { margin: 0 0 16px; color: var(--bm-muted); font-size: .94rem; }

.bm-faq { display: grid; gap: 13px; }
.bm-faq details { border: 1px solid var(--bm-line); border-radius: 16px; background: var(--bm-white); }
.bm-faq summary { position: relative; padding: 20px 54px 20px 22px; color: var(--bm-navy); font-weight: 850; cursor: pointer; list-style: none; }
.bm-faq summary::-webkit-details-marker { display: none; }
.bm-faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--bm-teal); font-size: 1.55rem; }
.bm-faq details[open] summary::after { content: "−"; }
.bm-faq details p { margin: 0; padding: 0 22px 22px; color: var(--bm-muted); }

.bm-cta { position: relative; overflow: hidden; padding: 55px; border-radius: 30px; background: linear-gradient(135deg, var(--bm-teal), #075d69); color: var(--bm-white); }
.bm-cta::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border: 55px solid rgba(217,240,107,.2); border-radius: 50%; }
.bm-cta__inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 36px; }
.bm-cta h2 { max-width: 720px; margin: 0 0 12px; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.08; letter-spacing: -.035em; }
.bm-cta p { max-width: 700px; margin: 0; color: #dff6f2; }

.bm-page-hero { padding: 72px 0; background: linear-gradient(135deg, var(--bm-navy), #123d51); color: var(--bm-white); }
.bm-page-hero h1 { max-width: 900px; margin: 0 0 16px; font-size: clamp(2.35rem, 5vw, 4.5rem); line-height: 1.03; letter-spacing: -.045em; }
.bm-page-hero p { max-width: 760px; margin: 0; color: #cddbe5; font-size: 1.12rem; }
.bm-content { padding: 72px 0 100px; }
.bm-content .entry-content > * { max-width: 820px; margin-left: auto; margin-right: auto; }
.bm-content .entry-content > .alignwide { max-width: var(--bm-max); }
.bm-content h2 { margin-top: 2.4em; color: var(--bm-navy); font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.18; }
.bm-content h3 { margin-top: 1.8em; color: var(--bm-navy); }
.bm-content blockquote { padding: 20px 24px; border-left: 5px solid var(--bm-teal); background: var(--bm-mint); }
.bm-content table { width: 100%; border-collapse: collapse; }
.bm-content th, .bm-content td { padding: 12px; border: 1px solid var(--bm-line); text-align: left; }

.bm-form-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 38px; align-items: start; }
.bm-form { padding: 32px; border: 1px solid var(--bm-line); border-radius: 24px; background: var(--bm-white); box-shadow: var(--bm-shadow); }
.bm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.bm-field { display: grid; gap: 7px; }
.bm-field--full { grid-column: 1 / -1; }
.bm-field label, .bm-field legend { color: var(--bm-navy); font-weight: 800; }
.bm-field small { color: var(--bm-muted); }
.bm-field input, .bm-field select, .bm-field textarea { width: 100%; padding: 13px 14px; border: 1px solid #cbd8e0; border-radius: 12px; background: var(--bm-white); color: var(--bm-ink); }
.bm-field input:focus, .bm-field select:focus, .bm-field textarea:focus { outline: 3px solid rgba(15,118,110,.16); border-color: var(--bm-teal); }
.bm-field textarea { min-height: 150px; resize: vertical; }
.bm-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 16px; }
.bm-check { display: flex; gap: 9px; align-items: flex-start; color: var(--bm-ink); }
.bm-check input { width: auto; margin-top: 5px; }
.bm-honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.bm-notice { margin-bottom: 22px; padding: 15px 18px; border-radius: 13px; font-weight: 700; }
.bm-notice--success { background: #e6f8ef; color: #145c3d; border: 1px solid #bde8d2; }
.bm-notice--error { background: #fff0f0; color: #8f1f1f; border: 1px solid #f2c6c6; }
.bm-form-aside { position: sticky; top: 120px; display: grid; gap: 16px; }
.bm-info-card { padding: 23px; border-radius: 18px; background: var(--bm-navy); color: var(--bm-white); }
.bm-info-card h3 { margin-top: 0; color: var(--bm-white); }
.bm-info-card a { color: var(--bm-lime); }
.bm-info-card p:last-child { margin-bottom: 0; }

.bm-footer { padding: 68px 0 24px; background: #071521; color: #c4d1da; }
.bm-footer__grid { display: grid; grid-template-columns: 1.35fr .8fr .9fr .9fr; gap: 44px; }
.bm-footer h2, .bm-footer h3 { color: var(--bm-white); }
.bm-footer h3 { margin-top: 0; font-size: 1rem; }
.bm-footer ul { margin: 0; padding: 0; list-style: none; }
.bm-footer li + li { margin-top: 9px; }
.bm-footer a { color: #d7e2e9; text-decoration: none; }
.bm-footer a:hover { color: var(--bm-lime); }
.bm-footer__bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 50px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: .86rem; }

.bm-reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.bm-reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1040px) {
  .bm-header__cta { display: none; }
  .bm-nav > ul { gap: 16px; }
  .bm-hero__grid, .bm-split, .bm-zone { grid-template-columns: 1fr; }
  .bm-measure-panel { min-height: 380px; }
  .bm-card-grid, .bm-post-grid { grid-template-columns: repeat(2, 1fr); }
  .bm-metrics__grid { grid-template-columns: repeat(2, 1fr); }
  .bm-metric:nth-child(3) { border-left: 0; border-top: 1px solid var(--bm-line); }
  .bm-metric:nth-child(4) { border-top: 1px solid var(--bm-line); }
  .bm-steps { grid-template-columns: repeat(2, 1fr); }
  .bm-footer__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 840px) {
  .admin-bar .bm-header { top: 46px; }
  .bm-topbar__inner { justify-content: center; }
  .bm-topbar__message { display: none; }
  .bm-menu-toggle { display: block; }
  .bm-nav { position: absolute; left: 20px; right: 20px; top: calc(100% + 8px); display: none; padding: 18px; border: 1px solid var(--bm-line); border-radius: 18px; background: var(--bm-white); box-shadow: var(--bm-shadow); }
  .bm-nav.is-open { display: block; }
  .bm-nav > ul { display: grid; gap: 2px; }
  .bm-nav li a { display: block; padding: 10px 8px; }
  .bm-nav .bm-mobile-cta { margin-top: 10px; }
  .bm-hero { padding-top: 70px; }
  .bm-hero__grid { gap: 44px; }
  .bm-form-wrap { grid-template-columns: 1fr; }
  .bm-form-aside { position: static; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .bm-container, .bm-narrow { width: min(calc(100% - 28px), var(--bm-max)); }
  .bm-section { padding: 68px 0; }
  .bm-topbar__links { justify-content: center; gap: 12px; }
  .bm-brand__tagline { display: none; }
  .bm-hero h1 { font-size: clamp(2.4rem, 13vw, 3.7rem); }
  .bm-measure-panel { min-height: 320px; }
  .bm-measure-panel__ring { width: 210px; height: 210px; }
  .bm-measure-panel__stat { width: 145px; padding: 12px; }
  .bm-card-grid, .bm-post-grid, .bm-steps, .bm-footer__grid, .bm-form-grid, .bm-checks { grid-template-columns: 1fr; }
  .bm-metrics__grid { grid-template-columns: 1fr; }
  .bm-metric + .bm-metric { border-left: 0; border-top: 1px solid var(--bm-line); }
  .bm-cta { padding: 34px 24px; }
  .bm-cta__inner { display: block; }
  .bm-cta .bm-btn { margin-top: 24px; }
  .bm-footer__bottom { display: block; }
  .bm-footer__bottom > * + * { margin-top: 8px; }
  .bm-form { padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .bm-reveal { opacity: 1; transform: none; }
}

.bm-brand__logo { display: block; width: auto; max-width: 230px; max-height: 66px; object-fit: contain; }
.bm-card-grid--media .bm-card { padding: 0; overflow: hidden; }
.bm-card--media { display: flex; flex-direction: column; }
.bm-card__media { min-height: 210px; background-size: cover; background-position: center; }
.bm-card__body { padding: 28px; }

.bm-page-hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 40px; align-items: center; }
.bm-page-hero__figure { margin: 0; padding: 18px; border-radius: 24px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
.bm-page-hero__figure img { display: block; width: 100%; border-radius: 18px; }

.bm-content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.bm-content-layout .entry-content > * { max-width: 100%; margin-left: 0; margin-right: 0; }
.bm-content-aside { position: sticky; top: 120px; display: grid; gap: 18px; }
.bm-side-card { padding: 24px; border-radius: 22px; border: 1px solid var(--bm-line); background: var(--bm-white); box-shadow: var(--bm-shadow); }
.bm-side-card h3 { margin-top: 0; color: var(--bm-navy); }
.bm-side-card .bm-btn { width: 100%; justify-content: center; }
.bm-side-links { display: grid; gap: 12px; }
.bm-side-link { display: grid; gap: 6px; padding: 14px 0; border-top: 1px solid var(--bm-line); text-decoration: none; color: var(--bm-ink); }
.bm-side-link:first-child { border-top: 0; padding-top: 0; }
.bm-side-link strong { color: var(--bm-navy); }
.bm-side-link span { color: var(--bm-muted); font-size: .92rem; }

.bm-topic-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 32px; align-items: center; margin: 20px 0 10px; }
.bm-topic-intro--image-right .bm-topic-figure { order: 2; }
.bm-topic-figure { margin: 0; }
.bm-topic-figure img { display: block; width: 100%; border-radius: 24px; box-shadow: var(--bm-shadow); }
.bm-topic-figure--logo { padding: 18px; border-radius: 24px; background: linear-gradient(135deg, #e8f6f2, #f5f8fb); }
.bm-topic-figure--logo img { object-fit: contain; background: transparent; box-shadow: none; }
.bm-check-list { margin: 20px 0 24px; padding: 0; list-style: none; display: grid; gap: 12px; }
.bm-check-list li { position: relative; padding-left: 34px; }
.bm-check-list li::before { content: ""; position: absolute; left: 0; top: .45em; width: 18px; height: 18px; border-radius: 50%; background: var(--bm-mint); box-shadow: inset 0 0 0 5px var(--bm-teal); }
.bm-highlight-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 24px 0 10px; }
.bm-highlight-card { padding: 24px; border-radius: 22px; background: linear-gradient(180deg, var(--bm-white), #f7fafc); border: 1px solid var(--bm-line); box-shadow: var(--bm-shadow); }
.bm-highlight-card h3 { margin-top: 0; margin-bottom: 8px; color: var(--bm-navy); }
.bm-highlight-card p { margin-bottom: 0; color: var(--bm-muted); }
.bm-link-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 24px; }
.bm-link-card { display: grid; gap: 8px; padding: 24px; border-radius: 22px; background: linear-gradient(145deg, #0f766e, #095662); color: var(--bm-white); text-decoration: none; box-shadow: var(--bm-shadow); }
.bm-link-card strong { color: var(--bm-lime); font-size: 1.08rem; }
.bm-link-card span { color: #d9eceb; }
.bm-link-card:hover { transform: translateY(-2px); }
.bm-expertise-card { grid-template-rows: auto auto 1fr; gap: 10px; padding: 0 0 20px; overflow: hidden; }
.bm-expertise-card__image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #e6f1ef; }
.bm-expertise-card strong, .bm-expertise-card span { margin-inline: 20px; }
.bm-expertise-card strong { margin-top: 8px; }

@media (max-width: 1080px) {
  .bm-content-layout, .bm-page-hero__grid { grid-template-columns: 1fr; }
  .bm-content-aside { position: static; }
}

@media (max-width: 900px) {
  .bm-split, .bm-zone, .bm-topic-intro, .bm-highlight-grid, .bm-link-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .bm-card__media { min-height: 180px; }
  .bm-form-wrap, .bm-form-grid, .bm-checks, .bm-post-grid, .bm-steps, .bm-footer__grid { grid-template-columns: 1fr; }
}

.bm-technical-table-wrap { margin: 28px 0; overflow-x: auto; border: 1px solid var(--bm-line); border-radius: 18px; background: var(--bm-white); box-shadow: var(--bm-shadow); }
.bm-technical-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.bm-technical-table th { background: var(--bm-navy); color: var(--bm-white); }
.bm-technical-table th, .bm-technical-table td { padding: 15px 16px; border: 1px solid var(--bm-line); vertical-align: top; }
.bm-technical-table tbody tr:nth-child(even) { background: var(--bm-soft); }
.bm-download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 26px 0 34px; }
.bm-download-card { display: grid; gap: 9px; padding: 24px; border: 1px solid var(--bm-line); border-radius: 20px; background: var(--bm-white); color: var(--bm-ink); text-decoration: none; box-shadow: var(--bm-shadow); transition: transform .2s ease, border-color .2s ease; }
.bm-download-card:hover { transform: translateY(-3px); border-color: var(--bm-teal); }
.bm-download-card strong { color: var(--bm-navy); font-size: 1.08rem; }
.bm-download-card span { color: var(--bm-muted); }
.bm-download-card em { color: var(--bm-teal); font-style: normal; font-weight: 850; }
.bm-topic-figure--wide { max-width: 920px !important; margin: 0 auto 32px !important; }
.bm-topic-figure--wide img { max-height: 520px; object-fit: contain; background: var(--bm-soft); }
@media (max-width: 760px) { .bm-download-grid { grid-template-columns: 1fr; } }

.bm-section--downloads { background: linear-gradient(135deg, #eef8f5, #f8fafc); }
.bm-resource-stack { display: grid; gap: 14px; }
.bm-resource-stack a { display: grid; gap: 5px; padding: 20px 22px; border-radius: 18px; background: var(--bm-white); border: 1px solid var(--bm-line); color: var(--bm-ink); text-decoration: none; box-shadow: var(--bm-shadow); }
.bm-resource-stack a:hover { border-color: var(--bm-teal); transform: translateX(3px); }
.bm-resource-stack strong { color: var(--bm-navy); }
.bm-resource-stack span { color: var(--bm-muted); font-size: .94rem; }

/* Exhaustive TOWeb migration content */
.bm-legacy-home-content,
.entry-content { overflow-wrap: anywhere; }
.bm-legacy-section { margin: 0 0 44px; padding: 30px; border: 1px solid var(--bm-line); border-radius: 24px; background: #fff; box-shadow: 0 12px 34px rgba(11,31,51,.06); }
.bm-legacy-section > h2 { margin: -30px -30px 26px !important; padding: 22px 28px; border-radius: 24px 24px 0 0; background: linear-gradient(100deg, #8fd1df, #43a8bf); color: #174f7e !important; text-align: center; font-size: clamp(1.35rem, 2.5vw, 2rem) !important; }
.bm-legacy-section p { line-height: 1.75; }
.bm-legacy-section ul,
.bm-legacy-section ol { padding-left: 1.35rem; }
.bm-legacy-section li + li { margin-top: .55rem; }
.bm-legacy-split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(250px, .65fr); gap: 32px; align-items: start; }
.bm-legacy-copy > :first-child { margin-top: 0; }
.bm-legacy-gallery { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; align-items: start; }
.bm-legacy-gallery--single { grid-template-columns: 1fr; }
.bm-legacy-gallery figure { margin: 0; }
.bm-legacy-gallery img { display: block; width: 100%; height: auto; border-radius: 16px; box-shadow: 0 10px 28px rgba(11,31,51,.13); background: #f5f8fa; }
.bm-legacy-gallery a { display: block; }
.bm-legacy-videos { display: grid; gap: 18px; margin: 24px 0 0; }
.bm-video-embed { position: relative; width: min(100%, 760px); margin: 0 auto; }
.bm-video-embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 18px; box-shadow: var(--bm-shadow); }
.bm-legacy-videos video { width: min(100%, 760px); margin: 0 auto; border-radius: 18px; }
.bm-legacy-form-cta { margin-top: 26px; padding: 24px; border-radius: 18px; background: var(--bm-mint); border: 1px solid #b9e9df; }
.bm-legacy-form-cta strong { display: block; color: var(--bm-navy); font-size: 1.15rem; }
.bm-legacy-keyfigures { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 14px; margin-top: 24px; }
.bm-legacy-keyfigures > div { padding: 20px; border-radius: 18px; background: var(--bm-navy); text-align: center; }
.bm-legacy-keyfigures strong { display: block; color: var(--bm-lime); font-size: 1.7rem; }
.bm-legacy-keyfigures span { color: #d8e5ed; }
.bm-text-alert { color: #c00; font-weight: 700; }
.bm-text-success { color: #268a3c; font-weight: 700; }
.bm-source-topic { margin: 0 0 70px; }
.bm-source-topic > h2:first-child { padding-bottom: 14px; border-bottom: 3px solid var(--bm-teal); color: var(--bm-navy); }
.bm-download-library { margin-top: 48px; }
.bm-download-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 24px; }
.bm-download-card { display: grid; gap: 6px; padding: 22px; border: 1px solid var(--bm-line); border-radius: 18px; background: #fff; color: var(--bm-ink); text-decoration: none; box-shadow: 0 10px 26px rgba(11,31,51,.07); }
.bm-download-card strong { color: var(--bm-navy); }
.bm-download-card span { color: var(--bm-muted); font-size: .86rem; word-break: break-word; }
.bm-download-card em { color: var(--bm-teal); font-style: normal; font-weight: 800; }
.bm-download-card:hover { transform: translateY(-2px); border-color: var(--bm-teal); }
.bm-legacy-section table { display: block; width: 100%; overflow-x: auto; }
.bm-legacy-section img { max-width: 100%; height: auto; }
.bm-section--legacy-home { background: linear-gradient(180deg,#f4f8fa,#fff); }
.bm-content--quote-intro { padding-bottom: 10px; }
.bm-content--quote-form { padding-top: 30px; }

@media (max-width: 900px) {
  .bm-legacy-split { grid-template-columns: 1fr; }
  .bm-download-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .bm-legacy-section { padding: 20px; border-radius: 18px; }
  .bm-legacy-section > h2 { margin: -20px -20px 20px !important; padding: 18px; border-radius: 18px 18px 0 0; }
  .bm-legacy-gallery { grid-template-columns: 1fr; }
}

/* Hierarchical main navigation. */
.bm-nav li { position: relative; list-style: none; }
.bm-nav .menu-item-has-children > a { display: inline-flex; align-items: center; gap: 6px; }
.bm-nav .menu-item-has-children > a::after { content: "⌄"; font-size: .8em; line-height: 1; }
.bm-nav .sub-menu { position: absolute; z-index: 1005; left: -16px; top: calc(100% + 18px); display: grid; min-width: 275px; gap: 2px; margin: 0; padding: 12px; list-style: none; border: 1px solid var(--bm-line); border-radius: 16px; background: var(--bm-white); box-shadow: var(--bm-shadow); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease, visibility .18s ease; }
.bm-nav .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -20px; height: 20px; }
.bm-nav li:hover > .sub-menu, .bm-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.bm-nav .sub-menu a { display: block; padding: 10px 12px; border-radius: 10px; font-size: .88rem; line-height: 1.25; }
.bm-nav .sub-menu a:hover { background: var(--bm-soft); }
.bm-nav .current-menu-ancestor > a { color: var(--bm-teal); }

/* Clickable thematic tabs shown on all related pages. */
.bm-topic-tabs { position: sticky; top: 78px; z-index: 900; border-bottom: 1px solid var(--bm-line); background: rgba(255,255,255,.97); box-shadow: 0 8px 22px rgba(11,31,51,.06); }
.admin-bar .bm-topic-tabs { top: 110px; }
.bm-topic-tabs__scroller { display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; padding-bottom: 12px; scrollbar-width: thin; }
.bm-topic-tab { flex: 0 0 auto; padding: 9px 14px; border: 1px solid var(--bm-line); border-radius: 999px; background: var(--bm-white); color: var(--bm-navy); font-size: .86rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.bm-topic-tab:hover { border-color: var(--bm-teal); color: var(--bm-teal); }
.bm-topic-tab.is-active { border-color: var(--bm-teal); background: var(--bm-teal); color: var(--bm-white); }

/* Thematic hub cards. */
.bm-topic-hub-intro { margin: 0 0 28px; padding: 22px 24px; border-left: 5px solid var(--bm-teal); border-radius: 0 18px 18px 0; background: var(--bm-mint); }
.bm-topic-hub-intro p { margin: 0; }
.bm-topic-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.bm-topic-card { display: grid; gap: 9px; min-height: 180px; padding: 24px; border: 1px solid var(--bm-line); border-radius: 22px; background: linear-gradient(145deg, var(--bm-white), #f7fafc); color: var(--bm-ink); text-decoration: none; box-shadow: var(--bm-shadow); transition: transform .18s ease, border-color .18s ease; }
.bm-topic-card:hover { transform: translateY(-3px); border-color: var(--bm-teal); }
.bm-topic-card strong { color: var(--bm-navy); font-size: 1.12rem; }
.bm-topic-card span { color: var(--bm-muted); }
.bm-topic-card em { margin-top: auto; color: var(--bm-teal); font-style: normal; font-weight: 850; }

.bm-download-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-top: 24px; }
.bm-download-card { display: grid; gap: 7px; padding: 20px; border: 1px solid var(--bm-line); border-radius: 18px; background: var(--bm-white); color: var(--bm-navy); text-decoration: none; box-shadow: var(--bm-shadow); }
.bm-download-card::before { content: "PDF / document"; width: max-content; padding: 4px 8px; border-radius: 999px; background: var(--bm-mint); color: var(--bm-teal); font-size: .7rem; font-weight: 900; text-transform: uppercase; }
.bm-download-card span { color: var(--bm-teal); font-size: .9rem; font-weight: 800; }

@media (max-width: 1040px) {
  .bm-nav > ul { gap: 13px; }
  .bm-nav > ul > li > a { font-size: .87rem; }
}

@media (max-width: 840px) {
  .bm-nav .menu-item-has-children > a::after { content: none; }
  .bm-nav .sub-menu { position: static; display: grid; min-width: 0; margin: 0 0 5px 14px; padding: 3px 0 3px 12px; border: 0; border-left: 2px solid var(--bm-mint); border-radius: 0; background: transparent; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
  .bm-nav .sub-menu a { padding: 7px 8px; font-size: .84rem; }
  .bm-topic-tabs { top: 78px; }
  .admin-bar .bm-topic-tabs { top: 124px; }
  .bm-topic-card-grid, .bm-download-grid { grid-template-columns: 1fr; }
}

/* Practical guides: scoped styles, responsive and keyboard accessible. */
.bm-project-guide { margin-top: 3rem; padding: clamp(1.25rem, 3vw, 2.5rem); border: 1px solid #d9e4e5; border-radius: 1rem; background: #f5f9f9; color: #173438; }
.bm-project-guide h2 { margin-top: 0; }
.bm-project-guide h3 { margin-top: 1.75rem; }
.bm-project-guide a:not(.bm-btn) { text-decoration: underline; text-underline-offset: .2em; }
.bm-project-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; padding-left: 1.5rem; }
.bm-project-steps li { padding-left: .25rem; }
.bm-project-steps p { margin: .4rem 0 0; }
@media (max-width: 640px) { .bm-project-steps { grid-template-columns: 1fr; } }
