/* ============================================================
   Manable — site corporate immersif
   Charte : vert profond + sage + crème
   Arc : chaos sombre -> structure sage lumineuse
   ============================================================ */

:root {
  --cream:      #eef0f0;   /* texte clair (wordmark) */
  --cream-soft: rgba(238, 240, 240, 0.66);
  --cream-faint:rgba(238, 240, 240, 0.40);

  --green-950:  #050d0a;   /* fond le plus sombre (quasi-noir) */
  --green-900:  #0a1714;
  --green-850:  #122723;
  --green-800:  #1a3a35;   /* vert de marque */
  --green-700:  #244a42;
  --green-600:  #2f5d52;
  --green-line: rgba(238, 240, 240, 0.12);

  --sage:       #a7d086;   /* accent signature */
  --sage-bright:#bfe0a3;
  --sage-deep:  #8bb86a;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad:  clamp(1.25rem, 5vw, 4.5rem);
  --maxw: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  color: var(--cream);
  background: var(--green-950);
  line-height: 1.55;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

a { color: inherit; text-decoration: none; }
em { font-style: italic; }
::selection { background: var(--sage); color: var(--green-900); }

/* ---------- WebGL layers ---------- */
#gl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  z-index: 0;
  display: block;
}
#grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none;
  opacity: 0.045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(125% 105% at 62% 42%, transparent 38%, rgba(3, 9, 7, 0.78) 100%);
}
/* Scrim éditorial : assombrit la gauche (texte) et laisse rayonner la droite */
#scrim {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(100deg,
    var(--green-950) 0%,
    rgba(5, 13, 10, 0.86) 24%,
    rgba(5, 13, 10, 0.30) 52%,
    rgba(5, 13, 10, 0) 72%);
}
@media (max-width: 820px) {
  #scrim { background: linear-gradient(180deg, rgba(5,13,10,0.55) 0%, rgba(5,13,10,0.30) 40%, rgba(5,13,10,0.80) 100%); }
}

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.6rem; background: var(--green-950);
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}
#loader.is-done { opacity: 0; visibility: hidden; }
.loader__mark {
  width: 220px; max-width: 64vw; height: 96px;
  background-image: url("../assets/manable-icon.png");
  background-size: contain; background-repeat: no-repeat; background-position: center;
  animation: pulse 1.6s var(--ease) infinite;
}
@keyframes pulse { 0%,100%{opacity:.5;transform:scale(.96)} 50%{opacity:1;transform:scale(1)} }
.loader__bar { width: 140px; height: 1px; background: var(--green-line); overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 0%; background: var(--sage); transition: width 0.25s linear; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(0.9rem, 2.2vw, 1.4rem) var(--pad);
  transition: transform 0.7s var(--ease), opacity 0.7s var(--ease),
    background 0.5s, backdrop-filter 0.5s;
}
.site-header.is-hidden {
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
}
.site-header.is-solid {
  background: rgba(12, 31, 27, 0.7);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand__icon { width: 34px; height: 34px; display: block; }
.brand__word { height: 19px; display: block; }
/* Logo personnalisé WordPress (le thème injecte the_custom_logo) */
.brand--text { font-family: var(--serif); font-size: 1.25rem; color: var(--cream); letter-spacing: -0.01em; }
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { height: 34px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.1rem); }
.nav a {
  font-family: var(--serif); font-size: 1.02rem; font-weight: 400;
  letter-spacing: -0.01em; color: var(--cream-soft); transition: color 0.25s;
}
.nav a:hover { color: var(--cream); }
.nav__cta {
  font-family: var(--sans); font-size: 0.86rem;
  padding: 0.5rem 1.1rem; border: 1px solid var(--sage); border-radius: 999px;
  color: var(--sage) !important; transition: background 0.25s, color 0.25s;
}
.nav__cta:hover { background: var(--sage); color: var(--green-900) !important; }
@media (max-width: 680px) { .nav a:not(.nav__cta) { display: none; } }

/* ---------- Content / panels ---------- */
#content { position: relative; z-index: 10; }
.panel {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(6rem, 12vh, 10rem) var(--pad);
  max-width: var(--maxw); margin: 0 auto; width: 100%;
}
.panel--auto { min-height: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.74rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--sage); margin-bottom: 1.4rem; font-weight: 500;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--sage); opacity: 0.7; }

