/* ===========================================================
   STYLE GLOBAL
=========================================================== */

:root {
    --bg-dark: #050a18;
    --bg-dark-2: #0a0f1d;
    --bg-card: #111827;
    --bg-card-2: #1f2937;

    --text: #dbeafe;
    --text-light: #9ca3af;

    --border: rgba(59,130,246,0.25);

    --blue: #3b82f6;
    --blue-light: #60a5fa;
    --red: #dc2626;
    --green: #22c55e;

    --radius: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-dark);
    color: var(--text);
    font-family: "Segoe UI", Roboto, sans-serif;
    padding-bottom: 60px;
}

/* ===========================================================
   HEADER
=========================================================== */

header {
    background: #0f172a;
    border-bottom: 1px solid var(--border);
    padding: 14px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header nav a {
    color: var(--text-light);
    text-decoration: none;
    margin-right: 18px;
    font-weight: 500;
    transition: .2s;
}

header nav a:hover,
header nav .active {
    color: var(--blue-light);
}

.user-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.role-badge {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: var(--blue);
    color: white;
}

/* ===========================================================
   CARDS
=========================================================== */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 20px;
}

/* ===========================================================
   INPUTS / SELECT / TEXTAREA
=========================================================== */

input, select, textarea {
    background: #0d1324;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: var(--radius);
    padding: 9px 12px;
    color: var(--text);
    width: 100%;
}

textarea {
    resize: vertical;
    min-height: 70px;
}

button, .btn {
    padding: 8px 16px;
    border-radius: var(--radius);
    background: var(--blue);
    border: none;
    color: white;
    cursor: pointer;
    transition: .2s;
}

button:hover,
.btn:hover {
    background: var(--blue-light);
}

/* ===========================================================
   CHAT GLOBAL
=========================================================== */

.chat-container {
    display: flex;
    gap: 20px;
}

.chat-left {
    width: 250px;
}

.chat-main {
    flex: 1;
}

.message-box {
    padding: 10px;
    background: var(--bg-dark-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
}

.message-author {
    font-weight: 600;
    color: var(--blue-light);
}

.message-time {
    font-size: 12px;
    opacity: .6;
}

/* ===========================================================
   MINI TCHAT PRIVÉ
=========================================================== */

.private-chat-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: var(--radius);
}

.private-user {
    padding: 8px 12px;
    border-radius: var(--radius);
    background: #0f172a;
    margin-bottom: 8px;
}

/* ===========================================================
   PROFIL PAGE
=========================================================== */

