@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400;1,600;1,700&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&display=swap');

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* === VARIABLES === */
:root {
  --bg:         #0d0d0b;
  --bg-card:    #141412;
  --text:       #f2ede6;
  --muted:      #6b6760;
  --secondary:  #9e9890;
  --accent:     #c4b9a8;
  --border:     #222220;
  --serif:      'Cormorant Garamond', Georgia, serif;
  --sans:       'DM Sans', system-ui, sans-serif;
  --nav-h:      80px;
  --pad:        clamp(1.5rem, 5vw, 4rem);
}

/* === BASE === */
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* === NAV === */
nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* third column kept for visual centering */
  align-items: center;
  padding: 0 var(--pad);
  height: var(--nav-h);
  transition: background 0.4s ease, border-bottom 0.4s ease;
}
nav.scrolled {
  background: rgba(13, 13, 11, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  grid-column: 1;
  justify-self: start;
}
.nav-logo img {
  height: 36px;
  width: auto;
  display: block;
}
.footer-social {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.footer-social-link {
  display: flex;
  align-items: center;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-social-link:hover { color: var(--text); }
.footer-social-link svg { width: 18px; height: 18px; display: block; }

.nav-links {
  grid-column: 2;
  justify-self: center;
  display: flex;
  gap: 2.25rem;
  list-style: none;
}
.nav-links a {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

.hero-link {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
  z-index: 1;
}

/* === FILTER TABS === */
.filter-nav {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 4rem;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.filter-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0.75rem 2rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.filter-btn:hover { color: var(--text); }
.filter-btn.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* === MAIN WRAPPER === */
main { padding-top: var(--nav-h); }
main.hero-page { padding-top: 0; }

/* ===========================
   ACCUEIL
=========================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 3rem var(--pad) 5rem;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-tagline,
.hero-body { position: relative; }
.hero-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
  position: relative;
  height: 1.15em;
}
.hero-line {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.9s ease;
  white-space: nowrap;
}
.hero-body {
  margin-top: 5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: end;
}
.hero-body-text p {
  font-size: 1.05rem;
  color: var(--secondary);
  line-height: 1.8;
}
.hero-body-text p + p { margin-top: 1rem; }
.hero-body-action { display: flex; justify-content: flex-end; align-items: flex-end; }

/* === CTA BUTTON === */
.cta-btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  border: 1px solid var(--muted);
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}
.cta-btn:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ===========================
   RÉALISATIONS
=========================== */
.page-header {
  padding: 4rem var(--pad) 3rem;
  border-bottom: 1px solid var(--border);
}
.page-header h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2.5rem, 5vw, 4rem);
}
.isotope-grid {
  width: calc(100% - 2 * var(--pad));
  margin: 3rem auto 4rem;
  max-width: 1200px;
}
/* 3-column masonry base unit */
.grid-sizer   { width: calc(33.333% - 14px); }
.gutter-sizer { width: 20px; }

.project-card {
  width: calc(33.333% - 14px);
  margin-bottom: 20px;
}
/* Width2: spans 2 columns */
.project-card--width2 {
  width: calc(66.666% - 7px);
}

/* Thumb ratios */
.project-thumb              { aspect-ratio: 16/9; }
.project-card--height2 .project-thumb { aspect-ratio: 3/4; }
.project-card--width2  .project-thumb { aspect-ratio: 16/9; }

@media (max-width: 900px) {
  .grid-sizer  { width: calc(50% - 10px); }
  .gutter-sizer { width: 20px; }
  .project-card         { width: calc(50% - 10px); }
  .project-card--width2 { width: calc(100% - 0px); }
}
@media (max-width: 640px) {
  .grid-sizer   { width: 100%; }
  .gutter-sizer { width: 0; }
  .project-card,
  .project-card--width2 { width: 100%; }
  .project-thumb,
  .project-card--height2 .project-thumb,
  .project-card--width2  .project-thumb { aspect-ratio: 16/9; }
}
.project-card {
  cursor: pointer;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.25s, opacity 0.5s ease;
}
.project-card:hover { border-color: var(--muted); }
.project-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #161614;
}
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-thumb img { transform: scale(1.04); }
.thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1c1c19 0%, #111110 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.thumb-placeholder span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.875rem;
  color: var(--border);
  letter-spacing: 0.05em;
}
.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 13, 11, 0.35);
  opacity: 0;
  transition: opacity 0.25s;
}
.project-card:hover .play-overlay { opacity: 1; }
.play-overlay svg {
  width: 52px;
  height: 52px;
  color: var(--text);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}
.project-info {
  padding: 0.75rem 1.5rem 1rem;
}
.project-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.625rem;
  color: var(--text);
  margin-bottom: 0.625rem;
}
.project-client {
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 0.15rem;
}
.project-desc {
  font-size: 0.875rem;
  color: var(--secondary);
  line-height: 1.65;
}

/* ===========================
   STUDIO
=========================== */
.studio-layout {
  padding: 4rem var(--pad) 6rem;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 5rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}
