/* Hero : photo plein écran, titre qui se révèle. */

.hero {
    /* Le hero repose sur une photo sombre : ses couleurs ne suivent pas le thème clair */
    --text: #f2f2f2;
    --text-muted: #a3a3a3;
    --surface: #1a1a1a;
    --border: #333333;

    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 640px;
    height: 100svh;
    overflow: hidden;
    background: var(--bg);
}

/* Couches d'image */
.hero__bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.hero__layer {
    position: absolute;
    inset: -6%; /* marge pour le parallaxe */
    will-change: transform;
}
.hero__layer picture,
.hero__layer img {
    display: block;
    width: 100%;
    height: 100%;
}
.hero__layer img {
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}
.hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.2s var(--ease);
    pointer-events: none;
}
.hero__video.is-playing {
    opacity: 1;
}

.hero__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgb(0 0 0 / 0.82) 0%, rgb(0 0 0 / 0.35) 45%, rgb(0 0 0 / 0.25) 100%),
        linear-gradient(to bottom, rgb(0 0 0 / 0.55) 0%, transparent 22%);
    pointer-events: none;
}
.hero__glow {
    position: absolute;
    top: -40%;
    right: -12%;
    width: 62vw;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 38%, transparent), transparent 65%);
    pointer-events: none;
    opacity: 0.55;
}

/* Contenu */
.hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-6);
    width: 100%;
    padding-bottom: 56px;
    color: #f2f2f2; /* le hero reste sombre dans les deux thèmes : il repose sur une photo */
}
.hero__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-5);
}
.hero .eyebrow {
    color: #f2f2f2;
    line-height: normal; /* mêmes hauteurs de ligne que la maquette Figma */
}
.hero .lead {
    color: #b8b8b8;
    line-height: normal;
}
.hero .btn {
    white-space: pre; /* la maquette met deux espaces avant la flèche */
}

.hero__title {
    display: flex;
    flex-direction: column;
}
.hero__title .line {
    display: block;
    overflow: hidden;
    padding-block: 0.04em; /* évite de rogner les accents */
    margin-block: -0.04em;
}
.hero__title .line__inner {
    display: block;
    will-change: transform;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.hero__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-2);
    text-align: right;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: normal;
    white-space: nowrap;
}
.hero__caption {
    color: #a3a3a3;
    letter-spacing: 0.06em;
}
.hero__scroll {
    letter-spacing: 0.12em;
    white-space: pre;
}

/* Mobile : plein écran */
@media (max-width: 800px) {
    .hero {
        height: 100svh; /* le hero remplit l'écran du téléphone */
        min-height: 560px;
    }
    .hero__content {
        position: static;
        padding-bottom: var(--space-6);
    }
    .hero__meta {
        display: none;
    }
    .hero__title {
        font-size: clamp(56px, 18vw, 88px);
    }
    .hero__actions {
        width: 100%;
    }
    .hero__actions .btn {
        width: 100%;
    }
}

/* États initiaux de l'animation d'entrée (appliqués seulement si JavaScript est actif) */
.js .hero [data-reveal] {
    opacity: 0;
}
.js .hero .line__inner {
    opacity: 0;
}
.js .hero__layer--photo {
    opacity: 0;
}

/* Mouvement réduit : tout est visible tout de suite */
.hero.is-static [data-reveal],
.hero.is-static .hero__layer--photo,
.hero.is-static .line__inner {
    opacity: 1 !important;
}
