/*
 Theme Name:   Astra Child
 Description:  Thème enfant pour le projet Maki Expeditions
 Author:       Chamarah
 Template:     astra
 Version:      1.0.0
*/

/* Tes styles personnalisés commencent ici */
:root {
    --maki-brand: #d49a63;
    --maki-text: #666e71;
    --maki-heading-light: #6f4b0e;
    --maki-dark: #262626;
}

/* Header/menu behavior globally: transparent + fixed, white on scroll. */
body .ast-primary-header-bar,
body .ast-above-header-bar,
body .ast-below-header-bar {
    background: transparent;
    transition: background-color 0.28s ease, box-shadow 0.28s ease;
}

body .main-header-bar-wrap {
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 9999;
}

body:not(.maki-scrolled) .main-header-menu > .menu-item > .menu-link,
body:not(.maki-scrolled) .site-title a,
body:not(.maki-scrolled) .ast-mobile-menu-trigger-minimal {
    color: #ffffff;
}

body.maki-scrolled .ast-primary-header-bar,
body.maki-scrolled .ast-above-header-bar,
body.maki-scrolled .ast-below-header-bar {
    background: #ffffff;
    box-shadow: 0 6px 24px rgba(2, 6, 23, 0.08);
}

body.maki-scrolled .main-header-menu > .menu-item > .menu-link,
body.maki-scrolled .site-title a,
body.maki-scrolled .ast-mobile-menu-trigger-minimal {
    color: #0f172a;
}

