/*
 * ============================================================
 *  EMLV – Hero Statique v4 (remplacement Slider Revolution)
 *  Fichier : emlv-hero-standalone.css
 *
 *  FICHIER AUTONOME – contient TOUT le CSS du hero en un seul endroit.
 *  À enregistrer dans : wp-content/themes/sirens/css/emlv-hero-standalone.css
 *  À enqueuer via functions.php (voir instructions ci-dessous).
 *
 *  Ce fichier est chargé APRÈS screen.css et grid.css, donc ses règles
 *  ont la priorité sans avoir à modifier les fichiers du thème.
 *
 *  AVANTAGE : WP Rocket peut le minifier séparément sans risque de conflit.
 *
 *  ENQUEUE dans functions.php (thème Sirens) :
 *  ─────────────────────────────────────────────
 *  function emlv_hero_enqueue_styles() {
 *      wp_enqueue_style(
 *          'emlv-hero-standalone',
 *          get_template_directory_uri() . '/css/emlv-hero-standalone.css',
 *          array(),
 *          '1.0.4'
 *      );
 *  }
 *  add_action( 'wp_enqueue_scripts', 'emlv_hero_enqueue_styles' );
 *  ─────────────────────────────────────────────
 *
 *  CORRECTIONS v4 :
 *  - Ajout du padding-top sur le hero pour compenser le header fixe mobile
 *    Sur mobile (< 767px) : .logo { position: fixed; top: 0; height: ~74px }
 *    Sur tablette (768–960px) : #header_wrapper normal flow (~81px)
 *    Sur desktop (> 960px) : #header_wrapper normal flow (~81px)
 * ============================================================
 */

/* ============================================================
   1. BASE – DESKTOP (tous les écrans ≥ 961px)
   ============================================================ */

#emlv-hero,
.emlv-hero {
    position: relative;
    width: 100%;
    height: 640px;
    overflow: hidden;
    background-color: #0296B7;
    /* Évite le layout shift avant chargement de l'image LCP */
    contain: layout style;
}

/* Image de fond (LCP – priorité maximale via fetchpriority="high" dans le HTML) */
#emlv-hero .emlv-hero__bg {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center top !important;
    display: block !important;
    vertical-align: bottom;
}

/* Overlay cyan semi-transparent */
.emlv-hero__overlay {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(2, 150, 183, 0.45);
    pointer-events: none;
    z-index: 1;
}

/* Grille de contenu */
.emlv-hero__content {
    position: relative;
    z-index: 2;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    width: 100%;
    max-width: 1265px;
    height: 100%;
    margin: 0 auto;
    padding: 60px 40px 40px;
    gap: 40px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/* Colonnes */
.emlv-hero__col {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    color: #fff;
}

.emlv-hero__col--left {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 55%;
    flex: 0 0 55%;
    max-width: 55%;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    padding-top: 10px;
}

.emlv-hero__col--right {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 40%;
    flex: 0 0 40%;
    max-width: 40%;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    gap: 20px;
}

/* Titre principal
   !important nécessaire : le thème a h1 { font-size: Xpx !important } dans grid.css */
#emlv-hero .emlv-hero__title {
    font-family: 'Anton', sans-serif !important;
    font-size: 65px !important;
    font-weight: 400 !important;
    line-height: 1.08 !important;
    letter-spacing: 3px !important;
    color: #fff !important;
    text-transform: none !important;
    margin: 0 0 30px 0 !important;
    padding: 0 !important;
}

/* Logos accréditations */
.emlv-hero__accreditations {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-bottom: 30px;
}

/* !important sur les images pour contrer le thème */
#emlv-hero .emlv-hero__accred-logo {
    display: block !important;
    height: auto !important;
    max-height: 64px !important;
    width: auto !important;
    max-width: none !important;
    object-fit: contain !important;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

#emlv-hero .emlv-hero__accred-logo--cge   { max-height: 38px !important; }
#emlv-hero .emlv-hero__accred-logo--efmd  { max-height: 51px !important; }
#emlv-hero .emlv-hero__accred-logo--amba  { max-height: 59px !important; }
#emlv-hero .emlv-hero__accred-logo--aacsb { max-height: 64px !important; }
#emlv-hero .emlv-hero__accred-logo--grade { max-height: 80px !important; }

