:root {
  --bg: #000;
  --text: #fff;
  --mono: 'DM Mono', monospace;
  --sans: 'DM Sans', sans-serif;
  --pad: clamp(16px, 5vw, 40px);
  --header-h: 54px;
  --banner-h: 40px;
  --flow-max: 800px;
  --media-max: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-top: var(--header-h);
}

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

/* ─── TYPOGRAPHIE ─── */

.t-mid {
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.5;
  color: #fff;
}

.t-mono {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #555;
}

/* ═══════════════════════
   HEADER
   ═══════════════════════ */

.header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: var(--header-h);
  left: 0;
  height: 3px;
  width: 0%;
  background: #1a466a;
  z-index: 999;
  transition: none;
  pointer-events: none;
}

.header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-h);
  padding: 0 var(--pad);
  max-width: 1400px;
  margin: 0 auto;
}

/* Left: name */
.header__left { justify-self: start; }

.header__name {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.3s;
}
.header__name:hover { opacity: 0.5; }

/* Center: toggle */
.header__center {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toggle__sep {
  font-family: var(--mono);
  font-size: 10px;
  color: #2a2a2a;
  user-select: none;
}

.toggle__btn {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #333;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.3s;
}

.toggle__btn:hover { color: #888; }
.toggle__btn.is-active { color: #fff; }

/* Right: contact */
.header__right { justify-self: end; }

.contact-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: none;
  color: #888;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
}

.contact-trigger:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}

/* Contact banner */
.contact-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  height: 0;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border-top: 1px solid rgba(255,255,255,0.06);
  transition: height 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.contact-banner.is-open {
  height: var(--banner-h);
}

.contact-banner__item {
  font-family: var(--mono);
  font-size: 12px;
  color: #888;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.25s;
}

.contact-banner__item:hover { color: #fff; }

.contact-banner__sep {
  color: #333;
  font-size: 10px;
}

/* ═══════════════════════
   VIEWS — show/hide
   ═══════════════════════ */

.view { display: none; }
.view.is-active { display: block; }

/* ═══════════════════════
   HERO
   ═══════════════════════ */

.hero {
  position: relative;
  width: 100%;
  height: 70vh;
  overflow: hidden;
}

.hero__video,
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ═══════════════════════
   INTRO
   ═══════════════════════ */

.intro {
  padding: 50px var(--pad);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.intro .t-mid {
  max-width: 600px;
  font-size: 18px;
}

.scroll-arrow {
  font-family: var(--mono);
  font-size: 24px;
  color: #333;
  text-decoration: none;
  transition: color 0.3s;
  animation: float 2s ease-in-out infinite;
}
.scroll-arrow:hover { color: #fff; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(10px); }
}

/* ═══════════════════════
   EDITORIAL FLOW
   ═══════════════════════ */

.flow {
  padding-top: 20px;
}

.flow__section {
  display: grid;
  grid-template-columns: 30fr 70fr;
  border-top: 1px solid rgba(255,255,255,0.05);
  max-width: var(--media-max);
  margin: 0 auto;
  padding: 60px var(--pad);
  gap: 40px;
  align-items: start;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

/* Text lives in the left margin */
.flow__text {
  order: -1; /* text first visually, even though media is first in HTML */
  position: sticky;
  top: calc(var(--header-h) + 40px);
  padding: 0;
}

/* ── Média ── */

.flow__media {
  overflow: hidden;
  border-radius: 4px;
}

.flow__media img,
.flow__media video {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
}

/* ── Carousel ── */

.carousel {
  position: relative;
}

.carousel__track {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 16 / 9;
  background: #111;
}

.carousel__slide {
  display: none;
  position: absolute;
  inset: 0;
}

.carousel__slide.is-active {
  display: block;
}

.carousel__slide img,
.carousel__slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel__nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.carousel__arrow {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  background: none;
  color: #555;
  font-size: 16px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
  line-height: 1;
  padding: 0;
}

.carousel__arrow:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}

.carousel__count {
  font-size: 11px;
  color: #444;
  letter-spacing: 0.08em;
  min-width: 32px;
  text-align: center;
}

/* ── Texte ── */

.flow__index {
  display: block;
  margin-bottom: 14px;
  font-size: 11px;
  color: #2a2a2a;
}

.flow__title {
  font-family: var(--sans);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 10px;
}

.flow__meta {
  display: block;
  margin-bottom: 20px;
}

.flow__text .t-mid {
  font-size: 15px;
  color: #888;
  line-height: 1.6;
}

.flow__subtitle {
  display: block;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  font-style: italic;
  color: #555;
  margin-bottom: 14px;
}

.flow__link {
  display: inline-block;
  margin-top: 16px;
  color: #555;
  text-decoration: none;
  transition: color 0.25s;
}

.flow__link:hover { color: #fff; }

.flow__partner {
  display: block;
  margin-top: 12px;
  color: #444;
}

/* ── Scroll reveal ── */

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════
   FOOTER
   ═══════════════════════ */

.footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  padding: 80px var(--pad) 60px;
  margin-top: 40px;
}

.footer .t-mono { display: block; margin-bottom: 20px; }

.footer__link {
  font-family: var(--sans);
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.3s;
}
.footer__link:hover { opacity: 0.5; }

/* ═══════════════════════
   GALLERY — MASONRY
   ═══════════════════════ */

.tags-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 32px var(--pad) 24px;
  max-width: var(--media-max);
  margin: 0 auto;
}

.tag-btn {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #444;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.tag-btn:hover {
  color: #aaa;
  border-color: rgba(255,255,255,0.15);
}

.tag-btn.is-active {
  color: #fff;
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}

/* CSS-only masonry via columns */
.masonry {
  max-width: var(--media-max);
  margin: 0 auto;
  padding: 0 var(--pad) 80px;
  columns: 3;
  column-gap: 16px;
}

.masonry__item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: opacity 0.35s, transform 0.35s;
}

.masonry__item.is-hidden {
  display: none;
}

/* Random aspect ratios for visual rhythm */
.masonry__item .ratio-frame {
  overflow: hidden;
}

.masonry__item.ratio-wide  { aspect-ratio: 16 / 9; }
.masonry__item.ratio-std   { aspect-ratio: 3 / 2; }
.masonry__item.ratio-tall  { aspect-ratio: 3 / 4; }
.masonry__item.ratio-square { aspect-ratio: 1 / 1; }

.masonry__item img,
.masonry__item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.masonry__item:hover img,
.masonry__item:hover video {
  transform: scale(1.03);
}

/* Tags overlay */
.masonry__tags {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 10px 12px;
  display: flex;
  gap: 6px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.masonry__item:hover .masonry__tags { opacity: 1; }

.masonry__tags span {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.1);
  padding: 3px 8px;
  border-radius: 3px;
}

/* ═══════════════════════
   LIGHTBOX
   ═══════════════════════ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}

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

.lightbox__content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img,
.lightbox__vid {
  max-width: 88vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
}

.lightbox__vid {
  display: none;
}

.lightbox__close {
  position: absolute;
  top: 20px; right: 24px;
  font-size: 22px;
  color: #666;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.25s;
  line-height: 1;
}
.lightbox__close:hover { color: #fff; }

.lightbox__project {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 8px 18px;
  border-radius: 20px;
  transition: color 0.25s, border-color 0.25s;
}

.lightbox__project:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 36px;
  color: #444;
  background: none;
  border: none;
  cursor: pointer;
  padding: 20px;
  transition: color 0.25s;
  user-select: none;
}

.lightbox__prev { left: 12px; }
.lightbox__next { right: 12px; }
.lightbox__prev:hover,
.lightbox__next:hover { color: #fff; }

/* ═══════════════════════
   RESPONSIVE
   ═══════════════════════ */

@media (max-width: 900px) {
  .masonry { columns: 2; }

  .flow__section {
    grid-template-columns: 35fr 65fr;
    gap: 28px;
    padding: 48px var(--pad);
  }
}

@media (max-width: 768px) {
  :root {
    --pad: 16px;
  }

  .header__inner {
    padding: 0 var(--pad);
  }

  .header__name { font-size: 11px; letter-spacing: 0.05em; }

  .toggle__btn {
    font-size: 10px;
  }

  .contact-trigger {
    width: 30px;
    height: 30px;
  }

  .flow__section {
    grid-template-columns: 1fr;
    padding: 40px var(--pad);
    gap: 24px;
  }

  .flow__text {
    order: 0; /* text below media on mobile */
    position: static;
  }

  .flow__title { font-size: 24px; }
  .flow__text .t-mid { font-size: 15px; }
  .footer__link { font-size: 22px; }

  .masonry { columns: 2; column-gap: 10px; }
  .masonry__item { margin-bottom: 10px; }

  .lightbox__prev { left: 4px; font-size: 28px; }
  .lightbox__next { right: 4px; font-size: 28px; }
}

@media (max-width: 480px) {
  .masonry { columns: 1; }
}