/* ============================================================
   Orvena — fond taupe « maquette de site »
   Texte brun très foncé, tout en capitales sauf le texte
   courant. Une seule surface pleine (le bouton brun), l'orange
   foncé seulement pour les liens et la signature.
   ============================================================ */

:root {
  --paper: #a89a89;      /* le fond, taupe */
  --ink: #100b07;        /* tout le texte */
  --soft: #2e251c;       /* texte secondaire */
  --line: #6f6252;       /* traits pointillés */
  --btn: #2a190e;        /* l'unique bouton plein */
  --btn-text: #ffedd7;
  --btn-hover: #45291a;
  --accent: #5c1f00;     /* liens et signature : orange foncé, lisible */
  --spark: #dc5000;      /* le point « disponible » */

  --g: 18px;             /* gouttière */
  --pad: clamp(18px, 2.2vw, 32px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* Les parties foncées : mêmes règles, d'autres couleurs.
   La couleur de fond de chaque partie se règle dans index.html. */
.tone-dark,
html.on-dark .nav,
html.on-dark .rail {
  --ink: #ffedd7;
  --soft: #d3bfa6;
  --line: rgba(255, 237, 215, .32);
  --btn: #ffedd7;
  --btn-text: #1c140e;
  --btn-hover: #ffffff;
  --accent: #ffb682;
  color: var(--ink);
}

html.on-dark .cursor-ring { border-color: rgba(255, 237, 215, .75); }
html.on-dark .cursor-dot { background: #ffedd7; }

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

html {
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 500;
  font-feature-settings: "ss01";
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: uppercase;
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

html.is-loading body { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-transform: inherit; }
ul { list-style: none; }
::selection { background: var(--btn); color: var(--btn-text); }

:focus-visible { outline: 1px dashed var(--ink); outline-offset: 4px; }

/* ----------------------------------------------------------
   Chargement
   ---------------------------------------------------------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: var(--paper);
  clip-path: inset(0 0 0 0);
}

.loader__brand { font-size: 13px; }

.loader__line {
  position: relative;
  width: 180px;
  height: 1px;
  background-image: linear-gradient(90deg, var(--line) 50%, transparent 0);
  background-size: 6px 1px;
  overflow: hidden;
}

.loader__fill {
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
}

.loader__count { font-size: 11px; color: var(--soft); font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------
   Le fond : lumière, quadrillage et maquette
   ---------------------------------------------------------- */
.back {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.back__light {
  position: absolute;
  inset: 0;
  /* une lumière blanche et légère : elle marche sur le taupe comme sur le brun */
  background: radial-gradient(circle at 50% 50%, rgba(255, 241, 222, .22), transparent 52%);
}

.back canvas { position: absolute; top: 0; left: 0; display: block; }

/* ----------------------------------------------------------
   Scène 3D
   ---------------------------------------------------------- */
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.no-webgl #scene { display: none; }

main { position: relative; z-index: 1; }

/* ----------------------------------------------------------
   Barre du haut, transparente
   ---------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: var(--pad);
  color: var(--ink);
  transition: color .35s;
}

.nav__brand { justify-self: start; }

.nav__links { display: flex; gap: clamp(20px, 3vw, 44px); }

.nav__links a {
  position: relative;
  padding: 4px 0;
  color: inherit;
  transition: opacity .3s;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background-image: linear-gradient(90deg, var(--ink) 55%, transparent 0);
  background-size: 5px 1px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s var(--ease);
}

.nav__links a:hover::after,
.nav__links a.is-current::after { transform: scaleX(1); }

.nav__menu {
  justify-self: end;
  display: none;
  padding: 8px 16px;
  border: 1px dashed var(--line);
  border-radius: 22.5px;
}

/* ----------------------------------------------------------
   Menu plein écran (téléphone)
   ---------------------------------------------------------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--pad);
  background: var(--paper);
  visibility: hidden;
  opacity: 0;
  transition: opacity .5s var(--ease), visibility 0s linear .5s;
}

.menu.is-open { visibility: visible; opacity: 1; transition: opacity .5s var(--ease); }

.menu__close {
  align-self: flex-end;
  padding: 8px 16px;
  border: 1px dashed var(--line);
  border-radius: 22.5px;
}

.menu__links { display: grid; gap: 6px; }

.menu__links a {
  font-size: clamp(44px, 13vw, 84px);
  line-height: .9;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.menu__foot { color: var(--soft); text-transform: none; font-weight: 400; font-size: 15px; }

/* ----------------------------------------------------------
   Étiquette verticale à droite
   ---------------------------------------------------------- */
.rail {
  position: fixed;
  right: var(--pad);
  top: 50%;
  z-index: 40;
  display: flex;
  gap: 28px;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--soft);
  pointer-events: none;
}

/* sur l'accueil, la place est prise par les repères de la maquette */
.rail span { transition: opacity .6s var(--ease); }
.rail.is-away span { opacity: 0; }

.rail__count { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------
   Accueil
   ---------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
}

.hero__inner {
  position: absolute;
  inset: 0;
  padding: var(--pad);
}

.hero__tag {
  position: absolute;
  top: calc(var(--pad) + 70px);
  left: var(--pad);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.hero__word {
  position: absolute;
  top: calc(var(--pad) + 104px);
  left: calc(var(--pad) - .06em);
  font-size: clamp(86px, 14vw, 270px);
  font-weight: 500;
  line-height: .9;
  letter-spacing: -.02em;
}

.hero__mask { display: inline-flex; overflow: hidden; padding-bottom: .04em; }
.hero__mask .ch { display: inline-block; will-change: transform; }

.hero__card {
  position: absolute;
  bottom: var(--pad);
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 18px;
  background: rgba(178, 165, 149, .82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.hero__card--info {
  left: var(--pad);
  width: min(360px, calc(100% - 2 * var(--pad)));
  display: grid;
  gap: 14px;
}

.hero__card-title { font-size: 13px; line-height: 1.25; }

.hero__card-text {
  text-transform: none;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.35;
  color: var(--ink);
  opacity: .9;
}

.dash {
  display: block;
  height: 1px;
  background-image: linear-gradient(90deg, var(--line) 55%, transparent 0);
  background-size: 6px 1px;
}

.hero__card--cta {
  right: calc(var(--pad) + 36px);
  display: grid;
  gap: 26px;
  min-width: 210px;
  transition: border-color .4s, background-color .4s;
}

.hero__card--cta:hover { border-color: var(--ink); background: rgba(190, 178, 163, .95); }

.hero__status { display: inline-flex; align-items: center; gap: 8px; color: var(--soft); font-size: 11px; }

.dot {
  width: 6px; height: 6px;
  border-radius: 9999px;
  background: var(--spark);
  box-shadow: 0 0 0 0 rgba(220, 80, 0, .6);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(220, 80, 0, .55); }
  70%  { box-shadow: 0 0 0 9px rgba(220, 80, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 80, 0, 0); }
}

.hero__cta-label { font-size: 13px; }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: calc(var(--pad) + 4px);
  display: grid;
  justify-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--soft);
  transform: translateX(-50%);
}

.hero__scroll-line {
  width: 1px;
  height: 42px;
  background-image: linear-gradient(180deg, var(--ink) 55%, transparent 0);
  background-size: 1px 6px;
  animation: drip 2.4s var(--ease) infinite;
  transform-origin: top;
}

@keyframes drip {
  0%   { transform: scaleY(0); opacity: 1; }
  60%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ----------------------------------------------------------
   Sections « vides » : titre à gauche, objet au centre,
   texte à droite
   ---------------------------------------------------------- */
.void {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--g);
  align-items: center;
  padding: 120px calc(var(--pad) + 40px) 120px var(--pad);
}

.void__left { grid-column: 1; align-self: center; }
.void__right { grid-column: 3; display: grid; gap: 28px; align-content: center; }

.kicker {
  display: flex;
  gap: 14px;
  align-items: baseline;
  color: var(--soft);
  font-size: 12px;
  margin-bottom: 22px;
}

.kicker__n { color: var(--ink); }

.void__title {
  font-size: clamp(34px, 4.1vw, 76px);
  font-weight: 500;
  line-height: .9;
  letter-spacing: -.01em;
}

/* la marge en haut laisse la place aux accents des majuscules (É, Ê, À) */
.void__title .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .2em 0 .06em; margin: -.2em 0 -.06em; }

/* un titre long : un peu plus petit pour qu'il tienne en moins de lignes */
.void__title--long { font-size: clamp(32px, 3.4vw, 64px); line-height: 1.04; }
.void__title .w__in { display: inline-block; will-change: transform; }

.body {
  text-transform: none;
  font-weight: 400;
  font-size: clamp(19px, 1.75vw, 29px);
  line-height: 1.26;
  color: var(--ink);
}

.list { display: grid; }

.list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 15px 0;
  background-image: linear-gradient(90deg, var(--line) 55%, transparent 0);
  background-size: 6px 1px;
  background-repeat: repeat-x;
  background-position: left top;
}

.list li:last-child {
  background-image:
    linear-gradient(90deg, var(--line) 55%, transparent 0),
    linear-gradient(90deg, var(--line) 55%, transparent 0);
  background-position: left top, left bottom;
}

.list__n { color: var(--soft); font-size: 11px; }

.ulink {
  justify-self: start;
  color: var(--accent);
  padding-bottom: 4px;
  background-image: linear-gradient(90deg, var(--accent) 55%, transparent 0);
  background-size: 5px 1px;
  background-repeat: repeat-x;
  background-position: left bottom;
  transition: opacity .3s;
}

.ulink:hover { opacity: .75; }

/* ----------------------------------------------------------
   Les particules : la partie reste à l'écran pendant que le
   nuage change de forme
   ---------------------------------------------------------- */
.morph { position: relative; height: 400vh; }

.morph__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--g);
  align-items: center;
  padding: 120px calc(var(--pad) + 40px) 120px var(--pad);
  overflow: hidden;
}

