/* ZTI AGENCY — feuille de style */
:root {
  --noir: #0E0E0E;
  --blanc: #F2F0EB;
  --vert: #D4FF3F;
  --gris: #C9C6BE;
  --gris-fonce: #2A2A28;
  --surface: #1C1C1A;
  --max: 1280px;
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--noir);
  color: var(--blanc);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }

.eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--vert);
}

.display {
  margin: 0;
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--vert { background: var(--vert); color: var(--noir); }
.btn--ligne { border: 1px solid var(--blanc); color: var(--blanc); }
.btn--ligne:hover { background: var(--blanc); color: var(--noir); }
.btn--noir { background: var(--noir); color: var(--vert); }

/* ---------- Canvas 3D ---------- */
#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 3;
  pointer-events: none;
}

main, footer { position: relative; z-index: 2; }

/* ---------- Fondu entre deux sections ---------- */
#fade {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--noir);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
body.jumping #fade { opacity: 1; transition-duration: 0.25s; }

/* ---------- Chargement ---------- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--noir);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 32px;
  transition: opacity 0.8s ease 0.2s, visibility 0s linear 1s;
  pointer-events: none;
}
#loader span { font-size: 12px; font-weight: 700; letter-spacing: 0.2em; color: #8E8B84; }
#loader .bar { width: 180px; height: 3px; background: var(--gris-fonce); }
#loader .bar i { display: block; height: 100%; width: 0; background: var(--vert); transition: width 1.2s ease; }
body.ready #loader { opacity: 0; visibility: hidden; }
body.ready #loader .bar i { width: 100%; }
body.ready.leaving #loader {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0s;
}
body.leaving #loader .bar i { width: 0; transition: none; }

.loader__logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: auto;
  margin: -26px 0 0 -23px;
  animation: loaderSpin 1.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  filter: drop-shadow(0 0 14px rgba(212, 255, 63, 0.35));
}
@keyframes loaderSpin {
  0%   { transform: perspective(400px) rotateY(0deg) scale(1); }
  50%  { transform: perspective(400px) rotateY(180deg) scale(0.88); }
  100% { transform: perspective(400px) rotateY(360deg) scale(1); }
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  background: rgba(14, 14, 14, 0.55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.nav .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.nav__logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav__logo img { width: 30px; height: auto; }
.nav__logo span { font-size: 17px; font-weight: 800; font-stretch: 125%; letter-spacing: 0.04em; }
.nav__links { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.nav__links a { text-decoration: none; }
.nav__links a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Sections épinglées ---------- */
.pin { position: relative; }
.pin__inner {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

/* Accroche : le texte s'ouvre de part et d'autre du logo */
#hero { height: 240vh; }
.hero__split {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__split .display { font-size: clamp(2.6rem, 7vw, 7rem); }
.hero__left, .hero__right {
  position: absolute;
  top: 50%;
  opacity: var(--h, 0);
  transform: translateY(-50%);
}
.hero__left {
  right: 50%;
  text-align: right;
  transform: translate(calc((1 - var(--h, 0)) * 40%), -50%);
  padding-right: 4vw;
}
.hero__right {
  left: 50%;
  transform: translate(calc((var(--h, 0) - 1) * 40%), -50%);
  padding-left: 4vw;
}
.hero__right em { font-style: normal; color: var(--vert); }
.hero__intro {
  position: absolute;
  left: 32px; right: 32px; bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
  opacity: var(--h2, 0);
  transform: translateY(calc((1 - var(--h2, 0)) * 30px));
}
.hero__intro p { margin: 0; max-width: 480px; font-size: 1.15rem; color: var(--gris); }
.hero__intro .btns { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__scroll {
  position: absolute;
  left: 0; right: 0; bottom: 40px;
  text-align: center;
  font-size: 12px; font-weight: 700; letter-spacing: 0.2em; color: #8E8B84;
  opacity: calc(1 - var(--h, 0) * 3);
}

/* Services : un quart de tour du logo = un service */
#services { height: 420vh; }
.services__list {
  position: absolute;
  top: 50%;
  left: max(32px, calc((100vw - var(--max)) / 2 + 32px));
  transform: translateY(-50%);
  width: min(560px, 55vw);
}
.services__list .eyebrow { margin-bottom: 24px; }
.service { padding: 6px 0; }
.service h3 {
  margin: 0;
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  font-weight: 800;
  font-stretch: 125%;
  color: #3A3A38;
  transition: color 0.35s ease;
}
.service h3 span { font-size: 0.5em; vertical-align: middle; margin-right: 12px; }
.service p {
  margin: 0;
  max-height: 0;
  overflow: hidden;
  color: var(--gris);
  font-size: 1.05rem;
  opacity: 0;
  transition: max-height 0.45s ease, opacity 0.45s ease, margin 0.45s ease;
}
.service.is-on h3 { color: var(--blanc); }
.service.is-on h3 span { color: var(--vert); }
.service.is-on p { max-height: 120px; opacity: 1; margin: 8px 0 14px; }
.services__count {
  position: absolute;
  right: max(32px, calc((100vw - var(--max)) / 2 + 32px));
  bottom: 48px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: #8E8B84;
}
.services__count i { width: 22px; height: 4px; background: var(--gris-fonce); transition: background 0.3s; }
.services__count i.is-on { background: var(--vert); }

/* Plongée : la caméra traverse le logo vers le premier projet */
#dive { height: 260vh; }
.dive__media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dive__photo {
  width: 100%;
  height: 100%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8E8B84;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  transform: scale(calc(0.25 + var(--d, 0) * 0.75));
  opacity: var(--d, 0);
  border-radius: calc((1 - var(--d, 0)) * 24px);
}
.dive__title {
  position: absolute;
  left: max(32px, calc((100vw - var(--max)) / 2 + 32px));
  bottom: 48px;
  opacity: var(--d2, 0);
  transform: translateY(calc((1 - var(--d2, 0)) * 30px));
}
.dive__title .display { font-size: clamp(2.5rem, 6vw, 5.5rem); margin-top: 8px; }
.dive__title p { margin: 12px 0 0; max-width: 520px; color: var(--gris); font-size: 1.1rem; }

/* ---------- Projets ---------- */
.projects { background: var(--noir); padding: 120px 0; }
.section-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px;
  margin-bottom: 48px;
}
.section-head h2 { font-size: clamp(2.25rem, 4.5vw, 4rem); }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}
.card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; }
.card__img {
  height: 380px;
  background: var(--surface);
  border: 1px solid var(--gris-fonce);
  display: flex; align-items: center; justify-content: center;
  color: #8E8B84; font-size: 14px; font-weight: 700; letter-spacing: 0.14em;
  transition: transform 0.4s ease;
}
.card:hover .card__img { transform: scale(0.98); }
.card__tag { font-size: 13px; font-weight: 700; letter-spacing: 0.16em; color: #A8A49C; text-transform: uppercase; }
.card h3 { margin: 0; font-size: 1.6rem; font-weight: 800; font-stretch: 115%; }

/* ---------- À propos ---------- */
.about { border-top: 1px solid var(--gris-fonce); background: var(--noir); padding: 120px 0; }
.about .wrap { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.about__img {
  flex: 1 1 340px; height: 480px;
  background: var(--surface); border: 1px solid var(--gris-fonce);
  display: flex; align-items: center; justify-content: center;
  color: #8E8B84; font-size: 14px; font-weight: 700; letter-spacing: 0.14em;
}
.about__txt { flex: 999 1 480px; display: flex; flex-direction: column; gap: 20px; }
.about__txt h2 { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.05; text-wrap: balance; }
.about__txt p { margin: 0; max-width: 600px; font-size: 1.15rem; color: var(--gris); }

/* ---------- Contact ---------- */
.contact { background: var(--vert); color: var(--noir); min-height: 100vh; display: flex; align-items: center; padding: 120px 0; }
.contact .wrap { width: 100%; display: flex; flex-wrap: wrap; gap: 48px; justify-content: space-between; align-items: flex-start; }
.contact__txt { flex: 999 1 480px; display: flex; flex-direction: column; gap: 20px; }
.contact__txt h2 { font-size: clamp(2.8rem, 7vw, 6.5rem); }
.contact__txt .lead { margin: 0; font-size: 1.25rem; font-weight: 500; }
.contact__links { display: flex; flex-direction: column; gap: 6px; font-size: 1.15rem; font-weight: 700; }
.contact__space { flex: 1 1 320px; min-height: 360px; }

.form {
  flex: 1 1 100%;
  max-width: 560px;
  background: var(--noir);
  color: var(--blanc);
  padding: 28px;
  display: flex; flex-direction: column; gap: 16px;
}
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.form input, .form textarea {
  min-height: 46px; padding: 10px 14px;
  background: var(--surface); color: var(--blanc);
  border: 1px solid #55534F; font: inherit;
}
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--vert); outline-offset: 1px; }
.form button { border: 0; cursor: pointer; font: inherit; font-weight: 700; }

/* ---------- Pied de page ---------- */
.footer { background: var(--noir); }
.footer .wrap {
  padding-top: 32px; padding-bottom: 32px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  font-size: 14px; color: #A8A49C;
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .nav__links a:not(.btn) { display: none; }
  .hero__left, .hero__right {
    left: 0; right: 0; padding: 0 24px; text-align: center;
  }
  .hero__left { top: 22%; transform: translateY(calc((1 - var(--h, 0)) * 30px)); }
  .hero__right { top: auto; bottom: 30%; transform: translateY(calc((1 - var(--h, 0)) * -30px)); }
  .services__list { top: auto; bottom: 64px; transform: none; width: auto; right: 24px; left: 24px; }
  .services__count { top: 96px; bottom: auto; }
  .contact__space { display: none; }
}

/* ---------- Animations réduites ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .loader__logo { animation: none; }
  #hero, #services, #dive { height: auto; }
  .pin__inner { position: relative; height: auto; min-height: 100vh; }
  .hero__left, .hero__right, .hero__intro { --h: 1; --h2: 1; }
  .dive__photo { --d: 1; }
  .dive__title { --d2: 1; }
}
