/*
Theme Name: Theme A - Assise
Author: Bayard-Service
Author URI: https://www.bayard-service.com
Description: A child theme for bsw-aster.
Text Domain: aster
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.0
Version: 1.3.9
Template: bsw-aster
*/

/* *****************************
----------------------------
	= LAYOUT
----------------------------
***************************** */

/* ----------------------------
	== HEADER
---------------------------- */
.site-header div:has(.wp-block-site-logo) {
    gap: 0;
}

/*
    LOGO
*/
@media only screen and (max-width: 800px) {
    .wp-block-site-logo {
        width: 100%;
    }
}

/*
    NEWSLETTER
*/
.site-header .acym_module_form {
    display: flex;
    max-width: 200px !important;
    border-bottom: 1px solid var(--wp--preset--color--current);
}
.site-header .acym_module_form .onefield,
.site-header .acym_fulldiv form {
    margin: 0;
}
.site-header .acym_module_form .onefield input {
    padding: 5px 0 !important;
    max-width: none;
    border: none;
    cursor: text;
}
.site-header .acym_module_form .onefield input:focus-visible {
    outline: none !important;
}
.site-header .acym_module_form .acysubbuttons {
    margin: 0;
}
.site-header .acym_module_form .acysubbuttons input {
    background: none;
    border: none;
    color: var(--wp--preset--color--primary);
}
.site-header .responseContainer {
    font-size: var(--wp--preset--font-size--small);
}

/*
    SEARCH
*/
.site-header .wp-block-search {
    max-width: 200px !important;
}
:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) {
    border: none;
    border-bottom: 1px solid var(--wp--preset--color--current);
    border-radius: 0;
}
:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) input {
    padding: 5px 0 !important;
}
:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) button {
    padding: 0 !important;
    background: none !important;
}
:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) svg {
    fill: var(--wp--preset--color--primary) !important;
}
@media only screen and (max-width: 800px) {
    .site-header .wp-block-search {
        max-width: none !important;
    }
    .site-header .block-popins .wp-block-search__inside-wrapper {
        gap: 10px;
    }
    .site-header .wp-block-search__button {
        padding: 10px;
        margin: 0;
    }
}

/*
	MAIN NAVIGATION
*/
nav.main-nav {
    overflow: unset;
}
.main-nav > ul {
    gap: 10px;
}
.main-nav li {
    padding: 5px 10px !important;
    background: var(--wp--preset--color--primary) !important;
    color: var(--wp--preset--color--white) !important;
    transition: all .5s;
}
.main-nav li:hover {
    background: color-mix(in srgb, var(--wp--preset--color--primary) 70%, var(--wp--preset--color--current) 30%) !important;
}
.main-nav li > a {
    color: var(--wp--preset--color--white) !important;
}
.main-nav li > a:hover,
.main-nav li > a:focus,
.main-nav .current-menu-item > a {
    color: var(--wp--preset--color--white) !important;
}
.main-nav .wp-block-navigation__submenu-container {
    border: none !important;
}
.main-nav .wp-block-navigation__submenu-container li {
    padding: 5px !important;
    border-top: 1px solid var(--wp--preset--color--white) !important;
    line-height: 1.2;
    text-transform: initial;
    font-weight: 400;
}

