/* ==========================================================================
   JDG Entrepreneur général inc. — v2
   Palette claire et professionnelle, accents rouge/bleu du logo,
   photographie de chantiers réels, interactions et transitions 3D.
   ========================================================================== */

:root {
  /* Palette noir et jaune, dans le ton du site jdginc.ca — noir dominant, jaune chantier en accent */
  --paper: #f7f6f2;
  --surface: #ffffff;
  --surface-alt: #efeeea;
  --ink: #17140f;
  --ink-soft: #5c584e;
  --line: #e2e0d8;
  --navy: #131210;
  --navy-2: #1d1b17;
  --red: #16140e;
  --red-dark: #0a0906;
  --blue: #f0b429;
  --blue-dark: #c98f12;
  --blue-soft: #fbf1d4;
  --white: #ffffff;
  --shadow: 0 18px 40px -20px rgba(19, 18, 16, 0.28);
  --shadow-lg: 0 30px 70px -24px rgba(19, 18, 16, 0.35);
  --radius: 14px;
  --container: 1180px;
  --font-head: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --ease-3d: cubic-bezier(.22,.9,.32,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

svg.icon {
  width: 1em; height: 1em;
  display: inline-block;
  vertical-align: -0.15em;
  fill: none;
  stroke: currentColor;
  flex-shrink: 0;
}

body {
  position: relative;
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
/* Fond général du site : photo de ville, fixe derrière tout le contenu,
   adoucie d'un voile clair pour garder le texte lisible partout */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(247,246,242,.82), rgba(247,246,242,.82)),
    url('../images/bg-ville-fond.jpg') center / cover no-repeat;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.18;
  text-wrap: balance;
  margin: 0 0 0.6em;
}

p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--surface-alt); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--red); border-radius: 2px; }