/* ---------- Hero ---------- */
.panel--hero { justify-content: flex-end; padding-bottom: clamp(5rem, 14vh, 9rem); }
.hero__title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.8rem, 9.5vw, 9rem); line-height: 0.96;
  letter-spacing: -0.035em; margin-bottom: 1.6rem; max-width: 16ch;
}
.hero__title .line { display: block; }
.hero__title em { color: var(--sage); font-weight: 400; }
.hero__sub {
  max-width: 50ch; font-size: clamp(1rem, 1.6vw, 1.22rem);
  color: var(--cream-soft); font-weight: 300; margin-bottom: 2.2rem;
}
.hero__actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; padding: 0.85rem 1.6rem;
  border-radius: 999px; font-size: 0.92rem; font-weight: 500;
  transition: transform 0.3s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--sage); color: var(--green-900); }
.btn--primary:hover { background: var(--sage-bright); }
.btn--ghost { border: 1px solid rgba(238, 240, 240, 0.28); color: var(--cream); }
.btn--ghost:hover { border-color: var(--cream); }

.scroll-hint {
  position: absolute; bottom: 2rem; right: var(--pad);
  display: flex; align-items: center; gap: 0.8rem;
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cream-faint);
}
.scroll-hint i {
  display: block; width: 1px; height: 42px;
  background: linear-gradient(var(--sage), transparent);
  transform-origin: top; animation: scrolldrop 2.2s var(--ease) infinite;
}
@keyframes scrolldrop {
  0% { transform: scaleY(0); opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(42px); opacity: 0; }
}

/* ---------- Stats ---------- */
.stats {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.2rem, 4vw, 3rem);
  border-top: 1px solid var(--green-line); border-bottom: 1px solid var(--green-line);
  padding: clamp(2rem, 6vh, 3.5rem) 0;
}
.stats li { display: flex; flex-direction: column; gap: 0.45rem; }
.stats__n {
  font-family: var(--serif); font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 300; line-height: 1; color: var(--cream);
}
.stats__n em { color: var(--sage); font-style: normal; }
.stats__l { font-size: 0.84rem; color: var(--cream-soft); max-width: 20ch; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 2rem; } }

/* ---------- Section heads ---------- */
.section-head { margin-bottom: clamp(2.5rem, 6vh, 4.5rem); max-width: 30ch; }
.section-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.2rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.025em;
}
.section-title em { color: var(--sage); }

/* ---------- Services ---------- */
.services { display: flex; flex-direction: column; gap: 0; }
.service {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: clamp(1rem, 4vw, 3.5rem); align-items: start;
  padding: clamp(1.8rem, 4vh, 2.8rem) 0;
  border-top: 1px solid var(--green-line);
  transition: background 0.4s;
}
.service:last-child { border-bottom: 1px solid var(--green-line); }
.service:hover { background: rgba(167, 208, 134, 0.04); }
.service__idx { font-family: var(--serif); font-size: 0.95rem; color: var(--sage); padding-top: 0.5rem; }
.service__main { max-width: 60ch; }
.service__name {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.7rem, 4vw, 2.8rem); letter-spacing: -0.02em; margin-bottom: 0.7rem;
}
.service__desc { color: var(--cream-soft); font-weight: 300; margin-bottom: 1.1rem; }
.service__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cream-soft); padding: 0.3rem 0.7rem;
  border: 1px solid var(--green-line); border-radius: 999px;
}
.service__arrow {
  font-size: 1.6rem; color: var(--cream); padding-top: 0.4rem;
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}
.service:hover .service__arrow { color: var(--cream); transform: translate(4px, -4px); }
@media (max-width: 760px) {
  .service { grid-template-columns: auto 1fr; }
  .service__arrow { display: none; }
}

/* ---------- Méthode ---------- */
.method-line {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2rem, 7vw, 5rem); line-height: 1.05; letter-spacing: -0.02em;
  color: var(--cream-soft); max-width: 14ch; margin-bottom: clamp(2.5rem, 6vh, 4rem);
}
.method-line b { color: var(--sage); font-weight: 300; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.2rem, 3vw, 2.5rem); }
.step { border-top: 1px solid var(--sage); padding-top: 1.1rem; }
.step__n { font-family: var(--serif); font-size: 0.9rem; color: var(--sage); }
.step h3 { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; margin: 0.5rem 0 0.6rem; }
.step p { color: var(--cream-soft); font-size: 0.9rem; font-weight: 300; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr 1fr; gap: 1.6rem; } }

/* ---------- Contact ---------- */
.panel--contact { justify-content: center; }
.contact__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.contact__title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.2rem, 5.5vw, 4.6rem); line-height: 1.02; letter-spacing: -0.03em; margin-bottom: 1.4rem;
}
.contact__title em { color: var(--sage); }
.contact__note { color: var(--cream-soft); font-weight: 300; margin-bottom: 1.8rem; max-width: 38ch; }
.contact__mail {
  font-family: var(--serif); font-size: clamp(1.3rem, 3.4vw, 2.2rem); font-style: italic;
  color: var(--sage); border-bottom: 1px solid transparent; transition: border-color 0.3s;
}
.contact__mail:hover { border-color: var(--sage); }

