/* ============================================================
   AZURA — La Montre
   La page de la vue éclatée. Les valeurs de mise en page viennent
   de la maquette 07 : header à 115/26 sur 1210 px, fiches à 1092 px,
   lignes de repère à coude de 45°.
   ============================================================ */

.lm-piste { height: 520vh; position: relative; }

.lm-scene {
  position: sticky; top: 0; height: 100vh;
  display: grid; place-items: center; overflow: hidden;
  perspective: 1600px; perspective-origin: 50% 44%;
}

/* Filigrane : le mot déborde des bords, la montre passe devant */
.lm-filigrane {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--serif); font-size: min(30vw, 380px);
  letter-spacing: .06em; color: var(--ink-hi); opacity: .045;
  pointer-events: none; user-select: none; white-space: nowrap;
}

.lm-halo {
  position: absolute; width: min(70vw, 820px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(216,207,192,.10) 0%, rgba(216,207,192,.03) 40%, transparent 66%);
  pointer-events: none; transition: opacity 1100ms;
}

/* Les styles de la montre vivent dans commun.css : le module sert à
   plusieurs pages. */

/* ---------- Poussière en suspension ---------- */
.lm-poussiere { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.lm-grain {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: rgba(216,207,192,.5); filter: blur(.4px);
  animation: lm-deriver linear infinite;
}
@keyframes lm-deriver {
  from { transform: translate3d(0,0,0); opacity: 0 }
  12%  { opacity: .55 }
  88%  { opacity: .4 }
  to   { transform: translate3d(var(--dx), var(--dy), 0); opacity: 0 }
}

/* ---------- Légende de l'étape ---------- */
.lm-legende {
  position: absolute; left: 8%; top: 50%; transform: translateY(-50%);
  max-width: 300px; z-index: 9; pointer-events: none;
  border-left: 1px solid var(--line); padding-left: 24px;
}
.lm-etape {
  display: block; font: 500 10px/1 var(--sans); letter-spacing: .24em;
  text-transform: uppercase; color: var(--cu); margin-bottom: 16px;
}
.lm-legende h2 {
  font: 400 56px/1.1 var(--serif); letter-spacing: -.01em;
  color: var(--ink-hi); margin: 0;
}
.lm-legende p { font: 400 14px/1.5 var(--sans); color: var(--ink2); margin: 14px 0 0; }

/* ---------- Fiches techniques ---------- */
.lm-fiches {
  position: absolute; right: 7%; top: 50%; transform: translateY(-50%);
  width: 250px; display: grid; gap: 12px; z-index: 9; pointer-events: none;
}
.lm-fiche {
  background: rgba(255,255,255,.09); backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: 16px 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(12px);
  transition: opacity 500ms cubic-bezier(.22,.61,.36,1), transform 500ms cubic-bezier(.22,.61,.36,1);
}
.lm-fiche.vu { opacity: 1; transform: none; }
.lm-fiche b {
  display: block; font: 500 10px/1 var(--sans); letter-spacing: .24em;
  text-transform: uppercase; color: var(--ink2); margin-bottom: 8px;
}
.lm-fiche em {
  display: block; font: 300 20px/1.2 var(--sans); font-style: normal;
  color: var(--ink-hi); font-variant-numeric: tabular-nums; margin-bottom: 6px;
}
.lm-fiche i { display: block; font: 400 13px/1.45 var(--sans); font-style: normal; color: var(--ink); }

/* ---------- Lignes de repère ----------
   L'état final est l'état par défaut : si l'animation ne se joue pas,
   le repère reste visible et juste. */
.lm-reperes {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 8; overflow: visible;
}
.lm-reperes path {
  fill: none; stroke: var(--cu); stroke-width: 1;
  stroke-dasharray: var(--long, none); stroke-dashoffset: 0;
  animation: lm-tracer 500ms cubic-bezier(.22,.61,.36,1) backwards;
}
.lm-reperes circle.point {
  fill: var(--cu); opacity: 1;
  filter: drop-shadow(0 0 6px rgba(184,123,78,.55));
  animation: lm-paraitre 300ms backwards;
}
.lm-reperes circle.anneau {
  fill: none; stroke: var(--cu); stroke-width: 1.2; opacity: .7;
  animation: lm-pulser 700ms backwards;
}
@keyframes lm-tracer { from { stroke-dashoffset: var(--long, 0) } to { stroke-dashoffset: 0 } }
@keyframes lm-paraitre { from { opacity: 0 } to { opacity: 1 } }
@keyframes lm-pulser { from { opacity: 0 } 60% { opacity: .9 } to { opacity: .7 } }

/* ---------- Sélecteur de finition ---------- */
.lm-finitions { position: absolute; bottom: 14vh; display: flex; gap: 34px; z-index: 10; }
.lm-pastille {
  background: none; border: none; cursor: pointer; display: grid;
  justify-items: center; gap: 9px; padding: 5px;
}
.lm-pastille i {
  width: 28px; height: 28px; border-radius: 50%; display: block;
  box-shadow: inset 0 1px 2px rgba(255,255,255,.35), 0 2px 8px rgba(0,0,0,.5);
  transition: box-shadow 400ms;
}
.lm-pastille span {
  font: 500 10px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink2); transition: color 400ms;
}
.lm-pastille[aria-pressed="true"] i {
  box-shadow: 0 0 0 1px var(--bg), 0 0 0 2px var(--cu), inset 0 1px 2px rgba(255,255,255,.35);
}
.lm-pastille[aria-pressed="true"] span { color: var(--ink-hi); }
.lm-pastille:focus-visible { outline: 1px solid var(--cu); outline-offset: 3px; border-radius: 4px; }

