/*
Theme Name: Aster
Author: Bayard-Service
Author URI: https://www.bayard-service.com
Theme URI: https://gitlab.bayard-service.com/wordpress/themes/aster
Tags: full-site-editing, editor-style, block-styles, block-patterns
Text Domain: aster
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.4
Version: 4.9.0

License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

All files, unless otherwise stated, are released under the GNU General Public
License version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html)

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned
with others.
*/

/* Styles intended only for the front.*/
html {
    scroll-behavior: smooth;
}

@media screen and (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
* {
    box-sizing: border-box;
}
body {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}
a {
    transition: all .5s;
}
.has-background:not(a) {
    padding: 0;
}
p.has-background {
    padding: var(--wp--preset--spacing--text);
}
.noscroll {
    overflow: hidden;
}
@media only screen and (max-width: 800px) {
    .desktop {
        display: none !important;
    }
}
@media only screen and (min-width: 800px) {
    .mobile {
        display: none !important;
    }
}


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

/* ----------------------------
	== HEADER
---------------------------- */
.site-header > div {
    padding: var(--wp--preset--spacing--text) var(--wp--preset--spacing--window);
}
@media screen and (min-width: 782px) {
    .is-style-aster-sticky {
        position: sticky;
        top: 0;
        z-index: 999;
    }

    /* Move the sticky position down to adjust for the WordPress admin bar */
    .admin-bar .is-style-aster-sticky {
        top: 32px;
    }
}

/*
	MAIN NAVIGATION
*/
.main-nav .wp-block-navigation__responsive-close {
    max-width: none;
}
.main-nav .current-menu-item > a,
.main-nav .current-menu-ancestor > a {
    color: var(--wp--preset--color--primary);
}
@media only screen and (max-width: 800px) {
    .main-nav .wp-block-page-list {
        justify-content: center;
    }
}

/*
	BUTTONS POPINS
*/
.bt-popin a {
    border: none !important;
}

/*
	POPINS
*/
.block-popins {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-block-start: 0 !important;
    opacity: 0;
    visibility: hidden;
    transition: all .5s;
}
.block-popins.actif {
    opacity: 1;
    visibility: visible;
}
.block-popins::before {
    content: "x";
    position: absolute;
    top: var(--wp--preset--spacing--window);
    right: var(--wp--preset--spacing--window);
}
.block-popins > * {
    display: none;
    padding: 0 var(--wp--preset--spacing--window);
    width: 100%;
    max-width: var(--wp--style--global--content-size);
    max-height: 80vh;
    overflow-y: auto;
}
.block-popins > *.actif {
    display: block;
}

/* ----------------------------
	== FOOTER
---------------------------- */
.site-footer > div {
    padding: var(--wp--preset--spacing--text) var(--wp--preset--spacing--window);
}

/* ----------------------------
	== MAIN
---------------------------- */
main {
    padding: 0 var(--wp--preset--spacing--window) !important;
}
.entry-content > * {
    margin-block-start: var(--wp--preset--spacing--text);
    margin-block-end: 0;
}

/*
	TITLES
*/
.entry-content > h2 {
    margin-block-start: var(--wp--preset--spacing--current);
}
.entry-content > h3 {
    margin-block-start: calc(var(--wp--preset--spacing--text) * 2);
}

/*
	LINK
*/
.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--current);
}
.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--current);
}
.entry-content p:not(.has-link-color) > a:hover,
.entry-content p:not(.has-link-color) > a:focus,
.entry-content li:not(.has-link-color) > a:hover,
.entry-content li:not(.has-link-color) > a:focus,
.entry-content cite:not(.has-link-color) > a:hover,
.entry-content cite:not(.has-link-color) > a:focus,
.entry-content td:not(.has-link-color) > a:hover,
.entry-content td:not(.has-link-color) > a:focus {
    color: var(--wp--preset--color--white) !important;
}

/*
    BLOCK WITH BACKGROUND COLOR
*/
.entry-content .has-background:not(.wp-block-button__link):not(.wp-block-separator) {
    padding: var(--wp--preset--spacing--small);
}

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

/* ----------------------------
	== BREADCRUMBS
---------------------------- */

