/* ============================================================
   REVERENTIA - Hero Video Section
   ============================================================ */

.rev-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Video container */
.rev-hero__video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.rev-hero__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Overlay gradient (hidden during video, shown at end) */
.rev-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 10, 0.4) 0%,
        rgba(10, 10, 10, 0.2) 40%,
        rgba(10, 10, 10, 0.3) 60%,
        rgba(10, 10, 10, 0.85) 100%
    );
    z-index: 2;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.rev-hero__overlay--visible {
    opacity: 1;
}

/* Content layer */
.rev-hero__content {
    position: relative;
    z-index: 3;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    padding: 0 var(--rev-space-md);
    transition: opacity 1s ease-in-out;
}

/* Hidden state: content invisible while video plays */
.rev-hero__content--hidden {
    opacity: 0;
    pointer-events: none;
}

/* Visible state: animations trigger via class */
.rev-hero__content--visible {
    opacity: 1;
    pointer-events: auto;
}

.rev-hero__logo {
    width: 80px;
    height: auto;
    margin-bottom: var(--rev-space-lg);
    opacity: 0;
}

.rev-hero__content--visible .rev-hero__logo {
    animation: heroFadeInDown 1.2s ease-out both;
}

.rev-hero__title {
    margin-bottom: var(--rev-space-sm);
    opacity: 0;
    line-height: 1;
}

.rev-hero__title-logo {
    width: clamp(220px, 40vw, 500px);
    height: auto;
    display: block;
    margin: 0 auto;
    /* logo validé NAME-VALIDE-RGB.svg : couleurs natives (or), pas de filtre blanc */
}

.rev-hero__content--visible .rev-hero__title {
    animation: heroFadeInUp 1s 0.3s both;
}

.rev-hero__subtitle {
    font-family: var(--rev-font-heading);
    font-style: italic;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--rev-gold);
    margin-bottom: var(--rev-space-xl);
    opacity: 0;
}

.rev-hero__content--visible .rev-hero__subtitle {
    animation: heroFadeInUp 1s 0.6s both;
}

/* Citation hero (remplace la tagline) — retour ligne élégant sur grand écran */
.rev-hero__quote {
    max-width: 28ch;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.rev-hero__cta {
    opacity: 0;
}

.rev-hero__content--visible .rev-hero__cta {
    animation: heroFadeInUp 1s 0.9s both;
}

/* Scroll indicator */
.rev-hero__scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: var(--rev-gold);
    font-size: 1.5rem;
    opacity: 0.6;
    animation: heroFloat 2s ease-in-out infinite;
}

/* Hero-specific animations */
@keyframes heroFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroFadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroFloat {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .rev-hero__video {
        display: none;
    }

    .rev-hero {
        background-color: var(--rev-black);
        background-image: url('../images/backgrounds/intro-poster.jpg');
        background-image: image-set(
            url('../images/backgrounds/intro-poster.avif') type('image/avif'),
            url('../images/backgrounds/intro-poster.webp') type('image/webp'),
            url('../images/backgrounds/intro-poster.jpg')  type('image/jpeg')
        );
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;
    }

    .rev-hero__overlay {
        opacity: 1;
    }

    .rev-hero__content--hidden {
        opacity: 1;
        pointer-events: auto;
    }

    .rev-hero__logo,
    .rev-hero__title,
    .rev-hero__title-logo,
    .rev-hero__subtitle,
    .rev-hero__cta {
        opacity: 1;
        animation: none;
    }

    .rev-hero__scroll-indicator {
        animation: none;
    }
}

/* No-video fallback */
.rev-hero--no-video {
    background-color: var(--rev-black);
    background-image: url('../images/backgrounds/intro-poster.jpg');
    background-image: image-set(
        url('../images/backgrounds/intro-poster.avif') type('image/avif'),
        url('../images/backgrounds/intro-poster.webp') type('image/webp'),
        url('../images/backgrounds/intro-poster.jpg')  type('image/jpeg')
    );
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.rev-hero--no-video .rev-hero__overlay {
    opacity: 1;
}

.rev-hero--no-video .rev-hero__content--hidden {
    opacity: 1;
    pointer-events: auto;
}

.rev-hero--no-video .rev-hero__logo,
.rev-hero--no-video .rev-hero__title,
.rev-hero--no-video .rev-hero__title-logo,
.rev-hero--no-video .rev-hero__subtitle,
.rev-hero--no-video .rev-hero__cta {
    opacity: 1;
    animation: none;
}

/* ===== CARD-STACK CONTEXT ===== */
/* Dans le card-stack, le hero remplit la carte et le contenu est toujours visible */
.rev-stack__card--hero .rev-hero {
    min-height: auto;
    height: 100%;
}

.rev-stack__card--hero .rev-hero__overlay {
    opacity: 1;
}

.rev-stack__card--hero .rev-hero__content {
    opacity: 1;
    pointer-events: auto;
}

.rev-stack__card--hero .rev-hero__logo,
.rev-stack__card--hero .rev-hero__title,
.rev-stack__card--hero .rev-hero__subtitle {
    opacity: 1;
    animation: none;
}

/* Mobile */
@media (max-width: 767.98px) {
    .rev-hero {
        min-height: 100svh;
    }

    .rev-hero__logo {
        width: 60px;
    }
}