/* ---------- Indicateur et progression ---------- */
.lm-defiler {
  position: absolute; bottom: 3vh; left: 50%; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 10px; z-index: 9; transition: opacity 500ms;
}
.lm-defiler span {
  font: 500 10px/1 var(--sans); letter-spacing: .24em;
  text-transform: uppercase; color: var(--ink2);
}
.lm-trait { width: 1px; height: 38px; background: linear-gradient(var(--ink2), transparent); }

.lm-progression {
  position: fixed; left: 6%; top: 50%; transform: translateY(-50%);
  width: 1px; height: 170px; background: var(--line); z-index: 40;
}
.lm-progression i { display: block; width: 1px; background: var(--cu); height: 0; }
.lm-progression b {
  position: absolute; left: -4px; width: 9px; height: 9px; border-radius: 50%;
  border: 1px solid var(--cu); background: var(--bg); top: 0; transition: top 80ms linear;
}

/* ---------- Clôture de page ---------- */
.lm-fin { padding: 16vh 8% 20vh; border-top: 1px solid var(--line); }
.lm-fin h3 {
  font: 400 56px/1.1 var(--serif); color: var(--ink-hi);
  letter-spacing: -.01em; max-width: 12ch; margin: 0;
}
.lm-fin p { margin: 22px 0 0; max-width: 56ch; color: var(--ink); font: 400 16px/1.6 var(--sans); }
.lm-synthese { display: flex; gap: 60px; margin-top: 56px; flex-wrap: wrap; }
.lm-synthese b {
  display: block; font: 300 44px/1 var(--sans); letter-spacing: -.02em;
  color: var(--ink-hi); font-variant-numeric: tabular-nums;
}
.lm-synthese b span { font-size: 42%; }
.lm-synthese span.lbl {
  display: block; margin-top: 8px; font: 500 10px/1 var(--sans);
  letter-spacing: .24em; text-transform: uppercase; color: var(--ink2);
}

/* ---------- Mobile ----------
   La scène cesse d'être une composition en largeur et devient une colonne :
   titre, montre, fiches. Rien n'est masqué. */
@media (max-width: 820px) {
  /* La scene reste haute de 100vh (l'animation au defilement en depend),
     mais devient scrollable verticalement : sur un petit telephone, le
     watch, le texte et les fiches ne tiennent pas toujours ensemble dans
     100vh. Sans ce overflow-y, le flex container ecrasait .lm-fiches a
     quasiment 0px de haut : les fiches techniques (Verre, Cadran, etc.)
     devenaient invisibles, silencieusement, alors qu'elles existaient
     bien dans la page. */
  .lm-scene {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 14px; padding: 82px 5% 16px;
    overflow-y: auto;
  }
  .lm-legende, .lm-fiches {
    position: static; transform: none; width: 100%; max-width: none; text-align: center;
  }
  .lm-legende { order: 1; max-width: 32ch; margin: 0 auto; border-left: 0; padding-left: 0; flex-shrink: 0; }
  .lm-legende h2 { font-size: 28px; }
  .lm-legende p { font-size: 13px; margin-top: 8px; }
  .az-montre { order: 2; max-width: 62vw; margin: 0 auto; flex-shrink: 1; }
  .lm-fiches {
    order: 3; display: flex; gap: 10px; overflow-x: auto;
    scroll-snap-type: x mandatory; padding-bottom: 6px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    flex-shrink: 0; min-height: 92px;
  }
  .lm-fiches::-webkit-scrollbar { display: none; }
  .lm-fiche { flex: 0 0 82%; scroll-snap-align: center; text-align: left; padding: 14px 16px; }
  /* Le repere "Decouvrir" est positionne en absolute, bottom:3vh, calcule
     pour l'espace desktop. En mobile la mise en page devient un flux
     vertical normal : ce repere reste colle au bas de l'ecran et finit
     par chevaucher le nom des finitions. Purement decoratif
     (aria-hidden), sans perte a le masquer sur mobile. */
  .lm-reperes, .lm-progression, .lm-defiler { display: none; }
  .lm-finitions { position: static; order: 4; gap: 20px; margin-top: 6px; flex-shrink: 0; }
  .lm-pastille i { width: 24px; height: 24px; }
  .lm-filigrane { font-size: 44vw; }
  .lm-fin { padding: 12vh 6% 14vh; }
  .lm-fin h3 { font-size: 34px; }
  .lm-synthese { gap: 28px; }
  .lm-synthese b { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .az-montre { transition: none !important; }
  .lm-fiche { transition: none; opacity: 1; transform: none; }
  .lm-grain { animation: none; opacity: .3; }
}

