/* Styles pour la page Mes Commandes */

/* Status indicators with timeline animation */
.status-timeline {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
    position: relative;
}

.status-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    z-index: 1;
}

/* Pour les étapes sur desktop */
@media (min-width: 768px) {
    .status-step:not(:last-child) .step-connector {
        position: absolute;
        top: 20px;
        width: 100%;
        height: 3px;
        background-color: #e5e7eb;
        left: 50%;
    }

    /* Animation de progression pour la timeline */
    .status-step.completed .step-connector {
        background-color: #10b981;
        transition: background-color 0.5s ease;
    }
    
    /* Ajouter une animation de progression pour montrer la transition */
    .status-step.active .step-connector {
        background: linear-gradient(to right, #10b981 50%, #e5e7eb 50%);
        background-size: 200% 100%;
        background-position: right bottom;
        transition: all 1s ease;
    }
}

/* Pour les étapes sur mobile */
@media (max-width: 767px) {
    .status-timeline {
        padding-left: 20px;
    }
    
    .status-step {
        padding-left: 10px;
    }
    
    .status-step:not(:last-child)::before {
        content: "";
        position: absolute;
        top: 10px;
        bottom: -15px;
        left: -5px;
        width: 2px;
        background-color: #e5e7eb;
        z-index: 0;
    }
    
    .status-step.completed::before {
        background-color: #10b981;
    }
    
    .status-step.active::before {
        background: linear-gradient(to bottom, #10b981 50%, #e5e7eb 50%);
    }
}

.status-step .step-icon {
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 0 0 4px rgba(243, 244, 246, 0.5);
}

.status-step.completed .step-icon {
    background-color: #10b981 !important;
    color: white;
}

.status-step.active .step-icon {
    background-color: #3b82f6 !important;
    color: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.status-step.cancelled .step-icon {
    background-color: #ef4444 !important;
    color: white;
}

.status-step .step-label {
    transition: all 0.3s ease;
}

.status-step.completed .step-label {
    color: #10b981;
    font-weight: 600;
}

.status-step.active .step-label {
    color: #3b82f6;
    font-weight: 600;
}

.status-step.cancelled .step-label {
    color: #ef4444;
    font-weight: 600;
}

/* Modal animations */
#order-details-modal {
    transition: opacity 0.3s ease;
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

#order-details-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

#order-details-modal:not(.hidden) {
    opacity: 1;
}

#order-details-modal > div {
    transition: all 0.3s ease-out;
    transform: scale(1);
    max-height: 90vh;
    overflow-y: auto;
}

#order-details-modal.hidden > div {
    transform: scale(0.95);
}

/* Table styles améliorés */
#orders-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#orders-table th {
    background-color: #f9fafb;
    font-weight: 600;
    padding: 12px 24px;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
    color: #4b5563;
}

#orders-table td {
    padding: 16px 24px;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
}

/* Animation d'apparition des lignes */
.order-row {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease-out;
}

.order-row-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Style amélioré pour les badges de statut */
.status-badge {
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 9999px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: inline-flex;
    align-items: center;
    letter-spacing: 0.025em;
    transition: all 0.2s ease;
}

.status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Styles pour les mini-timelines du tableau */
.mini-timeline {
    display: flex;
    align-items: center;
    height: 4px;
    margin-top: 8px;
    max-width: 120px;
}

.mini-timeline-step {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #e5e7eb;
    z-index: 1;
    transition: all 0.3s ease;
}

.mini-timeline-step.completed {
    background-color: #10b981;
}

.mini-timeline-step.active {
    background-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    animation: pulse-mini 2s infinite;
}

.mini-timeline-connector {
    height: 2px;
    flex-grow: 1;
    background-color: #e5e7eb;
    margin: 0 2px;
    transition: all 0.3s ease;
}

.mini-timeline-connector.completed {
    background-color: #10b981;
}

