:root {
  --bg: #0a0a0a;
  --bg-elev: #111;               /* subtle lift over bg */
  --fg: #f4f4f4;
  --fg-dim: #6a6a6a;
  --fg-mid: #9a9a9a;
  --line: #0a0a0a;
  --line-strong: #0a0a0a;
  --dots: #1f1f1f;
  --accent: #ff5722;
  --accent-soft: rgba(255, 87, 34, 0.16);
  --max: 1680px;
  --gap: 14px;
  --header-h: 84px;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-display: "Archivo Black", "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-text: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

::selection { background: var(--accent); color: #fff; }

/* ---------- decorative dots top-left ---------- */
.dots {
  position: fixed;
  top: 18px;
  left: 18px;
  display: flex;
  gap: 6px;
  z-index: 100;
}
.dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--dots);
}

/* ---------- animated background bars (HOLYPROD-style) ---------- */
.bg-bars {
  position: fixed;
  inset: 0;
  display: flex;
  z-index: 0;
  pointer-events: none;
}
.bg-bar {
  flex: 1;
  border-right: 1px solid #131313;
  position: relative;
  overflow: hidden;
}
.bg-bar:last-child { border-right: none; }
.bg-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -100%;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(255, 87, 34, 0.13), transparent);
  animation: barSweep 7s ease-in-out infinite;
  will-change: transform;
}
.bg-bar--1::after { animation-delay: 0s;   }
.bg-bar--2::after { animation-delay: 1.4s; }
.bg-bar--3::after { animation-delay: 0.7s; }
.bg-bar--4::after { animation-delay: 2.1s; }
.bg-bar--5::after { animation-delay: 0.35s; }

@keyframes barSweep {
  0%   { top: -100%; }
  45%  { top: 100%;  }
  100% { top: 100%;  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-bar::after { animation: none; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 32px 0 60px;
  height: var(--header-h);
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.brand-name { color: var(--fg); }
.brand-name--accent { color: var(--accent); }

.site-nav {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}
.site-nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--fg-mid);
  padding: 8px 14px;
  transition: color 0.18s;
  text-transform: uppercase;
}
.site-nav a::before { content: "[ "; opacity: 0.6; }
.site-nav a::after  { content: " ]"; opacity: 0.6; }
.site-nav a:hover,
.site-nav a.active { color: var(--fg); }
.site-nav a.active::before,
.site-nav a.active::after { color: var(--accent); opacity: 1; }

.contact-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #0a0a0a;
  background: var(--accent);
  padding: 12px 18px;
  border: none;
  transition: transform 0.18s, filter 0.18s;
}
.contact-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* ---------- Layout ---------- */
.app {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 32px 96px;
  min-height: calc(100vh - var(--header-h) - 80px);
}

/* ---------- Hero (home + section pages) ---------- */
.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 56px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.hero-left { flex: 1; min-width: 0; }
.hero-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.hero-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mid);
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  text-decoration: none;
  transition: color .2s, border-color .2s;
}
a.hero-tag:hover {
  color: var(--fg);
  border-color: var(--fg-mid);
}
.hero-tag--link {
  border-left: none;
  padding-left: 0;
  margin-left: 4px;
  display: flex;
  align-items: center;
  gap: 0;
}
.hero-tag--link::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 14px;
  background: var(--fg-mid);
  margin-right: 12px;
  flex-shrink: 0;
}
.hero-tag-accent {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-left: 0.35em;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 400; /* Archivo Black is single-weight */
  font-size: clamp(28px, 4.4vw, 70px);
  line-height: 0.92;
  letter-spacing: -0.015em;
  margin: 0;
  text-transform: uppercase;
}

/* compact hero (home: no big title) */
.hero--compact { padding-bottom: 28px; margin-bottom: 40px; }
.hero-title .accent { color: var(--accent); }
.hero-title .line { display: block; }

