/**
 * ============================================
 * STYLES POUR L'INTERFACE UNIFIÉE DES TICKETS
 * ============================================
 * 
 * À ajouter dans resources/css/app.css
 * ou créer un fichier séparé resources/css/tickets.css
 * puis l'inclure dans votre layout
 */

/* ============================================
   EFFETS DE SURVOL SUR LES LIGNES
   ============================================ */
.ticket-row {
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.ticket-row:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* ============================================
   BADGES SUBTLE (COULEURS LÉGÈRES)
   ============================================ */
.bg-success-subtle {
    background-color: rgba(25, 135, 84, 0.1) !important;
}

.bg-primary-subtle {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

.bg-danger-subtle {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

.bg-warning-subtle {
    background-color: rgba(255, 193, 7, 0.15) !important;
}

.bg-info-subtle {
    background-color: rgba(13, 202, 240, 0.1) !important;
}

.bg-secondary-subtle {
    background-color: rgba(108, 117, 125, 0.1) !important;
}

.bg-orange-subtle {
    background-color: rgba(253, 126, 20, 0.1) !important;
}

/* ============================================
   COULEURS PERSONNALISÉES
   ============================================ */
.text-orange {
    color: #fd7e14 !important;
}

.bg-orange {
    background-color: #fd7e14 !important;
}

.border-orange {
    border-color: #fd7e14 !important;
}

/* ============================================
   CARTES CLIQUABLES (STATISTIQUES)
   ============================================ */
.card[wire\:click],
.card[style*="cursor: pointer"] {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card[wire\:click]:hover,
.card[style*="cursor: pointer"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12) !important;
}

/* ============================================
   AVATARS CIRCULAIRES
   ============================================ */
.avatar-circle {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.avatar-md {
    width: 40px;
    height: 40px;
    font-size: 0.875rem;
}

.avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 1rem;
}

/* ============================================
   TIMELINE DES MESSAGES
   ============================================ */
.messages-timeline {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

.messages-timeline::-webkit-scrollbar {
    width: 6px;
}

.messages-timeline::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.messages-timeline::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.messages-timeline::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* ============================================
   ÉTAT DE CHARGEMENT
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ============================================
   INDICATEURS DE PRIORITÉ
   ============================================ */
.priority-indicator {
    width: 4px;
    border-radius: 2px;
}

.priority-low {
    background-color: #28a745;
}

.priority-normal {
    background-color: #17a2b8;
}

.priority-medium {
    background-color: #ffc107;
}

.priority-high {
    background-color: #fd7e14;
}

.priority-urgent {
    background-color: #dc3545;
    animation: pulse-urgent 2s infinite;
}

@keyframes pulse-urgent {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ============================================
   BADGES DE STATUT PERSONNALISÉS
   ============================================ */
.status-badge {
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 600;
    border-radius: 0.375rem;
}

.status-open {
    background-color: #17a2b8;
    color: white;
}

.status-in-progress {
    background-color: #ffc107;
    color: #212529;
}

.status-closed {
    background-color: #6c757d;
    color: white;
}

.status-resolved {
    background-color: #28a745;
    color: white;
}

/* ============================================
   HOVER EFFECTS POUR FICHIERS
   ============================================ */
.hover-bg-white:hover {
    background-color: white !important;
}

.file-item {
    transition: background-color 0.2s ease;
}

.file-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .ticket-row td {
        padding: 0.75rem 0.5rem;
    }
    
    .display-6 {
        font-size: 1.5rem;
    }
    
    .btn-group-sm > .btn {
        padding: 0.25rem 0.4rem;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .badge {
        font-size: 0.7rem;
    }
}

/* ============================================
   UTILITAIRES
   ============================================ */
.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.min-h-100 {
    min-height: 100px;
}

.border-3 {
    border-width: 3px !important;
}

/* ============================================
   TABLE PERSONNALISÉE
   ============================================ */
.table-tickets thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: #6c757d;
    border-bottom-width: 2px;
}

.table-tickets tbody tr {
    border-bottom: 1px solid #e9ecef;
}

.table-tickets tbody tr:last-child {
    border-bottom: none;
}