/* ===== Schnuffy — portfolio ===== */
:root {
  --bg: #0a0a0a;
  --bg-soft: #141414;
  --fg: #f2f2f2;
  --fg-dim: #8a8a8a;
  --accent: #c9a96e;
  --line: #262626;
  --maxw: 1280px;
  --serif: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.01em;
}

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

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem clamp(1.25rem, 4vw, 4rem);
  background: linear-gradient(180deg, rgba(10,10,10,0.9), rgba(10,10,10,0));
  transition: background .3s ease;
}
.site-header.scrolled {
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}
.brand a { color: var(--fg); }
.nav { display: flex; gap: clamp(1.2rem, 3vw, 2.8rem); }
.nav a {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  position: relative;
  padding: 0.25rem 0;
  transition: color .25s ease;
}
.nav a:hover, .nav a.active { color: var(--fg); }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width .3s ease;
}
.nav a:hover::after, .nav a.active::after { width: 100%; }
.nav-toggle { display: none; }

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 4rem);
}
.section { padding: clamp(5rem, 12vh, 9rem) 0; }
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; }
h2 { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 2rem; }

/* ---------- Home hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 0;
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.2) 35%, rgba(10,10,10,0.85) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding: 0 clamp(1.25rem, 4vw, 4rem) clamp(3rem, 8vh, 6rem);
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}
.hero .eyebrow { color: var(--accent); }
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 6rem);
  max-width: 16ch;
  margin-bottom: 1.8rem;
}
.hero p {
  max-width: 46ch;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: var(--fg);
  opacity: 0.9;
}
.hero .title-work {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-top: 1.2rem;
}
.scroll-cue {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* ---------- Statement (home) ---------- */
.statement p {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1.5;
  max-width: 30ch;
  color: var(--fg);
}
.statement .sig {
  margin-top: 2rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* ---------- Pages génériques ---------- */
.page-head { padding: 9rem 0 3rem; }
.page-head h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
}
.page-head p { color: var(--fg-dim); max-width: 50ch; margin-top: 1.2rem; }

/* ---------- Qui suis-je ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.about-portrait img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.about-text p { margin-bottom: 1.4rem; max-width: 60ch; }
.about-text p.lead {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.45;
  color: var(--fg);
}

/* ---------- Portfolio grid ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.filters button {
  background: none;
  border: none;
  color: var(--fg-dim);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  transition: color .25s;
}
.filters button:hover, .filters button.active { color: var(--fg); }
.filters button.active { color: var(--accent); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}
.work {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.work .frame {
  width: 100%;
  aspect-ratio: 4/5;
  background: var(--bg-soft);
  overflow: hidden;
}
.work .frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.7,.2,1), opacity .4s;
}
.work:hover .frame img { transform: scale(1.04); opacity: 0.85; }
.work .meta { margin-top: 1rem; }
.work .meta h3 { font-size: 1.15rem; }
.work .meta .yr {
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-top: .35rem;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw; max-height: 86vh;
  object-fit: contain;
}
.lightbox .lb-close {
  position: absolute; top: 1.5rem; right: 2rem;
  font-size: 2rem; color: var(--fg-dim); cursor: pointer;
}
.lightbox .lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 2.5rem; color: var(--fg-dim); cursor: pointer; user-select: none;
}
.lightbox .lb-prev { left: 2rem; }
.lightbox .lb-next { right: 2rem; }
.lightbox .lb-cap {
  position: absolute; bottom: 2rem; left: 0; right: 0;
  text-align: center; color: var(--fg-dim);
  font-size: 0.85rem; letter-spacing: 0.1em;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
}
.contact-list { list-style: none; }
.contact-list li {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-list .label {
  font-size: 0.72rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--fg-dim); margin-bottom: .5rem;
}
.contact-list a:hover { color: var(--accent); }
.contact-form { display: grid; gap: 1.2rem; }
.field { display: flex; flex-direction: column; gap: .5rem; }
.field label {
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-dim);
}
.field input, .field textarea {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1rem;
  padding: .85rem 1rem;
  border-radius: 2px;
  transition: border-color .25s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { min-height: 140px; resize: vertical; }
.btn {
  justify-self: start;
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
  padding: .9rem 2.2rem;
  cursor: pointer;
  transition: all .25s;
}
.btn:hover { background: var(--accent); color: var(--bg); }
.form-note { color: var(--fg-dim); font-size: 0.85rem; }

/* ---------- Form: honeypot, status, states ---------- */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.field input.error,
.field textarea.error { border-color: #c25450; }
.field input:focus.error,
.field textarea:focus.error { border-color: #c25450; }
.btn:disabled,
.btn.loading { opacity: 0.6; cursor: not-allowed; }
.form-status { min-height: 1.4rem; font-size: 0.9rem; margin-top: 0.3rem; }
.form-status.success { color: #8ec07c; }
.form-status.error   { color: #c25450; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0;
  margin-top: 4rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 4rem);
}
.site-footer .brand { font-size: 1.1rem; }
.site-footer small { color: var(--fg-dim); font-size: 0.78rem; letter-spacing: 0.1em; }
.social { display: flex; gap: 1.5rem; }
.social a { color: var(--fg-dim); font-size: 0.78rem; letter-spacing: 0.15em; text-transform: uppercase; }
.social a:hover { color: var(--fg); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(80vw, 320px);
    background: var(--bg);
    border-left: 1px solid var(--line);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 2.5rem;
    gap: 1.8rem;
    transform: translateX(100%);
    transition: transform .35s ease;
  }
  .nav.open { transform: translateX(0); }
  .nav a { font-size: 1rem; }
  .nav-toggle {
    display: block;
    position: relative;
    width: 28px; height: 22px;
    z-index: 60;
    background: none; border: none; cursor: pointer;
  }
  .nav-toggle span {
    position: absolute; left: 0; right: 0; height: 1px; background: var(--fg);
    transition: transform .3s;
  }
  .nav-toggle span:nth-child(1) { top: 4px; }
  .nav-toggle span:nth-child(2) { top: 50%; }
  .nav-toggle span:nth-child(3) { bottom: 4px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }
}