/* =========================================================================
   ACERFI Campus — Polish : léger agrandissement typographique + animations
   professionnelles au défilement. Injecté sur tout le site (lib.php + _header).
   Les animations ne se déclenchent que si <html> porte .aca-anim (posée par un
   script). Sans JavaScript, tout reste visible et lisible.
   ========================================================================= */

/* ---------- Agrandissement typographique (léger, ~ +5–7 %) ---------------- */
/* Accueil (#alp) */
#alp .alp-heroA h1{font-size:clamp(2.3rem,5.1vw,4.2rem) !important;}
#alp .alp-heroA-sub{font-size:clamp(1.08rem,1.6vw,1.28rem) !important;}
#alp .alp-heroA-stat b{font-size:clamp(1.6rem,3.2vw,2.35rem) !important;}
#alp .alp-h2{font-size:clamp(1.8rem,3.4vw,2.65rem) !important;}
#alp .alp-sub{font-size:1.06rem !important;}
#alp .alp-card-title{font-size:1.2rem !important;}
#alp .alp-card-desc,#alp .alp-card-meta{font-size:.92rem !important;}
#alp .alp-path-title{font-size:1.38rem !important;}
#alp .alp-why-title{font-size:1.2rem !important;}
#alp .alp-why-text{font-size:1rem !important;}
#alp .alp-faq-q{font-size:1.05rem !important;}

/* Catalogue / fiches / parcours (.acx) */
.acx .acx-hero-title,.acx .acx-detail-title{font-size:clamp(2.05rem,4.5vw,3.3rem) !important;}
.acx .acx-hero-sub,.acx .acx-detail-lead{font-size:clamp(1.06rem,1.6vw,1.22rem) !important;}
.acx .acx-h2{font-size:clamp(1.62rem,3vw,2.35rem) !important;}
.acx .acx-card-title{font-size:1.16rem !important;}
.acx .acx-card-desc{font-size:.92rem !important;}
.acx .acx-sub{font-size:1.04rem !important;}
.acx .acx-price{font-size:1.12rem !important;}
.acx .acx-step-title{font-size:1.14rem !important;}
.acx .acx-panel-h{font-size:1.28rem !important;}

/* Pages institutionnelles (.acp) */
.acp-hero-page h1{font-size:clamp(2.2rem,4.9vw,3.9rem) !important;}
.acp-hero-page p{font-size:clamp(1.05rem,1.5vw,1.2rem) !important;}
.acp-section p,.acp-value p,.acp-info-item,.acp-info-item *{font-size:1.06rem !important;}
.acp-value h3,.acp-info-item h4{font-size:1.16rem !important;}

/* Footer (.acf) */
.acf-about p,.acf-col a,.acf-ci,.acf-ci a{font-size:1rem !important;}

/* ---------- Animations (activées seulement avec .aca-anim) ---------------- */
html.aca-anim .aca-reveal{opacity:0;transform:translateY(24px);transition:opacity .8s cubic-bezier(.22,1,.36,1),transform .8s cubic-bezier(.22,1,.36,1);}
html.aca-anim .aca-reveal.in{opacity:1;transform:none;}

/* Grilles qui entrent en cascade (footer, valeurs, infos) */
html.aca-anim .aca-stag>*{opacity:0;}
html.aca-anim .aca-stag.in>*{animation:acaUp .7s cubic-bezier(.22,1,.36,1) both;}
html.aca-anim .aca-stag.in>*:nth-child(1){animation-delay:0ms;}
html.aca-anim .aca-stag.in>*:nth-child(2){animation-delay:80ms;}
html.aca-anim .aca-stag.in>*:nth-child(3){animation-delay:160ms;}
html.aca-anim .aca-stag.in>*:nth-child(4){animation-delay:240ms;}
html.aca-anim .aca-stag.in>*:nth-child(5){animation-delay:320ms;}
html.aca-anim .aca-stag.in>*:nth-child(6){animation-delay:400ms;}
@keyframes acaUp{from{opacity:0;transform:translateY(18px);}to{opacity:1;transform:none;}}

/* Entrée du héros au chargement (accueil + institutionnel + catalogue) */
html.aca-anim .alp-heroA-in>*,
html.aca-anim .acp-hero-page>*{opacity:0;animation:acaHero .9s cubic-bezier(.22,1,.36,1) forwards;}
html.aca-anim .alp-heroA-in>*:nth-child(1){animation-delay:.05s;}
html.aca-anim .alp-heroA-in>*:nth-child(2){animation-delay:.16s;}
html.aca-anim .alp-heroA-in>*:nth-child(3){animation-delay:.27s;}
html.aca-anim .alp-heroA-in>*:nth-child(4){animation-delay:.38s;}
html.aca-anim .acp-hero-page>*:nth-child(1){animation-delay:.08s;}
html.aca-anim .acp-hero-page>*:nth-child(2){animation-delay:.2s;}
html.aca-anim .acx-hero>.acx-wrap{opacity:0;animation:acaHero .9s cubic-bezier(.22,1,.36,1) .1s forwards;}
/* Bannière image des fiches & parcours : texte qui monte + très lent recadrage */
html.aca-anim .acx-detail-hero.is-img>.acx-wrap-narrow{opacity:0;animation:acaHero .9s cubic-bezier(.22,1,.36,1) .12s forwards;}
html.aca-anim .acx-detail-hero.is-img::before{animation:acaZoom 1.8s cubic-bezier(.22,1,.36,1) both;}
@keyframes acaHero{from{opacity:0;transform:translateY(22px);}to{opacity:1;transform:none;}}
@keyframes acaZoom{from{transform:scale(1.14);opacity:0;}to{transform:scale(1.05);opacity:.55;}}

/* Micro-interactions : boutons et cartes réagissent avec fluidité */
html.aca-anim .alp-btn,html.aca-anim .acx-btn,html.aca-anim .aca-btn{transition:transform .22s cubic-bezier(.22,1,.36,1),background .22s,box-shadow .22s,color .22s;}
html.aca-anim .alp-btn:hover,html.aca-anim .acx-btn:hover{transform:translateY(-2px);}

/* Barre de progression de lecture globale (fine, discrète) */
html.aca-anim .aca-progress{position:fixed;top:0;left:0;height:3px;width:0;z-index:100000;background:linear-gradient(90deg,#2e9e8f,#c9a84c);transition:width .1s linear;pointer-events:none;}

@media (prefers-reduced-motion:reduce){
  html.aca-anim .aca-reveal,
  html.aca-anim .aca-stag>*,
  html.aca-anim .alp-heroA-in>*,
  html.aca-anim .acp-hero-page>*,
  html.aca-anim .acx-hero>.acx-wrap,
  html.aca-anim .acx-detail-hero.is-img>.acx-wrap-narrow{opacity:1 !important;transform:none !important;animation:none !important;transition:none !important;}
  html.aca-anim .acx-detail-hero.is-img::before{animation:none !important;}
  html.aca-anim .aca-progress{display:none;}
}