.studio-photo {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}
.studio-photo img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  object-position: center top;
  filter: none;
}
.photo-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-placeholder span {
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.studio-copy p {
  font-size: 1.175rem;
  color: #ffffff;
  line-height: 1.85;
  margin-bottom: 1.75rem;
}
.studio-copy p:first-of-type {
  font-size: 1.375rem;
  color: #ffffff;
}
.studio-copy p.studio-tagline {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 2.5rem;
  line-height: 1.25;
  color: var(--text);
}

/* ===========================
   CONTACT
=========================== */
.contact-layout {
  min-height: calc(100vh - var(--nav-h));
  padding: 5rem var(--pad) 6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 820px;
}
.contact-layout h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.0;
  margin-bottom: 2.5rem;
}
.contact-intro {
  font-size: 1.05rem;
  color: var(--secondary);
  line-height: 1.8;
  max-width: 500px;
  margin-bottom: 3.5rem;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 2rem;
}
.contact-links a {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text);
  transition: color 0.2s;
}
.contact-links a:hover { color: var(--accent); }
.contact-address {
  margin-top: 1.75rem;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.8;
}
.contact-response {
  margin-top: 2rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-cta { margin-top: 3.5rem; }

/* ===========================
   MODAL
=========================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 9, 0.97);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal-inner {
  position: relative;
  width: 88vw;
  max-width: 1120px;
}
.modal-players {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}
.modal-players iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
}
.modal-players.single iframe.modal-iframe-2 { display: none; }
.modal-close {
  position: absolute;
  top: -2.75rem;
  right: 0;
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }
.modal-info {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.modal-client {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.modal-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 2rem;
  color: var(--text);
  white-space: nowrap;
}
.modal-desc {
  font-size: 1.25rem;
  color: #ffffff;
  line-height: 1.35;
}

/* ===========================
   FILM PAGE
=========================== */
.film-layout {
  max-width: 960px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3rem) var(--pad) 5rem;
}
.film-back {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2.5rem;
  transition: color 0.2s;
}
.film-back:hover { color: var(--text); }
.project-title a { color: inherit; text-decoration: none; }
.project-title a:hover { color: var(--accent); }
.film-video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #000;
  margin-bottom: 2.5rem;
}
.film-video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}
.film-category {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.film-title {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.2;
  margin-bottom: 0.4rem;
}
.film-client {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 2rem;
}
.film-desc {
  font-size: 1.1rem;
  line-height: 1.85;
  color: #ffffff;
  max-width: 680px;
}
@media (max-width: 640px) {
  .film-title { font-size: 2rem; }
  .film-desc { font-size: 1rem; }
}

/* ===========================
   FOOTER
=========================== */
footer {
  padding: 2rem var(--pad);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-logo {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: #ffffff;
}
.footer-tagline {
  font-size: 0.885rem;
  color: #ffffff;
  letter-spacing: 0.02em;
  text-align: center;
}
.footer-copy {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ===========================
   RESPONSIVE — TABLET (≤900px)
=========================== */
@media (max-width: 900px) {
  .studio-layout { grid-template-columns: 1fr; gap: 3rem; }
  .studio-photo { position: static; }
}

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

  /* Nav */
  :root { --nav-h: 90px; }
  nav {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem var(--pad);
    height: var(--nav-h);
  }
  .nav-logo { grid-column: unset; justify-self: unset; }
  .nav-logo img { height: 32px; }
  .nav-links {
    gap: 1.25rem;
    justify-content: center;
  }
  .nav-links a { font-size: 0.7rem; letter-spacing: 0.08em; }

  /* Hero */
  .hero-tagline { height: auto; }
  .hero-line {
    position: relative;
    display: block;
    left: auto;
    transform: none;
    white-space: normal;
    opacity: 1 !important;
  }

  /* Filter tabs */
  .filter-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    margin-top: 2rem;
  }
  .filter-btn { padding: 0.75rem 1rem; font-size: 0.72rem; }

  /* Portfolio grid */
  .isotope-grid { width: calc(100% - 2rem); margin-top: 2rem; }
  .grid-sizer   { width: 100%; }
  .gutter-sizer { width: 0; }
  .project-card { width: 100%; }

  /* Modal */
  .modal-inner {
    width: 96vw;
    aspect-ratio: unset;
  }
  .modal-inner iframe {
    aspect-ratio: 16/9;
    height: auto;
  }
  .modal-info { flex-direction: column; gap: 0.5rem; }
  .modal-close { top: -2rem; font-size: 0.7rem; }

  /* Studio */
  .studio-layout { padding: 3rem 1rem 4rem; gap: 2rem; }
  .studio-copy p { font-size: 0.9375rem; }

  /* Contact */
  .contact-layout { padding: 3rem 1rem 4rem; }
  .contact-links a { font-size: 1rem; }

  /* Footer */
  footer { flex-direction: column; gap: 0.75rem; text-align: center; }
}
