/* MBH Engineering — feuille de style commune */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --papier: #F4F8FC;
  --blanc: #FFFFFF;
  --ciel: #E6F0FB;
  --encre: #16263D;
  --ardoise: #55667C;
  --bleu: #1B63C6;
  --bleu-fonce: #154E9E;
  --trait: #D5E1EE;

  /* palette carte de contraintes */
  --c-bas: #3A86D6;
  --c-moyen: #2FB67C;
  --c-haut: #F4C23A;
  --c-max: #EC5B4F;

  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-grand: 22px;
  --r-moyen: 14px;
  --r-petit: 8px;
  --max: 1180px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
section[id] { scroll-margin-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--encre);
  background: var(--papier);
  font-weight: 400;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--bleu); }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--max), 100% - 10vw); margin-inline: auto; }

/* ---------- Titres ---------- */
h1, h2, h3 { font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 4.8vw, 3.6rem); font-stretch: 118%; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-stretch: 112%; margin-bottom: 1rem; }
h3 { font-size: 1.2rem; font-stretch: 104%; }
.intro { color: var(--ardoise); max-width: 60ch; font-size: 1.1rem; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font: 600 1rem/1 var(--font); text-decoration: none;
  padding: .95rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.btn-plein { background: var(--bleu); color: #fff; }
.btn-plein:hover { background: var(--bleu-fonce); }
.btn-contour { border-color: var(--trait); color: var(--encre); background: var(--blanc); }
.btn-contour:hover { border-color: var(--bleu); color: var(--bleu); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 248, 252, .9);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--trait); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 1.5rem; }
.logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--encre); }
.logo img { height: 58px; width: auto; }
.nav-links { display: flex; gap: 1.75rem; list-style: none; }
.nav-links a { color: var(--encre); text-decoration: none; font-weight: 500; font-size: .98rem; }
.nav-links a:hover { color: var(--bleu); }
.nav .btn { padding: .7rem 1.2rem; font-size: .95rem; }
.menu-btn { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; color: var(--encre); }
.menu-btn svg { width: 28px; height: 28px; }

@media (max-width: 920px) {
  .logo img { height: 50px; }
  .menu-btn { display: block; margin-left: auto; }
  .nav .btn { display: none; }
  .nav-links {
    display: none; position: absolute; top: 84px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--blanc);
    border-bottom: 1px solid var(--trait); padding: .5rem 5vw 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: .8rem 0; font-size: 1.1rem; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-blanc { background: var(--blanc); }
.section-ciel { background: var(--ciel); }
.tete { margin-bottom: clamp(2.2rem, 4vw, 3.5rem); }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3.5rem, 7vw, 6rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { margin-bottom: 1.4rem; }
.hero .intro { margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2rem; }
.hero-note { color: var(--ardoise); font-size: .98rem; max-width: 52ch; padding-left: 1rem; border-left: 3px solid var(--c-moyen); }

/* Démonstrateur lyre */
.lyre {
  background: var(--blanc); border-radius: var(--r-grand);
  box-shadow: 0 1px 0 var(--trait), 0 24px 60px -30px rgba(27, 99, 198, .35);
  padding: 1.4rem 1.4rem 1.2rem;
}
.lyre-titre { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .6rem; }
.lyre-titre strong { font-weight: 600; font-size: 1rem; }
.lyre-titre small { color: var(--ardoise); font-size: .85rem; }
.lyre svg { width: 100%; height: auto; display: block; border-radius: var(--r-moyen); background: #F7FAFD; }
.lyre-reglage { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; margin: 1.1rem 0 .9rem; }
.lyre-reglage label { font-weight: 600; font-size: .95rem; }
.lyre-reglage output { font-weight: 700; font-stretch: 112%; font-size: 1.35rem; min-width: 5.2ch; text-align: right; font-variant-numeric: tabular-nums; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--c-bas), var(--c-moyen), var(--c-haut), var(--c-max)); cursor: pointer; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid var(--encre); box-shadow: 0 2px 6px rgba(22,38,61,.25); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--encre); }

