/*
Theme Name: Open Builder WP - Child
Template: Page-Builder-Wordpress-master
Description: Thème enfant pour Open Builder WP - Personnalisations client
Author: Votre Nom
Version: 1.0.0
Text Domain: openbuilderWP-child
*/

/* 
 * Vos styles personnalisés ici
 * Le thème parent sera chargé automatiquement
 */

/* THEME */
@import url('https://fonts.googleapis.com/css2?family=Afacad:ital,wght@0,400..700;1,400..700&family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

/* MAIN COLORS */
:root {
    /* MAIN COLORS */
    /* Surfaces */
    --surface-base: #EEEAE8;
    --surface-darker: #394936;
    --surface-darker-2: #2e3f2c;
    --surface-light: #e2e9df;
    --surface-hover: #eae5e3;
    /* Contenu */
    --content-default: #7A7A7A;
    /* --content-strong: #fff; */
    --content-light: rgb(238, 234, 232);
    --content-gray: #5b6077;
    --content-dark: #2e3f2c;
    /* Accented */
    --accented: #2E3F2C;
    --accented-2: #92C189;
    --accented-2-hover: #B1D8A9;
    --accented-red: #92544c;

    /* SIZES */
    --main-window-width: 1200px;
    --small-window-width: 900px;

    --header-height: 55.5px;

    /* BREAKPOINTS */
    --BP-1275: 1275px;
    --BP-1050: 1050px;
    --BP-756: 756px;

    /* BACKGROUNDS GRADIENTS */
    --background-dark-trans: linear-gradient(0, rgba(0, 0, 0, 0.721), rgba(0, 0, 0, 0));
    --background-trans: linear-gradient(
        0deg,
        var(--surface-base) 0%,
        color-mix(in srgb, var(--surface-base) 0%, transparent) 80%
    );
    --background-main: linear-gradient(
        0deg,
        var(--surface-base) 0%,
        var(--surface-darker) 100%
    );
    --background-main-rev: linear-gradient(
        0deg,
        var(--surface-darker) 0%,
        var(--surface-base) 100%
    );
}
/* COLOR PROFILES */
.block.color-inverted {
    --context-bg: var(--surface-darker);
    --context-text: var(--content-light);
    --context-span: var(--surface-base);
    --context-heading: var(--surface-base);
    --context-accent: var(--accented-2);
}

body {
  background-color: var(--surface-base);
}

* {
    font-family: "Nunito", sans-serif;
}
h1, h2, h3, h4, h5, span {
    font-weight: 100;
    color: var(--context-heading, var(--accented));
    font-family: 'Libre Baskerville', Times;
}
h2 * {
    font-family: 'Libre Baskerville', Times;
}
a {
    color: var(--context-accent, var(--accented));
}

h1 {
    font-size: 3.5rem;
}
h2 {
    font-size: 2.5rem;
    font-weight: 100;
}
h3 {
    font-size: 2rem;
}
p, li {
    color: var(--context-text, var(--content-default));
    font-size: 1rem;
    font-weight: 350;
}

/* ----------- ELEMENTS ----------- */

button, .button {
    font-size: 1.05rem;
    padding: 16px 24px;
    border: 0;
    border-radius: 999px;
    color: var(--content-light);
    text-decoration: none;

    background: linear-gradient(
        45deg,
        #3f523c,
        #31612c,
        #3b6f32,
        #479a3e
    );
    background-size: 300% 300%;
    background-position: 0% 50%;

    transition: 0.4s;
}

button:hover, .button:hover {
    background-position: 100% 50%;
    cursor: pointer;
    color: white;
}



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

@media (min-width: 900px) {
    header {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 100;
    
        background-color: color-mix(in srgb, var(--accented) 92%, transparent);
        border-width: 0 0 1px 0;
        border-color: var(--surface-base);
        border-style: solid;
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
    }
    body:has(#wpadminbar) header {
        top: 32px;
    }
    
    header img {
        height: 37.5px;
    }

    header .main-menu {
        display: flex;
        align-items: center;
        gap: 13px;
    }
    
    header .menu {
        display: flex;
        flex-direction: row;
        margin: 0;
    }
    header .menu li {
        position: relative;
        list-style-type: none;
    }
    header .menu a {
        color: var(--surface-base);
        text-decoration: none;
        color: var(--surface-light);
    
        display: block;
        padding: 15px;
    }
    header .menu a:hover {
        color: white;
    }
    
    header .menu li {
        list-style-type: none;
        position: relative;
        display: block;
    }
    
    
    
    header .menu .sub-menu {
        display: flex;
        position: fixed;
        top: 0px;
        padding: 0px;
        flex-direction: column;
        background-color: color-mix(in srgb, var(--accented) 92%, transparent);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        border-width: 1px 0 0 0;
        border-color: var(--surface-base);
        border-style: solid;
        border-radius: 0 0 5px 5px;
        transform: translateY(0);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.15s ease-in, visibility 0.15s;
    }
    
    header .menu .sub-menu.entering {
        transform: translateY(-6px);
    }
    
    header .menu .sub-menu.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
        transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                    visibility 0s;
    }
    
    header .sub-menu li:hover {
        background-color: var(--accented);
        border-radius: 0 0 5px 5px;
    }

    /* LANGUAGE */
    header .main-menu .lang-btn {
        color: var(--surface-light);
    }
}

