:root{
    --color-dark-1: #202C39;
    --color-dark-2: #283845;
    --color-dark-3: #394853;
    --color-light-1: #B8B08D;
    --color-light-2: #F2D492;
    --color-light-3: #F29559;
    --text-light:#f9f9f9;
    --text-light-transparent:#f9f9f97c;
    --text-dark:#101418;
    --text-shadow:#10141885;
    --color-link:#88a3e8;
    --color-link-hover:#b0c1f0;
    --color-characters:#EA638C;
    --color-places:#2CA58D;
    --color-groups:#9DACFF;
    --color-objects:#9DACFF;
    --color-full-image-background: #202c39b4;
}

* {
    padding: 0;
    margin: 0;
    font-family: sans-serif;
}

header{
    top: 0;
    grid-column: 1 / span 3;
    grid-row: 1;
    padding: 0 3em;
    height: 85px;
    transform: scaleX(-1);
    z-index: 6;
}
#header{
    top: 0;
    height: 85px;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    transform: scaleX(-1);
}
#headerImg{
    position: absolute;
    top: -45px;
    left: 0%;
    width: 350px;
    pointer-events: none;
    z-index: 0;
}
#header a{
    text-align: center;
    text-decoration: none;
    color: var(--text-light);
}

#header #title h1{
    z-index: 1;
    position: relative;
    left: 120px;
    font-family: 'linux libertine';
    color: white;
    font-size: 1.9em;
    text-shadow: 0px 0px 5px black;
    -webkit-text-stroke: 3px black;
    paint-order: stroke fill;
}
#header #title:hover{
    transform: translateY(-1px);
    text-shadow: 0px 2px 10px black;
}
#header #title:active{
    transform: translateY(1px);
    text-shadow: 0px 0px 2px black;
}

#header #links{
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    list-style: none;
    z-index: 6;
}
#header #links li{
    background-color: var(--color-dark-2);
    padding:0 1.3em;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 30px;
}
#header #links li:first-of-type{
    border-radius: 10px 0px 0px 10px;
}
#header #links li:last-of-type{
    border-radius: 0px 10px 10px 0px;
}
#header #links li:has(ul){
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-width: 0px 1px;
    border-color: var(--text-light);
    border-style: dotted;
}
#header #links li ul{
    position: absolute;
    top: 30px;
    padding: 0 1.3em;
    width: 100px;
    visibility: hidden;
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--color-dark-2);
    border-radius: 0px 0px 10px 10px;
}
#header #links li ul a{
    border-width: 1px 0px 0px 0px;
    border-color: var(--text-light);
    border-style: dotted;
    padding: 0.3em 0;
}
#header #links #indexMenu{
    position: relative;
    display: flex;
    flex-direction: column;
}
#header #links #indexMenu:hover ul, #header #links ul:hover{
    visibility: visible;
}
#header #links a{
    font-size: larger;
    color: var(--text-light-transparent);
}
#header #links li:has(a:hover+ul){
    background-color: var(--color-dark-1);
}
#header #links li a:hover{
    color: var(--text-light);
}
footer a{
    font-size: larger;
    opacity: 0.5;
    padding: 0 1em;
    margin: 0 1em;
}
footer a:hover{
    opacity: 1;
}

