/* ════════════════════════════════════════════
   PORTFOLIO — Marcel Dumas  ·  Sculpteur · Peintre
   Mobile first  |  Desktop 1440px
   ════════════════════════════════════════════ */


/* ── CUSTOM PROPERTIES ─────────────────────── */
:root {
  /* Colors */
  --black:    #0A0A0A;
  --white:    #FFFFFF;
  --gray-50:  #FAFAF9;
  --gray-100: #F4F3F0;
  --gray-200: #E5E3DE;
  --gray-400: #A09E99;
  --gray-600: #5C5A57;
  --accent:      #E8001D;
  --accent-dark: #C2001A;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --section-gap:   80px;
  --container-pad: 24px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 1440px) {
  :root {
    --section-gap:   160px;
    --container-pad: 80px;
  }
}


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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--black);
  background-color: var(--white);
  overflow-x: hidden;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a    { color: inherit; text-decoration: none; }
ul   { list-style: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }


/* ── UTILITIES ─────────────────────────────── */
.container {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.accent { color: var(--accent); }

.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 1.25rem;
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.75rem, 9vw, 6.5rem);
  line-height: 0.88;
  letter-spacing: -0.025em;
  margin-bottom: 2rem;
}

.body-text {
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--gray-600);
  margin-bottom: 1.25rem;
}


/* ── BUTTONS ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.875rem 1.75rem;
  border: 1px solid currentColor;
  transition: background-color 0.3s var(--ease),
              color 0.3s var(--ease),
              border-color 0.3s var(--ease);
}

.btn--primary {
  background-color: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn--primary:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn--outline {
  background-color: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn--outline:hover {
  background-color: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}


/* ── SCROLL REVEAL ──────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════ */
.header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  padding-block: 22px;
  transition: transform 0.4s var(--ease),
              padding-block 0.3s ease,
              background-color 0.3s ease,
              border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.header.is-scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--gray-200);
  padding-block: 16px;
}

.header.is-hidden {
  transform: translateY(-100%);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav__logo {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 101;
}

.nav__logo-img {
  height: 22px;
  width: auto;
}

.footer__logo {
  height: 20px;
  width: auto;
}

/* Hamburger */
.nav__toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px 2px;
  position: relative;
  z-index: 101;
}

.nav__bar {
  display: block;
  width: 26px;
  height: 1px;
  background-color: var(--black);
  transition: transform 0.35s var(--ease), opacity 0.3s ease;
}

.nav__toggle.is-open .nav__bar:first-child {
  transform: translateY(3px) rotate(45deg);
}
.nav__toggle.is-open .nav__bar:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

/* Mobile nav overlay */
.nav__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  position: fixed;
  inset: 0;
  background-color: var(--white);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
  z-index: 99;
}

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

.nav__link {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 9vw, 4rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--black);
  position: relative;
  transition: color 0.2s ease;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.35s var(--ease);
}

.nav__link:hover { color: var(--accent); }
.nav__link:hover::after { width: 100%; }

/* Desktop nav */
@media (min-width: 1440px) {
  .nav__toggle { display: none; }

  .nav__list {
    position: static;
    flex-direction: row;
    gap: 2.5rem;
    opacity: 1;
    pointer-events: auto;
    background: none;
  }

  .nav__link {
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
}


/* ════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: 80px;
  background-color: #FFEAEC;
}

.hero__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  padding-block: 40px;
}

/* Text */
.hero__discipline {
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 1rem;
}

.hero__name {
  line-height: 0.88;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}

.hero__firstname {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 12vw, 10rem);
  font-weight: 300;
  font-style: normal;
  color: var(--black);
}

.hero__lastname {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 22vw, 18rem);
  font-weight: 700;
  font-style: italic;
  color: var(--accent);
}

.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.375rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.55;
  color: var(--gray-600);
}

/* Visual */
.hero__visual {
  position: relative;
}

.hero__image-wrap {
  aspect-ratio: 4/5;
  overflow: hidden;
  background-color: var(--gray-200);
  position: relative;
  border-radius: 8px;
}

.hero__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__year {
  position: absolute;
  bottom: -1.5rem;
  right: 0;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--gray-400);
}

/* Scroll indicator */
.hero__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-block: 32px;
  color: var(--gray-400);
  transition: color 0.2s ease;
}

.hero__scroll:hover { color: var(--accent); }

.hero__scroll-line {
  display: block;
  width: 1px;
  height: 48px;
  background-color: currentColor;
  animation: pulse-line 2s ease-in-out infinite;
}

