/* Chatbot Styles - BACK to BASIC Brasserie */

/* Bouton flottant du chatbot */
#chatbot-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: transparent;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

#chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(139, 69, 19, 0.5);
}

#chatbot-button img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 50%;
}

#chatbot-button.active {
    transform: scale(0.9);
}

/* Badge de notification - SUPPRIMÉ (masqué par l'agrandissement de l'image) */

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Fenêtre du chatbot */
#chatbot-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 60px);
    height: 550px;
    max-height: calc(100vh - 140px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

#chatbot-window.show {
    display: flex;
}

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

/* Header du chatbot */
#chatbot-header {
    background: linear-gradient(135deg, #8B4513 0%, #654321 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 20px 20px 0 0;
}

#chatbot-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

#chatbot-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#chatbot-avatar img {
    width: 45px;
    height: 45px;
    object-fit: cover;
}

#chatbot-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#chatbot-title h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

#chatbot-status {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

#chatbot-status-dot {
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

#chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.3s;
}

#chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Corps du chatbot */
#chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

#chatbot-messages::-webkit-scrollbar-track {
    background: #e9ecef;
}

#chatbot-messages::-webkit-scrollbar-thumb {
    background: #8B4513;
    border-radius: 3px;
}

/* Messages */
.chatbot-message {
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

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

.chatbot-message.bot {
    justify-content: flex-start;
}

.chatbot-message.user {
    justify-content: flex-end;
}

.chatbot-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.chatbot-message-avatar img {
    width: 32px;
    height: 32px;
    object-fit: cover;
}

.chatbot-message-content {
    max-width: 75%;
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
}

.chatbot-message.user .chatbot-message-content {
    background: #8B4513;
    color: white;
}

.chatbot-message-content p {
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.chatbot-message-content p:last-child {
    margin-bottom: 0;
}

.chatbot-message-content a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.chatbot-message.user .chatbot-message-content a {
    color: #fff;
    text-decoration: underline;
}

.chatbot-message-content a:hover {
    text-decoration: underline;
}

/* Boutons de suggestions */
.chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chatbot-suggestion-btn {
    background: #8B4513;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
    white-space: nowrap;
}

.chatbot-suggestion-btn:hover {
    background: #654321;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(139, 69, 19, 0.3);
}

/* Indicateur de saisie */
.chatbot-typing {
    display: flex;
    gap: 4px;
    padding: 10px 16px;
}

.chatbot-typing-dot {
    width: 8px;
    height: 8px;
    background: #8B4513;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.chatbot-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Zone de saisie */
#chatbot-input-container {
    padding: 15px;
    background: white;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 10px;
    align-items: center;
}

#chatbot-input {
    flex: 1;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

#chatbot-input:focus {
    border-color: #8B4513;
}

#chatbot-send {
    background: #8B4513;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

#chatbot-send:hover:not(:disabled) {
    background: #654321;
    transform: scale(1.1);
}

#chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Messages d'info */
.chatbot-info {
    background: #e7f3ff;
    border-left: 4px solid #007bff;
    padding: 10px 12px;
    border-radius: 8px;
    margin-top: 8px;
    font-size: 13px;
}

.chatbot-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 10px 12px;
    border-radius: 8px;
    margin-top: 8px;
    font-size: 13px;
}

.chatbot-success {
    background: #d4edda;
    border-left: 4px solid #28a745;
    padding: 10px 12px;
    border-radius: 8px;
    margin-top: 8px;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    #chatbot-button {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
    }
    
    #chatbot-button img {
        width: 38px;
        height: 38px;
    }
    
    #chatbot-window {
        bottom: 90px;
        right: 20px;
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
    }
    
    .chatbot-message-content {
        max-width: 80%;
    }
}
