.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 200;
  padding: 40px 20px 100px;
  overflow: hidden;
}

.lightbox.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: lightboxFadeIn 0.4s ease-out;
}

.lightbox.closing {
  animation: lightboxFadeOut 0.3s ease-in forwards;
}

@keyframes lightboxFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(8px);
  }
}

@keyframes lightboxFadeOut {
  from {
    opacity: 1;
    backdrop-filter: blur(8px);
  }
  to {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
}

body:has(.lightbox.active) {
  overflow: hidden;
  scrollbar-width: none;
}

body:has(.lightbox.active)::-webkit-scrollbar {
  display: none;
}

.lightbox-content {
  position: relative;
  width: 100%;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
}

/* Contrôles du lightbox */
.lightbox-controls {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  align-items: center;
  z-index: 201;
}

.lightbox-counter {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  min-width: 50px;
  text-align: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border-radius: 6px;
}

.lightbox-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.8rem;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  line-height: 1;
  backdrop-filter: blur(8px);
  border-radius: 8px;
  position: relative;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 1);
  transform: scale(1.08);
}

.lightbox-btn:active {
  transform: scale(0.96);
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  z-index: 202;
  backdrop-filter: blur(8px);
  border-radius: 8px;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 1);
  transform: scale(1.08);
}

.lightbox-close:active {
  transform: scale(0.96);
}

/* Responsive */
@media (max-width: 768px) {
  .lightbox {
    padding: 30px 15px 90px;
  }

  .lightbox-controls {
    bottom: 30px;
    gap: 12px;
  }

  .lightbox-btn {
    width: 36px;
    height: 36px;
    font-size: 1.6rem;
  }

  .lightbox-close {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 1.8rem;
  }

  .lightbox-counter {
    font-size: 0.75rem;
    padding: 6px 10px;
  }
}

/* ===========================
   DÉTAILS DU PROJET
=========================== */

/* HERO IMAGE SECTION */
.project-hero-section {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 !important;
}

.project-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.4) 100%);
  z-index: 1;
}

.project-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--warm-white);
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.project-hero-content .section-eyebrow {
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.8);
}

.project-hero-content .gallery-title {
  margin: 0;
  color: var(--warm-white);
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 400;
  line-height: 1.2;
}

/* INFOS DU PROJET */
.project-info-section {
  max-width: 1200px;
  margin: 30px auto 30px;
  padding: 0 clamp(20px, 5vw, 80px);
}

.project-meta-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 30px;
  row-gap: 0;
}

.meta-item h5 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px 0;
}

.meta-item p {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 300;
  line-height: 1.6;
  margin: 0;
}

.project-description-block {
  padding: clamp(20px, 5vw, 80px);
  margin: 30px auto;
  max-width: 1200px;
  background: var(--warm-white);
  display: block !important;
}

.project-description-block[style*="display: none"] {
  display: block !important;
}

.project-description {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.8;
  color: #2c2c2a !important;
  font-weight: 300;
  margin: 0;
  display: block !important;
  width: 100%;
  visibility: visible;
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .project-hero-section {
    height: 220px;
  }

  .project-hero-content {
    padding: 0 30px;
  }

  .project-hero-content .gallery-title {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
  }

  .project-info-section {
    margin: 40px auto 60px;
    padding: 0 clamp(15px, 4vw, 30px);
  }

  .project-meta-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    row-gap: 30px;
  }

  .meta-item h5 {
    font-size: 0.8rem;
  }

  .meta-item p {
    font-size: 0.9rem;
  }

  .project-description-block {
    margin: 40px 0 50px;
    padding: 0 clamp(15px, 4vw, 30px);
  }

  .project-description {
    font-size: 1rem;
  }
}