.form {
  display: flex; flex-direction: column; gap: 1rem;
  background: rgba(5, 13, 10, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--green-line); border-radius: 20px; padding: clamp(1.3rem, 3vw, 2rem);
}
.form input, .form textarea {
  width: 100%; background: rgba(238, 240, 240, 0.05);
  border: 1px solid rgba(238, 240, 240, 0.16); border-radius: 12px;
  padding: 0.9rem 1.1rem; color: var(--cream); font-family: var(--sans); font-size: 0.95rem;
  transition: border-color 0.25s, background 0.25s;
}
.form input::placeholder, .form textarea::placeholder { color: var(--cream-faint); }
.form input:focus, .form textarea:focus {
  outline: none; border-color: var(--sage); background: rgba(167, 208, 134, 0.06);
}
.form textarea { resize: vertical; min-height: 110px; }
.form button { align-self: flex-start; border: none; cursor: pointer; }
.form__status { font-size: 0.85rem; color: var(--sage); min-height: 1.2em; }

@media (max-width: 820px) { .contact__grid { grid-template-columns: 1fr; } }

.site-footer {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: 1rem; width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 2.5rem var(--pad); border-top: 1px solid var(--green-line);
  font-size: 0.82rem; color: var(--cream-faint); position: relative; z-index: 10;
}
.site-footer a:hover { color: var(--cream); }

/* ---------- Signature (révélation du mot manable) ---------- */
.panel--signature { justify-content: flex-end; align-items: center; text-align: center; padding-bottom: clamp(4rem, 12vh, 8rem); }
.signature__tagline {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.1rem, 2.4vw, 1.7rem); color: var(--cream-soft); letter-spacing: 0.01em;
}
.signature__tagline em { color: var(--sage); }

/* ---------- Réalisations ---------- */
.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.work {
  position: relative; display: flex; flex-direction: column;
  border: 1px solid var(--green-line); border-radius: 18px;
  padding: clamp(1.4rem, 2.5vw, 2rem); min-height: 260px;
  background: rgba(5, 13, 10, 0.45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  overflow: hidden; transition: transform 0.4s var(--ease), border-color 0.4s, background 0.4s;
}
.work::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(80% 80% at 70% 0%, rgba(167, 208, 134, 0.12), transparent 70%);
  transition: opacity 0.4s;
}
.work:hover { transform: translateY(-6px); border-color: rgba(167, 208, 134, 0.4); }
.work:hover::after { opacity: 1; }
.work__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: auto; }
.work__sector {
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sage); padding: 0.3rem 0.7rem; border: 1px solid var(--green-line); border-radius: 999px;
}
.work__year { font-size: 0.78rem; color: var(--cream-faint); }
.work__name {
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  letter-spacing: -0.01em; margin: 1.6rem 0 0.6rem;
}
.work__desc { color: var(--cream-soft); font-size: 0.92rem; font-weight: 300; margin-bottom: 1.1rem; }
.work__metric { font-size: 0.95rem; color: var(--cream-soft); }
.work__metric em { font-family: var(--serif); font-style: normal; font-size: 1.5rem; color: var(--sage); margin-right: 0.3rem; }
@media (max-width: 860px) { .works { grid-template-columns: 1fr; } }

/* ---------- Curseur custom ---------- */
@media (pointer: fine) {
  body { cursor: none; }
  a, button, input, textarea, .service, .work, [data-magnetic] { cursor: none; }
}
.cursor {
  position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none;
  width: 24px; height: 24px; margin: -12px 0 0 -12px;
  border-radius: 50%; border: 1.5px solid rgba(167, 208, 134, 0.6);
  opacity: 0; will-change: transform;
  transition: transform 0.14s var(--ease),
    width 0.3s var(--ease), height 0.3s var(--ease), margin 0.3s var(--ease),
    background 0.3s, border-color 0.3s, opacity 0.3s;
}
.cursor-on .cursor { opacity: 1; }
/* Survol d'un élément interactif : l'anneau enfle et se remplit doucement. */
.cursor-hover .cursor {
  width: 42px; height: 42px; margin: -21px 0 0 -21px;
  background: rgba(167, 208, 134, 0.12);
  border-color: var(--sage);
}
[data-magnetic] { transition: transform 0.25s var(--ease); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); will-change: opacity, transform; }
.reveal.is-in { opacity: 1; transform: none; }
.hero__title .line:nth-child(2) { transition-delay: 0.08s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint i, .loader__mark { animation: none; }
  #loader { transition: none; }
}