.section-head { max-width: 680px; margin: 0 0 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; }
.section-head p { color: var(--ink-soft); font-size: 17px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transform: translateZ(0);
  transition: transform .18s var(--ease-3d), box-shadow .18s ease, background .2s ease, color .2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: var(--white);
  box-shadow: 0 14px 30px -12px rgba(19, 18, 16, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(19, 18, 16, 0.45); }
.btn-primary:active { transform: translateY(0) scale(.97); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,0.55); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }
.btn-outline:active { transform: translateY(0) scale(.97); }
.btn-navy { background: var(--blue); color: var(--ink); box-shadow: 0 14px 30px -14px rgba(240, 180, 41, 0.55); }
.btn-navy:hover { background: var(--blue-dark); transform: translateY(-2px); }
.btn-navy:active { transform: translateY(0) scale(.97); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- En-tête / navigation ---------- */
.top-bar { background: var(--navy); color: #cdbba5; font-size: 13px; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; padding: 8px 24px; flex-wrap: wrap; gap: 8px; }
.top-bar a { color: #cdbba5; }
.top-bar a:hover { color: #f2c14e; }
.top-bar-links { display: flex; gap: 20px; align-items: center; }
.top-bar-links .icon { color: var(--blue); margin-right: 6px; }
.top-bar-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,0.08); margin-left: 8px;
}
.top-bar-social a:hover { background: var(--blue); }

header.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(19, 18, 16, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 48px; width: auto; }
.brand img.brand-logo-lg { height: 66px; }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-family: var(--font-head); color: var(--white); font-weight: 700; font-size: 15px; white-space: nowrap; }
.brand-text span { color: #cdbba5; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }

nav.main-nav { display: flex; align-items: center; gap: 2px; flex: none; }
nav.main-nav a {
  color: #e2d3bd; font-family: var(--font-head); font-weight: 500; font-size: 14px;
  padding: 10px 12px; border-radius: 8px; white-space: nowrap;
  transition: color .2s ease, background .2s ease;
}
nav.main-nav a:hover, nav.main-nav a.active { color: var(--white); background: rgba(255,255,255,0.1); }

.nav-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.nav-actions .btn { white-space: nowrap; padding: 12px 22px; font-size: 14px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--white); border-radius: 2px; }

/* ---------- Hero (photo réelle) ---------- */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  overflow: hidden;
  background: var(--navy) center/cover no-repeat;
}
.hero-photo, .hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background-position: center;
  background-size: cover;
  object-fit: cover;
  transform: scale(1.04);
}
.hero-photo-pan { animation: heroPan 22s ease-in-out infinite alternate; }
@keyframes heroPan {
  0% { transform: scale(1.08) translate(0, 0); }
  100% { transform: scale(1.16) translate(-1.5%, -1.5%); }
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(18, 12, 8,.94) 0%, rgba(18, 12, 8,.72) 32%, rgba(18, 12, 8,.35) 62%, rgba(18, 12, 8,.15) 100%),
    linear-gradient(100deg, rgba(18, 12, 8,.55) 0%, rgba(18, 12, 8,.05) 55%);
}
.hero .container { position: relative; padding-top: 120px; padding-bottom: 64px; max-width: 760px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(240,180,41,0.18); border: 1px solid rgba(240,180,41,0.55);
  color: #f2c14e; font-family: var(--font-head); font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 7px 14px; border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 { color: var(--white); font-size: clamp(32px, 4.4vw, 54px); font-weight: 800; letter-spacing: -0.01em; }
.hero h1 span { color: #f7c445; }
.hero p.lead { color: #e6dcc9; font-size: 18px; max-width: 540px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-family: var(--font-head); font-size: 26px; font-weight: 800; color: var(--white); }
.hero-stats div span { color: #cdbba5; font-size: 13px; }

/* ---------- Bande logos / certifications ---------- */
.trust-bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.trust-bar .container { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; padding: 26px 24px; }
.trust-item { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--font-head); font-weight: 600; font-size: 14px; }
.trust-item .icon { color: var(--red); font-size: 18px; }

/* ---------- Blocs de services (style bento) ---------- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 20px;
}
.bento-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  grid-column: span 1;
  grid-row: span 1;
  padding: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-color: var(--navy);
  box-shadow: var(--shadow);
  color: var(--white);
  transform-style: preserve-3d;
  will-change: transform;
}
.bento-tile.large { grid-column: span 2; grid-row: span 2; }
.bento-tile.wide { grid-column: span 2; grid-row: span 1; }
.bento-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(10,9,7,.92) 0%, rgba(10,9,7,.55) 45%, rgba(10,9,7,.15) 100%);
}
.bento-icon {
  position: relative; z-index: 1;
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue); color: var(--ink); font-size: 18px; margin-bottom: 14px;
}
.bento-tile h3 { position: relative; z-index: 1; color: var(--white); font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.bento-tile.large h3 { font-size: 24px; }
.bento-tile p { position: relative; z-index: 1; color: #e2d3bd; font-size: 14px; margin: 0; }
@media (max-width: 720px) {
  .bento-grid { grid-template-columns: 1fr; grid-auto-rows: 200px; }
  .bento-tile.large, .bento-tile.wide { grid-column: span 1; grid-row: span 1; }
}

/* ---------- Pourquoi nous / valeurs ---------- */
.why-section { background: var(--navy); color: var(--white); }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.why-section .section-head h2 { color: var(--white); }
.why-section .section-head p { color: #cdbba5; }
.why-list { display: grid; gap: 20px; }
.why-item { display: flex; gap: 16px; }
.why-item .num {
  flex: none; width: 42px; height: 42px; border-radius: 10px;
  background: rgba(240,180,41,0.16); border: 1px solid rgba(240,180,41,0.5);
  color: #f2c14e; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700;
}
.why-item h4 { color: var(--white); font-size: 16.5px; margin-bottom: 4px; }
.why-item p { color: #cdbba5; font-size: 14.5px; margin: 0; }
.why-visual { border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,0.1); box-shadow: var(--shadow-lg); aspect-ratio: 4/3; background-size: cover; background-position: center; }

/* ---------- Bandeau statistiques ---------- */
.stats-bar { background: var(--navy-2); color: var(--white); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stats-grid strong {
  display: block; font-family: var(--font-head); font-size: 34px; font-weight: 800;
  background: linear-gradient(135deg, #f2c14e, #fbe9b8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stats-grid span { color: #b3a189; font-size: 13.5px; text-transform: uppercase; letter-spacing: .05em; }

/* ---------- CTA bandeau ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--navy) 0%, #241d0d 50%, var(--navy) 100%);
  border-top: 4px solid var(--blue);
  color: var(--white); text-align: center;
}
.cta-banner h2 { color: var(--white); font-size: clamp(24px, 3vw, 34px); }
.cta-banner p { color: rgba(255,255,255,0.92); max-width: 560px; margin: 0 auto 28px; }
.cta-banner .btn-outline { border-color: rgba(255,255,255,0.6); }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--navy); color: #cdbba5; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding: 70px 0 40px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-brand img { height: 44px; }
.footer-brand strong { color: var(--white); font-family: var(--font-head); font-size: 15px; }
.site-footer p { color: #b3a189; font-size: 14px; }
.site-footer h4 { color: var(--white); font-size: 14.5px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 18px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.footer-links a { color: #cdbba5; font-size: 14.5px; }
.footer-links a:hover { color: var(--blue); }
.footer-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.footer-contact li { display: flex; gap: 10px; font-size: 14.5px; color: #cdbba5; }
.footer-contact .icon { color: var(--blue); margin-top: 3px; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; }
.footer-social a:hover { background: var(--blue); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 22px 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; color: #9f8c76; }
.footer-bottom a { color: #9f8c76; }
.footer-bottom a:hover { color: var(--blue); }

/* ---------- Pages intérieures : en-tête de page ---------- */
.page-hero { position: relative; background: var(--navy) center/cover no-repeat; color: var(--white); padding: 76px 0 64px; }
.page-hero .hero-scrim { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(18, 12, 8,.92) 0%, rgba(18, 12, 8,.62) 70%); }
.page-hero .container { position: relative; }
.breadcrumb { color: #b3a189; font-size: 13.5px; margin-bottom: 14px; }
.breadcrumb a { color: #e2d3bd; }
.breadcrumb a:hover { color: var(--blue); }
.page-hero h1 { color: var(--white); font-size: clamp(28px, 3.6vw, 44px); margin-bottom: 10px; }
.page-hero p { color: #e2d3bd; max-width: 620px; font-size: 16.5px; }

/* ---------- Blocs de service détaillés ---------- */
.detail-block { display: grid; grid-template-columns: 90px 1fr; gap: 26px; padding: 40px 0; border-bottom: 1px solid var(--line); }
.detail-block:last-child { border-bottom: none; }
.detail-icon {
  width: 66px; height: 66px; border-radius: 16px;
  background: linear-gradient(135deg, var(--red), var(--blue));
  color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.detail-block h3 { font-size: 21px; margin-bottom: 10px; }
.detail-block p { color: var(--ink-soft); }
.detail-block ul { color: var(--ink-soft); padding-left: 20px; }
.detail-block li { margin-bottom: 6px; }

/* ---------- Galerie réalisations (photos réelles) ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-tile {
  position: relative; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden;
  display: flex; align-items: flex-end; color: var(--white); box-shadow: var(--shadow);
  background: var(--navy) center/cover no-repeat;
  transform-style: preserve-3d; will-change: transform;
}
.gallery-tile::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(18, 12, 8,.86) 0%, rgba(18, 12, 8,.15) 55%, transparent 90%);
}
.gallery-tile .tile-label { position: relative; padding: 18px; font-family: var(--font-head); font-weight: 600; font-size: 14.5px; }

/* ---------- Cartes valeurs (à propos) ---------- */
.values-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.value-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); transform-style: preserve-3d; will-change: transform; }
.value-card .icon { color: var(--red); font-size: 22px; margin-bottom: 14px; display: block; }
.value-card h4 { font-size: 17px; margin-bottom: 8px; }
.value-card p { color: var(--ink-soft); font-size: 14.5px; margin: 0; }

.timeline { border-left: 3px solid var(--red); padding-left: 26px; display: grid; gap: 28px; }
.timeline-item strong { display: block; font-family: var(--font-head); color: var(--navy); font-size: 15px; }
.timeline-item span { color: var(--ink-soft); font-size: 14px; }

.about-photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 16/10; background-size: cover; background-position: center; margin-bottom: 40px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 44px; align-items: start; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; display: grid; gap: 20px; margin-bottom: 20px; }
.contact-row { display: flex; gap: 14px; align-items: flex-start; }
.contact-row .icon {
  width: 42px; height: 42px; flex: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--red), var(--blue)); color: var(--white);
  padding: 10px;
}
.contact-row strong { display: block; color: var(--navy); font-family: var(--font-head); font-size: 14.5px; }
.contact-row span, .contact-row a { color: var(--ink-soft); font-size: 14.5px; }
.contact-row a:hover { color: var(--red); }

.map-fallback { display: block; text-decoration: none; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map-fallback-inner {
  height: 220px; display: flex; align-items: center; gap: 14px; padding: 0 28px;
  background: linear-gradient(150deg, var(--navy) 0%, var(--blue-dark) 100%); color: var(--white);
}
.map-fallback-inner .icon { width: 30px; height: 30px; color: #e2d3bd; flex: none; }
.map-fallback-inner span { font-size: 14.5px; line-height: 1.6; }
.map-fallback-inner small { color: #b3a189; }
.map-fallback:hover .map-fallback-inner { background: linear-gradient(150deg, var(--blue-dark) 0%, var(--navy) 100%); }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.form-field { display: grid; gap: 8px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-family: var(--font-head); font-size: 13.5px; font-weight: 600; color: var(--navy); }
.form-field input, .form-field select, .form-field textarea {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px;
  font-family: var(--font-body); font-size: 14.5px; background: var(--paper); color: var(--ink);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--red); background: var(--white); }
.form-note { font-size: 13px; color: var(--ink-soft); margin-top: 10px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   ÉCRAN D'OUVERTURE — la ville du logo JDG se bâtit (~6s), le logo reste
   affiché net et bien visible pendant ~3s (~9s au total avant le fondu)
   ========================================================================== */
.splash {
  position: fixed; inset: 0; z-index: 999;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, #161a24 0%, #0a0c12 60%, #030406 100%);
  perspective: 1400px;
  transition: opacity .6s ease, visibility .6s ease;
  overflow: hidden;
}
.splash.splash-hide { opacity: 0; visibility: hidden; pointer-events: none; }
.splash::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 46%, rgba(240, 180, 41, .22) 0%, rgba(240, 180, 41, 0) 55%);
  animation: splashGlow 3.6s ease-in-out infinite .15s;
}
@keyframes splashGlow {
  0%, 100% { opacity: .5; transform: scale(1); }
  50% { opacity: .95; transform: scale(1.1); }
}

/* ---- Scène 3D : la ville se bâtit vite, la caméra se stabilise à plat ---- */
.city-camera {
  position: relative;
  width: min(94vw, 1160px);
  height: min(46vw, 420px);
  transform-style: preserve-3d;
  transform: rotateX(46deg) scale(.87) translateY(6%);
  animation: cityFadeIn .3s ease forwards 0s,
             cityCamera 2.2s var(--ease-3d) forwards .05s;
}
@keyframes cityFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes cityCamera {
  0%   { transform: rotateX(46deg) scale(.87) translateY(6%) rotateY(-4deg); }
  40%  { transform: rotateX(24deg) scale(.95) translateY(3%) rotateY(3deg); }
  70%  { transform: rotateX(8deg) scale(.99) translateY(1%) rotateY(-1deg); }
  100% { transform: rotateX(0deg) scale(1) translateY(0%) rotateY(0deg); }
}
.city-grid {
  position: absolute; left: -20%; right: -20%; bottom: 0; height: 60%;
  background-image:
    repeating-linear-gradient(90deg, rgba(240,190,90,.14) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(240,190,90,.14) 0 1px, transparent 1px 64px);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.9), transparent 92%);
          mask-image: linear-gradient(to top, rgba(0,0,0,.9), transparent 92%);
  opacity: 0;
  animation: cityFadeIn .5s ease forwards .03s;
}
.city-ground {
  position: absolute; left: 50%; bottom: 6%; width: 78%; height: 30%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 60%, rgba(0,0,0,.65) 0%, rgba(0,0,0,0) 72%);
  filter: blur(2px);
}
.city-ground::after {
  content: ""; position: absolute; left: 8%; right: 8%; bottom: 42%; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(240,190,80,.06) 8%, rgba(250,205,100,.9) 50%, rgba(240,190,80,.06) 92%, transparent);
  box-shadow: 0 0 18px 2px rgba(240,180,41,.6);
  opacity: 0; transform: scaleX(.2);
  animation: groundGlow .6s ease forwards .8s;
}
@keyframes groundGlow { to { opacity: 1; transform: scaleX(1); } }
/* ---- Ligne du haut : immeubles lointains, au-dessus du logo ---- */
.city-bg {
  position: absolute; left: 0; right: 0; bottom: 60%; height: 20%;
  transform: translateZ(-170px) scale(1.2);
}
.bg-blk {
  position: absolute; bottom: 0;
  background: linear-gradient(100deg, var(--c1) 0%, var(--c2) 100%);
  box-shadow: 0 0 20px -8px var(--c1), inset 1.5px 0 0 rgba(255,255,255,.22);
  opacity: 0; transform: scaleY(.08); transform-origin: bottom center;
  animation: bgRise .5s ease forwards;
  filter: saturate(.65) brightness(.6);
}
@keyframes bgRise { to { opacity: .8; transform: scaleY(1); } }
/* ---- Formes de toit variées : certaines à 2 pentes (pignon), certaines
        à 1 pente forte, certaines à 1 pente plus faible ---- */
.roof-gable    { clip-path: polygon(0% 26%, 50% 0%, 100% 26%, 100% 100%, 0% 100%); }
.roof-steep-l  { clip-path: polygon(0% 62%, 100% 0%, 100% 100%, 0% 100%); }
.roof-steep-r  { clip-path: polygon(0% 0%, 100% 62%, 100% 100%, 0% 100%); }
.roof-gentle-l { clip-path: polygon(0% 16%, 100% 0%, 100% 100%, 0% 100%); }
.roof-gentle-r { clip-path: polygon(0% 0%, 100% 16%, 100% 100%, 0% 100%); }

/* ---- Ligne du bas : immeubles rapprochés, au niveau du sol, sous le logo ---- */
.city-mid {
  position: absolute; left: 0; right: 0; bottom: 0%; height: 17%;
  transform: translateZ(-60px) scale(1.06);
}
.mid-blk {
  position: absolute; bottom: 0; border-radius: 3px 3px 0 0;
  clip-path: polygon(0% 10%, 55% 0%, 100% 8%, 100% 100%, 0% 100%);
  background: linear-gradient(100deg, var(--c1) 0%, var(--c1) 32%, var(--c2) 78%, var(--c2) 100%);
  box-shadow: 0 0 16px -6px var(--c1), inset 1.5px 0 0 rgba(255,255,255,.28);
  opacity: 0; transform: scaleY(.06) translateY(8px); transform-origin: bottom center;
  animation: blkRise .5s cubic-bezier(.2,1.4,.4,1) forwards;
}
@keyframes blkRise {
  0%   { opacity: 0; transform: scaleY(.04) translateY(10px); filter: brightness(2.2); }
  55%  { opacity: 1; transform: scaleY(1.06) translateY(-4px); filter: brightness(1.3); }
  75%  { transform: scaleY(.97) translateY(1px); filter: brightness(1); }
  100% { opacity: 1; transform: scaleY(1) translateY(0); filter: brightness(1); }
}
.city-sweep {
  position: absolute; top: -20%; left: -30%; width: 38%; height: 140%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,238,190,.5) 48%, transparent 100%);
  mix-blend-mode: screen;
  opacity: 0; transform: translateX(-40%) skewX(-18deg);
  animation: citySweep 1.1s ease-out forwards 5.9s;
}
@keyframes citySweep {
  0%   { opacity: 0; transform: translateX(-40%) skewX(-18deg); }
  15%  { opacity: .7; }
  60%  { opacity: .5; }
  100% { opacity: 0; transform: translateX(340%) skewX(-18deg); }
}

