/* ── Reset & Variables ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:     #080b12;
  --bg2:    #0e1420;
  --bg3:    #131a28;
  --accent: #00c8ff;
  --blue:   #0077ff;
  --text:   #e8eaf0;
  --muted:  #7a8499;
  --border: #1e2a3a;
  --radius: 14px;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 5vw;
  background: rgba(8,11,18,0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.nav-logo-img {
  height: 36px;
  width: auto;
  display: block;
  /* Le logo est noir → on l'inverse en blanc/cyan pour la nav sombre */
  filter: invert(1) brightness(1.8) sepia(0.4) hue-rotate(170deg);
}

.nav-logo span {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 5vw;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 65% 50%, rgba(0,119,255,0.13) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 25%, rgba(0,200,255,0.08) 0%, transparent 60%);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,200,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,200,255,0.035) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(0,200,255,0.35);
  padding: 0.35rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 1.2rem;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  max-width: 460px;
}

.accent { color: var(--accent); }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  background: linear-gradient(135deg, var(--blue), var(--accent));
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 8px;
  transition: opacity 0.2s, transform 0.18s;
}

.btn:hover { opacity: 0.85; transform: translateY(-2px); }

.btn-ghost {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid rgba(0,200,255,0.35);
  transition: background 0.2s, transform 0.18s;
}

.btn-ghost:hover { background: rgba(0,200,255,0.07); transform: translateY(-2px); }

/* ── Project Cards (accueil) ── */
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 6rem 5vw;
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
}

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s, transform 0.22s;
}

.card:hover {
  border-color: rgba(0,200,255,0.3);
  transform: translateY(-4px);
}

.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bg3);
  display: block;
}

.card-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--bg3), var(--bg2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.card-body {
  padding: 1.6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-num {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1;
  margin-bottom: 1.2rem;
}

.card-link {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* ── Tags ── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin-top: 0.5rem;
}

.tags li {
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.28rem 0.75rem;
  border-radius: 100px;
  background: rgba(0,200,255,0.08);
  color: var(--accent);
  border: 1px solid rgba(0,200,255,0.2);
}

/* ── Project Page ── */
.page-hero {
  padding-top: 120px;
  padding-bottom: 3rem;
  padding-left: 5vw;
  padding-right: 5vw;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  margin-bottom: 1.8rem;
  transition: color 0.2s;
}

.back-link:hover { color: var(--accent); }

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
}

.page-hero .sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 560px;
}

.project-content {
  max-width: 1080px;
  margin: 0 auto;
  padding: 4rem 5vw;
}

/* ── Galerie photos complète ── */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
  margin-bottom: 3rem;
}

/* Image large qui prend toute la largeur */
.photo-gallery .gallery-wide {
  grid-column: 1 / -1;
  max-height: 420px;
  object-fit: contain;
  background: #f5f5f5;
}

.photo-gallery img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg3);
  display: block;
}

@media (max-width: 600px) {
  .photo-gallery { grid-template-columns: 1fr; }
  .photo-gallery .gallery-wide { max-height: 280px; }
}

/* Images grid */
.img-grid-2 {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1rem;
  margin-bottom: 3rem;
}

.img-grid-2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg3);
  display: block;
  min-height: 220px;
}

/* Description block */
.desc-block {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  align-items: start;
}

.desc-block p {
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.8;
}

/* Video section */
.videos-section h2 {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.video-grid.single {
  grid-template-columns: minmax(0, 600px);
}

.video-grid video {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #000;
  display: block;
}

/* ── Contact page ── */
.contact-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 5vw;
}

.contact-box {
  max-width: 520px;
  width: 100%;
  text-align: center;
}

.contact-box h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.contact-photo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid rgba(0,200,255,0.4);
  box-shadow: 0 0 0 6px rgba(0,200,255,0.08), 0 8px 30px rgba(0,0,0,0.4);
  display: block;
  margin: 0 auto;
}