body {
    background-color: var(--color-dark-1);
    background-image: url(https://64.media.tumblr.com/78caf07a2903c77154c84ad239d5fd79/tumblr_pan5wohWpc1tzr95do1_1280.jpg);
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: 109%;
    display: grid;
    grid-template-columns: 1fr 4fr 1fr;
    grid-template-rows: 1fr 7fr;
    height: 100vh;
    width: 100vw;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
}
footer{
    grid-column: 1 / span 3;
    grid-row: 3;
    z-index: 0;
    background-color: var(--color-dark-2);
    height: 150px;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    box-shadow: var(--text-dark) 1px 1px 12px;
}

nav {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 4em 2em 0 2em;
    font-family: sans-serif;
    font-size: 0.875rem;
}
nav h2{
    width: 100%;
    border-bottom: 1px solid #eaecf0;
    margin-bottom: 0.5em;
    font-size: inherit;
    font-weight: bold;
    font-family: inherit;
}
nav ul{
    padding: 0 16px;
    list-style: inside none;
    margin-bottom: 1em;

}
/* ********************************************************************************** */
/* ********************************************************************************** */
/* articles */
#index,
#profile,
.articles,
.indextable,
.formsection {
    grid-column: 2;
    grid-row: 2;
    z-index: 5;
    position: relative;
    top: 2em;
}
.indextitle {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
    border-bottom: 1px solid var(--color-light-2);
    margin-bottom: 0.5em;
}

.indextitle h1 {
    border: none;
    margin: 0;
}
.articles, .indextable,.formsection{
    padding: 1.5em  2em;
    background-color: var(--color-dark-1);
    border-radius: 10px;
    box-shadow: var(--text-dark) 1px 1px 12px;
}

h1,
h2, h4 {
    font-family: 'Linux Libertine', 'Georgia', 'Times', 'Source Serif Pro', serif;
    font-weight: normal;
    color: var(--color-light-2);
    font-size: 1.8em;
}

#index > h2 {
    border-bottom: 1px solid var(--color-light-2);
    margin-bottom: 0.5em;
    text-shadow: 0px 2px 8px var(--color-dark-1);
}
.listTitle{
    border-bottom: 1px solid var(--color-light-2);
    margin-top: 1em;
}
h4{
    color: var(--text-light);
    font-size: 1.5em;
    text-transform: capitalize;
}
.indexUl{
    color: var(--text-light);
    padding: 0px 30px;
    margin-top: 0.7em;
}
.indexUl li{
    margin-top: 3px;
}
/* articles */
.articleBox{
    display: flex;
    flex-direction: column;
    height: auto;
}
.articleH2{
    padding-top: 0.5em;
    padding-bottom: 0.17em;
    border-bottom: 1px solid #a2a9b1;
    margin: 0.25em 0 0.25em 0;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
}
.articleH2 h2{
    font-size: 1.5em;
}
.articleH3{
    margin: 0.25em 0 0.25em 0;
    padding-top: 0.5em;
    padding-bottom: 0;
    border-bottom: dotted 1px #aaa;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
}
.articleH3 h3{
    font-family: sans-serif;
    font-weight: bold;
    font-size: 1.2em;
    color: var(--color-light-3);
    line-height: 1.6;
    clear: both;
}
.content{
    white-space: pre-line;
    text-align: justify;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 0.5em 0 1em 0;
}
.articleImage{
    border: 1px solid var(--color-light-2);
    padding: 5px;
    margin: 0.5em 1em 0.2em 0em;
    width: max-content;
    float: inline-start;
}
.articleImage div{
    overflow: hidden;
}
td:has(img){
    width: 250px;
    overflow: hidden;
}
td img,
.articleImage div img{
    transform: scale(100%);
    transition: 0.2s;
}
td img:hover,
.articleImage div img:hover{
    transform: scale(105%);
    transition: 0.3s;
    cursor: pointer;
}
td img:active,
.articleImage div img:active{
    transform: scale(108%);
    transition: 0.1s;
}
.fullImage,
.fullArticleImage{
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: var(--color-full-image-background);
    backdrop-filter: blur(10px);
}
.fullImage.hidden,
.fullArticleImage.hidden{
    visibility: collapse;
}
.fullImage .closeBtn,
.fullArticleImage .closeBtn{
    position: absolute;
    top: 02%;
    right: 5%;
    font-size: 2em;
    text-shadow: black 2px 2px 5px;
}
.fullImage .closeBtn:hover,
.fullArticleImage .closeBtn:hover{
    color: rgb(202, 202, 202);
    transform: translateY(-2px);
    text-shadow: black 4px 3px 6px;
    cursor: pointer;
}
.fullImage p,
.fullArticleImage p{
    margin: 0.5em;
}
.articleImage img{
    max-width: 250px;
}
.articleImage div p {
    height: 0px;
    visibility: collapse;
}
.articleImage p {
    max-width: 250px;
    text-align: justify;
    font-size: small;
}

/* ********************************************************************************** */
/* ********************************************************************************** */
/* Index */
#index .boxes, #profile .boxes{
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2em;
    padding: 1em;
    gap: 2em;
    color: var(--text-light);
}
.index-box, .daily-box {
    padding: 1em;
    background: var(--color-dark-2);
    border-radius: 10px;
    box-shadow: var(--text-dark) 0 0 15px;
    width: auto;
    flex-grow: 1;
    max-width: 55%;
    min-height: 231px;
    height: fit-content;
    position: relative;
    overflow: hidden;
}
.daily-box{
    max-width: 80%;
}

