/* ── Project Page — specific styles ───────────────────────── */

/* Hero banner */
.project-hero {
  position: relative;
  height: 70vh;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.project-hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.project-hero-gradient {
  position: absolute; inset: 0;
}
.project-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, #0b0c0e88 40%, transparent 100%);
}

/* ── Hero content : grid deux colonnes ───────────────────── */
.project-hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  align-items: end;
  gap: 0 48px;
  width: 100%;
  padding: 0 10vw 56px;
}

/* Lien retour : s'étend sur toute la largeur */
.project-back {
  grid-column: 1 / -1;
  margin-bottom: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.project-back:hover { color: var(--accent); }
.project-back svg { width: 14px; height: 14px; }

/* Colonne gauche : tags + titre + meta */
.project-hero-left {
  display: flex;
  flex-direction: column;
}

.project-hero-tags {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.project-hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 28px;
}
.project-hero-meta {
  display: flex; gap: 32px; flex-wrap: wrap;
  align-items: center;
}
.project-hero-meta-item {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-hero-meta-item span {
  color: var(--text);
  display: block;
  margin-top: 3px;
}

/* Colonne droite : icône du jeu */
.project-hero-icon-wrap {
  display: flex;
  align-items: flex-end;
  padding-bottom: 4px;
}
.project-hero-icon {
  width: clamp(120px, 14vw, 200px);
  height: clamp(120px, 14vw, 200px);
  object-fit: contain;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: #ffffff06;
  box-shadow:
    0 8px 40px #00000060,
    0 0 0 1px #ffffff08 inset;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
}
.project-hero-icon:hover {
  transform: scale(1.04) translateY(-4px);
  box-shadow:
    0 16px 60px #00000080,
    0 0 40px #5af0c420,
    0 0 0 1px #ffffff10 inset;
}

.project-fullwidth {
  max-width: none;          /* ← pas de max-width, comme .project-body */
  margin: 0 auto;
  padding: 0 10vw 80px;     /* ← même 10vw horizontal */
}


/* ── Main content layout ────────────────────────────────── */
.project-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  padding: 80px 10vw;
  align-items: start;
}

/* ── Left column ─────────────────────────────────────────── */
.project-main { }

/* Section titles */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 20px;
}

/* Prose */
.project-intro {
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--muted);
  margin-bottom: 48px;
}
.project-intro strong { color: var(--text); font-weight: 500; }

.project-section {
  margin-bottom: 64px;
}
.project-text {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--muted);
}
.project-text p + p { margin-top: 16px; }
.project-text strong { color: var(--text); font-weight: 500; }
.project-text ul {
  margin: 16px 0 16px 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.project-text li::marker { color: var(--accent); }

/* ── Video embed ─────────────────────────────────────────── */
.video-block {
  margin-bottom: 64px;
}
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.video-wrapper iframe,
.video-wrapper video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none;
}

/* Local video placeholder (when no real video) */
.video-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
  background: var(--surface);
  cursor: pointer;
  transition: background 0.2s;
}
.video-placeholder:hover { background: #1e2029; }
.video-play-btn {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.video-placeholder:hover .video-play-btn {
  background: var(--accent);
  transform: scale(1.05);
}
.video-play-btn svg { width: 28px; height: 28px; fill: var(--accent); margin-left: 4px; }
.video-placeholder:hover .video-play-btn svg { fill: var(--bg); }
.video-placeholder-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Image gallery ───────────────────────────────────────── */
.gallery-block {
  margin-bottom: 64px;
}
.gallery-grid {
  display: grid;
  gap: 12px;
}
.gallery-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.gallery-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.gallery-grid.cols-1 { grid-template-columns: 1fr; }

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: zoom-in;
  background: var(--surface);
}
.gallery-item.span-2 { grid-column: span 2; }
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, opacity 0.3s;
  aspect-ratio: 16/9;
}
.gallery-item.tall img { aspect-ratio: 4/3; }
.gallery-item.portrait img { aspect-ratio: 3/4; }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item-overlay {
  position: absolute; inset: 0;
  background: #0b0c0e00;
  transition: background 0.3s;
  display: flex; align-items: flex-end;
  padding: 16px;
}
.gallery-item:hover .gallery-item-overlay { background: #0b0c0e66; }
.gallery-caption {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s, transform 0.25s;
}
.gallery-item:hover .gallery-caption { opacity: 1; transform: translateY(0); }

/* Placeholder when no real image */
.gallery-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--surface);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  color: var(--muted);
}
.gallery-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: unset;
}
.gallery-placeholder svg { width: 36px; height: 36px; opacity: 0.3; }
.gallery-placeholder-text {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.4;
}

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0;
  background: #000000ee;
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius);
  transform: scale(0.95);
  transition: transform 0.25s;
}
.lightbox.open img { transform: scale(1); }
.lightbox-close {
  position: absolute; top: 24px; right: 28px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  background: none; border: none;
  transition: color 0.2s;
}
.lightbox-close:hover { color: var(--text); }
.lightbox-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: none; border: 1px solid var(--border);
  color: var(--muted);
  font-size: 1.2rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.lightbox-nav:hover { border-color: var(--accent); color: var(--accent); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
.lightbox-counter {
  position: absolute; bottom: 24px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--muted);
}

