/* Galerie publique + opérateur */
.gallery-page { padding: 2rem 0 3rem; }
.gallery-hero { margin-bottom: 1.5rem; }
.gallery-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 800;
}
.gallery-hero h1 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  color: var(--navy);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}
.gallery-hero p { margin: 0; color: var(--muted); }

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.1rem;
}
.album-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s;
}
.album-card:hover { transform: translateY(-2px); }
.album-cover {
  aspect-ratio: 4/3;
  background: linear-gradient(145deg, #d7e8f8, #0b2a4a);
  position: relative;
  overflow: hidden;
}
.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.album-cover .empty-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.85);
  font-weight: 700;
  padding: 1rem;
  text-align: center;
}
.album-meta { padding: 0.9rem 1rem 1.1rem; }
.album-meta h3 {
  margin: 0 0 0.25rem;
  font-family: var(--display);
  color: var(--navy);
  font-size: 1.2rem;
}
.album-card-desc {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.album-desc {
  margin: 0.65rem 0 0;
  color: var(--ink);
  background: var(--sky);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  line-height: 1.45;
}
.album-meta span { color: var(--muted); font-size: 0.85rem; }

.album-detail {
  margin-top: 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.1rem;
  box-shadow: var(--shadow);
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  margin-top: 0.85rem;
}
.photo-thumb {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer;
  position: relative;
  background: var(--sky);
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 18, 32, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2rem;
}
.lightbox.hidden { display: none; }
.lightbox img {
  max-width: min(960px, 92vw);
  max-height: 78vh;
  object-fit: contain;
  border-radius: 10px;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: 0;
  background: rgba(255,255,255,0.15);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 1.6rem;
  cursor: pointer;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: rgba(255,255,255,0.12);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  font-size: 1.8rem;
  cursor: pointer;
}
.lightbox-nav.prev { left: 1rem; }
.lightbox-nav.next { right: 1rem; }
.lightbox-cap { color: rgba(255,255,255,0.85); margin-top: 0.75rem; }

.op-album {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.op-album-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: end;
  margin-bottom: 0.85rem;
}
.op-album-head input[type="text"] {
  flex: 1;
  min-width: 180px;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.op-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.6rem;
}
.op-photo {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.op-photo img { width: 100%; height: 100%; object-fit: cover; }
.op-photo .del {
  position: absolute;
  top: 6px;
  right: 6px;
}
.home-gallery-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}
@media (max-width: 560px) {
  .lightbox-nav { display: none; }
}