.hero-right {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-mid);
  white-space: nowrap;
}
.hero-right .num {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 36px;
  color: var(--fg);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {

  /* Header : brand + contact sur ligne 1, nav scrollable ligne 2 */
  .site-header {
    flex-wrap: wrap;
    height: auto;
    padding: 0 16px;
    gap: 0;
  }
  .brand {
    flex: 1;
    padding: 18px 0 18px 28px; /* 28px pour les dots fixes */
    font-size: 12px;
  }
  .contact-btn {
    align-self: center;
    padding: 9px 13px;
    font-size: 11px;
  }
  .site-nav {
    order: 3;
    flex: 0 0 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-top: 1px solid var(--line);
    margin: 0 -16px;
    padding: 4px 16px;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a {
    white-space: nowrap;
    padding: 8px 10px;
    font-size: 11px;
  }

  /* App : padding réduit */
  .app {
    padding: 28px 16px 56px;
  }

  /* Hero */
  .hero { flex-direction: column; align-items: flex-start; gap: 20px; }
  .hero-right { text-align: left; }
  .hero-tags { gap: 6px; }
  .hero-tag { font-size: 9px; padding: 5px 10px; }
  .hero-tag--link { margin-left: 2px; }
  .hero-right .num { font-size: 28px; }

  /* Footer */
  .site-footer {
    padding: 20px 16px;
  }

  /* Proj nav : empilement */
  .proj-head { flex-direction: column; align-items: flex-start; }
  .proj-meta { text-align: left; }
  .proj-nav { grid-template-columns: 1fr; }
  .proj-nav .next { text-align: left; align-items: flex-start; }
}

/* ---------- Mosaic (home + section views) ---------- */
.mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  grid-auto-rows: 8px;
  gap: 14px;
  grid-auto-flow: dense;
}
@media (max-width: 720px) {
  .mosaic { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

.tile {
  position: relative;
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  cursor: pointer;
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.tile:hover img {
  transform: scale(1.05);
}
.tile .meta {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 22px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.85) 100%);
  pointer-events: none;
}
.tile .meta-section {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s, transform 0.25s;
}
.tile .meta-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--fg);
  line-height: 1.1;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s 0.05s, transform 0.3s 0.05s;
}
.tile .meta-count {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mid);
  margin-top: 6px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s 0.1s, transform 0.3s 0.1s;
}
.tile:hover .meta-section,
.tile:hover .meta-name,
.tile:hover .meta-count {
  opacity: 1;
  transform: translateY(0);
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  transition: border-color 0.2s;
  pointer-events: none;
}
.tile:hover::after { border-color: var(--accent); }

.tile-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--accent);
  font-size: 32px;
  line-height: 1;
  pointer-events: none;
  z-index: 2;
  opacity: 0.7;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
  transition: opacity 0.2s, transform 0.2s;
}
.tile:hover .tile-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.15);
}

.proj-video video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.video-poster-wrap {
  position: relative;
  cursor: pointer;
  width: 100%;
}
.video-poster-wrap .video-poster {
  width: 100%;
  display: block;
}
.video-poster--blank {
  aspect-ratio: 16 / 9;
  background: #0d0d0d;
}
.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: none;
  background: none;
  color: var(--accent);
  font-size: 48px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
  padding: 0;
  line-height: 1;
}
.video-poster-wrap:hover .video-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.15);
}

/* ---------- Project page ---------- */
.proj-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.proj-head-left { flex: 1; min-width: 0; }
.proj-section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 12px;
  border: 1px solid var(--accent);
  margin-bottom: 22px;
}
.proj-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 2.6vw, 40px);
  line-height: 0.96;
  letter-spacing: -0.01em;
  margin: 0;
  text-transform: uppercase;
}
.proj-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mid);
  text-align: right;
  white-space: nowrap;
}
.proj-meta .num {
  display: block;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  color: var(--fg);
  letter-spacing: -0.005em;
  margin-bottom: 2px;
}
.project-images {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  margin-top: 24px;
}
.project-images figure {
  margin: 0;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  overflow: hidden;
}
.project-images img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Project description ---------- */
.proj-description {
  margin-top: 48px;
  padding: 28px 32px;
  border: 1px solid rgba(255, 87, 34, 0.25);
  background: rgba(255, 87, 34, 0.04);
}
.proj-description p {
  margin: 0;
  font-family: var(--font-text);
  font-size: 14px;
  line-height: 1.7;
  color: var(--fg-mid);
  letter-spacing: 0.01em;
}

/* ---------- Project nav (prev / home / next) ---------- */
.proj-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.proj-nav a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mid);
  padding: 18px 22px;
  border: 1px solid var(--line-strong);
  transition: all 0.18s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.proj-nav a:hover {
  color: var(--fg);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.proj-nav .label {
  color: var(--fg-dim);
  font-size: 9px;
  letter-spacing: 0.18em;
}
.proj-nav .name { color: var(--fg); font-size: 13px; }
.proj-nav .next { text-align: right; align-items: flex-end; }
.proj-nav .home {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 26px;
  background: var(--accent);
  color: #0a0a0a;
  font-weight: 700;
  border-color: var(--accent);
}
.proj-nav .home:hover { filter: brightness(1.1); }

/* ---------- Loader / empty ---------- */
.loader {
  text-align: center;
  font-family: var(--font-mono);
  color: var(--fg-dim);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 120px 0;
}
.loader a { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  padding: 28px 60px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  background: var(--bg);
}
.site-footer .role { color: var(--fg-mid); }
.site-footer a:hover { color: var(--accent); }
.footer-links { display: flex; gap: 20px; }

/* ---------- Très petits écrans (< 480px) ---------- */
@media (max-width: 480px) {
  .mosaic { grid-template-columns: 1fr; }
  .hero-title { font-size: clamp(24px, 8vw, 40px); }
}

/* ---------- Image fade-in ---------- */
.fade-in {
  opacity: 0;
  transition: opacity 0.6s ease;
}
.fade-in.loaded { opacity: 1; }
