:root {
  --bg: #0e0f11;
  --surface: #17191d;
  --text: #f0f2f5;
  --text-muted: #9aa0a6;
  --accent: #4ea8de;
  --border: #262930;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Header & Filtres */
.site-header {
  padding: 3.5rem 1.5rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.site-header h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-size: 0.95rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.8rem;
}

.filter-btn {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.filter-btn.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  font-weight: 500;
}

/* Grille Masonry responsive */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.gallery-grid {
  columns: 3 320px;
  column-gap: 1.25rem;
}

.photo-card {
  break-inside: avoid;
  margin-bottom: 1.25rem;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
}

.photo-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.35s ease, opacity 0.3s ease;
}

.photo-card:hover img {
  transform: scale(1.02);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, transparent 45%);
  opacity: 0;
  transition: opacity 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
}

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

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.card-meta {
  font-size: 0.8rem;
  color: #d0d4dc;
}

/* Lightbox plein écran */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 9, 11, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}

.lightbox.open {
  display: flex;
}

.lb-content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lb-content img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.lb-caption {
  width: 100%;
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.lb-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.lb-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 0.6rem;
}

.lb-exif {
  font-size: 0.85rem;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.lb-close, .lb-nav {
  position: fixed;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text);
  cursor: pointer;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lb-close:hover, .lb-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lb-close { top: 1.2rem; right: 1.5rem; font-size: 1.8rem; }
.lb-prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1.2rem; top: 50%; transform: translateY(-50%); }

/* Footer */
.site-footer {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

@media (max-width: 600px) {
  .lb-nav { width: 36px; height: 36px; font-size: 1.1rem; }
  .lb-prev { left: 0.5rem; }
  .lb-next { right: 0.5rem; }
}
