/**
 * Theme Name: FABwp Theme Child
 * Description: Theme enfant pour FABwp Starter Theme. Le thème parent ne doit pas être supprimé !
 * Author:     Fabien Planet
 * Template:   fabwp-starter-theme
 * Version:    1.0.0
 * License:    GNU General Public License v2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: fabwp
 */

/* ajouter la class hide-on-mobile sur un block pour le cacher sur version mobile */
@media screen and (max-width:991px){
    .hide-on-mobile {
        display: none !important;
    }
}
/* ajouter la class hide-on-desktop sur un block pour qu'il apparaisse que sur version mobile */
@media screen and (min-width:992px){
    .hide-on-desktop {
        display: none !important;
    }
}

.is-sticky {
    position: sticky;
    top: 123px;
}
.scroll-margin-header {
    scroll-margin-top: 123px;
}

/* Animation du block détail effet accordéon */
details {

    @media (prefers-reduced-motion: no-preference) {
        interpolate-size: allow-keywords;
    }

    &::details-content {
        box-sizing: border-box;
        opacity: 0;
        block-size: 0;
        overflow-y: clip; 
        transition: content-visibility 500ms allow-discrete,
                    opacity 500ms,
                    block-size 500ms;
    }

    &[open]::details-content {
        opacity: 1;
        block-size: auto;
        transition: content-visibility 500ms allow-discrete,
                    opacity 500ms,
                    block-size 500ms;
    }

}


/* header:has(>.is-sticky) + main {
    margin-top: 0 !important;
} */
header.header-site {
    box-shadow: var(--wp--preset--shadow--shadow-light-1);
    background-color: var(--wp--custom--color--theme-50);
}
header.header-site .topbar {
    display: none;
}
header.header-site .custom-logo {
    width: 45px;
}
header.header-site,
header #header-block {
    transition: all 250ms ease-in-out;
}
header.header-site > .wp-block-group.is-sticky {
    padding-left: var(--wp--style--root--padding-right) !important;
    padding-right: var(--wp--style--root--padding-right) !important;
}
@media screen and (min-width:768px){
    header.header-site.reduce {
        translate: 0 -40px;
    }
    header.header-site .topbar {
        display: block;
    }
}
@media screen and (min-width:992px){
    header.header-site .custom-logo {
        width: 75px;
        transition: width 200ms ease-in-out;
    }
    header.header-site.reduce .custom-logo {
        width: 45px;
    }
}
@media screen and (max-width:991px){
    header:has(>.is-sticky) + main {
        margin-top: 118px !important;
    }
    header.header-site .wp-block-navigation__responsive-container-close {
        position: absolute;
        right: var(--wp--preset--spacing--s);
        top: var(--wp--preset--spacing--s);
        z-index: 2;
    }
    header.header-site .wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content {
        padding-inline: var(--wp--preset--spacing--s);
    }
    header.header-site .wp-block-navigation__responsive-container .wp-block-navigation__container.wp-block-navigation {
        gap: var(--wp--preset--spacing--xxs);
    }
    header.header-site .wp-block-navigation__responsive-container .wp-block-navigation__container.wp-block-navigation .wp-block-navigation__submenu-container {
        box-shadow: none;
        padding-inline: var(--wp--preset--spacing--xxs);
    }
}
@media screen and (max-width:767px){
    header:has(>.is-sticky) + main {
        margin-top: 76px !important;
    }
}

header.header-site .wp-block-navigation__container >li {
    padding-left: 12px;
    padding-right: 10px;
    padding-top: 7px;
    padding-bottom: 5px;
    border-radius: var(--wp--custom--radius--button);
    transition: all 150ms ease-in-out;
}
/* header.header-site .wp-block-navigation__container >li:hover {
    background-color: var(--wp--custom--color--theme-100);
} */
header.header-site .wp-block-navigation__container >li >a {
    font-family: var(--wp--preset--font-family--brand);
    font-weight: 600;
    text-transform: uppercase;
}
header.header-site .wp-block-navigation__container >li .wp-block-navigation__submenu-icon {
    width: .8em;
    height: .8em;
    margin-bottom: .2em;
}
header.header-site .wp-block-navigation__container >li .wp-block-navigation__submenu-container {
    border-radius: var(--wp--custom--radius--block);
    border-color: var(--wp--custom--color--theme-300);
    width: max-content !important;
    padding-right: var(--wp--preset--spacing--s);
    padding-top: var(--wp--preset--spacing--xxs);
    padding-bottom: var(--wp--preset--spacing--xxs);
    box-shadow: var(--wp--preset--shadow--shadow-light-1);
    transform: translateY(-4px);
    transition: transform 150ms ease-in-out;
}
header.header-site .wp-block-navigation__container >li:hover .wp-block-navigation__submenu-container {
    transform: translateY(0);
}

/** default is 600px pass to 1024px for button burger and container */
@media (max-width: 991px) {
  .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: flex;
  }
  .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    bottom: 0;
    display: none;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
  }
}

body.freeze {
    overflow-y: hidden;
}

footer > .wp-block-group {
    background-image: url(assets/img/bg-footer-bande.png), url(assets/img/bg-footer.jpg);
    background-repeat: no-repeat, repeat;
    background-position: top right, center;
    background-size: auto 55%, auto;
}

footer > .wp-block-group::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 0;
    right: 0;
    height: 4px;
    background-color: var(--wp--custom--color--brand-500);
}
:where(.footer-formations, .footer-informations) a {
    color: var(--wp--custom--color--false-white);
    text-decoration: none;
}
:where(.footer-formations, .footer-informations) a:hover {
    color: var(--wp--custom--color--false-white);
    text-decoration: underline;
}