/* CODE SEBASTIEN MICOL CFC TPI 2025 */

/* Fonts
--------------------------------------------- */

@font-face {
    font-family: 'ESRebondGrotesque-Bold';
    src: url('fonts/ESRebondGrotesque-Bold.woff2') format('woff2'),
        url('fonts/ESRebondGrotesque-Bold.woff') format('woff');
    font-weight: 700;
    font-display: swap;
    font-style: normal;
    font-variation-settings: normal;
}

@font-face {
    font-family: 'ESRebondGrotesque-Semibold';
    src: url('fonts/ESRebondGrotesque-Semibold.woff2') format('woff2'),
        url('fonts/ESRebondGrotesque-Semibold.woff') format('woff');
    font-weight: 600;
    font-display: swap;
    font-style: normal;
    font-variation-settings: normal;
}

@font-face {
    font-family: 'ESRebondGrotesque-Medium';
    src: url('fonts/ESRebondGrotesque-Medium.woff2') format('woff2'),
        url('fonts/ESRebondGrotesque-Medium.woff') format('woff');
    font-weight: 500;
    font-display: swap;
    font-style: normal;
    font-variation-settings: normal;
}

@font-face {
    font-family: 'ESRebondGrotesque-Regular';
    src: url('fonts/ESRebondGrotesque-Regular.woff2') format('woff2'),
        url('fonts/ESRebondGrotesque-Regular.woff') format('woff');
    font-weight: 400;
    font-display: swap;
    font-style: normal;
    font-variation-settings: normal;
}


@font-face {
    font-family: 'ESRebondGrotesque-Light';
    src: url('fonts/ESRebondGrotesque-Light.woff2') format('woff2'),
        url('fonts/ESRebondGrotesque-Light.woff') format('woff');
    font-display: swap;
    font-style: normal;
    font-variation-settings: normal;
}


/* Structure
--------------------------------------------- */

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'ESRebondGrotesque';
    color: #001021;
    background-color: #FEFBF6;
    font-style: normal;
    font-variation-settings: normal;
}

.inner {
    max-width: 1512px;
    padding: 0 3rem;
    margin: 0 auto;
}


/* Typo
--------------------------------------------- */

h1 {
    font-family: 'ESRebondGrotesque-Bold';
    font-size: 4rem;
    font-style: normal;
    line-height: 5rem;
}

h1.intro {
    margin-top: 5rem;
    margin-bottom: 0;
}

h2 {
    font-family: 'ESRebondGrotesque-Semibold';
    font-size: 3rem;
    font-style: normal;
    line-height: 3rem;
}

h2.intro {
    font-size: 2rem;
    font-family: 'ESRebondGrotesque-Semibold';
    margin-top: 0;
    margin-bottom: 3rem !important;
}

p.intro-cta {
    font-size: 1.8rem;
}

p.intro-cta a {
    position: relative;
    font-family: 'ESRebondGrotesque-Semibold';
    color: #001021;
    text-decoration: none;
    transition: color 200ms ease-in-out;
}

/* ligne visible de base */
p.intro-cta a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1.5px;
    background-color: #001021;
    transform: scaleX(1);
    /* visible de base */
    transform-origin: left;
}

/* animation au hover */
p.intro-cta a:hover::after {
    animation: underline-redraw 300ms ease-in-out forwards;
    background-color: #FF2328;
}

p.intro-cta a:hover {
    color: #FF2328;
}

p.intro-cta-2 a {
    position: relative;
    font-family: 'ESRebondGrotesque-Semibold';
    color: #001021;
    text-decoration: none;
    transition: color 200ms ease-in-out;
}

/* ligne visible de base */
p.intro-cta-2 a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1.5px;
    background-color: #001021;
    transform: scaleX(1);
    /* visible de base */
    transform-origin: left;
}

p.intro-cta-2 a:hover::after {
    animation: underline-redraw 300ms ease-in-out forwards;
    background-color: #FF2328;
}