/* Groupe de boutons CTA */
.emlv-hero__cta-group {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 12px;
}

/* Boutons */
.emlv-hero__btn {
    display: inline-block;
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 40px;
    letter-spacing: 0;
    text-decoration: none;
    padding: 0 25px;
    border-radius: 0;
    cursor: pointer;
    -webkit-transition: background-color 0.2s ease, color 0.2s ease;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.emlv-hero__btn--outline {
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.emlv-hero__btn--outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.7);
    color:#fff;
}

.emlv-hero__btn--cta {
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    font-size: 20px;
    font-weight: 500;
    text-transform: uppercase;
    padding: 10px 30px;
    line-height: 20px;
    margin-top: 14px;
}

.emlv-hero__btn--cta:hover {
    background: rgba(2, 150, 183, 0.6);
    border-color: #fff;
    color:#fff;
}

/* ============================================================
   CARROUSEL D'ÉVÉNEMENTS
   ============================================================ */

/* Conteneur du carrousel */
.emlv-hero__events {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

/* Track (fenêtre visible) */
.emlv-hero__events-track {
    position: relative;
    width: 100%;
    /* Hauteur fixe pour éviter le layout shift lors des transitions */
    min-height: 160px;
}

/* Chaque slide d'événement */
.emlv-hero__event {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    padding-top: 10px;
    /* Carrousel : masqué par défaut */
    position: absolute;
    top: 0;

    left: 0;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    -webkit-transition: opacity 0.5s ease;
    transition: opacity 0.5s ease;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Slide active */
.emlv-hero__event.is-active {
    opacity: 1;
    pointer-events: auto;
    position: relative; /* reprend le flux pour la hauteur du track */
}

/* Si un seul événement (pas de carrousel) : comportement normal */
.emlv-hero__events:not(.emlv-hero__events--carousel) .emlv-hero__event {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    -webkit-transition: none;
    transition: none;
}

/* Dots de navigation */
.emlv-hero__dots {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    gap: 8px;
    margin-top: 14px;
    padding: 0;
}

.emlv-hero__dot {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    padding: 0;
    cursor: pointer;
    -webkit-transition: background 0.25s ease, -webkit-transform 0.25s ease;
    transition: background 0.25s ease, transform 0.25s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.emlv-hero__dot:hover {
    background: rgba(255, 255, 255, 0.75);
}

.emlv-hero__dot.is-active {
    background: #fff;
    -webkit-transform: scale(1.3);
    transform: scale(1.3);
}

.emlv-hero__dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.emlv-hero__event-label {
    font-family: 'Anton', sans-serif;
    font-size: 40px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 1px;
    color: #fff;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
}

.emlv-hero__event-location,
.emlv-hero__event-date {
    font-family: 'Oswald', sans-serif;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 1px;
    color: #fff;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
}

.emlv-hero__event-location { margin-top: 6px; }

/* Badge classement */
.emlv-hero__ranking {
    display: block;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    margin-top: 20px;
    -webkit-transition: opacity 0.2s ease;
    transition: opacity 0.2s ease;
}

.emlv-hero__ranking:hover { opacity: 0.85; }

#emlv-hero .emlv-hero__ranking img {
    display: block !important;
    width: 174px !important;
    height: auto !important;
    max-width: 174px !important;
}

/* ============================================================
   2. RESPONSIVE
   ============================================================ */

/* ----------------------------------------------------------
   Grands écrans (≥ 1285px)
   ---------------------------------------------------------- */
@media only screen and (min-width: 1285px) {
    #emlv-hero.emlv-hero { height: 720px; }
    #emlv-hero .emlv-hero__title { font-size: 72px !important; }
    #emlv-hero .emlv-hero__content { padding: 70px 50px 50px; }
}

/* ----------------------------------------------------------
   Desktop étroit (960px – 1284px)
   ---------------------------------------------------------- */
@media only screen and (min-width: 960px) and (max-width: 1284px) {
    #emlv-hero.emlv-hero { height: 580px; }
    #emlv-hero .emlv-hero__title { font-size: 52px !important; letter-spacing: 2px !important; }
    #emlv-hero .emlv-hero__event-label { font-size: 32px; }
    #emlv-hero .emlv-hero__event-location,
    #emlv-hero .emlv-hero__event-date { font-size: 20px; }
    #emlv-hero .emlv-hero__content { padding: 50px 30px 30px; }
}

/* ----------------------------------------------------------
   Tablette portrait (768px – 960px)
   Sur tablette, le header est en flux normal (non fixe)
   → pas de padding-top supplémentaire nécessaire sur le hero
   ---------------------------------------------------------- */
@media only screen and (min-width: 768px) and (max-width: 960px) {
    #emlv-hero.emlv-hero {
        height: auto !important;
        min-height: 480px;
        width: 100% !important;
    }
    #emlv-hero .emlv-hero__content {
        -webkit-box-orient: vertical !important;
        -webkit-box-direction: normal !important;
        -ms-flex-direction: column !important;
        flex-direction: column !important;
        padding: 40px 24px 30px !important;
        gap: 24px;
        height: auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    #emlv-hero .emlv-hero__col--left,
    #emlv-hero .emlv-hero__col--right {
        -webkit-box-flex: 0 !important;
        -ms-flex: 0 0 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    #emlv-hero .emlv-hero__title { font-size: 44px !important; letter-spacing: 2px !important; margin-bottom: 20px !important; }
    #emlv-hero .emlv-hero__event-label { font-size: 30px; }
    #emlv-hero .emlv-hero__event-location,
    #emlv-hero .emlv-hero__event-date { font-size: 18px; }
    #emlv-hero .emlv-hero__col--right {
        -webkit-box-orient: horizontal !important;
        -webkit-box-direction: normal !important;
        -ms-flex-direction: row !important;
        flex-direction: row !important;
        -webkit-box-align: start;
        -ms-flex-align: start;
        align-items: flex-start;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        gap: 16px;
    }
    #emlv-hero .emlv-hero__ranking img { width: 120px !important; max-width: 120px !important; height: auto !important; }
    /* Contrer la règle du thème sur les images */
    #emlv-hero img { max-width: none !important; }
    #emlv-hero .emlv-hero__bg { width: 100% !important; height: 100% !important; max-width: none !important; }
}

