/* ===================================================
   MARS Construction - Custom CSS
   Fonts: Archivo, JetBrains Mono
   Color palette from original Lovable build
   =================================================== */

/* ---------- Polices hébergées localement (aucun appel à Google) ---------- */
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url('fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url('fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/jetbrains-mono-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/jetbrains-mono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- CSS Variables ---------- */
:root {
  --background: #f7f7f7;
  --foreground: #1a1a1a;
  --card: #ffffff;
  --card-foreground: #1c1c2e;
  --primary: #c43d1a;
  --primary-foreground: #fefefe;
  --secondary: #efefef;
  --secondary-foreground: #1c1c2e;
  --muted: #efefef;
  --muted-foreground: #6e6e6e;
  --accent: #f5ece6;
  --accent-foreground: #8b3410;
  --border: #dedede;
  --ring: var(--primary);
  --ink: #282828;
  --ink-foreground: #fefefe;
  --ink-muted: #b8b8b8;
  --ink-line: rgba(255,255,255,.1);
  --radius: 0;
  --font-sans: 'Archivo', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--foreground);
  background: var(--background);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }
button { font: inherit; border: none; background: none; cursor: pointer; }
h1,h2,h3,h4,h5,h6 { font-weight: 500; }

/* Global Selection & Focus States */
::selection {
  background: var(--primary);
  color: #ffffff;
}
::-moz-selection {
  background: var(--primary);
  color: #ffffff;
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---------- Container ---------- */
.container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 768px) {
  .container { padding: 0 2rem; }
}

