

:root{

    /* BORDERS 
    ----------------------------------------------------------- */

    --border-width: 0.08rem;
    --border: var(--border-width) solid black;
    --border-double: calc(var(--border-width) * 3) double black;
    --border-thick: 0.18rem solid black;
    --border-dotted: 0.12rem dotted black;
    --radius: var(--pad);

    /* TYPOGRAPHY
    ----------------------------------------------------------- */

    --f-olive: "QTAntiqueOlive";
    --f-main: "NationalPark";

    /* 
    line-heigth defined as a variable
    to create spacing relative to the basic lh
    (in rem so it's relative to the basic font-size 
    */
    --lh: 1.4rem;

    /* Olive font-sizes */
    --fs-big: 3.4rem;         /* big size for olive (think event title) */
    --fs-plus: 2.2rem;        /* less-big size for olive (think subevent titles) */
    --fs-up: 1.6rem;          /* up size for olive (think event category) */

    --fs-mini: 0.7rem;

    /* SPACES
    ----------------------------------------------------------- */

    /* padding distance from text to filet,
    so it's the same everywhere */
    --pad: 1rem;
    --pad-big: 3rem;

    --nav-space: calc(var(--lh) / 4);
    --nav-color: var(--c-ether);
    --nav-fill: var(--nav-space) solid var(--nav-color);

    /* header */
    --header-height: calc(var(--lh) * 2);
    --max-text-width: 40rem;
}

html{
    font-family: var(--f-main);

    /* this is a website on which the users are going to READ
    let them give a nice big font-size */
    /* font-size: 1.125em; */

    /* for anchor links */
    scroll-behavior: smooth;
}
body{
    overflow-x: hidden;
}

@media only screen and (max-width: 54rem) {
    :root{
        --pad-big: 2rem;
    }
}

@media only screen and (max-width: 36rem) {
    :root{
        --pad: 0.75rem;
        --pad-big: var(--pad);

        --fs-big: 2.8rem;
        --fs-plus: 1.8rem;
        --fs-up: 1.4rem;
        --fs-mini: 0.8rem;
    }
    html{
        font-size: 1em;
    }
}


/* GLOBAL STYLE (to apply everywhere!)
============================================================= */

em{
    font-style: italic;
}

img{
    max-width: 100%;
    display: block;
}

/* by default links invisible */
a,
a:visited{
    color: currentColor;
    text-decoration: none;
}

/* and have hover effect that make them go up */
a,
.slide-hover-link{
    transition: 0.15s;
    position: relative;
    bottom: 0;
    padding-bottom: 0;
    left: 0;
}
.slide-hover-link{
    transition: 0.15s;
}
/* move up the underline */
a:hover{
    bottom: 0.1em;
}
a:not(.small-pannel):hover{
    padding-bottom: 0.1em;
}
/* move left from a pad value */
.slide-hover-link:hover{
    left: calc(var(--pad) * -1);
}
.slide-hover-link:hover a{
    bottom:  inherit;
    padding-bottom: inherit;
}

/* remove moving */
.no-hover-links a:hover{
    bottom:  0;
    padding-bottom: 0;
}

/* color link */
.color-links a{
    transition: 0.15s;
    display: block;
}
.color-links a:hover{
    background-color: var(--c-main);
}
.color-links a.active{
    background-color: var(--c-main);
}

/* in text its underlined with a border */
.txt-content:not(.no-links) a{
    border-bottom: var(--border-thick);
    border-bottom-color: var(--c-main);
}

hr{
    border: none;
    border-top: var(--border);
    margin: var(--lh) 0 !important;
}
dt {
    font-family: var(--f-olive);
    margin-top: calc(var(--lh) * 0.5);
}
dd {
    margin-left: calc(2 * var(--lh));
}


/* BORDER
============================================================= */

.border-double{
    border: var(--border-double);
    background-clip: padding-box;
}

