/* ========================================
   STYLES - PAGE MES TICKETS
   ======================================== */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #64748b;
    font-size: 1rem;
}

.btn-new-ticket {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #2563eb;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-new-ticket:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

/* CONTAINER */
.tickets-container {
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

/* FILTRES */
.tickets-filters {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 500;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.filter-btn:hover {
    background: #ffffff;
    color: #1a202c;
}

.filter-btn.active {
    background: #ffffff;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.filter-btn .count {
    font-size: 0.875rem;
    color: inherit;
}

/* TABLEAU DES TICKETS */
.tickets-table {
    display: flex;
    flex-direction: column;
}

.ticket-row {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}

.ticket-row:hover {
    background: #f8fafc;
}

.ticket-row:last-child {
    border-bottom: none;
}

.ticket-main {
    flex: 1;
}

.ticket-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.ticket-id {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 600;
}

.ticket-badges {
    display: flex;
    gap: 0.5rem;
}

.ticket-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.75rem;
}

.ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: #64748b;
}

.meta-item .icon {
    font-size: 0.875rem;
}

.ticket-preview {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
}

.ticket-preview p {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-resolution {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #d1fae5;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #065f46;
}

.ticket-resolution strong {
    font-weight: 600;
}

.ticket-pending {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #fef3c7;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ticket-arrow {
    font-size: 1.5rem;
    color: #cbd5e1;
    border: none;
    background: transparent;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.ticket-row:hover .ticket-arrow {
    color: #2563eb;
    transform: translateX(4px);
}

/* ÉTATS DES TICKETS (pour filtrage) */
.ticket-row.hidden {
    display: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-new-ticket {
        width: 100%;
        justify-content: center;
    }

    .tickets-filters {
        flex-wrap: wrap;
    }

    .ticket-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .ticket-preview p {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .ticket-badges {
        flex-wrap: wrap;
    }
}