body, html { margin: 0; padding: 0; font-family: 'Inter', sans-serif; }
main { min-height: 100vh; overflow-y: auto; scroll-snap-type: y proximity; scroll-behavior: smooth; scrollbar-width: none; }
main::-webkit-scrollbar { display: none; }
section { 
    min-height: 100vh; 
    width: 100%; 
    scroll-snap-align: start; 
    position: relative; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    overflow: hidden; 
    padding: 5rem 1.5rem 2rem 1.5rem; 
}
@media (max-width: 1024px) {
    main { scroll-snap-type: y proximity; }
    section { height: auto; min-height: auto; padding-top: 6.5rem; padding-bottom: 4rem; }
    article.content { max-width: 100%; padding: .5rem; }
    .side-nav { display:none !important; }
}
@media (max-width: 640px) {
    section { padding-left: 1rem; padding-right: 1rem; }
    .btn-primary, .btn-secondary { width: 100%; min-height: 44px; }
    .whatsapp-float { right: 12px; bottom: 12px; padding: .65rem .9rem; font-size: .75rem; }
    .modal-wrapper { padding: .75rem; }
    .modal-content { max-height: 92vh; padding: 1.25rem; border-radius: 14px; }
}
@media (min-width: 1025px) {
    main { height: 100vh; overflow-y: scroll; scroll-snap-type: y mandatory; }
}
figure.bg-image { position: absolute; inset: 0; margin: 0; z-index: 1; }
figure.bg-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.5s cubic-bezier(0.25, 1, 0.5, 1); }
#services-energie .bg-image img { object-position: center; filter: saturate(1.08) contrast(1.04); }
#services-energie::before { content:''; position:absolute; inset:0; z-index:1; pointer-events:none; background:linear-gradient(120deg, rgba(2,35,30,.78) 0%, rgba(3,50,43,.38) 42%, rgba(0,15,30,.72) 100%); mix-blend-mode:multiply; }
#services-energie .overlay { background:linear-gradient(135deg, rgba(255,255,255,.82) 0%, rgba(235,248,245,.74) 45%, rgba(225,239,246,.86) 100%); }
.dark #services-energie .overlay { background:linear-gradient(135deg, rgba(0,20,17,.58) 0%, rgba(0,15,25,.72) 100%); }
.lang-en { display:none; }
html[lang="en"] .lang-fr { display:none !important; }
html[lang="en"] .lang-en { display:block !important; }
#accueil .bg-image img {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 3s ease;
}
#accueil .bg-image img.active-slide {
    opacity: 1;
    transform: scale(1.03);
}
.dark .overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(5,5,5,0.7) 0%, rgba(10,10,10,0.92) 100%); z-index: 2; }
.overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(255,255,255,0.75) 0%, rgba(240,244,248,0.90) 100%); z-index: 2; }
article.content { position: relative; z-index: 3; max-width: 1200px; width: 100%; padding: 1rem; opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1); }
section.is-visible article.content { opacity: 1; transform: translateY(0); }
section.is-visible figure.bg-image:not(#accueil) img { transform: scale(1.03); }
header { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: background-color 0.3s, border-color 0.3s; }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 1rem; padding: 0.75rem 1.75rem; border-radius: 9999px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; font-size: 0.75rem; transition: all 0.3s ease; cursor: pointer; text-decoration: none; }
.dark .btn-primary { background-color: #ffffff; color: #000000; }
.dark .btn-primary:hover { background-color: #10b981; color: #ffffff; transform: translateY(-2px); }
.btn-primary { background-color: #0f172a; color: #ffffff; }
.btn-primary:hover { background-color: #10b981; color: #ffffff; transform: translateY(-2px); }
.btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 1rem; padding: 0.75rem 1.75rem; border-radius: 9999px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; font-size: 0.75rem; transition: all 0.3s ease; cursor: pointer; border: 1px solid currentColor; }
.modal-wrapper { position: fixed; inset: 0; z-index: 200; backdrop-filter: blur(15px); display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; padding: 1.5rem; }
.dark .modal-wrapper { background: rgba(0, 0, 0, 0.85); }
.modal-wrapper { background: rgba(200, 205, 215, 0.85); }
.modal-wrapper.active { opacity: 1; pointer-events: auto; }
.modal-content { border-radius: 16px; width: 100%; max-width: 650px; padding: 2rem; position: relative; transform: translateY(20px); transition: transform 0.4s ease; max-height: 90vh; overflow-y: auto; }
.dark .modal-content { background: #0a0a0a; border: 1px solid rgba(255, 255, 255, 0.1); color: #fff; }
.modal-content { background: #ffffff; border: 1px solid rgba(0, 0, 0, 0.1); color: #0f172a; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); }
.modal-wrapper.active .modal-content { transform: translateY(0); }
.form-input { width: 100%; border-radius: 8px; padding: 0.75rem 1rem; font-size: 0.9rem; outline: none; transition: border-color 0.3s; }
.dark .form-input { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.15); color: #fff; }
.form-input { background: rgba(0, 0, 0, 0.03); border: 1px solid rgba(0, 0, 0, 0.15); color: #0f172a; }
.form-input:focus { border-color: #10b981; }
.whatsapp-float { position: fixed; bottom: 25px; right: 25px; background-color: #25d366; color: white; border-radius: 50px; padding: 0.6rem 1.2rem; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.85rem; box-shadow: 0 10px 20px rgba(0,0,0,0.3); z-index: 100; transition: all 0.3s ease; text-decoration: none; }
.whatsapp-float:hover { transform: translateY(-3px); background-color: #20b858; }
.side-nav { position: fixed; right: 20px; top: 50%; transform: translateY(-50%); z-index: 90; display: flex; flex-direction: column; gap: 12px; }
.dot-item { width: 10px; height: 10px; border-radius: 50%; background-color: rgba(156, 163, 175, 0.5); transition: all 0.3s ease; position: relative; }
.dot-item:hover, .dot-item.active { background-color: #10b981; transform: scale(1.4); }
.dot-tooltip { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); background: #000; color: #fff; padding: 3px 8px; border-radius: 4px; font-size: 10px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.dot-item:hover .dot-tooltip { opacity: 1; }

/* =========================================================
   STS CONGO — Responsive multi-page navigation
   Ajouts uniquement : le design existant est conservé.
   ========================================================= */
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: currentColor;
    padding: .55rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}
.mobile-menu-btn:hover {
    background: rgba(16,185,129,.10);
    color: #10b981;
}

.mobile-menu {
    display: none;
}

.nav-active {
    color: #10b981 !important;
}

@media (max-width: 1024px) {
    .mobile-menu-btn {
        display: inline-flex;
    }

    header {
        position: fixed;
        min-height: 72px;
    }

    .mobile-menu {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: .5rem 1rem 1rem;
        background: rgba(255,255,255,.96);
        border-bottom: 1px solid rgba(148,163,184,.25);
        box-shadow: 0 12px 30px rgba(0,0,0,.10);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
        z-index: 49;
    }

    .dark .mobile-menu {
        background: rgba(10,10,10,.96);
        border-bottom-color: rgba(255,255,255,.10);
    }

    .mobile-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-menu a {
        display: block;
        padding: .85rem .75rem;
        border-radius: .6rem;
        font-size: .72rem;
        font-weight: 600;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: #0f172a;
        transition: background-color .2s ease, color .2s ease;
    }

    .dark .mobile-menu a {
        color: #fff;
    }

    .mobile-menu a:hover,
    .mobile-menu a.nav-active {
        background: rgba(16,185,129,.10);
        color: #10b981 !important;
    }

    /* Les pages individuelles doivent pouvoir défiler naturellement. */
    main.page-main {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }
}

@media (min-width: 1025px) {
    main.page-main {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }
}

@media (max-width: 640px) {
    header > a {
        min-width: 0;
    }

    header > a img {
        height: 2.25rem !important;
    }

    header > a div span:first-child {
        font-size: .68rem;
    }

    header > a div span:last-child {
        font-size: .48rem;
    }

    article.content {
        padding: .25rem;
    }

    .grid {
        width: 100%;
    }

    .modal-wrapper {
        padding: .65rem;
    }

    .modal-content {
        max-height: 88vh;
    }
}


/* =========================================================
   STS CONGO — Identité Construction / BTP
   Couche visuelle additionnelle : structure existante conservée.
   ========================================================= */
:root {
    --sts-orange: #f59e0b;
    --sts-orange-dark: #c96d00;
    --sts-charcoal: #111827;
    --sts-steel: #334155;
    --sts-concrete: #e5e7eb;
    --sts-green: #10b981;
}

body {
    background-image:
        linear-gradient(rgba(245,158,11,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245,158,11,.035) 1px, transparent 1px);
    background-size: 36px 36px;
}

/* Barre supérieure avec une signature plus BTP */
header {
    border-bottom: 1px solid rgba(245,158,11,.18);
}

header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: repeating-linear-gradient(
        135deg,
        var(--sts-orange) 0 10px,
        transparent 10px 20px
    );
    opacity: .85;
    pointer-events: none;
}

/* Bandeaux et titres */
section h2 {
    letter-spacing: -.035em;
    text-wrap: balance;
}

section h2::after {
    content: "";
    display: block;
    width: 54px;
    height: 4px;
    margin-top: .75rem;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--sts-orange), var(--sts-green));
}

/* Cartes : effet acier/béton très léger */
article.content .grid > div,
article.content .rounded-xl {
    position: relative;
    overflow: hidden;
    border-color: rgba(245,158,11,.16) !important;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

article.content .grid > div::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--sts-orange), var(--sts-green));
    opacity: .8;
}

article.content .grid > div::after {
    content: "";
    position: absolute;
    right: -35px;
    top: -35px;
    width: 90px;
    height: 90px;
    border: 1px solid rgba(245,158,11,.16);
    transform: rotate(45deg);
    pointer-events: none;
}

article.content .grid > div:hover {
    transform: translateY(-5px);
    border-color: rgba(245,158,11,.42) !important;
    box-shadow: 0 18px 38px rgba(15,23,42,.12);
}

.dark article.content .grid > div:hover {
    box-shadow: 0 18px 38px rgba(0,0,0,.38);
}

/* Petits éléments de repérage technique */
.text-orange-500,
.text-orange-600,
.text-orange-400 {
    color: var(--sts-orange) !important;
}

.btn-primary:hover,
.btn-secondary:hover {
    border-color: var(--sts-orange);
}

/* Motif discret de chantier dans les zones sans image */
section:not(:has(figure.bg-image)) {
    background-color: #f8fafc;
    background-image:
        linear-gradient(30deg, rgba(15,23,42,.025) 12%, transparent 12.5%, transparent 87%, rgba(15,23,42,.025) 87.5%, rgba(15,23,42,.025)),
        linear-gradient(150deg, rgba(245,158,11,.025) 12%, transparent 12.5%, transparent 87%, rgba(245,158,11,.025) 87.5%, rgba(245,158,11,.025));
    background-size: 34px 60px;
}

.dark section:not(:has(figure.bg-image)) {
    background-color: #09090b;
    background-image:
        linear-gradient(30deg, rgba(255,255,255,.018) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,.018) 87.5%, rgba(255,255,255,.018)),
        linear-gradient(150deg, rgba(245,158,11,.018) 12%, transparent 12.5%, transparent 87%, rgba(245,158,11,.018) 87.5%, rgba(245,158,11,.018));
    background-size: 34px 60px;
}

/* Responsive : aucun texte ne déborde et les cartes restent lisibles */
@media (max-width: 1024px) {
    section {
        min-height: 100dvh;
        height: auto !important;
        overflow: visible;
    }

    article.content {
        opacity: 1 !important;
        transform: none !important;
    }

    article.content .grid {
        grid-template-columns: 1fr;
    }

    article.content .grid > div {
        min-width: 0;
    }

    p, h1, h2, h3, h4, span, a {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 640px) {
    section {
        padding-top: 7rem !important;
        padding-bottom: 3rem !important;
        min-height: 100dvh;
    }

    article.content {
        width: 100%;
        padding: .25rem !important;
    }

    article.content h2 {
        font-size: clamp(1.85rem, 8vw, 2.7rem);
        line-height: 1.05;
    }

    article.content .grid {
        gap: .9rem;
    }

    article.content .grid > div {
        padding: 1.15rem !important;
        border-radius: 14px;
    }

    article.content .grid > div:hover {
        transform: none;
    }

    /* Evite qu'un menu ou une image masque le contenu sur petit écran. */
    figure.bg-image img {
        min-height: 100%;
    }

    .mobile-menu {
        max-height: calc(100dvh - 72px);
        overflow-y: auto;
    }
}

/* Support navigateurs sans :has() */
@supports not selector(section:has(figure.bg-image)) {
    section {
        background-color: #f8fafc;
    }
    .dark section {
        background-color: #09090b;
    }
}
