/* =====================================================================
   ADX FORMATION — Carrousel du hero (assets/css/axf-hero-carousel.css)

   Diapositive 1 : le hero classique, intégralement préservé.
   Diapositives suivantes : image plein cadre + panneau violet à filet
   jaune, dans le vocabulaire du bloc .axf-purple-box des pages programme.

   Aucune police ni couleur nouvelle : Oswald, Roboto, violet #2e1f45,
   jaune #FFC107.
   ===================================================================== */

.axf-hero-carousel {
    position: relative;
    overflow: hidden;
    background: #2e1f45;
}

.axf-hero-carousel__track {
    display: flex;
    width: 100%;
    /* flex-start, et non stretch : sans cela la diapositive la plus haute
       imposait sa hauteur à toutes les autres, y compris au hero classique
       qui se retrouvait étiré dès l'activation du carrousel. */
    align-items: flex-start;
    transition: transform .55s cubic-bezier(.4, .05, .2, 1);
    will-change: transform;
}

/* La hauteur du carrousel suit la diapositive affichée : elle est posée
   par axf-hero-carousel.js. Sur la première, elle vaut exactement la
   hauteur naturelle du hero classique — activer le carrousel ne change
   donc rien à son rendu. */
.axf-hero-carousel {
    transition: height .45s cubic-bezier(.4, .05, .2, 1);
}

/* Chaque diapositive occupe exactement la largeur du carrousel. */
.axf-hero-carousel__track > .axf-hero-slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    position: relative;
}

/* La diapositive classique ne doit hériter d'aucun style : elle porte
   déjà sa propre mise en page (.axf-hero). */
.axf-hero-slide--classic { background: none; }

/* =====================================================================
   DIAPOSITIVES DE CONTENU
   ===================================================================== */

.axf-hero-carousel__track > .axf-hero-slide:not(.axf-hero-slide--classic) {
    display: flex;
    align-items: stretch;
    /* Les diapositives de contenu se calent sur la hauteur du hero
       classique, mesurée en JS (--hero-classic-h). Le repli à 560px sert
       avant la première mesure et si le JS est indisponible. */
    min-height: var(--hero-classic-h, 560px);
    background: linear-gradient(120deg, #2e1f45 0%, #4a3568 58%, #336e6a 100%);
}

.axf-hero-slide__media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.axf-hero-slide__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Voile assurant le contraste du panneau sur n'importe quelle image. */
.axf-hero-slide__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(46, 31, 69, .94) 0%, rgba(46, 31, 69, .74) 46%, rgba(46, 31, 69, .28) 100%);
}

.axf-hero-slide__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 120px 40px 80px;
    display: flex;
    align-items: center;
}

.axf-hero-slide__panel {
    max-width: 620px;
    border-left: 5px solid var(--axf-jaune);
    padding-left: 30px;
}

.axf-hero-slide__eyebrow {
    font-family: 'Oswald', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2.6px;
    text-transform: uppercase;
    color: var(--axf-jaune);
    margin: 0 0 14px;
}

.axf-hero-slide__title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(30px, 4.4vw, 56px);
    line-height: 1.04;
    letter-spacing: -.5px;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 18px;
}

.axf-hero-slide__text {
    font-size: 16.5px;
    line-height: 1.66;
    color: rgba(255, 255, 255, .84);
    margin: 0 0 24px;
}

/* --- Informations clés : la donnée utile du contenu mis en avant --- */

.axf-hero-slide__facts {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
    display: flex;
    gap: 34px;
    flex-wrap: wrap;
}

.axf-hero-slide__fact-label {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .52);
    margin-bottom: 5px;
}

.axf-hero-slide__fact-value {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: 19px;
    font-weight: 500;
    color: #fff;
}

.axf-hero-slide__cta {
    display: inline-block;
    padding: 14px 32px;
    background: var(--axf-jaune);
    color: var(--axf-violet);
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 2px;
    transition: background .16s, color .16s;
}

.axf-hero-slide__cta:hover { background: #fff; color: var(--axf-violet); }

/* --- Nuance d'accent par type de contenu --- */
.axf-hero-slide--session   .axf-hero-slide__media::after { background: linear-gradient(100deg, rgba(46,31,69,.94) 0%, rgba(51,110,106,.62) 100%); }
.axf-hero-slide--programme .axf-hero-slide__media::after { background: linear-gradient(100deg, rgba(46,31,69,.94) 0%, rgba(94,70,130,.6) 100%); }
.axf-hero-slide--article   .axf-hero-slide__media::after { background: linear-gradient(100deg, rgba(46,31,69,.94) 0%, rgba(74,53,104,.55) 100%); }

/* =====================================================================
   COMMANDES
   ===================================================================== */

.axf-hero-carousel__controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 26px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    pointer-events: none;
}