.morph__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.morph__text { position: relative; grid-column: 1; }

.morph__count {
  margin-bottom: 22px;
  color: var(--soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.morph__count span { color: var(--ink); }

/* les quatre phrases sont superposées : une seule est visible */
.morph__lines { display: grid; }

.morph__line {
  grid-area: 1 / 1;
  font-size: clamp(34px, 4.1vw, 76px);
  line-height: .95;
  letter-spacing: -.01em;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s var(--ease), transform .9s var(--ease);
}

.morph__line.is-on { opacity: 1; transform: none; }
.morph__line.is-past { transform: translateY(-30px); }

/* ----------------------------------------------------------
   Comment ça se passe : la section reste à l'écran pendant
   que les étapes défilent
   ---------------------------------------------------------- */
.steps { position: relative; height: 420vh; }

.steps__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--g);
  align-items: center;
  padding: 120px calc(var(--pad) + 40px) 120px var(--pad);
  overflow: hidden;
}

.steps .kicker { margin-bottom: 22px; }

.steps__count {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 36px;
}

.steps__window { display: inline-block; overflow: hidden; height: .92em; font-size: clamp(64px, 8vw, 140px); line-height: .92; }
.steps__current { display: inline-block; font-variant-numeric: tabular-nums; }
.steps__total { color: var(--soft); font-size: 13px; padding-bottom: 8px; }

