/* CORRECTIFS TÉLÉPHONE (18/11/2026), audit mobile complet demandé par yoann.
   Chargé en DERNIER sur les pages concernées. Rien ne change sur ordinateur :
   chaque règle est bornée au téléphone (portrait ≤ 767 px, ou paysage de
   moins de 500 px de haut au doigt). */

/* 1. PAYSAGE (téléphone couché) : l'ouverture de l'accueil.
   Avant : sur un petit iPhone couché, Entrer sortait de l'écran (sous le bas)
   alors que la page est verrouillée jusqu'à Entrer : le visiteur restait
   bloqué. Sur un grand iPhone couché, le logo HFX se réduisait à 13 px.
   Ici, logo + phrase + Entrer forment un bloc qui tient toujours entre la
   barre du haut et le bas de l'écran ; le logo prend la hauteur qui reste. */
@media (orientation:landscape) and (max-height:500px) and (pointer:coarse){
  html .a-ouv .av-ouv{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
    padding:76px 24px 14px!important;translate:none!important;bottom:auto!important;height:100svh!important;box-sizing:border-box}
  html .a-ouv .av-ouv .av-ouv__logo{position:relative!important;left:auto!important;top:auto!important;bottom:auto!important;translate:none!important;
    margin:0 auto!important;max-width:none!important;
    width:min(62vw,560px,calc((100svh - 76px - 14px - 136px) * 2.1))!important}
  html .a-ouv .av-ouv__bas{position:static!important;width:100%;margin-top:10px!important;padding:0!important;display:flex;flex-direction:column;align-items:center}
  html .a-ouv .av-ouv__sous{font-size:13px!important;line-height:1.45!important;max-width:min(88vw,620px)!important;margin:0 auto!important}
  html .a-ouv .av-ouv__bas .av-ouv__cta{margin-top:12px!important;min-height:46px!important}
  html.a-bandeau .a-ouv .av-ouv{padding-bottom:14px!important}
}

/* 2. PAYSAGE : la barre du haut se cache en descendant, comme en portrait.
   Avant : au-dessus de 767 px de large (téléphone couché), l'animation
   d'entrée de la barre gardait `transform:none` : elle restait collée en haut
   et recouvrait les titres, les FAQ et les flèches des séries. */
@media (orientation:landscape) and (max-height:500px) and (pointer:coarse){
  .hdr{ transition:transform .45s cubic-bezier(.2,.7,.2,1), translate .45s cubic-bezier(.2,.7,.2,1), opacity .3s linear; }
  .hdr.hdr--cache:not(:focus-within){ translate:0 -100%; }
  /* Les cartes des frises ne dépassent plus la hauteur de l'écran. */
  .fv .fv-c{min-height:0!important;height:calc(100svh - 24px)!important;max-height:440px;padding:22px 24px!important}
}

/* 3. LE BOUTON « RETOUR EN HAUT » NE CACHE PLUS UN AUTRE BOUTON.
   Avant : posé en bas à droite, il recouvrait la flèche « Photo suivante »
   des séries, les liens Portrait / Création artistique / Collaboration,
   le bouton pause des frises, une question de la FAQ et « Envoyer ma
   demande ». portfolio.js pose la classe quand un élément cliquable passe
   dessous ; le bouton s'efface le temps de le laisser passer. */
@media (max-width:767px), (orientation:landscape) and (max-height:500px) and (pointer:coarse){
  .retour-haut.retour-haut--vu.retour-haut--gene{ opacity:0!important; translate:0 12px!important; pointer-events:none!important; }
}
/* En paysage, le bouton existe aussi (il était réservé aux écrans ≤ 767 px). */
@media (min-width:768px) and (orientation:landscape) and (max-height:500px) and (pointer:coarse){
  .retour-haut{ display:flex!important; align-items:center; justify-content:center; position:fixed; right:16px; bottom:calc(14px + env(safe-area-inset-bottom)); z-index:70;
    width:44px; height:44px; border-radius:50%; padding:0; cursor:pointer; color:#d9bf8c;
    background:rgba(16,20,18,.62); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
    border:1px solid rgba(238,233,223,.28); box-shadow:0 6px 20px rgba(0,0,0,.45);
    opacity:0; translate:0 12px; pointer-events:none; transition:opacity .3s linear, translate .3s cubic-bezier(.2,.7,.2,1); }
  .retour-haut svg{ width:22px; height:22px; }
  .retour-haut.retour-haut--vu{ opacity:1; translate:none; pointer-events:auto; }
}

/* 4. LES CASES DES FRISES AU TÉLÉPHONE (18/11, yoann : « corrige les cases
   d'information où il y a des bugs »). Le texte d'une case ne réapparaît
   plus mot par mot à chaque changement de case (il clignotait sur iPhone) :
   il est simplement là. L'icône garde son tracé. L'ordinateur ne change pas.
   frise.js : plus de cases cachées puis lancées en éventail au défilement,
   et plus de changement de case automatique pendant qu'on fait défiler. */
@media (hover:none), (pointer:coarse){
  .fv .fv-c .fv-m,
  .fv .fv-c.on .fv-m,
  .fv .fv-c.on .fv-ul li{ animation:none!important; opacity:1!important; transform:none!important; will-change:auto!important; }
}
