/* ============================================================
   KVLD PRODUCTION — sections (services, work, studio, grading, contact)
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* En-tête de section */
.section-head { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); max-width: 60ch; }
.section-title {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  letter-spacing: -0.02em;
  line-height: 0.98;
}
.section-lead {
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  max-width: 46ch;
}

/* Bouton générique */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 2rem;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.btn:hover { background: #fff; }
.btn:active { transform: scale(0.98); }

/* ============================================================
   SERVICES
   ============================================================ */
.services { padding: clamp(5rem, 12vw, 9rem) 0; border-top: 1px solid var(--hairline); }
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.service {
  background: var(--bg);
  padding: clamp(1.75rem, 3vw, 2.75rem);
  transition: background 0.4s var(--ease);
}
.service:hover { background: var(--bg-elev); }
.service i {
  font-size: 2.1rem;
  color: var(--text);
  display: block;
  margin-bottom: 1.1rem;
  opacity: 0.92;
}
.service h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.service p { color: var(--muted); font-size: 0.95rem; margin: 0; max-width: 32ch; }

.services__seo {
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  max-width: 78ch;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

/* ============================================================
   RÉALISATIONS
   ============================================================ */
.work { padding: clamp(5rem, 12vw, 9rem) 0; border-top: 1px solid var(--hairline); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.filter {
  padding: 0.5rem 1.15rem;
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.filter:hover { color: var(--text); border-color: var(--hairline-strong); }
.filter.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }

.work__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}
.card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-media);
  background: var(--bg-elev);
  cursor: pointer;
  text-align: left;
  border: none;
  padding: 0;
  width: 100%;
  color: var(--text);
}
.card img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
  transition: transform 0.7s var(--ease), filter 0.5s var(--ease);
}
.card:hover img { transform: scale(1.06); filter: saturate(1.05); }
.card__overlay {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  background: linear-gradient(180deg, transparent 40%, rgba(20,20,23,0.85) 100%);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.card:hover .card__overlay { opacity: 1; transform: translateY(0); }
.card__cat { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(242,240,235,0.75); }
.card__title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; margin-top: 0.2rem; color: #fff; }
.card.is-hidden { display: none; }
.card.is-entering { animation: cardIn 0.5s var(--ease) both; }
@keyframes cardIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }

/* ============================================================
   ÉTALONNAGE (avant / après + studio)
   ============================================================ */
.grading { padding: clamp(5rem, 12vw, 9rem) 0; border-top: 1px solid var(--hairline); }

.ba {
  position: relative;
  aspect-ratio: 1.9 / 1;
  overflow: hidden;
  border-radius: var(--radius-media);
  margin-bottom: 1.25rem;
  user-select: none;
  touch-action: pan-y;
  background: var(--bg-elev);
}
.ba__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Pas de filtre : on affiche les vraies images (brut REC 709 vs étalonné). */
.ba__before-wrap {
  position: absolute; inset: 0;
  width: 50%;
  overflow: hidden;
  border-right: 1px solid rgba(242,240,235,0.4);
}
.ba__before { width: 100vw; max-width: none; }
.ba__handle {
  position: absolute; top: 0; bottom: 0;
  left: 50%;
  width: 44px;
  transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center;
  cursor: ew-resize;
  z-index: 2;
}
.ba__handle::before { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(242,240,235,0.8); }
.ba__knob {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.ba__tag {
  position: absolute; bottom: 0.9rem;
  font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text);
  background: rgba(20,20,23,0.6);
  backdrop-filter: blur(6px);
  padding: 0.3rem 0.7rem; border-radius: var(--radius-pill);
  z-index: 1;
}
.ba__tag--before { left: 0.9rem; }
.ba__tag--after { right: 0.9rem; }