.axf-hero-carousel__arrow,
.axf-hero-carousel__dot {
    pointer-events: auto;
    cursor: pointer;
}

.axf-hero-carousel__arrow {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, .38);
    background: rgba(46, 31, 69, .5);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    border-radius: 2px;
    transition: background .16s, border-color .16s;
    backdrop-filter: blur(3px);
}

.axf-hero-carousel__arrow:hover {
    background: var(--axf-jaune);
    border-color: var(--axf-jaune);
    color: var(--axf-violet);
}

.axf-hero-carousel__dots {
    display: flex;
    gap: 9px;
    align-items: center;
}

/* Les pastilles montrent aussi la progression de la lecture automatique. */
.axf-hero-carousel__dot {
    position: relative;
    width: 34px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 2px;
    background: rgba(255, 255, 255, .32);
    overflow: hidden;
}

.axf-hero-carousel__dot-fill {
    position: absolute;
    inset: 0;
    width: 0;
    background: var(--axf-jaune);
    display: block;
}

.axf-hero-carousel__dot.is-active { background: rgba(255, 255, 255, .5); }
.axf-hero-carousel__dot.is-active .axf-hero-carousel__dot-fill { width: 100%; }

.axf-hero-carousel.is-playing .axf-hero-carousel__dot.is-active .axf-hero-carousel__dot-fill {
    animation: axf-hero-progress linear forwards;
    animation-duration: var(--hero-delay, 7000ms);
}

@keyframes axf-hero-progress {
    from { width: 0; }
    to   { width: 100%; }
}

.axf-hero-carousel__arrow:focus-visible,
.axf-hero-carousel__dot:focus-visible,
.axf-hero-slide__cta:focus-visible {
    outline: 3px solid var(--axf-jaune);
    outline-offset: 3px;
}

/* =====================================================================
   ACCESSIBILITÉ ET RESPONSIVE
   ===================================================================== */

@media (prefers-reduced-motion: reduce) {
    .axf-hero-carousel__track,
    .axf-hero-carousel { transition: none; }
    .axf-hero-carousel.is-playing .axf-hero-carousel__dot-fill { animation: none; }
}

@media screen and (max-width: 900px) {
    .axf-hero-carousel__track > .axf-hero-slide:not(.axf-hero-slide--classic) { min-height: var(--hero-classic-h, 480px); }
    .axf-hero-slide__inner { padding: 92px 24px 78px; }
    .axf-hero-slide__panel { padding-left: 20px; border-left-width: 4px; }
    .axf-hero-slide__facts { gap: 22px; margin-bottom: 24px; }
    .axf-hero-slide__fact-value { font-size: 16px; }
}

@media screen and (max-width: 600px) {
    .axf-hero-carousel__track > .axf-hero-slide:not(.axf-hero-slide--classic) { min-height: var(--hero-classic-h, 420px); }
    .axf-hero-slide__inner { padding: 80px 18px 74px; }
    .axf-hero-slide__text { font-size: 15px; }
    .axf-hero-slide__cta { padding: 12px 24px; font-size: 13px; }

    /* Les flèches encombrent sur mobile : la pagination et le glissement
       au doigt suffisent. */
    .axf-hero-carousel__arrow { display: none; }
    .axf-hero-carousel__controls { bottom: 18px; }
}

/* =====================================================================
   MODULE « CERTIFICATIONS DE COMPÉTENCES AMIANTE »

   Diapositive à l'argumentaire chiffré : les deux faits qui portent
   l'offre — l'un des deux seuls centres en France, quatre secteurs
   réglementés — passent devant le texte. Les codes RS sont conservés
   tels quels : ce sont eux que les prospects recherchent.
   ===================================================================== */

.axf-hero-slide--amiante .axf-hero-slide__media::after {
    background: linear-gradient(100deg, rgba(46, 31, 69, .95) 0%, rgba(46, 31, 69, .8) 42%, rgba(51, 110, 106, .5) 100%);
}

.axf-hero-amiante { max-width: 680px; }

