/* Le Hangar – Accueil : animation « Obturateur » (v1.1.0)
   La photo s'ouvre comme un diaphragme, puis le titre se découvre mot par mot.
   CSS + un petit script (hero-obturateur.js). Désactivée si « réduire les animations ». */
@media (prefers-reduced-motion: no-preference){
  :root{--lhd-ease:cubic-bezier(.16,1,.3,1)}

  /* 1. Le diaphragme */
  body .entry-content .ha-hero .ha-hero__img img{
    clip-path:circle(0% at 70% 40%);
    animation:lhd-diaph 1.8s .15s var(--lhd-ease) forwards;
  }
  @keyframes lhd-diaph{to{clip-path:circle(150% at 70% 40%)}}

  /* anneau de lumière qui accompagne l'ouverture */
  body .entry-content .ha-hero .ha-hero__img::before{
    content:"";position:absolute;z-index:2;left:70%;top:40%;width:60px;height:60px;margin:-30px;
    border:2px solid var(--hn-brique-cc);border-radius:50%;opacity:0;pointer-events:none;
    animation:lhd-anneau 1.8s .1s var(--lhd-ease) both;
  }
  @keyframes lhd-anneau{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(40)}}

  /* le voile sombre apparaît après l'ouverture */
  body .entry-content .ha-hero::before{animation:lhd-fondu 1.4s .9s both}
  @keyframes lhd-fondu{from{opacity:0}to{opacity:1}}

  /* 2. Le texte */
  body .entry-content .ha-hero__script{animation:lhd-monte 1s 1.1s var(--lhd-ease) both}
  body .entry-content .ha-hero__bas{animation:lhd-monte 1s 2s var(--lhd-ease) both}
  @keyframes lhd-monte{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:none}}
  /* le script manuscrit garde son inclinaison */
  body .entry-content .ha-hero__script{animation-name:lhd-monte-script}
  @keyframes lhd-monte-script{from{opacity:0;transform:translateY(24px) rotate(-4deg)}to{opacity:1;transform:rotate(-4deg)}}

  /* 3. Le titre, mot par mot (découpé par le script) */
  html.lhd-anim body .entry-content h1.ha-hero__titre:not(.lhd-pret){visibility:hidden;animation:lhd-secours 0s 1.5s forwards}
  h1.ha-hero__titre .lhd-m{display:inline-block;overflow:hidden;vertical-align:top;padding:.2em 0 .06em;margin-top:-.2em}
  h1.ha-hero__titre .lhd-m>span{display:inline-block;transform:translateY(110%);animation:lhd-mot .9s var(--lhd-ease) forwards}
}