/* Desktop nav — underline animé + état page/section active */
@media (min-width: 922px) {
    #ast-desktop-header .main-header-menu > .menu-item {
        margin: 0 10px;
    }

    #ast-desktop-header .main-header-menu > .menu-item > .menu-link {
        display: inline-block;
        font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
        font-size: 0.94rem;
        font-weight: 500;
        letter-spacing: 0.01em;
        line-height: 1.3;
        padding: 12px 16px;
        position: relative;
        text-transform: lowercase;
        transition: color 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    }

    #ast-desktop-header .main-header-menu > .menu-item > .menu-link::first-letter {
        text-transform: uppercase;
    }

    #ast-desktop-header .main-header-menu > .menu-item > .menu-link::after {
        background: currentColor;
        border-radius: 999px;
        bottom: 0;
        content: "";
        height: 2px;
        left: 50%;
        position: absolute;
        transform: translateX(-50%) scaleX(0);
        transform-origin: center;
        transition: transform 0.36s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.32s ease;
        width: calc(100% - 4px);
    }

    #ast-desktop-header .main-header-menu > .menu-item > .menu-link:hover::after,
    #ast-desktop-header .main-header-menu > .menu-item > .menu-link:focus-visible::after {
        transform: translateX(-50%) scaleX(1);
    }

    #ast-desktop-header .main-header-menu > .menu-item > .menu-link:focus {
        outline: none;
    }

    #ast-desktop-header .main-header-menu > .menu-item.maki-nav-active > .menu-link::after,
    #ast-desktop-header .main-header-menu > .menu-item.current-menu-item:not(.maki-nav-page-suppressed) > .menu-link::after,
    #ast-desktop-header .main-header-menu > .menu-item.current-menu-ancestor:not(.maki-nav-page-suppressed) > .menu-link::after,
    #ast-desktop-header .main-header-menu > .menu-item.current_page_item:not(.maki-nav-page-suppressed) > .menu-link::after {
        background: var(--maki-brand, #d49a63);
        transform: translateX(-50%) scaleX(1);
    }

    body:not(.maki-scrolled) #ast-desktop-header .main-header-menu > .menu-item > .menu-link:hover,
    body:not(.maki-scrolled) #ast-desktop-header .main-header-menu > .menu-item > .menu-link:focus-visible,
    body:not(.maki-scrolled) #ast-desktop-header .main-header-menu > .menu-item.maki-nav-active > .menu-link,
    body:not(.maki-scrolled) #ast-desktop-header .main-header-menu > .menu-item.current-menu-item:not(.maki-nav-page-suppressed) > .menu-link,
    body:not(.maki-scrolled) #ast-desktop-header .main-header-menu > .menu-item.current-menu-ancestor:not(.maki-nav-page-suppressed) > .menu-link,
    body:not(.maki-scrolled) #ast-desktop-header .main-header-menu > .menu-item.current_page_item:not(.maki-nav-page-suppressed) > .menu-link {
        color: var(--maki-brand, #d49a63);
    }

    body:not(.maki-scrolled) #ast-desktop-header .main-header-menu > .menu-item > .menu-link:hover::after,
    body:not(.maki-scrolled) #ast-desktop-header .main-header-menu > .menu-item > .menu-link:focus-visible::after {
        background: var(--maki-brand, #d49a63);
    }

    body.maki-scrolled #ast-desktop-header .main-header-menu > .menu-item > .menu-link:hover,
    body.maki-scrolled #ast-desktop-header .main-header-menu > .menu-item > .menu-link:focus-visible,
    body.maki-scrolled #ast-desktop-header .main-header-menu > .menu-item.maki-nav-active > .menu-link,
    body.maki-scrolled #ast-desktop-header .main-header-menu > .menu-item.current-menu-item:not(.maki-nav-page-suppressed) > .menu-link,
    body.maki-scrolled #ast-desktop-header .main-header-menu > .menu-item.current-menu-ancestor:not(.maki-nav-page-suppressed) > .menu-link,
    body.maki-scrolled #ast-desktop-header .main-header-menu > .menu-item.current_page_item:not(.maki-nav-page-suppressed) > .menu-link {
        color: var(--maki-heading-light, #6f4b0e);
    }

    body.maki-scrolled #ast-desktop-header .main-header-menu > .menu-item > .menu-link:hover::after,
    body.maki-scrolled #ast-desktop-header .main-header-menu > .menu-item > .menu-link:focus-visible::after,
    body.maki-scrolled #ast-desktop-header .main-header-menu > .menu-item.maki-nav-active > .menu-link::after,
    body.maki-scrolled #ast-desktop-header .main-header-menu > .menu-item.current-menu-item:not(.maki-nav-page-suppressed) > .menu-link::after,
    body.maki-scrolled #ast-desktop-header .main-header-menu > .menu-item.current-menu-ancestor:not(.maki-nav-page-suppressed) > .menu-link::after,
    body.maki-scrolled #ast-desktop-header .main-header-menu > .menu-item.current_page_item:not(.maki-nav-page-suppressed) > .menu-link::after {
        background: var(--maki-brand, #d49a63);
    }
}

/* Footer editable via Elementor page. */
.maki-custom-footer {
    background: var(--maki-dark);
    color: #e2e8f0;
    margin-top: 0;
}

.maki-custom-footer__inner {
    margin: 0 auto;
    max-width: 1280px;
}

.maki-custom-footer a {
    color: #ffffff;
}

.maki-custom-footer a:hover {
    color: var(--maki-brand);
}

/* Keep footer attached to the bottom on all pages. */
#page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#content {
    flex: 1 0 auto;
}

#maki-custom-footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* Hide header social icons block from menu area. */
.site-header [data-section="section-hb-social-icons-1"] {
    display: none !important;
}

/* Homepage model sections typography/alignment calibration. */
.maki-hero-container,
.maki-model-intro,
.maki-model-stats,
.maki-model-about,
.maki-testimonials,
.maki-model-brochure {
    font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}

.maki-model-intro,
.maki-model-about,
.maki-testimonials {
    color: var(--maki-text);
}

.maki-model-intro h1,
.maki-model-intro h2,
.maki-model-intro h3,
.maki-model-about h1,
.maki-model-about h2,
.maki-model-about h3,
.maki-testimonials h1,
.maki-testimonials h2,
.maki-testimonials h3 {
    color: var(--maki-heading-light);
}

