/* Global CSS Variables for all GBG blocks */
:root {
    /* Layout widths */
    --gbg-content-width: 1080px;
    --gbg-wide-width: clamp(960px, 75vw, 1280px);
    --gbg-header-width: calc(100% - 128px); /* According to the actuel theme */
    --gbg-full-width: 100vw;

    /* Spacing scale */
    --gbg-spacing-xs: 8px;
    --gbg-spacing-sm: 16px;
    --gbg-spacing-md: 24px;
    --gbg-spacing-lg: 32px;
    --gbg-spacing-xl: 48px;
    --gbg-spacing-2xl: 64px;

    /* Border radius scale */
    --gbg-border-radius-sm: 4px;
    --gbg-border-radius-md: 8px;
    --gbg-border-radius-lg: 16px;
    --gbg-border-radius-xl: 20px;

    /* Breakpoints */
    --gbg-breakpoint-mobile: 768px;
    --gbg-breakpoint-tablet: 1024px;
    --gbg-breakpoint-desktop: 1280px;

    /* Color palette */
    --gbg-color-primary: #3100BE;
    --gbg-color-secondary: #000155;
    --gbg-color-body: #fbfbfb;
    --gbg-color-grey: #E8E8E8;
    --gbg-color-dark-grey: #C7C7C7;
    --gbg-color-light: #FFFFFF;
    --gbg-color-light-citron: #D6FF00;
    --gbg-color-dark-citron: #A3B902;
    --gbg-color-text: #333;
    --gbg-color-border: #dee2e6;

    /* Typography */
    --gbg-font-family-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --gbg-font-size-sm: 14px;
    --gbg-font-size-base: 16px;
    --gbg-font-size-lg: 18px;
    --gbg-font-size-xl: 20px;

    /* Shadows */
    --gbg-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --gbg-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --gbg-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

:where(.editor-styles-wrapper) .acf-block-component * {
    font-size: 14px !important;
}

:where(.editor-styles-wrapper) .acf-block-component a:hover {
    color: inherit !important;
    border-bottom: 0 !important;
}

:where(.editor-styles-wrapper) [data-type^="acf/"].wp-block {
    max-width: 100%;
}

.parallax-element {
    transition: transform 0.1s ease-out;
}

html :where(.wp-block) {
    margin-top: 0;
    margin-bottom: 0;
}

body.block-editor-page .editor-styles-wrapper {
    background-color: #FBFBFB;
}

body.block-editor-page .editor-styles-wrapper .editor-visual-editor__post-title-wrapper {
    margin-bottom: 4rem;
}

/*
* Alsolike Section Enhancements
*/

.alsoLikeSection {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 30px;
}

@media screen and (min-width: 998px) {
    .alsoLikeSection {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 40px;
    }
}

.alsoLikeSection .card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: var(--gbg-border-radius-lg);
    min-height: 470px;
    overflow: hidden;
}

.push-content-block .alsoLikeSection .card {
    padding: 20px;
}

@media screen and (min-width: 998px) {
    .alsoLikeSection .card {
        min-height: 500px;
    }
}

section.push-content-block:not(.lightMode) .alsoLikeSection .card.card--article.hasFeaturedImage .card-featured-image-wrapper,
section.case-studies-1-block:not(.lightMode) .alsoLikeSection .card.card--article.hasFeaturedImage .card-featured-image-wrapper,
section.push-content-block:not(.lightMode) .alsoLikeSection .card.card--article.hasFeaturedImage .card-featured-image,
section.case-studies-1-block:not(.lightMode) .alsoLikeSection .card.card--article.hasFeaturedImage .card-featured-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay au-dessus de l'image */
section.push-content-block:not(.lightMode) .alsoLikeSection .card.card--article.hasFeaturedImage .card-featured-image-wrapper::after,
section.case-studies-1-block:not(.lightMode) .alsoLikeSection .card.card--article.hasFeaturedImage .card-featured-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            360deg,
            rgba(0, 1, 85, 1) 0%,     /* Overlay coloré */
            rgba(0, 1, 85, 0.2) 100%
    );
    z-index: 1;
    pointer-events: none;
}

