/* ==========================================================================
   Structure : en-tête, navigation, pied de page, voile de transition
   ========================================================================== */

/* --- En-tête -------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-header);
  transition:
    background-color var(--dur-3) var(--ease-out),
    box-shadow var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--c-line);
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease-out);
}

.site-header.is-stuck {
  background: rgba(247, 248, 244, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
}

.site-header.is-stuck::after {
  opacity: 1;
}

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

.scroll-progress {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}

.scroll-progress i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 80ms linear;
}

body.menu-open .site-header {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

body.menu-open .site-header::after {
  opacity: 0;
}

body.menu-open .scroll-progress {
  opacity: 0;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex: none;
}

.brand__mark {
  width: 42px;
  height: auto;
  transition: transform var(--dur-3) var(--ease-out);
}

.brand:hover .brand__mark {
  transform: rotate(-4deg) scale(1.04);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--c-ink);
}

.brand__sub {
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 2.4vw, 2.4rem);
}

.nav-link {
  position: relative;
  display: inline-block;
  padding-block: 0.4rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--c-body);
  transition: color var(--dur-2) var(--ease-out);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--c-ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-2) var(--ease-out);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--c-ink);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-link[aria-current="page"] {
  color: var(--c-ink);
}

.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--c-lime);
  height: 2px;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: none;
}

/* --- Boutons -------------------------------------------------------------- */

.btn {
  --btn-bg: var(--c-ink);
  --btn-fg: var(--c-paper);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.9rem 1.5rem;
  border: 1px solid var(--btn-bg);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.005em;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  transition:
    color var(--dur-2) var(--ease-out),
    border-color var(--dur-2) var(--ease-out),
    background-color var(--dur-2) var(--ease-out),
    transform var(--dur-2) var(--ease-out);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--grad-brand);
  transform: translateY(101%);
  transition: transform var(--dur-3) var(--ease-out);
}

.btn:hover::before,
.btn:focus-visible::before {
  transform: translateY(0);
}

.btn:hover,
.btn:focus-visible {
  color: var(--c-ink);
  border-color: transparent;
}

.btn:active {
  transform: scale(0.985);
}

.btn__arrow {
  display: inline-flex;
  transition: transform var(--dur-2) var(--ease-out);
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}

.btn--sm {
  padding: 0.65rem 1.1rem;
  font-size: 0.8125rem;
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--c-ink);
  border-color: var(--c-line);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: transparent;
}

.btn--light {
  --btn-bg: var(--c-paper);
  --btn-fg: var(--c-ink);
  border-color: var(--c-paper);
}

.btn--light:hover,
.btn--light:focus-visible {
  color: var(--c-ink);
  border-color: transparent;
}

.btn--outline-light {
  --btn-bg: transparent;
  --btn-fg: var(--c-paper);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn--outline-light:hover {
  color: var(--c-ink);
  border-color: transparent;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.btn--block {
  width: 100%;
}

/* Déplacement magnétique très léger (piloté en JS, desktop uniquement) */
.btn {
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
}

.btn:active {
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0) scale(0.985);
}

/* --- Lien fléché ---------------------------------------------------------- */

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-ink);
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--c-line);
  transition: border-color var(--dur-2) var(--ease-out);
}

.link-arrow::after {
  content: "";
  width: 1rem;
  height: 1px;
  background: currentColor;
  position: relative;
  transition: width var(--dur-2) var(--ease-out);
}

.link-arrow:hover {
  border-color: var(--c-ink);
}

.link-arrow:hover::after {
  width: 1.6rem;
}

.link-arrow--light {
  color: var(--c-paper);
  border-color: rgba(255, 255, 255, 0.25);
}

.link-arrow--light:hover {
  border-color: var(--c-paper);
}

/* --- Bouton menu mobile --------------------------------------------------- */

.burger {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  position: relative;
  flex: none;
  transition: background-color var(--dur-2) var(--ease-out);
}

.burger:hover {
  background: rgba(6, 39, 51, 0.04);
}

.burger__lines {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 5px;
}

.burger__lines span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--c-ink);
  transition: transform var(--dur-3) var(--ease-out), opacity var(--dur-2);
}

.burger[aria-expanded="true"] .burger__lines span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.burger[aria-expanded="true"] .burger__lines span:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded="true"] .burger__lines span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* --- Menu mobile ---------------------------------------------------------- */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  display: flex;
  flex-direction: column;
  padding: calc(var(--header-h) + 1.5rem) var(--gutter) 2rem;
  background: var(--c-paper);
  visibility: hidden;
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transition:
    clip-path 700ms var(--ease-out),
    opacity 300ms linear,
    visibility 0s linear 700ms;
}

.mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
  clip-path: inset(0 0 0 0);
  transition:
    clip-path 700ms var(--ease-out),
    opacity 200ms linear,
    visibility 0s;
}

.mobile-menu__head {
  display: none;
}

.mobile-menu__nav {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
}

.mobile-menu__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--c-line-soft);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  line-height: 1.1;
  color: var(--c-ink);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}

.mobile-menu.is-open .mobile-menu__link {
  opacity: 1;
  transform: none;
}

