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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #1b2b3b 0%, #050811 60%, #020308 100%);
    color: #e9f3ff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header cohérent avec le hub */
.tl-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #0b1c2b;
    border-bottom: 1px solid #1f3a4f;
    gap: 20px;
}

.tl-logo {
    font-family: "Press Start 2P", monospace;
    font-size: 14px;
    color: #00e5ff;
    letter-spacing: 2px;
}

.tl-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.tl-nav a {
    color: #cfe7ff;
    text-decoration: none;
}

.tl-nav a:hover {
    color: #ffffff;
}

.tl-nav-current {
    color: #00e5ff;
    font-weight: 600;
}

.tl-user {
    font-family: "Press Start 2P", monospace;
    font-size: 11px;
    color: #00e0ff;
    white-space: nowrap;
}

/* Container principal */
.tchat-container {
    flex: 1;
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Header tchat */
.tchat-header h1 {
    font-family: "Press Start 2P", monospace;
    font-size: 18px;
    color: #00e5ff;
    margin-bottom: 8px;
}

.tchat-header p {
    font-size: 14px;
    color: #cfe7ff;
    margin-bottom: 12px;
}

/* Bar de salons */
.tchat-channel-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.channel-btn {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #1f3a4f;
    background: #050811;
    color: #cfe7ff;
    font-size: 12px;
    cursor: pointer;
    transition: 0.15s ease;
}

.channel-btn.active {
    border-color: #00e5ff;
    color: #00e5ff;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

.channel-btn:hover {
    color: #ffffff;
}

/* Zone principale tchat */
.tchat-main {
    background: rgba(5, 12, 24, 0.95);
    border-radius: 14px;
    border: 1px solid #1f3a4f;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Messages */
.tchat-messages {
    padding: 14px 16px;
    height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Un message */
.tchat-message {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    font-size: 13px;
}

.tchat-meta {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 2px;
}

.tchat-pseudo {
    font-weight: 600;
    color: #00e5ff;
}

.tchat-time {
    font-size: 11px;
    color: #7fa0c0;
}

.tchat-text {
    background: #050811;
    border-radius: 10px;
    padding: 6px 10px;
    border: 1px solid #1f3a4f;
    color: #e9f3ff;
    word-wrap: break-word;
}

/* Formulaire */
.tchat-form {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #1f3a4f;
    background: #050811;
}

.tchat-form input {
    flex: 1;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid #1f3a4f;
    background: #020308;
    color: #e9f3ff;
    font-size: 13px;
}

.tchat-form input::placeholder {
    color: #7fa0c0;
}

.tchat-form button {
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #00e5ff, #ff00ff);
    color: #050811;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
    transition: 0.15s ease;
}

.tchat-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.7);
}

/* Footer */
.tl-footer {
    text-align: center;
    padding: 16px;
    font-size: 13px;
    color: #7fa0c0;
    border-top: 1px solid #1f3a4f;
    background: #050811;
}

/* Portrait */
@media (orientation: portrait) {
    .tchat-messages {
        height: 320px;
    }
}
/* Messages envoyés par soi-même */
.tchat-message.self .tchat-text {
    background: #001a22;
    border-color: #00e5ff;
}

.tchat-message.self .tchat-pseudo {
    color: #7df9ff;
}
