/* =========================================================
   SCMAB — feuille de style du site public
   Palette : charcoal + acier + orange sécurité (clin d'œil
   aux structures rouges/oranges et aux EPI visibles sur les
   photos de chantier fournies par le client).
   Polices : Oswald (titres, esprit industriel) + Inter (texte).
   ========================================================= */

:root {
    --color-dark: #14181d;
    --color-dark-2: #1e242c;
    --color-dark-3: #262d37;
    --color-accent: #e8491d;
    --color-accent-dark: #c53a13;
    --color-steel: #4a5568;
    --color-steel-light: #8a94a6;
    --color-light: #f6f5f2;
    --color-white: #ffffff;
    --color-text: #22262b;
    --color-text-muted: #656d78;
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
    --radius: 10px;
    --shadow-card: 0 10px 30px rgba(20, 24, 29, 0.08);
    --shadow-card-hover: 0 16px 40px rgba(20, 24, 29, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-white);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--color-dark);
    line-height: 1.25;
}

h1 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem; }

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover { color: var(--color-accent-dark); }

img { max-width: 100%; display: block; }

ul { list-style: none; margin: 0; padding: 0; }

.container { max-width: 1180px; }

/* ===== Boutons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.92rem;
    padding: 0.85rem 1.9rem;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
    background: var(--color-dark);
    color: var(--color-white);
}
.btn-primary:hover { background: var(--color-dark-2); color: var(--color-white); }

.btn-accent {
    background: var(--color-accent);
    color: var(--color-white);
    box-shadow: 0 8px 20px rgba(232, 73, 29, 0.35);
}
.btn-accent:hover { background: var(--color-accent-dark); color: var(--color-white); }

.btn-outline-light {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.7);
}
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); color: var(--color-white); }

.btn-outline-primary {
    background: transparent;
    color: var(--color-dark);
    border-color: var(--color-dark);
}
.btn-outline-primary:hover { background: var(--color-dark); color: var(--color-white); }

.btn-full { width: 100%; }

/* ===== Navigation ===== */
nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-white);
    padding: 0.75rem 5%;
    box-shadow: 0 2px 12px rgba(20, 24, 29, 0.08);
}

.nav-brand { display: flex; align-items: center; }
nav .logo { height: 64px; width: auto; }

nav ul {
    display: flex;
    align-items: center;
    gap: 1.9rem;
    margin: 0;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.88rem;
    color: var(--color-dark);
    padding: 0.4rem 0;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.2s ease;
}
.nav-link:hover, .nav-link.active { color: var(--color-accent); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-link-cta {
    background: var(--color-accent);
    color: var(--color-white) !important;
    padding: 0.55rem 1.2rem;
    border-radius: 6px;
}
.nav-link-cta::after { display: none; }
.nav-link-cta:hover { background: var(--color-accent-dark); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--color-dark);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ===== Messages flash ===== */
.flash-message {
    padding: 0.9rem 5%;
    text-align: center;
    animation: flashIn 0.25s ease;
}
.flash-message-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 500;
}
.flash-success { background: #e8f6ee; color: #1b6e3c; }
.flash-error { background: #fdeceb; color: #b3311a; }
.flash-inline { padding: 0.9rem 1.1rem; border-radius: 8px; text-align: left; margin-bottom: 1.2rem; }
.flash-inline .flash-message-inner { align-items: flex-start; }
@keyframes flashIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20,24,29,0.72) 0%, rgba(20,24,29,0.55) 45%, rgba(20,24,29,0.82) 100%);
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 780px;
    text-align: center;
    color: var(--color-white);
    padding: 0 1.5rem;
}
.hero-content h1 { color: var(--color-white); }
.hero-content p { color: rgba(255,255,255,0.88); font-size: 1.1rem; margin-bottom: 1.8rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero-sm { min-height: 46vh; background-attachment: scroll; }
.hero-sm .hero-content p { margin-bottom: 0; }

/* ===== Sections ===== */
.section { padding: 5.5rem 0; }
.section-muted { background: var(--color-light); }
.section-heading { max-width: 680px; margin: 0 auto 3rem; text-align: center; }
.section-heading p { color: var(--color-text-muted); margin-top: 0.6rem; }
.section-eyebrow {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    color: var(--color-accent);
    margin-bottom: 0.6rem;
}
.section-about-teaser p { color: var(--color-text-muted); }
.section-cta { text-align: center; margin-top: 2.8rem; }
.rounded-image { border-radius: var(--radius); box-shadow: var(--shadow-card); }

/* ===== Cartes "pourquoi nous choisir" ===== */
.feature-card {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 2.2rem 1.6rem;
    text-align: center;
    height: 100%;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.feature-card i {
    font-size: 1.8rem;
    color: var(--color-accent);
    width: 66px;
    height: 66px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(232, 73, 29, 0.1);
    border-radius: 50%;
    margin-bottom: 1.1rem;
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 0.6rem; }
.feature-card p { color: var(--color-text-muted); font-size: 0.94rem; margin-bottom: 0; }

/* ===== Cartes services ===== */
.service-card {
    height: 100%;
    padding: 2.2rem 1.8rem;
    border-radius: var(--radius);
    background: var(--color-white);
    border: 1px solid #ececea;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: transparent;
}
.service-card i {
    font-size: 1.6rem;
    color: var(--color-white);
    background: var(--color-dark);
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-bottom: 1.2rem;
}
.service-card:hover i { background: var(--color-accent); }
.service-card h3 { font-size: 1.1rem; margin-bottom: 0.7rem; }
.service-card p { color: var(--color-text-muted); font-size: 0.94rem; margin-bottom: 0; }

/* ===== Bande CTA ===== */
.cta-band {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 6rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cta-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(20, 24, 29, 0.78);
}
.cta-content { position: relative; z-index: 1; max-width: 640px; text-align: center; color: var(--color-white); }
.cta-content h2 { color: var(--color-white); }
.cta-content p { color: rgba(255,255,255,0.85); margin-bottom: 1.6rem; }

/* ===== Bande de chiffres clés (about.php) ===== */
.stats-band { background: var(--color-dark); padding: 3.2rem 0; }
.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--color-accent);
}
.stat-label {
    display: block;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.82rem;
    margin-top: 0.3rem;
}

