/* ========================================
   PAGE RÉALISATIONS - STYLES SPÉCIFIQUES
   ======================================== */

/* ========================================
   HERO DE PAGE
   ======================================== */
.page-hero {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  margin-top: 80px;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(15, 42, 74, 0.92) 0%,
    rgba(15, 42, 74, 0.85) 100%
  );
}

.page-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 1rem;
}

.page-hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: #e5e7eb;
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
   INTRODUCTION
   ======================================== */
.realisations-intro {
  padding: 4rem 0 2rem;
  background: var(--white);
}

.intro-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 1.25rem;
}

.intro-text {
  font-size: 1.125rem;
  color: var(--gray-text);
  line-height: 1.7;
}

/* ========================================
   FILTRES
   ======================================== */
.filters-section {
  padding: 1.5rem 0 3rem;
  background: var(--white);
  position: sticky;
  top: 80px;
  z-index: 50;
  border-bottom: 1px solid var(--gray-border);
}

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--gray-light);
  color: var(--navy);
  border: 2px solid var(--gray-border);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.filter-btn.active {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
}

.filter-btn.active .filter-count {
  background: rgba(255, 255, 255, 0.25);
}

/* ========================================
   GALERIE
   ======================================== */
.gallery-section {
  padding: 4rem 0;
  background: var(--gray-light);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.gallery-item {
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.gallery-item.hidden {
  display: none;
}

.gallery-item.fade-out {
  opacity: 0;
  transform: scale(0.95);
}

/* Carte */
.gallery-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-border);
  transition: var(--transition);
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Image */
.gallery-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-img {
  transform: scale(1.08);
}

/* Overlay au survol */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 42, 74, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

.gallery-zoom {
  width: 56px;
  height: 56px;
  background: var(--orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  transform: scale(0.8);
}

.gallery-card:hover .gallery-zoom {
  transform: scale(1);
}

.gallery-zoom svg {
  width: 28px;
  height: 28px;
  color: var(--white);
}

/* Tag catégorie */
.gallery-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.375rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 2;
}

.tag-platrerie {
  background: #dbeafe;
  color: #1e40af;
}

.tag-peinture {
  background: #fef3c7;
  color: #92400e;
}

.tag-agencement {
  background: #d1fae5;
  color: #065f46;
}

/* Infos */
.gallery-info {
  padding: 1.5rem;
}

.gallery-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.gallery-info p {
  color: var(--gray-text);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

/* Message vide */
.gallery-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-text);
}

.gallery-empty svg {
  width: 64px;
  height: 64px;
  color: var(--gray-border);
  margin-bottom: 1rem;
}

.gallery-empty p {
  font-size: 1.125rem;
}

/* ========================================
   LIGHTBOX
   ======================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox[hidden] {
  display: none;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 210;
}

.lightbox-close:hover {
  background: var(--orange);
}

.lightbox-close svg {
  width: 24px;
  height: 24px;
  color: var(--white);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 210;
}

.lightbox-prev {
  left: 1.5rem;
}

.lightbox-next {
  right: 1.5rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--orange);
}

.lightbox-prev svg,
.lightbox-next svg {
  width: 24px;
  height: 24px;
  color: var(--white);
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  text-align: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: var(--white);
  font-size: 1rem;
  margin-top: 1rem;
  font-weight: 500;
}

/* ========================================
   CTA FINAL
   ======================================== */
.cta-section {
  padding: 5rem 0;
  background: var(--navy);
  color: var(--white);
}

.cta-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.cta-content h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.cta-content p {
  font-size: 1.125rem;
  color: #d1d5db;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}

.btn-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--orange);
  color: var(--white);
  padding: 1.25rem 2.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 10px 30px rgba(232, 93, 4, 0.4);
  transition: var(--transition);
}

.btn-cta-primary:hover {
  background: var(--orange-hover);
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(232, 93, 4, 0.5);
}

.btn-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--white);
  padding: 1.25rem 2.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  border: 2px solid var(--white);
  transition: var(--transition);
}

.btn-cta-secondary:hover {
  background: var(--white);
  color: var(--navy);
}

.btn-cta-primary svg,
.btn-cta-secondary svg {
  width: 20px;
  height: 20px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .cta-buttons {
    flex-direction: row;
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .filters-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }

  .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }

  .btn-cta-primary,
  .btn-cta-secondary {
    padding: 0.9rem 1.25rem;
    font-size: 1rem;
  }
}
