/* Variables communes : elles centralisent les couleurs utilisées par le site. */
:root { --mdl-blue: #1976d2; --mdl-ink: #171a1e; --mdl-paper: #f5f6f4; --mdl-line: #d8dcdf; }
/* Réinitialisation légère pour obtenir des dimensions prévisibles. */
* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
img, video { display: block; max-width: 100%; height: auto; }
*, *::before, *::after { min-width: 0; }
/* Les ancres internes font défiler la page progressivement. */
html { scroll-behavior: smooth; }
/* Style général du document : fond clair et police de lecture. */
body { margin: 0; color: var(--mdl-ink); background: var(--mdl-paper); font-family: 'Manrope', sans-serif; }
/* Barlow Condensed donne aux titres leur aspect compact et impactant. */
h1, h2, h3 { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; letter-spacing: 0; }
h2 { font-size: clamp(2.6rem, 5vw, 5rem); line-height: .95; max-width: 850px; }
/* Fond sombre semi-transparent pour garder les liens lisibles sur l'image du hero. */
.navbar { padding: 1.1rem 0; background: rgba(23, 26, 30, .9); box-shadow: 0 2px 14px rgba(0,0,0,.18); transition: background .3s ease, box-shadow .3s ease; }
/* Après défilement, la navbar devient presque opaque pour renforcer le contraste. */
.navbar.scrolled { background: rgba(23, 26, 30, .96); }
.brand-logo { width: 120px; height: 50px; object-fit: contain; object-position: left center; filter: brightness(0) invert(1); }
.nav-link { color: rgba(255,255,255,.75); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-contact { border: 1px solid rgba(255,255,255,.45); padding: .65rem 1rem !important; }
/* Hero : l'image occupe la zone d'accueil et le calque améliore la lisibilité du texte. */
.hero-section { min-height: 92vh; display: flex; align-items: center; position: relative; overflow: hidden; color: #fff; background: url('images/BTP1.jpg') center/cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,18,25,.86), rgba(12,18,25,.35) 70%, rgba(12,18,25,.25)); }
.hero-content { position: relative; z-index: 1; padding-top: 5rem; }
.eyebrow { margin-bottom: 1.4rem; font-size: .72rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.blue-text { color: var(--mdl-blue); }
.hero-content h1 { max-width: 800px; font-size: clamp(4rem, 9vw, 9rem); line-height: .82; text-transform: uppercase; }
.hero-content h1 span, .contact-panel h2 span { color: #58a5ef; }
.hero-text { max-width: 550px; margin: 2rem 0; color: rgba(255,255,255,.82); line-height: 1.7; }
.btn { border-radius: 0; text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; font-weight: 700; padding: 1rem 1.25rem; }
.btn-primary { background: var(--mdl-blue); border-color: var(--mdl-blue); }
.btn-primary:hover { background: #0d5eae; border-color: #0d5eae; }
.hero-scroll { position: absolute; right: 3rem; bottom: 2.5rem; z-index: 1; font-size: .65rem; text-transform: uppercase; letter-spacing: .12em; writing-mode: vertical-rl; }
.hero-scroll span { display: inline-block; width: 1px; height: 50px; margin-bottom: 1rem; background: var(--mdl-blue); }
/* Espacement et texte des sections de présentation. */
.section-space { padding: 8rem 0; }
.section-copy { color: #626a72; line-height: 1.8; }
.about-read-more { display: inline-flex; align-items: center; gap: .9rem; margin-top: 1.5rem; padding: .8rem 0; border-bottom: 2px solid var(--mdl-blue); color: var(--mdl-ink); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; transition: color .2s ease, gap .2s ease, border-color .2s ease; }
.about-read-more span { color: var(--mdl-blue); font-size: 1.1rem; line-height: 1; }
.about-read-more:hover { gap: 1.25rem; border-color: var(--mdl-ink); color: var(--mdl-blue); }
.about-modal .modal-content { border: 0; border-radius: 0; background: var(--mdl-paper); color: var(--mdl-ink); }
.about-modal .modal-header { align-items: flex-start; padding: 2rem 2rem 1.25rem; border-bottom: 1px solid var(--mdl-line); }
.about-modal .modal-header h2 { margin: 0; max-width: 620px; font-size: clamp(2.4rem, 5vw, 4.5rem); }
.about-modal .modal-body { padding: 1.5rem 2rem; color: #626a72; line-height: 1.8; }
.about-modal .modal-body p { margin-bottom: 1.25rem; }
.about-modal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 2rem 0; }
.about-modal-grid div { display: flex; flex-direction: column; gap: .6rem; min-height: 100%; padding: 1rem; border-top: 2px solid var(--mdl-blue); background: #fff; }
.about-modal-grid strong { color: var(--mdl-blue); font-family: 'Barlow Condensed', sans-serif; font-size: 1rem; line-height: 1.25; }
.about-modal-grid ul { margin: 0; padding-left: 1rem; color: var(--mdl-ink); font-size: .78rem; line-height: 1.45; }
.about-modal-grid li + li { margin-top: .25rem; }
.about-modal-grid span { color: var(--mdl-ink); font-size: .78rem; line-height: 1.4; }
.about-modal .modal-footer { justify-content: flex-start; padding: 1rem 2rem 2rem; border-top: 0; }
/* Les statistiques sont séparées par une ligne et s'adaptent aux colonnes Bootstrap. */
.stats-row { border-top: 1px solid var(--mdl-line); padding-top: 2rem; }
.stats-row strong, .stats-row span { display: block; }
.stats-row strong { color: var(--mdl-blue); font-family: 'Barlow Condensed'; font-size: 2.5rem; }
.stats-row span { color: #626a72; font-size: .85rem; }
/* Cartes des expertises : la transformation au survol donne un retour visuel. */
.services-section { background: #e6eaec; }
.service-card { min-height: 280px; padding: 1.7rem; display: flex; flex-direction: column; background: var(--mdl-ink); color: #fff; transition: transform .3s ease, background .3s ease; }
.service-card:hover { transform: translateY(-8px); background: var(--mdl-blue); }
.service-card span { color: #6eb2f0; font-family: 'Barlow Condensed'; font-size: 1.25rem; }
.service-card h3 { margin-top: 3.2rem; font-size: 2.2rem; text-transform: uppercase; }
.service-card p { margin: 0; color: rgba(255,255,255,.68); font-size: .82rem; line-height: 1.6; }
.service-card a { margin-top: auto; color: #fff; text-decoration: none; font-size: 1.4rem; align-self: flex-end; }
.partners-section { background: #fff; }
.partners-marquee { overflow: hidden; border-top: 1px solid var(--mdl-line); border-bottom: 1px solid var(--mdl-line); }
.partners-track { display: flex; width: max-content; animation: partners-scroll 24s linear infinite; }
.partner-mark { width: clamp(210px, 22vw, 280px); min-height: 170px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; padding: 1.5rem; border-right: 1px solid var(--mdl-line); background: #fff; transition: background .25s ease, transform .25s ease; }
.partner-mark:hover { position: relative; z-index: 1; transform: translateY(-5px); background: #f1f5f7; }
.partner-mark img { display: block; width: 100%; max-width: 210px; height: 100px; object-fit: contain; filter: none; opacity: .92; transition: opacity .25s ease, transform .25s ease; }
.partner-mark:hover img { opacity: 1; transform: scale(1.04); }
@keyframes partners-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.team-carousel { position: relative; overflow: hidden; background: var(--mdl-ink); }
.team-image { width: 100%; aspect-ratio: 1.1; object-fit: cover; filter: grayscale(100%); }
.team-carousel .carousel-item { position: relative; }
.team-caption { position: absolute; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; padding: 3.5rem 1.5rem 1.25rem; color: #fff; background: linear-gradient(transparent, rgba(23,26,30,.92)); }
.team-caption strong { font-family: 'Barlow Condensed', sans-serif; font-size: 1.6rem; text-transform: uppercase; }
.team-caption span { color: rgba(255,255,255,.75); font-size: .78rem; }
.team-carousel .carousel-indicators { margin-bottom: .75rem; }
.team-carousel .carousel-control-prev, .team-carousel .carousel-control-next { width: 12%; }
.text-link { display: inline-block; margin-top: 2rem; color: var(--mdl-ink); border-bottom: 2px solid var(--mdl-blue); padding-bottom: .6rem; text-decoration: none; font-weight: 700; font-size: .82rem; }
.text-link span { color: var(--mdl-blue); margin-left: 1rem; }

/* Bandeau de contact contrasté pour mettre l'appel à l'action en évidence. */
.contact-section { background: var(--mdl-blue); color: #fff; }
.contact-panel h2 { margin-bottom: 0; }

/* Footer : présentation, liens et coordonnées sur fond sombre. */
/*#footer {
    background: #5c768d;
    
  }*/
.site-footer { background: var(--mdl-ink); color: rgba(255,255,255,.72); }
.footer-top { padding: 5rem 0 3rem; border-bottom: 1px solid rgba(255,255,255,.14); }
.footer-info h3 { margin: 0 0 1.25rem; color: #fff; font-size: 2rem; letter-spacing: .08em; }
.footer-info p, .footer-links address { margin: 0; font-size: .85rem; line-height: 1.8; }
.footer-certification { margin-top: 1rem !important; color: rgba(255,255,255,.52); font-size: .75rem !important; }
.footer-links h4 { margin: 0 0 1.25rem; color: #fff; font-family: 'Barlow Condensed', sans-serif; font-size: 1.45rem; text-transform: uppercase; }
.office-content { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.office-content address { flex: 1; }
.footer-logo { width: 145px; height: auto; max-width: 38%; object-fit: contain; }
.footer-links ul { margin: 0; padding: 0; list-style: none; }
.footer-links li { margin-bottom: .75rem; }
.footer-links a, .footer-links address a { color: rgba(255,255,255,.72); text-decoration: none; transition: color .2s ease; }
.footer-links a:hover, .footer-links address a:hover { color: #58a5ef; }
.social-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.social-links a { padding: .45rem .65rem; border: 1px solid rgba(255,255,255,.28); color: #fff; font-size: .68rem; text-decoration: none; text-transform: uppercase; transition: background .2s ease, border-color .2s ease; }
.social-links a:hover { border-color: var(--mdl-blue); background: var(--mdl-blue); color: #fff; }
.footer-bottom { padding: 1.25rem 0; color: rgba(255,255,255,.5); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }

/* Sur mobile, le logo se place sous les coordonnées et reste entièrement visible. */
@media (max-width: 575px) { .footer-top { padding: 4rem 0 2rem; } .office-content { align-items: flex-start; flex-direction: column; gap: 1.25rem; } .footer-logo { width: 125px; max-width: 100%; } }

/* Sur tablette et mobile, la navigation devient sombre et le repère vertical disparaît. */
@media (max-width: 991px) { .navbar { background: rgba(23,26,30,.95); } .navbar-collapse { padding-top: 1rem; } .nav-contact { display: inline-block; margin-top: .5rem; } .hero-section { min-height: 85vh; } .hero-scroll { display: none; } }

/* Réduction des espacements et du logo sur les très petits écrans. */
@media (max-width: 575px) { .section-space { padding: 5rem 0; } .hero-content h1 { font-size: 4.2rem; } .brand-logo { width: 105px; height: 46px; } }
@media (max-width: 575px) { .about-modal .modal-header, .about-modal .modal-body { padding-right: 1.25rem; padding-left: 1.25rem; } .about-modal .modal-footer { padding-right: 1.25rem; padding-left: 1.25rem; } .about-modal-grid { grid-template-columns: 1fr; } }
@media (max-width: 767px) { .partner-mark { width: 190px; min-height: 125px; padding: 1rem; } .partner-mark img { max-width: 150px; height: 75px; } }
@media (prefers-reduced-motion: reduce) { .partners-track { animation: none; } }

/* Galerie : filtres, cartes, pagination et fenêtre d'affichage des images. */
.gallery-navbar { background: rgba(23,26,30,.96); }
.gallery-hero { position: relative; overflow: hidden; padding: 11rem 0 5rem; background: url('images/head.jpg') center/cover no-repeat; color: #fff; }
.gallery-hero::before { position: absolute; inset: 0; content: ''; background: linear-gradient(90deg, rgba(23,26,30,.88), rgba(23,26,30,.42)); }
.gallery-hero .container { position: relative; z-index: 1; }
.gallery-hero h1 { margin: 0; font-size: clamp(4rem, 10vw, 8rem); line-height: .85; text-transform: uppercase; }
.gallery-hero h1 span { color: #58a5ef; }
.gallery-intro { max-width: 560px; margin: 2rem 0 0; color: rgba(255,255,255,.75); line-height: 1.7; }
.gallery-filters { display: flex; flex-wrap: wrap; gap: .65rem; margin-bottom: 2.5rem; }
.gallery-filter, .gallery-page-button { border: 1px solid var(--mdl-line); padding: .7rem 1rem; background: transparent; color: var(--mdl-ink); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; transition: color .2s ease, background .2s ease, border-color .2s ease; }
.gallery-filter:hover, .gallery-filter.active, .gallery-page-button:hover:not(:disabled) { border-color: var(--mdl-blue); background: var(--mdl-blue); color: #fff; }
.gallery-item { opacity: 0; transform: translateY(20px); transition: opacity .45s ease, transform .45s ease; }
.gallery-item.visible { opacity: 1; transform: translateY(0); }
.gallery-item[hidden] { display: none !important; }
.gallery-card { position: relative; overflow: hidden; min-height: 100%; background: var(--mdl-ink); }
.gallery-img { display: block; width: 100%; height: 280px; object-fit: cover; cursor: pointer; transition: transform .45s ease; }
.gallery-card:hover .gallery-img { transform: scale(1.04); }
.gallery-video-card .gallery-img { cursor: default; }
.gallery-video-card:hover .gallery-img { transform: none; }
.gallery-card-caption { position: absolute; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; padding: 3.5rem 1.25rem 1.1rem; color: #fff; background: linear-gradient(transparent, rgba(23,26,30,.94)); pointer-events: none; }
.gallery-card-caption strong { font-family: 'Barlow Condensed', sans-serif; font-size: 1.55rem; text-transform: uppercase; }
.gallery-card-caption span { color: rgba(255,255,255,.72); font-size: .75rem; }
.gallery-pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 3rem; }
.gallery-page-button:disabled { cursor: not-allowed; opacity: .45; }
#page-num { min-width: 6rem; color: #626a72; font-size: .75rem; text-align: center; }
.gallery-modal-content { overflow: hidden; border: 0; border-radius: 0; background: var(--mdl-ink); color: #fff; }
.gallery-modal-content .modal-header { border-bottom: 1px solid rgba(255,255,255,.15); }
.gallery-modal-content .modal-title { margin: 0; font-family: 'Barlow Condensed', sans-serif; font-size: 1.6rem; text-transform: uppercase; }
.gallery-modal-content .modal-body img { max-height: 78vh; object-fit: contain; background: #111; }

@media (max-width: 575px) { .gallery-hero { padding: 9rem 0 4rem; } .gallery-img { height: 230px; } .gallery-filters { margin-bottom: 2rem; } }