/**
 * Page Nos réalisations — portfolio moderne, avant/après, thème RAMSBAT
 */
.ramsbat-page-realisations {
  --r-sky: var(--ramsbat-sky, #9ad8f5);
  --r-ink: var(--ramsbat-ink, #021631);
  --r-muted: var(--ramsbat-text-muted, #3d5a73);
  --r-radius: 1rem;
  --r-ease: var(--ramsbat-ease, cubic-bezier(0.4, 0, 0.2, 1));
}

/* Héro */
.ramsbat-page-realisations .page-header-enhanced.page-hero-ramsbat.ramsbat-real-hero {
  min-height: clamp(12rem, 26vh, 17rem);
  display: flex;
  align-items: center;
  padding-bottom: clamp(1.5rem, 4vh, 2.5rem) !important;
}

.ramsbat-real-hero__inner {
  text-align: center;
}

.ramsbat-real-hero__tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--r-sky);
  background: rgba(154, 216, 245, 0.12);
  border: 1px solid rgba(154, 216, 245, 0.38);
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

/* Bandeau promesse */
.ramsbat-real-promise {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.9rem;
  max-width: 48rem;
  margin: 0 auto 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--r-muted);
}

.ramsbat-real-promise__dot {
  color: var(--r-sky);
  opacity: 0.9;
}

/* Intro */
.ramsbat-real-page .section-header-center.ramsbat-page-intro {
  margin-bottom: 1.75rem;
}

/* Grille */
.ramsbat-real-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.15rem, 2vw, 1.5rem);
  max-width: 68rem;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .ramsbat-real-grid {
    grid-template-columns: 1fr;
    max-width: 26rem;
  }
}

/* Carte projet */
.ramsbat-real-card {
  background: #fff;
  border-radius: var(--r-radius);
  border: 1px solid var(--ramsbat-border, rgba(47, 113, 200, 0.18));
  box-shadow: 0 4px 24px rgba(2, 22, 49, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.45s var(--r-ease), box-shadow 0.45s ease, border-color 0.3s ease;
  height: 100%;
}

.ramsbat-real-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(47, 113, 200, 0.12);
  border-color: rgba(154, 216, 245, 0.45);
}

/* Duo avant / après */
.ramsbat-real-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  padding: 0.45rem 0.45rem 0;
}

@media (max-width: 400px) {
  .ramsbat-real-pair {
    grid-template-columns: 1fr;
  }
}

.ramsbat-real-figure {
  position: relative;
  margin: 0;
  border-radius: 0.65rem;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #e8eef3;
}

/* Clic = ouvrir l’image (même URL locale ou 1600px en ligne) */
a.ramsbat-real-imglink {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  line-height: 0;
  border-radius: inherit;
  cursor: zoom-in;
  outline: none;
}

a.ramsbat-real-imglink:hover img,
a.ramsbat-real-imglink:focus-visible img {
  transform: scale(1.04);
}

a.ramsbat-real-imglink:focus-visible {
  box-shadow: 0 0 0 3px rgba(154, 216, 245, 0.95);
}

.ramsbat-real-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--r-ease);
}

.ramsbat-real-card:hover a.ramsbat-real-imglink img {
  transform: scale(1.03);
}

.ramsbat-real-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 2;
  pointer-events: none;
  padding: 0.3rem 0.55rem;
  border-radius: 0.35rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.2;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.ramsbat-real-badge--before {
  color: #fff;
  background: rgba(8, 24, 40, 0.78);
  backdrop-filter: blur(6px);
}

.ramsbat-real-badge--after {
  color: var(--r-ink);
  background: linear-gradient(135deg, #9ad8f5 0%, #6ec4e8 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Corps carte */
.ramsbat-real-card__body {
  padding: 1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.ramsbat-real-card__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.35;
  color: var(--r-ink);
}

.ramsbat-real-dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--r-muted);
}

.ramsbat-real-dl > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  align-items: baseline;
  padding: 0.4rem 0;
  border-top: 1px solid rgba(47, 113, 200, 0.08);
}

.ramsbat-real-dl > div:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.ramsbat-real-dl dt {
  font-weight: 800;
  color: #0a2740;
  min-width: 4.2rem;
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ramsbat-real-dl dd {
  margin: 0;
  flex: 1;
  min-width: 0;
}

/* CTA final */
.ramsbat-real-cta {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1.75rem, 3vw, 2.25rem) 1.25rem;
  border-radius: 1.15rem;
  background: linear-gradient(150deg, #021631 0%, #0c3560 50%, #062838 100%);
  border: 1px solid rgba(154, 216, 245, 0.25);
  box-shadow: 0 12px 40px rgba(2, 22, 49, 0.18);
  position: relative;
  overflow: hidden;
}

.ramsbat-real-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 20% 0%, rgba(154, 216, 245, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 100% 100%, rgba(47, 113, 200, 0.18) 0%, transparent 50%);
  pointer-events: none;
}

.ramsbat-real-cta__title {
  position: relative;
  z-index: 1;
  margin: 0 0 0.4rem;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
}

.ramsbat-real-cta__sub {
  position: relative;
  z-index: 1;
  margin: 0 0 1.1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(220, 235, 250, 0.88);
  max-width: 26rem;
  margin-left: auto;
  margin-right: auto;
}

.ramsbat-real-cta .cta-principal {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, #9ad8f5 0%, #6ec4e8 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
  border-radius: 999px;
}

.ramsbat-real-cta .cta-principal p.cta-txt-link,
.ramsbat-real-cta .cta-txt-link {
  color: #021631 !important;
  font-weight: 800 !important;
}

