/* ============================================================
   ODDICY GALERIE, CSS page-specifique
   Scoped a #oddicy-galerie pour ne pas confliter avec
   oddicy-global.css (nav, footer, cursor, body).
   ============================================================ */

/* ── TOKENS ────────────────────────────────────────────── */
#oddicy-galerie {
  --black:    #080809;
  --deep:     #0e0e12;
  --surface:  #141418;
  --surface2: #1a1a20;
  --border:   rgba(255,255,255,0.07);
  --border2:  rgba(255,255,255,0.13);
  --violet:   #7c5cbf;
  --vlight:   #9b7dd4;
  --vdim:     rgba(124,92,191,0.12);
  --vglow:    rgba(124,92,191,0.06);
  --white:    #f0ede8;
  --muted:    rgba(240,237,232,0.40);
  --muted2:   rgba(240,237,232,0.65);
  --accent:   #c8b8e8;

  --f-serif: 'Cormorant Garamond', Georgia, serif;
  --f-sans:  'DM Sans', system-ui, sans-serif;
  --f-mono:  'DM Mono', 'Courier New', monospace;
  --f-type:  'Special Elite', 'Courier New', monospace;

  color: var(--white);
  font-family: var(--f-sans);
  font-weight: 300;
}

/* ── HERO ──────────────────────────────────────────────── */
.gal-hero {
  min-height: 70vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  position: relative; overflow: hidden;
  padding: 120px 40px 80px;
}
.gal-hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(80,50,140,.18) 0%, var(--black) 70%);
}
.gal-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size: 60px 60px;
}
.gal-hero-content { position: relative; z-index: 2; max-width: 680px; }
.gal-hero-stamp {
  display: inline-block;
  font-family: var(--f-type); font-size: 11px; letter-spacing: .28em;
  color: var(--vlight); border: 2px solid var(--vlight); padding: 5px 14px;
  transform: rotate(-1deg); margin-bottom: 32px; opacity: .85;
  text-transform: uppercase;
}
.gal-hero-agency {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .3em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.gal-hero-title {
  font-family: var(--f-serif);
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 300; line-height: .95;
  letter-spacing: -.02em; margin-bottom: 20px;
}
.gal-hero-title em {
  font-style: italic; color: var(--accent);
}
.gal-hero-sub {
  font-size: 17px; line-height: 1.7;
  color: var(--muted2); max-width: 480px; margin: 0 auto 32px;
}
.gal-hero-stats {
  display: flex; justify-content: center; gap: 48px;
  flex-wrap: wrap;
}
.gal-hero-stat {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.gal-hero-stat-val {
  font-family: var(--f-mono); font-size: 22px;
  font-weight: 500; color: var(--white);
}
.gal-hero-stat-label {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}

/* ── EDITION NAV (sticky) ──────────────────────────────── */
.gal-nav {
  position: sticky; top: 70px; z-index: 100;
  background: rgba(8,8,9,.92);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  transition: top .3s;
}
.gal-nav-inner {
  display: flex; align-items: center;
  gap: 0; overflow-x: auto;
  scrollbar-width: none;
  max-width: 1200px; margin: 0 auto;
}
.gal-nav-inner::-webkit-scrollbar { display: none; }
.gal-nav-link {
  flex-shrink: 0;
  padding: 16px 20px;
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .25s, border-color .25s;
  text-decoration: none !important;
}
.gal-nav-link:hover {
  color: var(--white);
}
.gal-nav-link.active {
  color: var(--accent);
  border-bottom-color: var(--violet);
}

/* ── EDITION SECTION ───────────────────────────────────── */
.gal-edition {
  max-width: 1400px; margin: 0 auto;
  padding: 80px 32px 40px;
}
.gal-edition.gal-will-animate {
  opacity: 0; transform: translateY(40px);
  transition: opacity .6s ease, transform .6s ease;
}
.gal-edition.revealed {
  opacity: 1 !important; transform: translateY(0) !important;
}

.gal-edition-header {
  display: flex; align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.gal-edition-title {
  font-family: var(--f-serif);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 300; line-height: 1.05;
  letter-spacing: -.01em;
}
.gal-edition-title em { font-style: italic; color: var(--accent); }
.gal-edition-meta {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 6px;
  flex-shrink: 0;
}
.gal-edition-year {
  font-family: var(--f-mono); font-size: 12px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.gal-edition-credit {
  font-family: var(--f-sans); font-size: 13px;
  color: var(--muted2);
}
.gal-edition-credit a {
  color: var(--vlight) !important;
  text-decoration: none !important;
  transition: color .2s;
}
.gal-edition-credit a:hover { color: var(--white) !important; }

.gal-edition-count {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: .14em; color: var(--muted);
  background: var(--vdim); padding: 4px 10px;
  border-radius: 2px;
}

/* ── MASONRY GRID ──────────────────────────────────────── */
.gal-grid {
  columns: 3;
  column-gap: 12px;
}
.gal-item {
  break-inside: avoid;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  cursor: pointer;
}
.gal-item.gal-will-animate {
  opacity: 0; transform: scale(.96);
  transition: opacity .5s ease, transform .5s ease;
}
.gal-item.loaded {
  opacity: 1 !important; transform: scale(1) !important;
}
.gal-item img {
  display: block; width: 100%; height: auto;
  transition: transform .4s cubic-bezier(.16,1,.3,1), filter .4s;
}
.gal-item:hover img {
  transform: scale(1.04);
  filter: brightness(1.1);
}
.gal-item::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,8,9,.5) 0%, transparent 40%);
  opacity: 0; transition: opacity .3s;
  pointer-events: none;
}
.gal-item:hover::after { opacity: 1; }

.gal-item-index {
  position: absolute; bottom: 10px; left: 12px;
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: .14em; color: rgba(240,237,232,.6);
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s, transform .3s;
  z-index: 2;
}
.gal-item:hover .gal-item-index {
  opacity: 1; transform: translateY(0);
}

/* ── EDITION DIVIDER ───────────────────────────────────── */
.gal-divider {
  display: flex; align-items: center;
  gap: 20px; max-width: 1400px;
  margin: 0 auto; padding: 20px 32px;
}
.gal-divider-line {
  flex: 1; height: 1px;
  background: var(--border);
}

/* ── LIGHTBOX ──────────────────────────────────────────── */
.gal-lightbox {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(8,8,9,.96);
  backdrop-filter: blur(32px);
  display: none; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .3s;
}
.gal-lightbox.open {
  display: flex; opacity: 1;
}
.gal-lightbox-img {
  max-width: 92vw; max-height: 88vh;
  object-fit: contain;
  border-radius: 3px;
  user-select: none;
  transition: transform .3s cubic-bezier(.16,1,.3,1);
}
.gal-lightbox-close {
  position: absolute; top: 20px; right: 24px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%; cursor: pointer;
  color: var(--white); font-size: 20px;
  transition: background .2s, border-color .2s;
  z-index: 2;
}
.gal-lightbox-close:hover {
  background: rgba(124,92,191,.2);
  border-color: var(--violet);
}
.gal-lightbox-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%; cursor: pointer;
  color: var(--white); font-size: 22px;
  transition: background .2s, border-color .2s;
  z-index: 2;
}
.gal-lightbox-arrow:hover {
  background: rgba(124,92,191,.2);
  border-color: var(--violet);
}
.gal-lightbox-prev { left: 20px; }
.gal-lightbox-next { right: 20px; }
.gal-lightbox-counter {
  position: absolute; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .14em; color: var(--muted);
  z-index: 2;
}
.gal-lightbox-caption {
  position: absolute; bottom: 48px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--f-sans); font-size: 14px;
  color: var(--muted2); z-index: 2;
  white-space: nowrap;
}

