:root {
    --bg-color: unset;
    --text--color: unset;
    --text--color--hover: unset;
    --text--bg-color--hover: unset;
    --spacer-width: unset;
    --spacer-height: unset;
    --spacer-color: unset;
    --spacer-margin: unset;
    --menu_height: 100%;
    --fill--color: transparent;
    --kotchi_font_family: 'Inter', sans-serif;
}

* {
    font-family: var(--kotchi_font_family), serif;
}

.breadcrumb {
    font-size: 1.5rem;
}

.kotchi-primary, .breadcrumb-item.active {
    color: var(--kotchi_primary);
}

.kotchi-secondary{
    color: var(--kotchi_secondary);
}

.kotchi-tertiary {
    color: var(--kotchi_tertiary);
}

.kotchi-light-grey {
    color: var(--kotchi_light_grey);
}

.kotchi-bg-secondary {
    background-color: var(--kotchi_primary);
}

.kotchi-bg-tertiary {
    background-color: var(--kotchi_tertiary);
}

.nav-link:hover, .nav-link:focus, .kotchi-secondary-hover:hover{
    color: var(--kotchi_secondary);
}

.spacer {
    width: var(--spacer-width, 100%);
    height: var(--spacer-height, .0125rem);
    background-color: var(--spacer-color);
    margin: var(--spacer-margin);
}

.h-800{
    height: 800px;
}


/*************************
 Page display
**************************/

html {
    font-size: 16px;
    height: 100%;
}

body {
    overflow: unset !important;
    height: 100%;
    background-color: var(--kotchi_white) !important; /*TODO find why background skyblue*/
}

body > .container-fluid {
    display: grid;
    grid-template-areas: "menu main";
    grid-template-columns: 14rem 1fr;
    padding: 0;
    height: 100%;
}

body > .container-fluid > main {
    background-color: var(--kotchi_lightergrey);
}

main > .content {
    padding-right: 3rem;
    padding-left: 3rem;
}

@media (max-width: 48rem) {
    main > .content {
        padding-right: 1rem;
        padding-left: 1rem;
    }
}

/***************
    MENU
****************/

#main-nav {
    grid-area: menu;
    height: var(--menu_height);
    z-index: 1000
}

body > .container-fluid > main {
    grid-area: main;
}

#main-nav > div {
    overflow-y: auto;
}

#main-nav,
#main-nav > div,
#main-nav > div > div {
    height: var(--menu_height);
}

#main-nav > div > div {
    height: 100%;
    padding-top: 3rem;
}

#main-nav ul.nav {
    display: grid;
    grid-template-areas: "search" "search-spacer" "dashboard" "paths" "calendar" "exchanges" "exchanges-spacer"
                         "resources" "notes" "notes-spacer" "space" "profile" "settings" "logo-spacer" "logo";
    grid-template-columns: auto;
    grid-template-rows: repeat(10, auto) 1fr repeat(4, auto);
    height: 100%;
}

#main-nav li.search { grid-area: search; }
#main-nav li.dashboard { grid-area: dashboard; }
#main-nav li.paths { grid-area: paths; }
#main-nav li.calendar { grid-area: calendar; }
#main-nav li.exchanges { grid-area: exchanges; }
#main-nav li.resources { grid-area: resources; }
#main-nav li.notes { grid-area: notes; }
#main-nav li.profile { grid-area: profile; }
#main-nav li.settings { grid-area: settings; }
#main-nav .spacer.search-spacer { grid-area: search-spacer; }
#main-nav .spacer.exchanges-spacer { grid-area: exchanges-spacer; }
#main-nav .spacer.notes-spacer { grid-area: notes-spacer; }
#main-nav .spacer.logo-spacer { grid-area: logo-spacer; }
#main-nav .container-fluid.logo { grid-area: logo; }

#main-nav {
    --bg-color: var(--kotchi_darkpurple);
    --text--color: var(--kotchi_light_grey);
    --text--bg-color: unset;
    --text--font-size: 0.813rem;
    --text--font-weight: 600;
    --transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
    --spacer-color: var(--kotchi_tertiary);
    --spacer-margin: .75rem 0;
    background-color: var(--bg-color);
}