.index-box h2, .daily-box h2 {
    font-size: 1.5em;
    font-variant: small-caps;
    letter-spacing: .01em;
    border-bottom: solid var(--color-light-3) 1px;
    margin: 0 0 .5rem 0;
}
.index-box p, .daily-box p{
    margin: 0.5em 0 1em 0;
    font-size: 0.875rem;
    font-style: italic;
    text-align: justify;
    width: auto;
}
.daily-box p:last-of-type{
    margin-bottom: 3em;
}
.index-box ul, .daily-box ul{
    margin-top: 0.3em;
    margin-bottom: 3em;
    -webkit-margin-start: 1.6em;
    -webkit-margin-end: 0;
    margin-inline-start: 1.6em;
    margin-inline-end: 0;
    padding: 0;
    font-size: 0.875rem;
}
.index-box .pages-index, .daily-box .pages-index{
    font-size: 0.875rem;
    position: absolute;
    right: 1.6em;
    bottom: 1em;
}
.dailyLink{
    right: initial;
    left: 1.6em;
}
.daily-box img{
    float: right;
    max-height: 100%;
    margin-left: 0.6em;
    border-radius: 0 0.6em 0.6em 0;
    border-left: .4rem solid var(--color-dark-2);
    max-width: 250px;
}
a{
    color: var(--color-link);
    border-radius: 2px;
    text-decoration: none;
}
a:hover{
    color: var(--color-link-hover);
}
#userQuick{
    text-align: center;
    margin-bottom: 2em;
}
#userQuick a{
    padding: 0.8em 1.5em;
    border-radius: 1em;
    background-color: var(--color-dark-2);
    transition: background-color 0.8s;

}
#userQuick a:hover{
    background-color: var(--color-dark-3);
    transition: background-color 0.2s;
}
.index div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
p{
    color: var(--text-light);
}

/* ********************************************************************************** */
/* ********************************************************************************** */
/* forms */

.formsection{
    grid-column: 2;
    grid-row: 2;
}
.formheader,
.pageheader{
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
    border-bottom: 1px solid var(--color-light-2);
    margin-bottom: 0.5em;
}

.formheader h1,
.pageheader h1 {
    border: none;
    margin: 0;
}

