/* Styles pour le chat IA */

/* Bulle de chat */
.chat-bubble {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), #ff9f40);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 5px 15px rgba(255, 127, 0, 0.3);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
}

.chat-bubble:hover {
    transform: scale(1.1);
}

.chat-bubble.hidden {
    transform: scale(0);
    opacity: 0;
}

/* Fenêtre de chat */
.chat-window {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 350px;
    height: 500px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 998;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.chat-window.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* En-tête du chat */
.chat-header {
    background: linear-gradient(114deg, #070934 19.73%, #151B9A 100.01%);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    padding: 5px;
}

.chat-title h4 {
    margin: 0;
    font-size: 16px;
}

.chat-status {
    font-size: 12px;
    margin: 0;
    opacity: 0.8;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.chat-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Zone de messages */
.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #f5f7fb;
}

.message {
    max-width: 80%;
    display: flex;
    flex-direction: column;
}

.message.bot {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
}

.message-content {
    padding: 12px 15px;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.message.bot .message-content {
    background-color: white;
    border-bottom-left-radius: 5px;
}

.message.user .message-content {
    background-color: var(--primary-color);
    color: white;
    border-bottom-right-radius: 5px;
}

.message-content p {
    margin: 0;
    line-height: 1.4;
}

.message-time {
    font-size: 11px;
    color: #aaa;
    margin-top: 5px;
    align-self: flex-end;
}

/* Zone de suggestions */
.chat-suggestions {
    padding: 10px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid #eee;
}

.suggestion-btn {
    background-color: #f0f2f5;
    border: none;
    border-radius: 18px;
    padding: 8px 15px;
    font-size: 13px;
    color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.2s;
}

.suggestion-btn:hover {
    background-color: #e4e6e9;
}

/* Zone de saisie */
.chat-input {
    padding: 15px;
    display: flex;
    gap: 10px;
    border-top: 1px solid #eee;
}

.chat-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

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

.chat-send {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border: none;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-send:hover {
    background-color: #ff8c1a;
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 480px) {
    .chat-window {
        width: calc(100% - 40px);
        height: 450px;
        left: 20px;
        bottom: 20px;
    }
    
    .chat-bubble {
        left: 20px;
        bottom: 20px;
    }
}
