:root {
    --ec-green: #7ed957;
    --ec-green-2: #b7ff73;
    --ec-green-dark: #3c6f2a;
    --ec-forest: #31443a;
    --ec-blue: #2444a0;
    --ec-black: #070807;
    --ec-ink: #111714;
    --ec-graphite: #171a18;
    --ec-paper: #f7f8f5;
    --ec-soft: #eef4ea;
    --ec-muted: #68736b;
    --ec-line: rgba(17, 23, 20, 0.12);
    --ec-white: #ffffff;
    --ec-glass: rgba(255, 255, 255, 0.08);
    --ec-glass-line: rgba(255, 255, 255, 0.16);
    --ec-radius: 14px;
    --ec-radius-lg: 28px;
    --ec-shadow: 0 28px 90px rgba(7, 8, 7, 0.18);
    --ec-font: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ec-ink);
    background: var(--ec-paper);
    font-family: var(--ec-font);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        linear-gradient(115deg, rgba(126, 217, 87, 0.08), transparent 34%),
        linear-gradient(245deg, rgba(36, 68, 160, 0.08), transparent 38%),
        var(--ec-paper);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(126, 217, 87, 0.58);
    outline-offset: 4px;
}

.screen-reader-text,
.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
}

.skip-link:focus {
    z-index: 1000;
    top: 14px;
    left: 14px;
    width: auto;
    height: auto;
    clip: auto;
    padding: 10px 14px;
    color: var(--ec-black);
    background: var(--ec-green);
    border-radius: 999px;
}

.ec-container,
.ec-narrow {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

.ec-narrow {
    width: min(850px, calc(100% - 48px));
}

.site-header {
    position: fixed;
    top: 16px;
    left: 0;
    right: 0;
    z-index: 80;
    pointer-events: none;
}

.site-header__inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 0 18px;
    color: var(--ec-white);
    background: rgba(7, 8, 7, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(20px) saturate(160%);
    pointer-events: auto;
}

.site-logo {
    display: inline-flex;
    align-items: center;
}

.site-logo img {
    width: 218px;
    display: block;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.22));
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.primary-nav__list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 13px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
    font-weight: 700;
    transition: color 220ms ease, background 220ms ease, transform 220ms ease;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a {
    color: var(--ec-black);
    background: var(--ec-green);
    transform: translateY(-1px);
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 3px;
    padding-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.language-switcher a {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.62);
}

.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.nav-toggle span:not(.screen-reader-text) {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--ec-white);
    border-radius: 2px;
}

.ec-hero {
    min-height: 100vh;
    display: grid;
    align-items: end;
    padding: 128px 0 0;
    color: var(--ec-white);
    background:
        linear-gradient(115deg, rgba(126, 217, 87, 0.14), transparent 30%),
        linear-gradient(245deg, rgba(36, 68, 160, 0.18), transparent 38%),
        var(--ec-black);
    overflow: hidden;
}

.ec-hero::after {
    content: "CECB · GEAK · CECE · MINERGIE · JUSTIFICATIF THERMIQUE · SUBVENTIONS · ";
    display: block;
    width: max-content;
    padding: 14px 0;
    color: var(--ec-black);
    background: var(--ec-green);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    white-space: pre;
    animation: ecTicker 24s linear infinite;
    box-shadow: 0 -12px 40px rgba(126, 217, 87, 0.18);
}

.ec-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.96fr);
    gap: 58px;
    align-items: end;
    padding-bottom: 78px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    color: var(--ec-green);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 22px currentColor;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.04;
    letter-spacing: 0;
}

h1 {
    max-width: 920px;
    font-size: clamp(2.85rem, 6vw, 6rem);
    font-weight: 850;
    text-wrap: balance;
}

.ec-hero h1 {
    max-width: 840px;
    font-size: clamp(3rem, 5.7vw, 5.7rem);
    line-height: 1.01;
}

h2 {
    font-size: clamp(2.25rem, 5vw, 4.7rem);
    font-weight: 830;
}

h3 {
    font-size: 1.22rem;
    font-weight: 820;
}