/* ---- Le logo JDG (SVG vectoriel), centré entre les deux lignes d'immeubles :
        ses propres immeubles (dans le logo) se construisent, puis le nom
        de l'entreprise se révèle juste en dessous ---- */
.logo-scene {
  position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%) translateZ(40px);
  width: min(56vw, 560px);
}
.logo-scene .logo-svg {
  display: block; width: 100%; height: auto; overflow: visible;
}
.hero-bld {
  transform-box: fill-box; transform-origin: 50% 100%;
  opacity: 0; transform: scaleY(.05);
  animation: heroRise .55s cubic-bezier(.2,1.4,.4,1) forwards;
}
@keyframes heroRise {
  0%   { opacity: 0; transform: scaleY(.05); filter: brightness(2.4); }
  55%  { opacity: 1; transform: scaleY(1.08); filter: brightness(1.25); }
  75%  { transform: scaleY(.97); filter: brightness(1); }
  100% { opacity: 1; transform: scaleY(1); filter: brightness(1); }
}
#hb1 { animation-delay: .6s; }
#hb2 { animation-delay: 1.1s; }
#hb3 { animation-delay: 1.6s; }
#hb4 { animation-delay: 2.1s; }
#hb5 { animation-delay: 2.6s; }
#hb6 { animation-delay: 3.1s; }
#hb7 { animation-delay: 3.6s; }
#hb8 { animation-delay: 4.1s; }
#glowLine {
  opacity: 0;
  animation: cityFadeIn .4s ease forwards 4.5s;
}
#markReveal {
  transform-box: fill-box; transform-origin: 50% 0%;
  opacity: 0; transform: translateY(14px) scale(.96);
  animation: markPartIn 1.1s var(--ease-3d) forwards 4.8s;
}
@keyframes markPartIn {
  0%   { opacity: 0; transform: translateY(14px) scale(.96); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.splash-bar {
  position: absolute; bottom: 10%; left: 50%; transform: translateX(-50%);
  width: 180px; height: 3px; background: rgba(255,255,255,.14); border-radius: 3px; overflow: hidden;
}
.splash-bar::after {
  content: ""; position: absolute; inset: 0; width: 0%;
  background: linear-gradient(90deg, var(--blue-dark), var(--blue));
  animation: splashBar 9s linear forwards .1s;
}
@keyframes splashBar { from { width: 0%; } to { width: 100%; } }

/* ==========================================================================
   TRANSITIONS 3D ENTRE PAGES
   ========================================================================== */
.stage { perspective: 1400px; }
.page-panel { display: none; }
.page-panel.active { display: block; transform-style: preserve-3d; }
.page-panel.p-leave {
  animation: panelLeave .38s var(--ease-3d) forwards;
}
.page-panel.p-enter {
  animation: panelEnter .42s var(--ease-3d) forwards;
}
@keyframes panelLeave {
  from { opacity: 1; transform: translateZ(0) rotateY(0deg); }
  to   { opacity: 0; transform: translateZ(-140px) rotateY(-6deg); }
}
@keyframes panelEnter {
  from { opacity: 0; transform: translateZ(-140px) rotateY(6deg); }
  to   { opacity: 1; transform: translateZ(0) rotateY(0deg); }
}

/* ---------- Inclinaison 3D (cartes) ---------- */
.tilt3d { transition: transform .12s ease-out, box-shadow .2s ease; }
.tilt3d:active { transition: transform .08s ease-out; }

/* ---------- Bouton d'accès fixe ---------- */
.fixed-cta {
  position: fixed; right: 22px; bottom: 22px; z-index: 200;
  display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--white);
  padding: 10px 20px 10px 10px; border-radius: 999px;
  box-shadow: 0 16px 34px -12px rgba(0,0,0,.55), 0 0 0 1px rgba(240,180,41,.35);
  font-family: var(--font-head); font-weight: 600; font-size: 14.5px;
  transform-style: preserve-3d; will-change: transform;
}
.fixed-cta-logo { height: 30px; width: auto; border-radius: 999px; }
.fixed-cta:hover { box-shadow: 0 20px 40px -12px rgba(0,0,0,.6), 0 0 0 2px var(--blue); }

@media (prefers-reduced-motion: reduce) {
  .splash { display: none !important; }
  .splash-bar::after, .splash::before,
  .city-camera, .city-grid, .city-ground::after, .bg-blk, .mid-blk, .city-sweep,
  .hero-bld, #glowLine, #markReveal { animation: none !important; }
  .hero-photo-pan { animation: none !important; }
  .page-panel.p-leave, .page-panel.p-enter { animation: none !important; }
  .tilt3d { transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) { .brand-text { display: none; } }

@media (max-width: 980px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .bento-tile.large, .bento-tile.wide { grid-column: span 2; grid-row: span 1; }
  .why-grid { grid-template-columns: 1fr; }
  .why-visual { order: -1; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .hero { min-height: 560px; }
}

@media (max-width: 720px) {
  nav.main-nav { display: none; }
  .nav-actions .btn { display: none; }
  .nav-toggle { display: flex; }
  header.site-header.nav-open nav.main-nav {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--navy); flex-direction: column; padding: 12px 20px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .top-bar-links span:first-child { display: none; }
  .fixed-cta span { display: none; }
  .fixed-cta { padding: 10px; }
  .detail-block { grid-template-columns: 56px 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; padding: 50px 0 30px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
  .hero { min-height: 520px; }
}
