/**
 * Theme Name: WP DSFR LP
 * Theme URI: https://github.com/BeAPI/wp-dsfr-lp
 * Author: BeAPI
 * Description: WP DSFR Landing page
 * Requires at least: 6.4
 * Tested up to: 6.4
 * Requires PHP: 7.0
 * Version: 1.0
 * Text Domain: wp-dsfr-lp
 */

/* =============================
 * Blocks
 * ========================== */
/* -----------------------------
 * Button
 * -------------------------- */
.wp-block-buttons {
    row-gap: var(--wp--preset--spacing--20);
}

.wp-block-button__link {
    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: color .5s;
}

body:not(.editor-styles-wrapper, .wp-admin) .wp-block-button__link::before {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: 200%;
    content: "";
    mask: url('data:image/svg+xml;charset=utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 200" preserveAspectRatio="none"><path d="M300,199.8v-99.8S249.5-.3,149.5-.3,0,100,0,100v99.8h300Z"/></svg>') center center/100% 100% no-repeat;
    background: var(--wp--preset--color--light);
    transform: translateY(0%) scaleY(0);
    transition: color .5s, transform .5s cubic-bezier(.19, 1, .22, 1);
}

body:not(.editor-styles-wrapper, .wp-admin) .wp-block-button__link:hover {
    color: var(--wp--preset--color--dark);
}

body:not(.editor-styles-wrapper, .wp-admin) .wp-block-button__link:hover::before {
    transform: translateY(-50%) scaleY(1);
}

.wp-block-button.is-style-reverse > .wp-block-button__link {
    color: var(--wp--preset--color--dark);
    background-color: var(--wp--preset--color--light);
}

body:not(.editor-styles-wrapper, .wp-admin) .is-style-reverse > .wp-block-button__link::before {
    background-color: var(--wp--preset--color--blue-france-light);
}

@media screen and (max-width: 479px) {
    .wp-block-button,
    .wp-block-button__link {
        width: 100%;
    }
}

/* -----------------------------
 * Columns
 * -------------------------- */
.wp-block-column.is-style-rounded {
    background-color: var(--wp--preset--color--blue-france-extra-light);
    border-radius: 20px;
}

/* -----------------------------
 * List
 * -------------------------- */
.wp-block-list.is-style-checkmark-list li {
    list-style-type: none;
    list-style-image: url('data:image/svg+xml;charset=utf8, <svg width="30" height="30" fill="%23000091" xmlns="http://www.w3.org/2000/svg"><path d="M26.9,14.6l-15,15c-0.4,0.4-1,0.4-1.3,0c0,0,0,0,0,0L4,23c-0.4-0.4-0.4-1,0-1.3c0.4-0.4,1-0.4,1.3,0l5.9,5.9l14.3-14.3c0.4-0.4,1-0.3,1.3,0.1C27.2,13.6,27.2,14.2,26.9,14.6L26.9,14.6z"/></svg>');
}

.wp-block-list.is-style-checkmark-list li:not(:last-child) {
    margin-bottom: 20px;
}

/* -----------------------------
 * Media & text
 * -------------------------- */
.wp-block-media-text__content {
    padding: 0 0 0 var(--wp--preset--spacing--40);
}

.has-media-on-the-right > .wp-block-media-text__content {
    padding: 0 var(--wp--preset--spacing--40) 0 0;
}

@media screen and (max-width: 600px) {
    .wp-block-media-text__content {
        padding: 0 !important;
    }
}

/* =============================
 * Global
 * ========================== */
/* -----------------------------
 * link
 * -------------------------- */
body:not(.editor-styles-wrapper, .wp-admin) :is(h1, h2) {
    visibility: hidden;
}

body:not(.editor-styles-wrapper, .wp-admin) :is(h1, h2) ~ * {
    opacity: 0;
    transition: opacity 1s .5s;
}

body:not(.editor-styles-wrapper, .wp-admin) :is(h1, h2) .st-word {
    display: inline-block;
    overflow: hidden;
}

body:not(.editor-styles-wrapper, .wp-admin) :is(h1, h2) .st-word span {
    display: block;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0s, transform 0s cubic-bezier(.19, 1, .22, 1);
}

body:not(.editor-styles-wrapper, .wp-admin) :is(h1, h2).is-visible {
    visibility: visible;
}

body:not(.editor-styles-wrapper, .wp-admin) :is(h1, h2).is-visible .st-word span {
    opacity: 1;
    transform: translateY(0%);
    transition-duration: .1s, .5s;
}

body:not(.editor-styles-wrapper, .wp-admin) :is(h1, h2).is-visible ~ * {
    opacity: 1;
}
/* -----------------------------
 * link
 * -------------------------- */ 
body:not(.editor-styles-wrapper, .wp-admin) p a {
    text-decoration: none;
    background: linear-gradient(to bottom, transparent calc(100% - 1px), currentColor calc(100% - 1px), currentColor 100%) right top/0% 100% no-repeat;
    transition: background-size .5s cubic-bezier(.19, 1, .22, 1);
}

body:not(.editor-styles-wrapper, .wp-admin) p a:hover {
    background-position: left top;
    background-size: 100% 100%;
}

/* Links in content should be underlined */
body:not(.editor-styles-wrapper, .wp-admin) main p a {
    background: linear-gradient(to bottom, transparent calc(100% - 1px), currentColor calc(100% - 1px), currentColor 100%) left top/100% 100% no-repeat;
}

body:not(.editor-styles-wrapper, .wp-admin) main p a:hover {
    background: linear-gradient(to bottom, transparent calc(100% - 2px), currentColor calc(100% - 2px), currentColor 100%) left top/100% 100% no-repeat;
}

/* =============================
 * Patterns
 * ========================== */
/* -----------------------------
 * Hero images
 * -------------------------- */
.hero-images {
    position: relative;
    overflow: hidden;
}

.hero-images figure:nth-child(2) {
    position: absolute;
    top: 24.8%;
    right: 3.76%;
    width: 28.97%;
}

.hero-images figure:nth-child(3) {
    position: absolute;
    top: 49.6%;
    left: 2.94%;
    width: 45.22%;
}
/* -----------------------------
 * Landing section
 * -------------------------- */
 @media screen and (max-width: 1023px) {
    .landing-section:not(.has-background) {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .landing-section.has-background {
        padding-right: 20px !important;
        padding-left: 20px !important;
    }

    .landing-section > .alignfull {
        margin-right: -20px !important;
        margin-left: -20px !important;
    }
}
/* =============================
 * Site part
 * ========================== */
/* -----------------------------
 * Footer
 * -------------------------- */
footer.wp-block-template-part {
    margin-block-start: var(--wp--preset--spacing--20);
}

footer.wp-block-template-part .wp-block-columns {
    border-top: 1px solid var(--wp--preset--color--dark);
}

/* =============================
 * Pages
 * ========================== */
/* -----------------------------
 * Home
 * -------------------------- */
@media screen and (min-width: 1024px) {
    .entry-content > .wp-block-media-text.has-media-on-the-right > .wp-block-media-text__content {
        padding-left: var(--wp--preset--spacing--120);
    }
}