
/* TXT CLASS
============================================================= */

/* say: what is inside is adjacent text elements,
so it must follow the spacing and sizes of this website */
.txt-content{

    /* reset to body default */
    font-size: 1rem;
    font-family: var(--f-main);

    /* basic typo */
    line-height: var(--lh);

    box-sizing: border-box;
}
.txt-content strong{
    font-weight: normal;
}
.txt-content strong em{
    /* border-bottom: var(--border-thick); */
}


/* heading in olive */
.txt-content h1,
.txt-content h2,
.txt-content h3,
.txt-content h4,
.txt-content h5,
.txt-content h6{
    font-family: var(--f-olive);
}

/* every text elements separated by half a lineheight */
.txt-content > *{
    margin: calc(var(--lh) * 0.5) 0;
}
/* but first and last DIRECT childs, do not have a margin */
.txt-content:not(.txt-content--long) > *:first-child{
    margin-top: 0;
}
.txt-content:not(.txt-content--long) > *:last-child{
    margin-bottom: 0;
}
.txt-content ul{
    list-style: disc;
    padding-left: calc(var(--lh) * 1);
}

/* LONG TXT CLASS
============================================================= */

/* long text (like articles) are defined more precisely 
and must breath more */
.txt-content--long{
    /* max width for nice reading */
    box-sizing: content-box;
    max-width: var(--max-text-width);
}

.title-container{
    box-sizing: content-box;
    max-width: 40rem;
    margin: 0 auto;
    z-index: 101;
    position: relative;
    overflow: auto;
}


/* vertical rythm and spacing */

/* every text elements separated by a whole lineheight */
.txt-content--long :is(h1,h2,h3,h4,h5,h6,ul,ol){
    margin: calc(var(--lh) * 1) 0;
}

.txt-content--long h1{
    /* pas de double titre */
    display: none;
}
.txt-content--long h2 {
    font-size: var(--fs-up);
    line-height: calc(var(--lh) * 1.5);
    margin: calc(var(--lh) * 2) 0 calc(var(--lh) * 1);
    letter-spacing: -0.03em;
  }
.txt-content--long h3,
.txt-content--long h4,
.txt-content--long h5,
.txt-content--long h6{
    font-size: 1rem;
    line-height: calc(var(--lh) * 1);
    margin: calc(var(--lh) * 1.5) 0 calc(var(--lh) * 0.1);
}
.txt-content--long h4 {

    line-height: calc(var(--lh) * 0.75);
}
.txt-content--long p{
    margin-bottom: 0;
    margin-top: 0;
}
.txt-content--long p + p {
    margin-top: calc(var(--lh) * 0.5);
}

/* CUSTOMS
============================================================= */

/* OLIVE */
/* 
    if we want to use the olive, we must use one of those classes
*/
.olive{
    font-family: var(--f-olive);
    font-size: 1em;
}
.olive-up{
    font-family: var(--f-olive);
    font-size: var(--fs-up);
    line-height: calc(var(--lh) * 1.25);
}
.olive-plus{
    font-family: var(--f-olive);
    font-size: var(--fs-plus);
    line-height: calc(var(--lh) * 1.5);
    letter-spacing: -0.03em;
}
.olive-big{
    font-family: var(--f-olive);
    font-size: var(--fs-big);
    letter-spacing: -0.03em;
}

/* specials */
.uppercase{
    text-transform: uppercase;
}
.smaller{
    font-size: var(--fs-mini);
    line-height: 1;
}

/* pseudo-condensed titles */
div.title-wrapper {
    text-align: center;

}
.pseudo-condensed{
    display: block;
    width: fit-content;
    white-space: nowrap;
    transform-origin: left;

    opacity: 0;
    transition: opacity 0.25s;
}
.pseudo-condensed.computed{
    opacity: 1;
}

h1.pseudo-condensed,
h2.pseudo-condensed{
    margin-left: auto;
    margin-right: auto;
}

@media only screen and (max-width: 36rem) {

    .txt-content--long h2{
        line-height: calc(var(--lh) * 1.25);
    }
    .olive-up{
        line-height: calc(var(--lh) * 1);
    }
}

/* IMG CREDITS
------------------------------------------------------------- */

.img-credits,
.txt-content--long figcaption{
    font-family: var(--f-main);
    font-size: var(--fs-mini);
    line-height: calc(var(--lh) * 0.5);
    padding-right: var(--pad);
    letter-spacing: 0.03em;
}

.img-credits:not(:empty),
.txt-content--long figcaption:not(:empty){
    text-align: right;
    padding-top: calc(var(--lh) * 0.5);

    /* not wider than image */
    display: table-caption;
    caption-side: bottom;
    box-sizing: border-box;
}


/* LISTS UTILITIES
------------------------------------------------------------- */

ul.comma-list li{
    display: inline;
}
ul.comma-list li:not(:first-child):before{
    content: ', ';
}

/* tags */
ul.block-list{
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--nav-space);
}
ul.block-list li{
    padding: calc(var(--nav-space) * 0.5) var(--nav-space);
    border: var(--border);
}
/* authors */
ul.pannel-list{
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: calc(var(--lh) * 0.25);
}
ul.pannel-list a{
    border: none !important;
}

ul.block-list,
ul.pannel-list,
ul.comma-list,
ul.flex-list{
    list-style: none;
    padding-left: 0;
}