/* BURGER VERSION */
.bs-small-nav .main-nav:not(.actif) {
    display: none;
}
.bs-small-nav .bs-nav-bar {
    justify-content: right;
}
.bs-small-nav .main-nav li {
    flex-direction: column;
}
.bs-small-nav .main-nav li button {
    display: none;
}
.bs-small-nav .main-nav .wp-block-navigation__submenu-container {
    position: relative;
    top: 5px !important;
    right: auto !important;
    height: auto;
    width: auto;
    opacity: 1;
    visibility: visible;
}
.bs-small-nav .main-nav .wp-block-navigation__submenu-container li {
    border-color: color-mix(in srgb, var(--wp--preset--color--white) 50%, var(--wp--preset--color--transparent) 50%) !important;
}
@media only screen and (min-width: 800px) {
    .bs-small-nav .bs-nav-bar .block-popins {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        display: flex;
        background: color-mix(in srgb, var(--wp--preset--color--white) 0%, var(--wp--preset--color--transparent) 100%);
        opacity: 0;
        visibility: hidden;
    }
    .bs-small-nav .bs-nav-bar .block-popins.actif {
        background: color-mix(in srgb, var(--wp--preset--color--white) 50%, var(--wp--preset--color--transparent) 50%);
        opacity: 1;
        visibility: visible;
    }
    .bs-small-nav .bs-nav-bar .block-popins::after {
        content: "\e91d";
        position: fixed;
        top: var(--wp--preset--spacing--window);
        left: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: var(--wp--preset--color--primary);
        color: var(--wp--preset--color--white);
        font-family: icons;
        transform: translate(50vw, 0);
        transition: all .7s;
    }
    .bs-small-nav .bs-nav-bar .block-popins.actif::after {
        transform: translate(-100%, 0);
    }
    .bs-small-nav .bs-nav-bar .block-popins nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        transform: translate(100%, 0);
        padding: var(--wp--preset--spacing--window);
        display: flex;
        width: 50%;
        min-width: 200px;
        max-height: none;
        background: var(--wp--preset--color--primary);
        overflow-y: scroll;
        transition: all .7s;
    }
    .bs-small-nav .bs-nav-bar .block-popins.actif nav {
        transform: translate(0, 0);
    }
    .bs-small-nav .bs-nav-bar .block-popins nav ul {
        flex-direction: column;
    }
}
@media only screen and (max-width: 800px) {
    .main-nav:not(.actif) {
        display: none;
    }
    nav.main-nav {
        overflow-y: scroll;
    }
    .main-nav ul {
        flex-direction: column !important;
    }
    .main-nav li {
        flex-direction: column !important;
        width: 100%;
    }
    .main-nav li button {
        display: none !important;
    }
    .main-nav .wp-block-navigation__submenu-container {
        position: relative !important;
        top: 5px !important;
        right: auto !important;
        height: auto !important;
        width: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    .main-nav .wp-block-navigation__submenu-container li {
        border-color: color-mix(in srgb, var(--wp--preset--color--white) 50%, var(--wp--preset--color--transparent) 50%) !important;
    }
}

/*
    BUTTONS
*/
#pop-nav a {
    font-size: 1.8rem;
    vertical-align: central;
}
.bs-small-nav #pop-nav {
    display: block;
}
@media only screen and (min-width: 800px) {
    .site-header:not(.bs-small-nav) .wp-block-buttons:not(:has(.wp-block-button:not(.bt-popin))) {
        display: none;
    }
    .site-header .wp-block-buttons > .wp-block-button.bt-popin {
        display: none;
    }
}
@media only screen and (max-width: 800px) {
    .site-header .wp-block-buttons {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 200;
        justify-content: space-between !important;
        margin: 0 !important;
        padding: 5px var(--wp--preset--spacing--window);
        background: var(--wp--preset--color--primary);
    }
    .site-header .wp-block-buttons > .wp-block-button.bt-popin a {
        padding: 5px 10px;
        color: var(--wp--preset--color--white) !important;
        font-size: 1.2rem;
    }
}

/*
    BLOCK POPIN
*/
@media only screen and (min-width: 800px) {
    .block-popins {
        display: none;
        position: relative;
        opacity: 1;
        visibility: visible;
    }
    .block-popins::before {
        display: none;
    }
    .block-popins .acym_module,
    .block-popins .pop-search {
        display: block;
    }
    .block-popins > * {
        padding: 0;
        width: auto;
    }
    .block-popins > script {
        display: none;
    }
}
@media only screen and (max-width: 800px) {
    .block-popins {
        background: var(--wp--preset--color--white);
    }
    .block-popins::before {
        content: "\e91d";
        font-family: icons;
    }
}

/* ----------------------------
	== FOOTER
---------------------------- */
@media only screen and (min-width: 800px) {
    .site-footer .wp-block-columns:not(:first-child) {
        position: relative;
        margin: var(--wp--preset--spacing--text) 0 0;
        padding: var(--wp--preset--spacing--text) 0 0;
    }
    .site-footer .wp-block-columns:not(:first-child)::before {
        content: "";
        position: absolute;
        right: 0;
        left: 0;
        top: 0;
        height: 1px;
        background: var(--wp--preset--color--white);
        opacity: 0.6;
    }
}
.archive .site-footer {
    margin-block-start: var(--wp--preset--spacing--text);
}