/* SEOPRESS */
.wp-block-wpseopress-breadcrumbs {
    text-align: center;
}
.wp-block-wpseopress-breadcrumbs a,
.wp-block-wpseopress-breadcrumbs li::after,
.wp-block-wpseopress-breadcrumbs li > span {
    opacity: .5;
}
.wp-block-wpseopress-breadcrumbs a:hover,
.wp-block-wpseopress-breadcrumbs a:focus {
    opacity: 1;
}
@media screen and (max-width: 800px) {
    .wp-block-wpseopress-breadcrumbs li.breadcrumb-item {
        display: none;
    }
    .wp-block-wpseopress-breadcrumbs li.breadcrumb-item:nth-last-child(2) {
        display: block;
    }
    .wp-block-wpseopress-breadcrumbs li.breadcrumb-item:nth-last-child(2)::after {
        display: none;
    }
    .wp-block-wpseopress-breadcrumbs li.breadcrumb-item:nth-last-child(2) a {
        display: flex;
        align-items: baseline;
    }
    .wp-block-wpseopress-breadcrumbs li.breadcrumb-item:nth-last-child(2) a::before {
        content: "<";
        margin: 0 15px 0 0;
    }
}

/* YOAST */
.yoast-breadcrumbs {
    text-align: center;
    font-size: var(--wp--preset--font-size--small);
}
.yoast-breadcrumbs a,
.yoast-breadcrumbs .breadcrumb_last {
    opacity: .5;
}
.yoast-breadcrumbs a:hover,
.yoast-breadcrumbs a:focus {
    opacity: 1;
}
@media screen and (max-width: 800px) {
    .yoast-breadcrumbs span {
        display: none;
    }
    .yoast-breadcrumbs > a {
        display: none;
    }
    .yoast-breadcrumbs > a:last-child {
        display: flex;
        align-items: baseline;
    }
    .yoast-breadcrumbs > a::before {
        content: "<";
        margin: 0 15px 0 0;
    }
}

/* ----------------------------
	== DETAIL
---------------------------- */
.wp-block-details summary {
    font-weight: 700;
}

/* ----------------------------
	== SOCIAL LINK
---------------------------- */
.wp-block-social-links a {
    position: relative;
    line-height: 1;
}
.wp-block-social-links a span {
    top: 110%;
    left: 50%;
    transform: translate(-50%, 0);
    padding: 5px 5px;
    background: var(--wp--preset--color--current);
    border-radius: 5px;
    width: auto;
    height: auto;
    clip-path: none;
    clip: unset;
    overflow: unset;
    color: var(--wp--preset--color--white);
    font-size: .7rem !important;
    opacity: 0;
    visibility: hidden;
    transition: all .5s;
}
.wp-block-social-links a:hover span,
.wp-block-social-links a:focus span {
    opacity: 1;
    visibility: visible;
}

/* ----------------------------
	== IMAGE
---------------------------- */
.wp-block-image.is-style-rounded {
    position: relative;
}
.wp-block-image.is-style-rounded.size-thumbnail {
    width: 150px;
}
.wp-block-image.is-style-rounded.size-medium {
    width: 300px;
}
.wp-block-image.is-style-rounded::before {
    content: "";
    display: block;
    padding-top: 100%;
}
.wp-block-image.is-style-rounded img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wp-block-image.is-style-rounded figcaption {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 100%;
    color: var(--wp--preset--color--white);
    opacity: 0;
    transition: all .5s;
}
.wp-block-image.is-style-rounded:hover figcaption {
    opacity: 1;
}

/* ----------------------------
	== TABLE
---------------------------- */

/*
	STRIPES
*/
.wp-block-table.is-style-stripes tbody tr:nth-child(2n+1) {
    background: var(--wp--preset--color--neutral);
}

/* ----------------------------
	== QUERYLOOP
---------------------------- */
.wp-block-query li {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.wp-block-query li a::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 2;
}
.wp-block-query h2,
.wp-block-query h3 {
    margin: 0;
}
.wp-block-query figure {
    margin: 0;
    overflow: hidden;
}
.wp-block-query li figure img {
    transition: all .5s
}
.wp-block-query li:hover figure img {
    transform: scale(1.05);
}

/* ----------------------------
	== BUTTONS
---------------------------- */

/*
	OUTLINES
*/
.wp-block-button.is-style-outline a:hover,
.wp-block-button.is-style-outline a:focus {
    color: var(--wp--preset--color--primary) !important;
}

/* ----------------------------
	== SEARCH
---------------------------- */
main .wp-block-search {
    margin-block-end: var(--wp--preset--spacing--current);
}

/* ----------------------------
	== SIBLING POST
---------------------------- */
.wp-block-bsw-siblings-posts li.current,
.wp-block-bsw-siblings-posts li.current a {
    color: var(--wp--preset--color--primary);
}

/* ----------------------------
	== RELATED POST TEMPLATE
---------------------------- */
.wp-block-bsw-related-posts-template p {
    text-align: center;
    font-size: var(--wp--preset--font-size--large);
}

/* ----------------------------
	== GRAVITY FORMS
---------------------------- */
.gform_wrapper .gfield,
.gform_wrapper .gform_footer {
    margin: var(--wp--preset--spacing--text) 0 0;
    padding: 0;
    border: none;
}
.gform_wrapper fieldset legend,
.gform_wrapper label {
    font-weight: 700;
}

