html, body {
    scroll-behavior: smooth;
    font-size: 0.9em;
}

html, body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* pour scroll fluide iOS */
}

body, p {
    margin: 0;
}

p, ul li {
    margin: 10px 0;
}

p, li {
    line-height: 1.5em;
}

img {
    max-width: 100%;
    border-radius: 3px;
}

a {
    text-decoration: none;
    border-bottom: 2px dashed transparent;
    transition: border-color 0.3s linear;
}

a:hover:not(.button) {
    border-bottom: 2px dashed;
}

h1, h2 {
    text-transform: uppercase;
    margin: 0 0 15px 0;
}

h2 {
    margin: 15px 0;
}

header, footer, main {
    max-width: 920px;
    margin: 0 auto;
}

main {
    border-radius: 0 0 4px 4px;
}

main > section {
    padding: 15px;
}

.site-footer, .stats-bar, .header-content, .card {
    padding: 15px;
}

.header-content {
    padding-top: 0;
    padding-bottom: 0;
}

.site-header {
    position: relative;
}

body.connected .site-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
}

.alert, .flash, .bloc, .quote-ia, ul.list-messages li.log, ul.list-messages li,
.image-wrapper .label, .image-wrapper .card-title, table th, table td {
    padding: 15px;
}

.form, .pagination, table, .page_chat ul.list-messages li {
    padding: 10px 0;
}

.pagination a {
    margin: 0 15px;
}

.bloc, .quote-ia, .console-link, .alert {
    margin: 15px 0;
}

.site-nav a, button, .button, input, select {
    display: inline-block;
    padding: 10px 15px;
    font-size: 1em;
    margin: 15px 0;
}

.centered, .site-footer {
    text-align: center;
}

.tooltip {
    cursor: help;
}

.transparent {
    opacity: 0.2;
}

.site-header {
    border: 1px solid;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 1.5em;
}

section .site-title a:hover, section .console-link:hover, .avatar-link{
    border-bottom-color: transparent !important;
}

.site-nav {
    position: relative;
}

.site-nav ul {
    display: flex;
    gap: 20px;
}

.site-nav a {
    font-weight: bold;
    transition: color 0.2s ease;
}

.site-nav a.active:not(.button) {
    border-bottom: 2px solid;
}

.button, button {
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.button:disabled, button:disabled {
    background-color: transparent;
    cursor: not-allowed;
}

input, select {
    border-radius: 4px;
}

.stats-bar {
    border-top: 1px solid;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 0;
}

.stats-bar div {
    flex: 1 1 auto;
    text-align: center;
    white-space: nowrap;
}

.table {
    border-radius: 10px;
    width: 100%;
}

.table thead th {
    text-align: left;
}

.table td {
    border-bottom: 1px solid;
}

tr.top1, tr.you {
    font-weight: bold;
}

.bloc {
    border-radius: 5px;
}

.bloc h3 {
    margin-top: 0;
}

.bloc ul {
    margin: 0;
}

.alert {
    text-align: right;
}

.flash {
    text-align: center;
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
}

.flash.fade-out {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
    padding: 0;
    margin: 0;
    pointer-events: none;
}

.timestamp, .card .label, table {
    font-size: 0.9em;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 12px #00000080;
}

.card p {
    margin: 0;
}

.card h3 {
    text-transform: uppercase;
    margin: 0;
}

ul.list-messages li .timestamp, .muted,
.card .label, .card.locked,
.card.locked::after, .help {
    opacity: .5;
}

.card .muted, .card label {
    text-align: right;
}

.card.locked {
    pointer-events: none;
    position: relative;
    cursor: not-allowed;
}

.card.locked::after {
    content: "🔒";
    position: absolute;
    top: 8px;
    right: 8px;
}

ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.page_help ul {
    margin: 25px 0;
}

.page_help ul li:before {
    content: "> "
}

.page_help .index ul {
    list-style: none;
    padding-left: 15px;
    margin-bottom: 25px;
}

ul.list-messages li {
    display: block;
    border-left: 3px solid transparent;
    transition: all 0.2s ease-in-out;
}

ul.list-messages li .timestamp,
ul.list-messages li .muted {
    display: block;
}

ul.list-messages > li:not(:last-child) {
    border-bottom: 1px dashed;
}

ul.list-messages li.log {
    border-left: 4px solid;
}

.page_chat ul.list-messages li .avatar {
    height: 40px;
    opacity: .4;
    border-radius: 5px;
    transition: opacity 0.2s linear;
}

.page_chat ul.list-messages li.you .avatar,
.page_chat ul.list-messages li:hover .avatar{
    opacity: .8;
}

.image-wrapper {
    position: relative;
    display: inline-block;
    overflow: hidden;
    margin: 0 auto 15px auto;
    border-radius: 3px;
    width: 90%;
    font-size: .8em;
}

.image-wrapper img {
    height: 100%;
    width: 100%;
}

.image-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
}

.image-wrapper .label,
.image-wrapper .card-title {
    position: absolute;
    top: 0;
    right: 0;
}