#main-nav li.nav-item.active,
#main-nav li.nav-item:hover {
    --text--color: var(--kotchi_white);
    --text--bg-color: var(--kotchi_purple);
    fill: var(--text--color);
}

#main-nav li.nav-item::before ,
#main-nav li.nav-item::before {
    content: '';
    width: .5rem;
    display: block;
    background-color: var(--text--bg-color);
    height: 100%;
    position: absolute;
    left: -1rem;
    border-radius: 0 .5rem .5rem 0;
    transition: var(--transition);
}

#main-nav li.nav-item > a.nav-link {
    color: var(--text--color);
    background-color: var(--text--bg-color);
    font-size: var(--text--font-size);
    font-weight: var(--text--font-weight);
    padding: 1rem;
    border-radius: 0.375rem;
    transition: var(--transition);
}

#main-nav li.nav-item {
    width: calc(100% - .75rem - 1rem);
    margin: .125rem .75rem .125rem 1rem;
    position: relative;
}

#main-nav li.nav-item > a.nav-link svg,
#main-nav li.nav-item > a.nav-link svg * {
    transition: var(--transition);
}

#main-nav li.nav-item > a.nav-link > .menu-icon {
    display: inline-block;
    width: 1.25rem;
    text-align: center;
    margin-right: 0.5rem;
}

@media (min-width: 48.01rem) {
    #main-nav {
        max-height: 100vh;
        position: fixed;
        left: 0;
        top: 0;
        width: 14rem;
    }
}
@media (max-width: 48rem) {
    :root {
        --menu_height: 6.5rem;
        --menu-width: calc(92px * 5);
    }

    body > .container-fluid > main {
        padding-bottom: 6.25rem;
    }

    #main-nav {
        --bg-color: var(--kotchi_white);
        --border-color: var(--kotchi_lightgrey);
        --text--color: var(--kotchi_tertiary);
        width: 100vw;
        overflow: visible;
        transform: scale(min(calc(100vw / var(--menu-width)), 1));
        transform-origin: left bottom;
    }

    #main-nav::before {
        height: var(--menu_height);
        width: 200vw;
        content: "";
        background-color: var(--bg-color);
        position: absolute;
        bottom: 0;
    }

    #main-nav > div {
        --notch-height: 10px;
        --notch-width: 60px;
        position: relative;
        overflow: visible;
    }

    /* Bordure sur chaque li sauf paths */
    #main-nav ul li.nav-item:not(.paths) {
        border-top: 1px solid #EAECF0;
    }

    /* Encoche centrale */
    #main-nav ul li.paths {
        position: relative;
        overflow: visible;
    }

    #main-nav ul.nav {
        overflow: visible;
    }

    #main-nav ul li.paths::after {
        content: '';
        position: absolute;
        top: calc(-1 * var(--notch-height) + 1px);
        left: 0;
        width: 100%;
        height: var(--notch-height);
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 9' preserveAspectRatio='none' fill='none'%3E%3Cpath d='M0,9 H7 C11.268,9 13.314,7.336 17.006,5.196 C22.687,1.903 26.401,0 30,0 C33.599,0 37.313,1.903 42.994,5.196 C46.686,7.336 48.732,9 53,9 H60 V9 H0 Z' fill='%23ffffff'/%3E%3Cpath d='M0,9 H7 C11.268,9 13.314,7.336 17.006,5.196 C22.687,1.903 26.401,0 30,0 C33.599,0 37.313,1.903 42.994,5.196 C46.686,7.336 48.732,9 53,9 H60' fill='none' stroke='%23EAECF0' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat;
        background-size: 100% 100%;
        z-index: 1000;
    }

    #main-nav li.nav-item {
        margin: 0;
        display: flex;
        align-items: center;
        width: 100%;
        flex-direction: column;
        justify-content: center;
    }

    #main-nav li.nav-item.active,
    #main-nav li.nav-item:hover {
        --text--color: var(--kotchi_purple);
        --text--bg-color: unset;
    }

    #main-nav li.paths a > div {
        --bg-color: var(--kotchi_tertiary);
        --text--color: var(--kotchi_tertiary);
        --fill--color: var(--kotchi_white);
        background-color: var(--bg-color);
        border-radius: 50%;
        stroke-width: 1;
        background: var(--bg-color);
        height: 3.25rem;
        width: 3.25rem;
        padding: 0;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-content: center;
        flex-wrap: wrap;
        align-items: center;
    }

    #main-nav li.paths a > div svg {
        --text--color: var(--fill--color);
    }

    #main-nav li.paths.active {
        --text--color: var(--kotchi_pink);
        --bg-color: var(--kotchi_pink);
    }

    #main-nav li.paths.active a > div {
        --bg-color: var(--kotchi_pink);
        --text--color: var(--kotchi_pink);
    }

    #main-nav li.nav-item > a.nav-link {
        height: 100%;
        justify-content: center;
        padding: 1rem;
    }

    #main-nav li.nav-item a,
    #main-nav li.nav-item a {
        flex-direction: column;
        margin-top: -6px;
        z-index: 1001;
    }

    #main-nav li.nav-item.paths > a {
        padding-top: 0;
    }

    body > .container-fluid {
        grid-template-areas: "main" "menu";
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 6.25rem;
    }

    #main-nav li.nav-item::before ,
    #main-nav li.nav-item::before {
        content: unset;
    }

    #main-nav {
        position: fixed;
        bottom: 0;
    }


    #main-nav > div {
        overflow-y: visible;
    }

    #main-nav > div > div {
        padding-top: 0;
        overflow: visible;
    }

    #main-nav ul.nav {
        grid-template-areas: "dashboard calendar paths exchanges search";
        grid-template-columns: repeat(5, 1fr);
        grid-template-rows: auto;
    }

    #main-nav li:not(.show-mobile),
    #main-nav .spacer,
    #main-nav .logo {
        display: none;
    }

    #main-nav .nav-link svg {
        height: 1.5rem;
        width: 1.5rem;
    }

    #main-nav .nav-link svg {
        height: 1.5rem;
        width: 1.5rem;
    }
}