/*
	COMPLEX
*/
.ginput_container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wp--preset--spacing--text);
}
.ginput_container label {
    font-weight: 400;
}
.ginput_container.gf_name_has_2 > span {
    flex: 1;
}
@media only screen and (max-width: 800px) {
    .ginput_container.gf_name_has_2 > span {
        flex: none;
        width: 100%;
    }
}

/*
	VALIDATION
*/
.gfield_required,
.gfield_validation_message {
    color: var(--wp--preset--color--primary);
}
.gform_validation_errors h2 {
    color: var(--wp--preset--color--primary);
    font-size: inherit;
    line-height: 1.2;
}

/*
	HONEYPOT
*/
.gform_validation_container,
.gform_wrapper.gravity-theme .gform_validation_container,
body .gform_wrapper.gravity-theme .gform_body .gform_fields .gfield.gform_validation_container,
body .gform_wrapper.gravity-theme .gform_fields .gfield.gform_validation_container,
body .gform_wrapper.gravity-theme .gform_validation_container {
    display: none !important;
    left: -9000px;
    position: absolute !important;
}

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

/* ----------------------------
	== TESTIMONIAL
---------------------------- */
.bs-testimonial {
    position: relative;
    padding: 0 var(--wp--preset--spacing--current);
}
.bs-testimonial::before {
    content: '"';
    position: absolute;
    top: 0;
    left: var(--wp--preset--spacing--current);
    transform: translate(-50%, 0);
    font-size: 3rem;
    line-height: 1;
}
.bs-testimonial::after {
    content: '"';
    position: absolute;
    top: 0;
    right: var(--wp--preset--spacing--current);
    transform: translate(50%, 0);
    font-size: 3rem;
    line-height: 1;
}
.bs-testimonial p + p {
    margin-block-start: 5px !important;
}

/* ----------------------------
	== WITH SIDEBAR
---------------------------- */
@media only screen and (min-width: 900px) {
    .wp-block-columns.with-sidebar {
        justify-content: center;
    }
    .wp-block-columns.with-sidebar::before {
        content: "";
        width: 300px;
    }
    .wp-block-columns.with-sidebar > .wp-block-column:last-child > div {
        position: sticky;
        top: 300px;
    }
}

/* ----------------------------
	== NEXT PREV
---------------------------- */
.next-prev.toosmall {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    margin: var(--wp--preset--spacing--text) auto 0;
    max-width: var(--wp--style--global--content-size);
}
.next-prev.toosmall a {
    display: flex;
    align-items: center;
    gap: 5px;
}
.next-prev .post-navigation-link-next a {
    flex-direction: row-reverse;
}
.next-prev .post-navigation-link-previous a::before {
    content: "<";
    transition: all .5s;
}
.next-prev .post-navigation-link-next a::before {
    content: ">";
    transition: all .5s;
}
.next-prev .post-navigation-link__label {
    display: none;
}
.next-prev .post-navigation-link__title {
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--primary);
    transition: all .5s;
}
.next-prev a:hover .post-navigation-link__title,
.next-prev a:focus .post-navigation-link__title {
    color: var(--wp--preset--color--current);
}

@media only screen and (min-width: 800px) {
    .next-prev:not(.toosmall) {
        position: sticky;
        top: 300px;
        padding: 0 var(--wp--preset--spacing--window);
    }
    .next-prev:not(.toosmall) .post-navigation-link-next {
        float: right;
        padding-left: var(--wp--preset--spacing--text);
        width: calc((100% - var(--wp--style--global--content-size)) / 2);
    }
    .next-prev:not(.toosmall) .post-navigation-link-previous {
        float: left;
        padding-right: var(--wp--preset--spacing--text);
        width: calc((100% - var(--wp--style--global--content-size)) / 2);
        text-align: right;
    }
    .next-prev:not(.toosmall) .post-navigation-link-next a:hover::before,
    .next-prev:not(.toosmall) .post-navigation-link-next a:focus::before {
        padding-left: var(--wp--preset--spacing--text);
    }
    .next-prev:not(.toosmall) .post-navigation-link-previous a:hover::before,
    .next-prev:not(.toosmall) .post-navigation-link-previous a:focus::before {
        padding-right: var(--wp--preset--spacing--text);
    }
    .next-prev:not(.toosmall) .post-navigation-link__title {
        display: block;
    }
}
@media only screen and (max-width: 800px) {
    .next-prev {
        display: flex;
        flex-direction: row-reverse;
        justify-content: space-between;
    }
    .next-prev .post-navigation-link__title {
        display: none;
    }
}
