/* style.css - Styles pour l'interface chat MCP */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF6B35;
    --secondary-color: #004E89;
    --bg-color: #F7F7FF;
    --text-color: #1A1A2E;
    --border-color: #E0E0E0;
    --success-color: #10B981;
    --error-color: #EF4444;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.status {
    display: inline-block;
    margin-left: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.2);
}

.status.connected {
    background: var(--success-color);
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    overflow-y: auto;
}

.sidebar h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.command-list {
    list-style: none;
    margin-bottom: 2rem;
}

.command-list li {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-color);
    border-radius: 4px;
    font-size: 0.875rem;
}

.command-list code {
    color: var(--secondary-color);
    font-family: 'Courier New', monospace;
}

.stats {
    margin-top: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-color);
    border-radius: 4px;
}

.stat-label {
    font-size: 0.875rem;
    color: #666;
}

.stat-value {
    font-weight: 600;
    color: var(--primary-color);
}

/* Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    gap: 0.75rem;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
}

.message-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.message-sender {
    font-weight: 600;
    color: var(--secondary-color);
}

.message-time {
    font-size: 0.75rem;
    color: #999;
}

.message-text {
    color: var(--text-color);
    line-height: 1.5;
    word-wrap: break-word;
}

.message.system .message-avatar {
    background: #6B7280;
}

.message.system .message-text {
    color: #6B7280;
    font-style: italic;
}

.message.mcp .message-avatar {
    background: var(--secondary-color);
}

.message.command .message-text {
    font-family: 'Courier New', monospace;
    background: var(--bg-color);
    padding: 0.5rem;
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
}

/* Typing Indicator */
.typing-indicator {
    padding: 0 1.5rem 0.5rem;
    font-size: 0.875rem;
    color: #999;
    font-style: italic;
}

/* Input Form */
.input-form {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: white;
}

.input-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.input-form input:focus {
    border-color: var(--primary-color);
}

.input-form button {
    padding: 0.75rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.input-form button:hover {
    background: #E55A2B;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
}

.modal-content button[type="submit"] {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 1rem;
}

.modal-content button[type="submit"]:hover {
    background: #E55A2B;
}

/* Scrollbar */
.messages::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.messages::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.messages::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
    background: #CCC;
    border-radius: 4px;
}

.messages::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
}
