/* ============================================================
   MAIN.CSS — Design system global Paolo Monnier Portfolio
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600&family=Playfair+Display:ital@1&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:        #0a0a0a;
  --surface:   #111111;
  --surface2:  #1a1a1a;
  --border:    #222222;
  --gold:      #c9a84c;
  --gold-light:#e8c96a;
  --white:     #f5f5f5;
  --grey:      #888888;
  --grey-dark: #333333;

  --font-title: 'Bebas Neue', sans-serif;
  --font-body:  'Inter', sans-serif;
  --font-accent:'Playfair Display', serif;

  --radius: 4px;
  --radius-lg: 12px;
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: 0.18s ease;

  --nav-h: 72px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
ul { list-style: none; }
input, textarea, select { font-family: inherit; }

/* Curseur natif — pas de custom cursor */

/* ── Page transition overlay ──────────────────────────────── */
#page-transition {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
}
#page-transition.active { opacity: 1; pointer-events: all; }

/* ── Navigation ────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  transition: background 0.4s, backdrop-filter 0.4s;
}
#nav.scrolled {
  background: rgba(10,10,10,0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--font-title);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: var(--white);
  transition: color var(--transition-fast);
}
.nav-logo span { color: var(--gold); }
.nav-logo:hover { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}
.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--grey);
  position: relative;
  transition: color var(--transition-fast);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Hamburger mobile */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 24px; height: 1.5px;
  background: var(--white);
  transition: transform var(--transition), opacity var(--transition);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.nav-mobile {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.nav-mobile.open { opacity: 1; pointer-events: all; }
.nav-mobile a {
  font-family: var(--font-title);
  font-size: clamp(2rem, 6vw, 3.5rem);
  letter-spacing: 0.1em;
  color: var(--grey);
  transition: color var(--transition-fast);
}
.nav-mobile a:hover { color: var(--gold); }

/* ── Layout helpers ─────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}
.pt-nav { padding-top: var(--nav-h); }

/* ── Section title ──────────────────────────────────────────── */
.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1;
  letter-spacing: 0.03em;
  color: var(--white);
}

/* ── Gold divider ────────────────────────────────────────────── */
.gold-line {
  width: 48px; height: 2px;
  background: var(--gold);
  margin: 20px 0;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.06);
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.btn:hover::before { opacity: 1; }

.btn-gold {
  background: var(--gold);
  color: #0a0a0a;
}
.btn-gold:hover { background: var(--gold-light); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* ── Filter bar (shared: projects + library) ─────────────────── */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 24px;
}
.filter-btn {
  padding: 10px 24px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: transparent;
  color: var(--grey);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover {
  border-color: var(--gold);
  color: var(--white);
}
.filter-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #0a0a0a;
}

/* ── Cards génériques ────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 20px 60px rgba(201, 168, 76, 0.1);
}
.card-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  transition: transform var(--transition);
}
.card:hover .card-img { transform: scale(1.04); }
.card-body { padding: 20px; }
.card-category {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.card-title {
  font-family: var(--font-title);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
}

/* ── Scroll reveal (classes appliquées par GSAP) ──────────── */
.reveal { opacity: 0; transform: translateY(40px); }
.reveal-left { opacity: 0; transform: translateX(-40px); }
.reveal-right { opacity: 0; transform: translateX(40px); }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── Social sidebar fixe (toutes les pages) ─────────────────── */
#hero-socials {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  z-index: 500;
}
#hero-socials::before,
#hero-socials::after {
  content: '';
  display: block;
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(201,168,76,0.35));
}
#hero-socials::after {
  background: linear-gradient(to top, transparent, rgba(201,168,76,0.35));
}
.hero-social-btn {
  width: 38px; height: 38px;
  border: 1px solid rgba(245,245,245,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(245,245,245,0.3);
  font-size: 0.8rem;
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
  pointer-events: none;
  text-decoration: none;
}
.hero-social-btn.linked {
  color: rgba(245,245,245,0.55);
  border-color: rgba(245,245,245,0.2);
  pointer-events: auto;
}
.hero-social-btn.linked:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-3px);
}
@media (max-width: 768px) { #hero-socials { display: none; } }

/* ── Footer ─────────────────────────────────────────────────── */
#footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-logo {
  font-family: var(--font-title);
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  color: var(--white);
}
.footer-logo span { color: var(--gold); }
.footer-copy {
  font-size: 0.75rem;
  color: var(--grey);
}
.footer-socials {
  display: flex;
  gap: 20px;
}
.footer-socials a {
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--grey);
  transition: var(--transition);
}
.footer-socials a:hover,
.footer-socials a.active:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-3px);
}
.footer-socials a:not(.active) {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* ── Lightbox ───────────────────────────────────────────────── */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(0,0,0,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 64px 80px 48px;
}
#lightbox.open { opacity: 1; pointer-events: all; }

#lightbox-inner {
  display: flex;
  gap: 56px;
  align-items: center;
  width: 100%;
  max-width: 1160px;
}

/* ── Côté gauche : image ── */
#lightbox-left {
  flex: 0 0 auto;
  max-width: 54%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#lightbox img {
  max-height: 78vh;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius);
  display: block;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}

/* ── Côté droit : infos ── */
#lightbox-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#lightbox-year {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-transform: uppercase;
}
#lightbox-title {
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  letter-spacing: 0.04em;
  line-height: 1;
}
#lightbox-sep {
  width: 36px;
  height: 2px;
  background: var(--gold);
  opacity: 0.5;
  border-radius: 2px;
}
#lightbox-desc {
  font-size: 0.88rem;
  color: var(--grey);
  line-height: 1.7;
  max-width: 400px;
}
#lightbox-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.lb-tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 4px;
  color: var(--grey);
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.lb-tag:hover { border-color: var(--gold); color: var(--white); }

#lightbox-nav {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
#lightbox-prev, #lightbox-next {
  font-size: 1rem;
  color: var(--grey);
  background: var(--surface);
  border: 1px solid var(--border);
  width: 42px; height: 42px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  cursor: pointer;
}
#lightbox-prev:hover, #lightbox-next:hover { border-color: var(--gold); color: var(--gold); }

#lightbox-close {
  position: absolute;
  top: 24px; right: 32px;
  font-size: 1.5rem;
  color: var(--grey);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast);
  line-height: 1;
}
#lightbox-close:hover { color: var(--gold); }

@media (max-width: 900px) {
  #lightbox { padding: 64px 24px 32px; }
  #lightbox-inner { flex-direction: column; gap: 28px; }
  #lightbox-left { max-width: 100%; width: 100%; }
  #lightbox img { max-height: 52vh; }
}

/* ── Toast notification ─────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 32px; right: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  padding: 16px 24px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  z-index: 9500;
  transform: translateX(calc(100% + 80px));
  transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
  max-width: 320px;
}
#toast.show { transform: translateX(0); }
#toast.error { border-left-color: #e74c3c; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  #nav { padding: 0 24px; }
  .container { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}
@media (max-width: 600px) {
  #nav { padding: 0 16px; }
  .container { padding: 0 16px; }
}
