/* ============================================================
   CERTPEB.BE — MOTION EDITION · Shared stylesheet
   Charte : vert #5CB929 · dégradé énergétique DD1515→009B48
   Typo : DM Sans (corps) · DM Serif Display (titres)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* — Couleurs charte — */
  --green:      #5CB929;
  --green-dk:   #408C1F;
  --green-xdk:  #1A3A08;
  --orange:     #E8511C;
  --white:      #FFFFFF;
  --gray-50:    #F8FAF6;
  --gray-100:   #F0F4EC;
  --gray-200:   #E2EAD8;
  --gray-400:   #8FA67A;
  --gray-600:   #4A5E38;
  --dark:       #0C140A;
  --dark-2:     #111E0E;

  /* — Dégradé énergétique (classes PEB) — */
  --peb-a: #009B48;
  --peb-b: #52AE32;
  --peb-c: #BFD730;
  --peb-d: #FFF200;
  --peb-e: #FF9F00;
  --peb-f: #F05A00;
  --peb-g: #DD1515;
  --grad-energy: linear-gradient(90deg, #DD1515 0%, #F05A00 20%, #FF9F00 40%, #FFF200 55%, #BFD730 72%, #52AE32 86%, #009B48 100%);
  --grad-energy-v: linear-gradient(to top, #DD1515, #F05A00, #FF9F00, #FFF200, #BFD730, #52AE32, #009B48);
  --grad-green: linear-gradient(135deg, #5CB929, #408C1F);
  --grad-check: linear-gradient(135deg, #DD1515, #FF9F00, #009B48);

  /* — Typo — */
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'DM Serif Display', Georgia, serif;

  /* — Motion — */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur-fast: 180ms;
  --dur-base: 320ms;
  --dur-slow: 700ms;

  --shadow-sm: 0 2px 10px rgba(16, 34, 10, .07);
  --shadow-md: 0 10px 36px rgba(16, 34, 10, .12);
  --shadow-lg: 0 28px 70px rgba(16, 34, 10, .18);
  --radius: 20px;
  --radius-lg: 30px;

  --nav-h: 74px;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--white);
  color: #131D10;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

::selection { background: var(--green); color: #fff; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ============================================================
   CURSEUR PERSONNALISÉ (desktop pointer fin uniquement)
   ============================================================ */
.cursor-dot, .cursor-ring { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor-dot {
    display: block; position: fixed; z-index: 9999; pointer-events: none;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--green); top: 0; left: 0;
    transform: translate(-50%, -50%);
  }
  .cursor-ring {
    display: block; position: fixed; z-index: 9998; pointer-events: none;
    width: 38px; height: 38px; border-radius: 50%;
    border: 1.5px solid rgba(92, 185, 41, .55);
    top: 0; left: 0; transform: translate(-50%, -50%);
    transition: width .25s var(--ease-out), height .25s var(--ease-out),
                border-color .25s, background-color .25s;
  }
  .cursor-ring.is-hover {
    width: 62px; height: 62px;
    border-color: rgba(92, 185, 41, .9);
    background: rgba(92, 185, 41, .08);
  }
  .cursor-ring.is-down { width: 28px; height: 28px; }
}

/* ============================================================
   BARRE DE PROGRESSION SCROLL — dégradé énergétique
   ============================================================ */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 4px;
  z-index: 1001; pointer-events: none;
}
.scroll-progress__bar {
  height: 100%; width: 100%;
  background: var(--grad-energy);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ============================================================
   PRELOADER
   ============================================================ */
.preloader {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--dark);
  display: flex; flex-direction: column; gap: 28px;
  align-items: center; justify-content: center;
  transition: opacity .55s var(--ease-out), visibility .55s;
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader svg { width: 86px; height: 103px; }
.preloader .pl-house {
  stroke-dasharray: 620; stroke-dashoffset: 620;
  animation: plDraw 1.1s var(--ease-out) forwards;
}
.preloader .pl-check {
  stroke-dasharray: 220; stroke-dashoffset: 220;
  animation: plDraw .7s var(--ease-out) .75s forwards;
}
@keyframes plDraw { to { stroke-dashoffset: 0; } }
.preloader__bar {
  width: 150px; height: 3px; border-radius: 99px;
  background: rgba(255,255,255,.12); overflow: hidden;
}
.preloader__bar i {
  display: block; height: 100%; width: 100%;
  background: var(--grad-energy);
  transform: translateX(-100%);
  animation: plBar 1.5s var(--ease-out) .15s forwards;
}
@keyframes plBar { to { transform: translateX(0); } }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 4.5vw, 56px);
  background: rgba(255,255,255,0);
  border-bottom: 1px solid transparent;
  transition: background .4s, border-color .4s, box-shadow .4s, transform .45s var(--ease-out);
}
.nav.is-scrolled {
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(17, 30, 14, .08);
  box-shadow: 0 2px 18px rgba(16,34,10,.06);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav--dark:not(.is-scrolled) .nav-link { color: rgba(255,255,255,.85); }
.nav--dark:not(.is-scrolled) .nav-logo-text { color: #fff; }

.nav-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.nav-logo svg { width: 30px; height: 36px; }
.nav-logo-text {
  font-family: var(--font-serif); font-size: 19px;
  letter-spacing: .06em; color: var(--green-xdk);
  transition: color .4s;
}
.nav-logo-text b { color: var(--green); font-weight: inherit; }

.nav-links { display: flex; gap: clamp(18px, 2.6vw, 36px); list-style: none; align-items: center; }
.nav-link {
  position: relative; text-decoration: none; font-size: 14.5px;
  font-weight: 500; color: #3A4A33; padding: 6px 2px;
  transition: color .25s;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px; border-radius: 2px;
  background: var(--grad-energy);
  transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform .35s var(--ease-out);
}
.nav-link:hover { color: var(--green-dk); }
.nav-link:hover::after, .nav-link.is-active::after {
  transform: scaleX(1); transform-origin: 0 50%;
}
.nav-link.is-active { color: var(--green-dk); }
.nav--dark:not(.is-scrolled) .nav-link:hover,
.nav--dark:not(.is-scrolled) .nav-link.is-active { color: #fff; }

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--grad-green); color: #fff !important;
  font-size: 14px; font-weight: 700; text-decoration: none;
  padding: 11px 22px; border-radius: 99px;
  box-shadow: 0 6px 22px rgba(92,185,41,.35);
  transition: transform .25s var(--ease-spring), box-shadow .25s;
}
.nav-cta:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 10px 30px rgba(92,185,41,.45); }

/* — Burger mobile — */
.nav-burger {
  display: none; background: none; border: 0; width: 44px; height: 44px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-burger span {
  width: 22px; height: 2px; background: #1A2A14; border-radius: 2px;
  transition: transform .3s var(--ease-out), opacity .2s, background .3s;
}
.nav--dark:not(.is-scrolled) .nav-burger span { background: #fff; }
.nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(12,20,10,.97);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 90px clamp(28px, 8vw, 60px) 50px;
  gap: 6px;
  opacity: 0; visibility: hidden;
  transition: opacity .4s var(--ease-out), visibility .4s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu a {
  font-family: var(--font-serif); font-size: clamp(30px, 7.5vw, 44px);
  color: #fff; text-decoration: none; padding: 10px 0;
  display: flex; align-items: baseline; gap: 16px;
  opacity: 0; transform: translateY(26px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out), color .25s;
}
.mobile-menu.is-open a { opacity: 1; transform: none; }
.mobile-menu a:hover { color: var(--green); }
.mobile-menu a small {
  font-family: var(--font-sans); font-size: 13px; font-weight: 600;
  color: var(--green); letter-spacing: .1em;
}
.mobile-menu__foot {
  margin-top: 38px; color: rgba(255,255,255,.55); font-size: 14px;
  opacity: 0; transition: opacity .5s .35s;
}
.mobile-menu.is-open .mobile-menu__foot { opacity: 1; }
.mobile-menu__foot a { font: inherit; color: var(--green); display: inline; padding: 0; transform: none; opacity: 1; transition: none; }

@media (max-width: 920px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
}

/* ============================================================
   SYSTÈME DE RÉVÉLATION AU SCROLL  (piloté par motion.js)
   ============================================================ */
[data-reveal] {
  opacity: 0; transform: translateY(42px);
  transition: opacity .85s var(--ease-out), transform .85s var(--ease-out);
  transition-delay: var(--rd, 0ms);
  will-change: opacity, transform;
}
[data-reveal="left"]  { transform: translateX(-54px); }
[data-reveal="right"] { transform: translateX(54px); }
[data-reveal="scale"] { transform: scale(.88); }
[data-reveal="clip"] {
  transform: none;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1s var(--ease-out), opacity .6s;
  transition-delay: var(--rd, 0ms);
}
.is-inview[data-reveal] { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }

/* — Split titres : mots qui montent — */
.split-line { display: inline-block; overflow: hidden; vertical-align: bottom; }
.split-word {
  display: inline-block;
  transform: translateY(115%) rotate(2.5deg);
  transition: transform .9s var(--ease-out);
  transition-delay: var(--wd, 0ms);
  will-change: transform;
}
.is-inview .split-word { transform: translateY(0) rotate(0); }

/* ============================================================
   COMPOSANTS PARTAGÉS
   ============================================================ */
.section { padding: clamp(78px, 11vw, 130px) clamp(20px, 5vw, 56px); position: relative; }
.wrap { max-width: 1200px; margin: 0 auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--green-dk);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: ''; width: 34px; height: 2.5px; border-radius: 3px;
  background: var(--grad-energy);
}
.on-dark .eyebrow, .eyebrow--light { color: #9FD877; }

.section-title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(34px, 5.2vw, 58px);
  line-height: 1.08; letter-spacing: -.01em; color: #14210F;
  margin-bottom: 24px;
}
.section-title em { font-style: italic; color: var(--green); }
.on-dark .section-title { color: #fff; }

.lead {
  font-size: clamp(16px, 1.7vw, 18.5px); color: #4A5A42;
  max-width: 640px; line-height: 1.7;
}
.on-dark .lead { color: rgba(255,255,255,.72); }

/* — Boutons — */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  font-size: 15.5px; font-weight: 700; text-decoration: none;
  padding: 16px 32px; border-radius: 99px; border: 0;
  overflow: hidden; isolation: isolate;
  transition: transform .25s var(--ease-spring), box-shadow .3s;
}
.btn .btn-arrow { transition: transform .3s var(--ease-spring); }
.btn:hover .btn-arrow { transform: translateX(5px); }
.btn--primary { background: var(--grad-green); color: #fff; box-shadow: 0 10px 32px rgba(92,185,41,.35); }
.btn--primary::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(135deg, #6BCB37, #5CB929);
  opacity: 0; transition: opacity .3s;
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 42px rgba(92,185,41,.48); }
.btn--primary:hover::after { opacity: 1; }
.btn--ghost {
  background: transparent; color: #1A2A14;
  border: 1.5px solid rgba(26,42,20,.22);
}
.btn--ghost:hover { transform: translateY(-3px); border-color: var(--green); color: var(--green-dk); background: rgba(92,185,41,.06); }
.btn--white { background: #fff; color: var(--green-xdk); box-shadow: 0 10px 32px rgba(0,0,0,.22); }
.btn--white:hover { transform: translateY(-3px); }
.on-dark .btn--ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.on-dark .btn--ghost:hover { border-color: var(--green); color: #B9E794; }

/* — Badge classe PEB — */
.peb-chip {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; border-radius: 10px;
  width: 44px; height: 44px; font-size: 19px;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}

/* — Cartes tilt 3D — */
.tilt { transform-style: preserve-3d; will-change: transform; }
.tilt > * { transform: translateZ(0); }
.tilt .tilt-pop { transform: translateZ(46px); }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee { overflow: hidden; position: relative; --marquee-dur: 30s; }
.marquee__track {
  display: flex; gap: 0; width: max-content;
  animation: marquee var(--marquee-dur) linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--dark); color: rgba(255,255,255,.65);
  padding: 84px clamp(20px, 5vw, 56px) 40px;
  position: relative; overflow: hidden;
}
.footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--grad-energy);
}
.footer .wrap { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 44px; }
.footer h4 {
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: #fff; margin-bottom: 18px; font-weight: 700;
}
.footer a { color: rgba(255,255,255,.65); text-decoration: none; transition: color .2s, padding-left .25s var(--ease-out); }
.footer a:hover { color: var(--green); padding-left: 4px; }
.footer ul { list-style: none; display: grid; gap: 11px; font-size: 14.5px; }
.footer-brand svg { width: 34px; height: 41px; margin-bottom: 16px; }
.footer-brand p { font-size: 14.5px; line-height: 1.7; max-width: 300px; }
.footer-brand .nav-logo-text { color: #fff; font-size: 21px; }
.footer-bottom {
  max-width: 1200px; margin: 56px auto 0; padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  font-size: 13px; color: rgba(255,255,255,.4); flex-wrap: wrap;
}
.footer-legal { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: 13px; }
.footer-legal a { color: rgba(255,255,255,.45); }
.footer-legal a:hover { color: var(--green); padding-left: 0; }
@media (max-width: 920px) { .footer .wrap { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px)  { .footer .wrap { grid-template-columns: 1fr; } }

/* ============================================================
   PAGE HERO (pages internes)
   ============================================================ */
.page-hero {
  min-height: 78vh; display: flex; align-items: center;
  position: relative; overflow: hidden;
  background: var(--dark);
  padding: calc(var(--nav-h) + 60px) clamp(20px, 5vw, 56px) 90px;
}
.page-hero__bg {
  position: absolute; inset: -12%; pointer-events: none;
  will-change: transform;
}
.page-hero__glow {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
}
.page-hero .wrap { position: relative; z-index: 2; width: 100%; }
.page-hero__title {
  font-family: var(--font-serif); font-weight: 400; color: #fff;
  font-size: clamp(40px, 6.5vw, 76px); line-height: 1.05;
  letter-spacing: -.01em; margin: 18px 0 26px;
}
.page-hero__title em { font-style: italic; color: var(--green); }
.breadcrumb {
  display: inline-flex; gap: 10px; align-items: center;
  font-size: 13.5px; font-weight: 600; color: rgba(255,255,255,.55);
}
.breadcrumb a { color: rgba(255,255,255,.55); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb span { color: #9FD877; }

/* ============================================================
   ACCORDÉON FAQ
   ============================================================ */
.faq-item {
  border: 1px solid var(--gray-200); border-radius: 18px;
  background: #fff; overflow: hidden; margin-bottom: 14px;
  transition: box-shadow .3s, border-color .3s;
}
.faq-item.is-open { box-shadow: var(--shadow-md); border-color: rgba(92,185,41,.4); }
.faq-q {
  width: 100%; background: none; border: 0; text-align: left;
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding: 22px 26px; font-size: 16.5px; font-weight: 700; color: #14210F;
}
.faq-q .faq-ico {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gray-100); color: var(--green-dk);
  transition: transform .4s var(--ease-spring), background .3s, color .3s;
}
.faq-item.is-open .faq-ico { transform: rotate(135deg); background: var(--green); color: #fff; }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .5s var(--ease-out);
}
.faq-a > div { padding: 0 26px 24px; color: #4A5A42; font-size: 15.5px; line-height: 1.75; }
.faq-a a { color: var(--green-dk); font-weight: 600; }

/* ============================================================
   CTA FINALE partagée
   ============================================================ */
.cta-final {
  position: relative; overflow: hidden; text-align: center;
  background: var(--dark);
  padding: clamp(90px, 13vw, 150px) clamp(20px, 5vw, 56px);
}
.cta-final::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(620px 340px at 18% 110%, rgba(92,185,41,.22), transparent 65%),
    radial-gradient(620px 340px at 85% -10%, rgba(232,81,28,.14), transparent 65%);
}
.cta-final .wrap { position: relative; z-index: 2; }
.cta-final h2 {
  font-family: var(--font-serif); font-weight: 400; color: #fff;
  font-size: clamp(34px, 5.4vw, 62px); line-height: 1.1; margin-bottom: 22px;
}
.cta-final h2 em { font-style: italic; color: var(--green); }
.cta-final p { color: rgba(255,255,255,.7); font-size: 17px; max-width: 560px; margin: 0 auto 40px; }
.cta-final__btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* — Ligne lumineuse animée en haut des sections dark — */
.energy-line {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad-energy);
  background-size: 220% 100%;
  animation: energyShift 7s linear infinite;
}
@keyframes energyShift {
  0% { background-position: 0% 0; } 100% { background-position: 220% 0; }
}

/* ============================================================
   RESPONSIVE — tablette & smartphone (commun aux 4 pages)
   ============================================================ */
@media (max-width: 1024px) {
  .section { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 720px) {
  .page-hero { min-height: auto; padding: calc(var(--nav-h) + 44px) 20px 64px; }
  .page-hero__title { font-size: clamp(34px, 9.5vw, 48px); }
  .section-title { font-size: clamp(30px, 8vw, 40px); }
  .lead { font-size: 15px; }
  .btn { padding: 15px 26px; font-size: 14.5px; }
  .cta-final__btns .btn { width: 100%; justify-content: center; }
  .faq-q { font-size: 15px; padding: 18px 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .breadcrumb { font-size: 12.5px; }
}
@media (max-width: 400px) {
  .nav-logo-text { font-size: 16px; }
}

/* ============================================================
   ACCESSIBILITÉ — reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal], .split-word { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* Focus visible */
a:focus-visible, button:focus-visible {
  outline: 3px solid rgba(92,185,41,.65); outline-offset: 3px; border-radius: 6px;
}