.formsection form{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.formsection form > div{
    width: 90%;
    grid-row-gap: 0.3em;
    grid-column-gap: 0.5em;
}
.formsection form > div > div{
    display: flex;
    flex-direction: column;
    margin: 0.5em;
    margin: 0.5em 0 !important;

}
.userEdit form{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.userEdit form > div{
    /* box-sizing: border-box; */
    width: 100%;
    display: flex;
    flex-direction: column;
    margin: 0.5em 0;
}
.userEdit form > div textarea{
    box-sizing: border-box;
    margin-top: 0.3em;
    width: 100%;
}

.formsection label{
    color: white;
    margin-bottom: 0.2em;
    font-size: large;
}
.formsection div div:has([type="text"]) label,
.formsection div div:has([type="number"]) label,
.formsection div div:has([type="file"]) label,
.formsection div:has(div#characters_OtherNames) label,
.formsection div:has(div#groups_allies) label,
.formsection div:has(div#groups_enemies) label,
.formsection div:has(div#places_aliases) label,
.formsection div:has(div#places_people) label,
.formsection div:has(div#places_imports) label,
.formsection div:has(div#places_exports) label  {
    visibility: collapse;
}
div#characters_OtherNames input{
    margin-bottom: 0.3em;
}
input, select, textarea{
    /* margin: 0.3em; */
    padding: 0.3em 0.5em;
    border: none;
    border-radius: 0.3em;
    outline: 2px solid transparent;
    background-color: var(--color-dark-3);
    font-size: large;
    color: var(--text-light);
}
input:hover, select:hover, textarea:hover{
    transition: outline 0.2s, background-color 0.2s;
    outline: 2px solid var(--color-dark-3);
    background-color: var(--color-dark-2);
    
}
input:focus, textarea:focus{
    transition: outline 0.1s, background-color 0.1s, box-shadow 0.2s;
    border: none;
    outline: 2px solid var(--color-light-2);
    background-color: var(--color-dark-3);
    box-shadow: inset 2px 2px 4px var(--color-dark-2);
}
input[type="file"]{
    padding: 0;
    height: 31.8px;
}
#characters_imageDescription{
    padding: 0 0.5em;
    height: 31.8px;
}
button{
    padding:  0.3em 0.5em;
    margin-top: 0.5em;
    font-size: 1.1em;
    border: none;
    border-radius: 0.3em;
}
input[type="number"]::-webkit-inner-spin-button{
    margin: 0;
}
button,
input[type="file"]::file-selector-button{
    outline: none;
    background-color: var(--color-characters);
    color: var(--text-dark);
    height: 100%;
}
input[type="file"]::file-selector-button{ /* the button to select file */
    margin: 0 0.5em 0 0;
    padding:  0 0.5em;
    border: 0;
}
button:hover,
input[type="file"]::file-selector-button:hover{
    transition: outline 0.2s, background-color 0.2s;
    background-color: #e24272;
    color: var(--text-dark);
}
button:active,
input[type="file"]::file-selector-button:active{
    background: linear-gradient(-25deg,  #d62459 0%, var(--color-characters) 100%);
    color: var(--text-dark);
}
input[type="checkbox"]{
    accent-color: var(--color-characters);
    outline: none;

}
input[type="checkbox"]:hover, input[type="checkbox"]:hover+label{
    color: var(--color-characters);
    opacity: 0.7;
}
input[type="checkbox"]:checked, input[type="checkbox"]:checked+label{
    color: var(--color-characters);
}
#loginForm{
    height: 500px;
    display: flex;
    flex-direction: column;
    background-color: var(--color-dark-1);
    padding: 1em;
    border-radius: 1em;
    position: relative;
}
#loginForm label{
    font-size: 1em;
    visibility: collapse;
}
#loginForm input{
    margin: 0.3em;
    font-size: x-large;
}
#loginForm button.loginBtn{
    height: initial;
}
button.btn{
    background-color: var(--color-light-3);
    padding: 0.5em 2.5em;
    font-size: larger;
    border: none;
    border-radius: 0.3em;
}
button.btn:hover{
    background-color: var(--color-light-2);
}
button.btn:active{
    background: linear-gradient(-45deg, var(--color-light-3) 0%, var(--color-light-2) 100%);
}

#characters_Classes{
    display: grid;
    grid-template-columns: repeat(4, 30px 2fr);
}
 #characters_MemberOf{
    display: grid;
    grid-template-columns: repeat(2, 30px 2fr);
}
#groups_alignement, #places_Type{
    display: grid;
    grid-template-columns: repeat(3, 30px 2fr);
}

#characters_Classes > input,
#characters_MemberOf > input,
#groups_alignement > input,
#places_Type > input{
    margin: 0.4em 0px 0.4em 0.4em;
    max-width: 15px;
}
#characters_Classes > label,
#characters_MemberOf > label,
#groups_alignement > label,
#places_Type > label{
    margin: 0.2em 1em 0.2em 0px;
}

.catChar{
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-row-gap: 0.3em;
    grid-column-gap: 0.5em;
}
.charbod{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

#characters_OtherNames,
#groups_allies, #groups_enemies,
#places_people, #places_aliases, #places_imports, #places_exports{
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-auto-rows: auto;
    grid-row-gap: 0.5em;
    grid-column-gap: 0.5em;
}
div:has(#characters_OtherNames),
div:has(#groups_allies), div:has(#groups_enemies),
div:has(#places_people), div:has(#places_aliases), div:has(#places_imports), div:has(#places_exports){
    margin: 0 0 0.5em 0;
}
#characters_OtherNames div input,
#groups_allies div input, #groups_enemies div input,
#places_people div input, #places_aliases div input, #places_imports div input, #places_exports div input{
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0.3em 0.5em;
}
.charOtherNames div button{
    grid-column: 1 / span 3;
    width: 150px;
    justify-self: center;
    align-self: center;
}

.titldep{
    display: grid;
    grid-template-columns: 5fr 120px;
}
.formimg{
    display: grid;
    grid-template-columns: 120px 5fr;
}
.cont textarea{
    min-height: 250px;
}
.desc textarea{
    min-height: 100px;
}
.catChar div, .titldep div{
    display: flex;
    flex-direction: column;
}
.terms{
    display: flex;
    justify-content: center;
}
.terms div{
    display: flex;
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
    width: 120px;
}
span{
    color: var(--text-light);
}
textarea{
    resize: vertical;
}

/* ********************************************************************************** */
/* ********************************************************************************** */
/* Pages Tables */

#charactersheet, #groupsheet, #placesheet, #objectsheet {
    display: flex;
    width: fit-content;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--color-light-2);
    background-color:var(--color-dark-2);
    float: right;
    margin: 0 0 0.5em 1em;
}