.studio-feature {
  position: relative;
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  border-radius: var(--radius-media);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.studio-feature__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 1s var(--ease);
}
.studio-feature:hover .studio-feature__img { transform: scale(1.07); }
.studio-feature__overlay {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.85rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  background:
    linear-gradient(180deg, rgba(26,26,29,0) 38%, rgba(26,26,29,0.88) 100%),
    linear-gradient(90deg, rgba(26,26,29,0.5) 0%, rgba(26,26,29,0) 55%);
}
.studio-feature__title {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  letter-spacing: -0.02em;
  color: #fff;
}
.studio-feature__text {
  margin: 0;
  max-width: 50ch;
  color: rgba(242,240,235,0.86);
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
}
.studio-feature__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}
.studio-feature__tags li {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--text);
  padding: 0.42rem 0.95rem;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  background: rgba(26,26,29,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact { padding: clamp(5rem, 12vw, 9rem) 0; border-top: 1px solid var(--hairline); background: var(--bg); }
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.contact__lead { color: var(--muted); margin: 1.2rem 0 2.5rem; max-width: 38ch; font-size: 1.05rem; }
.contact__list { list-style: none; margin: 0; padding: 0; }
.contact__list li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--hairline);
}
.contact__list li span:first-child { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.contact__list a, .contact__loc { font-size: 1.15rem; color: var(--text); transition: color 0.3s var(--ease); }
.contact__list a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

.contact__form { display: flex; flex-direction: column; gap: 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label { font-size: 0.82rem; letter-spacing: 0.04em; color: var(--muted); }
.field input, .field textarea {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-media);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  padding: 0.85rem 1rem;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--text); background: #26262b; }
.field__error { font-size: 0.8rem; color: #e0a39a; display: none; }
.field.is-invalid input, .field.is-invalid textarea { border-color: #c97f72; }
.field.is-invalid .field__error { display: block; }
.contact__form .btn { align-self: flex-start; margin-top: 0.5rem; }
.form__success { color: var(--text); font-size: 0.95rem; margin: 0.5rem 0 0; }
.form__error { color: #e0a39a; font-size: 0.9rem; margin: 0.5rem 0 0; }

/* ============================================================
   MODALE PROJET
   ============================================================ */
.modal {
  position: fixed; inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(10,10,12,0.82); backdrop-filter: blur(8px); }
.modal__panel {
  position: relative;
  width: min(960px, 100%);
  max-height: 90vh;
  background: var(--bg-elev);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  overflow: hidden;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.4s var(--ease);
}
.modal.is-open .modal__panel { transform: translateY(0) scale(1); }
.modal__close {
  position: absolute; top: 0.9rem; right: 0.9rem;
  z-index: 3;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(20,20,23,0.7);
  border: 1px solid var(--hairline);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  transition: background 0.3s var(--ease);
}
.modal__close:hover { background: rgba(20,20,23,1); }
.modal__scroll { overflow-y: auto; max-height: 90vh; padding: clamp(1.5rem, 4vw, 3rem); }
.modal__cat { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); }
.modal__title { font-size: clamp(1.8rem, 5vw, 3rem); letter-spacing: -0.02em; margin: 0.5rem 0 1.5rem; }
.modal__video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0e0e10;
  border-radius: var(--radius-media);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.modal__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal__video-ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.6rem; color: var(--faint); text-align: center; padding: 1rem;
}
.modal__video-ph i { font-size: 2.4rem; }
.modal__stills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}
.still {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-media);
  cursor: zoom-in;
  border: none; padding: 0; background: var(--bg);
}
.still img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.still:hover img { transform: scale(1.08); }
.modal__credits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}
.credit { display: flex; flex-direction: column; gap: 0.2rem; }
.credit__role { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.credit__val { color: var(--text); font-size: 0.98rem; }

/* Visionneuse de still */
.lightbox {
  position: fixed; inset: 0;
  z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
  background: rgba(8,8,10,0.94);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: var(--radius-media); cursor: pointer; }
.lightbox__close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(20,20,23,0.7); border: 1px solid var(--hairline);
  color: var(--text); font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(20,20,23,0.65); border: 1px solid var(--hairline);
  color: var(--text); font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s var(--ease);
  z-index: 2;
}
.lightbox__nav:hover { background: rgba(20,20,23,0.95); }
.lightbox__prev { left: 1.5rem; }
.lightbox__next { right: 1.5rem; }
.lightbox__counter {
  position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  font-size: 0.82rem; letter-spacing: 0.14em; color: var(--muted);
}
@media (max-width: 620px) {
  .lightbox__prev { left: 0.5rem; }
  .lightbox__next { right: 0.5rem; }
}

/* ============================================================
   RESPONSIVE SECTIONS
   ============================================================ */
@media (max-width: 980px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .work__grid { grid-template-columns: repeat(2, 1fr); }
  .contact__inner { grid-template-columns: 1fr; }
  .modal__stills { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .services__grid { grid-template-columns: 1fr; }
  .work__grid { grid-template-columns: 1fr; }
  .modal__stills { grid-template-columns: repeat(2, 1fr); }
  .modal__credits { grid-template-columns: 1fr; }

  /* Section studio : sur mobile on empile l'image puis le texte dessous,
     sinon l'overlay deborde d'une image 16/9 trop courte et le texte est coupe. */
  .studio-feature { aspect-ratio: auto; overflow: visible; }
  .studio-feature__img {
    position: relative;
    aspect-ratio: 16 / 9;
    height: auto;
    transform: none;
    border-radius: var(--radius-media);
  }
  .studio-feature:hover .studio-feature__img { transform: none; }
  .studio-feature__overlay {
    position: relative;
    inset: auto;
    padding: 1.35rem 0 0;
    background: none;
    gap: 0.7rem;
  }
}
