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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    padding-top: 80px;
    color: #333;
}

/* Navigation Menu */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo a {
    font-size: 1.8em;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.nav-logo a:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 10px;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95em;
}

.nav-item a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.nav-item.active a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.nav-icon {
    font-size: 1.2em;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #667eea;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.stats-circles {
    background: #f8f9fa;
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    border-bottom: 2px solid #e9ecef;
    flex-wrap: wrap;
}

.circle-stat {
    width: 280px;
    min-height: 280px;
    border-radius: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.circle-stat::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.circle-stat:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.circle-in {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 10px 30px rgba(17, 153, 142, 0.3);
}

.circle-in:hover {
    box-shadow: 0 15px 40px rgba(17, 153, 142, 0.4);
}

.circle-out {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    box-shadow: 0 10px 30px rgba(235, 51, 73, 0.3);
}

.circle-out:hover {
    box-shadow: 0 15px 40px rgba(235, 51, 73, 0.4);
}

.circle-content {
    text-align: center;
    color: white;
    z-index: 1;
    position: relative;
}

.circle-number {
    font-size: 3em;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.circle-label {
    font-size: 1.1em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    opacity: 0.95;
}

.circle-subtitle {
    font-size: 0.85em;
    opacity: 0.8;
    font-weight: 400;
    margin-top: 5px;
    margin-bottom: 15px;
}

.circle-percentages {
    margin-top: 15px;
    text-align: left;
    font-size: 0.75em;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 5px;
}

.circle-percentages::-webkit-scrollbar {
    width: 4px;
}

.circle-percentages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.circle-percentages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-name {
    flex: 1;
    font-size: 0.85em;
    text-align: left;
    margin-right: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stat-value {
    font-weight: 700;
    font-size: 0.95em;
    color: #fff;
    min-width: 45px;
    text-align: right;
    margin-right: 8px;
}

.stat-count {
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.7);
    min-width: 55px;
    text-align: right;
}

.pagination-controls {
    padding: 20px 40px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.pagination-info span {
    font-size: 0.95em;
    color: #6c757d;
    font-weight: 500;
}

.per-page-select {
    padding: 8px 15px;
    border: 2px solid #667eea;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.per-page-select:hover {
    background: #f8f9fa;
    border-color: #764ba2;
}

.per-page-select:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.results-info {
    color: #667eea !important;
    font-weight: 600 !important;
}

.pagination {
    padding: 30px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.pagination-btn:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    opacity: 0.9;
}

.pagination-btn.disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-number {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95em;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pagination-number button {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    width: 100%;
    height: 100%;
    padding: 0;
}

.pagination-number:hover:not(.active) {
    background: #f8f9fa;
    border-color: #667eea;
    transform: translateY(-2px);
}

.pagination-number.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.pagination-dots {
    padding: 0 5px;
    color: #6c757d;
    font-weight: 600;
}

.loading-indicator {
    padding: 60px 40px;
    text-align: center;
    display: none;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-indicator p {
    color: #667eea;
    font-weight: 600;
    margin-top: 10px;
}

.table-container {
    padding: 30px 40px;
    overflow-x: auto;
    position: relative;
    min-height: 200px;
}

.clients-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.clients-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.clients-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

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

.clients-table tbody tr:hover {
    background-color: #f8f9fa;
}

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

.clients-table td {
    padding: 15px 12px;
    font-size: 0.95em;
    vertical-align: middle;
}

.no-data {
    text-align: center;
    padding: 40px !important;
    color: #6c757d;
    font-style: italic;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
}

.badge-status {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-master {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
        padding-top: 70px;
    }

    .nav-container {
        padding: 0 20px;
        height: 60px;
    }

    .nav-logo a {
        font-size: 1.5em;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        gap: 0;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-item {
        width: 100%;
    }

    .nav-item a {
        width: 100%;
        justify-content: flex-start;
        padding: 15px 20px;
    }

    .nav-text {
        display: block;
    }

    header {
        padding: 20px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .table-container {
        padding: 15px;
    }

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

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

    .stats-circles {
        padding: 30px 20px;
        gap: 30px;
    }

    .circle-stat {
        width: 160px;
        height: 160px;
    }

    .circle-number {
        font-size: 2.2em;
    }

    .circle-label {
        font-size: 0.95em;
    }

    .circle-subtitle {
        font-size: 0.75em;
    }

    .pagination-controls {
        padding: 15px 20px;
        flex-direction: column;
        align-items: flex-start;
    }

    .pagination-info {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .pagination {
        padding: 20px 15px;
    }

    .pagination-wrapper {
        gap: 5px;
    }

    .pagination-btn {
        padding: 8px 12px;
        font-size: 0.85em;
    }

    .pagination-number {
        min-width: 35px;
        height: 35px;
        padding: 0 8px;
        font-size: 0.85em;
    }
}

/* Scrollbar personnalisée */
.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