section.case-studies-1-block:not(.lightMode) .alsoLikeSection .card.hasFeaturedImage.isEbooks .card-featured-image-wrapper::after {
    background: linear-gradient(180deg, rgba(0, 1, 85, 0) 0%, #EEE 100%)
}

.alsoLikeSection .card .meta {
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1;
}

.alsoLikeSection .card .meta .tag {
    display: block;
    width: fit-content;
    font-size: 14px;
    line-height: 19px;
    color: var(--gbg-color-primary);
    padding: 6px 12px;
    border-radius: 8px;
    background-color: var(--gbg-color-light-citron);
}

.alsoLikeSection .card .meta .reading-time {
    position: relative;
    font-size: 16px;
    line-height: 1;
    color: var(--gbg-color-primary);
    margin-left: 11.2px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.alsoLikeSection .card .meta .reading-time::before {
    content:'';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--gbg-color-primary);
    border-radius: 999px;
}

.alsoLikeSection .card.card--article.isWebinar,
.alsoLikeSection .card.card--case-study {
    background-color: var(--gbg-color-secondary);
}

.alsoLikeSection .card.card--article {
    background-color: var(--gbg-color-grey);
}

.alsoLikeSection .card.card--article.hasFeaturedImage .meta .reading-time::before {
    background-color: var(--gbg-color-light);
}

.alsoLikeSection .card .card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
    margin-top: 32px;
    margin-bottom: 16px;
    z-index: 1;
}

.alsoLikeSection .card .card-content .content-full {
    width: 100%;
}

.push-content-block .alsoLikeSection .card .card-content {
    margin-top: 20px;
}


.alsoLikeSection .card.hasFeaturedImage:not(.isWebinar) .card-content {
    justify-content: flex-end;
}

.alsoLikeSection .card.card--case-study .caseStudyLogo {
    width: auto;
    height: 35px;
    object-fit: contain;
    margin: 0;
}

.alsoLikeSection .card .card-content .card-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;

    font-size: clamp(20px, 4vw, 24px);
    line-height: 1.1;
    color: var(--gbg-color-light);
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 0;
}

.alsoLikeSection .card.card--article.hasFeaturedImage .meta .reading-time,
.alsoLikeSection .card.card--article.hasFeaturedImage .card-content .card-title,
.alsoLikeSection .card.card--article.hasFeaturedImage.isWebinar .card-content .card-title,
.alsoLikeSection .card.card--article.hasFeaturedImage .card-footer .author {
    color: var(--gbg-color-light);
}

.alsoLikeSection:not(.lightMode) .card.card--article .card-content .card-title,
.alsoLikeSection:not(.lightMode) .card.card--article.isEbooks .card-content .card-title {
    color: var(--gbg-color-primary);
}

.alsoLikeSection .card .card-content .webcast-date{
    font-size: 16px;
    line-height: 1;
    font-weight: 500;
    color: var(--gbg-color-light);
    margin-top: 8px;
}

.alsoLikeSection .card .card-content .webcast-date p {
    margin-bottom: 0;
}

.alsoLikeSection .card .card-content .webcast-date p:last-of-type {
    font-weight: 400;
}

.alsoLikeSection .card .card-footer .webcast-participant {
    display: flex;
    align-items: center;
    gap: 8px;
}

.alsoLikeSection .card .card-footer .webcast-participant .entry-speakers-picture {
    display: inline-flex;
}

.alsoLikeSection .card .card-footer .webcast-participant .entry-speakers-picture .entry-speakers-img {
    display: inline-block;
    border-radius: 50%;
    border: 2px solid var(--gbg-color-light-citron);
    -o-object-fit: cover;
    object-fit: cover;
    width: 50px;
    height: 50px;
}
.alsoLikeSection .card .card-footer .webcast-participant .entry-speakers-picture .entry-speakers-img:not:(:last-child) {
    margin-right: 6px;
}

.alsoLikeSection .card .card-footer .webcast-participant .entry-speakers-picture .entry-speakers-img:not(:first-child) {
    margin-left: -20px;
}

.alsoLikeSection .card .card-footer .webcast-participant .entry-speakers-infos {
    display: inline-block;
    position: relative;
    font-size: 16px;
    line-height: 1.1;
    color: var(--gbg-color-light);
}

.alsoLikeSection .card .card-footer .webcast-participant .more-intervenant {
    background-color: var(--gbg-color-light);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 12px;
    font-weight: 500;
}

.alsoLikeSection .card .card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    z-index: 1;
    padding: 0 14px;
}

