/*
Theme Name: Dlight FSE
Theme URI: 
Author: Echappée Web
Author URI: https://www.echappee-web.fr
Description: Thème du site Dlight en Full Site Editing avancé
Requires at least: 6.5
Tested up to: 6.5
Requires PHP: 8.0
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: echappee
*/

/* La page doit prendre 100% de la hauteur */
.wp-site-blocks {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
footer.wp-block-template-part {
    margin-top: auto !important;
}

/* --------------------------- HEADER --------------------------- */
header {
    .wp-block-site-logo img {
        width: 195px;
    }
    hr.wp-block-separator {
        /* margin-top: 1.85em; */
        margin-top: 2.45em;
    }
}

/* Main navigation */
@media only screen and (max-width: 768px) {
    #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 {
        li.mega-menu-megamenu > ul.mega-sub-menu {
            padding: 1rem;
        }
    }
}
@media only screen and (min-width: 769px) {
    #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 {
        justify-content: space-between;
        li.mega-menu-megamenu > ul.mega-sub-menu {
            height: 310px;
            box-shadow: inset 0 40px 40px -25px rgba(0,0,0,0.20)
        }
        .mega-menu-item-has-children > ul.mega-sub-menu {
            overflow: hidden !important;
        }
    }
    /* Correction barre de défilement avec Max Mega Menu */
    body {
        overflow-x: hidden;
    }
}
.max-mega-menu .menu-title {
    font-size: var(--wp--preset--font-size--xxl);
    color: var(--wp--preset--color--secondary-alt);
    font-family: var(--wp--preset--font-family--tertiary);
    text-transform: uppercase;
    margin-bottom: -1rem !important;
    margin-top: 10.5rem;
}

/* --------------------------- CONTENT --------------------------- */
.banner-content {
    &.avion {
        width: 61.5%;
        margin-inline: auto;
    }
    &.sac {
        width: 90%;
        margin-inline: auto;
    }
}
h1 {
    text-wrap: balance;
}
@media only screen and (max-width: 768px) {
    /* colonnes à l'ordre inversé sur mobile */
    .inverted {
        /* flex-direction: column-reverse; */
        & > .wp-block-column:first-child {
            order: 2;
        }
    }
    /* changer les espacements XL sur les blocs media text */
    .cols--media--text {
        /* --wp--preset--spacing--xl: 2.875rem; */
        --wp--preset--spacing--xl: 1.625rem;
    }
    /* changer les espacements sur les colonnes qui ne s'empilent pas sur mobile */
    .wp-block-columns.is-not-stacked-on-mobile {
        --wp--preset--spacing--xl: 2rem;
    }
}

@media only screen and (min-width: 1600px) {
    /* changer les espacements XL sur les blocs media text */
    .cols--media--text {
        --wp--preset--spacing--xl: 6rem;
    }
}

/* Pages anciennes sans banner : padding par défaut */
main .entry-content > h1:first-child {
    padding-top: var(--wp--preset--spacing--l);
}

/* Accordéons */
.eb-accordion-wrapper {
    h2 {
        font-family: var(--wp--preset--font-family--primary);
        font-size: var(--wp--preset--font-size--s);
        text-transform: uppercase;
        font-weight: var(--wp--custom--font-weight--bold);
    }
    .eb-accordion-content-wrapper {
        .eb-accordion-content {
            p + * {
                margin-block-start: var(--wp--preset--spacing--m);
            }
        }
    }
}

/* Page conseil & stratégie */
.blocks--conseil {
    p {
        font-size: calc(var(--wp--preset--font-size--s) * 0.75);
    }
    h2 {
        display: flex;
        align-items: center;
        font-weight: 700;
        gap: 0.5em;
        text-align: left;
        font-size: calc(var(--wp--preset--font-size--l) * 0.85);
        mark {
            font-size: var(--wp--preset--spacing--xl);
        }
    }
}

/* Liens dans les blocs gris */
p.has-primary-color.has-gray-background-color.has-link-color {
    a:hover, a:focus {
        font-weight: var(--wp--custom--font-weight--bold);
    }
}

/* Gros boutons noir en svg */
.svg_btn {
    rect {
        transition: all ease-in-out 0.1s;
    }
    &:is(:hover, :focus) {
        rect {
            fill: var(--wp--preset--color--accent);
        }
    }
}

/* --------------------------- FOOTER --------------------------- */
#top-btn {
    display: none;
    z-index: 100;
    position: fixed;
    bottom: 20px;
    right: 20px;
    cursor: pointer;
    width: 45px;
    height: 45px;
    background: url(assets/img/arrow-up.svg) no-repeat center/contain;
}

footer {
    ul.wp-block-list {
        list-style-type: none;
        text-align: center;
        padding: 0;
        li {
            padding: 0.15em;
        }
    }
}