/* Variables CSS */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --text-color: #333;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f5f5;
}

/* Pages de connexion */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

.login-info ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

/* En-tête */
.header {
    background: var(--dark-color);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--box-shadow);
}

.header h1 {
    font-size: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-logout {
    background: var(--danger-color);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn-logout:hover {
    background: #c0392b;
}

/* Conteneurs principaux */
.admin-container,
.chrono-container,
.results-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Sections admin */
.admin-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.admin-section {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.admin-section h2 {
    margin-bottom: 1rem;
    color: var(--dark-color);
    border-bottom: 2px solid var(--light-color);
    padding-bottom: 0.5rem;
}

/* Formulaires */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.8rem;
}

/* Boutons */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-primary:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-secondary:hover:not(:disabled) {
    background: #27ae60;
    transform: translateY(-2px);
}

/* Interface chronométrage */
.chrono-interface {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.concurrent-select {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.concurrent-info {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.concurrent-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.control-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.chrono-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.chrono-global,
.chrono-recup {
    text-align: center;
    padding: 1.5rem;
    background: var(--dark-color);
    color: white;
    border-radius: var(--border-radius);
}

.chrono-value {
    font-size: 2.5rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    margin-top: 0.5rem;
}

/* Liste des appareils */
.devices-list {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.device-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid #ddd;
}

.device-item:last-child {
    border-bottom: none;
}

/* Tableaux de résultats */
.results-page {
    background: white;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.results-table th,
.results-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.results-table th {
    background: var(--dark-color);
    color: white;
    font-weight: 600;
}

.results-table tr:hover {
    background: var(--light-color);
}

.temps-global {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
}

/* Messages */
.success-message {
    background: var(--secondary-color);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.error-message {
    background: var(--danger-color);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .admin-container,
    .chrono-container {
        padding: 1rem;
    }
    
    .admin-sections {
        grid-template-columns: 1fr;
    }
    
    .control-buttons {
        flex-direction: column;
    }
    
    .chrono-value {
        font-size: 2rem;
    }
    
    .results-table {
        font-size: 0.9rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .chrono-value {
        font-size: 1.5rem;
    }
}

/* Page de déconnexion */
.logout-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.logout-container {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.logout-message {
    margin: 1.5rem 0;
}

.logout-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.logout-buttons a {
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

@media (max-width: 480px) {
    .logout-buttons {
        flex-direction: column;
    }
    
    .logout-buttons a {
        text-align: center;
    }
}

/* Grid des courses */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.course-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
}

.course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.75rem;
}

.course-header h3 {
    margin: 0;
    color: var(--dark-color);
    font-size: 1.25rem;
    flex: 1;
}

.course-status {
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.course-status.active {
    background: var(--secondary-color);
}

.course-status.inactive {
    background: #95a5a6;
}

.course-details {
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.detail-item .label {
    font-weight: 600;
    color: #666;
}

.detail-item .value {
    color: var(--dark-color);
}

.course-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.course-actions .btn-primary,
.course-actions .btn-secondary,
.course-actions .btn-info {
    padding: 0.75rem;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.course-actions .btn-info {
    background: #3498db;
    color: white;
}

.course-actions .btn-info:hover {
    background: #2980b9;
}

.course-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.stat {
    text-align: center;
    padding: 0.5rem;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

.no-courses {
    text-align: center;
    padding: 3rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.no-courses p {
    margin: 0.5rem 0;
    color: #6c757d;
}

/* Responsive */
@media (max-width: 768px) {
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .course-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .course-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .course-card {
        padding: 1rem;
    }
    
    .course-actions {
        grid-template-columns: 1fr;
    }
}

/* Layout en deux colonnes pour admin */
.admin-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.admin-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Grid des courses dans la colonne de droite */
.courses-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Scrollbar personnalisée */
.courses-grid::-webkit-scrollbar {
    width: 6px;
}

.courses-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.courses-grid::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.courses-grid::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Cartes de course dans la colonne */
.course-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.75rem;
}

.course-header h3 {
    margin: 0;
    color: var(--dark-color);
    font-size: 1.1rem;
    flex: 1;
}

.course-status {
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.course-details {
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

.detail-item .label {
    font-weight: 600;
    color: #666;
}

.detail-item .value {
    color: var(--dark-color);
}

.course-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-top: 1rem;
}

.course-actions .btn-primary,
.course-actions .btn-secondary {
    padding: 0.6rem;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.course-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin: 0.75rem 0;
}

.stat {
    text-align: center;
    padding: 0.25rem;
}

.stat-number {
    display: block;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
}

.no-courses {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.no-courses p {
    margin: 0.5rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .admin-sections {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .admin-column {
        gap: 1.5rem;
    }
    
    .courses-grid {
        max-height: none;
        overflow-y: visible;
    }
}

@media (max-width: 768px) {
    .course-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .course-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .course-card {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .course-actions {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 1.1rem;
    }
    
    .detail-item {
        font-size: 0.85rem;
    }
}

/* Animation de chargement */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.course-card {
    animation: fadeInUp 0.5s ease forwards;
}

/* Affichage des sélections actives */
.selections-list {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

.device-selection {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.selection-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.selection-info strong {
    color: var(--dark-color);
    font-size: 0.9rem;
}

.selection-info span {
    color: #666;
    font-size: 0.85rem;
}

/* Mise en évidence de la sélection courante */
.current-selection {
    background: #e8f4fd;
    border-left: 4px solid var(--primary-color);
}

/* Animation pour les nouvelles sélections */
@keyframes highlightSelection {
    0% { background-color: #ffffcc; }
    100% { background-color: white; }
}

.new-selection {
    animation: highlightSelection 2s ease;
}

option.current-selection {
    background-color: var(--primary-color);
    color: white;
}

/* Pour les navigateurs qui supportent ::before dans les options */
select option[class="current-selection"] {
    background: var(--primary-color) linear-gradient(0deg, var(--primary-color) 0%, var(--primary-color) 100%);
    color: white;
}

.btn-info {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-info:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-danger:hover:not(:disabled) {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-danger:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.device-time {
    display: block;
    font-size: 0.75rem;
    color: #999;
    font-family: 'Courier New', monospace;
    margin-top: 0.25rem;
}

.device-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.device-item:last-child {
    border-bottom: none;
}

.device-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.device-id {
    font-weight: 600;
    color: var(--dark-color);
}

.device-selection-info {
    font-size: 0.85rem;
    color: var(--primary-color);
}

.device-status {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.device-status.online {
    background: var(--secondary-color);
    color: white;
}

.device-status.offline {
    background: #e67e22;
    color: white;
}

.current-device {
    background: #e8f4fd;
    border-left: 3px solid var(--primary-color);
}

.device-status {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
}

.device-status.online {
    background: var(--secondary-color);
    color: white;
}

.device-status.sync {
    background: var(--warning-color);
    color: white;
}

.device-status.offline {
    background: #e67e22;
    color: white;
}

.current-device {
    background: #e8f4fd;
    border-left: 3px solid var(--primary-color);
}

.no-devices {
    text-align: center;
    padding: 1rem;
    color: #999;
    font-style: italic;
}

/* Sélections actives */
.selections-list {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
    border: 2px solid var(--light-color);
}

.selections-list h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.device-selection {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    color: white;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.selection-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.selection-info strong {
    font-size: 0.9rem;
    opacity: 0.9;
}

.selection-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
}

.dossard-badge {
    background: rgba(255,255,255,0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
}

.concurrent-name {
    font-weight: 600;
}

.selection-indicator {
    font-size: 1.5rem;
    color: var(--secondary-color);
    animation: pulse 0.6s ease infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.no-selections {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-style: italic;
    background: var(--light-color);
    border-radius: 6px;
}

/* Affichage personnel de la sélection */
#concurrent-info {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

#concurrent-info h3 {
    color: white;
}

#concurrent-info .concurrent-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

#concurrent-info .concurrent-details p {
    background: rgba(255,255,255,0.1);
    padding: 0.75rem;
    border-radius: 6px;
    margin: 0;
}

#concurrent-info strong {
    color: #fff;
}

#concurrent-info span {
    color: #f0f0f0;
}

.concurrent-row.en-course {
    background-color: #fff9e6 !important;
}

.concurrent-row.en-course td {
    font-weight: 600;
}

.results-table td {
    transition: color 0.3s ease;
}

.last-update {
    font-size: 0.9rem;
    color: #666;
}

.search-filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.sort-toggle {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.sort-toggle:hover {
    background: #2980b9;
}

th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

th.sortable:hover {
    background-color: #f0f0f0;
}

.sort-indicator {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .search-filter-bar {
        flex-direction: column;
    }
    
    .search-box {
        min-width: 100%;
    }
    
    .filters {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-select,
    .sort-toggle {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 640px) {
    #concurrent-info h3 {
        display: none;
    }
    
    #concurrent-info {
        padding: 1rem;
        cursor: pointer;
        display: flex !important;
        justify-content: space-between;
    }
    
    #concurrent-info .concurrent-details {
        display: none !important;
    }
    
    #concurrent-info.show-details .concurrent-details {
        display: grid !important;
    }
}

.concurrent-buttons-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.concurrent-buttons-section h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.2rem;
}

.buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.button-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-concurrent {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: left;
}

.btn-concurrent:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-concurrent:active {
    transform: translateY(0);
}

.btn-concurrent.btn-secondary {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.btn-concurrent.btn-secondary:hover {
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.concurrent-time {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    font-weight: 500;
}

.timer-display {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 1rem 0;
    animation: timerPulse 1s infinite;
}

@keyframes timerPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.btn-concurrent.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
    animation: warningPulse 0.8s infinite;
}

@keyframes warningPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 4px 16px rgba(243, 156, 18, 0.5);
    }
}

.btn-concurrent.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    animation: dangerPulse 0.6s infinite;
}

@keyframes dangerPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 4px 16px rgba(231, 76, 60, 0.6);
    }
}

.item-dnf {
    background: #f8d7da !important;
    border-left: 4px solid #dc3545;
}

.item-dnf .total-value {
    color: #dc3545;
    font-weight: bold;
}

.item-number.running {
    animation: pulse 1s infinite;
    color: #f39c12;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.time-value {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.1s ease;
}

.time-value.running {
    animation: timePulse 0.5s infinite;
    color: #f39c12;
}

@keyframes timePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes warningPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 4px 16px rgba(243, 156, 18, 0.5);
    }
}

@keyframes dangerPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 4px 16px rgba(231, 76, 60, 0.6);
    }
}

#modal-add-concurrent .modal-content {
    animation: slideIn 0.3s ease;
}

#modal-add-concurrent .form-group {
    margin-bottom: 1rem;
}

#modal-add-concurrent .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

#modal-add-concurrent .form-group input,
#modal-add-concurrent .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

#modal-add-concurrent .form-group input:focus,
#modal-add-concurrent .form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Ajouter au style.css ou dans le head du admin.php */

.concurrent-search-box {
    margin-bottom: 1rem;
}

.concurrent-search-box input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    max-width: 400px;
}

.concurrent-search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.concurrent-list-table {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.concurrent-list-header {
    display: grid;
    grid-template-columns: 80px 1fr 120px 100px 150px;
    gap: 1rem;
    padding: 1rem;
    background: #f5f5f5;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
    align-items: center;
}

.concurrent-list-body {
    max-height: 500px;
    overflow-y: auto;
}

.concurrent-list-row {
    display: grid;
    grid-template-columns: 80px 1fr 120px 100px 150px;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    align-items: center;
    transition: background 0.2s;
}

.concurrent-list-row:hover {
    background: #f9f9f9;
}

.concurrent-list-row:nth-child(even) {
    background: #fafafa;
}

.col-dossard {
    text-align: center;
    font-weight: 600;
}

.col-nom {
    min-width: 0;
}

.concurrent-name {
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.concurrent-licence {
    font-size: 0.85rem;
    color: #999;
    margin-top: 0.25rem;
}

.col-categorie {
    text-align: center;
}

.col-sexe {
    text-align: center;
    font-size: 0.9rem;
}

.col-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-edit,
.btn-delete {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-edit:hover {
    background: #e3f2fd;
    transform: scale(1.1);
}

.btn-delete:hover {
    background: #ffebee;
    transform: scale(1.1);
}

/* Modal édition */
.modal-edit-concurrent {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-edit-concurrent.active {
    display: flex;
}

.modal-edit-concurrent-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    animation: slideInModal 0.3s ease;
}

@keyframes slideInModal {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-edit-concurrent-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.modal-edit-concurrent-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.modal-edit-concurrent-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-edit-concurrent-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.modal-edit-concurrent-form {
    padding: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row.full {
    grid-template-columns: 1fr;
}

.form-group-half,
.form-group-full {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group-full {
    grid-column: 1 / -1;
}

.modal-edit-concurrent-form label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.modal-edit-concurrent-form input,
.modal-edit-concurrent-form select {
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s;
}

.modal-edit-concurrent-form input:focus,
.modal-edit-concurrent-form select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-edit-concurrent-footer {
    display: flex;
    gap: 1rem;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid #ddd;
    justify-content: flex-end;
}

.modal-edit-concurrent-footer button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-edit-concurrent-footer .btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.modal-edit-concurrent-footer .btn-secondary:hover {
    background: #d5dbdb;
}

.modal-edit-concurrent-footer .btn-primary {
    background: #667eea;
    color: white;
    min-width: 150px;
}

.modal-edit-concurrent-footer .btn-primary:hover {
    background: #5568d3;
}

@media (max-width: 768px) {
    .concurrent-list-header,
    .concurrent-list-row {
        grid-template-columns: 60px 1fr 80px;
    }

    .col-categorie,
    .col-sexe {
        display: none;
    }

    .col-actions {
        gap: 0.25rem;
    }

    .modal-edit-concurrent-content {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .concurrent-list-header,
    .concurrent-list-row {
        grid-template-columns: 50px 1fr 80px;
        gap: 0.5rem;
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .concurrent-list-header {
        padding: 0.75rem;
    }

    .col-dossard {
        font-size: 0.85rem;
    }

    .concurrent-name {
        font-size: 0.9rem;
    }

    .concurrent-licence {
        font-size: 0.8rem;
    }

    .btn-edit,
    .btn-delete {
        font-size: 1rem;
        padding: 0.4rem;
    }

    .modal-edit-concurrent-content {
        width: 98%;
    }

    .modal-edit-concurrent-form {
        padding: 1rem;
    }

    .form-row {
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }
	
	
/* } */