:root {
  --site-ivory: #fbf8ef;
  --site-white: #fff;
  --site-forest: #103021;
  --site-ink: #173829;
  --site-leaf: #4a662a;
  --site-border: #d8ddcb;
  --site-heading-font: Georgia, serif;
  --site-content-max: 1280px;
  --site-gutter: clamp(1rem, 4vw, 3.75rem);
  --site-content-width: min(calc(100% - 2 * var(--site-gutter)), var(--site-content-max));
}
/* Application behavior and accessible controls; recovered passive stylesheet rules preserve the visual reference. */
[hidden] { display: none !important; }
.skip-link { position: fixed; top: 0; left: 0; z-index: 2147483647; transform: translateY(-120%); padding: 1rem; background: var(--site-skip-bg, #163726); color: white; }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--site-focus, #4a8126); outline-offset: 3px; }
#main:focus { outline: none; }
#realisations, #formulaire { scroll-margin-top: 8rem; }
[data-form-status]:focus { outline: 2px solid currentColor; outline-offset: 4px; }
.oxy-gallery:focus-visible, .ecohabitat-recovered-carousel:focus-visible { outline-offset: 4px; }
#ecohabitat-map { min-height: 25rem; background: #e9ece8; }
.ecohabitat-map-fallback { padding: 1.5rem; }
.oxy-video-container video { object-fit: cover; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* Space reserved by the reference form’s client-side anti-spam container. */
@media (min-width:1101px) { .formulaire { margin-bottom: 32px; } }

/* Motion: one-shot entrances, responsive menus, tactile cards and links. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .ecohabitat-mega-menu__panel:not([hidden]) {
    animation: ecohabitat-menu-in 260ms cubic-bezier(.2,.75,.25,1) both;
  }
  .ecohabitat-mega-menu--mobile.is-open {
    animation: ecohabitat-menu-in 300ms cubic-bezier(.2,.75,.25,1) both;
  }
  .ecohabitat-mega-menu--desktop .ecohabitat-mega-menu__link { position: relative; }
  .ecohabitat-mega-menu--desktop .ecohabitat-mega-menu__link::after {
    content: '';
    position: absolute;
    bottom: 7px;
    left: 13%;
    right: 13%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 240ms cubic-bezier(.2,.75,.25,1);
  }
  .ecohabitat-mega-menu--desktop .ecohabitat-mega-menu__link:is(:hover,:focus-visible,[aria-expanded='true'])::after { transform: scaleX(1); }
  .ct-link-button, .formulaire__bouton, .ecohabitat-services-card, .megamenu-services {
    transition: transform 270ms cubic-bezier(.2,.75,.25,1), box-shadow 270ms ease,
      background-color 220ms ease, border-color 220ms ease, color 220ms ease;
  }
  .megamenu-services img, .oxy-gallery-item-contents img {
    transition: transform 500ms cubic-bezier(.2,.75,.25,1), filter 350ms ease;
  }
  .oxy-gallery-item-contents { overflow: hidden; transition: filter 300ms ease, box-shadow 300ms ease; }
  .ct-link-button:focus-visible, .formulaire__bouton:focus-visible, .megamenu-services:focus-visible {
    transform: translateY(-3px);
  }
  .ct-link-button:active, .formulaire__bouton:active { transform: translateY(0) scale(.985); }
  .oxel_back_to_top_container { transition: opacity 240ms ease, transform 240ms ease, background-color 240ms ease; }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .ct-link-button:hover, .formulaire__bouton:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgb(23 58 43 / 19%);
  }
  .megamenu-services:hover {
    transform: translateY(-7px);
    box-shadow: 0 12px 28px rgb(23 58 43 / 16%);
  }
  .megamenu-services:hover img { transform: scale(1.08) rotate(-3deg); }
  .oxy-gallery-item-contents:hover img { transform: scale(1.06); }
  .oxy-gallery-item-contents:hover { filter: brightness(1.055); }
  .oxel_back_to_top_container:hover { transform: translateY(-4px); }
  #section-8-11 a:not(.ct-link-button) { transition: color 220ms ease; }
  #section-8-11 a:not(.ct-link-button):hover { color: #c8dfb8; }
}
@keyframes ecohabitat-menu-in {
  from { opacity: .2; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.back-to-top-bubble {
  position: fixed;
  right: max(.85rem, env(safe-area-inset-right));
  bottom: max(.85rem, env(safe-area-inset-bottom));
  z-index: 900;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #234b30;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 16px rgb(16 44 34 / 30%);
}
.back-to-top-bubble svg { width: 24px; height: 24px; }
.back-to-top-bubble:is(:visited,:hover,:focus-visible) { color: #fff; }
.back-to-top-bubble:hover { background: #173a2b; }
@media (prefers-reduced-motion: no-preference) {
  .back-to-top-bubble { transition: transform 200ms ease, background-color 200ms ease; }
  .back-to-top-bubble:hover { transform: translateY(-4px); }
}

/* Dark surfaces opt in so older per-heading colors cannot reduce contrast. */
.eco-on-dark :is(h1, h2, h3, h4, h5, h6, .ct-headline, .h3),
.eco-on-dark :is(h1, h2, h3, h4, h5, h6, .ct-headline) :is(span, em, strong, a) {
  color: #fff !important;
}