/* ===== Filtres (réalisations / blog) ===== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 3rem;
}
.filter-pill {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.55rem 1.2rem;
    border-radius: 30px;
    border: 1px solid #dcdad5;
    color: var(--color-text);
    transition: all 0.2s ease;
}
.filter-pill:hover { border-color: var(--color-accent); color: var(--color-accent); }
.filter-pill.active { background: var(--color-dark); border-color: var(--color-dark); color: var(--color-white); }

/* ===== Cartes réalisations ===== */
.realisation-card {
    display: block;
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    scroll-margin-top: 100px;
}
.realisation-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.realisation-card-image { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--color-dark-2); }
.realisation-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.realisation-card:hover .realisation-card-image img { transform: scale(1.06); }
.realisation-badge {
    position: absolute;
    top: 0.9rem;
    left: 0.9rem;
    background: var(--color-accent);
    color: var(--color-white);
    font-size: 0.72rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
}
.realisation-zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 24, 29, 0.35);
    opacity: 0;
    transition: opacity 0.2s ease;
    color: var(--color-white);
    font-size: 1.6rem;
}
.realisation-card:hover .realisation-zoom { opacity: 1; }
.realisation-card-body { padding: 1.4rem 1.5rem 1.6rem; }
.realisation-card-body h3 { font-size: 1.02rem; margin-bottom: 0.5rem; }
.realisation-card-body p { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 0.8rem; }
.realisation-date, .article-date {
    font-size: 0.8rem;
    color: var(--color-steel);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ===== Pagination ===== */
.pagination-bar { display: flex; justify-content: center; gap: 0.5rem; margin-top: 3rem; }
.page-pill {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #dcdad5;
    font-family: var(--font-heading);
    color: var(--color-text);
}
.page-pill:hover { border-color: var(--color-accent); color: var(--color-accent); }
.page-pill.active { background: var(--color-dark); border-color: var(--color-dark); color: var(--color-white); }

/* ===== Lightbox (agrandissement réalisation) ===== */
.lightbox { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 2rem; }
.lightbox.is-open { display: flex; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(15, 18, 22, 0.92); }
.lightbox-content {
    position: relative;
    z-index: 1;
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 900px;
    width: 100%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}
.lightbox-content img { width: 100%; max-height: 55vh; object-fit: cover; }
.lightbox-caption { padding: 1.5rem 1.8rem; overflow-y: auto; }
.lightbox-cat {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}
.lightbox-caption h3 { margin-bottom: 0.6rem; }
.lightbox-caption p { color: var(--color-text-muted); margin-bottom: 0.5rem; }
.lightbox-date { font-size: 0.85rem; color: var(--color-steel); }
.lightbox-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(20, 24, 29, 0.6);
    color: var(--color-white);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

/* ===== Cartes articles / blog ===== */
.article-card {
    display: block;
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.article-card-image { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--color-dark-2); }
.article-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.article-card:hover .article-card-image img { transform: scale(1.06); }
.article-card-body { padding: 1.4rem 1.5rem 1.6rem; }
.article-card-body h3 { font-size: 1.05rem; margin: 0.5rem 0 0.7rem; }
.article-card-body p { color: var(--color-text-muted); font-size: 0.92rem; margin-bottom: 0.9rem; }
.article-readmore { font-family: var(--font-heading); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-accent); }