/*
    SITE MAP
*/
.site-map {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    max-width: var(--wp--style--global--wide-size) !important;
    list-style: none;
}
.site-map li {
    flex: 1;
}
.site-map ul {
    padding: 0;
    list-style: none;
}
.site-map a {
    opacity: 0.6;
}
.site-map a:hover,
.site-map a:focus {
    opacity: 1;
}
.site-map > li > a {
    text-transform: uppercase;
}

/*
    CONTACT DETAIL
*/
.contact-detail {
    padding: 0;
    list-style: none;
}
.contact-detail li + li {
    margin: 10px 0 0;
}

/* ----------------------------
	== MAIN
---------------------------- */
@media only screen and (max-width: 800px) {
    main > .wp-block-group {
        display: flex;
        flex-direction: column;
    }
}

/*
    CONTENT
*/
.has-background .entry-content {
    padding: 0 var(--wp--preset--spacing--text) var(--wp--preset--spacing--text);
}
@media only screen and (max-width: 800px) {
    .entry-content {
        order: 2;
    }
}

/* *****************************
----------------------------
	= COMPONANTS
----------------------------
***************************** */

/* ----------------------------
	== BREADCRUMBS
---------------------------- */
.yoast-breadcrumbs {
    max-width: var(--wp--style--global--wide-size) !important;
    text-align: left;
}
@media screen and (max-width: 800px) {
    .wp-block-wpseopress-breadcrumbs li.breadcrumb-item:nth-last-child(2) a {
        align-items: center;
    }
    .yoast-breadcrumbs > a::before,
    .wp-block-wpseopress-breadcrumbs li.breadcrumb-item:nth-last-child(2) a::before {
        content: "\e91e";
        font-family: icons;
    }
}

/* ----------------------------
    == TITLE
---------------------------- */
.has-background .wp-block-post-title {
    padding: var(--wp--preset--spacing--text) var(--wp--preset--spacing--text) 0;
}
@media only screen and (max-width: 800px) {
    h1.wp-block-post-title {
        order: 1;
    }
}

/* ----------------------------
    == FEATURED IMAGE
---------------------------- */
@media only screen and (max-width: 800px) {
    .wp-block-post-featured-image {
        margin-block-start: 0 !important;
    }
}

/* ----------------------------
    == LINKS
---------------------------- */
.entry-content p > a,
.entry-content li > a,
.entry-content cite > a,
.entry-content td > a {
    box-shadow: inset 0 -1px 0 var(--wp--preset--color--primary);
}
.entry-content p > a:hover,
.entry-content p > a:focus,
.entry-content li > a:hover,
.entry-content li > a:focus,
.entry-content cite > a:hover,
.entry-content cite > a:focus,
.entry-content td > a:hover,
.entry-content td > a:focus {
    box-shadow: inset 0 -25px 0 var(--wp--preset--color--primary);
}

/* ----------------------------
    RELATED POSTS
---------------------------- */
.wp-block-bsw-related-posts-template {
    margin: 0;
    padding: var(--wp--preset--spacing--text);
}
.wp-block-bsw-related-posts-template p {
    margin: 0;
    text-align: left;
    font-size: 1rem;
}
.wp-block-bsw-related-posts-template p:empty {
    display: none;
}

/* ----------------------------
	== POST LIST GRID
---------------------------- */
.wp-block-query:has(> h2 + .wp-block-buttons),
.wp-block-query:has(> h2:last-child),
.wp-block-query:has(> h3:last-child) {
    display: none;
}
.wp-block-query .is-layout-grid:not(:first-child) {
    margin-block-start: var(--wp--preset--spacing--text);
}
.is-layout-grid li {
    gap: 0.45rem;
    padding-bottom: 10px;
    background: var(--wp--preset--color--white);
    border-bottom: 5px solid var(--wp--preset--color--primary);
}
.is-layout-grid li:not(:has(figure)) {
    padding-top: 10px;
}
.is-layout-grid li h2,
.is-layout-grid li h3 {
    padding: 0 10px;
    line-height: 1.5;
}
.is-layout-grid li > div,
.is-layout-grid li > p {
    margin: 0;
    padding: 0 10px;
}
.is-layout-grid li p.bsw-event-date {
    font-size: var(--wp--preset--font-size--small);
}