/* ── Sidebar (right column) ──────────────────────────────── */
.project-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
}
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
}
.sidebar-card-title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.sidebar-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 14px;
}
.sidebar-list li {
  display: flex; justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.sidebar-list-key {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}
.sidebar-list-val {
  font-size: 0.88rem;
  color: var(--text);
  text-align: right;
}
.sidebar-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.sidebar-cta {
  display: block;
  width: 100%;
  padding: 14px;
  text-align: center;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.22s;
  cursor: none;
}
.sidebar-cta:hover {
  background: transparent;
  color: var(--accent);
}
.sidebar-cta + .sidebar-cta {
  margin-top: 10px;
}
.sidebar-cta-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.sidebar-cta-secondary:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ── Key learnings / callout ─────────────────────────────── */
.callout {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 32px 0;
}
.callout-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.callout p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.75;
}
.callout p strong { color: var(--text); }

/* ── ROADMAP ─────────────────────────────────────────── */
.roadmap-image {
  width: 100%;
  margin: 24px 0 32px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: none;
}
.roadmap-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}
.roadmap-image:hover img {
  transform: scale(1.02);
}

.roadmap-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.roadmap-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.25s, transform 0.25s;
}
.roadmap-item:hover {
  transform: translateY(-2px);
}

.roadmap-item.done {
  border-top-color: #00f260;
}
.roadmap-item.progress {
  border-top-color: #ffb800;
}
.roadmap-item.planned {
  border-top-color: var(--muted);
}

.roadmap-status {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.roadmap-item.done .roadmap-status {
  background: rgba(0, 242, 96, 0.12);
  color: #00f260;
}
.roadmap-item.progress .roadmap-status {
  background: rgba(255, 184, 0, 0.12);
  color: #ffb800;
}
.roadmap-item.planned .roadmap-status {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.roadmap-content {
  width: 100%;
}
.roadmap-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text);
}
.roadmap-content p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--muted);
}

.roadmap-image {
  width: 100%;
  max-width: 900px;
  margin: 24px auto 32px;
  border-radius: var(--radius);
  overflow: hidden;
  border: none;              /* ← retire la bordure aussi */
  background: transparent;   /* ← plus de fond gris */
  cursor: none;
}


.roadmap-image img {
  width: 100%;
  height: auto;
  max-height: 600px;       /* ← limite la hauteur */
  object-fit: contain;     /* ← garde les proportions sans rogner */
  display: block;
  transition: transform 0.4s ease;
}

.roadmap-image:hover img {
  transform: scale(1.02);
}



/* ── Next / Prev project nav ─────────────────────────────── */
.project-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 64px 10vw 100px;
  border-top: 1px solid var(--border);
}
.project-nav-link {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.25s;
  display: flex; flex-direction: column; gap: 8px;
}
.project-nav-link:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.project-nav-dir {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-nav-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.project-nav-link.next { text-align: right; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .project-body {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 60px 24px;
  }
  .project-sidebar { position: static; }
}
@media (max-width: 768px) {
  .project-hero-content {
    padding: 0 24px 48px;
    grid-template-columns: 1fr;
  }
  .project-hero-icon-wrap {
    order: -1;                    /* icône au-dessus du titre sur mobile */
    justify-content: flex-start;
  }
  .project-hero-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
  }
  .gallery-grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .gallery-item.span-2 { grid-column: span 1; }
  .project-nav { padding: 48px 24px 80px; }
}
@media (max-width: 480px) {
  .gallery-grid.cols-2,
  .gallery-grid.cols-3 { grid-template-columns: 1fr; }
  .project-nav { grid-template-columns: 1fr; }
}