/* Styles pour le système de tickets */

/* Scrollbar personnalisée pour la conversation */
.conversation-scroll {
    scrollbar-width: thin;
    scrollbar-color: #8b5cf6 transparent;
}

.conversation-scroll::-webkit-scrollbar {
    width: 6px;
}

.conversation-scroll::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.conversation-scroll::-webkit-scrollbar-thumb {
    background: #8b5cf6;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.conversation-scroll::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}

.conversation-scroll::-webkit-scrollbar-thumb:active {
    background: #6d28d9;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

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

/* Classes d'animation */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-in {
    animation: slideIn 0.5s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Styles pour les tickets */
.ticket-card {
    transition: all 0.3s ease;
}

.ticket-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Statuts avec couleurs */
.status-open {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.status-in-progress {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.status-waiting {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
}

.status-escalated {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.status-closed {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.status-cancelled {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

/* Priorités */
.priority-low {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.priority-medium {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.priority-high {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
}

.priority-urgent {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    animation: pulse 1.5s infinite;
}

/* Effet de survol pour les boutons */
.btn-hover-effect {
    position: relative;
    overflow: hidden;
}

.btn-hover-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-hover-effect:hover::before {
    left: 100%;
}

/* Styles simples pour les formulaires */
.form-input {
    background: #2d2d54;
    border: 1px solid #4a4a7a;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Les dropdowns sont maintenant gérés par le système personnalisé dans base.css */

/* S'assurer que le formulaire de ticket a un z-index approprié */
.bg-white\/10 {
    position: relative;
    z-index: 1;
}

/* Les dropdowns personnalisés doivent être au-dessus - utiliser !important pour surcharger */
.custom-select {
    position: relative !important;
    z-index: 99999 !important;
}

/* Z-index normal pour les cartes */
.grid.md\\:grid-cols-3 > div {
    position: relative;
    z-index: 1;
}

/* Z-index normal pour les conteneurs */
.bg-white\/10 {
    position: relative;
    z-index: 1;
}

/* Conteneur des cartes */
.grid.md\\:grid-cols-3 {
    position: relative;
    z-index: 1;
}

/* Cartes avec backdrop-blur */
.bg-white\/10.backdrop-blur-lg {
    position: relative;
    z-index: 1;
}

/* Styles pour les réponses */
.reply-card {
    transition: all 0.3s ease;
    position: relative;
}

.reply-card:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.reply-card::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #8b5cf6, #ec4899);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reply-card:hover::before {
    opacity: 1;
}

/* Styles pour les avatars */
.avatar {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.avatar-admin {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Styles pour les notifications */
.notification {
    position: relative;
    overflow: hidden;
}

.notification::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    animation: slideIn 0.5s ease-out;
}

/* Styles pour le captcha */
.captcha-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.captcha-container:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Styles pour les statistiques */
.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Styles pour les tags */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag:hover {
    transform: scale(1.05);
}

/* Styles pour les pièces jointes */
.attachment {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.attachment:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .ticket-card {
        margin-bottom: 1rem;
    }
    
    .reply-card {
        margin-bottom: 1rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
}

/* Styles pour les états de chargement */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Styles pour les messages d'erreur */
.error-message {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    animation: fadeIn 0.5s ease-out;
}

/* Styles pour les messages de succès */
.success-message {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    animation: fadeIn 0.5s ease-out;
}

/* Styles pour les messages d'information */
.info-message {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    animation: fadeIn 0.5s ease-out;
}

/* Styles pour les messages d'avertissement */
.warning-message {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    animation: fadeIn 0.5s ease-out;
}

/* Effet de survol pour les liens */
.link-hover {
    position: relative;
    transition: all 0.3s ease;
}

.link-hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    transition: width 0.3s ease;
}

.link-hover:hover::after {
    width: 100%;
}

/* Styles pour les modales */
.modal-overlay {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideIn 0.3s ease-out;
}

/* Styles pour les tooltips */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::before {
    opacity: 1;
}

/* Styles pour les barres de progression */
.progress-bar {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    transition: width 0.5s ease;
}

/* Styles pour les indicateurs de statut en temps réel */
.status-indicator {
    position: relative;
}

.status-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s infinite;
}

.status-indicator.offline::after {
    background: #6b7280;
    animation: none;
}

/* Styles pour les notifications toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

/* Styles pour les boutons d'action rapide */
.quick-action {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.quick-action:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4);
}