/* ----------------------------------------------------------
   Mobile (< 767px)
   Sur mobile, le thème applique :
     .logo { position: fixed; top: 0; padding: 10px 0; }
   Le logo fait 54px de hauteur → header fixe total = 74px
   On ajoute padding-top: 74px au hero pour ne pas être masqué.

   Si le site a une admin bar (admin connecté) : +46px (admin bar mobile)
   → géré par body.admin-bar selector séparé
   ---------------------------------------------------------- */
@media only screen and (max-width: 767px) {

    /* Compensation du header fixe mobile (.logo position:fixed ~74px) */
    #emlv-hero.emlv-hero {
        height: auto !important;
        min-height: 0 !important;
        width: 100% !important;
        overflow: visible !important; /* visible pour ne pas couper le padding-top */
        padding-top: 74px !important;
        background-clip: padding-box;
    }

    /* L'image de fond doit couvrir le hero INCLUANT le padding-top */
    #emlv-hero .emlv-hero__bg {
        /* Étendre l'image pour couvrir aussi le padding-top */
        top: -74px !important;
        height: calc(100% + 74px) !important;
        object-position: 65% top !important;
        width: 100% !important;
        max-width: none !important;
    }

    #emlv-hero .emlv-hero__overlay {
        top: -74px !important;
        height: calc(100% + 74px) !important;
        background: rgba(2, 150, 183, 0.55);
    }

    #emlv-hero .emlv-hero__content {
        -webkit-box-orient: vertical !important;
        -webkit-box-direction: normal !important;
        -ms-flex-direction: column !important;
        flex-direction: column !important;
        padding: 24px 20px 28px !important;
        gap: 20px;
        height: auto !important;
        min-height: 380px;
        width: 100% !important;
        max-width: 100% !important;
        -webkit-box-sizing: border-box !important;
        box-sizing: border-box !important;
    }

    #emlv-hero .emlv-hero__col--left,
    #emlv-hero .emlv-hero__col--right {
        -webkit-box-flex: 0 !important;
        -ms-flex: 0 0 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Contrer h1 { font-size: 20px !important } du thème */
    #emlv-hero .emlv-hero__title {
        font-size: 36px !important;
        letter-spacing: 1px !important;
        line-height: 1.1 !important;
        margin-bottom: 16px !important;
        color: #fff !important;
    }

    #emlv-hero .emlv-hero__accreditations { gap: 8px 12px; margin-bottom: 20px; }
    #emlv-hero .emlv-hero__accred-logo--cge   { max-height: 28px !important; }
    #emlv-hero .emlv-hero__accred-logo--efmd  { max-height: 36px !important; }
    #emlv-hero .emlv-hero__accred-logo--amba  { max-height: 40px !important; }
    #emlv-hero .emlv-hero__accred-logo--aacsb { max-height: 44px !important; }
    #emlv-hero .emlv-hero__accred-logo--grade { max-height: 52px !important; }

    /* Contrer max-width: 100%; height: auto sur les images du thème */
    #emlv-hero img { max-width: none !important; }

    #emlv-hero .emlv-hero__cta-group {
        -webkit-box-orient: horizontal !important;
        -webkit-box-direction: normal !important;
        -ms-flex-direction: row !important;
        flex-direction: row !important;
        -ms-flex-wrap: wrap !important;
        flex-wrap: wrap !important;
        gap: 8px;
    }

    #emlv-hero .emlv-hero__btn {
        font-size: 14px !important;
        padding: 0 14px !important;
        line-height: 34px !important;
        width: auto !important;
        -webkit-box-flex: 0 !important;
        -ms-flex: 0 0 auto !important;
        flex: 0 0 auto !important;
        white-space: nowrap !important;
    }
    #emlv-hero .emlv-hero__btn--cta { font-size: 14px !important; padding: 7px 16px !important; line-height: 18px !important; width: auto !important; }
    #emlv-hero .emlv-hero__event-label { font-size: 26px; }
    #emlv-hero .emlv-hero__event-location,
    #emlv-hero .emlv-hero__event-date { font-size: 16px; }

    #emlv-hero .emlv-hero__col--right {
        -webkit-box-orient: horizontal !important;
        -webkit-box-direction: normal !important;
        -ms-flex-direction: row !important;
        flex-direction: row !important;
        -webkit-box-align: start;
        -ms-flex-align: start;
        align-items: flex-start;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        gap: 16px;
    }

    #emlv-hero .emlv-hero__ranking img { width: 100px !important; max-width: 100px !important; height: auto !important; }
    
    #emlv-hero .emlv-hero__events-track {
    min-height: 0 !important;
}