.image-wrapper .card-title {
    height: 30%;
    top: initial;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, #000000, transparent);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
    font-size: 2em;
}

.image-wrapper .card-title h3 {
    font-weight: normal;
    flex: 0 0 60%;
    margin: 0;
}

.image-wrapper .card-title .qty {
    text-align: right;
    align-self: flex-end;
}

.console-link {
    display: inline-block;
}

.console-link .cursor {
    animation: blink 1s infinite steps(1, start);
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

hr {
    border: none;
    height: 0;
    width: 30%;
    margin: 5px auto;
}

.quote-ia {
    text-align: right;
    font-style: italic;
}

.columns {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.columns > * {
    flex: 1 1 300px;
}

.blurred-data {
    filter: blur(3px);
}

.error.requirement {
    margin-top: 1rem;
}

.filter-bar, .inline-form {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
    line-height: 30px;
}

.inline-form.centered {
    justify-content: center;
}

.page_register form #code {
    max-width: 40px;
}

.xs-hide {
    display: none;
}

.menu-toggle {
    display: block;
    position: relative;
    z-index: 992;
}

.site-nav ul {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
}

.site-nav ul.open {
    display: flex;
    top: 0;
    gap: 0;
}

.site-nav ul.open li {
    text-align: center;
    border-bottom: 1px solid;
    margin: 0;
}

.site-nav ul.open li a {
    display: block;
    border-bottom: none !important;
}

.button.btn-action-mini {
    text-align: center;
    background-color: transparent;
    opacity: .8;
    padding: 5px 10px;
    margin: 10px;
}

h3{
    text-transform: uppercase;
}

.page_report .report-container{
    background: rgba(75, 85, 99, 0.15);
    border: 1px dashed #4b5563;
    margin: 25px 0;
    border-radius: 3px;
}

.page_report .report-container .alert {
    margin-left: -10px;
}

.page_report .report-container .columns.part div{
    padding: 0 15px 15px;
}

.page_profile .avatar{
    max-width: 150px;
}

.float-right{
    float: right;
}

.two-columns {
    display: flex;
    width: 100%;
}

.page_profile .two-columns{
    align-items: center;
}

.two-columns .column {
    /* plus de display: flex ici */
    padding: 0; /* à adapter si besoin */
}

.two-columns .column:first-child {
    flex: 0 0 auto;
}

.two-columns .column:last-child {
    flex: 1;
    padding-left: 25px;
}

.two-columns.unversed .column:first-child {
    flex: 1;
    padding-left: 0;
}

.two-columns.unversed .column:last-child {
    flex: 0 0 auto;
    padding-left: 0;
}

form.form label{
    display: block;
}

#backToTop {
    position: fixed;
    bottom: 15px;
    right: 15px;
    z-index: 98;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#backToTop.visible {
    opacity: .5;
    pointer-events: auto;
}

.notification-container {
    position: relative;
    display: inline-block;
}

.unread {
    margin-right: -10px;
    margin-left: 5px;
    border-radius: 20px;
    padding: 0.35em 0.6em;
    font-size: 0.75em;
    font-weight: bold;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}



.nav-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 20px 0;
    padding: 0;
    list-style: none;
    opacity: .7;
}

.nav-tabs li {
    margin: 0;
}

.nav-tabs a {
    display: block;
    padding: 10px 15px;
    border-radius: 3px;
    border: 1px solid;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-tabs a:hover {
    border-bottom: 1px solid;
}

@media (min-width: 768px) {

    .nav-tabs {
        flex-direction: row;
        gap: 1rem;
        border-bottom: 2px solid;
    }

    .nav-tabs a {
        width: auto;
        border-radius: 3px 3px 0 0;
        border-bottom: none;
        background-color: transparent;
    }

    .nav-tabs a:hover {
        border-bottom: none;
    }

    .unread {
        margin: 0;
        position: absolute;
        right: -10px;
        top: -3px;
    }

    form.form label{
        display: inline-block;
    }

    .xl-hide {
        display: none;
    }

    html, body {
        font-size: 0.92em;
    }

    main > section {
        padding: 40px;
    }

    .site-footer, .stats-bar, .header-content {
        padding: 15px 40px;
    }

    .button.btn-action-mini {
        padding: 3px 7px;
        margin: 3px;
    }

    .image-wrapper {
        width: 100%;
    }

    .xs-hide {
        display: inline-block;
    }

    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .image-wrapper .card-title {
        font-size: 1.3em;
    }

    .page_chat input {
        width: 70%;
    }

    .menu-toggle {
        display: none;
        background: none;
        border: none;
        cursor: pointer;
    }

    .site-nav ul.nav-links {
        display: flex;
        gap: 20px;
        flex-direction: row;
        position: relative;
        background: transparent;
    }

    .site-nav ul.nav-links li {
        text-align: inherit;
        padding: inherit;
        border-bottom: 0;
    }

    .site-nav ul.nav-links li a {
        padding: 5px 3px;
        display: inline-block;
        width: inherit;
        margin: 0;
    }
}