.border-pannel{
    margin: calc(var(--pad) * 0.5);
    outline: calc(var(--pad) * 0.5) solid var(--c-main);
    border-radius: calc(var(--pad) * 0.75);
    border: var(--border-thick);
    background-clip: padding-box;
}
.small-pannel {
    display: block;
	background-color: var(--c-main);
	padding: 0 0.6rem;
	border-radius: 0.4rem;
}
.small-pannel.fit-computed{
    width: fit-content;
}
.past .small-pannel{
    background-color: initial;
}

.border-pad{
    padding: calc(var(--lh) * 0.5) var(--pad) !important;    
}
.border-pad--full,
.border-pad--full:hover{
    padding: var(--pad);
}
.border-pad--balance,
.border-pad--balance:hover{
    padding: calc(var(--pad) * 0.65) calc(var(--pad) * 1.25) calc(var(--pad) * 0.5);     
}

.txt-pad{
    padding: 0 var(--pad-big);
}

@media only screen and (max-width: 54rem) {
    .border-pad,
    .border-pad:hover{
        padding: calc(var(--lh) * 0.25) calc(var(--pad) * 1) !important; 
    }
}

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

.container{
    position: relative;
}
.sticky{
    position: sticky;
    top: calc(var(--header-height) + calc(2 * var(--nav-space)));
    height: calc(100vh - var(--header-height) - calc(3 * var(--nav-space)));
    box-sizing: border-box;
    overflow: hidden;
}
.sticky > *{
    box-sizing: border-box;
    overflow: auto;
    max-height: 100%;
}

@media only screen and (max-width: 54rem) {
    .sticky{
        position: static;
        top: revert;
        height: auto;
        overflow: visible;
    }
}

/* EVENT TITLE
------------------------------------------------------------- */

.event-block{
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: min-content;
}

/* lists */
ul.event__cat{
    padding-left: 0 !important;
    padding-right: 0;
    list-style: none !important;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
}
ul.event__cat li::before{
    line-height: 0;
    content: url('../img/calendrier/active2.svg');
    margin-right: 0.4em;
}
ul.event__cat li{
    margin-right: 0.4em; 
}

.event__title{
    text-align: center;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}
.event__cat{
    justify-content: center;
}

.subevent .event__title .c-strong-back{
    transition: 0.15s background-color, 0.15s outline-color;
}
.subevent .event__title:hover .c-strong-back{
    background-color: var(--c-liquid-more);
    outline-color: var(--c-liquid-more);
}

/* DATES AND TIMES
------------------------------------------------------------- */

.event-block  table{
    width: 100%;
}

.event__address li:not(:first-of-type),
.event__address tr:not(:first-of-type) td{
    padding-top: calc(var(--lh) / 2);
}
.event__dates td:not(:first-of-type){
    padding-left: 0.2em;
}
.address_name{
    white-space: nowrap;
}

.event__dates table{
    width: 1%;
}
.event__dates td{
    white-space: nowrap;
}

td.range-date::after{
    content: "\202F·····\202F";
    font-size: 1.5em;
    position: relative;
    top: 0.1em;
    line-height: 0;
}
td.range-time::after{
    content: '·';
    font-size: 1.5em;
    position: relative;
    top: 0.1em;
    line-height: 0;
}
td.separator{
    width: 100%;
}
td.separator::after{
    content: '';
    border-bottom: var(--border);
    width: 100%;
    display: block;
}

/* DETAILS
------------------------------------------------------------- */

details summary{
    cursor: pointer;
    list-style: none;
    text-align: center;
    
    padding: 0;
    margin: 0 !important;
    padding: calc(var(--lh) * 0.5) var(--pad);
    position: relative;
    overflow: visible !important;
    
    pointer-events: none;
    background-color: var(--c-back);

}
details summary + *{
    border-top: var(--border);
    margin-top: 0 !important;
}

details summary::-webkit-details-marker,
details summary::marker {
    display: none;
}