p.intro-cta-2 a:hover {
    color: #FF2328;
}



/* keyframes pour simuler "disparition rapide + redraw" */
@keyframes underline-redraw {
    0% {
        transform: scaleX(1);
    }

    1% {
        transform: scaleX(0);
        /* disparition instantanée */
    }

    100% {
        transform: scaleX(1);
        /* redraw animé */
    }
}


h3 {
    font-family: 'ESRebondGrotesque-Medium';
    font-weight: 500;
    font-style: normal;
    font-size: 1.8rem;
    line-height: 1.8rem;
}

h4 {
    font-family: 'ESRebondGrotesque-Medium';
    font-weight: 500;
    font-style: normal;
    font-size: 1.25rem;
    line-height: 1.2rem;
}

p {
    font-size: 1.2rem;
    font-style: normal;
    font-family: 'ESRebondGrotesque-Regular';
    line-height: 1.5rem;
}

p.p-cta {
    font-family: 'ESRebondGrotesque-Semibold';
}


.entry-title {
    display: none;
}


/* Surlignage du texte pour tous les navigateurs */
::selection {
    background-color: #001021;
    color: #FEFBF6;
}

/* Pour Firefox */
::-moz-selection {
    background-color: #001021;
    color: #FEFBF6;
}



/* Header
--------------------------------------------- */

.site-header {
    margin: 0 auto;
    width: 100%;
    max-width: 1512px;
    padding: 1rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 1em;
    z-index: 99;
}

.custom-logo {
    width: 48%;
}

.wpadminbar {
    display: none;
}

.main-navigation {
    width: auto;
}

.site-description {
    display: none;
}

a {
    color: inherit;
    text-decoration: none;
}

a:visited {
    color: transparent;
}

a:focus {
    outline: none;
}

a:hover {
    color: inherit;
    outline: none;
}

.site-header .nav-menu li a {
    border-bottom: 2.5px solid transparent;
    padding-bottom: 5px;
    transition: border-color 0.2s ease;
}

.site-header .nav-menu li.current_page_item a,
.site-header .nav-menu li a:hover {
    border-bottom-color: #001021;
}


.main-navigation li a.active {
    border-bottom-color: #001021;
}


.site-title {
    margin: 0;
    font-size: 1.2rem;
    font-family: 'ESRebondGrotesque-Regular';
}

.site-branding {
    width: 6rem;
}

/* hover safari et firefox */

.site-header .nav-menu li a {
    color: #001021;
    text-decoration: none;
}

.site-header .nav-menu li a:hover,
.site-header .nav-menu li a:focus {
    color: #001021;
    outline: none;
}

/* Enlève la mise en surbrillance bleue sur Firefox */
.site-header .nav-menu li a:focus-visible {
    outline: none;
}

/* Nav
--------------------------------------------- */

.nav-menu {
    font-size: 1.2rem;
    font-style: normal;
    font-family: 'ESRebondGrotesque-Bold';
    line-height: normal;
}

.site-header .nav-menu li a {
    display: inline-block;
    margin-left: 4rem;
}

#primary-menu ul li a {
    display: inline-block;
}

/* Contenu page
--------------------------------------------- */

.intro-gap {
    gap: 2.8rem;
    margin-bottom: 5rem;
}

.wp-block-cover__inner-container {
    padding: 4rem 0;
}

.top-pad {
    padding-top: 3rem;
}

.no-gap {
    gap: 0;
}

.wp-block-cover__inner-container h1 {
    margin-top: 0;
}

.p-info {
    max-width: 530px;
}

.wp-block-navigation .wp-block-navigation-item {
    font-size: 1.5rem;
    font-style: normal;
    font-family: 'ESRebondGrotesque-Bold';
    line-height: normal;
}

.wp-block-navigation .wp-block-navigation-item a:hover {
    color: #FF2328;

}