@media (max-width: 899px) {
    /* -------------------------
       PHONE NAV - BUTTON
    -------------------------- */
    .phone-hamburger {
        border: none;
        overflow: hidden;
        z-index: 1000;
        position: fixed;
        top: 0;
        right: 0;
        background: #fff9eead;
        border-radius: 0 0 0 10px;
    }
    .phone-hamburger .iconify {
        display: block;
        z-index: 1000;
        font-size: 30px;
        padding: 8px;
        color: var(--accented);
        transition: color 0.2s ease, opacity 0.4s ease;
        opacity: 0.8;
    }
    .phone-hamburger:hover .iconify {
        transform: scale(1.1);
        cursor: pointer;
    }
    .phone-hamburger.open .iconify {
        color: white;
        opacity: 1;
    }
    
    /* -------------------------
       PHONE NAV - MAIN WINDOW
    -------------------------- */
    .phone-nav {
        position: relative;
        z-index: 1000;
    }
    #phone-menu {
        visibility: hidden;
        background-color: var(--accented);
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        margin: 0;
        padding-right: 40px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        overflow: scroll;
        pointer-events: none;
        gap: 15px;
        transform: translateY(-20px);
        opacity: 0;
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    #phone-menu.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
    #phone-menu.closing {
        opacity: 0;
        transform: translateY(-20px);
        pointer-events: none;
    }
    
    /* -------------------------
       PHONE NAV - MENU ITEMS
    -------------------------- */
    #phone-menu ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    #phone-menu .menu-item {
        list-style: none;
    }
    #phone-menu .menu-item > a {
        color: white;
        text-decoration: none;
        font-size: 2rem;
    }
    #phone-menu .menu-item > a:hover {
        color: #ffffffc4;
    }
    
    /* -------------------------
       PHONE NAV - SUBMENU
    -------------------------- */
    #phone-menu .sub-menu {
        list-style: none;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-10px);
        transition:
            max-height 0.4s ease,
            opacity 0.3s ease,
            transform 0.3s ease;
        gap: 8px;
    }
    #phone-menu .sub-menu.open-submenu {
        max-height: 500px;
        opacity: 1;
        transform: translateY(0);
    }
    #phone-menu .sub-menu .menu-item > a {
        font-size: 1.3rem;
        color: #ffffffbb;
    }
    #phone-menu .sub-menu .menu-item > a:hover {
        color: white;
    }
    
    body:has(#wpadminbar) .phone-hamburger {
        top: 32px;
    }

    /* -------------------------
          LANGUAGE - PHONE
    -------------------------- */

    #phone-menu .lang-btn {
        position: fixed;
        bottom: 5vh;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
        color: var(--surface-light);
    }
}

/* -------------------------
   RESPONSIVE
-------------------------- */
@media (min-width: 900px) {
    .phone-nav {
        display: none;
    }
}
@media (max-width: 899px) {
    header {
        display: none;
    }
}





/* --------------------------------------------- FOOTER --------------------------------------------- */

footer {
    background-color: var(--content-dark);
    border-style: solid;
    border-width: 2px 0 0 0;
    border-color: var(--surface-base);
}

footer * {
    color: var(--surface-base);
}

footer .content * {
    color: var(--surface-light);
}
footer .content *:hover {
    color: var(--content-light);
}

footer .footer-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;

    width: clamp(70%, 90%, 1200px);
    margin: auto;
}

footer .child {
    flex: 1 1 300px;
}

footer ul {
    padding: 0;
}

footer li {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

footer li svg {
    color: var(--accented);
}

footer li p {
    margin: 0;
    color: var(--content-dark);
}

footer .content {
    display: flex;
    flex-direction: column;
}

footer .content a {
    transition: 0.3s ease;
    width: fit-content;
}
footer .content a:hover {
    transition: 0.3s ease;
    transform: translateX(5px);
}


footer .credits {
    display: flex;
    flex-direction: row;
    width: clamp(70%, 90%, 1200px);
    margin: auto;
    padding: 10px 0;
}

footer .credits .child {
    flex: 1 1 100px;
    margin: auto;
    text-align: center;
}

footer .credits .site-logo img {
    width: 100px;
    margin: auto;
}

@media (max-width: 650px) {
    footer .credits .empty {
        flex: 0;
    }
}



/* ----------------------------------- PAGE TRANSITION OVERLAY ----------------------------------- */

#obwp-transition-overlay {
    position: fixed;
    inset: 0;
    background: var(--accented);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.4s ease;
}

#obwp-transition-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

#obwp-transition-logo {
    max-width: 150px;
    opacity: 0.9;
}