/**
 * UP Paragliders — Hero d'accueil avec vidéo YouTube en background
 */

.up-home-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0A0A0A;
    isolation: isolate;
}

/* ============================================================
 *  Vidéo YouTube en background — fit cover via scale
 * ============================================================ */
.up-home-hero-video {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.up-home-hero-video-frame,
.up-home-hero-video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    /* Cover ratio 16:9 : on prend la max entre 100vw et 100vh*16/9
       pour que la vidéo couvre tout sans bandes noires */
    min-width: 100%;
    min-height: 100%;
    width: 177.78vh;   /* 100vh × 16/9 */
    height: 56.25vw;   /* 100vw × 9/16 */
    transform: translate(-50%, -50%) scale(1.04); /* scale léger pour masquer un éventuel cadre */
    border: 0;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.up-home-hero-video.is-ready .up-home-hero-video-frame,
.up-home-hero-video.is-ready iframe {
    opacity: 1;
}

/* ============================================================
 *  Overlay sombre pour la lisibilité du texte
 * ============================================================ */
.up-home-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(10, 10, 10, 0.55) 0%, rgba(10, 10, 10, 0.35) 40%, rgba(10, 10, 10, 0.7) 100%);
}

/* ============================================================
 *  Contenu superposé : eyebrow + titre + sub + CTAs
 * ============================================================ */
.up-home-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 980px;
    padding: clamp(80px, 12vw, 140px) clamp(20px, 4vw, 40px);
    text-align: center;
    color: #fff;
}

.up-home-hero-eyebrow {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #C73E1D;
    margin: 0 0 24px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.up-home-hero-title {
    font-family: "Inter", sans-serif;
    font-size: clamp(3rem, 9vw, 6rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: #fff;
    margin: 0 0 28px;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4);
}

.up-home-hero-accent {
    color: #A1131B;
}

.up-home-hero-sub {
    font-family: "Inter", sans-serif;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
    margin: 0 auto 40px;
    max-width: 680px;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

/* ============================================================
 *  CTAs
 * ============================================================ */
.up-home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.up-home-hero-btn {
    font-family: "Inter", sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 4px;
    text-decoration: none;
    transition: all .25s ease;
    cursor: pointer;
    display: inline-block;
    white-space: nowrap;
}

.up-home-hero-btn--primary {
    background: #A1131B;
    color: #fff;
    box-shadow: 0 8px 24px rgba(255, 77, 31, 0.4);
}
.up-home-hero-btn--primary:hover {
    background: #C73E1D;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(255, 77, 31, 0.5);
}

.up-home-hero-btn--ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.up-home-hero-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
}

/* ============================================================
 *  Indicateur de scroll
 * ============================================================ */
.up-home-hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}
.up-home-hero-scroll-line {
    display: block;
    width: 1px;
    height: 48px;
    background: rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}
.up-home-hero-scroll-line::after {
    content: '';
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 50%;
    background: #A1131B;
    animation: up-scroll-pulse 2.2s infinite ease-in-out;
}
@keyframes up-scroll-pulse {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(100%); }
    100% { transform: translateY(200%); }
}

/* ============================================================
 *  Crédits vidéo (bas-droit, discrets)
 * ============================================================ */
.up-home-hero-credits {
    position: absolute;
    bottom: 18px;
    right: 22px;
    z-index: 2;
    margin: 0;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.6875rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.65);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
    max-width: 60vw;
    text-align: right;
    line-height: 1.5;
    pointer-events: none;
}

.up-home-hero-credits strong {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
}

@media (max-width: 700px) {
    .up-home-hero-credits {
        position: static;
        text-align: center;
        margin: -32px auto 24px;
        padding: 0 20px;
        max-width: 100%;
        font-size: 0.625rem;
    }
}

/* ============================================================
 *  Fallback : si la vidéo n'a pas chargé (mobile data, erreur)
 * ============================================================ */
.up-home-hero-video.has-error,
.up-home-hero-video:not(.is-ready) {
    background:
        linear-gradient(135deg, #0A0A0A 0%, #1F1F1F 100%);
}

/* Respect des préférences utilisateur "reduce motion" */
@media (prefers-reduced-motion: reduce) {
    .up-home-hero-video iframe { display: none; }
    .up-home-hero-video { background: linear-gradient(135deg, #0A0A0A 0%, #1F1F1F 100%); }
    .up-home-hero-scroll-line::after { animation: none; }
}

/* ============================================================
 *  Mobile
 * ============================================================ */
@media (max-width: 700px) {
    .up-home-hero { min-height: 90vh; }
    .up-home-hero-inner { padding: 100px 20px 80px; }
    .up-home-hero-actions { flex-direction: column; align-items: center; }
    .up-home-hero-btn { width: 100%; max-width: 280px; text-align: center; }
}
