:root {
    --primary-color: #6366f1;
    --secondary-color: #4f46e5;
    --background-color: #f8fafc;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
}

h1 {
    text-align: center;
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.05);
    overflow: hidden;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    position: relative;
}

th:hover {
    background-color: #e2e8f0;
}

td img {
    width: 40px;
    height: 40px;
    vertical-align: middle;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

td img:hover {
    transform: scale(1.1);
}

input[type="number"] {
    width: 120px;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

tr:hover {
    background-color: #f8fafc;
}

.sorted-asc::after {
    content: " ▲";
    color: var(--primary-color);
    font-size: 0.8em;
}

.sorted-desc::after {
    content: " ▼";
    color: var(--primary-color);
    font-size: 0.8em;
}

.actions {
    text-align: center;
    margin: 1rem 0 2rem;
}

.clear-button {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.clear-button:hover {
    background-color: #dc2626;
}

/* Styles pour la modale */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 400px;
    width: 90%;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal h2 {
    margin: 0 0 1rem;
    color: var(--text-color);
    font-size: 1.5rem;
}

.modal p {
    margin: 0 0 1.5rem;
    color: #4b5563;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-button.confirm {
    background-color: #ef4444;
    color: white;
}

.modal-button.confirm:hover {
    background-color: #dc2626;
}

.modal-button.cancel {
    background-color: #e5e7eb;
    color: #374151;
}

.modal-button.cancel:hover {
    background-color: #d1d5db;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 0.75rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    td img {
        width: 32px;
        height: 32px;
    }
}