/*
 * Maki widgets: width follows the direct Elementor container (boxed vs full).
 * - Parent .e-con-boxed  → stays inside 1140px (or custom boxed width)
 * - Parent full width    → can go edge-to-edge
 */
.maki--auto-width {
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
}

/* Full-width Elementor container: fill parent (no 100vw — avoids white side gaps) */
.e-con.e-con-full > .elementor-element .maki--auto-width,
.e-con.e-con-full > .elementor-element > .elementor-widget-container {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
}

.e-con.e-con-full > .elementor-element .maki--auto-width {
    left: auto;
    right: auto;
}

/* Boxed Elementor container (e-con-boxed: widgets inside .e-con-inner) */
.e-con.e-con-boxed > .e-con-inner > .elementor-element .maki--auto-width {
    left: auto;
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    right: auto;
    width: 100%;
}

/* Optional: force breakout when parent is boxed but you still want edge-to-edge */
.maki--force-bleed {
    left: 50%;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
    position: relative;
    right: 50%;
    width: 100vw;
}

/* Elementor pages: let Elementor control horizontal layout (not Astra 1240px cap) */
body.elementor-page .site-content > .ast-container,
body.elementor-page .site-content #primary {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
}

/* Full-width Elementor sections: no default side padding (avoids ~10px white strips) */
body.elementor-page .e-con.e-con-full {
    --padding-left: 0;
    --padding-right: 0;
}

body.elementor-page .e-con.e-con-full:has(> .elementor-element .maki--auto-width) {
    --padding-top: 0;
    --padding-bottom: 0;
    --padding-left: 0;
    --padding-right: 0;
}

/*
 * Hero flush to top (local vs prod)
 * Sur la prod, Astra / Elementor ajoutent souvent un padding-top sur #content,
 * .ast-container ou le 1er conteneur Elementor → bande blanche au-dessus du hero.
 */
body.maki-front-page #masthead,
body.front-page #masthead,
body.home #masthead {
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.maki-front-page #content.site-content,
body.front-page #content.site-content,
body.home #content.site-content {
    margin-top: calc(-1 * var(--maki-header-offset, 80px)) !important;
    padding-top: 0 !important;
}

body.maki-front-page #content .ast-container,
body.front-page #content .ast-container,
body.home #content .ast-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.maki-front-page #primary,
body.front-page #primary,
body.home #primary {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.maki-front-page #content .ast-container > .elementor,
body.front-page #content .ast-container > .elementor,
body.home #content .ast-container > .elementor {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.maki-front-page #content .ast-container > .elementor > .e-con:first-child,
body.front-page #content .ast-container > .elementor > .e-con:first-child,
body.home #content .ast-container > .elementor > .e-con:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.maki-front-page #content .ast-container > .elementor > .elementor-element:first-child,
body.front-page #content .ast-container > .elementor > .elementor-element:first-child,
body.home #content .ast-container > .elementor > .elementor-element:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Barre d’admin WP : garder le header fixé sous elle (évite décalages selon l’environnement) */
body.admin-bar .main-header-bar-wrap {
    top: 32px !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar .main-header-bar-wrap {
        top: 46px !important;
    }
}

/* Blog index (Elementor posts page) */
.maki-blog-page {
    margin: 0 auto;
    max-width: 100%;
    padding: 0;
    width: 100%;
}

.maki-single-post__article--elementor .maki-single-post__content--elementor {
    margin: 0 auto;
    max-width: 100%;
    padding: 0;
    width: 100%;
}

.maki-single-post__article--elementor .maki-single-post__content--elementor > .elementor {
    width: 100%;
}

/* Single blog post layout */
.maki-single-post {
    margin: 0 auto;
    max-width: 1200px;
    padding: 140px 24px 0;
}

.maki-single-post__article {
    margin: 0 auto;
    max-width: 860px;
}

.maki-single-post__header {
    margin-bottom: 44px;
}