.alsoLikeSection .card .card-footer .caseStudy {
    color: var(--gbg-color-light-citron);
    font-size: clamp(24px, 4vw, 32px);
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.alsoLikeSection .card .card-footer .caseStudy span:first-of-type {
    flex-shrink: 0;
    line-height: 1;
    font-weight: 500;
}

.alsoLikeSection .card .card-footer .caseStudy span:last-of-type {
    font-size: clamp(14px, 4vw, 16px);
    line-height: 1;
    width: 60%;
    text-wrap: pretty;
}

.alsoLikeSection .card .card-footer .author {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 19.2px;
    font-weight: 500;
    line-height: 1;
    color: var(--gbg-color-primary);
    margin: 0;
}

.alsoLikeSection .card .card-footer .author .author-name {
    margin: 0;
}

.alsoLikeSection .card .card-footer .author .author-date {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    font-weight: 300;
}

.alsoLikeSection .card .card-footer .author .author-avatar img{
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 1px solid var(--gbg-color-light-citron);
    margin: 0;
}

.alsoLikeSection .card .card-footer a {
    margin-left: auto;
}

.alsoLikeSection .card .card-footer a:hover {
    border-bottom: 0;
}

.alsoLikeSection .card .card-footer a::after {
    content: '';
    position: absolute;
    inset: 0;
}

.alsoLikeSection .card .card-footer svg {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

ul.is-style-amphibee-check-list {
    margin: 25px 0 0 25px !important;
    padding: 0 !important;
    list-style-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="17" x="0" y="0" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g><g fill-rule="evenodd" clip-rule="evenodd"><path fill="%23d6ff00" d="M11.943 1.75H15a.75.75 0 0 1 0 1.5h-3c-2.26 0-3.88.002-5.112.167-1.21.163-1.933.472-2.466 1.005-.533.533-.842 1.256-1.005 2.466C3.252 8.12 3.25 9.74 3.25 12c0 2.26.002 3.88.167 5.112.163 1.21.472 1.933 1.005 2.466.533.533 1.256.842 2.466 1.005 1.232.165 2.852.167 5.112.167 2.26 0 3.88-.002 5.112-.167 1.21-.163 1.933-.471 2.466-1.005.533-.533.842-1.256 1.005-2.466.165-1.232.167-2.852.167-5.112v-2a.75.75 0 0 1 1.5 0v2.057c0 2.19 0 3.912-.18 5.255-.186 1.377-.573 2.469-1.43 3.327s-1.951 1.245-3.328 1.43c-1.343.181-3.064.181-5.255.181h-.114c-2.19 0-3.912 0-5.255-.18-1.377-.186-2.469-.573-3.327-1.43s-1.245-1.951-1.43-3.328c-.181-1.343-.181-3.064-.181-5.255v-.114c0-2.19 0-3.912.18-5.255.186-1.377.573-2.469 1.43-3.327.86-.858 1.951-1.245 3.328-1.43 1.343-.181 3.064-.181 5.255-.181z" opacity="1" data-original="%23111111" class=""></path><path fill="%23d6ff00" d="M21.502 2.943a.75.75 0 0 1 .056 1.059l-9 10a.75.75 0 0 1-1.088.028l-3.5-3.5a.75.75 0 1 1 1.06-1.06l2.941 2.94 8.472-9.412a.75.75 0 0 1 1.059-.055z" opacity="1" data-original="%23bbbbbb" class=""></path></g></g></svg>');
}

ul.is-style-amphibee-check-list li {
    list-style: unset !important;
    padding: 0 0 0 2px !important;
}

ul.is-style-amphibee-check-list li::before {
    display: none;
}

/* Global rounded top with ::before pseudo-element for all blocks */
[class*="wp-block-"].has-top-radius {
    position: relative;
}

/* Fix overlaps in editor view */
:where(.editor-styles-wrapper) .acf-block-component:has(+ .wp-block > [class*="wp-block-"].has-top-radius) {
    margin-bottom: 20px;
}

[class*="wp-block-"].has-top-radius::before {
    content: '';
    position: absolute;
    top: -18px;
    left: 0;
    right: 0;
    height: 20px;
    background-color: inherit;
    border-radius: var(--gbg-border-radius-xl) var(--gbg-border-radius-xl) 0 0;
    z-index: 1;
}