.profile-header {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.profile-label {
    opacity: .75;
    font-size: 13px;
    margin-bottom: 4px;
}

.profile-value {
    font-size: 15px;
}

/* ===========================================================
   MODIFIER PROFIL
=========================================================== */

.profile-section-title {
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
}

.multi-select {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.multi-select label {
    background: #1e293b;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 12px;
    cursor: pointer;
}

.multi-select input {
    display: none;
}

.multi-select input:checked + span {
    background: var(--blue);
    color: white;
}

/* ===========================================================
   FOOTER
=========================================================== */

footer {
    margin-top: 40px;
    text-align: center;
    opacity: .6;
    font-size: 13px;
}

body {
    background: #050816;
    color: #e5ecff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.chat-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
    align-items: flex-start;
}

.chat-sidebar {
    background: #0b1220;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.chat-sidebar-title {
    font-size: 1.1rem;
    margin-bottom: .75rem;
    font-weight: 600;
}

.online-users-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: .9rem;
}

.online-users-list .empty {
    opacity: .6;
}

.online-user {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .4rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, transform .15s;
}

.online-user:hover {
    background: rgba(59,130,246,0.15);
    transform: translateY(-1px);
}

.status-dot {
    width: .55rem;
    height: .55rem;
    border-radius: 999px;
    display: inline-block;
}

.status-online { background: #22c55e; }
.status-busy   { background: #f97316; }
.status-offline{ background: #6b7280; }

.role-badge {
    margin-left: auto;
    font-size: .65rem;
    text-transform: uppercase;
    padding: .1rem .35rem;
    border-radius: 999px;
    background: rgba(148,163,184,0.2);
}

.role-admin   { background: #b91c1c; color: #fee2e2; }
.role-modo    { background: #7c3aed; color: #ede9fe; }
.role-user    { background: #1d4ed8; color: #dbeafe; }
.role-invite  { background: #0369a1; color: #e0f2fe; }

.chat-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-card {
    background: radial-gradient(circle at top left, #111827, #020617 60%);
    border-radius: 12px;
    padding: 1rem 1.2rem 1.1rem;
    box-shadow: 0 18px 40px rgba(15,23,42,0.9);
    border: 1px solid rgba(148,163,184,0.25);
}

.chat-card-title {
    margin: 0 0 .7rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.chat-subtitle {
    margin-top: -.2rem;
    font-size: .85rem;
    opacity: .7;
}

.chat-private-target {
    font-size: .9rem;
    margin: .4rem 0 .6rem;
    opacity: .85;
}

.chat-messages {
    height: 220px;
    background: rgba(15,23,42,0.9);
    border-radius: 10px;
    border: 1px solid rgba(30,64,175,0.6);
    padding: .6rem .75rem;
    overflow-y: auto;
    font-size: .9rem;
    margin-bottom: .7rem;
}

.chat-messages-private {
    height: 160px;
}

.chat-form {
    display: flex;
    gap: .6rem;
    align-items: center;
    margin-bottom: .4rem;
}

.chat-input {
    flex: 1;
    padding: .5rem .7rem;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.5);
    background: rgba(15,23,42,0.9);
    color: #e5ecff;
    outline: none;
    font-size: .9rem;
}

.chat-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59,130,246,0.35);
}

.chat-input-textarea {
    border-radius: 10px;
    resize: vertical;
    min-height: 52px;
}

.btn-primary {
    border: none;
    border-radius: 999px;
    padding: .45rem .95rem;
    font-size: .9rem;
    font-weight: 600;
    background: linear-gradient(135deg,#3b82f6,#2563eb);
    color: white;
    cursor: pointer;
    box-shadow: 0 12px 25px rgba(37,99,235,0.35);
    transition: transform .12s, box-shadow .12s, filter .12s;
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(37,99,235,0.45);
    filter: brightness(1.07);
}

.chat-commands {
    font-size: .8rem;
    opacity: .7;
    margin: .1rem 0 0;
}

.chat-commands code {
    background: rgba(15,23,42,0.9);
    padding: .1rem .3rem;
    border-radius: 999px;
    border: 1px solid rgba(51,65,85,0.9);
}

/* Profil / tags / inputs (pour que modifier_profil soit joli aussi) */

.card.profile-card {
    max-width: 720px;
    margin: 0 auto;
    background: #020617;
    border-radius: 14px;
    padding: 1.5rem 1.7rem;
    border: 1px solid rgba(148,163,184,0.3);
    box-shadow: 0 20px 50px rgba(15,23,42,0.9);
}

.page-title {
    font-size: 1.4rem;
    margin-bottom: .4rem;
}

.link-purple {
    color: #a855f7;
    text-decoration: none;
    font-size: .9rem;
}
.link-purple:hover { text-decoration: underline; }

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: .25rem;
    font-weight: 500;
    font-size: .9rem;
}

.form-control {
    width: 100%;
    padding: .5rem .7rem;
    border-radius: 8px;
    border: 1px solid rgba(148,163,184,0.6);
    background: rgba(15,23,42,0.9);
    color: #e5ecff;
    font-size: .9rem;
}

.radio-group label {
    margin-right: 1rem;
    font-size: .88rem;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.tag-btn {
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.7);
    background: transparent;
    color: #e5ecff;
    padding: .15rem .6rem;
    font-size: .8rem;
    cursor: pointer;
    transition: background .15s, transform .1s, border-color .15s;
}

.tag-btn:hover {
    background: rgba(59,130,246,0.15);
    transform: translateY(-1px);
}

.tag-active {
    background: #3b82f6;
    border-color: #2563eb;
}