/*.BACKWARD COMPATIBILITY */
.is-style-aster-grille:not(.splide) li {
    background: var(--wp--preset--color--white);
    border-bottom: 5px solid var(--wp--preset--color--primary);
}
.is-style-aster-grille h2,
.is-style-aster-grille h3 {
    padding: 10px;
}
.is-style-aster-grille p {
    margin: 0;
    padding: 0 10px;
}
.is-style-aster-grille p.bsw-event-date {
    font-size: var(--wp--preset--font-size--small);
}
.is-style-aster-grille li a::before {
    display: none;
}

/* *****************************
----------------------------
	= PATERNS - TEMPLATES PART
----------------------------
***************************** */

/* ----------------------------
	== WITH SIDEBAR
---------------------------- */
@media only screen and (min-width: 900px) {
    .wp-block-columns.with-sidebar {
        justify-content: space-between;
    }
    .wp-block-columns.with-sidebar::before {
        display: none;
    }
    .wp-block-columns.with-sidebar > .wp-block-column:first-child {
        flex: 1;
    }
    .wp-block-columns.with-sidebar > .wp-block-column:last-child > div {
        top: 255px;
    }
}

/*
    SIBILING POST
*/
.with-sidebar .wp-block-bsw-siblings-posts {
    padding: var(--wp--preset--spacing--text);
    background: var(--wp--preset--color--white);
}
.with-sidebar .wp-block-bsw-siblings-posts ul {
    margin: 0 !important;
    padding: 0;
    list-style: none;
}

/*
    CHILD POST
*/
.wp-block-bsw-child-post.is-style-default ul {
    list-style: none;
}
.wp-block-bsw-child-post.is-style-default li {
    clear: right;
    min-height: calc(100px + var(--wp--preset--spacing--text));
    padding-bottom: var(--wp--preset--spacing--text);
    border-bottom: 1px solid var(--wp--preset--color--current);
}
.wp-block-bsw-child-post.is-style-default li figure {
    float: right;
    max-width: 100px;
    max-height: 100px;
    border-radius: 100px;
    overflow: hidden;
}

/* ----------------------------
	== NEXT PREV
---------------------------- */
.next-prev.toosmall {
    padding: 0 var(--wp--preset--spacing--text);
}
.next-prev .post-navigation-link-next a::before {
    content: "\e919";
    font-family: icons;
}
.next-prev .post-navigation-link-previous a::before {
    content: "\e918";
    font-family: icons;
}

@media only screen and (min-width: 800px) {
    .next-prev:not(.toosmall) {
        margin-left: calc((50vw - (var(--wp--style--global--wide-size) / 2)) * -1) !important;
        margin-right: calc((50vw - (var(--wp--style--global--wide-size) / 2)) * -1) !important;
    }
}
@media only screen and (max-width: 800px) {
    .next-prev {
        order: 3;
        padding-bottom: var(--wp--preset--spacing--text) !important;
        width: 100%;
    }
    .next-prev > div {
        width: 50%;
    }
}

/* *****************************
----------------------------
	= HOME PAGE
----------------------------
***************************** */
.home h1.wp-block-post-title {
    position: absolute;
    top: -5000px;
}
.home main > .wp-block-group {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--wp--preset--spacing--text);
}
@media only screen and (max-width: 800px) {
    .home main > .wp-block-group {
        grid-template-columns: 1fr;
    }
}