.mini-timeline-cancelled {
    font-size: 0.75rem;
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

@keyframes pulse-mini {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Styles pour les lignes de tableau sur hover */
#orders-table tbody tr {
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

#orders-table tbody tr:hover {
    background-color: rgba(249, 250, 251, 0.8);
    transform: translateY(-2px);
    z-index: 10;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Indicateurs colorés pour chaque statut */
#orders-table tbody tr[data-status="pending"] {
    border-left: 3px solid #F59E0B;
}

#orders-table tbody tr[data-status="validated"] {
    border-left: 3px solid #3B82F6;
}

#orders-table tbody tr[data-status="confirmed"] {
    border-left: 3px solid #8B5CF6;
}

#orders-table tbody tr[data-status="in-delivery"] {
    border-left: 3px solid #6366F1;
}

#orders-table tbody tr[data-status="delivered"] {
    border-left: 3px solid #10B981;
}

#orders-table tbody tr[data-status="cancelled"] {
    border-left: 3px solid #EF4444;
}

/* Amélioration du bouton de détail */
.view-order-btn {
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.view-order-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Mobile cards with improved design */
#orders-mobile-list .bg-white {
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
    border-left: 4px solid #ef4444;
}

#orders-mobile-list .bg-white:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Status badges with better visibility */
.bg-yellow-100.text-yellow-800 {
    background-color: #fef9c3 !important;
    color: #854d0e !important;
}

.bg-blue-100.text-blue-800 {
    background-color: #dbeafe !important;
    color: #1e40af !important;
}

.bg-indigo-100.text-indigo-800 {
    background-color: #e0e7ff !important;
    color: #3730a3 !important;
}

.bg-purple-100.text-purple-800 {
    background-color: #ede9fe !important;
    color: #5b21b6 !important;
}

.bg-green-100.text-green-800 {
    background-color: #dcfce7 !important;
    color: #166534 !important;
}

.bg-red-100.text-red-800 {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
}

/* Timeline historique améliorée */
#order-timeline {
    position: relative;
    margin-left: 20px;
}

#order-timeline li {
    position: relative;
    padding: 0 0 20px 25px;
    transition: all 0.2s ease;
}

#order-timeline li:last-child {
    padding-bottom: 0;
}

#order-timeline li::before {
    content: '';
    position: absolute;
    top: 0;
    left: -2px;
    width: 2px;
    height: 100%;
    background-color: transparent;
    z-index: 1;
}

#order-timeline li:hover::before {
    background-color: rgba(239, 68, 68, 0.2);
}

#order-timeline li .timeline-icon {
    position: absolute;
    left: -8px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
}

#order-timeline li:hover .timeline-icon {
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.timeline-content {
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.timeline-content:hover {
    background-color: #f3f4f6;
    transform: translateX(5px);
    border-left-color: #ef4444;
}

.timeline-date {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.timeline-date i {
    margin-right: 4px;
    color: #9ca3af;
}

.timeline-title {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.timeline-description {
    color: #4b5563;
    font-size: 0.8125rem;
}

/* Animation du click pour le bouton de fermeture */
#close-modal, #close-modal-btn {
    transition: all 0.2s ease;
}

#close-modal:active, #close-modal-btn:active {
    transform: scale(0.9);
}

/* Style pour le bouton d'impression */
#print-order-btn {
    transition: all 0.2s ease;
}

#print-order-btn:hover {
    color: #ef4444;
}

#print-order-btn:active {
    transform: scale(0.9);
}

/* Animation de l'ouverture et de fermeture de la modal */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
    }
    to {
        transform: scale(1);
    }
}

@keyframes scaleOut {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(0.95);
    }
}

#order-details-modal.modal-open {
    animation: fadeIn 0.3s ease forwards;
}

#order-details-modal.modal-open .modal-container {
    animation: scaleIn 0.3s ease forwards;
}

#order-details-modal.modal-closing {
    animation: fadeOut 0.3s ease forwards;
}

