/* Bouton flottant du chatbot */
#claude-chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #6366f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 9998;
}

#claude-chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#claude-chat-button svg {
    color: white;
}

/* Fenêtre du chat */
#claude-chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
}

/* En-tête du chat */
#claude-chat-header {
    background: #6366f1;
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#claude-chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

#claude-close-button {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

#claude-close-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Zone des messages */
#claude-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f9fafb;
}

.claude-message {
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.claude-message-content {
    display: inline-block;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.5;
}

.claude-message-user .claude-message-content {
    background: #6366f1;
    color: white;
    margin-left: auto;
    float: right;
    clear: both;
}

.claude-message-assistant .claude-message-content {
    background: white;
    color: #1f2937;
    border: 1px solid #e5e7eb;
}

.claude-message-error .claude-message-content {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Message système (RGPD) */
.claude-message-system .claude-message-content {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    font-size: 12px;
    text-align: center;
}

/* Zone de saisie */
#claude-chat-input-container {
    padding: 16px;
    padding-bottom: 8px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
}

#claude-chat-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    resize: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 40px;
    max-height: 100px;
}

#claude-chat-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#claude-send-button {
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

#claude-send-button:hover {
    background: #4f46e5;
}

#claude-send-button:active {
    transform: scale(0.98);
}

/* Pied de page avec boutons */
#claude-chat-footer {
    padding: 8px 16px;
    padding-top: 0;
    background: white;
    text-align: center;
}

.claude-footer-button {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.claude-footer-button:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Responsive */
@media (max-width: 480px) {
    #claude-chat-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        bottom: 90px;
    }
}