:root {
  --bg: #0d0a06;
  --bg-soft: #15110b;
  --bg-card: #1a160f;
  --ink: #f4ead8;
  --ink-soft: #c9bfa8;
  --ink-mute: #7d7560;
  --line: rgba(201, 162, 94, 0.15);
  --line-strong: rgba(201, 162, 94, 0.3);
  --gold: #c9a25e;
  --gold-bright: #e0bb74;
  --gold-deep: #9d7a3f;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Manrope', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(201, 162, 94, 0.08), transparent 60%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

/* ──────────── NAV ──────────── */
nav {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(13, 10, 6, 0.85);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.08em;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-mark {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

.nav-cta {
  background: transparent;
  color: var(--gold) !important;
  padding: 10px 22px;
  border: 1px solid var(--gold);
  border-radius: 2px;
  font-size: 12px;
  transition: all 0.3s;
}

.nav-cta:hover {
  background: var(--gold);
  color: var(--bg) !important;
}

/* ──────────── HERO ──────────── */
.hero {
  padding: 100px 0 60px;
  text-align: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 36px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
}

h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

h1 .gold {
  color: var(--gold);
  font-style: italic;
}

.hero-sub {
  font-size: clamp(16px, 1.3vw, 18px);
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.65;
  font-weight: 300;
}

/* ──────────── FILTERS ──────────── */
.filters-section {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 60px;
  position: sticky;
  top: 81px;
  background: rgba(13, 10, 6, 0.92);
  backdrop-filter: blur(12px);
  z-index: 50;
}

.filters {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 10px 20px;
  border-radius: 100px;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-btn:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.filter-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
}

.filter-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  opacity: 0.7;
}

/* ──────────── GALLERY ──────────── */
.gallery {
  padding: 0 0 120px;
}

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

.project {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  transition: all 0.4s ease;
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: scale(1);
}

.project.hidden {
  display: none;
}

.project:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5);
}

.project-image {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-soft), var(--bg));
}

/* Placeholder illustration SVG quand pas d'image */
.project-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  opacity: 0.25;
  transition: opacity 0.4s;
}

.project:hover .project-placeholder {
  opacity: 0.4;
}

.project-placeholder svg {
  width: 50%;
  height: 50%;
  stroke-width: 0.8;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project:hover .project-image img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(13, 10, 6, 0.9) 100%);
  opacity: 0;
  transition: opacity 0.4s;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px;
}

.project:hover .project-overlay {
  opacity: 1;
}

.project-zoom {
  color: var(--gold);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-info {
  padding: 24px 24px 28px;
  border-top: 1px solid var(--line);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.project-cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.05em;
}

.project-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.project-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.project-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 3px 8px;
  background: rgba(201, 162, 94, 0.08);
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--gold);
  letter-spacing: 0.05em;
}

/* ──────────── EMPTY STATE ──────────── */
.empty-state {
  display: none;
  text-align: center;
  padding: 80px 32px;
  color: var(--ink-mute);
}

.empty-state.show {
  display: block;
}

.empty-state-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

/* ──────────── LIGHTBOX ──────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(13, 10, 6, 0.96);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-content {
  max-width: 1100px;
  width: 100%;
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

.lightbox.open .lightbox-content {
  transform: translateY(0);
}

.lightbox-image {
  background: var(--bg);
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lightbox-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox-placeholder {
  color: var(--gold);
  opacity: 0.3;
}

.lightbox-placeholder svg {
  width: 200px;
  height: 200px;
  stroke-width: 0.6;
}

.lightbox-details {
  padding: 48px 40px;
  overflow-y: auto;
  max-height: 90vh;
}

.lightbox-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.lightbox-cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.lightbox-close {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.lightbox-close:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.lightbox-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.lightbox-section {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.lightbox-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.lightbox-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lightbox-section-title::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--gold);
}

.lightbox-section-content {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
  font-weight: 300;
}

.lightbox-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.lightbox-spec {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.spec-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  color: var(--ink);
  font-weight: 500;
}

.spec-value.gold {
  color: var(--gold);
}

.lightbox-cta {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--gold);
  color: var(--bg);
  text-decoration: none;
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.3s;
}

.lightbox-cta:hover {
  background: var(--gold-bright);
  transform: translateY(-1px);
}

/* ──────────── GALERIE MINIATURES LIGHTBOX ──────────── */
.lightbox-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.lightbox-thumb {
  width: 72px;
  height: 72px;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid var(--line);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lightbox-thumb:hover {
  border-color: var(--gold);
}

.lightbox-thumb.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201, 162, 94, 0.3);
}

.lightbox-thumb-caption {
  font-size: 12px;
  color: var(--ink-mute);
  font-style: italic;
  margin-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.03em;
}

/* ──────────── CTA BANNER ──────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 56px 48px;
  text-align: center;
  margin-top: 80px;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.cta-banner h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 16px;
  line-height: 1.1;
}

.cta-banner h2 .italic {
  font-style: italic;
  color: var(--gold);
}

.cta-banner p {
  color: var(--ink-soft);
  font-size: 17px;
  margin-bottom: 32px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 300;
}

.cta-banner .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--gold);
  color: var(--bg);
  text-decoration: none;
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.3s;
}

.cta-banner .btn:hover {
  background: var(--gold-bright);
  box-shadow: 0 0 30px rgba(201, 162, 94, 0.3);
  transform: translateY(-1px);
}

/* ──────────── FOOTER ──────────── */
footer {
  border-top: 1px solid var(--line);
  padding: 48px 0;
  color: var(--ink-mute);
  font-size: 12px;
  background: var(--bg-soft);
  text-align: center;
}

.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

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

  .lightbox-content {
    grid-template-columns: 1fr;
    max-height: 95vh;
    overflow-y: auto;
  }

  .lightbox-image {
    min-height: 350px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }

  .hero {
    padding: 60px 0 40px;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .nav-links {
    gap: 16px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 12px;
  }

  h1 {
    font-size: 44px;
  }

  .lightbox {
    padding: 12px;
  }

  .lightbox-details {
    padding: 32px 24px;
  }

  .lightbox-title {
    font-size: 28px;
  }

  .lightbox-specs {
    grid-template-columns: 1fr;
  }

  .cta-banner {
    padding: 40px 24px;
  }
}

/* ──────────── ANIMATIONS ──────────── */
.fade-in {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