#order-details-modal.modal-closing .modal-container {
    animation: scaleOut 0.3s ease forwards;
}

/* Amélioration des cartes d'info */
[data-tab="info"] > div {
    transition: all 0.3s ease;
}

[data-tab="info"] > div:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Style pour le tableau des produits */
#detail-items {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#detail-items th {
    background-color: #f9fafb;
    font-weight: 600;
    padding: 10px 16px;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
    color: #4b5563;
}

#detail-items td {
    padding: 10px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
}

#detail-items tbody tr {
    transition: background-color 0.2s ease;
}

#detail-items tbody tr:hover {
    background-color: #f9fafb;
}

#detail-items tfoot tr {
    background-color: #f3f4f6;
    font-weight: 600;
}

/* Filter buttons with active state */
#apply-filters {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#apply-filters:hover {
    transform: translateY(-2px);
}

#apply-filters::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

#apply-filters:hover::after {
    transform: translateX(100%);
}

/* Enhanced loader */
.loading-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.loading-container.active {
    display: flex;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(239, 68, 68, 0.2);
    border-radius: 50%;
    border-top-color: #ef4444;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Pagination buttons avec hover effect */
#pagination-numbers button {
    transition: all 0.3s ease;
}

#pagination-numbers button:hover:not(.bg-red-500) {
    background-color: #fee2e2;
    border-color: #ef4444;
    color: #ef4444;
}

/* Order details modal avec effet de profondeur */
#order-details-modal > div {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    overflow: hidden;
}

#order-details-modal h2 {
    position: relative;
}

#order-details-modal h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #ef4444;
    border-radius: 3px;
}

/* Notification pour commande annulée */
#cancelled-notification {
    animation: slideDown 0.5s ease forwards;
    transform-origin: top center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #9ca3af;
}

/* Responsive fixes */
@media (max-width: 640px) {
    #order-details-modal > div {
        max-width: 95%;
        margin: 0 auto;
    }
    
    .status-timeline {
        margin-left: 0;
    }
    
    #orders-mobile-list .bg-white {
        padding: 16px;
    }
    
    .grid-cols-2.sm\\:grid-cols-2.md\\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .grid-cols-2.sm\\:grid-cols-2.md\\:grid-cols-4 > div {
        padding: 12px;
    }
    
    .grid-cols-2.sm\\:grid-cols-2.md\\:grid-cols-4 > div .text-2xl {
        font-size: 1.25rem;
    }
}