.hero__scroll-label {
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

@keyframes pulse-line {
  0%, 100% { transform: scaleY(1);   opacity: 1; }
  50%       { transform: scaleY(0.4); opacity: 0.3; }
}

/* Hero — Desktop */
@media (min-width: 1440px) {
  .hero__inner {
    flex-direction: row;
    align-items: center;
    gap: 80px;
  }

  .hero__text { flex: 1; }

  .hero__visual {
    width: 45%;
    flex-shrink: 0;
  }

  .hero__image-wrap {
    aspect-ratio: unset;
    height: 78vh;
  }
}



/* ════════════════════════════════════════════
   TRAVAUX
   ════════════════════════════════════════════ */
.travail {
  padding-block: var(--section-gap);
}

.travail__header {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 48px;
}

/* Filters */
.travail__filters {
  display: flex;
  width: fit-content;
  border: 1px solid var(--gray-200);
}

.filter {
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.625rem 1.375rem;
  color: var(--gray-600);
  border: none;
  background: none;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.filter + .filter {
  border-left: 1px solid var(--gray-200);
}

.filter.is-active {
  background-color: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.filter:not(.is-active):hover {
  color: var(--black);
}

/* Grid — bento */
.travail__grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 220px;
  grid-auto-flow: dense;
  gap: 20px;
}

/* Tailles : colonnes + rangées */
.work-card--md { grid-row: span 2; }
.work-card--lg { grid-row: span 2; }

@media (min-width: 768px) {
  .travail__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 240px;
  }

  .work-card--md,
  .work-card--lg { grid-column: span 2; }
}

@media (min-width: 1440px) {
  .travail__header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 64px;
  }

  .travail__grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 280px;
  }

  .work-card--md { grid-column: span 2; }
  .work-card--lg { grid-column: span 3; }
}

/* Work card */
.work-card {
  height: 100%;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.work-card.is-hidden {
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

/* Image — remplit sa cellule, pas d'aspect-ratio fixe */
.work-card__image {
  height: 100%;
  overflow: hidden;
  background-color: var(--gray-200);
  position: relative;
  border-radius: 8px;
}

.work-card__image img {
  transition: transform 0.7s var(--ease);
}

.work-card:hover .work-card__image img {
  transform: scale(1.06);
}

.work-card__info {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 40px 20px 20px;
  background: linear-gradient(to top, rgba(10,10,10,0.78) 0%, transparent 100%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

/* Desktop : hover */
@media (hover: hover) {
  .work-card:hover .work-card__info {
    opacity: 1;
    transform: translateY(0);
  }
}


.work-card__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--white);
}

.work-card__meta {
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  flex-shrink: 0;
}


/* ════════════════════════════════════════════
   CONTACT
   ════════════════════════════════════════════ */
.contact {
  padding-block: var(--section-gap);
  background-color: var(--black);
}

.contact__grid {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.contact__links {
  margin-top: 2.5rem;
  border-top: 1px solid var(--gray-200);
}

.contact__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.125rem;
  border-bottom: 1px solid var(--gray-200);
  transition: color 0.25s ease;
}

.contact__link:hover { color: var(--accent); }

.contact__link-label {
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-400);
  min-width: 90px;
  flex-shrink: 0;
}

.contact__link-value {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 300;
}

/* Form */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-400);
}

.form-input {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--white);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-block: 0.625rem;
  outline: none;
  width: 100%;
  -webkit-appearance: none;
  border-radius: 0;
  transition: border-color 0.25s ease;
}

.form-input::placeholder { color: rgba(255,255,255,0.3); }

.form-input:focus {
  border-bottom-color: var(--white);
}

.form-textarea {
  resize: none;
  line-height: 1.7;
}

/* Textes sur fond noir */
.contact .section-label   { color: rgba(255,255,255,0.4); }
.contact .section-heading { color: var(--white); }
.contact .body-text       { color: rgba(255,255,255,0.5); }
.contact .form-label      { color: rgba(255,255,255,0.4); }

/* Contact — Desktop */
@media (min-width: 1440px) {
  .contact__grid {
    flex-direction: row;
    align-items: flex-start;
    gap: 120px;
  }

  .contact__intro,
  .contact__form {
    flex: 1;
  }
}


/* ════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════ */
.footer {
  padding-block: 32px;
  background-color: var(--black);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__copy,
.footer__rights {
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}


/* ════════════════════════════════════════════
   LIGHTBOX
   ════════════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: rgba(10, 10, 10, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}

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

.lightbox__stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(92vw, 1200px);
  max-height: 90vh;
}

.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  transform: scale(0.97);
  transition: transform 0.4s var(--ease);
}

.lightbox.is-open .lightbox__img {
  transform: scale(1);
}

.lightbox__caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding-top: 16px;
}

.lightbox__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--white);
}

.lightbox__meta {
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

/* Boutons */
.lightbox__close {
  position: fixed;
  top: 24px;
  right: 24px;
  color: var(--white);
  opacity: 0.5;
  padding: 8px;
  transition: opacity 0.2s ease;
  z-index: 201;
}

.lightbox__close:hover { opacity: 1; }

.lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  color: var(--white);
  opacity: 0.4;
  padding: 16px 12px;
  transition: opacity 0.2s ease;
  z-index: 201;
}

.lightbox__nav:hover  { opacity: 1; }
.lightbox__nav:disabled { opacity: 0.1; pointer-events: none; }

.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }

/* Curseur pointer sur les cartes */
.work-card { cursor: pointer; }
