/*
Alexandre Morais
Portfolio
20.12.2023
*/

/* ------------------------Font Importaion------------------------ */

@font-face {
    font-family: 'SuisseIntlMono';
    font-weight: normal;
    src: url(typo/SuisseIntl-Regular-WebXL.woff2) format(woff2);

}

@font-face {
    font-family: 'SuisseIntlMono';
    font-weight: Bold;
    src: url(typo/SuisseIntl-Bold-WebXL.woff2) format(woff2);
}

@font-face {
    font-family: 'SuisseIntlMono';
    font-weight: lighter;
    src: url(typo/SuisseIntl-Light-WebXL.woff2) format(woff2)
}

/* ------------------------root and wbkit------------------------ */

:root {
    --primary: #fff;
    --secondary: #212121;
    --font-size-small: 13px;
    --font-size-paragraphe: 16px;
    --header-height: 98px;
    --footer-height: 42px;
}

::-webkit-scrollbar {
    display: none;
}

* {
    cursor: none !important;
}

*:focus {
    outline: 0 !important;
}

a:active,
a:focus {
    outline: 0 !important;
    border: none !important;
    --moz-outline-style: none !important;
}

.ball {
    padding: 5px;
    transition: padding 0.1s ease-in-out;
    position: absolute;
    width: 1px;
    height: 1px;
    top: 0;
    left: 0;
    background-color: var(--primary);
    border: solid #fff 3px;
    border-radius: 50%;
    mix-blend-mode: difference;
    pointer-events: none;
    z-index: 999;
}

.ball.scale {
    padding: 20px;
    transition: padding 0.1 s ease-in-out;
}

.point {
    width: 2px;

}

body {
    font-family: 'SuisseIntlMono', monospace;
    font-weight: normal;
    font-size: var(--font-size-paragraphe);
    color: var(--secondary);
    background-color: var(--primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a,
a:visited {
    color: var(--s);
    text-decoration: none;
}

body,
p,
h1,
h2,
h3,
ul,
li,
figure,
.site-main .post-navigation,
.post,
.entry-title,
.page-title {
    margin: 0;
    padding: 0;
    font-weight: normal;
}

.entry-title,
.page-title {
    text-align: center;
}

video {
    max-height: calc(100vh - (var(--header-height) + var(--footer-height)));
}

/* ------------------------.wp-block-button (CTA------------------------) */

.wp-block-buttons {
    background-color: transparent;

}


.wp-block-button {
    width: fit-content;
    margin: 2em auto 5em auto;
}

.wp-block-button__link {
    border-radius: 0;
    background-color: transparent;
}

.wp-block-button__link {
    overflow: hidden;
    position: relative;
    display: flex;
    margin: 0 auto;
    justify-content: center;
    width: 200px;
    height: 35px;
    border: solid 1.5px var(--secondary);
}

.cta-box {
    top: 7px;
    position: absolute;
    transition: .3s;
}

.wp-block-button span {
    text-transform: capitalize;
    font-size: var(--font-size-small);
    display: block;
    color: var(--secondary);
    transition: .3s;
}

.wp-block-button span:first-child {
    margin-bottom: 12px;
}

.wp-block-button:hover .cta-box {
    top: -23px;
}

.wp-block-button:hover .cta-box span {
    color: var(--secondary);
}

.entry-title {
    font-weight: bold;
    margin-bottom: 1em;
    text-transform: capitalize;
}

li {
    list-style-type: none;
}

.site-description,
.site-title,
.post-edit-link,
.page-title,
.nav-previous {
    display: none;
}

/*------------------------ HEADER------------------------ */

/* .main-navigation */

.main-navigation {
    background: rgb(217, 217, 217);
    background: -moz-linear-gradient(180deg, rgba(217, 217, 217, 1) 0%, rgba(217, 217, 217, 0) 100%);
    background: -webkit-linear-gradient(180deg, rgba(217, 217, 217, 1) 0%, rgba(217, 217, 217, 0) 100%);
    background: linear-gradient(180deg, rgba(217, 217, 217, 1) 0%, rgba(217, 217, 217, 0) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#d9d9d9", endColorstr="#d9d9d9", GradientType=1);
    position: fixed;
    top: 0;
    z-index: 99;
    padding: 2em;
}


#primary-menu {
    margin: 0 auto;
    width: 100%;
    max-width: 400px;
    min-width: 300px;
    justify-content: space-between;
}

/* single_post */

.single-post .main-navigation li:after {
    display: none;
}

/*------------------------FOOTER------------------------ */
.site-footer {
    width: fit-content;
    margin: 1em auto;
}

.site-info .flex {
    display: flex;
    gap: 1em;
    justify-content: center;
}

.site-info img {
    width: 100%;
    height: auto;
}

/*--------------------  -------------------- */

.site-info a {
    width: 30px;
}

.site-info p {
    font-size: 11px;
}

.entry-footer a {
    position: relative;
}

.entry-footer a:after {
    content: '.';
    position: absolute;
    bottom: -5px;
    right: calc(50% - 2px);
    width: 4px;
    height: 4px;
    background-color: transparent;
    transition: .3s;
}

.entry-footer a:hover::after {
    background-color: var(--secondary);
}

/* ------------------------ NAVIGATION ------------------------ */

/* active */
.main-navigation li:after {
    content: ' ';
    display: block;
    margin: 0 auto;
    margin-top: 5px;
    width: 5px;
    height: 5px;
    background-color: transparent;
    transition: .2s;
}

/* puce */
.home .main-navigation li:first-of-type::after,
.archive .main-navigation li:nth-of-type(2)::after,
.page-id-17 .main-navigation li:nth-of-type(3)::after,
.page-id-19 .main-navigation li:nth-of-type(4)::after,
.main-navigation li:hover::after,
.post-template-default .main-navigation li:nth-of-type(2)::after {
    background-color: var(--secondary);
}

/* ------------------------ PRIMARY ------------------------ */
#primary {
    width: 100%;
    max-width: 1040px;
    min-width: 800px;
    margin: 160px auto 0 auto;
    position: relative;
}


/* ------------------------ PAGES ------------------------ */

/* HOME */

.home .entry-title {
    display: none;
}

.home .entry-content h2 {
    font-size: 4em;
    font-weight: bold;
}

.entry-content {
    margin: 0;
}


/*------------------------ POST-GRID------------------------  */

/* post-thumbnail */

.home .post-grid {
    display: flex;
    gap: 1em;
}

.home .post-grid .post {
    height: 50vh;
}

.post-grid #primary {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - (var(--header-height) + var(--footer-height)));
    margin-bottom: var(--footer-height);
    overflow: scroll;
}

