/*
Theme Name:   Astra Child — Skynight
Theme URI:    https://skynight.fr
Description:  Child theme Astra avec hero vidéo plein écran (YouTube / Vimeo)
Author:       Skynight France SAS
Author URI:   https://skynight.fr
Template:     astra
Version:      1.2.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  astra-child-skynight
*/

/* ─────────────────────────────────────────────
   WRAPPER SCÈNE — contient le hero et le spacer
   position: relative = contexte de positionnement
   La vidéo reste dans ce bloc et disparaît au scroll
───────────────────────────────────────────── */

.sn-hero-scene {
    position: relative;
    width: 100%;
    overflow: hidden;
    /* height = celle du hero, définie inline via JS depuis le shortcode */
}

/* ─────────────────────────────────────────────
   Hero vidéo — position absolute dans la scène
   (ne déborde PAS hors du wrapper)
───────────────────────────────────────────── */

.sn-hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

/* ── Iframe vidéo — centrage et couverture ratio 16:9 ── */
.sn-hero-video__iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;     /* 100 × 9/16 */
    min-height: 100%;
    min-width: 177.78vh; /* 100 × 16/9 */
    transform: translate(-50%, -50%);
    border: 0;
    pointer-events: none;
}

/* ── Calque sombre par-dessus la vidéo ── */
.sn-hero-video__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* ── Contenu positionné sur le hero (blocs Spectra, texte, CTA) ── */
.sn-hero-video > *:not(.sn-hero-video__iframe):not(.sn-hero-video__overlay) {
    position: relative;
    z-index: 2;
}

/* ─────────────────────────────────────────────
   HEADER ASTRA — transparent et flottant sur le hero
   Uniquement sur les pages avec le shortcode hero_video
───────────────────────────────────────────── */

body.has-sn-hero #masthead,
body.has-sn-hero .site-header,
body.has-sn-hero #ast-fixed-header {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Supprime le décalage de contenu ajouté par Astra pour les headers sticky */
body.has-sn-hero .ast-header-break-point .main-header-bar,
body.has-sn-hero #content.site-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ─────────────────────────────────────────────
   Vos styles personnalisés ci-dessous
───────────────────────────────────────────── */