/* ---------- Utility ---------- */
.text-muted { color: var(--muted-foreground); }
.text-primary { color: var(--primary); }
.relative { position: relative; }
.z-10 { z-index: 10; }
.shadow-lift { box-shadow: 0 20px 40px -18px rgba(0,0,0,.25); }
.text-white { color: #fff; }
.text-ink-muted { color: var(--ink-muted); }
.text-lg { font-size: 1.125rem; line-height: 1.625; }
.mt-4 { margin-top: 1rem; }
.mt-7 { margin-top: 1.75rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.4;
}
.eyebrow-primary { color: var(--primary); display: flex; align-items: center; gap: .75rem; }
.eyebrow-line { display: inline-block; height: 1px; width: 2rem; background: var(--primary); }
.eyebrow-muted { color: var(--ink-muted); }

/* ---------- Links ---------- */
.link-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--primary); font-size: .875rem; font-weight: 500;
  margin-top: 1.75rem; transition: opacity .2s;
}
.link-primary:hover { text-decoration: underline; }
.link-ghost {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--ink-foreground); font-size: .875rem; font-weight: 500;
  transition: opacity .2s;
}
.link-ghost:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .875rem; font-weight: 500;
  white-space: nowrap; cursor: pointer;
  transition: background .2s, color .2s, transform .1s;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary); color: var(--primary-foreground);
  padding: .5rem 1.5rem; height: 3.5rem;
}
.btn-primary:hover { background: #a8320f; }
.btn:active { transform: translateY(1px); }
.btn-lg { height: 3.5rem; padding: 0 1.5rem; }
.btn-xl { height: 4rem; padding: 0 1.75rem; flex-shrink: 0; }
.btn-ghost { color: var(--ink-foreground); padding: .5rem 0; height: 3rem; }
.btn-ghost:hover { text-decoration: underline; }
.btn-white {
  background: var(--background); color: var(--foreground);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.btn-white:hover { background: var(--secondary); }

/* =====================================================
   HEADER
   ===================================================== */
.site-header {
  position: sticky; top: 0; left: 0; right: 0;
  z-index: 50; background: var(--background);
  transition: all .3s;
}
.site-header.scrolled {
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.header-inner {
  max-width: 80rem; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.25rem; height: 5rem;
}
@media (min-width: 768px) {
  .header-inner { height: 6rem; padding: 0 2rem; }
}

.site-logo {
  height: 3.5rem;
  width: auto;
  display: block;
}
@media (min-width: 768px) {
  .site-logo {
    height: 4rem;
  }
}
.site-logo-footer {
  height: 3rem;
  width: auto;
}

/* Nav */
.main-nav { display: none; align-items: center; gap: .25rem; }
@media (min-width: 1024px) { .main-nav { display: flex; } }
.nav-link {
  padding: .5rem 1rem; font-size: .875rem; font-weight: 500;
  color: var(--muted-foreground); transition: color .2s;
}
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-cta {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--primary); color: var(--primary-foreground);
  padding: 0 1.25rem; height: 3rem;
  font-size: .875rem; font-weight: 500; margin-left: 1.5rem;
}
.nav-cta { transition: background .2s; }
.nav-cta:hover { background: #a8320f; }

/* Menu toggle */
.menu-toggle { color: var(--foreground); }
@media (min-width: 1024px) { .menu-toggle { display: none; } }

/* Mobile menu */
.mobile-menu {
  display: none; flex-direction: column; padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid var(--border); background: var(--background);
}
.mobile-menu.open { display: flex; }
@media (min-width: 1024px) { .mobile-menu { display: none !important; } }
.mobile-nav-link {
  padding: .75rem 0; font-size: 1rem; font-weight: 500;
  color: var(--muted-foreground); border-bottom: 1px solid var(--border);
}
.mobile-nav-link.active { color: var(--primary); }
.mobile-nav-link.cta {
  margin-top: 1rem; background: var(--primary); color: #fff;
  text-align: center; padding: 1rem; border: none;
}

/* =====================================================
   HERO
   ===================================================== */
.hero {
  position: relative; display: flex; align-items: center;
  overflow: hidden; background: var(--ink); color: var(--ink-foreground);
  min-height: 90vh;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  animation: hero-zoom 14s ease-out both;
}
@keyframes hero-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.72) 0%, rgba(0,0,0,.35) 100%);
}
.hero-content {
  position: relative; max-width: 80rem;
  width: 100%; margin: 0 auto;
  padding: 4rem 1.25rem;
}
@media (min-width: 768px) {
  .hero-content { padding: 5rem 2rem; }
}
.hero-title {
  margin-top: 2rem; max-width: 48rem;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 500; line-height: 1.05;
}
.dot { color: var(--primary); }
.hero-subtitle {
  margin-top: 1.75rem; max-width: 28rem;
  font-size: 1.125rem; line-height: 1.625;
  color: rgba(255,255,255,.75);
}
@media (min-width: 768px) {
  .hero-subtitle { font-size: 1.25rem; }
}
.hero-actions {
  margin-top: 2.25rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem;
}
@media (min-width: 768px) { .hero-actions { gap: 2rem; } }
.hero-location {
  margin-top: 3rem; display: flex; align-items: center; gap: .5rem;
  font-size: .75rem; color: rgba(255,255,255,.55);
}
@media (min-width: 768px) { .hero-location { margin-top: 5rem; } }
.hero-featured {
  display: none; position: absolute; bottom: 2rem; right: 2rem;
  align-items: center; gap: 1.5rem;
  border-top: 1px solid var(--ink-line); padding-top: 1rem;
  font-size: .875rem; color: var(--ink-foreground);
}
@media (min-width: 1024px) { .hero-featured { display: flex; } }
.hero-featured-title { margin-top: .5rem; }

/* =====================================================
   TAGLINE BAR
   ===================================================== */
.tagline-bar {
  border-bottom: 1px solid var(--border); background: var(--background);
  max-width: 80rem; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.75rem 1.25rem; gap: 1.25rem;
}
@media (min-width: 768px) { .tagline-bar { padding: 1.75rem 2rem; } }
.tagline-bar p { font-size: .875rem; font-weight: 500; }
.scroll-down {
  display: flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; flex-shrink: 0;
  border: 1px solid var(--border);
}

/* =====================================================
   SECTIONS
   ===================================================== */
.section { padding: 5rem 0; }
@media (min-width: 768px) { .section { padding: 7rem 0; } }
.section-title {
  margin-top: 1.5rem; max-width: 48rem;
  font-size: 1.875rem; font-weight: 500; line-height: 1.12;
}
@media (min-width: 768px) {
  .section-title { font-size: 3rem; }
}

/* =====================================================
   ENTREPRISE
   ===================================================== */