tbody {
    width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0.3em;
}

tr {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin: 0.2em;
    color: var(--text-light);
}
tr:first-of-type{
    margin-top: 0 !important;
}

td, th {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

th[scope="index"] {
    max-width: 150px;
    font-weight: bold;
    justify-content: flex-start;
    font-size: 88%;
    color: var(--color-light-3);
    /* margin-left: 0.3em; */
}

td[scope="info"] {
    justify-content: flex-start;
    line-height: 1.5em;
    font-size: 88%;
    /* margin-right: 0.3em; */
}
.members{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}
.members span{
    margin-right: 0.3em;
}

.part {
    padding: 0.1em;
    font-weight: bold;
}

.entete{
    height: 43px;
    font-size: larger;
    position: relative;
    background-repeat: no-repeat;
    background-size: 40%;
    background-position: 105% -20%;
    background-blend-mode: overlay;
    overflow: hidden;
}
.entete.character{
    background-image: url("../images/site/jocf082lkvdm9b0j744-p1WTf51.svg");
    background-size: 50%;
    background-blend-mode: multiply;
    background-position: 105% 30%;
}
.entete.character span{
    font-family: inherit;
    color: inherit;
    background: linear-gradient(90deg, var(--color-characters) 80%, rgba(255,255,255,0) 100%);
    padding: 15px;
    text-shadow: 2px 0px 6px var(--color-characters);
}
.entete.place.city, .entete.place.guildhouse, .entete.place.tavern{
    background-image: url("../images/site/nf8lrdzjsum9b0kz6e-0zQqud-.svg");
    background-position: 105% 30%;
}
.entete.place.country{
    background-image: url("../images/site/qkde2g1akrm9b1cx5h-kHODepo.svg");
}
.entete.place span{
    font-family: inherit;
    color: inherit;
    background: linear-gradient(90deg, var(--color-places) 69%, rgba(255,255,255,0) 100%);
    padding: 15px;
}
.entete.group{
    background-image: url("../images/site/w81yolhqserm9b0hx4w-s-nB8zf.svg");
    background-position: 105% 50%;

}
.entete.group span{
    font-family: inherit;
    color: inherit;
    background: linear-gradient(90deg, var(--color-groups) 69%, rgba(255,255,255,0) 100%);
    padding: 15px;
    text-shadow: 4px 0px 6px var(--color-groups);

}
#charactersheet .part{
    background-color: var(--color-characters);
    color: var(--text-dark);
}
#groupsheet .part{
    background-color: var(--color-groups);
    color: var(--text-dark);
}
#placesheet .part{
    background-color: var(--color-places);
    color: var(--text-dark);
}
#objectsheet .part{
    background-color: var(--color-objects);
    color: var(--text-dark);
}

/* ********************************************************************************** */
/* ********************************************************************************** */
/* MEDIA QUERIES */

@media only screen and (max-width:1024px) {

    body{
        grid-template-columns: 1fr;
        grid-template-rows: 55px 1fr 7fr;
    }
    #index{
        grid-column: 1;
        grid-row: 3;
        /* top: 0; */
        padding: 20px;
    }
    #index .boxes{
        flex-direction: column;
    }
    .index-box{
        max-width: 100%;
        margin: 0.5em;
        border-width: 2px;
    }
    .index-box h2{
        font-size: 2em;
    }
    .index-box p, .index-box li{
        font-size: 1.5em;
    }
    .index-box .pages-index{
        font-size: 1em;
    }
    
}

.alert{
    text-align: center;
    padding: 0.3em;
    color: var(--text-dark);
    border-radius: 1em;
}
.indexTable .alert, .indextable .alert{
    margin-bottom: 1.3em;
}
.alert-success{
    background-color: cadetblue;
}
.alert-error{
    background-color: tomato;
}