/* Loïc Kocher Peinture — Galerie filtrée (page Réalisations) */

#wa-gallery {
  font-family: var(--font-main), 'Segoe UI', sans-serif;
  color: #1a1410;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

#wa-gallery *,
#wa-gallery *::before,
#wa-gallery *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.wa-filters {
  background: #ffffff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 24px;
  border-bottom: 1px solid #e8e0d6;
}

.wa-filter-btn {
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #6b5a48;
  background: #f5f0e8;
  border: 1px solid #ddd4c4;
  border-radius: 24px;
  padding: 9px 20px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.wa-filter-btn:hover {
  background: #ede5d8;
  border-color: #c4a882;
  color: #3d2b1a;
}

.wa-filter-btn.wa-active {
  background: #1a1410;
  border-color: #1a1410;
  color: #c4a882;
}

.wa-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
}

.wa-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  background: #f5f0e8;
  transition: opacity 0.3s ease;
}

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

.wa-item.wa-placeholder {
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #a89a86;
  background: repeating-linear-gradient(
    135deg,
    #f5f0e8,
    #f5f0e8 10px,
    #efe7d9 10px,
    #efe7d9 20px
  );
  text-align: center;
  padding: 16px;
}

.wa-item.wa-placeholder i {
  font-size: 26px;
  color: #c4a882;
}

.wa-item.wa-placeholder span {
  font-size: 12px;
  letter-spacing: 0.4px;
  line-height: 1.4;
}

.wa-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.wa-item:hover img { transform: scale(1.06); }

.wa-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 20, 16, 0.75) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.wa-item:hover .wa-overlay { opacity: 1; }

.wa-overlay span {
  font-size: 14px;
  font-weight: 400;
  color: #fff;
  line-height: 1.3;
  letter-spacing: 0.3px;
}

#wa-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 20, 16, 0.95);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

#wa-lightbox.wa-lb-open { display: flex; }

.wa-lb-inner {
  position: relative;
  max-width: 960px;
  width: 100%;
}

.wa-lb-inner img {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  display: block;
}

.wa-lb-caption {
  font-size: 15px;
  font-weight: 300;
  color: #c4a882;
  text-align: center;
  margin-top: 14px;
  letter-spacing: 0.8px;
}

.wa-lb-close {
  position: absolute;
  top: -42px;
  right: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
  padding: 4px;
}

.wa-lb-close:hover { color: #fff; }

.wa-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.65);
  width: 44px;
  height: 44px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.wa-lb-nav:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.wa-lb-prev { left: -58px; }
.wa-lb-next { right: -58px; }

@media (max-width: 1100px) {
  .wa-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
  .wa-grid { grid-template-columns: repeat(2, 1fr); }
  .wa-filter-btn { font-size: 10px; padding: 12px 10px; letter-spacing: 1.2px; }
  .wa-lb-prev { left: -48px; }
  .wa-lb-next { right: -48px; }
}

@media (max-width: 480px) {
  .wa-grid { grid-template-columns: 1fr; }
  .wa-lb-prev,
  .wa-lb-next { top: auto; bottom: -58px; transform: none; }
  .wa-lb-prev { left: calc(50% - 52px); }
  .wa-lb-next { right: calc(50% - 52px); }
}
