/* ============================================================
   HOME INVEST — Feuille de style principale
   Palette verte + logo cyan/orange posé tel quel
   ============================================================ */

:root {
  --green: #2fbe5b;
  --green-dark: #24964a;
  --green-deep: #0e3a28;
  --green-deep-2: #13432f;
  --navy: #0b1620;
  --navy-2: #121c28;
  --bar: #151f2b;
  --ink: #1c2430;
  --muted: #5b6573;
  --line: #e6eaf0;
  --bg: #ffffff;
  --soft: #f4f7f5;
  --soft-2: #eef4ef;
  --shadow: 0 14px 40px rgba(14, 42, 32, .10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: Inter, system-ui, -apple-system, sans-serif; color: var(--ink); background: #fff; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.wrap { width: min(1180px, calc(100% - 36px)); margin-inline: auto; }
.center { text-align: center; }

/* ---------- Header / Navigation ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s ease;
}
.top.scrolled { box-shadow: 0 6px 22px rgba(11,22,32,.08); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 46px; width: auto; }
.links { display: flex; align-items: center; gap: 22px; font-size: 14.5px; color: #2b3440; font-weight: 500; }
.links a:not(.btn):hover { color: var(--green-dark); }
.links a.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--green); padding-bottom: 4px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  border-radius: 999px; font-weight: 700; padding: 12px 22px; transition: .2s ease;
  font-size: 14.5px; white-space: nowrap;
}
.btn-green { background: var(--green); color: #fff !important; }
.btn-green:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.6); }
.btn-outline:hover { background: rgba(255,255,255,.1); }
.btn-outline-dark { background: #fff; color: var(--ink); border: 1.5px solid #cfd8e0; }
.btn-outline-dark:hover { border-color: var(--green); color: var(--green-dark); }
.btn-lg { padding: 15px 28px; font-size: 15.5px; }
.burger {
  display: none; width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 20px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 640px; color: #fff;
  background: #071018 center/cover no-repeat;
  background-image: linear-gradient(90deg, rgba(7,14,22,.78) 0%, rgba(7,14,22,.42) 50%, rgba(7,14,22,.15) 100%), url("../images/hero-night.jpg");
  display: flex; align-items: center; padding: 150px 0 90px;
}
.hero .kicker {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: #d5ddd8; font-weight: 600; margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(38px, 5vw, 60px); line-height: 1.08; font-weight: 800;
  letter-spacing: -.03em; max-width: 15ch;
}
.hero h1 em { font-style: normal; color: #3ad46a; }
.hero .lead { max-width: 46ch; margin: 20px 0 30px; color: #dce4df; font-size: 16.5px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hand {
  position: absolute; right: max(28px, calc((100% - 1180px) / 2));
  top: 165px; width: 250px; transform: rotate(6deg);
  font-family: Caveat, cursive; font-size: 28px; line-height: 1.15; color: #fff;
  text-shadow: 0 8px 24px rgba(0,0,0,.35);
}

/* ---------- Trust strip ---------- */
.strip {
  background: var(--soft); color: var(--ink);
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}
.strip article {
  padding: 22px 20px; display: flex; gap: 12px; align-items: center;
  border-right: 1px solid var(--line);
}
.strip article:last-child { border-right: 0; }
.strip .ico { width: 40px; height: 40px; display: grid; place-items: center; color: var(--green); flex: 0 0 40px; }
.strip strong { display: block; font-size: 14px; font-weight: 700; }
.strip span { font-size: 13.5px; color: var(--muted); }

/* ---------- Section headings ---------- */
.label { color: var(--green); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
h2 { font-size: clamp(27px, 3.4vw, 38px); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
.block { padding: 84px 0; }
.block.alt { background: var(--soft); }

/* ---------- Solutions (5 product cards) ---------- */
.sol-head { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: end; margin-bottom: 40px; }
.sol-head p { color: var(--muted); }
.products { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.product {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column; transition: transform .3s ease, box-shadow .3s ease;
}
.product:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.product .ph { position: relative; height: 158px; overflow: hidden; }
.product .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.product:hover .ph img { transform: scale(1.06); }
.product .body { padding: 20px 16px 20px; display: flex; flex-direction: column; flex: 1; }
.product h3 { font-size: 16.5px; margin-bottom: 2px; }
.product .sub { color: var(--green-dark); font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.product p { color: var(--muted); font-size: 14px; flex: 1; }
.product .more { color: var(--green-dark); font-weight: 700; font-size: 14px; margin-top: 12px; }

/* ---------- CTA band with stats ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--green-deep) 0%, var(--green-deep-2) 60%, #17503a 100%);
  color: #fff;
}
.cta-band .in { display: grid; grid-template-columns: 1.1fr 1.4fr; gap: 30px; align-items: center; padding: 44px 0; }
.cta-band h2 { max-width: 20ch; }
.cta-band .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cta-band .stats article { text-align: center; }
.cta-band .stats .sico { color: var(--green); display: grid; place-items: center; margin-bottom: 8px; }
.cta-band .stats strong { display: block; font-size: 30px; font-weight: 800; line-height: 1; }
.cta-band .stats span { color: #bcd3c5; font-size: 13.5px; }

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; margin-top: 44px; }
.process .step { text-align: center; }
.process .num {
  width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff;
  font-weight: 800; display: grid; place-items: center; margin: 0 auto 14px; font-size: 15px;
}
.process .picto { color: var(--green-dark); display: grid; place-items: center; margin-bottom: 12px; }
.process h3 { font-size: 17px; margin-bottom: 6px; }
.process p { color: var(--muted); font-size: 14px; max-width: 26ch; margin: 0 auto; }

/* ---------- Testimonials ---------- */
.testi {
  position: relative; min-height: 360px; color: #fff;
  background: #111 center/cover no-repeat;
  background-image: linear-gradient(rgba(8,16,12,.72), rgba(8,16,12,.72)), url("../images/famille.jpg");
  display: flex; align-items: center; padding: 70px 0;
}
.testi .quote { max-width: 720px; margin: 0 auto; text-align: center; }
.testi h2 { margin-bottom: 22px; }
.testi blockquote { font-size: 19px; line-height: 1.6; font-style: italic; min-height: 84px; }
.testi .stars { color: #ffc531; font-size: 20px; margin: 18px 0 8px; letter-spacing: 2px; }
.testi .who { font-weight: 700; }
.testi .arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px;
  border-radius: 50%; border: 1.5px solid rgba(255,255,255,.5); background: rgba(255,255,255,.06);
  color: #fff; cursor: pointer; display: grid; place-items: center; transition: .2s;
}
.testi .arrow:hover { background: rgba(255,255,255,.16); }
.testi .prev { left: max(20px, calc((100% - 1180px) / 2)); }
.testi .next { right: max(20px, calc((100% - 1180px) / 2)); }

/* ---------- Badges RGE / CEE ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; background: #fff;
  border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px 10px 12px;
  box-shadow: 0 6px 16px rgba(14,42,32,.06);
}
.badge svg { flex: 0 0 auto; }
.badge .txt { line-height: 1.2; }
.badge .txt strong { display: block; font-size: 14px; }
.badge .txt span { font-size: 12px; color: var(--muted); }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.badge-mini {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600;
  color: var(--green-deep); background: var(--soft-2); border-radius: 999px; padding: 6px 14px 6px 6px;
}
/* Vrais logos officiels dans les badges — object-fit contain => jamais déformés */
.badge { min-height: 60px; }
.badge img { object-fit: contain; }
.badge-logo-rge { height: 30px; width: auto; max-width: 96px; }
.badge-logo-cee { height: 44px; width: 44px; }
.badge-mini img { object-fit: contain; }
.badge-mini-rge { height: 18px; width: auto; max-width: 58px; }
.badge-mini-cee { height: 22px; width: 22px; }
/* Badge rond "validé" (coche entourée) au-dessus d'un chiffre */
.valide-ring { color: var(--green) !important; }
.valide-ring svg { width: 30px; height: 30px; }

/* ---------- Partners ---------- */
.partners { padding: 52px 0; text-align: center; background: #fff; }
.partners .label { display: block; margin-bottom: 8px; }
.partners p { color: var(--muted); margin-bottom: 28px; }
.logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px 50px; align-items: center; }
.logos img {
  height: 40px; width: auto; max-width: 160px; object-fit: contain;
  filter: grayscale(1); opacity: .6; transition: filter .25s ease, opacity .25s ease;
}
.logos img:hover { filter: none; opacity: 1; }
.logos img[alt="Orion"] { height: 62px; }
.logos img[alt="Daikin"] { height: 30px; }
.logos img[alt="Ariston"] { height: 30px; }
.logos span { color: #6a7380; font-weight: 800; font-size: 19px; opacity: .78; transition: .25s; letter-spacing: .02em; }
.logos span:hover { opacity: 1; color: var(--ink); }

/* ---------- Bottom CTA ---------- */
.foot-cta {
  color: #fff; padding: 46px 0;
  background: linear-gradient(rgba(11,22,32,.86), rgba(11,22,32,.86)), url("../images/hero.jpg") center/cover;
}
.foot-cta .in { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-cta h2 { font-size: 26px; }
.foot-cta p { color: #c5d0d8; margin-top: 6px; }

/* ---------- Cards / grids (inner) ---------- */
.grid-4, .grid-3, .grid-2 { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; transition: transform .3s ease, box-shadow .3s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { margin: 10px 0 6px; font-size: 18px; }
.card p { color: var(--muted); font-size: 14.5px; }
.step-n { color: var(--green); font-weight: 800; font-size: 13px; letter-spacing: .06em; }

/* Cartes d'accès (accueil → aides / réalisations / articles) */
.access-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 28px 24px; transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.access-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #d3e6d9; }
.access-ico {
  width: 52px; height: 52px; border-radius: 14px; background: var(--soft-2); color: var(--green-dark);
  display: grid; place-items: center; margin-bottom: 16px;
}
.access-card h3 { font-size: 19px; margin-bottom: 8px; }
.access-card p { color: var(--muted); font-size: 14.5px; flex: 1; }
.access-card .more { color: var(--green-dark); font-weight: 700; font-size: 14.5px; margin-top: 14px; }

/* ---------- Forms ---------- */
form.lead { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.req { color: var(--green-dark); }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fbfcfd; transition: .15s;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--green); box-shadow: 0 0 0 3px rgba(47,190,91,.15); }
.full { grid-column: 1 / -1; }
textarea { min-height: 110px; resize: vertical; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.consent input { width: auto; margin-top: 3px; }
.toast { display: none; margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.toast.ok { background: #e9f8ee; color: #166534; }
.toast.err { background: #fdecec; color: #b42318; }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 40px; align-items: start; }
.contact-info { display: grid; gap: 18px; }
.info-item { display: flex; gap: 12px; align-items: flex-start; }
.info-item .ii { color: var(--green-dark); flex: 0 0 24px; margin-top: 2px; }
.info-item strong { display: block; font-size: 14px; }
.info-item span, .info-item a { color: var(--muted); font-size: 14.5px; }
.info-item a:hover { color: var(--green-dark); }

/* ---------- Footer ---------- */
footer { background: var(--navy); color: #c5d0d8; padding: 48px 0 22px; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.foot-brand img { height: 42px; margin-bottom: 12px; background: #fff; padding: 6px 8px; border-radius: 8px; }
.foot h4 { color: #fff; font-size: 14px; margin-bottom: 12px; letter-spacing: .04em; }
.foot a { display: block; padding: 4px 0; font-size: 14px; }
.foot a:hover { color: #fff; }
.foot p { font-size: 14px; max-width: 34ch; }
.social { display: flex; gap: 12px; margin-top: 14px; }
.social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #fff; }
.social a:hover { background: var(--green); }
.legal { margin-top: 26px; font-size: 12.5px; color: #8b98a3; border-top: 1px solid rgba(255,255,255,.08); padding-top: 16px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- Modal ---------- */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 90; place-items: center; padding: 24px; }
.modal.open { display: grid; }
.modal-box { background: #fff; border-radius: 16px; padding: 30px; max-width: 480px; text-align: center; }
.modal-box p { color: var(--muted); margin: 10px 0 18px; }

/* ---------- Inner pages ---------- */
.page-hero { background: #0b1620 center/cover no-repeat; color: #fff; padding: 130px 0 56px; }
.page-hero h1 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -.02em; font-weight: 800; max-width: 20ch; }
.page-hero p { color: #c5d0d8; max-width: 60ch; margin-top: 12px; }
.crumb { font-size: 13px; color: #9fb0a8; margin-bottom: 12px; }
.crumb a { color: #c9e6d2; }
.crumb a:hover { color: #fff; }
.prose { padding: 56px 0 80px; }
.prose .col { max-width: 760px; }
.prose h2 { margin: 32px 0 12px; font-size: 25px; }
.prose h3 { margin: 22px 0 8px; font-size: 18px; }
.prose p, .prose li { color: #3c4552; margin-bottom: 11px; }
.prose ul, .prose ol { padding-left: 20px; margin-bottom: 16px; }
.prose a:not(.btn) { color: var(--green-dark); font-weight: 600; }
.prose a.btn-green, .aside-cta a.btn-green { color: #fff; }
.prose img.wide { width: 100%; max-height: 380px; object-fit: cover; border-radius: 16px; margin: 8px 0 24px; }
.callout { background: var(--soft-2); border-left: 4px solid var(--green); border-radius: 8px; padding: 16px 18px; margin: 20px 0; }
.callout p { margin: 0; color: var(--green-deep); }
.faq { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.faq summary { padding: 16px 18px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--green); font-size: 22px; }
.faq[open] summary::after { content: "\2212"; }
.faq .fa { padding: 0 18px 16px; color: var(--muted); font-size: 14.5px; }
.aside-cta { background: var(--soft); border: 1px solid var(--line); border-radius: 16px; padding: 24px; position: sticky; top: 96px; }
.aside-cta h3 { margin-bottom: 8px; }
.aside-cta p { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.prose-grid { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }

/* Articles list */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.article-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: transform .3s ease, box-shadow .3s ease; }
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.article-card img { height: 180px; width: 100%; object-fit: cover; }
.article-card .body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.article-card .tag { color: var(--green-dark); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.article-card h3 { font-size: 19px; margin: 8px 0; }
.article-card p { color: var(--muted); font-size: 14.5px; flex: 1; }
.article-card .more { color: var(--green-dark); font-weight: 700; margin-top: 14px; font-size: 14.5px; }

/* Réalisations */
.gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gal figure { border-radius: 16px; overflow: hidden; position: relative; }
.gal img { height: 240px; width: 100%; object-fit: cover; transition: transform .5s ease; }
.gal figure:hover img { transform: scale(1.05); }
.gal figcaption { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; padding: 30px 16px 14px; font-size: 14px; font-weight: 600; }

/* Aides */
.aide-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; transition: transform .3s ease, box-shadow .3s ease; }
.aide-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.aide-card .amt { color: var(--green-dark); font-weight: 800; font-size: 22px; margin: 6px 0; }
.aide-card h3 { max-width: calc(100% - 66px); }
.aide-card h3.nomedia { max-width: 100%; }
.aide-logo, .aide-ico {
  position: absolute; top: 20px; right: 20px; width: 56px; height: 56px; border-radius: 14px;
  background: #fff; border: 1px solid var(--line); display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(14,42,32,.08);
}
.aide-logo img { max-width: 40px; max-height: 40px; width: auto; height: auto; object-fit: contain; }
.aide-ico { background: var(--soft-2); border-color: transparent; color: var(--green-dark); }

/* ---------- Reveal animations ---------- */
.js-on .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.js-on .reveal-left { transform: translateX(-28px); opacity: 0; transition: opacity .7s ease, transform .7s ease; }
.reveal-left.in { opacity: 1; transform: none; }
.js-on .reveal-right { transform: translateX(28px); opacity: 0; transition: opacity .7s ease, transform .7s ease; }
.reveal-right.in { opacity: 1; transform: none; }
.d1 { transition-delay: .08s; } .d2 { transition-delay: .16s; } .d3 { transition-delay: .24s; } .d4 { transition-delay: .32s; } .d5 { transition-delay: .40s; }
.hero .kicker, .hero h1, .hero .lead, .hero-cta, .hand { animation: rise .8s ease both; }
.hero h1 { animation-delay: .1s; } .hero .lead { animation-delay: .2s; } .hero-cta { animation-delay: .3s; } .hand { animation-delay: .45s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .products { grid-template-columns: repeat(3, 1fr); }
  .foot { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .links {
    display: none; position: absolute; top: 74px; left: 0; right: 0; background: #fff;
    padding: 16px 20px 22px; flex-direction: column; align-items: flex-start; gap: 14px;
    border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,.08);
  }
  .links.open { display: flex; }
  .burger { display: grid; place-items: center; }
  .strip, .process, .cta-band .in, .grid-4, .grid-3, .grid-2, .contact-grid, .sol-head, .prose-grid, .article-grid, .gal { grid-template-columns: 1fr; }
  .hand { position: static; transform: none; width: auto; margin-top: 22px; }
  .hero { min-height: 560px; padding-top: 120px; }
  .fields { grid-template-columns: 1fr; }
  .aside-cta { position: static; }
  .foot-cta .in { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 620px) {
  .products { grid-template-columns: 1fr; }
  .cta-band .stats { grid-template-columns: 1fr; gap: 14px; }
  .foot { grid-template-columns: 1fr; }
  .testi .prev, .testi .next { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .hero .kicker, .hero h1, .hero .lead, .hero-cta, .hand {
    animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important;
  }
}
