/* Variables de couleur et styles de base */ :root { --bg-color: #1a1a1a; --surface-color: #2c2c2c; --primary-color: #ffffff; --secondary-color: #a0a0a0; --accent-color: #007bff; --user-msg-bg: #005cbb; --bot-msg-bg: #3a3a3a; } *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } html, body { height: 100%; } body { font-family: 'Inter', sans-serif; background-color: var(--bg-color); color: var(--primary-color); display: flex; justify-content: center; align-items: center; padding: 16px; } /* Conteneur principal */ #chat-container { width: 100%; max-width: 800px; height: 90vh; background-color: var(--surface-color); border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); } /* En-tête */ .chat-header { padding: 20px; background-color: rgba(0,0,0,0.2); border-bottom: 1px solid #444; text-align: center; } .chat-header h1 { font-size: 1.5rem; font-weight: 600; } /* Section pour la clé API */ .api-token-section { padding: 16px; background-color: rgba(0,0,0,0.15); border-bottom: 1px solid #444; display: flex; flex-direction: column; gap: 8px; } .api-token-section label { font-size: 0.9rem; font-weight: 500; color: var(--secondary-color); } #hf-token-input { width: 100%; background-color: #4a4a4a; border: 1px solid #555; border-radius: 8px; padding: 10px; font-size: 0.9rem; color: var(--primary-color); font-family: 'Inter', sans-serif; } #hf-token-input:focus { outline: none; box-shadow: 0 0 0 2px var(--accent-color); } .api-token-section .warning { font-size: 0.8rem; color: var(--secondary-color); text-align: center; } /* Zone des messages */ #message-area { flex-grow: 1; padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; } #message-area::-webkit-scrollbar { width: 8px; } #message-area::-webkit-scrollbar-track { background: var(--surface-color); } #message-area::-webkit-scrollbar-thumb { background-color: #555; border-radius: 20px; border: 2px solid var(--surface-color); } /* Bulles de message */ .message { max-width: 75%; padding: 12px 18px; border-radius: 20px; line-height: 1.5; word-wrap: break-word; } .user-message { background-color: var(--user-msg-bg); color: white; align-self: flex-end; border-bottom-right-radius: 5px; } .bot-message { background-color: var(--bot-msg-bg); color: var(--primary-color); align-self: flex-start; border-bottom-left-radius: 5px; } /* Indicateur de frappe */ .typing-indicator { align-self: flex-start; display: flex; align-items: center; padding: 12px 18px; background-color: var(--bot-msg-bg); border-radius: 20px; border-bottom-left-radius: 5px; } .typing-indicator span { height: 8px; width: 8px; background-color: #999; border-radius: 50%; display: inline-block; margin: 0 2px; animation: bounce 1.4s infinite ease-in-out both; } .typing-indicator span:nth-child(1) { animation-delay: -0.32s; } .typing-indicator span:nth-child(2) { animation-delay: -0.16s; } @keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1.0); } } /* Formulaire de saisie */ #input-form { display: flex; padding: 16px; border-top: 1px solid #444; gap: 12px; } #user-input { flex-grow: 1; background-color: #4a4a4a; border: none; border-radius: 12px; padding: 14px; font-size: 1rem; color: var(--primary-color); resize: none; font-family: 'Inter', sans-serif; } #user-input:focus { outline: none; box-shadow: 0 0 0 2px var(--accent-color); } #send-button { background-color: var(--accent-color); color: white; border: none; border-radius: 12px; padding: 0 24px; font-size: 1rem; font-weight: 500; cursor: pointer; transition: background-color 0.2s ease; } #send-button:hover:not(:disabled) { background-color: #0056b3; } #send-button:disabled { background-color: #555; cursor: not-allowed; }