.grid-2 { display: grid; gap: 2.5rem; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; gap: 5rem; } }
.entreprise-desc { padding-top: 0; }
@media (min-width: 768px) { .entreprise-desc { padding-top: 2.5rem; } }

/* Stats */
.stats {
  margin-top: 4rem; display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 2rem 0;
}
@media (min-width: 768px) {
  .stats { margin-top: 5rem; padding: 2.5rem 0; }
}
.stat { padding: 0 .75rem; border-right: 1px solid var(--border); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: none; }
@media (min-width: 768px) { .stat { padding: 0 2.5rem; } }
.stat-value {
  font-size: 1.875rem; font-weight: 500; overflow-wrap: anywhere;
}
@media (min-width: 768px) { .stat-value { font-size: 3.75rem; } }
.stat-unit {
  margin-left: .25rem; font-size: 1.125rem;
  color: var(--primary);
}
@media (min-width: 768px) { .stat-unit { font-size: 1.875rem; } }
.stat-label {
  margin-top: .75rem; font-size: .75rem; line-height: 1.625;
  color: var(--muted-foreground); max-width: 10rem;
}
@media (min-width: 768px) { .stat-label { font-size: .875rem; } }

/* =====================================================
   RÉALISATIONS SUR PAGE D'ACCUEIL
   ===================================================== */
.realisations-section { background: var(--secondary); }
.section-header {
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 1.75rem;
}
@media (min-width: 768px) {
  .section-header { flex-direction: row; align-items: flex-end; }
}
.projects-grid {
  margin-top: 3rem; display: grid; gap: 2.5rem;
}
@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: 7fr 5fr;
    gap: 2.5rem;
  }
}
.project-card {}
.project-link { display: block; }
.project-image-wrapper {
  position: relative; overflow: hidden; background: var(--muted);
}
.project-img {
  width: 100%; object-fit: cover;
  transition: transform .7s ease;
  aspect-ratio: 4/3;
}
.project-link:hover .project-img { transform: scale(1.05); }
.project-arrow {
  position: absolute; top: 1rem; right: 1rem;
  display: flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem;
  background: var(--background); color: var(--foreground);
  transition: background .2s, color .2s;
}
.project-link:hover .project-arrow {
  background: var(--primary); color: #fff;
}
.project-info {
  border-bottom: 1px solid var(--border); padding: 1.5rem 0;
  color: var(--foreground);
}
.project-name {
  margin-top: .75rem; font-size: 1.5rem; font-weight: 500;
  transition: color .2s;
}
@media (min-width: 768px) { .project-name { font-size: 1.875rem; } }
.project-link:hover .project-name { color: var(--primary); }
.project-category {
  margin-top: .5rem; font-size: .875rem; color: var(--muted-foreground);
}
.project-offset { padding-top: 0; }
@media (min-width: 768px) { .project-offset { padding-top: 5rem; } }

/* =====================================================
   EXPERTISES
   ===================================================== */
.expertises {
  background: var(--ink); color: var(--ink-foreground);
}
.expertises-grid { display: grid; gap: 3.5rem; }
@media (min-width: 768px) {
  .expertises-grid { grid-template-columns: 4fr 8fr; }
}
.service-row {
  display: grid; grid-template-columns: 28px 1fr 32px;
  align-items: flex-start; gap: 1rem;
  border-top: 1px solid var(--ink-line); padding: 1.75rem 0;
  text-decoration: none; color: var(--ink-foreground);
  transition: opacity .2s;
}
.service-row:last-child { border-bottom: 1px solid var(--ink-line); }
@media (min-width: 768px) {
  .service-row { grid-template-columns: 44px 1fr 44px; }
}
.service-row:hover { opacity: .85; }
.service-num {
  font-family: var(--font-mono); font-size: .75rem;
  color: var(--ink-muted);
}
.service-name {
  font-size: 1.25rem; font-weight: 500; line-height: 1.375;
}
@media (min-width: 768px) { .service-name { font-size: 1.5rem; } }
.service-desc {
  margin-top: .75rem; max-width: 36rem;
  font-size: .875rem; line-height: 1.625;
  color: var(--ink-muted);
}
.service-arrow-box {
  display: flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem;
  border: 1px solid var(--ink-line);
}
@media (min-width: 768px) {
  .service-arrow-box { width: 2.75rem; height: 2.75rem; }
}
.service-row:hover .service-arrow-box svg { transform: translate(2px, -2px); }
.service-arrow-box svg { transition: transform .2s; }

