* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #0f0f11;
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Améliorations mobile */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    touch-action: manipulation;
}

.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at center, #333 1px, transparent 1px),
        linear-gradient(135deg, #0f0f11 0%, #1a1a1d 100%);
    background-size: 30px 30px, 100% 100%;
    background-position: 0 0, 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.intro-screen.slide-up {
    transform: translateY(-100vh);
    opacity: 0;
}

.intro-container {
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 80px;
}

.intro-logo {
    height: 120px;
    width: auto;
    position: relative;
    z-index: 2;
}

.wave {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(136, 46, 240, 0.3);
    border-radius: 50%;
    animation: waveExpand 4s ease-out infinite;
    pointer-events: none;
    will-change: transform, opacity;
}

.wave1 {
    animation-delay: 0s;
}

.wave2 {
    animation-delay: 2s;
}

@keyframes waveExpand {
    0% {
        width: 60px;
        height: 60px;
        opacity: 0.8;
    }
    70% {
        opacity: 0.2;
    }
    100% {
        width: 80vmax;
        height: 80vmax;
        opacity: 0;
    }
}

.intro-text {
    color: #ffffff;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.intro-text p {
    font-size: 1.5rem;
    font-weight: 300;
    animation: textPulse 2s ease-in-out infinite;
    letter-spacing: 2px;
    text-transform: uppercase;
}

@keyframes textPulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

.main-site {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.main-site.show {
    opacity: 1;
    transform: translateY(0);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.header-logo {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.header-logo .logo {
    height: 80px;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 80px;
}

@media (max-width: 768px) {
    .header-logo {
        margin-bottom: 20px;
        padding: 0 15px;
    }
    
    .header-logo .logo {
        max-height: 60px;
        width: auto;
    }
}

@media (max-width: 480px) {
    .header-logo {
        margin-bottom: 15px;
        padding: 0 10px;
    }
    
    .header-logo .logo {
        max-height: 50px;
        width: auto;
    }
}

.title-section {
    text-align: center;
    margin-bottom: 40px;
}

.title-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #882ef0;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

.title-section p {
    font-size: 1.125rem;
    color: #ffffff;
    opacity: 0.8;
    font-weight: 400;
}

.search-section {
    background: rgba(255, 255, 255, 0.03);
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

#searchInput {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 14px;
    background: #0f0f11;
    color: #ffffff;
    transition: all 0.2s ease;
    max-width: 400px;
}

#searchInput:focus {
    outline: none;
    border-color: #882ef0;
    box-shadow: 0 0 0 2px rgba(136, 46, 240, 0.2);
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#searchBtn {
    padding: 10px 14px;
    background: #882ef0;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

#searchBtn:hover {
    background: rgba(136, 46, 240, 0.8);
}

#clearFilters {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#clearFilters:hover {
    background: rgba(255, 255, 255, 0.2);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.stat-item:hover {
    border-color: rgba(136, 46, 240, 0.3);
    background: rgba(136, 46, 240, 0.05);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #882ef0;
    margin-bottom: 4px;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
}

th:nth-child(4), td:nth-child(4) {
    max-width: 180px;
    width: 180px;
    padding-right: 24px;
}

th:nth-child(5), td:nth-child(5) {
    padding-left: 24px;
}

th {
    background: rgba(136, 46, 240, 0.1);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(136, 46, 240, 0.2);
    position: sticky;
    top: 0;
    z-index: 10;
}

th.sortable {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    position: relative;
}

th.sortable:hover {
    background: rgba(136, 46, 240, 0.15);
}

.sort-arrow {
    opacity: 0.5;
    margin-left: 8px;
    font-size: 0.75rem;
    color: #882ef0;
}

th.sortable.sorted-asc .sort-arrow {
    opacity: 1;
}

th.sortable.sorted-asc .sort-arrow::after {
    content: '↑';
}

th.sortable.sorted-desc .sort-arrow {
    opacity: 1;
}

th.sortable.sorted-desc .sort-arrow::after {
    content: '↓';
}

tbody tr {
    transition: all 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

tbody tr:hover {
    background: rgba(136, 46, 240, 0.05);
}

tbody tr:last-child {
    border-bottom: none;
}

.clean-status {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    min-width: 70px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.clean-1 {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.clean-0 {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.header-column {
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    color: #882ef0;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid rgba(136, 46, 240, 0.2);
    max-width: 170px;
    width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.size-column {
    font-weight: 600;
    color: #882ef0;
    font-variant-numeric: tabular-nums;
}

.loading {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

.spinner {
    width: 32px;
    height: 32px;
    margin: 0 auto 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-left: 2px solid #882ef0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-results {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 20px 0;
    color: rgba(255, 255, 255, 0.7);
}

.no-results p:first-child {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: #ffffff;
}

footer {
    text-align: center;
    padding: 24px;
    background: hsl(217.2 32.6% 17.5%);
    color: hsl(215 20.2% 65.1%);
    margin-top: 40px;
    border-radius: 12px;
    border: 1px solid hsl(217.2 32.6% 17.5%);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
    }
    
    .search-section {
        max-width: 100%;
        padding: 16px;
    }
    
    .search-container {
        flex-direction: column;
        gap: 12px;
    }
    
    #searchInput {
        max-width: 100%;
    }
    
    .stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 16px;
    }
    
    .stat-item {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    table {
        min-width: 800px;
    }
    
    th, td {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    #clearFilters {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}

/* Mobile très petit (≤ 480px) */
@media (max-width: 480px) {
    .container {
        padding: 15px 10px;
    }
    
    .search-section {
        padding: 12px;
        margin-bottom: 20px;
    }
    
    .search-container {
        gap: 10px;
    }
    
    #searchInput {
        font-size: 16px; /* Évite le zoom sur iOS */
        padding: 12px;
    }
    
    #searchBtn, #clearFilters {
        padding: 12px;
        font-size: 14px;
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-item {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    table {
        min-width: 600px;
        font-size: 0.7rem;
    }
    
    th, td {
        padding: 6px 8px;
    }
    
    .table-container {
        -webkit-overflow-scrolling: touch;
    }
    
    .intro-screen {
        padding: 20px;
    }
    
    .intro-logo {
        height: 80px;
        max-width: 90%;
    }
    
    .intro-text p {
        font-size: 1.2rem;
    }
}

/* Mobile très très petit (≤ 320px) */
@media (max-width: 320px) {
    .container {
        padding: 10px 5px;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        padding: 12px;
    }
    
    table {
        min-width: 500px;
        font-size: 0.65rem;
    }
    
    th, td {
        padding: 4px 6px;
    }
    
    .intro-logo {
        height: 60px;
    }
    
    .intro-text p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 16px 12px;
    }
    
    .search-section {
        padding: 12px;
    }
    
    #searchInput, #searchBtn, #clearFilters {
        padding: 8px 12px;
        font-size: 0.875rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    th, td {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    
    .header-column {
        max-width: 140px;
        font-size: 0.7rem;
    }
    
    .clean-status {
        font-size: 0.7rem;
        padding: 2px 6px;
        min-width: 60px;
    }
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(136, 46, 240, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(136, 46, 240, 0.5);
}

*:focus {
    outline: 2px solid #882ef0;
    outline-offset: 2px;
}

button:focus,
input:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(136, 46, 240, 0.2);
}

.stat-number {
    transition: color 0.3s ease;
}

tbody td {
    color: #ffffff;
}

tbody td:first-child {
    font-weight: 600;
}

tbody td:first-child strong {
    color: #ffffff;
}

tbody tr td:nth-child(2),
tbody tr td:nth-child(3) {
    font-variant-numeric: tabular-nums;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}