/* ===== Article (page de lecture) ===== */
.article-header {
    position: relative;
    background-size: cover;
    background-position: center;
    padding: 7rem 1.5rem 3.5rem;
    display: flex;
    align-items: flex-end;
}
.article-header::before { content: ''; position: absolute; inset: 0; background: rgba(20, 24, 29, 0.68); }
.article-header-overlay { position: relative; z-index: 1; max-width: 780px; margin: 0 auto; text-align: center; width: 100%; }
.article-header-overlay h1 { color: var(--color-white); margin: 0.8rem 0; }
.article-meta { display: flex; gap: 1.4rem; justify-content: center; color: rgba(255,255,255,0.85); font-size: 0.88rem; }
.article-body {
    max-width: 760px;
    margin: 3.5rem auto 2rem;
    font-size: 1.05rem;
    color: var(--color-text);
}
.article-body h3 { text-transform: none; font-size: 1.3rem; margin: 1.8rem 0 0.8rem; }
.article-body p { margin-bottom: 1.1rem; }
.article-body ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1.1rem; }
.article-body li { margin-bottom: 0.4rem; }
.article-share { max-width: 760px; margin: 0 auto 2rem; display: flex; align-items: center; gap: 0.9rem; }
.article-share span { font-family: var(--font-heading); text-transform: uppercase; font-size: 0.82rem; color: var(--color-text-muted); }
.article-share a {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--color-light); color: var(--color-dark);
    display: inline-flex; align-items: center; justify-content: center;
}
.article-share a:hover { background: var(--color-accent); color: var(--color-white); }
.article-back { max-width: 760px; margin: 0 auto 4rem; }

/* ===== Contact ===== */
.contact-info-list { margin-top: 2rem; }
.contact-info-list li { display: flex; gap: 1rem; margin-bottom: 1.6rem; align-items: flex-start; }
.contact-info-list i {
    width: 46px; height: 46px; flex-shrink: 0;
    background: var(--color-light); color: var(--color-accent);
    border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}
.contact-info-list strong { display: block; font-family: var(--font-heading); text-transform: uppercase; font-size: 0.82rem; letter-spacing: 0.03em; margin-bottom: 0.2rem; }
.contact-form-card { background: var(--color-light); border-radius: var(--radius); padding: 2.2rem; }
.form-label { font-family: var(--font-heading); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.4rem; }
.form-control {
    border: 1px solid #dcdad5;
    border-radius: 6px;
    padding: 0.7rem 0.9rem;
    font-family: var(--font-body);
}
.form-control:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(232, 73, 29, 0.15); }

/* ===== Footer ===== */
footer { background: var(--color-dark); color: rgba(255,255,255,0.75); padding: 4.5rem 0 1.6rem; }
.footer-logo { height: 60px; filter: brightness(0) invert(1); margin-bottom: 1rem; }
.footer-col h3 { color: var(--color-white); font-size: 0.95rem; margin-bottom: 1.1rem; }
.footer-col ul li { margin-bottom: 0.7rem; }
.footer-col a { color: rgba(255,255,255,0.75); font-size: 0.92rem; }
.footer-col a:hover { color: var(--color-accent); }
.footer-col i { width: 18px; color: var(--color-accent); margin-right: 0.4rem; }
.footer-bottom {
    margin-top: 3rem;
    padding-top: 1.6rem;
    border-top: 1px solid rgba(255,255,255,0.12);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-size: 0.82rem;
}
.footer-bottom a { color: var(--color-accent); }

/* ===== Boutons flottants ===== */
.whatsapp-float, .back-to-top {
    position: fixed;
    right: 1.6rem;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 1.5rem;
    box-shadow: 0 8px 22px rgba(20, 24, 29, 0.3);
    z-index: 900;
    transition: transform 0.15s ease;
}
.whatsapp-float:hover, .back-to-top:hover { transform: translateY(-3px); color: var(--color-white); }
.whatsapp-float { bottom: 5.6rem; background: #25d366; }
.back-to-top {
    bottom: 1.6rem;
    background: var(--color-dark);
    font-size: 1.1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.15s ease;
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; }

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .nav-toggle { display: flex; }
    nav ul {
        position: fixed;
        top: 74px;
        left: 0;
        right: 0;
        background: var(--color-white);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 0.5rem 5% 1.2rem;
        box-shadow: 0 10px 20px rgba(20,24,29,0.08);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.2s ease;
    }
    nav ul.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
    nav ul li { width: 100%; padding: 0.6rem 0; border-bottom: 1px solid #f0efec; }
    nav ul li:last-child { border-bottom: none; }
    .nav-link-cta { display: inline-flex; margin-top: 0.5rem; }
    .order-lg-1, .order-lg-2 { order: 0 !important; }
}

@media (max-width: 767px) {
    .section { padding: 3.6rem 0; }
    .hero { min-height: 80vh; background-attachment: scroll; }
    .cta-band { background-attachment: scroll; padding: 4rem 1.2rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .whatsapp-float, .back-to-top { width: 48px; height: 48px; right: 1.1rem; font-size: 1.3rem; }
    .whatsapp-float { bottom: 4.8rem; }
    .back-to-top { bottom: 1.1rem; }
}