:root {
  --navy: #12224f;
  --navy-deep: #0b1836;
  --orange: #E8622A;
  --blue: #2A6DD9;
  --cream: #F6F4EF;
  --ink: #1c2233;
  --muted: #6b7280;
  --line: #e7e3da;
}

*, *::before, *::after { box-sizing: border-box; }

.site-nav, .hero, .compare-wrap, .content, .gallery-section, .cta-banner { box-sizing: border-box; }

/* ---------- NAV ---------- */
.site-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 6%;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.nav-brand { font-weight: 800; font-size: 15px; color: var(--navy); letter-spacing: .5px; }
.nav-brand span { color: var(--orange); }
.breadcrumb { font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--navy); font-weight: 600; text-decoration: none; }
.breadcrumb a:hover { color: var(--orange); }

.rs-breadcrumb {
  padding: 18px 6% 0;
  background: #fff;
}

/* ---------- HERO ---------- */
.hero {
  background:
    radial-gradient(ellipse at 80% 0%, rgba(42,109,217,0.25), transparent 55%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: 70px 6% 60px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; right: -60px; top: -60px;
  width: 340px; height: 340px;
  border: 2px solid rgba(255,255,255,0.06);
  border-radius: 50%;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--orange); font-weight: 700; font-size: 12px;
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--orange); }
.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 800;
  line-height: 1.08;
  max-width: 14ch;
  margin-bottom: 22px;
  color: #fff;
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 28px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,0.15);
  max-width: 720px;
}
.meta-item { display: flex; flex-direction: column; gap: 4px; }
.meta-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.5px;
  color: rgba(255,255,255,0.55); font-weight: 700;
}
.meta-value { font-size: 15.5px; font-weight: 500; }

/* ---------- AVANT / APRES (Slider Corrigé et Uniformisé) ---------- */
.compare-wrap {
  margin: -40px 6% 0;
  position: relative;
  z-index: 2;
}
.compare {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(11,24,54,0.45);
  aspect-ratio: 21 / 9; /* Ratio plus large pour un rendu plein écran sans image trop haute */
  cursor: ew-resize;
  user-select: none;
  background: #000;
}
.compare img {
  position: absolute; 
  inset: 0;
  width: 100%; 
  height: 100%; 
  object-fit: cover; /* Empêche toute déformation, l'image remplit proprement le cadre */
  object-position: center;
}
.compare .after-img { z-index: 1; }
.compare .before-img {
  z-index: 2;
  clip-path: inset(0 50% 0 0);
  will-change: clip-path;
}
.compare-handle {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 0; z-index: 3;
  transform: translateX(-50%);
  pointer-events: none;
}
.compare-line {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 3px; background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}
.compare-grip {
  position: absolute; top: 50%; left: 0;
  transform: translate(-50%,-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}
.compare-grip::before {
  content: "⟷";
  color: var(--navy);
  font-size: 18px;
  font-weight: 800;
}
.compare-tag {
  position: absolute; top: 18px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 14px; border-radius: 20px;
  color: #fff; z-index: 3;
  pointer-events: none;
}
.tag-before { left: 18px; background: rgba(18,34,79,0.85); }
.tag-after { right: 18px; background: var(--orange); }
.compare-hint {
  text-align: center;
  font-size: 12px; color: var(--muted); letter-spacing: .5px;
  margin-top: 14px;
}

/* ---------- CONTENU ---------- */
.content {
  margin: 90px 0; padding: 0 6%;
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 70px;
  color: var(--ink);
}
.content h2 {
  font-size: 26px; color: var(--navy); margin-bottom: 18px;
  position: relative; padding-bottom: 14px;
}
.content h2::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 46px; height: 3px; background: var(--orange);
}
.lede {
  font-size: 17.5px; color: var(--navy); font-style: italic;
  margin-bottom: 22px; line-height: 1.65;
}
.body-text p { margin-bottom: 16px; color: #3a3f4d; font-size: 15.5px; line-height: 1.7; }

.specs {
  background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 32px;
  height: fit-content;
  box-shadow: 0 8px 24px -12px rgba(18,34,79,0.12);
}
.specs h3 {
  font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--navy); margin-bottom: 20px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.spec-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 0; border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.spec-row:last-of-type { border-bottom: none; }
.spec-row .k { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.spec-row .v { font-weight: 600; color: var(--ink); text-align: right; }
.specs .btn {
  display: block; text-align: center; margin-top: 24px;
  background: var(--orange); color: #fff;
  padding: 14px; border-radius: 8px;
  font-weight: 700; font-size: 13px; letter-spacing: .5px;
  text-decoration: none;
}
.specs .btn:hover { background: #d4551f; }

/* ---------- GALERIE SECONDAIRE (Grille du bas parfaitement cadrée) ---------- */
.gallery-section { margin: 0 0 100px; padding: 0 6%; }
.gallery-section h2 {
  font-size: 22px; color: var(--navy); margin-bottom: 28px;
  font-weight: 700;
}
.gallery-intro {
  display: flex; align-items: flex-start; gap: 14px;
  font-size: 12.5px;
  color: var(--muted); margin: -14px 0 30px;
}
.gallery-intro .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange); margin-top: 5px; flex-shrink: 0;
}
.ref-before {
  display: flex; gap: 16px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; margin-bottom: 34px; max-width: 420px;
}
.ref-before img {
  width: 110px; height: 80px; 
  object-fit: cover; /* Cadrage parfait de la vignette initiale */
  object-position: center;
  border-radius: 8px; flex-shrink: 0;
}
.ref-before .rb-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; color: var(--navy);
  margin-bottom: 4px;
}
.ref-before p { font-size: 13px; color: var(--muted); line-height: 1.4; }