/**************
    HEADER
***************/

#kotchi-header {
    padding: 0 4rem 1.5rem 4rem;
    gap: 1rem;
    background: linear-gradient(89.6deg, rgba(255, 135, 140, 0.2) 9.67%, rgba(241, 237, 255, 0.2) 92.17%);
    align-items: flex-end;
    min-height: 7.25rem;
}

#kotchi-header > .header_title {
    --text--font-size: 1.375rem;
    --text--font-weight: 600;
    font-size: var(--text--font-size);
    font-weight: var(--text--font-weight);
    flex-grow: 2;
}

#kotchi-header > .header_actions {
    --text--font-size: 1rem;
    --text--font-weight: 600;
    font-size: var(--text--font-size);
    font-weight: var(--text--font-weight);
    flex-grow: 1;
    display: flex;
    flex-direction: row-reverse;
}

@media (max-width: 48rem) {
    #kotchi-header {
        position: relative;
        background: linear-gradient(180deg, rgba(255, 135, 140, 0.4) -37.91%, rgba(241, 237, 255, 0.4) 115.93%);

    }

    #kotchi-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        pointer-events: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='440' height='182' viewBox='0 0 440 182' fill='none'%3E%3Cg filter='url(%23filter0_n_76_5509)'%3E%3Crect width='440' height='182' fill='url(%23paint0_linear_76_5509)' fill-opacity='0.4'/%3E%3C/g%3E%3Cdefs%3E%3Cfilter id='filter0_n_76_5509' x='0' y='0' width='440' height='182' filterUnits='userSpaceOnUse' color-interpolation-filters='sRGB'%3E%3CfeFlood flood-opacity='0' result='BackgroundImageFix'/%3E%3CfeBlend mode='normal' in='SourceGraphic' in2='BackgroundImageFix' result='shape'/%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.909 0.909' stitchTiles='stitch' numOctaves='3' result='noise' seed='5784'/%3E%3CfeColorMatrix in='noise' type='luminanceToAlpha' result='alphaNoise'/%3E%3CfeComponentTransfer in='alphaNoise' result='coloredNoise1'%3E%3CfeFuncA type='discrete' tableValues='0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'/%3E%3C/feComponentTransfer%3E%3CfeComposite operator='in' in2='shape' in='coloredNoise1' result='noise1Clipped'/%3E%3CfeFlood flood-color='%23FF878C' result='color1Flood'/%3E%3CfeComposite operator='in' in2='noise1Clipped' in='color1Flood' result='color1'/%3E%3CfeMerge result='effect1_noise_76_5509'%3E%3CfeMergeNode in='shape'/%3E%3CfeMergeNode in='color1'/%3E%3C/feMerge%3E%3C/filter%3E%3ClinearGradient id='paint0_linear_76_5509' x1='243' y1='-69' x2='243' y2='211' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23FF878C'/%3E%3Cstop offset='1' stop-color='%23F1EDFF'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E");
        background-size: cover;
        z-index: -1;
    }


}