.contact-box p {
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

/* ── Lightbox ── */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

#lightbox .lb-img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  transform: scale(0.92);
  transition: transform 0.25s ease;
  border: none;
  cursor: default;
}

#lightbox.open .lb-img {
  transform: scale(1);
}

#lightbox .lb-close {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 1.1rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}

#lightbox .lb-close:hover { background: rgba(255,255,255,0.22); }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 2rem 5vw;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}

/* ══════════════════════════════════════
   HAMBURGER BUTTON
══════════════════════════════════════ */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  z-index: 101;
  position: relative;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}

/* Croix quand ouvert */
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 768px)
══════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Nav mobile ── */
  .nav-toggle { display: flex; }

  /* Masque les liens en desktop par défaut sur mobile */
  nav > ul { display: none; }

  #navLinks {
    /* Panneau qui descend depuis la barre nav */
    position: fixed;
    top: 62px; /* juste sous la nav */
    left: 0;
    right: 0;
    /* Hauteur auto selon contenu, max ~45% de l'écran */
    max-height: 45vh;
    overflow-y: auto;

    background: rgba(8, 11, 18, 0.96);
    border-bottom: 1px solid rgba(0, 200, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);

    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    display: flex;

    /* Animé vers le haut, caché */
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
    pointer-events: none;
  }

  #navLinks.open {
    clip-path: inset(0 0 0% 0);
    pointer-events: auto;
  }

  #navLinks li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  #navLinks li:last-child { border-bottom: none; }

  #navLinks li a {
    display: block;
    padding: 1rem 1.6rem;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    color: var(--text);
    text-transform: uppercase;
    font-weight: 500;
  }

  #navLinks li a.active { color: var(--accent); }
  #navLinks li a:hover  { background: rgba(0,200,255,0.06); color: var(--accent); }

  /* ── Layouts ── */
  .cards          { grid-template-columns: 1fr; }
  .img-grid-2     { grid-template-columns: 1fr; }
  .desc-block     { grid-template-columns: 1fr; gap: 1.5rem; }
  .video-grid     { grid-template-columns: 1fr; }
  .video-grid.single { grid-template-columns: 1fr; }
  .photo-gallery  { grid-template-columns: 1fr; }
  .photo-gallery .gallery-wide { max-height: 280px; }

  /* ── Hero ── */
  .hero { padding: 0 6vw; }
  .hero h1 { font-size: clamp(2.2rem, 10vw, 3.5rem); }

  /* ── Section pages projet ── */
  .page-hero { padding-top: 90px; }
  .project-content { padding: 2.5rem 5vw 4rem; }

  /* ── Cards accueil ── */
  .card-img { aspect-ratio: 4/3; }

  /* ── Galerie glassmorphism ── */
  .content-inner .photo-gallery,
  .content-inner .desc-block,
  .content-inner .videos-section {
    padding: 1.2rem;
    border-radius: 14px;
  }

  /* ── Section ── */
  .section { padding: 4rem 5vw; }

  /* ── Visualisateur — hints cachés ── */
  .mouse-hint { display: none; }

  /* ── Visualisateur — info modèle ── */
  .model-info { top: 80px; }
  .model-info h2 { font-size: 1.5rem; }

  /* ── Sélecteur modèle ── */
  .model-switcher { bottom: 1.5rem; }
  .model-btn { padding: 0.5rem 1rem; font-size: 0.78rem; }

  /* ── Contact ── */
  .contact-page { padding: 5rem 6vw; }
}

/* ── Extra small (≤ 420px) ── */
@media (max-width: 420px) {
  nav { padding: 0.9rem 5vw; }
  .nav-logo-img { height: 28px; }
  .nav-logo span { font-size: 0.85rem; }

  .hero h1 { font-size: 2rem; }
  .hero-sub { font-size: 0.95rem; }

  .btn, .btn-ghost { padding: 0.75rem 1.6rem; font-size: 0.85rem; }

  .tags li { font-size: 0.68rem; padding: 0.22rem 0.6rem; }
}