.lead {
    max-width: 680px;
    margin: 28px 0 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: clamp(1.05rem, 2vw, 1.28rem);
    line-height: 1.75;
}

.ec-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 36px;
}

.ec-button,
.wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 13px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 850;
    cursor: pointer;
    transition: transform 220ms ease, background 220ms ease, color 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.ec-button:hover,
.wp-block-button__link:hover {
    transform: translateY(-2px);
}

.ec-button--primary,
.wp-block-button__link {
    color: var(--ec-black);
    background: var(--ec-green);
    box-shadow: 0 18px 44px rgba(126, 217, 87, 0.28);
}

.ec-button--primary:hover {
    background: var(--ec-green-2);
}

.ec-button--secondary {
    color: var(--ec-white);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
}

.ec-section .ec-button--secondary,
.page-content .ec-button--secondary {
    color: var(--ec-ink);
    background: var(--ec-white);
    border-color: var(--ec-line);
}

.ec-hero__panel {
    position: relative;
    min-height: 560px;
    padding: 18px;
    isolation: isolate;
}

.ec-hero__panel::before {
    content: "";
    position: absolute;
    inset: 16% 6% auto auto;
    width: 64%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(126, 217, 87, 0.34), transparent 64%);
    filter: blur(10px);
    z-index: -1;
    animation: ecFloat 7s ease-in-out infinite;
}

.ec-hero__panel img {
    position: absolute;
    right: 0;
    bottom: 0;
    width: min(84%, 480px);
    max-height: 92%;
    object-fit: contain;
    filter: drop-shadow(0 36px 80px rgba(0, 0, 0, 0.45));
}

.ec-hero__badge {
    position: absolute;
    left: 0;
    bottom: 48px;
    width: min(330px, 76%);
    padding: 22px;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px) saturate(160%);
}

.ec-hero__badge strong {
    display: block;
    margin-bottom: 7px;
    color: var(--ec-green);
}

.ec-section {
    position: relative;
    padding: 112px 0;
}

.ec-section--soft {
    background:
        linear-gradient(180deg, rgba(126, 217, 87, 0.1), transparent 46%),
        var(--ec-paper);
}

.ec-section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 46px;
}

.ec-section__head p {
    max-width: 520px;
    margin: 0;
    color: var(--ec-muted);
    font-size: 1.04rem;
}

.ec-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.ec-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ec-card,
.wp-block-group.ec-card {
    position: relative;
    min-height: 245px;
    padding: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(17, 23, 20, 0.1);
    border-radius: 24px;
    box-shadow: 0 18px 60px rgba(17, 23, 20, 0.08);
    backdrop-filter: blur(18px);
    transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}

.ec-card::after {
    content: "";
    position: absolute;
    inset: auto -20% -40% 18%;
    height: 120px;
    background: radial-gradient(circle, rgba(126, 217, 87, 0.28), transparent 68%);
    opacity: 0;
    transition: opacity 260ms ease;
}

.ec-card:hover {
    transform: translateY(-8px);
    border-color: rgba(126, 217, 87, 0.45);
    box-shadow: 0 28px 80px rgba(17, 23, 20, 0.14);
}

.ec-card:hover::after {
    opacity: 1;
}

.ec-card p:last-child,
.page-content p:last-child {
    margin-bottom: 0;
}

.ec-icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    color: var(--ec-black);
    background: var(--ec-green);
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 950;
    box-shadow: 0 14px 34px rgba(126, 217, 87, 0.34);
}

.service-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 34px;
}

.service-nav a {
    position: relative;
    min-height: 68px;
    display: flex;
    align-items: center;
    padding: 18px;
    overflow: hidden;
    color: var(--ec-ink);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(17, 23, 20, 0.1);
    border-radius: 18px;
    font-weight: 900;
    box-shadow: 0 12px 34px rgba(17, 23, 20, 0.06);
    transition: transform 240ms ease, border-color 240ms ease, color 240ms ease, background 240ms ease;
}