.post-grid .post {
    width: 100%;
    height: 10em;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    transition: .3s;
}

.post-grid .post:not(:last-child) {
    margin-bottom: 1em;
}

.post-grid .post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(.8);
    transition: .3s;
}

.home .post-grid .post .entry-header {
    top: 45%;
}

.post-grid .post .entry-header {
    position: absolute;
    width: 100%;
    top: 35%;
    text-align: center;
    pointer-events: none;
    font-weight: bold;
    color: var(--primary);
    font-size: 2em;
    opacity: 0;
    z-index: 99;
    transition: .3s;
    text-transform: capitalize;
}

.post-grid .page-title {
    text-align: center;
    margin-bottom: 2em;
    background-color: var(--primary);
}


.archive .post-grid .post:hover {
    height: 15em;
}

.post-grid .post:hover img {
    filter: contrast(1);
}

.post-grid .post:hover .entry-header {
    opacity: 1;
}

.entry-header .categories li {
    font-size: 17px;
    white-space: nowrap;
}

.entry-header .categories li::after {
    content: '–';
    margin: 0 5px;
}

.entry-header .categories li:last-child::after {
    display: none;
}

/*------------------------.post-template-default------------------------ */

.post-template-default .entry-content {
    margin: 0 auto;
}

.post-template-default p {
    text-align: center;
    margin-bottom: 2em;
}


.post-template-default .entry-content img {
    object-fit: contain;
    display: block;
    width: 100%;
    height: 100%;
}

.wp-block-image:not(:last-child, :first-child) {
    margin-bottom: 3em;
}

/* Arrow-scroll-collumn */

.entry-header .categories ul {
    display: flex;
    justify-content: center;
}

.post-template-default .post-thumbnail {
    display: none;
}

.wp-block-video video {
    display: block;
    margin-bottom: 3em;
}

/* Random-cat */

.random-cat .flex {
    display: flex;
    gap: 1em;
}

.random-cat {
    margin-top: 10em;
}

.random-cat article {
    position: relative;
}

.random-cat .entry-header {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--primary);
    opacity: 1;
    top: 40%;
    text-transform: capitalize;
    z-index: 999;
    transition: .3s;
    font-weight: bold;
}

.random-cat img {
    filter: contrast(.8);
    transition: .3s;
}

.random-cat a:hover img {
    filter: contrast(1);
}

.random-cat article:hover .entry-header {
    opacity: 1;
}


