/* Styles pour le système de réclamations */

/* Dashboard des réclamations */
.complaints-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.complaints-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.complaints-header h2 {
    margin: 0;
    color: #333;
}

.complaints-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 8px;
}

.complaints-empty .empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.complaints-empty h3 {
    margin: 0 0 10px 0;
    color: #666;
}

.complaints-empty p {
    margin: 0 0 20px 0;
    color: #999;
}

/* Liste des réclamations */
.complaints-list {
    display: grid;
    gap: 20px;
}

.complaint-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.complaint-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.complaint-card .complaint-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.complaint-card .complaint-main-info {
    flex: 1;
}

.complaint-card .complaint-ticket-number {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.complaint-card .complaint-ticket-number strong {
    color: #333;
    font-size: 16px;
}

.complaint-card .complaint-subject h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.complaint-card .complaint-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
}

.complaint-card .complaint-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.complaint-card .meta-label {
    color: #666;
    font-weight: 500;
}

.complaint-card .meta-value {
    color: #333;
}

.complaint-card .complaint-message-preview {
    margin-bottom: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.complaint-card .complaint-attachment {
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #f0f7ff;
    border-left: 3px solid #2196f3;
    border-radius: 3px;
}

.complaint-card .complaint-attachment a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2196f3;
    text-decoration: none;
    font-weight: 500;
}

.complaint-card .complaint-attachment a:hover {
    text-decoration: underline;
}

.complaint-card .complaint-actions {
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

/* Badges de statut */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.status-received {
    background: #e3f2fd;
    color: #1976d2;
}

.status-badge.status-in_progress {
    background: #fff3e0;
    color: #f57c00;
}

.status-badge.status-resolved {
    background: #e8f5e9;
    color: #388e3c;
}

.status-badge.status-closed {
    background: #f5f5f5;
    color: #666;
}

.status-badge-large {
    padding: 10px 20px;
    font-size: 14px;
}

/* Formulaire de réclamation */
.new-complaint-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.new-complaint-form-container {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    margin-top: 20px;
}

.complaint-form .form-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
}

.complaint-form .form-section:last-child {
    border-bottom: none;
}

.complaint-form .form-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.complaint-form .form-group {
    margin-bottom: 20px;
}

.complaint-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.complaint-form label.required .required-star {
    color: #f44336;
}

.complaint-form label.optional .optional-label {
    color: #999;
    font-weight: 400;
    font-size: 12px;
}

.complaint-form .form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.complaint-form .form-control:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.complaint-form textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.complaint-form .form-description {
    margin-top: 5px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Upload de fichier */
.file-upload-container {
    margin-top: 10px;
}

.file-input {
    display: none;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.file-upload-label:hover {
    border-color: #2196f3;
    background: #f0f7ff;
}

.file-upload-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.file-upload-text {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.file-upload-hint {
    font-size: 12px;
    color: #999;
}

.file-upload-label-small {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background: #fff;
    transition: all 0.3s ease;
}

.file-upload-label-small:hover {
    border-color: #2196f3;
    background: #f0f7ff;
}

.file-upload-progress {
    margin-top: 10px;
}

.file-upload-progress .progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.file-upload-progress .progress-fill {
    height: 100%;
    background: #4caf50;
    transition: width 0.3s ease;
}

.file-upload-progress .progress-text {
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    text-align: center;
}

.file-upload-preview,
.file-upload-preview-small {
    margin-top: 10px;
    padding: 10px 15px;
    background: #e8f5e9;
    border: 1px solid #4caf50;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-upload-preview .preview-name,
.file-upload-preview-small .preview-name {
    color: #2e7d32;
    font-weight: 500;
}

.file-upload-preview .remove-file,
.file-upload-preview-small .remove-file {
    background: none;
    border: none;
    color: #f44336;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-upload-preview .remove-file:hover,
.file-upload-preview-small .remove-file:hover {
    color: #d32f2f;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.form-result {
    margin-top: 20px;
}

/* Page de détails */
.complaint-detail-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.complaint-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.complaint-detail-header .back-link {
    display: inline-block;
    margin-bottom: 10px;
    color: #666;
    text-decoration: none;
}

.complaint-detail-header .back-link:hover {
    color: #2196f3;
    text-decoration: underline;
}

.complaint-detail-header h2 {
    margin: 0 0 10px 0;
    color: #333;
}

.complaint-ticket-number-large {
    font-size: 16px;
    color: #666;
}

.complaint-detail-content {
    display: grid;
    gap: 30px;
}

.complaint-main-info {
    display: grid;
    gap: 20px;
}

.info-card,
.complaint-message-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

.info-card h3,
.complaint-message-card h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.info-list {
    display: grid;
    gap: 15px;
}

.info-list dt {
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
}

.info-list dd {
    margin: 0;
    color: #333;
}

.complaint-message-content {
    color: #666;
    line-height: 1.8;
}

.attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2196f3;
    text-decoration: none;
    font-weight: 500;
}

.attachment-link:hover {
    text-decoration: underline;
}

/* Thread/Conversation */
.complaint-thread {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

.complaint-thread h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.thread-timeline {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.thread-item {
    padding: 15px;
    border-left: 3px solid #e0e0e0;
    background: #fafafa;
    border-radius: 4px;
}

.thread-item.thread-initial {
    border-left-color: #2196f3;
    background: #f0f7ff;
}

.thread-item.thread-own {
    border-left-color: #4caf50;
    background: #f1f8f4;
}

.thread-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.author-avatar img {
    border-radius: 50%;
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.badge-you,
.badge-customer,
.badge-admin {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 500;
}

.badge-you {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-customer {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-admin {
    background: #fff3e0;
    color: #f57c00;
}

.thread-date {
    font-size: 12px;
    color: #999;
}

.thread-content {
    color: #666;
    line-height: 1.8;
    padding-left: 52px;
}

.thread-attachment {
    margin-top: 10px;
    padding-left: 52px;
}

.thread-reply-form {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.thread-reply-form h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.reply-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.thread-closed-notice {
    margin-top: 30px;
    padding: 15px;
    background: #fff3e0;
    border-left: 3px solid #ff9800;
    border-radius: 4px;
    color: #f57c00;
}

/* Responsive */
@media (max-width: 768px) {
    .complaints-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .complaint-card .complaint-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .complaint-card .complaint-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .complaint-detail-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

