/* D3DIA - Galerie réalisations isolée */
.realisations-page {
  overflow: visible;
}

.realisations-hero {
  padding-bottom: 28px;
}

.realisations-toolbar {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.realisation-filter {
  border: 1px solid rgba(71, 73, 83, .18);
  background: rgba(255, 255, 255, .72);
  color: #474953;
  padding: 11px 15px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.realisation-filter span {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  margin-left: 7px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(71, 73, 83, .11);
  font-size: .78rem;
}

.realisation-filter:hover,
.realisation-filter.active {
  background: #474953;
  color: #fff;
  border-color: #474953;
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .14);
}

.realisation-filter.active span,
.realisation-filter:hover span {
  background: #ff9f1c;
  color: #1f2025;
}

.realisations-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 90px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.realisation-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(71, 73, 83, .11);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .10);
  transition: opacity .25s ease, transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.realisation-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .16);
  border-color: rgba(255, 159, 28, .55);
}

.realisation-card.is-hidden {
  display: none !important;
}

.realisation-media {
  display: block;
  width: 100%;
  height: 240px;
  padding: 0;
  margin: 0;
  border: 0;
  background: #24262d;
  cursor: zoom-in;
  overflow: hidden;
}

.realisation-media img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform .45s ease, filter .45s ease;
}

.realisation-card:hover .realisation-media img {
  transform: scale(1.055);
  filter: contrast(1.04) saturate(1.03);
}

.realisation-content {
  padding: 20px 20px 22px;
}

.realisation-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 159, 28, .15);
  color: #8b4d00;
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.realisation-content h2 {
  margin: 0 0 10px;
  color: #2a2c33;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.12;
}

.realisation-content p {
  margin: 0;
  color: rgba(42, 44, 51, .72);
  line-height: 1.55;
  font-size: .95rem;
}

.realisations-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  padding: 28px;
  align-items: center;
  justify-content: center;
  background: rgba(10, 11, 14, .88);
  backdrop-filter: blur(12px);
}

.realisations-lightbox.is-open {
  display: flex;
}

.realisations-lightbox img {
  max-width: min(1200px, 94vw);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 22px;
  box-shadow: 0 30px 120px rgba(0, 0, 0, .55);
}

.realisations-lightbox p {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  margin: 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-weight: 800;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 700px) {
  .realisations-toolbar {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .realisation-filter {
    flex: 0 0 auto;
    padding: 10px 13px;
    font-size: .9rem;
  }

  .realisations-grid {
    width: min(100% - 24px, 520px);
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 60px;
  }

  .realisation-media {
    height: 215px;
  }

  .realisation-content {
    padding: 17px;
  }

  .realisations-lightbox {
    padding: 14px;
  }

  .realisations-lightbox img {
    max-width: 96vw;
    max-height: 78vh;
    border-radius: 16px;
  }
}
