:root {
    --bg: #0f172a;
    --surface: #1e293b;
    --primary: #3b82f6;
    --argos: #8b5cf6;
    --demeter: #22c55e;
    --hermes: #f59e0b;
    --mercure: #ef4444;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
}

.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 800px;
    margin: 0 auto;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
}

.status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.online { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.dot.offline { background: #ef4444; }
.dot.pending { background: #f59e0b; animation: pulse 1.5s infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Chat */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    gap: 0.75rem;
    max-width: 85%;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.system {
    align-self: center;
    max-width: 100%;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.message.argos .avatar { background: var(--argos); }
.message.demeter .avatar { background: var(--demeter); }
.message.hermes .avatar { background: var(--hermes); }

.bubble {
    padding: 0.875rem 1rem;
    border-radius: 1rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.message.user .bubble {
    background: var(--primary);
    border-bottom-right-radius: 0.25rem;
}

.message.argos .bubble {
    background: var(--surface);
    border: 1px solid var(--argos);
    border-bottom-left-radius: 0.25rem;
}

.message.demeter .bubble {
    background: var(--surface);
    border: 1px solid var(--demeter);
    border-bottom-left-radius: 0.25rem;
}

.message.system .bubble {
    background: rgba(255,255,255,0.05);
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: block;
}

/* Validation buttons */
.validation .bubble {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--hermes);
}

.buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.buttons button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-yes { background: #22c55e; color: white; }
.btn-no { background: #ef4444; color: white; }
.btn-precise { background: var(--surface); color: var(--text); border: 1px solid var(--border); }

.buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Input area */
.input-area {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.input-message {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.input-message:focus {
    border-color: var(--primary);
}

.btn-mic, .btn-send {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.2s;
}

.btn-mic { background: var(--surface); border: 1px solid var(--border); }
.btn-send { background: var(--primary); color: white; }

.btn-mic:hover, .btn-send:hover {
    transform: scale(1.05);
}

/* Scrollbar */
.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-track {
    background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* Mobile */
@media (max-width: 640px) {
    .message { max-width: 95%; }
    .header { padding: 1rem; }
    .input-area { padding: 1rem; }
}