/* Fix pour mobile filters */
@media (max-width: 640px) {
    .grid-cols-1.sm\\:grid-cols-2.md\\:grid-cols-3 {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Animation d'entrée pour les cartes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Mobile order card transition */
.mobile-order-card {
    opacity: 0;
    transform: translateY(10px);
}

/* Style pour les éléments de la timeline */
.timeline-item {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease-out;
}

.timeline-item:hover {
    background-color: rgba(249, 250, 251, 0.5);
    border-radius: 8px;
}

/* Ligne verticale pour la timeline */
#order-timeline:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 10px;
    width: 2px;
    background-color: #e5e7eb;
    z-index: 0;
}

/* Style pour modal plein écran sur mobile */
@media (max-width: 768px) {
    #order-details-modal > div {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        margin: 0;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    
    #order-details-modal > div > div:first-child {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        position: sticky;
        top: 0;
        background-color: white;
        z-index: 10;
    }
    
    #order-details-modal > div > div:nth-child(2) {
        flex: 1;
        overflow-y: auto;
    }
    
    #order-details-modal > div > div:last-child {
        position: sticky;
        bottom: 0;
        background-color: white;
        z-index: 10;
        box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    /* Amélioration de la timeline de statut pour mobile */
    .status-timeline {
        padding-left: 0;
        margin-top: 2rem;
    }
    
    .status-step {
        margin-bottom: 1.5rem;
        position: relative;
        padding-left: 50px;
        min-height: 40px;
    }
    
    .status-step .step-icon {
        position: absolute;
        left: 0;
        top: 0;
        width: 40px;
        height: 40px;
    }
    
    .status-step:not(:last-child)::before {
        content: "";
        position: absolute;
        top: 40px;
        bottom: -10px;
        left: 20px;
        width: 2px;
        background-color: #e5e7eb;
        z-index: 0;
    }
    
    .status-step .step-label {
        font-size: 0.875rem;
        font-weight: 600;
        margin-top: 0.25rem;
    }
    
    .status-step.completed .step-icon {
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
    }
    
    .status-step.active .step-icon {
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    }
    
    /* Amélioration du design de la modal mobile */
    #order-details-modal h2 {
        font-size: 1.25rem;
    }
    
    .grid-cols-1.md\\:grid-cols-3 {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .grid-cols-1.md\\:grid-cols-3 > div {
        padding: 1rem;
        border-radius: 0.5rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .grid-cols-1.md\\:grid-cols-3 > div .text-xs,
    .grid-cols-1.md\\:grid-cols-3 > div .text-sm {
        margin: 0;
    }
    
    /* Animation de glissement pour l'entrée de la modal sur mobile */
    @keyframes slideInUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    @keyframes slideOutDown {
        from {
            transform: translateY(0);
        }
        to {
            transform: translateY(100%);
        }
    }
    
    #order-details-modal.mobile-slide-in > div {
        animation: slideInUp 0.3s ease-out forwards;
    }
    
    #order-details-modal.mobile-slide-out > div {
        animation: slideOutDown 0.3s ease-out forwards;
    }
    
    /* Amélioration de l'historique de la commande sur mobile */
    #order-timeline {
        margin-left: 15px;
    }
    
    #order-timeline::before {
        left: 7px;
    }
    
    #order-timeline li {
        padding-left: 25px;
    }
    
    #order-timeline li .absolute {
        width: 15px;
        height: 15px;
        left: -7px;
    }
    
    #order-timeline li .absolute i {
        font-size: 0.5rem;
    }
    
    /* Ajout d'une transition fluide pour les onglets */
    .tab-mobile-section {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .tab-button {
        display: inline-block;
        padding: 0.5rem 1rem;
        border-radius: 9999px;
        font-size: 0.875rem;
        font-weight: 500;
        margin-right: 0.5rem;
        transition: all 0.2s ease;
        border: 1px solid #e5e7eb;
    }
    
    .tab-button.active {
        background-color: #ef4444;
        color: white;
        border-color: #ef4444;
    }
    
    /* Amélioration du tableau de produits sur mobile */
    .overflow-x-auto {
        border-radius: 0.5rem;
        margin-bottom: 1rem;
    }
    
    #detail-items th {
        font-size: 0.75rem;
        padding: 0.75rem 0.5rem;
    }
    
    #detail-items td {
        padding: 0.75rem 0.5rem;
    }
    
    #detail-items td .font-medium {
        font-size: 0.875rem;
    }
}

/* Styles pour la page de détail flottante */
.floating-detail-page {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: 60;
    background-color: white;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
}

.floating-detail-page.active {
    transform: translateX(0);
}

.floating-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.floating-detail-body {
    height: calc(100% - 60px);
    overflow-y: auto;
    padding: 1rem;
}

.floating-close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #6b7280;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.floating-close-btn:hover {
    background-color: #f3f4f6;
}

/* Styles pour les tooltips */
.tooltip-container {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #374151;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 20;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-weight: normal;
    font-size: 0.75rem;
    letter-spacing: normal;
    text-transform: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #374151 transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Animation pour l'état de chargement */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Amélioration pour les en-têtes du tableau */
#orders-table th {
    padding: 16px 24px;
    position: relative;
    transition: background-color 0.2s ease;
}

#orders-table th:hover {
    background-color: #f3f4f6;
}