.steps__panels { position: relative; min-height: clamp(210px, 30vh, 280px); }

.step {
  position: absolute;
  left: 0; right: 0; top: 50%;
  display: grid;
  gap: 22px;
  opacity: 0;
  transform: translateY(calc(-50% + 30px));
  transition: opacity .7s var(--ease), transform .9s var(--ease);
  pointer-events: none;
}

.step.is-on { opacity: 1; transform: translateY(-50%); pointer-events: auto; }
.step.is-past { transform: translateY(calc(-50% - 30px)); }

.step__title {
  display: flex;
  gap: 14px;
  align-items: baseline;
  font-size: 13px;
  padding-bottom: 16px;
  background-image: linear-gradient(90deg, var(--line) 55%, transparent 0);
  background-size: 6px 1px;
  background-repeat: repeat-x;
  background-position: left bottom;
}

.step__n { color: var(--soft); }

/* le cadre « 2 » : visible pendant les quatre étapes */
.promise {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border: 1px dashed var(--ink);
  border-radius: 12px;
}

.promise__head {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: clamp(14px, 1.15vw, 18px);
  line-height: 1.2;
}

.promise__n {
  font-size: clamp(64px, 6.4vw, 108px);
  line-height: .8;
  color: var(--accent);
}

.promise__text {
  text-transform: none;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.35;
}

.promise__fine { font-size: 11px; line-height: 1.5; color: var(--soft); }

.steps__rail {
  position: absolute;
  left: var(--pad);
  right: calc(var(--pad) + 40px);
  bottom: 56px;
  height: 1px;
  background-image: linear-gradient(90deg, var(--line) 55%, transparent 0);
  background-size: 6px 1px;
}

.steps__fill {
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
}

/* ----------------------------------------------------------
   Contact
   ---------------------------------------------------------- */
.contact__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 28px; }

