/**
 * Timeline Styles - Interface Client
 * 
 * Styles CSS pour la timeline des commandes côté client
 * Remplace l'injection inline pour améliorer les performances et éviter le FOUC
 * 
 * @package KoldKaze
 * @version 1.0.0
 * @since 05/09/2025
 */

/* ========================================
   CONTENEURS TIMELINE CLIENT
======================================== */

.customer-timeline-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.customer-timeline-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.timeline-header.customer-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
}

.timeline-header.customer-header h3 {
    color: #2c5530;
    font-size: 1.8rem;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.timeline-header.customer-header .order-info {
    color: #6c757d;
    font-size: 1rem;
    margin: 5px 0;
}

/* ========================================
   ÉTAPES TIMELINE CLIENT
======================================== */

.timeline-context-customer .timeline-item {
    position: relative;
    padding: 20px 0 20px 40px;
    border-left: 3px solid #e8f5e8;
    margin-left: 15px;
}

.timeline-context-customer .timeline-item:last-child {
    border-left-color: transparent;
}

.timeline-context-customer .timeline-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 25px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e8f5e8;
    border: 3px solid white;
    box-shadow: 0 0 0 3px #e8f5e8;
}

.timeline-context-customer .timeline-item.current::before {
    background: #28a745;
    box-shadow: 0 0 0 3px #28a745;
}

.timeline-context-customer .timeline-item.completed::before {
    background: #17a2b8;
    box-shadow: 0 0 0 3px #17a2b8;
}

.timeline-context-customer .timeline-item.pending::before {
    background: #ffc107;
    box-shadow: 0 0 0 3px #ffc107;
}

/* ========================================
   CONTENU ÉTAPES CLIENT
======================================== */

.timeline-context-customer .timeline-content {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    border-left: 4px solid transparent;
}

.timeline-context-customer .timeline-item.current .timeline-content {
    background: #e8f5e8;
    border-left-color: #28a745;
}

.timeline-context-customer .timeline-item.completed .timeline-content {
    background: #e8f4f8;
    border-left-color: #17a2b8;
}

.timeline-context-customer .timeline-step-title {
    font-weight: 600;
    color: #2c5530;
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.timeline-context-customer .timeline-step-description {
    color: #6c757d;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

/* Note: timeline-reason styles removed - now uses kz-badge system */

/* Integration badge timeline-reason avec le systeme unifie */
.customer-timeline-info .kz-badge.timeline-reason {
    margin: 8px 0 !important;
    font-weight: 500 !important;
}

/* Espacement horizontal pour order-total */
.customer-order-details .order-total {
    margin-left: 20px;
    margin-right: 20px;
}

/* ========================================
   ACTIONS CLIENT TIMELINE
======================================== */

.timeline-context-customer .timeline-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.timeline-context-customer .action-button {
    background: #007cba;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.timeline-context-customer .action-button:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.timeline-context-customer .action-button.primary {
    background: #28a745;
}

.timeline-context-customer .action-button.primary:hover {
    background: #1e7e34;
}

.timeline-context-customer .action-button.danger {
    background: #dc3545;
}

.timeline-context-customer .action-button.danger:hover {
    background: #c82333;
}

/* ========================================
   STATUTS SPÉCIAUX CLIENT
======================================== */

.timeline-context-customer .status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-context-customer .status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.timeline-context-customer .status-in-progress {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #99d6ff;
}

.timeline-context-customer .status-completed {
    background: #d4edda;
    color: #155724;
    border: 1px solid #a3d9a5;
}

.timeline-context-customer .status-cancelled {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f1aeb5;
}

/* ========================================
   RESPONSIVE CLIENT TIMELINE
======================================== */

@media (max-width: 768px) {
    .customer-timeline-container {
        padding: 16px;
        margin: 10px 0;
    }
    
    .timeline-context-customer .timeline-item {
        padding-left: 30px;
        margin-left: 10px;
    }
    
    .timeline-context-customer .timeline-item::before {
        left: -6px;
        width: 10px;
        height: 10px;
    }
    
    .timeline-context-customer .timeline-content {
        padding: 12px;
    }
    
    .timeline-context-customer .action-button {
        width: 100%;
        margin-right: 0;
        margin-bottom: 8px;
    }
}

/* ========================================
   TRANSITIONS ANTI-FOUC TIMELINE
======================================== */

.timeline-context-customer {
    opacity: 0;
    animation: timelineAppear 0.3s ease-out forwards;
}

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

.timeline-context-customer .timeline-item {
    opacity: 0;
    animation: timelineItemAppear 0.4s ease-out forwards;
    animation-delay: calc(var(--item-index, 0) * 0.1s);
}

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