.axf-hero-amiante .axf-hero-slide__title { font-size: clamp(28px, 3.9vw, 50px); }

.axf-hero-amiante .axf-hero-slide__text {
    max-width: 560px;
    margin-bottom: 26px;
}

/* --- Chiffres clés --- */

.axf-hero-amiante__figures {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: flex;
    gap: 34px;
    flex-wrap: wrap;
}

/* Le libellé tient sur UNE ligne. Le `max-width: 210px` précédent
   coupait « professionnels déjà certifiés » en deux, ce qui décrochait le
   chiffre de son intitulé et déséquilibrait la rangée. */
.axf-hero-amiante__figures li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex: 0 0 auto;
}

.axf-hero-amiante__figure {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 42px;
    line-height: .9;
    letter-spacing: -1px;
    color: var(--axf-jaune);
    flex: 0 0 auto;
}

.axf-hero-amiante__figure-label {
    font-size: 12.5px;
    line-height: 1.32;
    color: rgba(255, 255, 255, .78);
    /* Une seule ligne : « professionnels déjà certifiés » se coupait en
       deux, ce qui décrochait le libellé de son chiffre. */
    white-space: nowrap;
}

/* --- Secteurs et codes RS --- */

.axf-hero-amiante__sectors {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.axf-hero-amiante__sectors li {
    font-family: 'Oswald', sans-serif;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 2px;
    padding: 6px 12px;
    white-space: nowrap;
}

/* --- Mention France Compétences --- */

.axf-hero-amiante__note {
    margin: 18px 0 0;
    font-size: 11.5px;
    line-height: 1.45;
    color: rgba(255, 255, 255, .55);
    max-width: 420px;
}

@media screen and (max-width: 900px) {
    .axf-hero-amiante__figures { gap: 22px; margin-bottom: 20px; }
    .axf-hero-amiante__figure { font-size: 34px; }
}

@media screen and (max-width: 600px) {
    .axf-hero-amiante__figures { gap: 16px; }
    .axf-hero-amiante__figure { font-size: 28px; }
    .axf-hero-amiante__figure-label { font-size: 11.5px; white-space: normal; }
    .axf-hero-amiante__sectors { gap: 6px; margin-bottom: 22px; }
    .axf-hero-amiante__sectors li { font-size: 10.5px; padding: 5px 9px; }
    .axf-hero-amiante__note { display: none; }
}

/* =====================================================================
   CORRECTIFS DE VISIBILITÉ DES COMMANDES

   Le hero classique empile plusieurs couches (vidéo, voile, grille
   cinétique, widget de devis) dont certaines montent haut en z-index.
   Les commandes doivent passer au-dessus en toutes circonstances.
   ===================================================================== */

.axf-hero-carousel__controls { z-index: 500; }

/* Les flèches restent accessibles sur mobile : elles rétrécissent au
   lieu de disparaître. Le glissement au doigt reste possible. */
@media screen and (max-width: 600px) {
    .axf-hero-carousel__arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

/* Contraste garanti quelle que soit l'image de fond de la diapositive. */
.axf-hero-carousel__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 31, 69, .72);
}

/* =====================================================================
   MESSAGE DE DIAGNOSTIC (visible uniquement des administrateurs)
   ===================================================================== */

.axf-hero-admin-notice {
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 24px;
    background: #fff8e1;
    border-left: 5px solid var(--axf-jaune);
    color: #4a3b12;
    font-size: 14px;
    line-height: 1.55;
}

.axf-hero-admin-notice strong { display: block; margin-bottom: 8px; }

.axf-hero-admin-notice ul { margin: 0 0 10px; padding-left: 20px; }

.axf-hero-admin-notice li { margin-bottom: 5px; }

.axf-hero-admin-notice p { margin: 0; font-size: 12.5px; opacity: .75; }

/* =====================================================================
   MODULE « SIMULATEUR DE PARCOURS DE CERTIFICATION »

   Trois étapes numérotées portent la promesse : le visiteur doit voir
   d'un coup d'œil que l'outil est court et qu'il repart avec une
   réponse. Les chiffres réutilisent la mécanique du module amiante.
   ===================================================================== */

.axf-hero-slide--parcours .axf-hero-slide__media::after {
    background: linear-gradient(100deg, rgba(46, 31, 69, .95) 0%, rgba(74, 53, 104, .82) 44%, rgba(255, 193, 7, .18) 100%);
}