/* Stagger reveal (bloc texte, pas les photos) */
.ramsbat-real-page .ramsbat-real-stagger > article:nth-child(1) .ramsbat-real-card__body.ramsbat-reveal-observe {
  transition-delay: 0s;
}
.ramsbat-real-page .ramsbat-real-stagger > article:nth-child(2) .ramsbat-real-card__body.ramsbat-reveal-observe {
  transition-delay: 0.06s;
}
.ramsbat-real-page .ramsbat-real-stagger > article:nth-child(3) .ramsbat-real-card__body.ramsbat-reveal-observe {
  transition-delay: 0.12s;
}
.ramsbat-real-page .ramsbat-real-stagger > article:nth-child(4) .ramsbat-real-card__body.ramsbat-reveal-observe {
  transition-delay: 0.18s;
}
.ramsbat-real-page .ramsbat-real-stagger > article:nth-child(5) .ramsbat-real-card__body.ramsbat-reveal-observe {
  transition-delay: 0.24s;
}
.ramsbat-real-page .ramsbat-real-stagger > article:nth-child(6) .ramsbat-real-card__body.ramsbat-reveal-observe {
  transition-delay: 0.3s;
}
.ramsbat-real-page .ramsbat-real-stagger > article:nth-child(7) .ramsbat-real-card__body.ramsbat-reveal-observe {
  transition-delay: 0.36s;
}

/* Photos toujours visibles (hors effet opacité reveal) */
html.ramsbat-js .ramsbat-page-realisations .ramsbat-real-pair,
html.ramsbat-js .ramsbat-page-realisations .ramsbat-real-figure,
html.ramsbat-js .ramsbat-page-realisations .ramsbat-real-imglink,
html.ramsbat-js .ramsbat-page-realisations .ramsbat-real-pair img {
  opacity: 1 !important;
  transform: none;
}
html.ramsbat-js .ramsbat-page-realisations .ramsbat-real-card:hover a.ramsbat-real-imglink img {
  transform: scale(1.03) !important;
}

/* Mobile ajustements */
@media (max-width: 768px) {
  .ramsbat-page-realisations .page-header-enhanced {
    padding: 5.5rem 0 2.25rem;
  }
  .section-enhanced.light {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
}

@media (max-width: 480px) {
  .ramsbat-real-card__body {
    padding: 0.9rem 0.95rem 1rem;
  }
  .ramsbat-real-card__title {
    font-size: 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ramsbat-real-card:hover {
    transform: none;
  }
  .ramsbat-real-card:hover a.ramsbat-real-imglink img,
  a.ramsbat-real-imglink:hover img,
  a.ramsbat-real-imglink:focus-visible img {
    transform: none !important;
  }
}

/* ——— Visualisateur plein écran (js/ramsbat-realisations-lightbox.js) */
html.ramsbat-lb-open,
body.ramsbat-lb-open {
  overflow: hidden;
}

.ramsbat-realis-lb {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  font-family: inherit;
}

.ramsbat-realis-lb[hidden] {
  display: none !important;
}

.ramsbat-realis-lb.is-open {
  display: flex !important;
}

.ramsbat-realis-lb__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 13, 24, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.ramsbat-realis-lb__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(100vw, 68rem);
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.ramsbat-realis-lb__topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  padding: 0.65rem 0.4rem 0.85rem;
  flex-shrink: 0;
}

.ramsbat-realis-lb__back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.55rem 0.9rem 0.55rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ramsbat-realis-lb__back:hover,
.ramsbat-realis-lb__back:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(154, 216, 245, 0.75);
  outline: none;
}

.ramsbat-realis-lb__back-ico {
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.95;
}

.ramsbat-realis-lb__counter {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(220, 235, 250, 0.85);
  font-variant-numeric: tabular-nums;
  padding: 0 0.5rem;
}

.ramsbat-realis-lb__close {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 0 auto;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ramsbat-realis-lb__close:hover,
.ramsbat-realis-lb__close:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: none;
}

.ramsbat-realis-lb__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 0.25rem 0.75rem;
}

.ramsbat-realis-lb__imgwrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-height: min(78vh, 900px);
}

.ramsbat-realis-lb__img {
  max-width: 100%;
  max-height: min(64vh, 780px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.4rem;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
  background: #0a1a2a;
}

.ramsbat-realis-lb__caption {
  margin: 0.75rem 0 0;
  text-align: center;
  max-width: 40rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(230, 240, 250, 0.95);
  font-weight: 500;
  padding: 0 0.5rem;
}

.ramsbat-realis-lb__nav {
  flex: 0 0 auto;
  width: 2.75rem;
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ramsbat-realis-lb__nav span {
  display: block;
  margin-top: -0.12em;
  opacity: 0.9;
}

.ramsbat-realis-lb__nav:hover,
.ramsbat-realis-lb__nav:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

@media (max-width: 640px) {
  .ramsbat-realis-lb__topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .ramsbat-realis-lb__back {
    justify-content: center;
    order: 1;
  }
  .ramsbat-realis-lb__close {
    position: absolute;
    top: env(safe-area-inset-top, 0.5rem);
    right: 0.4rem;
    z-index: 2;
  }
  .ramsbat-realis-lb__counter {
    text-align: center;
    order: 2;
    width: 100%;
  }
  .ramsbat-realis-lb__nav {
    width: 2.25rem;
    min-height: 4.5rem;
  }
  .ramsbat-realis-lb__img {
    max-height: 52vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ramsbat-realis-lb__back,
  .ramsbat-realis-lb__close,
  .ramsbat-realis-lb__nav {
    transition: none;
  }
}