/* =====================================================
   TRUST & PARTNERS
   ===================================================== */
.trust-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 768px) {
  .trust-grid { grid-template-columns: 7fr 5fr; gap: 4rem; }
}
.trust-image img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
}

.partners-section { border-top: 1px solid var(--border); background: var(--card); }
.partners-header { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 768px) {
  .partners-header { flex-direction: row; align-items: center; justify-content: space-between; }
}
.partners-title { font-size: 1.5rem; font-weight: 500; }
@media (min-width: 768px) { .partners-title { font-size: 1.875rem; } }
.partners-grid {
  margin-top: 2.5rem;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem;
  align-items: center;
}
@media (min-width: 768px) {
  .partners-grid { grid-template-columns: repeat(5, 1fr); gap: 2rem; }
}
.partner-card {
  display: flex; align-items: center; justify-content: center;
  height: 7rem; border-bottom: 1px solid var(--border); padding: 1.25rem;
}
.partner-card img {
  max-height: 4rem; width: auto; max-width: 100%;
  object-fit: contain; transition: transform .3s;
}
.partner-card:hover img { transform: scale(1.05); }

/* =====================================================
   CTA
   ===================================================== */
.cta-section {
  overflow: hidden; border-top: 1px solid var(--border);
  background: var(--primary); color: var(--primary-foreground);
}
.cta-inner {
  display: flex; flex-direction: column; align-items: flex-start;
  justify-content: space-between; gap: 2.5rem;
  padding: 5rem 0;
}
@media (min-width: 768px) {
  .cta-inner {
    flex-direction: row; align-items: center; padding: 7rem 0;
  }
}
.cta-title {
  max-width: 42rem;
  font-size: 2.25rem; font-weight: 500; line-height: 1.08;
}
@media (min-width: 768px) { .cta-title { font-size: 3.75rem; } }
.cta-subtitle { margin-top: 1.5rem; font-size: 1rem; }

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
  background: var(--ink); color: var(--ink-foreground);
}
.footer-divider { height: 1px; background: var(--ink-line); }
.footer-grid {
  display: grid; gap: 3rem; padding: 4rem 0;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 4fr 2fr 3fr 3fr; }
}
.footer-desc {
  margin-top: 1.5rem; max-width: 24rem;
  font-size: .875rem; line-height: 1.625;
  color: var(--ink-muted);
}
.footer-legal {
  margin-top: 1.5rem; color: var(--ink-muted);
}
.footer-links ul { display: flex; flex-direction: column; gap: .5rem; }
.footer-links a {
  font-size: .875rem; color: var(--ink-muted); transition: color .2s;
}
.footer-links a:hover { color: var(--ink-foreground); }
.footer-contact ul { display: flex; flex-direction: column; gap: .75rem; }
.footer-contact-item {
  display: flex; gap: .75rem; font-size: .875rem;
  color: var(--ink-muted); transition: color .2s;
  word-break: break-all;
}
.footer-contact a:hover { color: var(--ink-foreground); }
.icon-primary { color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.footer-bottom { border-top: 1px solid var(--ink-line); }
.footer-bottom-inner {
  display: flex; flex-direction: column; justify-content: space-between;
  gap: .5rem; padding: 1.5rem 1.25rem;
  font-size: .75rem; color: var(--ink-muted);
}
@media (min-width: 768px) {
  .footer-bottom-inner { flex-direction: row; padding: 1.5rem 2rem; }
}

.whatsapp-fab {
  position: fixed; bottom: 1.25rem; right: 1.25rem;
  z-index: 40; display: grid; place-items: center;
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: var(--primary); color: var(--primary-foreground);
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  transition: transform .2s;
}
.whatsapp-fab:hover { transform: scale(1.05); }

.page-hero {
  padding: 5rem 0 3.5rem;
  background: var(--background);
}
@media (min-width: 768px) {
  .page-hero {
    padding: 6rem 0 4rem;
  }
}

/* =====================================================
   PAGE HERO BANNER AVEC PHOTO
   ===================================================== */
.page-hero-banner {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--ink-foreground);
  padding: 5rem 0 4rem;
}
@media (min-width: 768px) {
  .page-hero-banner {
    padding: 7rem 0 5rem;
  }
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.45;
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 20, 25, 0.95) 0%, rgba(20, 20, 25, 0.5) 100%);
}
.page-hero-banner .container {
  position: relative;
  z-index: 10;
}
.page-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 500;
  line-height: 1.1;
  margin-top: 1rem;
}
.page-subtitle {
  font-size: 1.125rem;
  margin-top: 0.75rem;
  max-width: 36rem;
}

