/* Reset et base */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
	color: #1e293b;
	line-height: 1.6;
	min-height: 100vh;
}

/* Header moderne */
.header-container {
	background: white;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	border-bottom: 1px solid #e2e8f0;
	position: sticky;
	top: 0;
	z-index: 100;
}

.header-content {
	max-width: 1200px;
	margin: 0 auto;
	padding: 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
}

.race-info {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.race-logo {
	width: 4rem;
	height: 4rem;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid #22c55e;
	box-shadow: 0 4px 8px rgba(34, 197, 94, 0.2);
}

.race-details h1.race-title {
	font-size: 1.875rem;
	font-weight: 800;
	color: #1e293b;
	margin-bottom: 0.25rem;
}

.race-distance {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: #64748b;
	font-weight: 600;
}

.race-distance::before {
	content: "📍";
	font-size: 1rem;
}

.header-stats {
	display: flex;
	gap: 2rem;
}

.stat-item {
	text-align: center;
}

.stat-label {
	display: block;
	font-size: 0.875rem;
	color: #64748b;
	font-weight: 500;
	margin-bottom: 0.25rem;
}

.stat-value {
	display: block;
	font-size: 1.25rem;
	font-weight: 700;
	color: #1e293b;
}

/* Section de recherche */
.search-container {
	background: white;
	border-radius: 1rem;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
	border: 1px solid #e2e8f0;
	margin: 2rem auto;
	max-width: 600px;
	padding: 2rem;
}

.search-content {
	text-align: center;
}

.search-title {
	font-size: 1.5rem;
	font-weight: 700;
	color: #1e293b;
	margin-bottom: 0.5rem;
}

.search-subtitle {
	color: #64748b;
	margin-bottom: 1.5rem;
}

.search-form {
	max-width: 400px;
	margin: 0 auto;
}

.search-input-container {
	position: relative;
	margin-bottom: 1rem;
}

.search-input {
	width: 100%;
	padding: 1rem 1.5rem;
	font-size: 1.125rem;
	font-weight: 600;
	text-align: center;
	border: 2px solid #e2e8f0;
	border-radius: 0.75rem;
	background: #f8fafc;
	transition: all 0.2s ease;
	outline: none;
}

.search-input:focus {
	border-color: #22c55e;
	background: white;
	box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

.search-button {
	width: 100%;
	background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
	color: white;
	border: none;
	padding: 1rem 2rem;
	font-size: 1rem;
	font-weight: 600;
	border-radius: 0.75rem;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.search-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
}

.search-button:active {
	transform: translateY(0);
}

/* Header des résultats */
.results-header {
	background: white;
	border-radius: 0.75rem 0.75rem 0 0;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	border: 1px solid #e2e8f0;
	margin: 2rem auto 0;
	max-width: 1200px;
	padding: 1rem;
}

.results-header-content {
	display: none;
}

/* Container des résultats */
.results-container {
	max-width: 1200px;
	margin: 0 auto 2rem;
	background: white;
	border-radius: 0 0 0.75rem 0.75rem;
	border: 1px solid #e2e8f0;
	border-top: none;
}

/* Cartes des participants */
.participant-card {
	border-bottom: 1px solid #f1f5f9;
	transition: all 0.3s ease;
	position: relative;
}

.participant-card:last-child {
	border-bottom: none;
	border-radius: 0 0 0.75rem 0.75rem;
}

.participant-card:hover {
	background: #f8fafc;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-1px);
}

.participant-card.highlighted {
	background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
	border-left: 4px solid #22c55e;
	box-shadow: 0 8px 25px rgba(34, 197, 94, 0.2);
	transform: scale(1.02);
}

/* Layout mobile */
.mobile-layout {
	display: block;
	padding: 1.5rem;
}

.mobile-header {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	margin-bottom: 1rem;
}

.participant-info {
	flex: 1;
}

.participant-name {
	font-size: 1.125rem;
	font-weight: 700;
	color: #1e293b;
	margin-bottom: 0.25rem;
}

.participant-club {
	color: #64748b;
	font-size: 0.875rem;
}

.mobile-stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.stat-box {
	background: #f1f5f9;
	border-radius: 0.5rem;
	padding: 1rem;
}

.time-stat {
	background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.stat-label {
	font-size: 0.75rem;
	font-weight: 600;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.25rem;
}

.stat-value {
	font-size: 1.25rem;
	font-weight: 700;
	color: #1e293b;
}

.stat-speed {
	font-size: 0.875rem;
	color: #64748b;
	margin-top: 0.25rem;
}

.mobile-rankings {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.ranking-item {
	background: white;
	border-radius: 0.5rem;
	padding: 0.75rem;
	text-align: center;
}

.sex-ranking {
	background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.category-ranking {
	background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
}

.ranking-label {
	font-size: 0.75rem;
	font-weight: 600;
	color: #64748b;
	text-transform: uppercase;
	margin-bottom: 0.25rem;
}

.ranking-value {
	font-weight: 700;
	color: #1e293b;
}

/* Layout desktop */
.desktop-layout {
	display: none;
}

/* Badges de classement */
.rank-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 0.75rem;
	font-weight: 700;
	font-size: 1.125rem;
	color: white;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.rank-gold {
	background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.rank-silver {
	background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
}

.rank-bronze {
	background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
}

.rank-default {
	background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* Message aucun résultat */
.no-results {
	text-align: center;
	padding: 3rem 2rem;
	background: white;
	border-radius: 0.75rem;
	margin: 2rem auto;
	max-width: 600px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.no-results-icon {
	font-size: 3rem;
	margin-bottom: 1rem;
}

.no-results-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #1e293b;
	margin-bottom: 0.5rem;
}

.no-results-text {
	color: #64748b;
}

/* Responsive Design */
@media (min-width: 768px) {
	.header-content {
		padding: 2rem;
	}
	
	.race-logo {
		width: 5rem;
		height: 5rem;
	}
	
	.race-details h1.race-title {
		font-size: 2.25rem;
	}
	
	.search-container {
		margin: 3rem auto;
		padding: 3rem;
	}
	
	.results-header-content {
		display: grid;
		grid-template-columns: 1fr 2fr 1fr 1fr 1fr 1fr;
		gap: 1rem;
		align-items: center;
	}
	
	.header-col {
		font-size: 0.875rem;
		font-weight: 600;
		color: #64748b;
		text-transform: uppercase;
		letter-spacing: 0.05em;
		text-align: center;
	}
	
	.header-participant {
		text-align: left;
	}
	
	.mobile-layout {
		display: none;
	}
	
	.desktop-layout {
		display: grid;
		grid-template-columns: 1fr 2fr 1fr 1fr 1fr 1fr;
		gap: 1rem;
		align-items: center;
		padding: 1.5rem;
	}
	
	.desktop-rank {
		text-align: center;
	}
	
	.desktop-participant .participant-name {
		font-weight: 700;
		color: #1e293b;
	}
	
	.desktop-club {
		color: #64748b;
		font-size: 0.875rem;
	}
	
	.desktop-time {
		text-align: center;
	}
	
	.time-value {
		font-weight: 700;
		color: #1e293b;
	}
	
	.speed-value {
		font-size: 0.75rem;
		color: #64748b;
	}
	
	.desktop-sex,
	.desktop-category {
		text-align: center;
	}
	
	.sex-badge {
		background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
		color: white;
		padding: 0.25rem 0.75rem;
		border-radius: 9999px;
		font-size: 0.875rem;
		font-weight: 600;
	}
	
	.category-badge {
		background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
		color: white;
		padding: 0.25rem 0.75rem;
		border-radius: 9999px;
		font-size: 0.875rem;
		font-weight: 600;
	}
}

@media (min-width: 1024px) {
	.participant-card:nth-child(even) {
		background: #fafafa;
	}
	
	.participant-card:nth-child(even):hover {
		background: #f1f5f9;
	}
}

/* Animations */
@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.participant-card {
	animation: slideIn 0.3s ease-out;
}

/* Amélioration de l'accessibilité */
.search-input:focus,
.search-button:focus {
	outline: 2px solid #22c55e;
	outline-offset: 2px;
}

/* Optimisations pour les petits écrans */
@media (max-width: 480px) {
	.header-content {
		flex-direction: column;
		text-align: center;
		gap: 1rem;
	}
	
	.header-stats {
		gap: 1rem;
	}
	
	.search-container {
		margin: 1rem;
		padding: 1.5rem;
	}
	
	.results-container {
		margin: 0 1rem 2rem;
		border-radius: 0.5rem;
	}
	
	.mobile-stats {
		grid-template-columns: 1fr;
	}
	
	.rank-badge {
		width: 2.5rem;
		height: 2.5rem;
		font-size: 1rem;
	}
}