.cat {
    margin-bottom: 1rem;
}

.m-livre {
    margin-top: 6rem;
    margin-bottom: 2rem;
}

h2.wp-block-heading {
    margin-bottom: .5rem;
}

h3.wp-block-heading {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

h4.wp-block-heading {
    margin-top: 0;
    margin-bottom: 2rem;
}

.p-mx {
    max-width: 535px;
}

.gap-teaser {
    gap: 5rem;
    padding: 2.2rem 0;
}

.gap-teaser.first {
    padding-top: 0;
}

.gap-teaser.last {
    padding-bottom: 6.8rem;
}


/* lien sur cover livre+caption
--------------------------------------------- */

.wp-block-image {
    position: relative;
    margin-bottom: 0;
}

.wp-element-caption {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    margin: 0;
}

.wp-element-caption a {
    display: block;
    font-size: 0;
    width: 100%;
    height: 100%;
}

/* texte */
.wp-block-image+p {
    padding-top: 0.8rem;
    margin-top: 0;
}

.wp-block-image+p>a {
    margin-top: 0;
    position: relative;
    font-family: 'ESRebondGrotesque-Regular';
    color: #001021;
    text-decoration: none;
    transition: color 200ms ease-in-out;
}

/* effet de soulignement animé (entrée/sortie) */
.wp-block-image+p>a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 1.5px;
    width: 100%;
    background-color: #001021;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 250ms ease-in-out;
}


.wp-block-image:hover+p>a::after,
.wp-block-image+p:hover>a::after {
    transform: scaleX(1);
}


/*bouton intro */
.wp-block-button__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;

    font-family: 'ESRebondGrotesque-Bold';
    text-transform: uppercase;
    font-size: 1.25rem;

    color: #FEFBF6;
    background-color: transparent;
    border: 2.5px solid #FEFBF6;
    border-radius: 8px;

    padding: 1rem 2rem;
    text-decoration: none;

    transition: all 0.2s ease-in-out;
}

.wp-block-button__link::before {
    font-size: 1.2rem;
    display: inline-block;
    transform: translateY(1px);
}

.wp-block-button__link:hover {
    background-color: #FEFBF6;
    color: #001021 !important;
}

.wp-block-button__link a:visited {
    color: #FEFBF6;
}

/* Pour que le Footer reste en bas de la page
--------------------------------------------- */

html,
body {
    width: 100%;
    height: 100%;
}

.site {
    min-height: 100%;
    display: grid;
    grid-template-rows: auto 1fr auto;
    grid-template-columns: 100%;
}


/* Footer
--------------------------------------------- */

#secondary {
    /* full width */
    content: "";
    display: block;
    height: 400px;
    background-color: #001021;
    width: 100%;
}


.widget {
    margin-bottom: 0;
}

.widget .wp-block-column {
    align-items: center;
    justify-content: space-between;
}

.widget-area {
    margin: 0 auto;
    padding: 4rem 12rem;
    width: 100%;
}

.center-widget {
    width: 50%;
    margin: auto;
}


.widget-area p {
    font-size: 1.05rem;
    line-height: 1.2rem;
    color: #FEFBF6;
}

.wp-block-social-links.has-large-icon-size {
    font-size: 32px;
}

p.bold {
    font-family: 'ESRebondGrotesque-Bold';
}

.entry-footer {
    display: none;
}

.site-footer {
    display: none;
}

.comments-area {
    display: none;
}


/* Responsive
--------------------------------------------- */

