/* ========================================
   RESULTS PAGE STYLES
   ======================================== */

/* Hero Section */
.results-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
}

.results-hero h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
    font-family: 'Outfit', sans-serif;
}

.results-hero p {
    font-size: 1.1em;
    opacity: 0.95;
}

/* Results Container */
.results-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ========================================
   FILTERS SECTION
   ======================================== */

.filters-section {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filters-section h2 {
    font-size: 1.5em;
    margin-bottom: 25px;
    color: #333;
    font-family: 'Outfit', sans-serif;
}

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

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group.full-width {
    grid-column: 1 / -1;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 0.95em;
}

.filter-select,
.search-input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background-color: white;
}

.filter-select:hover,
.search-input:hover {
    border-color: #667eea;
}

.filter-select:focus,
.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Results Summary */
.results-summary {
    background: #f5f7fa;
    padding: 15px 20px;
    border-radius: 6px;
    color: #666;
    font-size: 0.95em;
    font-weight: 500;
}

.results-summary span:first-child {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1em;
}

/* ========================================
   STATISTICS SECTION
   ======================================== */

.statistics-section {
    margin-bottom: 40px;
}

.statistics-section h2 {
    font-size: 1.5em;
    margin-bottom: 25px;
    color: #333;
    font-family: 'Outfit', sans-serif;
}

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

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.stat-label {
    font-size: 0.85em;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    font-weight: 600;
}

.stat-value {
    font-size: 2em;
    font-weight: 700;
    color: #667eea;
    font-family: 'Outfit', sans-serif;
}

/* ========================================
   TABLE SECTION
   ======================================== */

.table-section {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
}

.pagination-top {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95em;
    color: #666;
}

.per-page-select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95em;
    cursor: pointer;
    background-color: white;
}

.export-buttons {
    display: flex;
    gap: 10px;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    padding: 12px 16px;
    z-index: 1;
    border-radius: 6px;
    top: 100%;
    left: 0;
    margin-top: 8px;
}

.dropdown-content a {
    color: #333;
    padding: 10px 0;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
}

.dropdown-content a:hover {
    color: #667eea;
    padding-left: 5px;
}

.dropdown-content a:first-child {
    border-top: none;
}

.dropdown-content a {
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Table Wrapper */
.table-wrapper {
    overflow-x: auto;
    margin-bottom: 25px;
    border-radius: 6px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.results-table thead {
    background: #f5f7fa;
    border-bottom: 2px solid #e0e0e0;
}

.results-table th {
    padding: 15px;
    text-align: left;
    font-weight: 700;
    color: #333;
    user-select: none;
}

.results-table th.sortable {
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}

.results-table th.sortable:hover {
    background: #e8eef5;
    color: #667eea;
}

.results-table th.sortable::after {
    content: ' ⇅';
    opacity: 0.3;
    font-size: 0.8em;
}

.results-table th.sortable.asc::after {
    content: ' ↑';
    opacity: 1;
    color: #667eea;
}

.results-table th.sortable.desc::after {
    content: ' ↓';
    opacity: 1;
    color: #667eea;
}

.results-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.results-table tbody tr:hover {
    background: #f9fafb;
}

.results-table td {
    padding: 14px 15px;
    color: #555;
}

.results-table td:first-child {
    font-weight: 700;
    color: #667eea;
    min-width: 60px;
}

.results-table td:nth-child(2) {
    color: #999;
    font-size: 0.9em;
    min-width: 80px;
}

.results-table td:nth-child(3) {
    font-weight: 600;
    color: #333;
    min-width: 150px;
}

.results-table td:nth-child(4) {
    background: #f9fafb;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    color: #667eea;
    min-width: 100px;
}

.results-table td:nth-child(5) {
    font-weight: 600;
    color: #333;
    min-width: 90px;
}

.results-table td:nth-child(6) {
    color: #ff9800;
    font-weight: 600;
    min-width: 80px;
}

/* ========================================
   LIGNES FÉMININES - ROSE
   ======================================== */

.results-table tbody tr.female-row {
    color: #e91e8c;
}

.results-table tbody tr.female-row td {
    color: #e91e8c;
    font-weight: 500;
}

.results-table tbody tr.female-row td:first-child {
    color: #e91e8c;
}

.results-table tbody tr.female-row td:nth-child(4) {
    background: #fce4ec;
    color: #e91e8c;
}

.results-table tbody tr.female-row:hover {
    background: #fce4ec;
}

/* Empty State */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-results-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.no-results-text {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 10px;
}

.no-results-subtext {
    color: #999;
    font-size: 0.95em;
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.pagination-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #667eea;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.pagination-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

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

.pagination-info {
    display: flex;
    gap: 10px;
    font-size: 0.95em;
    color: #666;
}

.pagination-info span {
    font-weight: 600;
}

/* ========================================
   BACK LINK
   ======================================== */

.back-link {
    margin: 40px 0;
    text-align: center;
}

.back-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    transition: color 0.3s ease;
}

.back-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .results-hero h1 {
        font-size: 1.8em;
    }

    .results-hero p {
        font-size: 0.95em;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination-top,
    .export-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .results-table {
        font-size: 0.85em;
    }

    .results-table th,
    .results-table td {
        padding: 10px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-value {
        font-size: 1.5em;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .pagination-btn {
        flex: 1;
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .results-container {
        padding: 10px;
    }

    .filters-section,
    .table-section {
        padding: 20px;
    }

    .results-hero {
        padding: 40px 15px;
        margin-bottom: 20px;
    }

    .results-hero h1 {
        font-size: 1.5em;
    }

    .filters-grid {
        gap: 15px;
    }

    .results-table {
        font-size: 0.75em;
    }

    .results-table th,
    .results-table td {
        padding: 8px 5px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .table-controls {
        gap: 10px;
    }

    .export-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        padding: 8px 15px;
    }

    .pagination-btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .results-hero,
    .filters-section,
    .pagination,
    .back-link,
    .table-controls {
        display: none;
    }

    .results-table {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .results-table tbody tr {
        page-break-inside: avoid;
    }

    .results-table thead {
        background: white;
        border: 1px solid #ccc;
    }
}

/* ========================================
   DARK MODE (Optional)
   ======================================== */

@media (prefers-color-scheme: dark) {
    .filters-section,
    .table-section,
    .stat-card {
        background: #2a2a2a;
        color: #e0e0e0;
    }

    .filters-section h2,
    .statistics-section h2,
    .results-table th {
        color: #f5f5f5;
    }

    .filter-select,
    .search-input,
    .per-page-select {
        background: #333;
        color: #e0e0e0;
        border-color: #444;
    }

    .results-table tbody tr {
        border-bottom-color: #444;
    }

    .results-table tbody tr:hover {
        background: #333;
    }

    .results-summary {
        background: #333;
        color: #bbb;
    }

    .results-table th {
        background: #333;
        border-bottom-color: #444;
    }

    .results-table td:nth-child(4) {
        background: #333;
    }

    /* Lignes féminines en dark mode */
    .results-table tbody tr.female-row:hover {
        background: #d4145a;
        opacity: 0.8;
    }
}