/*
Theme Name: BUTTER PRESS—git
Theme URI: 
Author: jojo
Author URI: 
Description: custom theme for BUTTER PRESS - full custom e-shop. GIT connected
Version: 26 05 22
License:
License URI:
Text Domain: butterpress
Tags:
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
WC requires at least: 8.0
WC tested up to: 8.5
*/

:root {

    /* couleurs */
    --blanc: #fff;
    --gris-pale: #dedede;
    --beurre: #f1ecc2;
    --ocre-pale: #cec172;
    --taupe-pale: #9e8a70;
    --beige-chaud: #a68655;
    --marron: #72503b;
    --marron-mauve: #614347;
    --brun: #392b22;
    --anthracite: #2f302f;
    --noir-clair: #141415;
    /* couleurs de sélection */
    --noir-highlight: #141415b0;
    --gris-highlight: #dededeb0;

    /* fonts */
    --inclusive-sans: "Inclusive Sans", sans-serif;
    --claude-sans: "Claude Sans", serif;
    /* font-size */
    font-size: 18px;
    --claude-spacing: 0.1em;

    /* margins */
    --margin-big: 2rem;
    --margin-small: 10px;

    --admin-bar-height: 32px;

    /* colonne - grandes marges */
    --big-col: calc(calc(50vw - calc(var(--margin-big) * 2)) / 6);
    --big-col2: calc(var(--big-col) * 2);
    --big-col3: calc(var(--big-col) * 3);
    --big-col4: calc(var(--big-col) * 4);
    --big-col5: calc(var(--big-col) * 5);
    --big-col6: calc(var(--big-col) * 6);

    /* bordure */
    --dotted-primaire: 2px dotted var(--primaire);
    --dotted-secondaire: 2px dotted var(--secondaire);
    --dotted-tertiaire: 2px dotted var(--tertiaire);
}

/* GENERAL */

* {
    box-sizing: border-box;
}

body {
    font-family: var(--inclusive-sans);
    font-weight: 500;

    line-height: 1.4;
    overflow-y: hidden;
}

/* -----------
scrollbar + sélection
--------------- */

/* Firefox */
* {
    scrollbar-width: thin;
    /* scrollbar-color: var(--blanc) transparent; */
}

/* Chrome, Safari, Edge */
*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    /* background: var(--blanc); */
    border-radius: 4px;
}

/* IE, Edge */
* {
    -ms-overflow-style: scrollbar;
}

::selection {
    background: var(--gris-highlight);
    /* color: var(--noir-highlight); */
}

::-moz-selection {
    background: var(--gris-highlight);
    /* color: var(--noir-highlight); */
}

.layout-shell__right *::selection {
    background: var(--noir-highlight);
    /* color: var(--noir-highlight); */
}

.layout-shell__right *::-moz-selection {
    background: var(--noir-highlight);
    /* color: var(--noir-highlight); */
}

.layout-shell__right {
    scrollbar-color: var(--anthracite) transparent;
}

.layout-shell__right::-webkit-scrollbar-thumb {
    background: var(--anthracite);
}

/* Formatages textes */

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

a:hover {
    text-decoration: underline;
}

h1 {
    text-transform: lowercase;
    font-weight: 500;
}

strong {
    font-weight: 700;
}

em {
    font-style: italic;
}

hr {
    border: none;
    border-top: 2px dotted !important;
    margin: var(--margin-big) 0 !important;
}

input {
    border: none;
    border-radius: 0;
    font-family: inherit;
    font-weight: inherit;
    width: 100%;
    height: 100%;
    margin: 0;
    font-size: inherit;
    padding: var(--margin-small);
}

button {
    border: none;
    border-radius: 0;
    font-family: inherit;
    font-style: inherit;
    font-weight: inherit;
    font-size: inherit;
    width: 100%;
    text-align: center;
    padding: var(--margin-small);
    text-transform: lowercase;
    cursor: pointer;
}

button:hover {
    opacity: 0.9;
}

.alinea {
    margin-left: var(--big-col);
}

/* ==================
HEADER
===================== */

header {
    padding: var(--margin-big) var(--margin-big) 1rem var(--margin-big);
    background-color: inherit;
    position: sticky;
    top: 0;

}

header .container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--margin-big);
}

.site-logo-svg {
    width: var(--big-col3);
}

.header-desktop-logo {
    text-align: center;
}

header nav {
    width: var(--big-col4);
}

header nav ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    text-transform: lowercase;
    font-size: 1.25em;

    font-family: var(--claude-sans);
    letter-spacing: var(--claude-spacing);

}

nav .cart-count {
    font-family: var(--inclusive-sans);
    font-size: 0.6em;
    vertical-align: 0.5em;
    margin-left: 0.25rem;
    font-weight: 600;
}


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

.layout-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100vh;
}

.admin-bar .layout-shell {
    height: calc(100vh - var(--admin-bar-height));
}


.layout-shell__left,
.layout-shell__right {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
}

.layout-shell__left-content {
    padding: var(--margin-big);
}