/*************************
    Path
***************************/

.add-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px dashed var(--kotchi_light_grey);
    background-color: transparent;
}

.add-card-text{
    color: var(--kotchi_light_grey);
}

.add-card:hover {
    border-color: var(--kotchi_secondary);
    color: var(--kotchi_secondary);
    transform: translateY(-2px);
    box-shadow: 0 1px 3px var(--kotchi_secondary);
}

.kotchi-hover:hover {
    border-color: var(--kotchi_secondary);
    color: var(--kotchi_secondary);
    transform: translateY(-2px);
}

.add-card-text:hover{
    color: var(--kotchi_secondary);
}

.capsule-container {
    max-width: 150px;
    justify-items: center;
    cursor: pointer;
}

.exercise-container {
    justify-items: center;
    cursor: pointer;
}

.capsule {
    font-size: 15px;
    width: 60px;
    height: 60px;
}

.exercise {
    font-size: 12px;
    width: 35px;
    height: 35px;
    justify-content: center;
}

/*************************
    Bootstrap overriding
***************************/

.dropdown-item.active, .dropdown-item:active {
    color: var(--sk_active);
    background-color: var(--sk_nav_hover);
}

.btn-primary, .btn-primary:hover, .btn:first-child:hover, .btn-primary:active, .btn:first-child:active {
    background-color: var(--kotchi_secondary);
    border-color: var(--kotchi_secondary);
    /*border-radius: var(--kotchi_btn_border_radius);*/
}

.btn-outline-primary, .btn-outline-primary:hover, .btn-outline-primary:active {
    border-color: var(--kotchi_secondary);
}

.btn-secondary, .btn-secondary:hover, :not(.btn-check)+.btn:hover, .btn-secondary:active, :not(.btn-check)+.btn:active {
    background-color: var(--kotchi_white);
    border-color: var(--kotchi_white);
    color: var(--kotchi_secondary);
    /*border-radius: var(--kotchi_btn_border_radius);*/
}

.actionContainer {
    width: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.kotchi-purple-button {
    color: white;
    background-color: var(--kotchi_purple);
}
.kotchi-purple-button:hover,
.kotchi-purple-button:active {
    color: white;
    background-color: var(--kotchi_darkpurple);
}

.kotchi-red-button {
    color: white;
    background-color: var(--kotchi_red);
}
.kotchi-red-button:hover,
.kotchi-red-button:active {
    color: white;
    background-color: #c93858;
}

.kotchi-grey-button {
    color: var(--kotchi_primary);
    background-color: var(--kotchi_lightergrey);
    border: 1px solid var(--kotchi_lightgrey);
}
.kotchi-grey-button:hover,
.kotchi-grey-button:active {
    color: var(--kotchi_primary);
    background-color: var(--kotchi_lightgrey);
}

.reversed {
    transform: rotate(180deg);
}

