@import url("https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap");

.container {
    display: grid;
    grid-template-areas:
        "header header"
        "navbar navbar"
        "aside content"
        "footer footer";

    gap: 0%;
    grid-template-columns: 20% 80%;
    grid-template-rows: min-content min-content 1fr;
    background-color: #cba6f7;
    height: 100%;
    transition: grid-template-columns 0.3s ease;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

@media (max-width: 1000px) {
    .container {
        grid-template-columns: 15% 85%;
    }
}

@media (max-width: 800px) {
    .container {
        grid-template-columns: 0% 100%;
        grid-template-areas:
            "header header"
            "navbar navbar"
            "aside content"
            "footer footer";
    }

    aside {
        display: none;
    }
}

.container > * {
    padding: 10px 20px;
}

.dialog-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.error {
    margin: 0;
    opacity: 0.8;
    color: red;
}

.article_section :not(h3, h2) {
    line-height: 1.5em;
}

.chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #975af2;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition:
        background-color 0.3s ease,
        transform 0.3s ease;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-button:hover {
    background-color: #ca359a;
    transform: scale(1.1);
}

.chat-popup {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 20em;
    height: 20em;
    background-color: #fafafa;
    border: 2.5px solid #975af2;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    overflow: hidden;
}

.chat-popup iframe {
    padding: 0;
    margin: 0;
    border: none;
    height: inherit;
    width: inherit;
}

#chat {
    flex: 1;
    padding: 0;
    margin: 0;
    list-style: none;
    overflow-y: auto;
}

#chat li {
    border-bottom: 2px solid #975af2;
    padding: 0.8em;
}

#msgInput {
    flex: 1;
    margin: 1em;
    padding: 10px;
    border: 2px solid #975af2;
    border-radius: 5px;
    font-size: 1em;
}

#msgInput:focus {
    outline: none;
}

#chat-submit {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #975af2;
    color: white;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

#chat-submit:hover {
    background-color: #ca359a;
}

.chat-button:hover {
    background-color: #ca359a;
    transform: scale(1.1);
}

html * {
    font-family: Rubik;
}

dialog {
    height: 60%;
    width: 30%;
    border: 4px solid #975af2;
    border-radius: 10px;
    background-color: #fafafa;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    transition: height 0.3s ease;
    transition: width 0.3s ease;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
}
dialog iframe {
    flex-grow: 1;
    border: none;
    margin: 0;
    padding: 0;
}

form {
    display: grid;
    text-align: center;
    gap: 0.5em;
    padding: 0.5em;
}

form label {
    font-size: 1.1em;
    font-weight: bold;
    color: #975af2;
}

#closeRegisterButton,
#closeLoginButton,
form input[type="submit"],
form input[type="reset"] {
    width: 100%;
    padding: 15px 25px;
    border: none;
    border-radius: 5px;
    background-color: #975af2;
    color: white;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition:
        background-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

form input[type="submit"],
form input[type="reset"] {
    width: 40%;
    margin: 0 0.5em;
}

form input {
    margin: 0% 10%;
    padding: 10px;
    border: 4px solid #9fa4b0;
    border-radius: 10px;
    font-size: 1em;
}

form input:focus {
    border: 4px solid #ddd;
    border-color: #975af2;
    outline: none;
}

header {
    grid-area: header;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #b784f4;
    border-bottom: 4px solid #975af2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    height: initial;
    z-index: 1000;
}

#logo {
    position: fixed;
    bottom: 1em;
    right: 1em;
    z-index: 1000;
    display: flex;
    width: 6%;
    height: auto;
    border-radius: 20%;
    border: 4px solid #975af2;
}

@media (max-width: 600px) {
    #logo {
        display: none;
    }

    article h2,
    article h3 {
        text-align: center;
    }

    article h1,
    article #h1_skin_seo {
        font-size: 1.7em;
    }

    #registerButton,
    #loginButton,
    #logoutButton {
        font-size: 1.2em;
        padding: 8px 14px;
    }

    #registerButton::before {
        content: "👤";
    }

    #loginButton::before {
        content: "🔑";
    }

    #logoutButton::before {
        content: "🚪";
    }

    #registerButton span,
    #loginButton span,
    #logoutButton span {
        display: none;
    }
}

#header_title {
    margin: 0;
    padding: 0;
    font-size: 3em;
    font-weight: 900;
    color: #241f31;
    flex-grow: 1;
    text-align: center;
    user-select: none;
}

#registerButton,
#loginButton,
#logoutButton {
    font-weight: bold;
    padding: 15px 20px;
    margin: 0em 1em 0em 0em;
    border: none;
    border-radius: 5px;
    background-color: #975af2;
    color: white;
    cursor: pointer;
    font-size: 1em;
    transition:
        background-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    flex: 1;
    max-width: 20em;
}