.after-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.after-grid figure {
  position: relative; margin: 0; border-radius: 10px; overflow: hidden;
  background: #fff; border: 1px solid var(--line);
}
.after-grid img { 
  width: 100%; 
  height: 240px; /* Hauteur fixe standard pour toutes les petites cartes */
  object-fit: cover; /* Recadre proprement les images de tailles différentes */
  object-position: center;
  display: block; 
}
.after-grid figcaption {
  position: absolute; bottom: 10px; left: 10px;
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: #fff; background: var(--orange);
  padding: 3px 10px; border-radius: 12px;
}

/* La grande photo principale de la grille */
.after-grid figure:first-child {
  grid-column: span 2; grid-row: span 2;
}
.after-grid figure:first-child img { 
  width: 100%;
  height: 100%;
  min-height: 500px; /* S'accorde parfaitement avec la double hauteur des 2 lignes adjacentes */
  object-fit: cover;
  object-position: center;
}

/* ---------- CTA BANNER ---------- */
.cta-banner {
  background: linear-gradient(100deg, var(--orange), #f07845);
  color: #fff; padding: 46px 6%;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
}
.cta-banner h3 { font-size: 22px; font-weight: 800; margin-bottom: 6px; color:#fff; }
.cta-banner p { font-size: 13px; opacity: .9; }
.cta-banner .btn {
  background: var(--navy); color: #fff;
  padding: 15px 30px; border-radius: 8px;
  font-weight: 700; font-size: 13.5px; white-space: nowrap;
  text-decoration: none;
}
.cta-banner .btn:hover { background: var(--navy-deep); }

footer {
  background: var(--navy-deep); color: rgba(255,255,255,0.55);
  text-align: center; padding: 26px; font-size: 12px;
}

@media (max-width: 820px) {
  .content { grid-template-columns: 1fr; gap: 40px; }
  .after-grid { grid-template-columns: 1fr 1fr; }
  .after-grid figure:first-child { grid-column: span 2; grid-row: span 1; }
  .after-grid figure:first-child img { height: 240px; min-height: 0; }
  .hero-meta { gap: 20px; }
}