.mobile-menu.is-open .mobile-menu__link:nth-child(1) { transition-delay: 120ms; }
.mobile-menu.is-open .mobile-menu__link:nth-child(2) { transition-delay: 180ms; }
.mobile-menu.is-open .mobile-menu__link:nth-child(3) { transition-delay: 240ms; }
.mobile-menu.is-open .mobile-menu__link:nth-child(4) { transition-delay: 300ms; }
.mobile-menu.is-open .mobile-menu__link:nth-child(5) { transition-delay: 360ms; }

.mobile-menu__link span {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--c-muted);
}

.mobile-menu__link[aria-current="page"] {
  color: var(--c-teal);
}

.mobile-menu__foot {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--c-body);
}

.mobile-menu__foot a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--c-line);
}

/* --- Voile de transition -------------------------------------------------- */

.veil {
  position: fixed;
  inset: 0;
  z-index: var(--z-veil);
  pointer-events: none;
  display: none;
}

.js .veil {
  display: block;
}

.veil__panel {
  position: absolute;
  inset: 0;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.veil__panel--lime {
  z-index: 1;
  background: var(--c-lime);
  transition: transform 680ms var(--ease-out);
}

.veil__panel--grad {
  z-index: 2;
  background: var(--grad-deep);
  display: grid;
  place-items: center;
  transition: transform 760ms var(--ease-out);
}

/* À l'arrivée : les panneaux sont posés sur l'écran, puis se retirent. */
.veil.is-ready .veil__panel {
  transform: translate3d(0, -101%, 0);
}

.veil.is-ready .veil__panel--lime {
  transition-delay: 150ms;
}

/* Au départ : le lime monte, puis le dégradé le recouvre. */
.veil.is-leaving .veil__panel {
  transform: translate3d(0, 0, 0);
}

.veil.is-leaving .veil__panel--grad {
  transition-delay: 130ms;
}

.veil__mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 400ms linear, transform 500ms var(--ease-out);
}

.veil.is-leaving .veil__mark {
  opacity: 1;
  transform: none;
  transition-delay: 300ms;
}

.veil__mark img {
  width: 56px;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.veil__mark span {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.9);
}

/* --- Curseur personnalisé ------------------------------------------------- */

.cursor,
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-cursor);
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  mix-blend-mode: difference;
}

.cursor {
  width: 34px;
  height: 34px;
  border: 1px solid #fff;
  transition: width 220ms var(--ease-out), height 220ms var(--ease-out), opacity 200ms linear;
}

.cursor-dot {
  width: 5px;
  height: 5px;
  background: #fff;
}

.cursor.is-active {
  width: 52px;
  height: 52px;
}

@media (hover: none), (pointer: coarse) {
  .cursor,
  .cursor-dot {
    display: none;
  }
}

/* --- Pied de page --------------------------------------------------------- */

.site-footer {
  position: relative;
  background: var(--c-ink);
  color: var(--c-paper);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--grad-brand);
}

.footer__top {
  padding-top: clamp(3.5rem, 7vw, 6rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.footer__logo img {
  width: 44px;
}

.footer__logo span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--c-paper);
}

.footer__pitch {
  max-width: 34ch;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(247, 248, 244, 0.66);
}

.footer__col h3 {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: rgba(247, 248, 244, 0.5);
  margin-bottom: 1.15rem;
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  font-size: 0.9375rem;
}

.footer__list a {
  color: rgba(247, 248, 244, 0.82);
  transition: color var(--dur-2) var(--ease-out);
}

.footer__list a:hover {
  color: var(--c-lime);
}

.footer__socials {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.35rem;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(247, 248, 244, 0.2);
  border-radius: 50%;
  color: rgba(247, 248, 244, 0.8);
  transition: all var(--dur-2) var(--ease-out);
}

.social-pill:hover {
  background: var(--c-lime);
  border-color: var(--c-lime);
  color: var(--c-ink);
  transform: translateY(-2px);
}

.footer__wordmark {
  padding-bottom: 1.5rem;
  overflow: hidden;
}

.footer__wordmark span {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 7.5rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(247, 248, 244, 0.13);
  white-space: nowrap;
}

.footer__bottom {
  border-top: 1px solid rgba(247, 248, 244, 0.12);
  padding-block: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8125rem;
  color: rgba(247, 248, 244, 0.55);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer__legal a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .footer__top {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .footer__top {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.25rem;
  }

  .footer__bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

.footer__legal a:hover {
  color: var(--c-paper);
}

/* --- Sections ------------------------------------------------------------- */

.section {
  padding-block: var(--section-y);
  position: relative;
}

.section--tight {
  padding-block: clamp(3rem, 6vw, 5.5rem);
}

.section--paper2 {
  background: var(--c-paper-2);
}

.section--ink {
  background: var(--c-ink);
  color: var(--c-paper);
}

.section--ink p {
  color: rgba(247, 248, 244, 0.72);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--c-line);
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.section-head__text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 46rem;
}

.section-head h2 {
  font-size: var(--fs-3xl);
}

.section-head__aside {
  flex: none;
  padding-bottom: 0.35rem;
}

@media (max-width: 860px) {
  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.5rem;
  }
}