/*
    EDITORIAL
*/
.bs-editorial {
    width: 100%;
}
.bs-editorial:has(> div:empty) {
    display: none;
}
.bs-editorial > div {
    padding: var(--wp--preset--spacing--text);
    height: 100%;
}
.bs-editorial .wp-block-post-excerpt {
    margin: 0 !important;
}
.bs-editorial p {
    margin: 0;
}
.bs-editorial p:first-child::before {
    content: "\e916";
    margin: 0 15px 0 0;
    font-family: icons !important;
    color: var(--wp--preset--color--primary);
    font-size: 2em;
    line-height: 1;
}
.bs-editorial p.wp-block-post-excerpt__more-text {
    margin: 10px 0 0;
    text-align: right;
}
.bs-editorial p.wp-block-post-excerpt__more-text a {
    display: inline-block;
    padding: 0 5px;
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--white);
    font-weight: 700;
    font-size: 0.8em;
    text-transform: uppercase;
}
@media only screen and (min-width: 800px) {
    .bs-editorial {
        grid-column: 2;
    }
}

/*
    DIARY
*/
.bs-diary {
    padding: var(--wp--preset--spacing--text) !important;
    margin: 0 !important;
    width: 100%;
    border-bottom: 5px solid var(--wp--preset--color--primary);
}
.bs-diary h2 {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
}
.bs-diary h2::before {
    font-size: 150%;
    color: var(--wp--preset--color--primary);
}
.bs-diary ul {
    margin: 10px 0 0;
    padding: 0;
    border-top: 1px solid var(--wp--preset--color--current);
    list-style: none;
}
.bs-diary ul li {
    position: relative;
    display: flex;
    flex-direction: row-reverse;
    border-bottom: 1px solid var(--wp--preset--color--current);
}
.bs-diary ul li h3 {
    flex: 1;
    margin: 0;
    font-size: var(--wp--preset--font-size--small) !important;
    text-transform: none;
}
.bs-diary ul li h3 a:hover,
.bs-diary ul li h3 a:focus {
    color: var(--wp--preset--color--primary);
}
.bs-diary ul li h3 a::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
}
.bs-diary ul li p {
    margin: 0;
    font-size: var(--wp--preset--font-size--small) !important;
}
.bs-diary .wp-block-buttons {
    gap: 10px;
}
.bs-diary .wp-block-button a {
    padding: 5px;
    font-size: 0.8em !important;
}

@media only screen and (min-width: 800px) {
    .bs-diary {
        grid-column: 2;
    }
    .bs-editorial:has(> div:empty) + .bs-diary {
        grid-row: 1 / 3;
    }
    .bs-diary ul li p {
        width: 100px;
    }
}
@media only screen and (max-width: 800px) {
    .bs-diary ul li {
        flex-direction: column;
    }
}

/* BACKWARDS COMPATIBILITY */
.bs-diary p {
    margin: 10px 0 0;
}
.bs-diary p a {
    display: inline-block;
    padding: 0 5px;
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--white);
    font-size: 0.8em;
    text-transform: uppercase;
}

/*
    CONTENT
*/
.home .entry-content {
    display: grid;
    grid-column: 1;
    grid-row: 1 / 3;
    margin: 0 !important;
    width: 100%;
}
.home .entry-content .splide__track,
.home .entry-content ul,
.home .entry-content li,
.home .entry-content figure {
    height: 100%;
}
.home .entry-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/*
    QUICK ACCES
*/
.bs-quick-access {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: var(--wp--preset--spacing--current) auto !important;
    padding: var(--wp--preset--spacing--text) 0;
    border-top: 1px solid var(--wp--preset--color--current);
    border-bottom: 1px solid var(--wp--preset--color--current);
    list-style: none;
    gap: var(--wp--preset--spacing--small);
}
.bs-quick-access li {
    position: relative;
    flex: 1;
    text-align: center;
    line-height: 1;
}
.bs-quick-access li::before {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 10px;
    width: 80px;
    height: 80px;
    background: var(--wp--preset--color--primary);
    border-radius: 100px;
    color: var(--wp--preset--color--white);
    font-size: 50px;
}
.bs-quick-access li a {
    line-height: 1;
}
.bs-quick-access li a::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
}
@media only screen and (max-width: 800px) {
    .bs-quick-access li {
        flex: none;
        width: calc(50% - (var(--wp--preset--spacing--current) / 2));
    }
}

/*
    NEWS
*/
.bs-news .wp-block-buttons {
    margin-block-start: 0;
}
