/* ================================
   SHARED PAGE HERO
   Used by: Nos Activités, Actualités, Événements
   ================================ */

/* ------------------------------------------------------------------ */
/*  Keyframes                                                         */
/* ------------------------------------------------------------------ */

@keyframes ph-cursor-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0; }
}

/* ------------------------------------------------------------------ */
/*  Section – Hero                                                    */
/* ------------------------------------------------------------------ */

.page-hero {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--color-text);
}

.page-hero__background {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.page-hero__background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(10, 20, 15, 0.82) 0%,
        rgba(10, 20, 15, 0.55) 45%,
        rgba(10, 20, 15, 0.25) 100%
    );
    z-index: 1;
}

.page-hero__spacer {
    display: block;
    width: 100%;
    padding-top: 42%;
}

#page-hero-nos-actions .page-hero__background {
    background-image: url('../images/banner/NosActionBG.png');
    background-size: contain;
}

#page-hero-actualites .page-hero__background {
    background-image: url('../images/banner/NosBlogBG.png');
    background-size: contain;
}

#page-hero-evenements .page-hero__background {
    background-image: url('../images/banner/NosEventBG.png');
    background-size: contain;
}

.page-hero__content {
    position: absolute;
    bottom: 8%;
    left: 3%;
    z-index: 2;
    max-width: 780px;
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

.page-hero__content--visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.page-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.8rem, 5.5vw, 4.5rem);
    font-weight: 800;
    color: var(--color-white);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    white-space: nowrap;
}

.page-hero__subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
}

.page-hero__description {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    max-width: 580px;
}

.page-hero__typed {
    display: inline;
}

.page-hero__cursor {
    display: inline-block;
    color: var(--color-accent);
    animation: ph-cursor-blink 0.8s step-end infinite;
    margin-left: 2px;
    font-weight: 300;
}

.ph-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ------------------------------------------------------------------ */
/*  Responsive (768px)                                                */
/* ------------------------------------------------------------------ */

@media (max-width: 768px) {

    .page-hero__title {
        white-space: normal;
        font-size: clamp(2rem, 6vw, 3rem);
    }

    .page-hero__content {
        left: 4%;
        max-width: 90%;
    }
}

/* ------------------------------------------------------------------ */
/*  Responsive (380px)                                                */
/* ------------------------------------------------------------------ */

@media (max-width: 380px) {
    .page-hero__title {
        font-size: clamp(1.4rem, 7vw, 2rem);
        line-height: 1.2;
        white-space: normal;
        word-break: break-word;
        min-height: unset;
    }

    .page-hero__subtitle {
        font-size: clamp(0.75rem, 3.5vw, 0.9rem);
        margin-top: 8px;
    }

    .page-hero__content {
        padding: 12px 16px;
        gap: 8px;
    }
}

/* ------------------------------------------------------------------ */
/*  Accessibility – reduced motion                                    */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {

    .page-hero__content {
        transition: none !important;
        animation: none !important;
    }

    .page-hero__content--visible {
        opacity: 1 !important;
        transform: none !important;
    }

    .page-hero__cursor {
        animation: none;
        opacity: 1;
    }

    .ph-word {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* Hide subtitle and description in page-hero — all screen sizes */
.page-hero .page-hero__subtitle,
.page-hero .page-hero__description {
  display: none !important;
}