#orders-table th:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, #ef4444, transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

#orders-table th:hover:after {
    transform: scaleX(0.8);
}

/* Amélioration des styles pour les boutons d'action et les statuts */
.order-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Style pour le bouton de création de commande dans l'état vide */
#empty-orders-table button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#empty-orders-table button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#empty-orders-table button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

#empty-orders-table button:hover::after {
    transform: translateX(100%);
}

/* Amélioration de la visibilité des badges de statut */
.bg-yellow-100.text-yellow-800 {
    background-color: rgba(254, 243, 199, 0.9) !important;
    color: #92400e !important;
    border: 1px solid #fbbf24;
}

.bg-blue-100.text-blue-800 {
    background-color: rgba(219, 234, 254, 0.9) !important;
    color: #1e40af !important;
    border: 1px solid #60a5fa;
}

.bg-indigo-100.text-indigo-800 {
    background-color: rgba(224, 231, 255, 0.9) !important;
    color: #3730a3 !important;
    border: 1px solid #818cf8;
}

.bg-purple-100.text-purple-800 {
    background-color: rgba(237, 233, 254, 0.9) !important;
    color: #5b21b6 !important;
    border: 1px solid #a78bfa;
}

.bg-green-100.text-green-800 {
    background-color: rgba(220, 252, 231, 0.9) !important;
    color: #166534 !important;
    border: 1px solid #34d399;
}

.bg-red-100.text-red-800 {
    background-color: rgba(254, 226, 226, 0.9) !important;
    color: #991b1b !important;
    border: 1px solid #f87171;
}

/* Améliorations pour la modal de détail de commande */
.modal-container {
    display: flex;
    flex-direction: column;
    height: 85vh;
    max-height: 900px;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal-active .modal-container {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.modal-content-scroll {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

.modal-content-scroll::-webkit-scrollbar {
    width: 8px;
}

.modal-content-scroll::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 4px;
}

.modal-content-scroll::-webkit-scrollbar-thumb {
    background-color: #cbd5e0;
    border-radius: 4px;
    border: 2px solid #f7fafc;
}

.modal-content-scroll::-webkit-scrollbar-thumb:hover {
    background-color: #a0aec0;
}

.modal-footer {
    z-index: 10;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
}

/* Styles pour le bouton de suivi de livraison et l'animation */
#track-order-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#track-order-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

#track-order-btn:hover::after {
    transform: translateX(100%);
}

#track-order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tracking-button-active {
    background-color: #b91c1c !important;
    cursor: wait;
    pointer-events: none;
}

/* Style pour le conteneur de la modal */
#order-details-modal {
    transition: opacity 0.3s ease;
    backdrop-filter: blur(3px);
}

/* Amélioration de l'impression */
@media print {
    body * {
        visibility: hidden;
    }
    .modal-container, .modal-container * {
        visibility: visible;
    }
    .modal-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
        box-shadow: none !important;
        overflow: visible !important;
    }
    .modal-header button, .modal-footer {
        display: none !important;
    }
}

/* Optimisations supplémentaires pour l'affichage de la modal */
.status-step .step-icon {
    transition: all 0.3s ease;
    cursor: pointer;
}

.status-step .step-icon:hover {
    transform: scale(1.1);
}

/* Séparateurs entre les sections de la modal */
.modal-content-scroll > div:not(:last-child) {
    position: relative;
}

.modal-content-scroll > div:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
}

/* Effet de focus sur les sections au survol */
.modal-content-scroll > div {
    transition: all 0.3s ease;
}

.modal-content-scroll > div:hover {
    transform: translateY(-2px);
}

/* Effet d'ombre pour les cartes d'information de commande */
[data-tab="info"] > div {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-tab="info"] > div:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Animation supplémentaire pour l'ouverture de la modal */
.modal-active {
    animation-name: modalFadeIn;
    animation-duration: 0.3s;
    animation-fill-mode: forwards;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
