/* Custom styles for NZ Partners */

/* Force "20+ years" text to stay on one line on mobile */
@media (max-width: 991px) {
    .font-secondary.text-15 {
        white-space: nowrap !important;
    }
    .custom-font-tertiary.text-6 {
        font-size: 1.3rem !important;
    }

    /* Texte "Vos partenaires" en gras et noir sur mobile */
    .mobile-white-bold {
        color: #000 !important;
        font-weight: 700 !important;
        opacity: 1 !important;
    }

    /* Texte "des moyens 100% garantis" sans surlignage, blanc et gras sur mobile */
    .mobile-no-mark {
        color: #FFF !important;
        font-weight: 700 !important;
        background: none !important;
        padding: 0 !important;
    }

    /* Augmenter l'espace entre "100%" et "garantis" sur mobile */
    .custom-el-1 p.mobile-no-mark {
        margin-bottom: 0.5rem !important;
    }
}

/* Réduire la hauteur des surlignages pour "des moyens", "100%", "garantis" */
@media (min-width: 992px) {
    .custom-el-1 mark.mark-height-100 {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        line-height: 1.2 !important;
    }

    .custom-el-1 mark.mark-height-50 {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        line-height: 0.8 !important;
        display: inline-block !important;
        vertical-align: middle !important;
    }
}

/* Fix alignement rond/flèche pour les liens longs dans "Nos Prestations" */
.nav-list-arrows .nav-link {
    display: flex !important;
    align-items: flex-start !important;
    line-height: 1.5 !important;
}

.nav-list-arrows .nav-link::before {
    flex-shrink: 0 !important;
    margin-top: 0.5em !important;
}

.nav-list-arrows .nav-link::after {
    margin-top: 0.5em !important;
}

/* Désactiver tous les effets d'apparition/animations */
.appear-animation,
[data-appear-animation] {
    opacity: 1 !important;
    visibility: visible !important;
    animation: none !important;
    transform: none !important;
    transition: none !important;
}

/* Forcer l'affichage des numéros de téléphone sur tous les écrans desktop */
@media (min-width: 992px) {
    #header .header-body .d-none.d-sm-flex.d-lg-none.d-xxl-flex {
        display: flex !important;
    }
}

/* Optimisation élégante de la navbar pour écrans moyens (1080p - 1440p) */
@media (min-width: 992px) and (max-width: 1440px) {
    /* Restructurer la partie droite : disposition en grille élégante */
    #header .header-body .col-auto:last-child > .d-flex.justify-content-end {
        display: grid !important;
        grid-template-columns: auto auto;
        grid-template-rows: auto auto;
        gap: 0.6rem 1rem;
        align-items: center;
        justify-items: end;
    }

    /* Forcer l'affichage des numéros dans la grille */
    #header .header-body .d-none.d-sm-flex.d-lg-none.d-xxl-flex {
        display: flex !important;
    }

    /* Les deux numéros côte à côte en haut */
    #header .header-body .col-auto .d-flex.align-items-center:nth-child(1),
    #header .header-body .col-auto .d-flex.align-items-center:nth-child(2) {
        grid-row: 1;
    }

    /* Le bouton centré en bas sur toute la largeur */
    #header .header-body .col-auto .btn-dark.btn-rounded {
        grid-column: 1 / -1;
        grid-row: 2;
        margin-left: 0 !important;
        justify-self: center;
    }

    /* Légère réduction de l'espacement menu pour plus d'air */
    #header .header-nav-main nav ul.nav-pills > li {
        padding: 0 0.5rem !important;
    }

    #header .header-nav-main nav ul.nav-pills > li > a {
        font-size: 15px !important;
        letter-spacing: -0.4px !important;
    }
}

/* Pour les écrans plus petits (1080p) - ajustements supplémentaires */
@media (min-width: 992px) and (max-width: 1280px) {
    /* Réduire légèrement les espacements de la grille */
    #header .header-body .col-auto:last-child > .d-flex.justify-content-end {
        gap: 0.5rem 0.8rem;
    }

    /* Réduire légèrement la police des numéros */
    #header .header-body .col-auto .text-4 {
        font-size: 0.9rem !important;
    }

    /* Réduire le menu un peu plus */
    #header .header-nav-main nav ul.nav-pills > li {
        padding: 0 0.35rem !important;
    }

    #header .header-nav-main nav ul.nav-pills > li > a {
        font-size: 14px !important;
    }

    /* Bouton légèrement plus compact */
    #header .header-body .col-auto .btn-dark.btn-rounded {
        padding: 0.35rem 1.5rem !important;
        font-size: 0.85rem !important;
    }
}

/* Pour les écrans vraiment serrés (tablettes paysage) */
@media (min-width: 992px) and (max-width: 1199px) {
    /* Disposition verticale complète à droite */
    #header .header-body .col-auto:last-child > .d-flex.justify-content-end {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.4rem !important;
        align-items: flex-end !important;
    }

    /* Les numéros en colonne */
    #header .header-body .col-auto .d-flex.align-items-center {
        gap: 0.4rem !important;
    }

    #header .header-body .col-auto .text-4 {
        font-size: 0.85rem !important;
    }

    /* Bouton en dessous, légèrement plus petit */
    #header .header-body .col-auto .btn-dark.btn-rounded {
        padding: 0.3rem 1.2rem !important;
        font-size: 0.8rem !important;
    }

    /* Menu très compact */
    #header .header-nav-main nav ul.nav-pills > li {
        padding: 0 0.25rem !important;
    }

    #header .header-nav-main nav ul.nav-pills > li > a {
        font-size: 13px !important;
        padding: 0.5rem 0.3rem !important;
    }
}

/* ===========================
   LANDING PAGE OPTIMIZATIONS
   =========================== */

/* Optimisation mobile pour la landing page */
@media (max-width: 767px) {
    /* Hero section responsive */
    .section-height-3 {
        min-height: auto !important;
        padding-top: 80px !important;
    }

    .min-vh-75 {
        min-height: auto !important;
    }

    /* Titre hero responsive */
    .text-10, .text-lg-14 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    /* Formulaire mobile optimisé */
    .card-body.p-4.p-lg-5 {
        padding: 1.5rem !important;
    }

    /* Boutons pleine largeur sur mobile */
    .btn-modern {
        width: 100% !important;
        padding: 1rem !important;
    }

    /* Témoignages empilés sur mobile */
    .testimonial-card {
        margin-bottom: 1.5rem;
    }
}

/* Chargement rapide - Optimisation images */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Formulaire de conversion - Focus états */
.contact-form input:focus,
.contact-form select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.25) !important;
}

/* Hero section - Hauteur optimale */
.section-height-3 {
    min-height: 600px;
}

@media (min-width: 992px) {
    .section-height-3 {
        min-height: 700px;
    }
}

/* Amélioration lisibilité sur fond primary */
.bg-primary .text-dark {
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.1);
}

/* Optimisation des gaps pour anciens navigateurs */
.gap-3 {
    gap: 1rem !important;
}

@supports not (gap: 1rem) {
    .gap-3 > * {
        margin-right: 1rem;
    }
    .gap-3 > *:last-child {
        margin-right: 0;
    }
}

/* Performance - Réduction des animations sur demande */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Optimisation du header transparent pour landing page */
.header-transparent .header-body {
    background: transparent !important;
    transition: background-color 0.3s ease;
}

.header-transparent.header-effect-shrink.shrink .header-body {
    background: #fff !important;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1) !important;
}

#header .header-nav-main nav > ul > li > a {
        text-transform: none !important;
    }