/* Le Hangar – Accueil : animations des blocs sous la photo d'ouverture (v1.2.0)
   Même vocabulaire que l'ouverture : l'iris (diaphragme) pour les photos, la montée douce pour le texte.
   Les classes lhd-rv / lhd-ir / lhd-w sont ajoutées par accueil-blocs.js ; sans script, rien n'est caché. */
@media (prefers-reduced-motion: no-preference){
  /* Animations des titres mot par mot, partagées par l'accueil (hero-obturateur.css) et les pages intérieures (pages-interieures.css) */
  @keyframes lhd-secours{to{visibility:visible}}
  @keyframes lhd-mot{to{transform:none}}

  /* Texte et blocs : montée douce */
  .lhd-rv{opacity:0;transform:translateY(28px);transition:opacity .9s var(--lhd-ease,cubic-bezier(.16,1,.3,1)) var(--d,0s),transform .9s var(--lhd-ease,cubic-bezier(.16,1,.3,1)) var(--d,0s)}
  .lhd-rv.lhd-vu{opacity:1;transform:none}
  /* le script manuscrit garde son inclinaison */
  body .entry-content .ha-final__script.lhd-rv{transform:translateY(28px) rotate(-3deg)}
  body .entry-content .ha-final__script.lhd-rv.lhd-vu{transform:rotate(-3deg)}

  /* Grand paragraphe : mot par mot */
  .lhd-w{display:inline-block;opacity:0;transform:translateY(.45em);transition:opacity .7s ease var(--d,0s),transform .8s var(--lhd-ease,cubic-bezier(.16,1,.3,1)) var(--d,0s)}
  .lhd-vu .lhd-w,.lhd-w.lhd-vu{opacity:1;transform:none}

  /* Photos : l'iris s'ouvre au centre, l'image se pose en dézoomant */
  figure.lhd-ir{overflow:hidden}
  figure.lhd-ir img{clip-path:circle(0% at 50% 50%);transform:scale(1.22);transition:clip-path 1.5s var(--lhd-ease,cubic-bezier(.16,1,.3,1)) var(--d,0s),transform 1.8s var(--lhd-ease,cubic-bezier(.16,1,.3,1)) var(--d,0s)}
  figure.lhd-ir.lhd-vu img{clip-path:circle(80% at 50% 50%);transform:none}
  /* une fois ouvert, on retire le clip pour ne rien couper (ombres, légendes) */
  figure.lhd-ir.lhd-fini{overflow:visible}
  figure.lhd-ir.lhd-fini img{clip-path:none;transition:none}

  /* Dernière photo : léger dézoom au défilement (navigateurs compatibles) */
  @supports (animation-timeline:view()){
    body .entry-content .ha-final{overflow:hidden}
    body .entry-content .ha-final .ha-final__img img{animation:lhd-zoom linear both;animation-timeline:view();animation-range:entry 0% cover 70%}
    @keyframes lhd-zoom{from{transform:scale(1.18)}to{transform:scale(1)}}
  }
}
