/*body{*/
/*    background: linear-gradient(45deg, rgb(69, 69, 69) 0%, rgb(22, 0, 54) 100%);*/
/*    background-repeat: no-repeat;*/
/*    background-attachment: fixed;*/
/*    padding: 2em;*/
/*    font-family: Roboto, serif;*/
/*    color: lightgrey;*/
/*    display: flex;*/
/*    flex-direction: column;*/
/*    align-items: center;*/
/*    min-height: 100vh;*/
/*    max-height: 100vh;*/
/*    height: 100vh;*/
/*    overflow: clip;*/
/*}*/

html{
    background-image: linear-gradient(45deg, rgb(47, 44, 54), rgb(49, 29, 61));
}
html, body {
    height: inherit;
}

/*#chat::before  {*/
/*    display: block;*/
/*    content: '';*/
/*    !*background-image: url('https://moodle.iutv.univ-paris13.fr/img/bjs2/chat2.svg');*!*/
/*    width: 200px;*/
/*    height: 135px;*/
/*    position: absolute;*/
/*    z-index: -1;*/
/*    top: -10px;*/
/*    left: 140px;*/
/*    animation: 20s infinite alternate animchat;*/
/*}*/

#bas{
    padding: 0 2em 1em;
    display: flex;
    justify-content: space-between;
}

#haut{
    padding: 1em 2em;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    #title {
        gap: 2em;
        h2{
            font-size: larger;
            margin: 0.3em 0 0;
        }
    }

}
#pseudo,#title{
    display: flex;
    flex-direction: row;
    align-items: center;
}

input#nom, input#changer-nom {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
    outline: none;
    padding: .6em 1em;
    border: 1px solid transparent;
    border-radius: 10px;
    transition: 0.2s;
}

input#nom {
    margin-left: 1em;
    &:focus,&:-webkit-autofill{
        outline: none;
        border: none;
        border: 1px solid lavender;
        box-shadow: 0 0 5px lavender !important;
        transition: 0.2s;
    }
    &:hover{
        box-shadow: 0 0 2px lavender;
    }
}
input#changer-nom {
    cursor: pointer;
    &:hover{
        background-color: rgba(255, 255, 255, 0.1);
    }
}

#nom {
    padding: .58em;
    margin-right: .5em;
}

#reinitialiser {
    display: none;
}

.mainchat{
    display: flex;
    justify-content: center;
    height: calc(100vh - 64px);
}
#chat{
    position: relative;
    background-color: rgba(0, 0, 0, 0.2);
    width: 85%;
    margin: 0.1em 1em;
    border-radius: 10px;
    /*box-shadow: 0 6px 8px rgba(0,0,0,.3);*/
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: scroll;
}

#messages{
    padding: .5em 2em 1em;
    height: 100%;
    max-height: 100%;
    /*min-height: 10em;*/
    overflow-y: scroll;
    word-wrap: break-word;
}

.message{
    position: relative;
    background-color: rgba(0, 0, 0, 0.14);
    border-left: 1px solid rgba(247, 193, 247, 0.5);
    margin: 0;
    padding: 0.5em 1em;
    transition: 0.2s;
    p, h1, h2, h3{
        margin: 0;
    }
}

.message.a-moi{
    background-color: rgba(0, 0, 0, 0.1);
    text-align: left;
    border-left: 1px solid #c6ff80;
}
.message.a-moi .nom{
    color: #c6ff80;
}
#message>div {
    &:hover{
        background-color: rgba(255, 255, 255, 0.1);
    }
}

.nom{
    position: relative;
    color: #f7c1f7;
    font-size: 0.9em;
    top: -.3em;
    &:after {
        font-size: 0.8em;
        padding-left: 1em;
        content: attr(date);
        color: gray;
    }
}

.systeme {
    border-left: 1px solid transparent;
    text-align: center;
    background-color: rgba(10, 0, 20, 0.15);

    &:first-child {
        background: linear-gradient(0deg, rgba(148, 0, 211, 0.1) 0%, transparent 80%);
        border-bottom: 1px solid darkviolet;
        margin-bottom: 1em;
    }
    .nom{
        font-weight: bold;
        color: blueviolet;
    }
}

.mistral {
    background-color: rgba(0, 0, 0, 0.14);
    border-left: 1px solid rgb(166, 230, 255);
    .nom {
        color: #A6E6FF;
        &::before {
            margin-right: 0.8em;
            font-size: 0.8em;
            padding: 0.2em 0.5em;
            border-radius: 6px;
            background-color: rgba(166, 230, 255, 0.2);
            content: "BOT";
            color: white;
        }
    }
}

.ia {
    background-color: rgba(166, 230, 255, 0.1);
    border-radius: 6px;
    color: #A6E6FF;
    padding: 0 0.2em;
}
.texte code {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 5px;
    font-family: "JetBrains Mono", monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}


.inputtxt {
    background-color: rgba(255, 255, 255, 0.04);
    width: 100%;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    border: 1px solid transparent;
    transition: 0.2s;
    /*overflow: hidden;*/

    #texte,#envoyer{
        font-size: larger;
        color: white;
        background: transparent;
        outline: none;
        border: none;
        transition: 0.2s;
    }
    #texte {
        padding: .6em;
        /*flex-grow: 1;*/
        min-width: 0;
    }
    #envoyer {
        padding: .6em .8em;
        border-radius: 10px;
        cursor: pointer;
        &:hover{
            background-color: rgba(255, 255, 255, 0.1);
        }
    }
}
.inputtxt:hover {
    border-color: rgba(230, 230, 250, 0.3);
}
.inputtxt:focus-within {
    border-color: lavender;
    box-shadow: 0 0 4px lavender !important;
}

/*input[type=button],#envoyer{*/
/*    font-size: large;*/
/*    padding: 0.2em 0.7em;*/
/*    background-color: transparent;*/
/*    border: 1px solid dimgrey;*/
/*    border-radius: 10px;*/
/*    color: white;*/
/*    transition: 0.3s;*/
/*    margin: 0;*/
/*    cursor: pointer;*/
/*    &:hover{*/
/*        background-color: rgba(255, 255, 255, 0.1);*/
/*        transition: 0.3s;*/
/*    }*/
/*}*/
/*#envoyer{*/
/*    padding: 0.2em 0.7em;*/
/*}*/

@keyframes animchat{
    0% {
        top: -10px;
    }
    47% {
        top: -10px;
    }
    50% {
        top: -20px;
    }
    53% {
        top: -10px;
    }
    95% {
        transform: rotate(0deg);
    }
    97% {
        transform: rotate(10deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@media (max-width: 1450px) {
    .mainchat{
        width: 100%;
        height: calc(100vh - 64px);
        max-height: 89.4vh;
        #haut {
            #title,#pseudo {
                * {
                    /*font-size: x-large;*/
                }
            }
            #statut {
                display: none;
            }
        }
        #chat {
            width: 100%;
            margin: 0;
            border-radius: 0;
        }
        #messages {
            padding: .5em 1em 1em;
            *{
                /*font-size: xx-large;*/
            }
        }
    }
    .inputtxt {
        /*font-size: 2.5em;*/
        touch-action: manipulation;
    }

    #bas{
        padding: 0 1em 1em;
    }
    .message:first-child {
        border-bottom-width: 3px;
    }
    #pseudo {
        flex-direction: column;
        align-items: start;
        gap: 10px;
        #nom,#changer-nom {
            margin: 0;
            /*font-size: 0.8em;*/
            touch-action: manipulation;
        }
    }
    .ham-screen-menu.menu-profil h2{
        margin-bottom: 0 !important;
    }
}
