/* Styles personnalisés pour le système de support technique */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
}

.notification-badge {
    font-size: 0.7rem;
    border-radius: 50%;
    min-width: 1.2rem;
    height: 1.2rem;
    line-height: 1.2rem;
}

.notification-dropdown {
    max-height: 400px;
    overflow-y: auto;
}

/* Cards et conteneurs */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Badges de statut */
.status-badge {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

.priority-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

/* Tables */
.table {
    background-color: #fff;
}

.table thead th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Formulaires */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
}

/* Boutons */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.btn-outline-primary:hover {
    transform: translateY(-1px);
}

/* Ticket spécifique */
.ticket-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.ticket-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffd700;
}

.ticket-meta {
    font-size: 0.875rem;
    opacity: 0.9;
}

.ticket-response {
    border-left: 4px solid #dee2e6;
    background-color: #fff;
    margin-bottom: 1rem;
    border-radius: 0 0.375rem 0.375rem 0;
}

.ticket-response.from-agent {
    border-left-color: var(--primary-color);
    background-color: #f8f9ff;
}

.ticket-response.from-user {
    border-left-color: var(--success-color);
}

.ticket-response.internal-note {
    border-left-color: var(--warning-color);
    background-color: #fffbf0;
}

.response-header {
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.response-content {
    padding: 1rem;
}

.response-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Attachments */
.attachment-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    transition: background-color 0.15s ease-in-out;
}

.attachment-item:hover {
    background-color: #e9ecef;
}

.attachment-icon {
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 0.75rem;
}

/* Statistiques */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.15s ease-in-out;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

/* Recherche */
.search-box {
    position: relative;
}

.search-box .form-control {
    padding-left: 2.5rem;
}

.search-box .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 5;
}

/* Filtres */
.filter-section {
    background-color: #fff;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Login page */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    overflow: hidden;
    max-width: 400px;
    width: 100%;
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-body {
    padding: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .ticket-header {
        padding: 1rem;
    }

    .ticket-number {
        font-size: 1.25rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .notification-dropdown {
        width: 280px !important;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Utilitaires */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.border-start-4 {
    border-left: 4px solid;
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Print styles */
@media print {

    .navbar,
    .btn,
    .card-footer,
    .pagination {
        display: none !important;
    }

    body {
        background-color: #fff !important;
    }

    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}