@media (max-width: 768px) {

    /* Structure
--------------------------------------------- */
    .inner {
        padding: 0 1.5rem;
    }

    .intro-gap {
        gap: 0;
    }

    /* Typo
--------------------------------------------- */

    h1 {
        font-size: 2.5rem;
        line-height: 2.6rem;
    }

    h1.intro {
        margin-top: 0;
    }

    h2 {
        font-size: 2.5rem;
        line-height: 2.7rem;
    }

    h2.intro {
        font-size: 1.5rem;
        line-height: 2rem;
        margin-bottom: 2rem !important;
    }

    h2.wp-block-heading.intro {
        margin-top: 1rem;

    }

    h3 {
        font-size: 1.3rem;

    }

    h3.wp-block-heading {
        margin-bottom: .5rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    p {
        font-size: 1.1rem;
    }

    p.intro-cta {
        font-size: 1.4rem;
    }

    h1.ban-mob {
        font-size: 2.5rem !important;
        line-height: 2.6rem;
    }

    /* Header
--------------------------------------------- */
    .site-header {
        padding: 1.5rem;
        padding-bottom: .8rem;
    }


    /* Contenu page
--------------------------------------------- */


    .intro-gap {
        gap: .4rem;
        margin-bottom: 3rem;
    }

    .intro-gap p {
        margin-bottom: .8rem;
    }


    .intro-gap .wp-block-image {
        width: 70%;
    }

    h1.ban-mob {
        margin-bottom: 1.5rem;
    }

    .wp-block-cover__inner-container {
        padding: 2rem 0;
    }

    .logo-ban {
        padding-top: 2rem;
    }

    .wp-image-136 {
        width: 20% !important;

    }


    .wp-block-navigation {
        padding-top: .5rem;
        --navigation-layout-direction: column !important;
        --navigation-layout-align: left;
    }

    h1.cat {
        margin-top: 4rem;
    }

    .m-livre {
        margin-top: 3.5rem;
        margin-bottom: .5rem;
    }

    .wp-block-columns.reverse {
        flex-direction: column-reverse;
    }

    .gap-teaser {
        gap: 0;
        padding: 0;
    }

    .gap-teaser.last {
        padding-bottom: 4rem;
    }

    /* Footer
--------------------------------------------- */

    #secondary {
        height: auto;
    }

    .widget-area {
        padding: 2rem 0;
    }

    .widget .wp-block-columns {
        gap: .5rem;
    }

    .widget p {
        margin-bottom: 1rem;
    }

    .wp-block-social-links {
        margin-bottom: 2rem;
    }

    /* Burger Menu
--------------------------------------------- */

    /* Quand le menu est ouvert, désactive le scroll vertical */
    body.toggled {
        overflow: hidden;
        /* Désactive le scroll vertical */
        position: fixed;
        /* Pour éviter le scroll sur iOS */
        width: 100%;
        /* S'assure que la page occupe toute la largeur */
        height: 100%;
        /* S'assure que la page occupe toute la hauteur */
    }


    .menu-toggle {
        display: block;
        width: 40px;
        height: 40px;
        background: url('images/burger-off.svg') no-repeat center center;
        background-size: contain;
        border: 0;
        text-indent: -50000px;
        position: fixed;
        top: 25px;
        right: 30px;
        z-index: 20;

    }

    .toggled .menu-toggle {
        background-image: url('images/cross.svg');
    }


    body .main-navigation.toggled ul {
        display: flex;
        padding-bottom: 26rem;
    }

    .toggled .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        bottom: 0;
        z-index: 15;
        flex-direction: column;
        justify-content: center;
        background-color: transparent;
    }

    .toggled li {
        font-size: 3.5rem;
        padding: 1rem;
        background-color: #001021;
    }

    .toggled .nav-menu li a {
        padding: 0;
        margin-left: 1rem;
        color: #FEFBF6;

        display: block;
        width: 100%;
        height: 100%;
    }

    .site-header .nav-menu li a:hover,
    .site-header .nav-menu li a:focus {
        /* changer a:hover pour mobile */
        color: #FEFBF6;
        outline: none;
    }

    .site-header .nav-menu li a {
        border-bottom: 2.5px solid transparent;
    }

    .site-branding {
        z-index: 99;
        width: 5rem;
    }

    .custom-logo {
        position: relative;
        bottom: 15px;
    }
}