/* Barème IAAF - World Athletics Tables */

.bareme-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.bareme-filter-group {
    flex: 1;
    min-width: 200px;
}

.bareme-filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.bareme-filter-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
}

.bareme-filter-group select:focus {
    outline: none;
    border-color: #0066cc;
}

.bareme-filter-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
}

.bareme-filter-group input[type="text"]:focus {
    outline: none;
    border-color: #0066cc;
}

.bareme-table-wrapper {
    position: relative;
    margin-top: 2rem;
}

.bareme-scroll-top {
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: 0;
    border-radius: 12px 12px 0 0;
}

.bareme-scroll-top-inner {
    height: 1px;
}

.bareme-table-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 600px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.bareme-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.75rem;
}

.bareme-table thead {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 20;
}

.bareme-table th {
    padding: 0.5rem 0.25rem;
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.7rem;
}

.bareme-table th:first-child,
.bareme-table th:nth-child(2) {
    position: sticky;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    z-index: 10;
}

.bareme-table th:first-child {
    left: 0;
    min-width: 140px;
}

.bareme-table th:nth-child(2) {
    left: 140px;
    min-width: 80px;
}

.bareme-table td:first-child,
.bareme-table td:nth-child(2) {
    position: sticky;
    background: white;
    z-index: 5;
}

.bareme-table td:first-child {
    left: 0;
    min-width: 140px;
}

.bareme-table td:nth-child(2) {
    left: 140px;
    min-width: 80px;
}

.bareme-table tbody tr:hover td:first-child,
.bareme-table tbody tr:hover td:nth-child(2) {
    background-color: #f8fafc;
}

.bareme-table th:first-child {
    border-top-left-radius: 12px;
}

.bareme-table th:last-child {
    border-top-right-radius: 12px;
}

.bareme-table td {
    padding: 0.5rem 0.25rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
    font-size: 0.7rem;
}

.bareme-table tbody tr:hover {
    background-color: #f8fafc;
}

.bareme-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.bareme-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

.epreuve-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.75rem;
}

.categories-badge {
    display: inline-block;
    padding: 0.2rem 0.35rem;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
}

/* Performance Level Colors */
.niveau-ia { 
    background: #fef3c7; 
    color: #92400e; 
    font-weight: 600; 
}

.niveau-ib { 
    background: #fef3c7; 
    color: #92400e; 
}

.niveau-n1 { 
    background: #dbeafe; 
    color: #1e40af; 
    font-weight: 600; 
}

.niveau-n2 { 
    background: #dbeafe; 
    color: #1e40af; 
}

.niveau-n3 { 
    background: #dbeafe; 
    color: #1e40af; 
}

.niveau-n4 { 
    background: #dbeafe; 
    color: #1e40af; 
}

.niveau-ir1 { 
    background: #fce7f3; 
    color: #9f1239; 
    font-weight: 600; 
}

.niveau-ir2 { 
    background: #fce7f3; 
    color: #9f1239; 
}

.niveau-ir3 { 
    background: #fce7f3; 
    color: #9f1239; 
}

.niveau-ir4 { 
    background: #fce7f3; 
    color: #9f1239; 
}

.niveau-r1 { 
    background: #d1fae5; 
    color: #065f46; 
    font-weight: 600; 
}

.niveau-r2 { 
    background: #d1fae5; 
    color: #065f46; 
}

.niveau-r3 { 
    background: #d1fae5; 
    color: #065f46; 
}

.niveau-r4 { 
    background: #d1fae5; 
    color: #065f46; 
}

.niveau-r5 { 
    background: #d1fae5; 
    color: #065f46; 
}

.niveau-r6 { 
    background: #d1fae5; 
    color: #065f46; 
}

.niveau-d1 { 
    background: #e5e7eb; 
    color: #374151; 
    font-weight: 600; 
}

.niveau-d2 { 
    background: #e5e7eb; 
    color: #374151; 
}

.niveau-d3 { 
    background: #e5e7eb; 
    color: #374151; 
}

.niveau-d4 { 
    background: #e5e7eb; 
    color: #374151; 
}

.niveau-d5 { 
    background: #e5e7eb; 
    color: #374151; 
}

.niveau-d6 { 
    background: #e5e7eb; 
    color: #374151; 
}

.niveau-d7 { 
    background: #e5e7eb; 
    color: #374151; 
}

.highlighted-cell {
    outline: 4px solid #dc2626;
    outline-offset: -4px;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.2);
    position: relative;
    z-index: 3;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

/* Gender Tabs */
.gender-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
}

.gender-tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.gender-tab:hover {
    color: #0066cc;
}

.gender-tab.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
}

/* Legend */
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.legend-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .bareme-filters {
        flex-direction: column;
    }
    
    .bareme-table {
        font-size: 0.65rem;
    }
    
    .bareme-table th,
    .bareme-table td {
        padding: 0.4rem 0.2rem;
        font-size: 0.6rem;
    }
}
