/* ============ Reset & base ============ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
/* Logo fixe en haut à gauche, présent sur toutes les pages */
.site-logo {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 100;            /* au-dessus de tout, même de la vidéo et du menu */
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-logo img {
  display: block;
  height: 48px;            /* ajuste selon ton logo */
  width: auto;
}

.site-logo:hover,
.site-logo:focus-visible {
  transform: scale(1.05);
  opacity: 0.9;
  outline: none;
}

@media (max-width: 900px) {
  .site-logo {
    top: 1rem;
    left: 1rem;
  }
  .site-logo img {
    height: 36px;
  }
}
:root {
  --bg: #1c1818;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.72);
  --radius-img: 14px;
  --max-width: 1280px;
  --gap: 1.5rem;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

/* ============ Navigation ============ */
.main-nav {
  width: 100%;
  padding: 2.5rem 4rem;
}

.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.main-nav a {
  color: var(--text);
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a[aria-current="page"] {
  opacity: 1;
  outline: none;
}

/* ============ Layout général ============ */
.page-3d {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 6rem;
}

.project__header {
  margin-bottom: 2.5rem;
}

.project__header h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.project__header p {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 780px;
}

/* ============ Grille 2×2 ============ */
.grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.grid-2x2 figure {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-img);
}

.grid-2x2 figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

.grid-2x2 figure:hover img {
  transform: scale(1.03);
}

/* ============ Lightbox ============ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lightbox[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.5rem;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.lightbox__close:hover {
  opacity: 1;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .main-nav {
    padding: 1.5rem;
  }
  .main-nav ul {
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }
  .main-nav a {
    font-size: 1rem;
  }

  .project__header h2 {
    font-size: 2rem;
  }

  .page-3d {
    padding: 1rem 1.5rem 3rem;
    gap: 3.5rem;
  }
}

@media (max-width: 500px) {
  .grid-2x2 {
    grid-template-columns: 1fr;
  }
}