/* =====================================================
   PAGE RÉALISATIONS (PREMIÈRE PAGE) - DESIGN SOIGNÉ
   ===================================================== */
.portfolio-section-main {
  background: #fbfbfb;
  padding: 5rem 0 7rem;
}

.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}
.filter-btn {
  padding: 0.45rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.filter-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.8;
  margin-left: 0.35rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
}
@media (min-width: 860px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem 3rem;
  }
}

.portfolio-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #ffffff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #15161a;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-card:hover .card-img {
  transform: scale(1.05);
}

.card-overlay {
  position: absolute;
  inset: 0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, transparent 40%, rgba(0, 0, 0, 0.6) 100%);
}

.card-badge {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  color: var(--foreground);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
}

.card-view-btn {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.6rem 1.15rem;
  border-radius: 4px;
  transform: translateY(8px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-card:hover .card-view-btn {
  transform: translateY(0);
  opacity: 1;
}

.card-content {
  padding: 1.75rem 2rem 2rem;
  display: flex;
  flex-direction: column;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.card-location {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

.card-spec {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(196, 61, 26, 0.08);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
}

.card-title {
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.25;
  transition: color 0.2s ease;
}

.portfolio-card:hover .card-title {
  color: var(--primary);
}

.card-desc {
  font-size: 0.95rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  margin-top: 0.6rem;
  font-weight: 400;
}

/* =====================================================
   PAGES PROJETS DÉTAILLÉES (SANS CHEVAUCHEMENT)
   ===================================================== */
.project-hero-clean {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #ffffff;
  padding: 6rem 0 4rem;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
}

.project-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.project-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 17, 21, 0.95) 0%, rgba(15, 17, 21, 0.7) 60%, rgba(15, 17, 21, 0.4) 100%);
}

.project-hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
}

.back-to-portfolio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease;
  margin-bottom: 1.5rem;
}

.back-to-portfolio:hover {
  color: #ffffff;
}

.project-detail-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  color: #ffffff;
  margin-top: 0.5rem;
}

.project-body-section {
  padding: 5rem 0 3rem;
  background: var(--background);
}

.project-body-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .project-body-grid {
    grid-template-columns: 360px 1fr;
    gap: 4.5rem;
    align-items: flex-start;
  }
}

.project-specs-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.specs-list {
  display: flex;
  flex-direction: column;
}

.specs-list .bg-card {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.specs-list .bg-card:last-child {
  border-bottom: none;
}

.specs-list dt {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
}

.specs-list dd {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--foreground);
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-text-content {
  display: flex;
  flex-direction: column;
}

.project-text-content > p {
  font-size: 1.35rem;
  line-height: 1.7;
  color: #2b2c30;
  border-left: 3px solid var(--primary);
  padding-left: 1.5rem;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

ol.mt-4 {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--border);
}

ol.mt-4 li {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.15rem 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.05rem;
  font-weight: 500;
  color: #333336;
  transition: padding-left 0.2s ease, background 0.2s ease;
}

ol.mt-4 li:hover {
  padding-left: 1rem;
  background: rgba(196, 61, 26, 0.03);
}

ol.mt-4 li span.font-mono {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(196, 61, 26, 0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
}

.project-gallery-section {
  padding: 3rem 0 6rem;
  border-top: 1px solid var(--border);
  background: var(--background);
}

.gallery-title {
  font-size: 1.75rem; font-weight: 500; line-height: 1.2;
  margin-bottom: 2rem;
}
.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}
@media (min-width: 768px) {
  .project-gallery { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}
.gallery-item {
  position: relative; overflow: hidden;
  aspect-ratio: 1; background: #15161a;
  cursor: zoom-in;
}
.gallery-item-featured { grid-column: span 2; grid-row: span 2; }
.gallery-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s cubic-bezier(.16,1,.3,1);
}
.gallery-item::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(0,0,0,0); transition: background .3s;
}
.gallery-item:hover .gallery-img { transform: scale(1.05); }
.gallery-item:hover::after { background: rgba(0,0,0,.12); }