/* l'unique bouton plein de la page */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  border-radius: 36px;
  background: var(--btn);
  color: var(--btn-text);
  transition: background-color .4s;
  will-change: transform;
}

.pill:hover { background: var(--btn-hover); }

.contact__fine { color: var(--soft); font-size: 11px; }

.foot {
  position: absolute;
  left: var(--pad);
  right: calc(var(--pad) + 40px);
  bottom: var(--pad);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  font-size: 11px;
  color: var(--soft);
  background-image: linear-gradient(90deg, var(--line) 55%, transparent 0);
  background-size: 6px 1px;
  background-repeat: repeat-x;
  background-position: left top;
}

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

/* ----------------------------------------------------------
   Curseur
   ---------------------------------------------------------- */
.cursor-ring,
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}

.cursor-ring {
  width: 34px; height: 34px;
  border: 1px dashed rgba(16, 11, 7, .65);
  border-radius: 17px;
}

.cursor-dot {
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 9999px;
  background: var(--ink);
}

.cursor-awake .cursor-ring,
.cursor-awake .cursor-dot { opacity: 1; }

.has-cursor.cursor-awake,
.has-cursor.cursor-awake * { cursor: none !important; }

/* ----------------------------------------------------------
   Tablette et téléphone
   ---------------------------------------------------------- */
@media (max-width: 1100px) {
  /* on garde trois colonnes : celle du milieu reste libre pour le téléphone */
  .void,
  .steps__sticky,
  .morph__sticky { padding-right: calc(var(--pad) + 32px); }
  .body { font-size: 18px; }
  .hero__word { top: calc(var(--pad) + 96px); }
}

@media (max-width: 860px) {
  .nav {
    grid-template-columns: 1fr auto;
    background: linear-gradient(var(--bg-now, var(--paper)) 68%, transparent);
  }
  .nav__links { display: none; }
  .nav__menu { display: inline-block; }
  .rail { display: none; }

  .hero__tag { top: calc(var(--pad) + 52px); font-size: 11px; }
  .hero__word { top: calc(var(--pad) + 84px); font-size: 22vw; }
  .hero__card--info { bottom: calc(var(--pad) + 74px); width: calc(100% - 2 * var(--pad)); padding: 16px; }
  .hero__card-text { font-size: 14px; }
  .hero__card--cta {
    left: var(--pad);
    right: var(--pad);
    min-width: 0;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 22.5px;
  }
  .hero__scroll { display: none; }

  /* le téléphone occupe le haut de l'écran, le texte passe dessous */
  .void {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 56vh var(--pad) 96px;
    padding: 56svh var(--pad) 96px;
    gap: 26px;
    align-items: start;
  }

  .void__left,
  .void__right { grid-column: 1; }

  .void__title { font-size: clamp(36px, 10vw, 56px); }
  .void__title--long { font-size: clamp(31px, 8.4vw, 48px); }
  .kicker { margin-bottom: 16px; }
  .list li { padding: 12px 0; }

  .void--contact { padding-bottom: 140px; }
  .foot { right: var(--pad); flex-wrap: wrap; }

  /* les particules en haut, la phrase en bas */
  .morph { height: 360vh; }
  .morph__sticky {
    grid-template-columns: 1fr;
    align-items: end;
    padding: 0 var(--pad) 56px;
  }
  .morph__line { font-size: clamp(32px, 9vw, 48px); }

  /* les étapes ne sont plus figées : elles s'empilent */
  .steps { height: auto; }

  .steps__sticky {
    position: relative;
    height: auto;
    grid-template-columns: 1fr;
    padding: 56vh var(--pad) 96px;
    padding: 56svh var(--pad) 96px;
    overflow: visible;
    gap: 32px;
  }

  .steps__count,
  .steps__rail { display: none; }

  .steps__panels { display: grid; min-height: 0; gap: 34px; }

  .step {
    position: relative;
    top: auto;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  /* meme precision que les regles de l'ordinateur, sinon leur decalage reste */
  .step.is-on,
  .step.is-past { opacity: 1; transform: none; }

  .body { font-size: 19px; }
}

/* écran d'ordinateur peu haut : tout est un peu plus serré pour que le cadre tienne */
@media (min-width: 861px) and (max-height: 760px) {
  .steps__sticky { padding-top: 90px; padding-bottom: 80px; }
  .steps .body { font-size: 19px; }
  .steps__panels { min-height: 180px; }
  .promise { gap: 10px; padding: 14px 16px; }
  .promise__n { font-size: 60px; }
  .promise__text { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; }
}