.service-nav a::after {
    content: "";
    position: absolute;
    right: 16px;
    width: 9px;
    height: 9px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.36;
}

.service-nav a:hover {
    color: var(--ec-black);
    background: var(--ec-green);
    border-color: var(--ec-green);
    transform: translateY(-4px);
}

.service-detail {
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
    gap: 40px;
    align-items: start;
    padding: 44px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.72);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
        var(--ec-black);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
    transition: transform 260ms ease, border-color 260ms ease, background 260ms ease;
}

.ec-section--soft .service-detail {
    color: rgba(255, 255, 255, 0.74);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
        var(--ec-black);
}

.service-detail:hover {
    transform: translateY(-6px);
    border-color: rgba(126, 217, 87, 0.42);
}

.service-detail__aside {
    position: sticky;
    top: 110px;
}

.service-detail h2 {
    color: var(--ec-white);
    font-size: clamp(2.1rem, 4vw, 3.7rem);
}

.service-detail h3 {
    margin-top: 22px;
    color: var(--ec-green);
}

.service-detail p,
.service-detail li {
    color: rgba(255, 255, 255, 0.72);
}

.service-detail table {
    color: rgba(255, 255, 255, 0.74);
}

.service-detail th,
.service-detail td {
    border-color: rgba(255, 255, 255, 0.12);
}

.service-detail th {
    color: var(--ec-black);
    background: var(--ec-green);
}

.page-hero {
    padding: 150px 0 70px;
    color: var(--ec-white);
    background:
        linear-gradient(120deg, rgba(126, 217, 87, 0.18), transparent 28%),
        linear-gradient(245deg, rgba(36, 68, 160, 0.18), transparent 40%),
        var(--ec-black);
}

.page-hero p {
    max-width: 780px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.68);
}

.page-content {
    padding-top: 66px;
    padding-bottom: 92px;
}

.page-content h2 {
    margin-top: 46px;
    margin-bottom: 16px;
    font-size: clamp(1.9rem, 4vw, 3.2rem);
}

.page-content h3 {
    margin-top: 30px;
    margin-bottom: 10px;
}

.page-content p,
.page-content li {
    color: var(--ec-muted);
}

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    overflow: hidden;
    border-radius: 16px;
    background: var(--ec-white);
    box-shadow: 0 14px 42px rgba(17, 23, 20, 0.06);
}

.page-content th,
.page-content td {
    padding: 15px;
    border: 1px solid var(--ec-line);
    vertical-align: top;
}

.page-content th {
    background: var(--ec-soft);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.post-card a {
    display: block;
    min-height: 100%;
    padding: 18px;
    color: var(--ec-ink);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--ec-line);
    border-radius: 24px;
    box-shadow: 0 18px 54px rgba(17, 23, 20, 0.08);
    transition: transform 240ms ease, box-shadow 240ms ease;
}

.post-card a:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 78px rgba(17, 23, 20, 0.13);
}

.post-card img,
.single-post__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 18px;
}

.post-card time {
    display: block;
    margin-top: 18px;
    color: var(--ec-green-dark);
    font-size: 0.84rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.post-card h2 {
    margin-top: 8px;
    font-size: 1.45rem;
}

.contact-layout {
    display: grid;
    grid-template-columns: 0.88fr 1.12fr;
    gap: 42px;
    align-items: start;
}

.contact-list {
    display: grid;
    gap: 16px;
    margin-top: 28px;
}

.contact-item {
    padding: 22px;
    color: var(--ec-ink);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--ec-line);
    border-radius: 22px;
    box-shadow: 0 14px 44px rgba(17, 23, 20, 0.07);
}

.ec-form {
    padding: 32px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--ec-line);
    border-radius: 28px;
    box-shadow: var(--ec-shadow);
    backdrop-filter: blur(18px);
}

.ec-form label {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--ec-ink);
    font-size: 0.88rem;
    font-weight: 850;
}

