/* ============================================================
   nicolaslm.com — style.css
   Commun + Index + Projet
   ============================================================ */

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

:root {
  --black: #080808;
  --dark: #0f0f0f;
  --mid: #1a1a1a;
  --border: #222;
  --text: #c8c8c8;
  --text-dim: #8b8b8b;
  --white: #f0f0f0;
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--text);
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  cursor: none;
}

/* ============================================================
   CURSOR
   ============================================================ */
.cursor {
  position: fixed; width: 8px; height: 8px;
  background: var(--white); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  left: 0; top: 0; will-change: transform;
  transition: width .3s ease, height .3s ease, opacity .3s ease;
}
.cursor-ring {
  position: fixed; width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.3); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  left: 0; top: 0; will-change: transform;
  transition: width .3s ease, height .3s ease;
}
.cursor.hover { width: 4px; height: 4px; }
.cursor-ring.hover { width: 56px; height: 56px; border-color: rgba(255,255,255,0.6); }

/* ============================================================
   NAV
   ============================================================ */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100; padding: 32px 48px;
  display: flex; justify-content: space-between; align-items: center;
}
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-links { display: flex; gap: 40px; list-style: none; }
.nav-links a {
  font-size: 11px; letter-spacing: 0.2em; color: var(--white);
  text-decoration: none; text-transform: uppercase;
  opacity: 0.6; transition: opacity .3s;
}
.nav-links a:hover { opacity: 1; }
.nav-back {
  font-size: 10px; letter-spacing: 0.2em; color: var(--text-dim);
  text-decoration: none; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px; transition: color .3s;
}
.nav-back:hover { color: var(--white); }
.nav-back span { color: var(--white); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  padding: 24px 48px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
footer span {
  font-size: 10px; letter-spacing: 0.2em;
  color: var(--text-dim); text-transform: uppercase;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { to { opacity: 1; } }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); will-change: auto; }

/* ============================================================
   HERO — INDEX
   ============================================================ */
.hero { position: relative; width: 100%; height: 100vh; overflow: hidden; background: var(--black); }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(8,8,8,.2) 0%, rgba(8,8,8,0) 40%, rgba(8,8,8,.6) 80%, rgba(8,8,8,1) 100%);
}
.hero-content { position: absolute; bottom: 80px; left: 48px; right: 48px; }
.hero-title {
  font-family: 'Cormorant Garamond', serif; font-weight: 300;
  font-size: clamp(56px, 8vw, 120px); line-height: .9; color: var(--white);
  letter-spacing: -.02em; opacity: 0; transform: translateY(30px);
  animation: fadeUp 1.2s cubic-bezier(.16,1,.3,1) .3s forwards;
}
.hero-title em { font-style: italic; font-weight: 300; }
.hero-subtitle {
  margin-top: 20px; font-size: 11px; letter-spacing: .25em;
  text-transform: uppercase; color: var(--text-dim);
  opacity: 0; animation: fadeUp 1s ease .8s forwards;
}
.hero-scroll {
  position: absolute; bottom: 32px; right: 48px; font-size: 10px;
  letter-spacing: .3em; text-transform: uppercase; color: var(--text-dim);
  writing-mode: vertical-rl; opacity: 0; animation: fadeIn 1s ease 1.5s forwards;
}

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header {
  padding: 120px 48px 60px; display: flex;
  justify-content: space-between; align-items: flex-end;
  border-bottom: 1px solid var(--border);
}
.section-label { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--text-dim); }
.section-count { font-family: 'Cormorant Garamond', serif; font-size: 11px; color: var(--text-dim); letter-spacing: .1em; }

/* ============================================================
   WORK GRID — INDEX
   ============================================================ */
.work-grid { padding: 0 48px 120px; }
.project { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); overflow: hidden; }
.project:nth-child(even) { direction: rtl; }
.project:nth-child(even) > * { direction: ltr; }
.project-media { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--mid); }
.project-media video { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.16,1,.3,1), opacity .4s ease; opacity: 1; }
.project:hover .project-media video { transform: scale(1.04); opacity: 1; }
.project-info {
  padding: 48px; display: flex; flex-direction: column;
  justify-content: space-between; background: var(--dark);
  text-decoration: none; cursor: none; transition: background .3s ease;
}
.project:hover .project-info { background: #111; }
.project-meta { display: flex; flex-direction: column; gap: 8px; }
.project-footer { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 24px; }
.project-index { font-size: 10px; letter-spacing: .3em; color: var(--text-dim); }
.project-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(28px,3vw,48px); font-weight: 300; color: var(--white); line-height: 1.1; letter-spacing: -.01em; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag { font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim); border: 1px solid var(--border); padding: 4px 10px; }
.project-client { font-size: 11px; letter-spacing: .15em; color: var(--text-dim); text-transform: uppercase; }
.project-year { font-family: 'Cormorant Garamond', serif; font-size: 13px; color: var(--text-dim); }
.project-arrow { width: 40px; height: 40px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; transition: border-color .3s, background .3s; }
.project:hover .project-arrow { border-color: var(--white); background: var(--white); }
.project-arrow svg { width: 16px; height: 16px; }
.project-arrow svg path { stroke: var(--text-dim); fill: none; stroke-width: 1.5; transition: stroke .3s; }
.project:hover .project-arrow svg path { stroke: var(--black); }

