/* Gallia VTC — Home Hotfix V3.1.0 */

.gallia-v310-hero {
    position: relative !important;
    overflow: hidden !important;
}

/* Cache de sécurité pour tout ancien CTA résiduel identifié par le JS. */
.gallia-v310-hidden-cta {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
}

@media (min-width: 1025px) {
    .gallia-v310-hero {
        height: 550px !important;
        min-height: 550px !important;
        max-height: 550px !important;
    }

    .gallia-v310-hero > img,
    .gallia-v310-hero .gallia-v310-hero-media,
    .gallia-v310-hero .gallia-v310-hero-media img {
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        max-height: none !important;
        object-fit: cover !important;
        object-position: center top !important;
    }

    .gallia-v310-hero.gallia-v310-background-hero,
    .gallia-v310-hero .gallia-v310-background-hero {
        background-size: cover !important;
        background-position: center top !important;
        background-repeat: no-repeat !important;
    }

    .gallia-v310-actions {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 14px !important;
        flex-wrap: nowrap !important;
        width: max-content !important;
        max-width: 100% !important;
        overflow: visible !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .gallia-v310-actions > a {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: max-content !important;
        max-width: none !important;
        min-height: 48px !important;
        margin: 0 !important;
        padding-left: 24px !important;
        padding-right: 24px !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
        line-height: 1.1 !important;
    }

    /* CTA secondaire recréé uniquement si la Home ne le contient pas déjà. */
    .gallia-v310-actions > a.gallia-v310-secondary {
        border: 1px solid rgba(255,255,255,.92) !important;
        background: rgba(11,26,47,.72) !important;
        color: #fff !important;
        text-decoration: none !important;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .gallia-v310-actions {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 12px !important;
        flex-wrap: wrap !important;
        max-width: 100% !important;
    }
}

@media (max-width: 767px) {
    .gallia-v310-actions {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .gallia-v310-actions > a {
        display: inline-flex !important;
        width: 100% !important;
        min-height: 46px !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }
}

/* V4.0.2 — alignement DIRECT des 5 cartes Private Day Trips.
   Les sélecteurs ci-dessous correspondent aux classes réelles de la Home Elementor.
   Aucun JS de détection n'est nécessaire. */
@media (min-width: 900px) {
    /* V5.3 — les images remplissent réellement toute la hauteur de leur ligne.
       L'ancienne contrainte à 128 px créait une grande zone blanche sous l'image
       lorsque la ligne s'allongeait pour accueillir les textes. */
    .gallia-home-row-image,
    .gallia-home-row-image .elementor-widget-container {
        height: 100% !important;
        min-height: 198px !important;
        max-height: none !important;
        overflow: hidden !important;
        align-self: stretch !important;
    }
    .gallia-home-row-image img {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 198px !important;
        max-height: none !important;
        object-fit: cover !important;
        object-position: center center !important;
        margin: 0 !important;
        transform: none !important;
    }

    /* Réserve exactement le même espace au nom de chaque destination,
       qu'il tienne sur une ou deux lignes. */
    .gallia-home-trip-title,
    .gallia-home-trip-title .elementor-widget-container {
        min-height: 60px !important;
        box-sizing: border-box !important;
    }

    /* Même espace pour les lieux principaux : D-Day peut occuper deux lignes
       sans décaler tout ce qui se trouve dessous. */
    .gallia-home-trip-locations,
    .gallia-home-trip-locations .elementor-widget-container {
        min-height: 58px !important;
        box-sizing: border-box !important;
    }

    /* Ligne durée / capacité. */
    .gallia-home-trip-fact,
    .gallia-home-trip-fact .elementor-widget-container {
        min-height: 28px !important;
        box-sizing: border-box !important;
    }

    /* Prix + "per vehicle" sur une zone commune à toutes les cartes. */
    .gallia-home-trip-price,
    .gallia-home-trip-price .elementor-widget-container {
        min-height: 66px !important;
        box-sizing: border-box !important;
    }

    /* Les CTA deviennent strictement homogènes. */
    .gallia-home-trip-button,
    .gallia-home-trip-button .elementor-widget-container,
    .gallia-home-trip-button .elementor-button-wrapper {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .gallia-home-trip-button .elementor-button {
        width: 100% !important;
        min-height: 52px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        line-height: 1.05 !important;
        box-sizing: border-box !important;
    }
}

/* Sur tablette/mobile, aucun espace artificiel : les cartes reprennent leur flux naturel. */
@media (max-width: 899px) {
    .gallia-home-row-image,
    .gallia-home-row-image .elementor-widget-container,
    .gallia-home-trip-title,
    .gallia-home-trip-title .elementor-widget-container,
    .gallia-home-trip-locations,
    .gallia-home-trip-locations .elementor-widget-container,
    .gallia-home-trip-fact,
    .gallia-home-trip-fact .elementor-widget-container,
    .gallia-home-trip-price,
    .gallia-home-trip-price .elementor-widget-container {
        min-height: 0 !important;
        max-height: none !important;
        height: auto !important;
    }
    .gallia-home-row-image img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9 !important;
        object-fit: cover !important;
    }
}


/* V5.7.0 — Home CTA non-regression: all five day-trip buttons stay aligned,
   while the longer Mont-Saint-Michel label remains fully inside its button. */
@media (min-width:900px){
  .gallia-home-trip-button .elementor-button{
    min-height:58px!important;
    height:58px!important;
    padding:8px 8px!important;
    white-space:normal!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  .gallia-home-trip-button a[href*="mont-saint-michel"],
  .gallia-home-trip-button a[data-gallia-wa-slug="mont-saint-michel"]{
    font-size:12px!important;
    letter-spacing:0!important;
    line-height:1.05!important;
  }
}
@media (max-width:899px){
  .gallia-home-trip-button .elementor-button{
    min-height:52px!important;
    padding:10px 10px!important;
    white-space:normal!important;
  }
}