#emlv-hero .emlv-hero__dots {
    margin-top: 10px !important;
}

#emlv-hero .emlv-hero__btn--cta {
    margin-top: 8px !important;
}
}



/* ----------------------------------------------------------
   Admin connecté sur mobile : admin bar ajoute 46px en haut
   ---------------------------------------------------------- */
@media only screen and (max-width: 767px) {
    body.admin-bar #emlv-hero.emlv-hero {
        padding-top: 120px !important; /* 74px header + 46px admin bar */
    }
    body.admin-bar #emlv-hero .emlv-hero__bg,
    body.admin-bar #emlv-hero .emlv-hero__overlay {
        top: -120px !important;
        height: calc(100% + 120px) !important;
    }
}

/* ----------------------------------------------------------
   Mobile large (480px – 767px)
   ---------------------------------------------------------- */
@media only screen and (min-width: 480px) and (max-width: 767px) {
    #emlv-hero .emlv-hero__title { font-size: 36px !important; }
    #emlv-hero .emlv-hero__content { min-height: 360px; }
}

/* ----------------------------------------------------------
   Mobile étroit (< 480px)
   ---------------------------------------------------------- */
@media only screen and (max-width: 479px) {
    #emlv-hero .emlv-hero__content { padding: 20px 16px 20px !important; min-height: 340px; }
    #emlv-hero .emlv-hero__title { font-size: 30px !important; letter-spacing: 0.5px !important; }
    #emlv-hero .emlv-hero__event-label { font-size: 22px; }
    #emlv-hero .emlv-hero__event-location,
    #emlv-hero .emlv-hero__event-date { font-size: 14px; }
    #emlv-hero .emlv-hero__btn { font-size: 14px !important; padding: 0 14px !important; line-height: 32px !important; }
    #emlv-hero .emlv-hero__ranking img { width: 80px !important; max-width: 80px !important; }
}