/* VIDEO PLACEHOLDER */
.video-placeholder { width: 100%; height: 100%; background: var(--mid); display: flex; align-items: center; justify-content: center; }
.video-placeholder span { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim); }

/* ============================================================
   ABOUT — INDEX
   ============================================================ */
.about { padding: 120px 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 80px; border-top: 1px solid var(--border); }
.about-text h2 { font-family: 'Cormorant Garamond', serif; font-size: clamp(36px,4vw,64px); font-weight: 300; color: var(--white); line-height: 1.1; margin-bottom: 40px; }
.about-text h2 em { font-style: italic; }
.about-text p { font-size: 14px; line-height: 1.9; color: var(--text); margin-bottom: 20px; max-width: 480px; }
.about-details { padding-top: 8px; }
.about-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 24px 0; border-bottom: 1px solid var(--border); }
.about-row-label { font-size: 10px; letter-spacing: .25em; text-transform: uppercase; color: var(--text-dim); width: 120px; flex-shrink: 0; }
.about-row-value { font-size: 13px; color: var(--text); line-height: 1.7; text-align: right; }
.about-row-value strong { color: var(--white); font-weight: 400; }

/* ============================================================
   CONTACT — INDEX
   ============================================================ */
.contact { padding: 80px 48px 120px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: flex-end; }
.contact-cta h3 { font-family: 'Cormorant Garamond', serif; font-size: clamp(40px,5vw,80px); font-weight: 300; color: var(--white); line-height: 1; margin-bottom: 32px; }
.contact-cta h3 em { font-style: italic; }
.contact-email { display: inline-block; font-size: 13px; letter-spacing: .1em; color: var(--white); text-decoration: none; border-bottom: 1px solid var(--border); padding-bottom: 4px; transition: border-color .3s; }
.contact-email:hover { border-color: var(--white); }
.contact-links { display: flex; flex-direction: column; gap: 16px; text-align: right; }
.contact-links a { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim); text-decoration: none; transition: color .3s; }
.contact-links a:hover { color: var(--white); }

/* ============================================================
   PAGE PROJET
   ============================================================ */
.p-hero { position: relative; width: 100%; height: 100vh; overflow: hidden; background: var(--black); display: flex; align-items: flex-end; }
.p-hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; }