.post-navigation {
    display: none;
}

.single .wp-block-buttons {
    margin: 2em 0;
}

/*-------------------- About -------------------- */

.page-id-17 p {
    max-width: 50em;
    margin: 0 auto;
}

@media only screen and (max-width: 798px) {


    /* ------------------------root and wbkit------------------------ */
    #primary {
        padding: 0;
        margin: 35vh 0 0 0;
        width: auto;
        min-width: auto;
        max-width: none;
        overflow-x: hidden;
    }

    .wp-block-columns {
        margin-bottom: 0;
    }

    /* cta */
    .wp-block-button {
        margin: 1em 0 0 0;
    }

    /*cursor */

    .ball {
        display: none;
    }

    .point {
        background-color: var(--secondary);
        width: 10px;
        height: 10px;
        border-radius: 100%;
    }

    p {
        padding: 0 2em;
    }

    #foot-prin-2 {
        display: none;
    }


    /* ------------------------MENU------------------------ */

    .menu-menu-principal-container {
        position: fixed;
        top: 0;
        bottom: 0;
        right: 0;
        left: 0;
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        z-index: 9;
        background-color: var(--primary);
        opacity: 0;
        transition: .3s;
        pointer-events: none;
    }

    .toggled .menu-menu-principal-container {
        opacity: 1;
        transition: .3s;
        pointer-events: all;

    }

    #primary-menu {
        position: fixed;
        width: 100%;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5em;
        opacity: 1;
        transition: .3s;
    }

    #primary-menu li {
        text-align: center;
        font-size: 1.5em;
    }

    /*------------------------BURGER-MENU------------------------*/

    .menu-toggle {
        position: relative;
        display: block;
        color: transparent;
        background-color: transparent;
        border-radius: 0;
        width: 60px;
        height: 45px;
        margin: 45px auto 0 auto;
        padding: 0;
        border: none;
        z-index: 10;
    }


    .menu-toggle span {
        display: block;
        width: 100%;
        height: 5px;
        background-color: var(--secondary);
        position: absolute;
        top: 0;
        transition: .3s;
        transform-origin: center;

        /* refermer */
        transition-delay: .3s, .3s, .1s;
        transition-duration: .3s, .3s, .3s;
        transition-property: opacity, top, transform;
    }

    .menu-toggle span:first-child {
        top: 0
    }

    .menu-toggle span:nth-child(2) {
        top: 20px;
    }

    .menu-toggle span:nth-child(3) {
        top: 40px;
    }

    /* annimation */
    .toggled .menu-toggle span {
        /* ouvrir */
        transition-delay: .1s, .1s, .3s;
        transition-property: opacity, top, transform;
    }

    .toggled .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .toggled .menu-toggle span:first-child {
        top: 20px;
        transform: rotate(-45deg);
    }

    .toggled .menu-toggle span:nth-child(3) {
        top: 20px;
        transform: rotate(45deg);
    }



    /* ------------------------Post-grid------------------------ */
    .post-grid .post:not(:last-child) {
        margin-bottom: 0;
    }

    .wp-block-image:not(:last-child, :first-child) {
        margin-bottom: 0;
    }

    /* ------------------------Random-cat------------------------ */
    .random-cat {
        margin: 0;
    }

    .random-cat h3 {
        margin: 2em;
    }

    .random-cat .flex {
        gap: 0;
        flex-wrap: wrap;
    }

    .random-cat .flex article {
        width: 50%;
    }

    /* ------------------------HOME------------------------ */

    .home .post-grid {
        flex-direction: column;
        gap: 0;
    }

    .home .post-grid .post {
        height: 10em;
    }

    .home .post-grid .post .entry-header {
        opacity: 1;
        font-weight: bold;
        font-size: 1em;
    }

    .home .entry-content h2 {
        font-size: 2em;
    }

    .home .categories {
        display: none;

    }

    .post-grid .post {
        transition: .4s ease;
    }


    .centered {
        transform: scale(1.1);
    }

    .centered .entry-header {
        opacity: 1 !important;
    }

    /* remove hover */

    .archive .post-grid .post:hover {
        height: 10em;
    }

    .archive .post-grid .post:hover .entry-header {
        opacity: 0;
    }

    .archive .site-footer {
        margin: 5em auto 30vh auto;
    }

    .post-grid .post:hover img {
        filter: contrast(.8);
    }

    .post-grid .post:hover .entry-header {
        opacity: auto;
    }


}

@media only screen and (max-width: 355px) {
    .post-grid .post .entry-header {
        font-size: 1.5em;
    }
}