#registerButton:hover,
#loginButton:hover,
#logoutButton:hover,
#closeRegisterButton:hover,
#closeLoginButton:hover,
form input[type="submit"]:hover,
form input[type="reset"]:hover {
    background-color: #ca359a;
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

@media (max-width: 1200px) {
    dialog {
        height: 60%;
        width: 50%;
    }
}

@media (max-width: 1000px) {
    dialog {
        height: 70%;
        width: 60%;
    }
}

@media (max-width: 800px) {
    dialog {
        height: 80%;
        width: 70%;
    }
}

@media (max-width: 600px) {
    dialog {
        height: 90%;
        width: 80%;
    }
}

nav {
    grid-area: navbar;
    z-index: 4;
    border-bottom: 4px solid #975af2;
    background-color: #cba6f7;
    font-size: 1.2em;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: font-size 0.3s ease;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
}

nav a {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fafafa;
    padding: 10px 20px;
    border-radius: 15px;
    background-color: rgb(151, 90, 242);
    box-shadow: 0 4px 6px rgba(36, 31, 49, 0.2);
    transition:
        box-shadow 0.3s ease,
        background-color 0.3s ease,
        transform 0.3s ease,
        outline 0.2s ease;
    will-change: box-shadow, background-color, transform, outline;
}

nav a:hover {
    background-color: rgb(202, 53, 154);
    box-shadow: 0 8px 12px rgba(36, 31, 49, 0.3);
    transform: translateY(-5px);
}

nav a:focus-visible {
    outline: solid 4px rgb(202, 53, 154);
}

nav a:focus-visible:hover {
    outline: solid 4px rgb(151, 90, 242);
}

@media (max-width: 800px) {
    nav {
        font-size: 1em;
        text-align: center;
        align-content: center;
    }
}

@media (max-width: 600px) {
    nav {
        text-align: center;
        align-content: center;
    }
    nav ul {
        flex-direction: row;
        flex-wrap: wrap;
    }

    nav a:hover .icon-hover,
    nav a .icon {
        width: 45px;
        height: 45px;
        margin: 0;
    }

    .nav-text {
        display: none;
    }
}

.icon,
.icon-hover {
    width: 35px;
    height: 35px;
    margin-right: 0.5em;
    transition:
        width 0.3s ease,
        height 0.3s ease,
        margin 0.3s ease;
}

.icon-hover {
    display: none;
}

nav a:hover .icon {
    display: none;
}

nav a:hover .icon-hover {
    display: inline;
    vertical-align: middle;
}

aside {
    grid-area: aside;
    z-index: 1;
    font-size: 1.2em;
    font-weight: bold;
    border-right: 4px solid #975af2;
    background-color: #d6baf9;
    overflow-y: auto;
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.2);
    color: #975af2;
}

aside a {
    color: #ca359a;
}

aside a:visited {
    color: #975af2;
}

article {
    grid-area: content;
    background-color: #ced2da;
    overflow-y: auto;
    color: #241f31;
    font-weight: 420;
}

article img {
    max-width: 90%;
    height: auto;
    display: block;
    margin: 0 auto;
    box-shadow: 0 0 20px 5px rgba(0, 0, 0, 0.5);
    border-radius: 15px;
}

article h1 {
    text-align: center;
    background-color: #9fa4b0;
    padding: 1rem;
    color: #975af2;
    border-radius: 15px;
}

#h1_skin_seo {
    font-size: 2em;
    text-align: center;
    background-color: #9fa4b0;
    padding: 1rem;
    color: #975af2;
}

article h2 {
    background-color: #a1a8b4;
    padding: 0.5em 1rem;
    color: #d965e4;
    border-radius: 15px;
}

article h3 {
    background-color: #b0b6c3;
    padding: 0.5em 1rem;
    color: #e05b9e;
    border-radius: 15px;
}

article a {
    color: #ca359a;
    background-color: #fafafa;
    padding: 0.1em 0.3em;
    border-radius: 8px;
    text-decoration: none;
}

article a:hover {
    text-decoration: underline;
}

article a:visited {
    color: #ac85f5;
}

article p {
    text-align: justify;
    padding: 0em 1em;
}

article table {
    width: 95%;
    border-collapse: collapse;
    margin: 1em auto;
    font-size: 1em;
}

article table,
article th,
article td {
    border: 4px solid #9fa4b0;
}

article th,
article td {
    padding: 12px;
    text-align: left;
}

article th {
    background-color: #ebedf0;
    color: #975af2;
}

article tr:nth-child(even) {
    background-color: #ebedf0;
}

article tr:hover {
    background-color: #cba6f7;
}

footer {
    grid-area: footer;
    z-index: 2;
    text-align: center;
    background-color: #cba6f7;
    color: #fafafa;
    padding: 20px;
    font-size: 1.2em;
    font-weight: bold;
    border-top: 4px solid #975af2;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.2);
}

footer a {
    color: inherit;
    text-decoration: none;
}

footer a:hover {
    color: #975af2;
}

.separateur {
    padding: 0em 0.3em 0em 0.3em;
}

#summary {
    list-style: none;
    padding: 0em 0.5em;
    margin-top: 1em;
    border-left: 4px solid #975af2;
}

#summary ul {
    list-style: none;
    margin-left: 0.5em;
    padding-left: 0.5em;
    border-left: 3px solid #975af2;
}

#summary > li:not(:last-child) {
    padding-bottom: 1em;
}

#summary_title {
    text-align: center;
}

#summary a {
    text-decoration: none;
}

#main_content {
    font-size: 120%;
    transition: font-size 0.3s ease;
}

@media (max-width: 600px) {
    #main_content {
        font-size: 100%;
    }
}
