.echafaudage-realisation {
  --portfolio-accent: #1f2b32;
  --portfolio-muted: #5f6a70;
  --portfolio-border: rgba(31, 43, 50, 0.12);
  --portfolio-bg: #f5f3ef;
  --portfolio-card-bg: #ffffff;
  --portfolio-shadow: 0 16px 42px rgba(19, 26, 32, 0.08);
  --portfolio-radius: 16px;
  --portfolio-transition: 180ms ease;
}

.echafaudage-realisation * {
  box-sizing: border-box;
}

.echafaudage-realisation__archive,
.echafaudage-realisation__single {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.echafaudage-realisation__header {
  margin-bottom: 24px;
}

.echafaudage-realisation__title {
  margin: 0 0 18px;
  font-size: clamp(2rem, 3vw, 3rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--portfolio-accent);
}

.echafaudage-realisation__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
}

.echafaudage-realisation__filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid var(--portfolio-border);
  border-radius: 999px;
  background: transparent;
  color: var(--portfolio-accent);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--portfolio-transition);
}

.echafaudage-realisation__filter:hover,
.echafaudage-realisation__filter:focus-visible,
.echafaudage-realisation__filter.is-active {
  background: var(--portfolio-accent);
  border-color: var(--portfolio-accent);
  color: #fff;
  box-shadow: var(--portfolio-shadow);
}

.echafaudage-realisation__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
}

.echafaudage-realisation__card-wrap {
  display: flex;
}

.echafaudage-realisation__card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--portfolio-card-bg);
  border: 1px solid var(--portfolio-border);
  border-radius: var(--portfolio-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform var(--portfolio-transition), box-shadow var(--portfolio-transition), border-color var(--portfolio-transition);
}

.echafaudage-realisation__card:hover,
.echafaudage-realisation__card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--portfolio-shadow);
  border-color: rgba(31, 43, 50, 0.2);
}

.echafaudage-realisation__card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #dfe5e8;
  width: 100%;
  min-height: 240px;
}

.echafaudage-realisation__card-media img,
.echafaudage-realisation__placeholder {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
  object-position: center !important;
}

.echafaudage-realisation__card-media img {
  transition: transform 300ms ease;
  max-width: none !important;
  min-width: 100% !important;
  min-height: 100% !important;
  border: 0 !important;
  background: #dfe5e8;
  margin: 0 !important;
  padding: 0 !important;
}

.echafaudage-realisation__card-media > img.attachment-medium_large,
.echafaudage-realisation__card-media > img.attachment-large {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.echafaudage-realisation__card:hover .echafaudage-realisation__card-media img,
.echafaudage-realisation__card:focus-visible .echafaudage-realisation__card-media img {
  transform: scale(1.04);
}

.echafaudage-realisation__card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 18, 20, 0.06), rgba(12, 18, 20, 0.62));
  opacity: 0;
  transition: opacity var(--portfolio-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.echafaudage-realisation__card:hover .echafaudage-realisation__card-overlay,
.echafaudage-realisation__card:focus-visible .echafaudage-realisation__card-overlay {
  opacity: 1;
}

.echafaudage-realisation__card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 18px 20px;
}

.echafaudage-realisation__card-title {
  margin: 0 0 8px;
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--portfolio-accent);
}

.echafaudage-realisation__card-category {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--portfolio-muted);
}

.echafaudage-realisation__card-summary {
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--portfolio-muted);
}

.echafaudage-realisation__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-weight: 700;
  text-decoration: none;
  color: var(--portfolio-accent);
}

.echafaudage-realisation__meta {
  margin-bottom: 22px;
}

.echafaudage-realisation__project-name {
  margin: 0 0 8px;
  font-size: clamp(2rem, 3vw, 3rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1.1;
  color: var(--portfolio-accent);
}

.echafaudage-realisation__project-category {
  margin: 0;
  color: var(--portfolio-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.echafaudage-realisation__description {
  max-width: 760px;
  margin: 16px 0 28px;
  color: #334148;
  line-height: 1.8;
}

.echafaudage-realisation__gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.echafaudage-realisation__gallery-item {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: zoom-in;
  background: #dfe5e8;
  min-height: 230px;
  border: 1px solid var(--portfolio-border);
  aspect-ratio: 4 / 3;
}

.echafaudage-realisation__gallery-item img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-height: 420px;
  object-fit: cover !important;
  max-width: none !important;
  object-position: center;
}

.echafaudage-realisation__gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.18));
  opacity: 0;
  transition: opacity var(--portfolio-transition);
}

.echafaudage-realisation__gallery-item:hover::after,
.echafaudage-realisation__gallery-item:focus-visible::after {
  opacity: 1;
}

.echafaudage-realisation__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8ecec, #dce2e5);
  border-radius: var(--portfolio-radius);
  color: var(--portfolio-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.echafaudage-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(11, 15, 18, 0.87);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.echafaudage-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.echafaudage-lightbox__inner {
  position: relative;
  width: min(1100px, 100%);
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.echafaudage-lightbox__figure {
  margin: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.echafaudage-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.03);
}

.echafaudage-lightbox__close,
.echafaudage-lightbox__nav {
  position: absolute;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.echafaudage-lightbox__close {
  top: 18px;
  right: 18px;
}

.echafaudage-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
}

.echafaudage-lightbox__nav--prev {
  left: 18px;
}

.echafaudage-lightbox__nav--next {
  right: 18px;
}

.echafaudage-lightbox__caption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  text-align: center;
  color: #f4f4f4;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.echafaudage-lightbox-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .echafaudage-realisation__grid,
  .echafaudage-realisation__gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .echafaudage-realisation__archive,
  .echafaudage-realisation__single {
    padding-left: 14px;
    padding-right: 14px;
  }

  .echafaudage-realisation__grid,
  .echafaudage-realisation__gallery {
    grid-template-columns: 1fr;
  }

  .echafaudage-lightbox {
    padding: 12px;
  }

  .echafaudage-lightbox__close,
  .echafaudage-lightbox__nav {
    width: 44px;
    height: 44px;
  }

  .echafaudage-lightbox__nav--prev {
    left: 8px;
  }

  .echafaudage-lightbox__nav--next {
    right: 8px;
  }

  .echafaudage-lightbox__caption {
    bottom: 10px;
    font-size: 0.75rem;
  }
}