@media only screen and (max-width: 54rem) {
    details{
        border-bottom: var(--border);
    }
    details summary{
        pointer-events: all;
        background-color: var(--c-main);
    }
    details summary::after{
        content: '...';
        cursor: pointer;
        display: inline-block;

        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        margin: auto;
        margin-top: calc(var(--lh) * -0.5 + var(--border-width));

        background-color: white;
        border: var(--border);
        padding: 0 0.6rem;
        border-radius: 0.4rem;
        height: var(--lh);

        font-size: var(--fs-plus);
        line-height: 0;
        text-align: center;
        box-sizing: border-box;
        font-family: var(--f-olive);
    }
    details:not([open]){
        overflow: visible !important;
    }
    details[open] summary::after{
        content: '×';
        line-height: 0.65;
        font-family: inherit;
    }
    details[open]{
        max-height: calc(100vh - var(--header-height) - calc(3 * var(--nav-space)));
        overflow: scroll;
    }
}


/* mermaid
    ============================================================= */

    .edgeLabel,
    .nodeLabel{
        font-family: var(--f-main);
        font-size: 1rem;
    }
    .edgeLabel{
        background: var(--c-back) !important;
    }
    .node > rect{
        fill: var(--c-main) !important;
        stroke: black !important;
        stroke-width: 0.18rem !important;
    }
    .flowchart-link{
        stroke: black !important;
        stroke-width: var(--border-width) !important;
    }
    .arrowMarkerPath{
        fill: black !important;
        stroke-width: 0 !important;
    }
    
    .mermaid strong{
        font-family: var(--f-olive);
    }
    .mermaid strong.plus{
        font-family: var(--f-olive);
        font-size: var(--fs-up);
    }
    
    .mermaid{
        width: min(var(--max-article-width), 100%);
    }
    .mermaid > svg{
        margin: calc(var(--lh) * 2) auto;
        display: block;
    }


/*  desire-grid
    ============================================================= */

.desire-path-page .main-nav::after {
	content: none;
}
.desire-path-page{
    background-color: var(--c-ether);
}
.desire-path-page h1{
    grid-column: 1 / -1;
    position: sticky;
    top: calc(var(--header-height) + (var(--nav-space) * 2));
    border: var(--border);
    border-left: 0;
    border-right: 0;

    text-align: center;

    background-color: var(--c-ether);
    z-index: 99999;
    padding: calc(0.5 * var(--lh)) 0;
}

.desire-grid{
    gap: var(--lh) var(--nav-space);
    padding: var(--lh) var(--pad);

    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: stretch;
}
.desire-grid > *{
    border: var(--border);
    border-style: dotted;

    padding: 0 0.5rem 0.5rem;
    background-color: white;
    flex-grow: 1;
    max-width: 100%;

    scroll-margin-top: calc(var(--header-height) + calc(var(--lh) * 4));
}
.desire-grid .small-pannel{
    margin-top: calc(var(--lh) * -0.5) !important;
    margin-bottom: calc(var(--lh) * 0.25) !important;
    background-color: var(--c-ether-more);
    border: var(--border);
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}


.desire-grid > *:target{
    border-style: solid;
}
.desire-grid > *:target .small-pannel{
    background-color: white;
}

.desire-path-page .desire-grid ul{
    margin: 0;
    line-height: 1.4;
    list-style: disc;
    padding-left: calc(var(--lh) * 0.5);
}



/* ------ */

/* .background-image {
    background-color: white;
    position: fixed;
    inset: 0;
    width: 100vw;
    display: block;
    background-repeat: no-repeat;
    filter: blur(1em);
    background-size: 100%;
    z-index: -1;
    opacity: 0.5;
} */
/* .background-image.sky{
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/4/4f/Blue_Sky%2C_Dhaka%2C_Bangladesh.jpg');
}
.background-image.earth{
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/4/46/Stagnogley.JPG');
} */