.axf-hero-parcours { max-width: 660px; }

.axf-hero-parcours .axf-hero-slide__text {
    max-width: 540px;
    margin-bottom: 22px;
}

/* --- Les trois étapes --- */

.axf-hero-parcours__steps {
    list-style: none;
    counter-reset: axf-step;
    margin: 0 0 26px;
    padding: 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.axf-hero-parcours__steps li {
    counter-increment: axf-step;
    position: relative;
    flex: 1 1 170px;
    min-width: 150px;
    padding: 12px 14px 12px 40px;
    background: rgba(255, 255, 255, .08);
    border-left: 3px solid var(--axf-jaune);
    border-radius: 2px;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, .9);
}

.axf-hero-parcours__steps li::before {
    content: counter(axf-step);
    position: absolute;
    left: 13px;
    top: 11px;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 17px;
    line-height: 1;
    color: var(--axf-jaune);
}

/* --- Chiffres : plus discrets qu'en amiante, les étapes portent déjà --- */

.axf-hero-parcours__figures { margin-bottom: 26px; }

.axf-hero-parcours__figures .axf-hero-amiante__figure { font-size: 34px; }

@media screen and (max-width: 900px) {
    .axf-hero-parcours__steps { gap: 8px; margin-bottom: 20px; }
    .axf-hero-parcours__steps li { flex: 1 1 100%; padding: 10px 12px 10px 36px; }
    .axf-hero-parcours__figures .axf-hero-amiante__figure { font-size: 28px; }
}

@media screen and (max-width: 600px) {
    /* Sur mobile la troisième étape sort du cadre utile : les deux
       premières suffisent à porter la promesse. */
    .axf-hero-parcours__steps li:nth-child(3) { display: none; }
    .axf-hero-parcours__steps li { font-size: 12.5px; }
    .axf-hero-parcours__figures { margin-bottom: 20px; }
}

/* =====================================================================
   CONTRASTE DU TEXTE DANS LES DIAPOSITIVES

   axf-chrome.css pose `body { color: var(--axf-violet) }`, soit #2e1f45.
   Tout élément d'une diapositive qui n'a pas de couleur propre hérite
   donc de ce violet foncé — illisible sur le fond violet de la
   diapositive.

   Plutôt que de recolorer élément par élément (et d'en oublier au
   prochain gabarit), on pose la couleur au niveau du panneau : elle
   descend par héritage à tout ce qui n'en déclare pas. Les exceptions
   sont ensuite réaffirmées explicitement.
   ===================================================================== */

.axf-hero-carousel__track > .axf-hero-slide:not(.axf-hero-slide--classic) {
    color: #fff;
}

.axf-hero-slide__panel,
.axf-hero-slide__panel p,
.axf-hero-slide__panel li,
.axf-hero-slide__panel span,
.axf-hero-slide__panel strong,
.axf-hero-slide__panel em {
    color: inherit;
}

/* `a { color: inherit }` dans axf-chrome.css : les liens suivent donc
   déjà la couleur du panneau. On l'affirme malgré tout pour ne pas
   dépendre de l'ordre de chargement des feuilles. */
.axf-hero-slide__panel a { color: #fff; }

/* --- Exceptions : éléments à couleur propre --- */

.axf-hero-slide__eyebrow,
.axf-hero-amiante__figure { color: var(--axf-jaune, #FFC107); }

.axf-hero-slide__title { color: #fff; }

.axf-hero-slide__text,
.axf-hero-amiante__figure-label { color: rgba(255, 255, 255, .84); }

.axf-hero-slide__fact-label { color: rgba(255, 255, 255, .52); }

.axf-hero-amiante__note { color: rgba(255, 255, 255, .55); }

/* Seul élément à texte foncé : le bouton, posé sur aplat jaune.
   La règle est renforcée pour survivre à `a { color: inherit }`. */
.axf-hero-slide__panel a.axf-hero-slide__cta,
.axf-hero-slide__cta {
    color: var(--axf-violet, #2e1f45);
    background: var(--axf-jaune, #FFC107);
}

.axf-hero-slide__panel a.axf-hero-slide__cta:hover,
.axf-hero-slide__cta:hover {
    color: var(--axf-violet, #2e1f45);
    background: #fff;
}

/* Le numéro des étapes du simulateur reste jaune sur son aplat translucide. */
.axf-hero-parcours__steps li::before { color: var(--axf-jaune, #FFC107); }
