/* ==========================================================================
   BA bat — feuille de style unique (remplace thème WordPress + plugins)
   ========================================================================== */

/* Polices auto-hébergées (aucun appel à Google Fonts) */
@font-face { font-family: "Montserrat"; font-weight: 500; font-display: swap; src: url("../fonts/montserrat-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 800; font-display: swap; src: url("../fonts/montserrat-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "PT Sans"; font-weight: 400; font-display: swap; src: url("../fonts/pt-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "PT Sans"; font-weight: 700; font-display: swap; src: url("../fonts/pt-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 800; font-display: swap; src: url("../fonts/open-sans-latin-800-normal.woff2") format("woff2"); }

:root {
  --vert: #99cc00;
  --vert-titre: #90c43c;
  --vert-fonce: #6f9a00;
  --ardoise: #4e5b6c;
  --texte: #727272;
  --noir: #111;
  --gris-clair: #f4f4f4;
  --bord: #dcdcdc;
  --sombre: #222;
  --titres: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --corps: "PT Sans", "Helvetica Neue", Arial, sans-serif;
  --header-h: 112px;
  --container: 1170px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font: 400 16px/1.6 var(--corps);
  color: var(--texte);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--vert-fonce); }
h1, h2, h3, h4 { font-family: var(--titres); font-weight: 500; color: var(--noir); line-height: 1.25; margin: 0 0 .6em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 15px; }
.section { padding-top: 64px; padding-bottom: 32px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #000; color: #fff; padding: 8px 14px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--vert); outline-offset: 2px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  font: 500 14px/1 var(--titres);
  text-transform: uppercase;
  letter-spacing: .04em;
  text-decoration: none;
  padding: 14px 26px;
  border: 2px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s, transform .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--light { color: #fff; border-color: #fff; background: transparent; }
.btn--light:hover { background: #fff; color: var(--vert-fonce); }
.btn--dark { background: #000; color: #fff; }
.btn--dark:hover { background: var(--vert-fonce); }
.btn--big { font-size: 16px; padding: 18px 40px; }

/* ---------- En-tête fixe qui se réduit au défilement ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid #eee;
  transition: box-shadow .3s;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); transition: height .3s ease; }
.logo img { height: 66px; width: auto; transition: height .3s ease; }
.site-header.is-compact { box-shadow: 0 2px 14px rgba(0,0,0,.08); }
.site-header.is-compact .header-inner { height: 64px; }
.site-header.is-compact .logo img { height: 44px; }

.nav { display: flex; align-items: center; }
.nav a {
  position: relative;
  font: 500 14px/1 var(--titres);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--noir);
  padding: 10px 20px;
  transition: color .2s;
}
.nav a + a { border-left: 1px solid #e5e5e5; }
.nav a::after {
  content: ""; position: absolute; left: 20px; right: 20px; bottom: 2px; height: 1px;
  background: var(--vert); transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--vert); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--noir); margin: 5px 0; transition: transform .3s, opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Carrousel ---------- */
/* Carrousel pleine largeur ; textes alignés sur la grille du site */
:root { --gouttiere-hero: max(50px, calc((100% - var(--container)) / 2 + 15px)); }
.slider { position: relative; height: clamp(460px, 38vw, 640px); overflow: hidden; background: #333; margin: 0; }
.slides { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0;
  background: var(--bg) center / cover no-repeat;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .8s cubic-bezier(.77, 0, .18, 1), visibility 0s .8s;
}
.slide.is-active { transform: translateX(0); visibility: visible; transition: transform .8s cubic-bezier(.77, 0, .18, 1); z-index: 2; }

.slide-content { position: absolute; top: 52px; left: var(--gouttiere-hero); max-width: 560px; color: #fff; }
.slide--right .slide-content { left: auto; right: var(--gouttiere-hero); max-width: 520px; }
.slide--right .slide-title { white-space: normal; text-wrap: balance; }
.slide-label {
  display: inline-block;
  font: 800 30px/1.2 "Open Sans", var(--titres);
  background: var(--ardoise);
  padding: 4px 10px;
  margin: 0 0 6px;
}
.slide-title { font: 800 clamp(30px, 4.2vw, 53px)/1.1 var(--titres); color: #fff; margin: 0 0 18px; white-space: nowrap; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.slide-text { font: 700 17px/1.55 var(--corps); margin: 0; max-width: 470px; text-shadow: 0 1px 6px rgba(0,0,0,.55); }

/* Entrée des calques de texte, comme dans Slider Revolution */
.slide-content > * { opacity: 0; transform: translateY(26px); }
.slide.is-active .slide-content > * { animation: layer-in .7s cubic-bezier(.2, .7, .2, 1) forwards; }
.slide.is-active .slide-label { animation-delay: .5s; }
.slide.is-active .slide-title { animation-delay: .7s; }
.slide.is-active .slide-text  { animation-delay: .9s; }
@keyframes layer-in { to { opacity: 1; transform: none; } }

.slider-arrow {
  position: absolute; top: 50%; z-index: 5; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.5); cursor: pointer; display: grid; place-items: center;
  transition: background-color .2s;
}
.slider-arrow:hover { background: rgba(0,0,0,.85); }
.slider-arrow svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.slider-arrow--prev { left: 18px; }
.slider-arrow--next { right: 18px; }
.slider-dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 5; }
.slider-dots button { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: transparent; padding: 0; cursor: pointer; }
.slider-dots button[aria-current="true"] { background: var(--vert); border-color: var(--vert); }
.slider-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 5; background: rgba(255,255,255,.15); }
.slider-progress span { display: block; height: 100%; width: 0; background: var(--vert); }
.slider-progress.is-running span { animation: progress var(--delay, 7s) linear forwards; }
.slider:hover .slider-progress span, .slider:focus-within .slider-progress span { animation-play-state: paused; }
@keyframes progress { to { width: 100%; } }

/* ---------- Bandeau « Souriez… » ---------- */
.tagline {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  min-height: 112px; padding: 20px var(--gouttiere-hero);
  background: var(--vert) url("/assets/img/bandeau-vert.jpg") center / cover no-repeat;
}
.tagline-title { font: 500 30px/1.2 var(--titres); color: #fff; text-transform: uppercase; margin: 0; }

/* ---------- Présentation ---------- */
.intro .lead { font: 500 18px/1.6 var(--titres); color: var(--noir); margin: 0 0 1em; }

/* ---------- Valeurs ---------- */
.values { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 60px; padding-top: 20px; }
.value h2 { font-size: 24px; margin-bottom: .4em; }
.value h2::before { content: ""; display: block; width: 40px; height: 3px; background: var(--vert); margin-bottom: 14px; }
.value p { margin: 0; font-size: 15px; }

/* ---------- Domaines ---------- */
.domains-title { font: 400 48px/1.1 Arimo, Arial, sans-serif; color: var(--vert-titre); margin-bottom: 20px; }
.domains-grid {
  display: grid;
  grid-template-columns: 1fr 300px 1fr;
  grid-template-areas: "ing venn exp" "ing venn con";
  gap: 10px 50px; align-items: start;
}
.domain--ing { grid-area: ing; align-self: center; justify-self: end; }
.domain--exp { grid-area: exp; }
.domain--con { grid-area: con; }
.venn { grid-area: venn; margin: 0; align-self: center; width: 100%; }
.domain h3 { font-size: 22px; margin-bottom: .5em; }
.domain ul { margin: 0; padding-left: 18px; font-size: 15px; }
.domain li { margin: 3px 0; }
.domain li::marker { color: var(--vert); }

.venn-c { fill: #b5b5b5; fill-opacity: .45; transition: transform .8s cubic-bezier(.2,.7,.2,1); transform-box: fill-box; transform-origin: center; }
.venn-core { fill: var(--vert); }
.venn-text { font: 700 16px var(--corps); fill: #fff; text-anchor: middle; }
.venn.reveal:not(.is-visible) .venn-c1 { transform: translateY(-30px); }
.venn.reveal:not(.is-visible) .venn-c2 { transform: translate(-26px, 18px); }
.venn.reveal:not(.is-visible) .venn-c3 { transform: translate(26px, 18px); }
.venn-core, .venn-text { transition: opacity .6s .5s; }
.venn.reveal:not(.is-visible) .venn-core, .venn.reveal:not(.is-visible) .venn-text { opacity: 0; }

/* ---------- Bandeau parallaxe ---------- */
.statement { position: relative; overflow: hidden; height: 300px; margin-top: 40px; display: grid; place-items: center; }
.statement-bg {
  position: absolute; left: 0; right: 0; top: -40%; height: 180%;
  background: var(--bg) center / cover no-repeat;
  will-change: transform;
}
.statement::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.statement-inner { position: relative; z-index: 1; text-align: center; }

/* ---------- Implantations ---------- */
.offices { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.office { background: var(--gris-clair); padding: 28px 32px; border-top: 3px solid var(--vert); }
.office h3 { font-size: 20px; margin-bottom: .6em; }
.office h3 span { display: block; font-size: 14px; color: var(--texte); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }
.office address { font-style: normal; margin-bottom: 12px; }
.office-contact { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 14px; }
.office-contact a, .office-contact .fax { display: inline-flex; align-items: center; gap: 8px; color: var(--noir); text-decoration: none; }
.office-contact .fax { color: var(--texte); }
.office-contact svg { width: 16px; height: 16px; fill: var(--vert-fonce); }
.office-contact a:hover { color: var(--vert-fonce); }
.map-link { font: 500 13px var(--titres); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Formulaire ---------- */
.contact-title { font-size: 22px; }
.contact-form { display: grid; gap: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: 15px; color: #555; }
.field label span { color: var(--texte); font-size: 13px; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--noir);
  padding: 10px 12px; border: 1px solid var(--bord); border-radius: 2px; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--vert); box-shadow: 0 0 0 3px rgba(153,204,0,.2); }
.field textarea { resize: vertical; min-height: 140px; }
.field.has-error input, .field.has-error textarea { border-color: #c0392b; }
.field-error { color: #c0392b; font-size: 13px; margin-top: 4px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.consent input { margin-top: 3px; accent-color: var(--vert-fonce); }
.form-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.altcha-slot { min-height: 10px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; min-height: 1.5em; font-weight: 700; }
.form-status.is-ok { color: var(--vert-fonce); }
.form-status.is-error { color: #c0392b; }
.contact-form button[disabled] { opacity: .6; cursor: wait; }
altcha-widget { --altcha-color-base: #fff; --altcha-color-border: var(--bord); --altcha-color-border-focus: var(--vert); --altcha-border-radius: 2px; --altcha-max-width: 300px; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--sombre); color: #aaa; margin-top: 70px; padding: 40px 0; font-size: 14px; }
.footer-inner p { margin: 0 0 6px; }
.site-footer strong { color: #fff; }
.site-footer a { color: #ddd; text-decoration: none; }
.site-footer a:hover { color: var(--vert); }
.site-footer .copy { margin-top: 16px; color: #777; }

/* ---------- Retour en haut ---------- */
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  width: 44px; height: 44px; display: grid; place-items: center;
  background: #fff; border: 1px solid #ccc; border-radius: 2px;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s, transform .3s, visibility .3s, background-color .2s;
}
.to-top svg { width: 20px; height: 20px; fill: none; stroke: var(--noir); stroke-width: 2; }
.to-top:hover { background: var(--vert); border-color: var(--vert); }
.to-top:hover svg { stroke: #fff; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* ---------- Apparition au défilement ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .venn.reveal { transform: none; }

/* ---------- Tablette et mobile ---------- */
@media (max-width: 991px) {
  .slider { height: 460px; }
  .slide-content, .slide--right .slide-content { left: 30px; right: 30px; top: 36px; }
  .slide-title { white-space: normal; }
  .slide-label { font-size: 22px; }
  .domains-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "venn venn" "ing exp" "ing con"; }
  .venn { max-width: 260px; justify-self: center; }
  .domain--ing { justify-self: start; align-self: start; }
}
@media (max-width: 767px) {
  :root { --header-h: 76px; }
  html { scroll-padding-top: 70px; }
  .logo img { height: 50px; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid #eee; box-shadow: 0 10px 20px rgba(0,0,0,.08);
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .nav.is-open { max-height: 200px; }
  .nav a { padding: 16px 20px; }
  .nav a + a { border-left: 0; border-top: 1px solid #eee; }
  .nav a::after { display: none; }
  .slider { height: 520px; }
  .slide::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.6), rgba(0,0,0,.1) 80%); }
  .slide-content, .slide--right .slide-content { z-index: 1; left: 20px; right: 20px; top: 26px; }
  .slide-label { font-size: 17px; }
  .slide-title { font-size: 28px; }
  .slide-text { font-size: 15px; }
  .slider-arrow { top: auto; bottom: 10px; transform: none; width: 36px; height: 36px; }
  .slider-arrow--prev { left: 12px; }
  .slider-arrow--next { right: 12px; }
  .slider-dots { bottom: 22px; }
  .tagline { padding: 22px 20px; justify-content: center; text-align: center; }
  .tagline-title { font-size: 22px; }
  .section { padding-top: 44px; }
  .values, .offices { grid-template-columns: 1fr; }
  .domains-title { font-size: 38px; }
  .domains-grid { grid-template-columns: 1fr; grid-template-areas: "venn" "ing" "exp" "con"; }
  .statement { height: 220px; }
  .office { padding: 22px; }
  .to-top { right: 14px; bottom: 14px; }
}

/* Respect du réglage « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .slide-content > * { opacity: 1; transform: none; }
}

/* Menu à un seul lien : pas de bouton « burger » sur mobile */
@media (max-width: 767px) {
  .header-inner:has(.nav a:only-child) .nav-toggle { display: none; }
  .header-inner:has(.nav a:only-child) .nav { position: static; max-height: none; flex-direction: row; background: none; border: 0; box-shadow: none; }
  .header-inner:has(.nav a:only-child) .nav a::after { display: block; }
}

/* ---------- Page de texte (mentions légales) ---------- */
.legal { max-width: 820px; padding-bottom: 20px; }
.legal h1 { font-size: 32px; margin-bottom: .8em; }
.legal h2 { font-size: 20px; margin: 1.8em 0 .5em; }
.legal h2::before { content: ""; display: block; width: 40px; height: 3px; background: var(--vert); margin-bottom: 12px; }
.legal p { margin: 0 0 1em; }
.legal-update { margin-top: 2.5em; font-size: 14px; color: #999; }