/* ── EMPTY STATE ───────────────────────────────────────── */
.gal-empty {
  text-align: center; padding: 60px 32px;
  color: var(--muted);
  font-family: var(--f-mono); font-size: 13px;
  letter-spacing: .08em;
  border: 1px dashed var(--border2);
  border-radius: 4px;
}

/* ── RESPONSIVE, TABLETTE (< 1100px) ─────────────────── */
@media (max-width: 1100px) {
  .gal-hero { padding: 110px 28px 60px; min-height: 55vh; }
  .gal-grid { columns: 2; }
  .gal-edition { padding: 60px 24px 32px; }
  .gal-edition-header { flex-direction: column; align-items: flex-start; }
  .gal-edition-meta { align-items: flex-start; }
  .gal-nav { padding: 0 16px; }
  .gal-nav-link { padding: 14px 16px; font-size: 10px; }
}

/* ── RESPONSIVE, MOBILE (< 768px) ────────────────────── */
@media (max-width: 768px) {
  .gal-hero { padding: 100px 20px 48px; min-height: 50vh; }
  .gal-hero-sub { font-size: 15px; }
  .gal-hero-stats { gap: 28px; }
  .gal-hero-stat-val { font-size: 18px; }
  .gal-grid { columns: 2; column-gap: 8px; }
  .gal-item { margin-bottom: 8px; }
  .gal-edition { padding: 48px 16px 24px; }
  .gal-edition-title { font-size: 28px; }
  .gal-nav { top: 58px; padding: 0 12px; }
  .gal-nav-link { padding: 12px 12px; font-size: 9px; letter-spacing: .08em; }
  .gal-lightbox-arrow { width: 36px; height: 36px; font-size: 16px; }
  .gal-lightbox-prev { left: 10px; }
  .gal-lightbox-next { right: 10px; }
  .gal-lightbox-close { top: 14px; right: 14px; width: 36px; height: 36px; }
  .gal-divider { padding: 12px 16px; }
}

/* ── RESPONSIVE, PETIT MOBILE (< 480px) ──────────────── */
@media (max-width: 480px) {
  .gal-hero { padding: 90px 16px 40px; }
  .gal-hero-title { font-size: 38px; }
  .gal-grid { columns: 1; }
  .gal-edition { padding: 36px 14px 20px; }
  .gal-edition-title { font-size: 24px; }
  .gal-nav-link { padding: 10px 10px; font-size: 9px; }
  .gal-hero-stats { gap: 20px; }
}
