/* Base styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Table styles */
.table-wrapper {
    overflow-x: auto;
    position: relative;
}

table {
    min-width: 1200px;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    position: relative;
    padding: 12px 16px;
    text-align: left;
    white-space: nowrap;
    background-color: #f9fafb;
}

td {
    padding: 12px 16px;
    vertical-align: middle;
    border-top: 1px solid #e5e7eb;
}

/* Column specific styles */
.col-ps, .col-num, .col-nom {
    position: sticky;
    left: 0;
    z-index: 10;
    background-color: white;
}

.col-ps {
    width: 60px;
}

.col-num {
    width: 120px;
}

.col-nom {
    width: 250px;
    min-width: 250px;
}

.col-stat {
    width: 120px;
}

.col-date {
    width: 120px;
}

.col-euro {
    width: 120px;
    text-align: right;
}

.col-av {
    width: 140px;
}

.col-hour {
    width: 150px;
}

.col-commande {
    min-width: 200px;
}

/* Status badges */
.badge-stat {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-apd {
    background-color: #DBEAFE;
    color: #1D4ED8;
}

.badge-etude {
    background-color: #D1FAE5;
    color: #047857;
}

.badge-travaux {
    background-color: #FEF3C7;
    color: #92400E;
}

.badge-finaliser {
    background-color: #E5E7EB;
    color: #4B5563;
}

/* Progress bar */
.avancement-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.avancement-bar {
    flex-grow: 1;
    height: 6px;
    background-color: #E5E7EB;
    border-radius: 3px;
    overflow: hidden;
}

.avancement-fill {
    height: 100%;
    background-color: #10B981;
    border-radius: 3px;
}

/* Table controls */
.table-pager {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-secondary {
    padding: 6px 12px;
    border-radius: 6px;
    background-color: #E5E7EB;
    color: #4B5563;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: #D1D5DB;
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.float-btn {
    padding: 4px 8px;
    border-radius: 4px;
    background-color: white;
    border: 1px solid #D1D5DB;
    cursor: pointer;
    transition: all 0.2s;
}

.float-btn:hover {
    background-color: #F3F4F6;
}

/* Cell actions */
.cell-actions {
    display: none;
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    padding: 2px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

td:hover .cell-actions {
    display: flex;
}

.cell-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s;
}

.cell-btn:hover {
    background-color: #F3F4F6;
    color: #3B82F6;
}

.cell-btn.delete:hover {
    color: #EF4444;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .flex-col.md\:flex-row {
        flex-direction: column;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}