.lyre-mesures { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.mesure { background: var(--papier); border-radius: var(--r-petit); padding: .7rem .9rem; }
.mesure span { display: block; color: var(--ardoise); font-size: .82rem; line-height: 1.35; }
.mesure b { font-size: 1.15rem; font-stretch: 108%; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  .lyre-reglage { grid-template-columns: 1fr auto; row-gap: .6rem; }
  .lyre-reglage input { grid-column: 1 / -1; grid-row: 2; }
  .lyre-titre { flex-direction: column; gap: .1rem; }
}
.lyre-legende { color: var(--ardoise); font-size: .8rem; margin-top: .8rem; line-height: 1.45; }

@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- Expertises ---------- */
.exp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 3.5vw, 3rem); }
.exp h3 { margin: 1rem 0 .5rem; }
.exp p { color: var(--ardoise); font-size: 1rem; }
.pastille { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; }
.pastille svg { width: 28px; height: 28px; }
.p-bleu { background: #DCEAFB; color: #1B63C6; }
.p-vert { background: #D8F2E6; color: #0F7A52; }
.p-jaune { background: #FCF0CC; color: #8A6400; }
.p-rouge { background: #FCE1DE; color: #B4362C; }
.p-lilas { background: #E7E3FA; color: #5B45B0; }
.p-cyan { background: #D6F1F6; color: #0B6E80; }
.puces { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; list-style: none; }
.puces li { font-size: .82rem; font-weight: 500; background: var(--papier); color: var(--encre); padding: .25rem .65rem; border-radius: 999px; }

@media (max-width: 920px) { .exp-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .exp-grid { grid-template-columns: 1fr; } }

/* ---------- Codes ---------- */
.codes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.famille { background: var(--blanc); border-radius: var(--r-grand); padding: 1.6rem 1.6rem 1rem; }
.famille h3 { font-size: 1.05rem; color: var(--ardoise); font-weight: 600; font-stretch: 100%; margin-bottom: .8rem; }
.famille dl div { padding: .75rem 0; border-top: 1px solid var(--trait); }
.famille dt { font-weight: 700; font-stretch: 108%; }
.famille dd { color: var(--ardoise); font-size: .95rem; }
@media (max-width: 920px) { .codes-grid { grid-template-columns: 1fr; } }

/* ---------- Secteurs ---------- */
.secteurs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.photo { border-radius: var(--r-grand); overflow: hidden; aspect-ratio: 4 / 3.4; }
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: 35% 50%; }
.secteurs { list-style: none; }
.secteurs li { padding: 1.1rem 0; border-top: 1px solid var(--trait); }
.secteurs li:last-child { border-bottom: 1px solid var(--trait); }
.secteurs h3 { font-size: 1.1rem; margin-bottom: .2rem; }
.secteurs p { color: var(--ardoise); font-size: .98rem; }
@media (max-width: 920px) { .secteurs-grid { grid-template-columns: 1fr; } }

/* ---------- Réalisations ---------- */
.galerie { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.25rem; }
.fig { background: var(--blanc); border-radius: var(--r-grand); overflow: hidden; display: flex; flex-direction: column; }
.fig-img { background: #fff; padding: 1.25rem; flex: 1; display: grid; place-items: center; }
.fig-img img { max-height: 380px; width: auto; height: auto; object-fit: contain; }
.fig figcaption { padding: 1.1rem 1.4rem 1.4rem; border-top: 1px solid var(--trait); }
.fig figcaption h3 { font-size: 1.08rem; margin-bottom: .3rem; }
.fig figcaption p { color: var(--ardoise); font-size: .95rem; }
.fig-large { grid-column: span 12; display: grid; grid-template-columns: 1.3fr 1fr; }
.fig-large .fig-img img { max-height: 520px; }
.fig-large figcaption { border-top: 0; border-left: 1px solid var(--trait); padding: 2rem; align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.fig-large figcaption h3 { font-size: 1.35rem; margin-bottom: .6rem; }
@media (max-width: 760px) { .fig-large { grid-template-columns: 1fr; } .fig-large figcaption { border-left: 0; border-top: 1px solid var(--trait); padding: 1.1rem 1.4rem 1.4rem; } }
.fig-demi { grid-column: span 6; }
.outils { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.outils p { font-weight: 600; margin-right: .4rem; }
.outils ul { display: contents; list-style: none; }
.outils li { background: var(--blanc); border: 1px solid var(--trait); border-radius: 999px; padding: .4rem .9rem; font-size: .92rem; }
.outils li b { font-weight: 600; }
.outils li span { color: var(--ardoise); }
@media (max-width: 760px) { .fig-demi { grid-column: span 12; } }

/* ---------- Parcours ---------- */
.apropos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.apropos-texte p { color: var(--ardoise); margin-bottom: 1rem; max-width: 58ch; }
.apropos-texte p strong { color: var(--encre); font-weight: 600; }
.atouts { list-style: none; margin-top: 1.5rem; }
.atouts li { position: relative; padding: .45rem 0 .45rem 2rem; }
.atouts li::before {
  content: ''; position: absolute; left: 0; top: .75rem; width: 18px; height: 18px; border-radius: 50%;
  background: #D8F2E6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.3l2.6 2.5L13 6.4' fill='none' stroke='%230F7A52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
}

.fiche { background: var(--papier); border-radius: var(--r-grand); padding: clamp(1.6rem, 3.5vw, 2.4rem); }
.fiche img { width: min(300px, 80%); height: auto; margin-bottom: 1.6rem; }
.fiche dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-top: 1px solid var(--trait); }
.fiche dt { color: var(--ardoise); }
.fiche dd { font-weight: 600; text-align: right; }
.fiche a { color: var(--encre); text-decoration: none; }
.fiche a:hover { color: var(--bleu); text-decoration: underline; }
@media (max-width: 920px) { .apropos-grid { grid-template-columns: 1fr; } }

/* ---------- Articles ---------- */
.articles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.carte-article {
  display: flex; flex-direction: column; text-decoration: none; color: var(--encre);
  background: var(--blanc); border-radius: var(--r-grand); padding: 1.8rem;
  border: 2px solid transparent; transition: border-color .2s;
}
.carte-article:hover { border-color: var(--bleu); }
.theme { font-size: .88rem; font-weight: 600; margin-bottom: .6rem; }
.t-methode { color: #0F7A52; }
.t-codes { color: #1B63C6; }
.t-logiciels { color: #5B45B0; }
.t-asme { color: #B4362C; }
.carte-article h3 { font-size: 1.3rem; margin-bottom: .6rem; }
.carte-article p { color: var(--ardoise); font-size: .98rem; flex: 1; margin-bottom: 1.2rem; }
.lire { font-weight: 600; color: var(--bleu); }
@media (max-width: 760px) { .articles-grid { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.contact-texte p { color: var(--ardoise); margin-bottom: 1rem; max-width: 50ch; }
.tel { display: inline-flex; align-items: center; gap: .7rem; margin-top: 1rem; font-size: 1.5rem; font-weight: 700; font-stretch: 112%; color: var(--encre); text-decoration: none; }
.tel:hover { color: var(--bleu); }
.tel svg { width: 26px; height: 26px; color: var(--bleu); }
.mail { display: inline-flex; align-items: center; gap: .7rem; margin-top: .6rem; font-size: 1.15rem; font-weight: 600; color: var(--encre); text-decoration: none; word-break: break-all; }
.mail:hover { color: var(--bleu); }
.mail svg { width: 24px; height: 24px; color: var(--bleu); flex: none; }
.contact-texte .tel, .contact-texte .mail { display: flex; width: fit-content; }
.lieu { color: var(--ardoise); margin-top: .8rem; }

.formulaire { background: var(--papier); border-radius: var(--r-grand); padding: clamp(1.4rem, 3vw, 2.2rem); display: grid; gap: 1.1rem; }
.ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.champ label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.champ input, .champ select, .champ textarea {
  width: 100%; font: 400 1rem/1.4 var(--font); color: var(--encre);
  background: var(--blanc); border: 1.5px solid var(--trait); border-radius: var(--r-petit);
  padding: .8rem .9rem; transition: border-color .2s, background-color .2s;
}
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: none; border-color: var(--bleu); background: #fff; box-shadow: 0 0 0 3px rgba(27,99,198,.15); }
.champ textarea { min-height: 140px; resize: vertical; }
.champ select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2355667C' stroke-width='1.8'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; background-size: 12px; padding-right: 2.4rem; }
.rgpd { font-size: .82rem; color: var(--ardoise); line-height: 1.5; }
.formulaire .btn { justify-self: start; }
@media (max-width: 920px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .ligne { grid-template-columns: 1fr; } }

/* ---------- Pied de page ---------- */
.pied { background: var(--encre); color: #C9D5E3; padding: 3rem 0 2.2rem; font-size: .92rem; }
.pied-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; }
.pied .logo img { height: 72px; }
.pied p { max-width: 52ch; margin-top: .6rem; }
.pied nav ul { list-style: none; display: grid; gap: .4rem; }
.pied a { color: #fff; text-decoration: none; }
.pied a:hover { text-decoration: underline; }
.pied-bas { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.12); color: #9FB2C8; font-size: .85rem; }

/* ---------- Pages article ---------- */
.fil { font-size: .92rem; color: var(--ardoise); margin-bottom: 1.2rem; }
.fil a { color: var(--ardoise); }
.article-tete { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); }
.article-tete .wrap { max-width: 760px; }
.article-tete h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); max-width: 22ch; margin-bottom: 1rem; }
.article-tete .intro { font-size: 1.15rem; }
.article-corps { background: var(--blanc); padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3.5rem, 7vw, 6rem); }
.prose { max-width: 760px; margin-inline: auto; font-size: 1.09rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); margin-top: 3rem; }
.prose h3 { font-size: 1.22rem; margin-top: 2rem; }
.prose p, .prose li { color: #2F4058; }
.prose strong { color: var(--encre); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: .45rem; }
.prose li::marker { color: var(--bleu); }
.table-scroll { overflow-x: auto; margin-top: 1.6rem !important; border-radius: var(--r-moyen); border: 1px solid var(--trait); }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 520px; }
.prose th { text-align: left; background: var(--ciel); font-weight: 600; padding: .8rem 1rem; }
.prose td { padding: .75rem 1rem; border-top: 1px solid var(--trait); vertical-align: top; color: #2F4058; }
.prose tbody tr:nth-child(even) td { background: #FAFCFE; }
.note { background: var(--papier); border-left: 4px solid var(--c-haut); padding: 1rem 1.2rem; border-radius: 0 var(--r-petit) var(--r-petit) 0; font-size: 1rem; }
.encart {
  margin-top: 3.5rem !important; background: var(--ciel); border-radius: var(--r-grand);
  padding: clamp(1.6rem, 4vw, 2.4rem); display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; align-items: center; justify-content: space-between;
}
.encart h2 { font-size: 1.45rem; margin: 0 0 .3rem; }
.encart p { margin: 0; color: var(--ardoise); max-width: 44ch; }
.autres { margin-top: 3rem !important; }
.autres h2 { font-size: 1.2rem; margin-top: 0; }
.autres ul { list-style: none; padding: 0; }
.autres li { padding: .6rem 0; border-top: 1px solid var(--trait); }
.autres a { text-decoration: none; font-weight: 500; }
.autres a:hover { text-decoration: underline; }
.etoiles { color: #C99A10; letter-spacing: .1em; white-space: nowrap; }
.etoiles .off { color: #D5E1EE; }


/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.qa { background: var(--papier); border: 1px solid var(--trait); border-radius: var(--r-moyen); margin-bottom: .8rem; overflow: hidden; }
.qa summary { cursor: pointer; list-style: none; padding: 1.1rem 1.3rem; font-weight: 600; font-size: 1.05rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+'; font-size: 1.5rem; color: var(--bleu); font-weight: 400; line-height: 1; flex: none; transition: transform .2s; }
.qa[open] summary::after { content: '\2212'; }
.qa[open] summary { color: var(--bleu); }
.qa-corps { padding: 0 1.3rem 1.2rem; }
.qa-corps p { color: var(--ardoise); font-size: 1rem; margin: 0; max-width: 68ch; }