/* Projet suivant */
.next-project {
  display: block; border-top: 1px solid var(--border);
  background: var(--card); color: var(--foreground);
}
.next-project-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-top: 3rem; padding-bottom: 3rem;
}
.next-project-title {
  margin-top: .5rem; font-size: 1.5rem; font-weight: 600; line-height: 1.2;
  transition: color .2s;
}
@media (min-width: 768px) { .next-project-title { font-size: 2.25rem; } }
.next-project-arrow {
  width: 2rem; height: 2rem; flex-shrink: 0; color: var(--primary);
  transition: transform .3s;
}
.next-project:hover .next-project-title { color: var(--primary); }
.next-project:hover .next-project-arrow { transform: translateX(.5rem); }
.spec-icon { width: 1rem; height: 1rem; color: var(--primary); flex-shrink: 0; }

/* =====================================================
   PAGE SERVICES (DÉTAILS DES 6 PÔLES)
   ===================================================== */
.service-section {
  padding: 5rem 0;
}
.service-detail-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .service-detail-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
  .service-detail-grid.service-reversed .service-detail-media {
    order: 2;
  }
}
.service-detail-media {
  overflow: hidden;
  background: var(--muted);
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15);
}
.service-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.service-detail-media:hover .service-img {
  transform: scale(1.03);
}
.service-detail-num {
  font-family: var(--font-sans);
  font-size: 2.25rem;
  color: var(--border);
  font-weight: 700;
  line-height: 1;
  display: block;
  letter-spacing: -0.02em;
}
.service-detail-header .eyebrow {
  margin-top: 0.5rem;
}
.service-detail-header .section-title {
  margin-top: 0.75rem;
  font-family: var(--font-sans);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.25;
}
@media (min-width: 768px) {
  .service-detail-header .section-title {
    font-size: 2.25rem;
  }
}
.service-detail-header .text-muted {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.6;
}
.service-divider {
  height: 1px;
  background: var(--border);
  max-width: 80rem;
  margin: 0 auto;
}
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--foreground);
}

/* =====================================================
   PAGE À PROPOS (ENGAGEMENTS & BUREAUX)
   ===================================================== */
.engagements-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .engagements-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}
.engagement-card {
  background: var(--card);
  padding: 2.5rem;
  border: 1px solid var(--border);
}
.engagement-title {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.offices-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  margin-top: 2.5rem;
}
@media (min-width: 768px) {
  .offices-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.office-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ink-line);
}
.office-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.office-caption {
  padding: 1rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.team-media {
  overflow: hidden;
}
.team-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.align-center {
  align-items: center;
}

/* =====================================================
   PAGE CONTACT (FORMULAIRE & INFOS)
   ===================================================== */
.contact-layout {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .contact-layout {
    grid-template-columns: 7fr 5fr;
    gap: 4rem;
  }
}
.contact-form-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2rem;
}
@media (min-width: 768px) {
  .contact-form-card { padding: 3rem; }
}
.form-group-type {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  cursor: pointer;
}
.form-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus {
  border-color: var(--primary);
}
.form-select {
  appearance: none;
  cursor: pointer;
}
.form-textarea {
  resize: vertical;
}
.btn-full {
  width: 100%;
  justify-content: center;
}
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.contact-box {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2rem;
}
.contact-box-title {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0.75rem 0 1.25rem;
}
.contact-box-desc {
  font-size: 0.95rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  margin-top: 0.75rem;
}
.contact-box-actions {
  display: flex;
  gap: 1rem;
}
.btn-subtle {
  display: inline-flex;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--foreground);
  transition: all 0.2s;
}
.btn-subtle:hover {
  background: var(--foreground);
  color: var(--background);
}