.p-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(8,8,8,0) 0%, rgba(8,8,8,0) 40%, rgba(8,8,8,.8) 80%, rgba(8,8,8,1) 100%);
}
.p-hero-index { position: absolute; top: 100px; right: 48px; font-size: 9px; letter-spacing: .3em; text-transform: uppercase; color: #333; }
.p-hero-content { position: relative; z-index: 2; padding: 0 48px 80px; width: 100%; display: flex; justify-content: space-between; align-items: flex-end; }
.p-hero-title {
  font-family: 'Cormorant Garamond', serif; font-weight: 300;
  font-size: clamp(48px,7vw,110px); line-height: .95; color: var(--white);
  letter-spacing: -.02em; opacity: 0; transform: translateY(30px);
  animation: fadeUp 1.2s cubic-bezier(.16,1,.3,1) .3s forwards;
}
.p-hero-meta { text-align: right; padding-bottom: 8px; }
.p-hero-client { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 4px; }
.p-hero-year { font-family: 'Cormorant Garamond', serif; font-size: 14px; color: #444; }

.p-tags { padding: 20px 48px; display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.p-tag { font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim); border: 1px solid #1e1e1e; padding: 4px 10px; }

.p-body { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
.p-desc { padding: 60px 48px; border-right: 1px solid var(--border); }
.p-desc-short { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 300; color: var(--white); line-height: 1.3; margin-bottom: 28px; }
.p-desc-long { font-size: 13px; line-height: 1.9; color: #888; }
.p-desc-long p { margin-bottom: 16px; }
.p-desc-long h2, .p-desc-long h3 { font-family: 'Cormorant Garamond', serif; font-weight: 300; color: var(--white); margin: 28px 0 12px; }
.p-specs { padding: 60px 48px; }
.p-spec-row { display: flex; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid #141414; align-items: baseline; }
.p-spec-label { font-size: 12px; letter-spacing: .25em; text-transform: uppercase; color: var(--text-dim); }
.p-spec-value { font-size: 11px; color: #888; text-align: right; line-height: 1.6; }

.p-main-media { padding: 0 48px 48px; }
.p-main-media img { width: 100%; height: auto; display: block; }
.p-youtube-wrap { position: relative; aspect-ratio: 16/9; width: 100%; }
.p-youtube-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

.p-gallery { padding: 0 48px 80px; }
.p-gallery-label { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: #333; padding: 40px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.p-gallery-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.p-gallery-grid[data-count="1"] { grid-template-columns: 1fr; }
.p-gallery-grid[data-count="2"] { grid-template-columns: 1fr 1fr; }
.p-gallery-grid[data-count="3"] { grid-template-columns: 2fr 1fr; grid-template-rows: auto auto; }
.p-gallery-grid[data-count="3"] .p-gallery-item:first-child { grid-row: 1 / 3; }
.p-gallery-grid[data-count="4"] { grid-template-columns: 1fr 1fr; }
.p-gallery-grid[data-count="5"],
.p-gallery-grid[data-count="6"] { grid-template-columns: 1fr 1fr 1fr; }
.p-gallery-grid[data-count="7"],
.p-gallery-grid[data-count="8"],
.p-gallery-grid[data-count="9"] { grid-template-columns: repeat(3, 1fr); }
.p-gallery-item { background: var(--mid); }
.p-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.p-next { padding: 48px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; text-decoration: none; transition: background .3s; }
.p-next:hover { background: #0d0d0d; }
.p-next-label { font-size: 9px; letter-spacing: .3em; text-transform: uppercase; color: #333; }
.p-next-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(24px,3vw,36px); font-weight: 300; color: var(--white); margin-top: 8px; }
.p-next-arrow { width: 40px; height: 40px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-dim); transition: border-color .3s, color .3s, background .3s; flex-shrink: 0; }
.p-next:hover .p-next-arrow { border-color: var(--white); background: var(--white); color: var(--black); }

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 768px) {
  nav { padding: 20px 24px; }
  .nav-links { gap: 24px; }
  footer { padding: 20px 24px; flex-direction: column; gap: 8px; }

  /* Hero index */
  .hero-content { left: 24px; right: 24px; bottom: 60px; }
  .hero-scroll { display: none; }

  /* Work grid */
  .section-header { padding: 80px 24px 40px; }
  .work-grid { padding: 0 0 80px; }
  .project { grid-template-columns: 1fr; direction: ltr !important; }
  .project-info { padding: 28px 24px; }
  .project-title { font-size: 28px; }

  /* About */
  .about { grid-template-columns: 1fr; gap: 48px; padding: 80px 24px; }

  /* Contact */
  .contact { flex-direction: column; align-items: flex-start; gap: 48px; padding: 60px 24px 80px; }
  .contact-links { text-align: left; }

  /* Page projet */
  .p-hero-index { display: none; }
  .p-hero-content { padding: 0 24px 60px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .p-hero-meta { text-align: left; }
  .p-tags { padding: 16px 24px; }
  .p-body { grid-template-columns: 1fr; }
  .p-desc { padding: 40px 24px; border-right: none; border-bottom: 1px solid var(--border); }
  .p-specs { padding: 32px 24px; }
  .p-main-media { padding: 0 24px 32px; }
  .p-gallery { padding: 0 24px 60px; }
  .p-gallery-grid[data-count="2"],
  .p-gallery-grid[data-count="3"],
  .p-gallery-grid[data-count="4"],
  .p-gallery-grid[data-count="5"],
  .p-gallery-grid[data-count="6"],
  .p-gallery-grid[data-count="7"],
  .p-gallery-grid[data-count="8"],
  .p-gallery-grid[data-count="9"] { grid-template-columns: 1fr; }
  .p-gallery-grid[data-count="3"] .p-gallery-item:first-child { grid-row: auto; }
  .p-next { padding: 32px 24px; }
  
}


a { color: inherit; text-decoration: none; }
a:visited { color: inherit; }