.ec-form input,
.ec-form textarea {
    width: 100%;
    color: var(--ec-ink);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(17, 23, 20, 0.14);
    border-radius: 16px;
    padding: 14px 15px;
    font: inherit;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.ec-form input:focus,
.ec-form textarea:focus {
    border-color: var(--ec-green);
    background: var(--ec-white);
    box-shadow: 0 0 0 4px rgba(126, 217, 87, 0.18);
}

.ec-form textarea {
    resize: vertical;
}

.ec-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ec-form__trap {
    display: none;
}

.ec-form__success,
.ec-form__error {
    padding: 13px 15px;
    border-radius: 16px;
    font-weight: 800;
}

.ec-form__success {
    color: var(--ec-green-dark);
    background: rgba(126, 217, 87, 0.15);
}

.ec-form__error {
    color: #a11d17;
    background: #fff1f0;
}

.map-frame {
    width: 100%;
    min-height: 380px;
    border: 0;
    border-radius: 28px;
    box-shadow: var(--ec-shadow);
}

.site-footer {
    padding: 70px 0 28px;
    color: rgba(255, 255, 255, 0.72);
    background:
        linear-gradient(120deg, rgba(126, 217, 87, 0.1), transparent 35%),
        var(--ec-black);
}

.site-footer a {
    color: var(--ec-white);
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr 0.85fr;
    gap: 48px;
}

.site-footer__logo img {
    width: 238px;
    margin-bottom: 18px;
}

.site-footer h2 {
    margin-bottom: 16px;
    color: var(--ec-white);
    font-size: 1rem;
}

.site-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 9px;
}

.site-footer__bottom {
    margin-top: 44px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.92rem;
}

.ec-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 560ms ease, transform 560ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 240ms ease, border-color 240ms ease, background 240ms ease;
}

.ec-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes ecTicker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes ecFloat {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-18px, 16px, 0) scale(1.04); }
}

@media (max-width: 980px) {
    .site-header {
        top: 10px;
    }

    .site-header__inner {
        min-height: 64px;
    }

    .nav-toggle {
        display: block;
    }

    .primary-nav {
        position: absolute;
        top: 76px;
        right: 24px;
        left: 24px;
        display: none;
        padding: 18px;
        background: rgba(7, 8, 7, 0.92);
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 24px;
        box-shadow: var(--ec-shadow);
        backdrop-filter: blur(20px);
    }

    .primary-nav.is-open {
        display: block;
    }

    .primary-nav__list,
    .language-switcher {
        display: grid;
        gap: 5px;
        padding: 0;
        border: 0;
    }

    .language-switcher {
        grid-template-columns: repeat(4, 1fr);
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.14);
    }

    .ec-hero__grid,
    .service-detail,
    .contact-layout,
    .site-footer__grid {
        grid-template-columns: 1fr;
    }

    .ec-hero__panel {
        min-height: 460px;
    }

    .service-detail__aside {
        position: static;
    }

    .ec-grid,
    .ec-grid--four,
    .service-nav,
    .post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .ec-container,
    .ec-narrow {
        width: min(100% - 28px, 1180px);
    }

    .site-logo img {
        width: 176px;
    }

    .site-header__inner {
        padding: 0 10px 0 16px;
    }

    .ec-hero {
        min-height: auto;
        padding-top: 116px;
    }

    .ec-hero h1 {
        max-width: 100%;
        font-size: clamp(2.35rem, 12vw, 3.35rem);
        line-height: 1.04;
    }

    .ec-hero__grid {
        gap: 32px;
        padding-bottom: 54px;
    }

    .ec-hero__panel {
        min-height: 360px;
    }

    .ec-hero__panel img {
        width: min(86%, 360px);
    }

    .ec-hero__badge {
        position: static;
        width: 100%;
        margin-top: 18px;
    }

    .ec-section {
        padding: 72px 0;
    }

    .ec-section__head {
        display: block;
    }

    .ec-section__head p,
    .ec-section__head .ec-button {
        margin-top: 18px;
    }

    .ec-grid,
    .ec-grid--four,
    .service-nav,
    .post-grid,
    .ec-form__grid {
        grid-template-columns: 1fr;
    }

    .service-detail {
        padding: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