.maki-single-post__meta {
    align-items: center;
    color: #7c8487;
    display: inline-flex;
    font-size: 0.9rem;
    gap: 10px;
    letter-spacing: 0.03em;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.maki-single-post__dot {
    color: #c4c9cc;
}

.maki-single-post__title {
    color: #1f2937;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    margin: 0;
}

.maki-single-post__featured {
    border-radius: 18px;
    margin: 0 0 56px;
    overflow: hidden;
}

.maki-single-post__featured img {
    display: block;
    height: auto;
    width: 100%;
}

.maki-single-post__content {
    color: var(--maki-text);
    font-size: 1.08rem;
    line-height: 1.95;
}

.maki-single-post__content > * + * {
    margin-top: 1.4em;
}

.maki-single-post__content h2,
.maki-single-post__content h3,
.maki-single-post__content h4 {
    color: #2f2f2f;
    line-height: 1.35;
    margin-top: 2.2em;
}

.maki-single-post__content img {
    border-radius: 14px;
    height: auto;
}

@media (max-width: 1024px) {
    .maki-single-post {
        padding-top: 128px;
    }
}

@media (max-width: 767px) {
    .maki-single-post {
        padding: 108px 18px 0;
    }

    .maki-single-post__header {
        margin-bottom: 30px;
    }

    .maki-single-post__featured {
        margin-bottom: 40px;
    }

    .maki-single-post__content {
        font-size: 1rem;
        line-height: 1.85;
    }
}

/* Single tour */
.maki-single-tour {
    margin: 0 auto;
    max-width: 1200px;
    padding: 140px 24px 72px;
}

.maki-single-tour__header {
    margin-bottom: 28px;
    text-align: center;
}

.maki-single-tour__region {
    color: var(--maki-brand, #d49a63);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.maki-single-tour__title {
    color: var(--maki-heading-light, #6f4b0e);
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin: 0 0 8px;
}

.maki-single-tour__duration {
    color: var(--maki-text, #666e71);
    margin: 0;
}

.maki-single-tour__featured {
    border-radius: 18px;
    margin-bottom: 36px;
    overflow: hidden;
}

.maki-single-tour__featured img {
    display: block;
    height: auto;
    width: 100%;
}

.maki-single-tour__content {
    color: var(--maki-text, #666e71);
    font-size: 1.05rem;
    line-height: 1.85;
}

.maki-single-tour__actions {
    margin-top: 36px;
    text-align: center;
}

.maki-single-tour__book {
    background: var(--maki-brand, #d49a63);
    border: none;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 16px 28px;
    text-transform: uppercase;
}

/*
 * Hero sous header fixe : le contenu commence sous le masthead, donc sans décalage
 * on voit le fond blanc du body à travers le header transparent.
 */

/* Mobile header — Astra dropdown (.ast-mobile-header-content) */
@media (max-width: 921px) {
    #ast-mobile-header {
        position: relative;
        z-index: 10000;
    }

    #ast-mobile-header .ast-main-header-wrap {
        position: relative;
        z-index: 10002;
    }

    /* Transparent sur le hero (menu fermé, pas de scroll) */
    body:not(.maki-scrolled):not(.ast-main-header-nav-open) #ast-mobile-header .ast-primary-header-bar,
    body:not(.maki-scrolled):not(.ast-main-header-nav-open) #ast-mobile-header .ast-main-header-wrap,
    body:not(.maki-scrolled):not(.ast-main-header-nav-open) #ast-mobile-header {
        background: transparent !important;
        background-color: transparent !important;
        background-image: none !important;
        box-shadow: none !important;
    }

    /* Fond blanc au scroll ou menu ouvert */
    body.maki-scrolled #ast-mobile-header .ast-primary-header-bar,
    body.ast-main-header-nav-open #ast-mobile-header .ast-primary-header-bar {
        background: #fff !important;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    }

    /* Panneau menu en overlay fixe — ne pousse plus la page */
    body.ast-main-header-nav-open.ast-header-break-point #ast-mobile-header .ast-mobile-header-content {
        position: fixed !important;
        top: var(--maki-header-bottom, 80px) !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: calc(100dvh - var(--maki-header-bottom, 80px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: #fff !important;
        box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
        z-index: 10001;
        display: block !important;
        margin: 0 !important;
        padding: 10px 16px 24px !important;
    }

    body.maki-mobile-menu-open {
        overflow: hidden;
    }

    #ast-mobile-header #ast-hf-mobile-menu,
    #ast-mobile-header .ast-builder-menu-mobile .main-header-menu {
        display: block !important;
        width: 100%;
    }

    #ast-mobile-header .main-header-menu > .menu-item {
        border-bottom: 1px solid #eceff1;
        margin: 0;
        width: 100%;
    }

    #ast-mobile-header .main-header-menu > .menu-item:last-child {
        border-bottom: none;
    }

    #ast-mobile-header .main-header-menu > .menu-item > .menu-link {
        color: var(--maki-heading-light, #6f4b0e) !important;
        display: block;
        font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
        font-size: 1rem;
        font-weight: 500;
        letter-spacing: 0.01em;
        padding: 16px 8px;
        text-transform: lowercase;
        transition: color 0.25s ease, padding-left 0.25s ease;
    }

    #ast-mobile-header .main-header-menu > .menu-item > .menu-link::first-letter {
        text-transform: uppercase;
    }

    #ast-mobile-header .main-header-menu > .menu-item > .menu-link:hover,
    #ast-mobile-header .main-header-menu > .menu-item.maki-nav-active > .menu-link,
    #ast-mobile-header .main-header-menu > .menu-item.current-menu-item:not(.maki-nav-page-suppressed) > .menu-link {
        color: var(--maki-brand, #d49a63) !important;
        padding-left: 12px;
    }

    /* Burger : blanc sur hero, brand sur fond blanc */
    #ast-mobile-header [data-section="section-header-mobile-trigger"] .ast-mobile-menu-trigger-minimal {
        background: transparent !important;
        border: 1px solid rgba(255, 255, 255, 0.42) !important;
        border-radius: 12px;
        color: #fff !important;
        padding: 10px 12px;
        transition: border-color 0.25s ease, color 0.25s ease;
    }

    #ast-mobile-header [data-section="section-header-mobile-trigger"] .mobile-menu-toggle-icon .ast-mobile-svg {
        fill: currentColor !important;
    }

    body.maki-scrolled #ast-mobile-header [data-section="section-header-mobile-trigger"] .ast-mobile-menu-trigger-minimal,
    body.ast-main-header-nav-open #ast-mobile-header [data-section="section-header-mobile-trigger"] .ast-mobile-menu-trigger-minimal {
        border-color: var(--maki-brand, #d49a63) !important;
        color: var(--maki-brand, #d49a63) !important;
    }
}

/* Popup drawer fallback (if enabled in Astra) */
.ast-mobile-popup-drawer {
    z-index: 100001;
}

.ast-mobile-popup-drawer.active .ast-mobile-popup-inner {
    background: #fff;
}

.ast-mobile-popup-drawer .ast-mobile-popup-content {
    padding: 88px 24px 36px;
}

.ast-mobile-popup-drawer .main-header-menu .menu-item > .menu-link {
    border-bottom: 1px solid #eceff1;
    color: var(--maki-heading-light, #6f4b0e) !important;
    font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 18px 0;
    text-transform: lowercase;
}

.ast-mobile-popup-drawer .main-header-menu .menu-item > .menu-link::first-letter {
    text-transform: uppercase;
}

.ast-mobile-popup-drawer .main-header-menu .menu-item > .menu-link:hover,
.ast-mobile-popup-drawer .main-header-menu .menu-item.maki-nav-active > .menu-link,
.ast-mobile-popup-drawer .main-header-menu .menu-item.current-menu-item:not(.maki-nav-page-suppressed) > .menu-link {
    color: var(--maki-brand, #d49a63) !important;
}

#ast-mobile-popup .ast-mobile-popup-content::before {
    content: none;
    display: none;
}