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

.top-bar {
    display: flex;
    gap: 20px;
    padding: 10px;
    align-items: center;
}

.main-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    height: calc(100% - 60px);
}

.left-panel {
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.conv-list {
    height: 350px;
    overflow-y: auto;
    border: 1px solid #ccc;
}

.conv-item {
    padding: 5px;
    cursor: pointer;
}

    .conv-item.selected {
        background-color: #cce5ff;
    }

.doc-list {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #ccc;
    margin-top: 5px;
}

.chat-panel {
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.chat-history {
    flex: 1;
    overflow-y: auto;
}

.chat-row {
    display: flex;
    padding: 5px;
}

    .chat-row.user {
        justify-content: flex-end;
    }

    .chat-row.assistant {
        justify-content: flex-start;
    }

.chat-bubble {
    max-width: 700px;
    padding: 10px;
    border-radius: 10px;
    margin: 5px;
    white-space: pre-wrap;
}

    .chat-bubble.user {
        background: #0084ff;
        color: white;
    }

    .chat-bubble.assistant {
        background: #e5e5e5;
        color: black;
    }

.msg-input {
    width: 100%;
    height: 70px;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #323232;
    color: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.4);
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f7fb;
}

/* Ligne message */
.message-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 18px;
    gap: 10px;
}

    /* Alignement User / Assistant */
    .message-row.user {
        justify-content: flex-end;
    }

    .message-row.assistant {
        justify-content: flex-start;
    }

/* Avatars */
.avatar {
    width: 38px;
    height: 38px;
    font-size: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-user {
    background-color: #007bff;
    color: white;
}

.avatar-assistant {
    background-color: #6c757d;
    color: white;
}

/* Bulles de messages */
.bubble {
    max-width: 60%;
    padding: 12px 18px;
    border-radius: 18px;
    white-space: pre-wrap;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    font-size: 15px;
}

.bubble-user {
    background-color: #007bff;
    color: white;
    border-bottom-right-radius: 4px;
}

.bubble-assistant {
    background-color: white;
    color: #333;
    border-bottom-left-radius: 4px;
}

/* Zone de saisie */
.chat-input {
    padding: 15px;
    border-top: 1px solid #ddd;
    background: white;
}

textarea {
    width: 100%;
    height: 80px;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #ccc;
    resize: none;
    outline: none;
}

button {
    margin-top: 10px;
}
.document-upload {
    margin-top: 10px;
}

.doc-list {
    margin-top: 10px;
    padding: 10px;
    background: #f1f1f1;
    border-radius: 8px;
}

.doc-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

    .doc-item button {
        margin-left: 10px;
    }

