/* ==========================================================================
   Lkeria — Galerie photos annonce (/new/)
   Utilise les variables du design system (lkeria-design-system.css),
   avec valeurs de repli si non chargées.
   ========================================================================== */

.lk-gallery-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.lk-gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 20px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule, #e4ddd0);
}

.lk-gallery-back {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--pine-dark, #2f3e35);
  text-decoration: none;
  order: 1;
  width: 100%;
}

.lk-gallery-back:hover {
  color: var(--brass, #b8935f);
}

.lk-gallery-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 28px;
  margin: 0;
  color: var(--pine-dark, #2f3e35);
  order: 2;
}

.lk-gallery-ref {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  color: var(--brass, #b8935f);
}

.lk-gallery-count {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #7a7267;
  order: 3;
  margin-left: auto;
}

.lk-gallery-empty {
  font-family: 'Inter', sans-serif;
  padding: 60px 0;
  text-align: center;
  color: #7a7267;
}

/* Grid */
.lk-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.lk-photo-item {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  border-radius: var(--radius, 8px);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--paper-card, #f4f0e8);
  aspect-ratio: 4 / 3;
}

.lk-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.lk-photo-item:hover img {
  transform: scale(1.04);
}

.lk-photo-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(47, 62, 53, .85);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
}

/* Lightbox */
.lk-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 15, .95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
}

.lk-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lk-lb-stage {
  max-width: 92vw;
  max-height: 88vh;
}

.lk-lb-stage img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

.lk-lb-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  opacity: .8;
}

.lk-lb-close:hover { opacity: 1; }

.lk-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, .1);
  border: 2px solid rgba(255, 255, 255, .6);
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lk-lb-nav:hover {
  background: var(--brass, #b8935f);
  border-color: var(--brass, #b8935f);
}

.lk-lb-prev { left: 20px; }
.lk-lb-next { right: 20px; }

.lk-lb-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  background: rgba(0, 0, 0, .4);
  padding: 4px 12px;
  border-radius: 20px;
}

@media (max-width: 600px) {
  .lk-photo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .lk-lb-nav { width: 38px; height: 38px; font-size: 22px; }
  .lk-lb-prev { left: 8px; }
  .lk-lb-next { right: 8px; }
}