.layout-shell__heading {
    display: flex;
    justify-content: center;
    width: 100%;
}

h1.layout-shell__title {
    font-size: 2.25em;
    text-align: center;
    letter-spacing: -0.03em;
    width: var(--big-col5);
}

#main-content {
    min-height: 100%;
}

.layout-shell__right h2 {
    margin-bottom: 1rem;
    color: var(--noir-clair);
}



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


.header-mobile {
    display: none;
}

.nav-overlay {
    display: none;
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--fond);
    z-index: 1000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--margin-big);
    color: var(--secondaire);
}


/* BOUTON FERMER */
.nav-overlay__close {
    width: 2rem;
    height: auto;
    padding: 0;
    background: none;
    cursor: pointer;
    position: absolute;
    bottom: 2rem;
}

.nav-overlay__close svg {
    width: 100%;
    height: 100%;
    fill: var(--secondaire);
}

.nav-overlay__menu ul {
    list-style: none;
    text-align: center;
    padding: 0;
    margin: 0;
}

.nav-overlay__logo {
    text-align: center;
    width: 100%;
    height: auto;
    position: absolute;
    top: 0;
    padding: var(--margin-big);
}

.nav-overlay__logo .site-logo-svg {
    width: 100%;
}

.nav-overlay__menu li {
    margin-bottom: var(--margin-small);
}

.nav-overlay__menu a {
    font-family: var(--claude-sans);
    font-size: 1.5em;
    letter-spacing: var(--claude-spacing);
    text-transform: lowercase;
    color: var(--secondaire);
}

.nav-overlay .cart-count {
    font-size: 0.8em;
}

.nav-overlay__menu a:hover {
    text-decoration: underline;
}

.admin-bar .nav-overlay {
    top: var(--admin-bar-height);
    height: calc(100vh - var(--admin-bar-height));
}

@media (min-width: 769px) and (max-width: 1100px) {
    header nav {
        width: 100%;
    }
}


@media (max-width: 768px) {
    :root {
        /* font-size */
        font-size: 16px;

        /* margins */
        --margin-big: 1rem;
        --margin-small: 8px;

        /* colonnes */
        --big-col: calc(calc(100vw - calc(var(--margin-big) * 2)) / 4);

        --admin-bar-height: 46px;
    }

    body {
        overflow-y: auto;
    }

    .layout-shell {
        display: block;
        height: auto;
    }

    .admin-bar .layout-shell {
        height: auto;
    }

    .layout-shell__left,
    .layout-shell__right {
        height: auto;
        overflow: visible;
    }

    header {
        padding: var(--margin-big);
        position: fixed;
        width: 100%;
        top: 0;
        z-index: 50;
    }

    .admin-bar header {
        top: var(--admin-bar-height);
    }

    header .container {
        flex-direction: row;
        align-items: center;
    }

    .header-desktop-logo {
        display: none;
    }

    body.home .header-desktop-logo,
    body.front-page .header-desktop-logo {
        display: block;
    }

    #site-navigation {
        display: none;
    }

    .header-mobile {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .header-mobile__hamburger {
        width: 1.8rem;
        height: 1.8rem;
        padding: 0;
        background: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .header-mobile__hamburger svg {
        width: 100%;
        height: 100%;
        fill: currentColor;
    }

    .header-mobile__logo {
        flex: 1;
        text-align: center;
        line-height: 0;
    }

    .header-mobile__logo .site-logo-svg {
        width: calc(var(--big-col) * 1.5);
        display: inline-block;
    }


    .header-mobile__cart {
        position: relative;
        width: 2rem;
        /* height: 1.8rem; */
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .header-mobile__cart svg {
        width: 100%;
        height: 100%;
        fill: currentColor;
    }

    .header-mobile__cart .cart-count {
        position: absolute;
        top: -0.45rem;
        right: -0.45rem;
        height: 1.1rem;
        font-size: 0.75rem;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }

    .nav-overlay {
        display: flex;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    h1.layout-shell__title {
        font-size: 2rem;
    }


    .layout-shell__heading {
        padding: var(--margin-big);
        line-height: 1.1;
    }

}

/* Couleurs texte WordPress Gutenberg */
.has-blanc-color {
    color: var(--blanc) !important;
}

.has-gris-pale-color {
    color: var(--gris-pale) !important;
}

.has-beurre-color {
    color: var(--beurre) !important;
}

.has-ocre-pale-color {
    color: var(--ocre-pale) !important;
}

.has-taupe-pale-color {
    color: var(--taupe-pale) !important;
}

.has-beige-chaud-color {
    color: var(--beige-chaud) !important;
}

.has-marron-color {
    color: var(--marron) !important;
}

.has-marron-mauve-color {
    color: var(--marron-mauve) !important;
}

.has-brun-color {
    color: var(--brun) !important;
}

.has-anthracite-color {
    color: var(--anthracite) !important;
}

.has-noir-clair-color {
    color: var(--noir-clair) !important;
}