/* Custom styles */
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

.chat-bubble {
    max-width: 80%;
    word-wrap: break-word;
}

.chat-bubble-assistant {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem 1rem 1rem 0.25rem;
}

.chat-bubble-user {
    background: #871c1c;
    color: white;
    border-radius: 1rem 1rem 0.25rem 1rem;
}

.typing-indicator span {
    animation: bounce 1.4s infinite ease-in-out;
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    margin: 0 2px;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
}

.devis-card {
    transition: all 0.2s;
}
.devis-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
    text-transform: capitalize;
}
.status-brouillon { background: #fef3c7; color: #92400e; }
.status-envoyé { background: #fce4e4; color: #871c1c; }
.status-accepté { background: #d1fae5; color: #065f46; }
.status-refusé { background: #fee2e2; color: #991b1b; }

/* Unit type badges */
.unit-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}
.unit-m2 { background: #ede9fe; color: #5b21b6; }
.unit-ml { background: #fce7f3; color: #9d174d; }
.unit-unite { background: #ecfdf5; color: #047857; }

/* Choice buttons in chat */
.chat-choices {
    border-top: 1px solid #e5e7eb;
    padding-top: 0.75rem;
}

.choice-btn {
    cursor: pointer;
    transition: all 0.15s ease;
}

.choice-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

/* Markdown-like formatting in chat */
.chat-content p { margin-bottom: 0.5rem; }
.chat-content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 0.5rem; }
.chat-content ol { list-style: decimal; padding-left: 1.5rem; margin-bottom: 0.5rem; }
.chat-content strong { font-weight: 600; }

/* Modal overlay */
.modal-overlay {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

/* Table hover */
tbody tr:hover { background-color: #f8fafc; }

/* Autocomplete dropdown */
.ac-dropdown {
    scrollbar-width: thin;
}
.ac-dropdown .ac-item:not(:last-child) {
    border-bottom: 1px solid #f3f4f6;
}

/* Toast notification */
.toast {
    animation: slideIn 0.3s ease-out, slideOut 0.3s ease-in 2.7s;
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }
