/* Le Hangar – effets pilotés par le défilement (étape 2, 15/11/2026)
   Le visiteur garde la main : tout avance et recule avec sa molette ou son doigt, rien ne se joue tout seul.
   CSS pur (animation-timeline), aucune bibliothèque. Navigateurs sans prise en charge : la page reste exactement comme avant.
   Coupé par « réduire les animations » (système) et par le panneau d'accessibilité (html.lhd-calme coupe toutes les animations).
   Seulement transform / translate / scale / opacity / clip-path. Un effet différent par zone :
   hero = profondeur, photos des offres = pose, section sombre = plans superposés, vidéo = volet, articles = progression. */
@media (prefers-reduced-motion:no-preference){
@supports (animation-timeline:view()){

  /* 1. Hero : la photo glisse plus lentement que la page, le texte monte et s'efface en quittant l'écran */
  @media (min-width:701px){
    body .entry-content .ha-hero .ha-hero__img{animation:lhd-hero-fond linear both;animation-timeline:scroll(root block);animation-range:0 90vh}
    @keyframes lhd-hero-fond{to{translate:0 6%;scale:1.14}}
    body .entry-content .ha-hero__in{animation:lhd-hero-texte linear both;animation-timeline:scroll(root block);animation-range:0 80vh}
    @keyframes lhd-hero-texte{to{translate:0 -48px;opacity:.5}}
  }

  /* 2. Photos des offres : elles se posent (dézoom) en entrant dans l'écran */
  body .entry-content figure.ha-offre__photo.lhd-ir.lhd-fini,
  body .entry-content figure.ha-offre__photo:not(.lhd-ir){overflow:clip}
  /* la figure coupe son contenu : elle devient un cadre de défilement et fausserait view() ; on mesure donc sa position dans la page (chronologie nommée) */
  body .entry-content figure.ha-offre__photo{view-timeline:--lhd-pose block}
  body .entry-content figure.ha-offre__photo img{animation:lhd-pose linear both;animation-timeline:--lhd-pose;animation-range:entry 0% cover 45%}
  @keyframes lhd-pose{from{scale:1.14}to{scale:1}}

  /* 3. Section sombre : les deux photos défilent à des vitesses différentes (plans superposés) */
  @media (min-width:701px){
    body .entry-content .ha-ph-a{animation:lhd-plan-a linear both;animation-timeline:view();animation-range:cover 0% cover 100%}
    body .entry-content .ha-ph-b{animation:lhd-plan-b linear both;animation-timeline:view();animation-range:cover 0% cover 100%}
    @keyframes lhd-plan-a{from{translate:0 28px}to{translate:0 -28px}}
    @keyframes lhd-plan-b{from{translate:0 90px}to{translate:0 -90px}}
  }

  /* 4. Vidéo : le cadre noir reste fixe, l'image s'ouvre à l'intérieur comme un volet */
  body .entry-content .lhd-video .lhd-video__cadre > video,
  body .entry-content .lhd-video .lhd-video__cadre > .lhd-play{animation:lhd-volet linear both;animation-timeline:view();animation-range:entry 5% entry 70%}
  @keyframes lhd-volet{from{clip-path:inset(12% 10% 12% 10%)}to{clip-path:inset(0)}}

  /* 5. Articles de blog : fine barre de progression de lecture sous le haut de l'écran */
  body.single-post::after{content:"";position:fixed;top:0;left:0;right:0;height:3px;z-index:99985;background:var(--hn-brique);transform-origin:left center;transform:scaleX(0);pointer-events:none;animation:lhd-progres linear both;animation-timeline:scroll(root block)}
  @keyframes lhd-progres{to{transform:scaleX(1)}}
  body.single-post.admin-bar::after{top:32px}
  @media (max-width:782px){body.single-post.admin-bar::after{top:46px}}
}
}