/* ---------- Lightbox & Visionneuse de Projet ---------- */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(8, 8, 12, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  user-select: none;
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  pointer-events: none;
}

.lightbox-counter {
  font-family: var(--font-mono, monospace);
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  letter-spacing: 0.05em;
  pointer-events: auto;
}

.lightbox-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.lightbox-close:hover {
  background: var(--primary, #c43d1a);
  border-color: var(--primary, #c43d1a);
  transform: scale(1.08);
}

.lightbox-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 85vh;
  z-index: 10;
  padding: 1rem;
}

.lightbox-img-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 78vh;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lightbox-caption {
  margin-top: 1rem;
  color: #e2e8f0;
  font-size: 0.95rem;
  text-align: center;
  max-width: 800px;
  line-height: 1.4;
  font-weight: 500;
  min-height: 1.4em;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-nav-btn:hover {
  background: var(--primary, #c43d1a);
  border-color: var(--primary, #c43d1a);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 10px 25px rgba(196, 61, 26, 0.4);
}

.lightbox-nav-prev {
  left: 1.75rem;
}

.lightbox-nav-next {
  right: 1.75rem;
}

@media (max-width: 768px) {
  .lightbox-nav-btn {
    width: 2.75rem;
    height: 2.75rem;
  }
  .lightbox-nav-prev {
    left: 0.75rem;
  }
  .lightbox-nav-next {
    right: 0.75rem;
  }
  .lightbox-header {
    padding: 1rem;
  }
  .lightbox-img,
  .lightbox-img-wrapper {
    max-height: 70vh;
  }
  .lightbox-caption {
    font-size: 0.85rem;
    padding: 0 0.5rem;
  }
}

/* =====================================================
   ANIMATIONS D'APPARITION & ACCESSIBILITÉ
   ===================================================== */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}
.reveal.visible { opacity: 1; transform: none; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--primary); color: #fff; padding: .75rem 1.25rem;
  font-size: .875rem; font-weight: 500; transition: top .2s;
}
.skip-link:focus { top: 1rem; }

.form-input:invalid:not(:placeholder-shown) { border-color: #d14343; }
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236e6e6e' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
  padding-right: 2.75rem;
}
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
input[type="radio"] { accent-color: var(--primary); }

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

/* =====================================================
   PAGES LÉGALES, CONSENTEMENT & 404
   ===================================================== */
.legal-section { padding-top: 1rem; }
.legal-content { max-width: 48rem; }
.legal-content h2 {
  margin-top: 2.75rem; margin-bottom: .75rem;
  font-size: 1.25rem; font-weight: 600;
}
.legal-content p, .legal-content li {
  font-size: 1rem; line-height: 1.75; color: #3a3a3a;
}
.legal-content p + p { margin-top: .75rem; }
.legal-content ul { list-style: disc; padding-left: 1.25rem; margin: .75rem 0; }
.legal-content li + li { margin-top: .35rem; }
.legal-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.legal-updated { font-size: .875rem !important; color: var(--muted-foreground) !important; }
.todo { background: #fff3c4; color: #7a5600; padding: 0 .3rem; font-weight: 600; }

.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-consent {
  margin: .5rem 0 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.consent-label {
  display: flex; align-items: flex-start; gap: .75rem;
  font-size: .9rem; line-height: 1.5; cursor: pointer;
}
.consent-label input {
  margin-top: .2rem; width: 1.05rem; height: 1.05rem; flex-shrink: 0;
  accent-color: var(--primary);
}
.form-notice {
  margin-top: .85rem; font-size: .8rem; line-height: 1.6;
  color: var(--muted-foreground);
}
.form-notice a { color: var(--primary); text-decoration: underline; }

.footer-legal-links { display: inline-flex; gap: .4rem; }
@media (min-width: 768px) { .footer-legal-links { margin-left: 1.5rem; } }
.footer-legal-links a { color: var(--ink-muted); transition: color .2s; }
.footer-legal-links a:hover { color: var(--ink-foreground); }
.footer-bottom-inner > span:first-child { display: flex; flex-wrap: wrap; gap: .4rem; }

.not-found { min-height: 60vh; display: flex; align-items: center; }
