/* RANKING TABLE - Modernized and elegant design */

.ninja-rank-table {
	width: 100%;
	border-collapse: separate;
	margin: 25px 0;
	font-size: 0.95em;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	border-radius: 12px;
	overflow: hidden;
	background: transparent;
	box-shadow: none;
}

.ninja-rank-table thead tr {
	background-color: #003466;
	color: #ffffff;
	text-align: center;
	font-weight: 600;
	text-transform: uppercase;
}

.ninja-rank-table tbody tr {
	background-color: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
	overflow: hidden;
	margin-bottom: 12px;
	padding: 12px 16px;
}

.ninja-rank-table th,
.ninja-rank-table td {
	padding: 14px 18px;
	text-align: center;
}

.ninja-rank-table th.sortable {
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding-bottom: 10px;
}

.ninja-rank-table th.sortable::after {
	content: '';
	margin-left: 6px;
	display: inline-block;
	width: 0;
	height: 0;
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-top: 6px solid #ccc;
	vertical-align: middle;
	transition: transform 0.2s ease, border-color 0.2s ease;
}

.ninja-rank-table th.sortable.asc::after {
	/* ASC = flèche vers le haut (on inverse la bordure) */
	border-top: none;
	border-bottom: 6px solid #0073e6;
}

.ninja-rank-table th.sortable.desc::after {
	/* DESC = flèche vers le bas (on garde bordure top) */
	border-top: 6px solid #0073e6;
	border-bottom: none;
}

.ninja-rank-table td {
	font-size: 0.95rem;
	color: #333;
}

.ninja-rank-table .badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 12px;
	font-size: 0.8rem;
	font-weight: bold;
	color: #fff;
}

.badge.gold {
	background: linear-gradient(135deg, #ffd700, #ffcc00);
	color: #000;
}

.badge.silver {
	background: linear-gradient(135deg, #c0c0c0, #b0b0b0);
	color: #000;
}

.badge.bronze {
	background: linear-gradient(135deg, #cd7f32, #b87333);
	color: #000;
}

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

.ninja-rank-table tbody tr:hover {
	background-color: #f0f8ff;
}

.ninja-rank-table tbody tr:nth-of-type(even) {
	background-color: #f9f9f9;
}

.ninja-rank-table tbody tr:last-of-type {
	border-bottom: 2px solid #0073e6;
}

.ninja-rank-table tbody tr.active-row {
	font-weight: bold;
	color: #0073e6;
	background-color: #eaf4fc;
}

.ninja-rank-table .ninja-total-cell {
	background-color: #e4f3f9;
	color: #000000;
	font-weight: 600;
}

.ninja-rank-table tbody tr.row-selected {
	border-left: 5px solid #0073e6;
	background-color: #eef6fb;
}




/* RANKING TABS - Modern, dynamic and responsive design */

.company-search-results {
	position: relative;
	background-color: #fff;
	border: 1px solid #ccc;
	border-radius: 8px;
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
	max-height: 300px;
	margin-top: 6px;
	overflow-y: auto;
	/* top: 100%;
	left: 0;
	width: 100%;
	z-index: 100;*/
}

.company-search-result-item {
	padding: 12px 16px;
	font-size: 0.95rem;
	color: #333;
	cursor: pointer;
	border-bottom: 1px solid #eee;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.company-search-result-item:hover {
	background-color: #0073e6;
	color: #fff;
}

/* .company-search {
	flex: 0.5 1 200px;
	padding: 10px 14px;
	border-radius: 8px;
	border: 1px solid #ccc;
	font-size: 1rem;
	transition: border 0.3s ease, box-shadow 0.3s ease;
}

.company-search:focus {
	border-color: #007cba;
	box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
	outline: none;
} */

/* .company-clear-btn {
	padding: 10px 14px;
	border-radius: 8px;
	border: none;
	background: #ccc;
	color: #fff;
	cursor: not-allowed;
	transition: background 0.2s ease-in-out;
	flex-shrink: 0;
}

.company-clear-btn:enabled {
	background: #007cba;
	cursor: pointer;
} */

.ninja-table-wrapper {
	overflow-x: auto;
	padding: 20px;
	margin: 0 auto;
	width: 75%;
}

.tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	background-color: #f9f9f9;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
	margin-bottom: 20px;
}

.tab {
	position: relative;
	flex: 1 1 auto;
	padding: 14px 20px;
	cursor: pointer;
	background-color: #f9f9f9;
	color: #666;
	font-weight: 600;
	transition: background-color 0.3s ease, color 0.3s ease;
	text-decoration: none;
	text-align: center;
	white-space: nowrap;
	border-top-left-radius: 8px;
	border-top-right-radius: 8px;
}

.tab::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background-color: transparent;
	transition: background-color 0.3s ease;
}

.tab:hover {
	background-color: #eee;
	color: #444;
}

.tab.active {
	background-color: #fff;
	color: #007cba;
}

.tab.active::after {
	background-color: #007cba;
}

.tab-content {
	display: none;
	padding: 24px;
	background-color: #fff;
	border-radius: 0 0 8px 8px;
	text-align: center;
}

.tab-content.active {
	display: block;
}

.company-list {
	padding: 20px;
	background-color: #f0f4f8;
	border-radius: 10px;
	border: 1px solid #ddd;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
	margin: 20px;
}

.company-item,
.child-company-item {
	padding: 8px 12px;
	text-align: left;
	transition: background-color 0.2s ease;
	border-radius: 6px;
}

.company-item a,
.child-company-item a {
	text-decoration: none;
	color: #333;
	display: block;
	padding: 6px 10px;
	border-radius: 6px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.company-item a:hover,
.child-company-item a:hover {
	background-color: #007cba;
	color: #fff;
}

.company-item.active a,
.child-company-item.active a {
	background-color: #003466;
	color: #fff;
	font-weight: bold;
}

.company-item.active .child-company-item {
	display: block;
}

.child-company-item {
	display: none;
	padding-left: 20px;
}

.company-item a::before {
	content: '';
	display: inline-block;
	width: 10px;
	height: 10px;
	background-color: #0073e6;
	border-radius: 50%;
	margin-right: 8px;
	vertical-align: middle;
}

.child-company-item a::before {
	content: '';
	display: inline-block;
	width: 8px;
	height: 8px;
	background-color: #ccc;
	border-radius: 50%;
	margin-right: 8px;
	vertical-align: middle;
}

.company-search-result-item.type-mere::before {
	content: '';
	display: inline-block;
	width: 10px;
	height: 10px;
	background-color: #0073e6;
	border-radius: 50%;
	margin-right: 8px;
	vertical-align: middle;
}

.company-search-result-item.type-fille::before {
	content: '';
	display: inline-block;
	width: 8px;
	height: 8px;
	background-color: #ccc;
	border-radius: 50%;
	margin-right: 8px;
	vertical-align: middle;
}

.filter-instructions {
	background-color: #fff;
	padding: 15px 20px;
	border-radius: 8px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
	border: 1px solid #ddd;
	max-width: 500px;
	margin: 20px auto;
	font-size: 1rem;
	line-height: 1.6;
	color: #333;
}

.badge {
	animation: fadeInScale 0.3s ease-in-out;
}

@keyframes fadeInScale {
	0% {
		opacity: 0;
		transform: scale(0.8);
	}

	100% {
		opacity: 1;
		transform: scale(1);
	}
}

.ninja-rank-table tbody tr:hover {
	background-color: #f5faff;
	box-shadow: inset 3px 0 0 #0073e6;
}

.ninja-rank-table {
	animation: fadeInTable 0.6s ease-in-out;
}

@keyframes fadeInTable {
	0% {
		opacity: 0;
		transform: translateY(20px);
	}

	100% {
		opacity: 1;
		transform: translateY(0);
	}
}






/* MY RESULTS - Ludic and modern style */

.my-results-container {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	padding: 30px 20px;
	display: flex;
	justify-content: center;
}

.my-results-card {
	background-color: #fff;
	padding: 30px;
	border-radius: 16px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
	max-width: 600px;
	width: 100%;
	text-align: center;
	animation: fadeIn 0.5s ease-in-out;
	position: relative;
}

.my-results-badge {
	position: absolute;
	top: 16px;
	right: 16px;
	background-color: #007bff;
	color: #fff;
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: bold;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.my-results-card p {
	font-size: 1.1rem;
	margin: 12px 0;
	color: #444;
}

.my-results-card span {
	color: #007bff;
	font-weight: bold;
}

.my-results-section-title {
	font-size: 1.8rem;
	color: #003466;
	margin-bottom: 30px;
	text-align: center;
	font-weight: bold;
}

/* Mini-cards for each challenge */
.ninja-challenge-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
	padding: 20px;
	max-width: 1000px;
	margin: 0 auto;
}

.challenge-card {
	background-color: #f7faff;
	border-left: 6px solid #007bff;
	border-radius: 12px;
	padding: 16px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	transition: transform 0.2s ease;
	position: relative;
	width: 260px;
}

.challenge-card:hover {
	transform: scale(1.02);
}

.challenge-card h4 {
	font-size: 1.1rem;
	color: #003466;
	margin-bottom: 10px;
}

.challenge-card .points {
	font-size: 1rem;
	color: #555;
}

.challenge-card .points span {
	font-weight: bold;
	color: #007bff;
}

.challenge-card .trophy {
	position: absolute;
	top: 12px;
	right: 12px;
	font-size: 1.5rem;
	color: #ffc107;
}

.progress-bar-container {
	background-color: #e0e0e0;
	border-radius: 10px;
	overflow: hidden;
	margin-top: 12px;
	height: 12px;
}

.progress-bar-fill {
	height: 100%;
	background-color: #007bff;
	transition: width 0.4s ease-in-out;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media screen and (max-width: 768px) {
	.my-results-card {
		padding: 20px;
	}

	.ninja-challenge-grid {
		grid-template-columns: 1fr;
	}
}


/* .filter-toggle-btn {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 20px;
	font-size: 0.95rem;
	font-weight: 500;
	color: #0073e6;
	border: 2px solid #0073e6;
	background-color: transparent;
	text-decoration: none;
	transition: all 0.2s ease-in-out;
}

.filter-toggle-btn:hover {
	background-color: #e7f2fb;
}

.filter-toggle-btn.active {
	background-color: #0073e6;
	color: #fff;
	font-weight: bold;
	border-color: #0073e6;
} */










/* Panneau global */
.participant-filters-wrapper {
	background-color: #f7fafd;
	border: 1px solid #d0e4f5;
	border-radius: 12px;
	padding: 16px 20px;
	box-shadow: 0 4px 12px rgba(0, 115, 230, 0.06);
	margin-bottom: 20px;
}

/* Titre du panneau */
.participant-filters-wrapper h4 {
	margin: 0 0 14px;
	font-size: 1rem;
	font-weight: 600;
	color: #003466;
}

/* Conteneur flex pour tout : recherche + boutons */
.participant-controls-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	justify-content: flex-start;
}

/* Champ de recherche */
.company-search-wrapper {
	display: flex;
	gap: 10px;
	flex: 1 1;
	min-width: 200px;
}

.company-search {
	flex: 1;
	padding: 10px 14px;
	border-radius: 8px;
	border: 1px solid #ccc;
	font-size: 1rem;
	transition: border 0.3s ease, box-shadow 0.3s ease;
}

.company-search:focus {
	border-color: #007cba;
	box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
	outline: none;
}

.company-clear-btn {
	padding: 10px 14px;
	border-radius: 8px;
	border: none;
	background: #ccc;
	color: #fff;
	cursor: not-allowed;
	transition: background 0.2s ease-in-out;
	flex-shrink: 0;
}

.company-clear-btn:enabled {
	background: #007cba;
	cursor: pointer;
}

/* Boutons de filtres */
.participant-filters-bar {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	flex: 0 0 auto;
}

.filter-toggle-btn {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 20px;
	font-size: 0.95rem;
	font-weight: 500;
	color: #0073e6;
	border: 2px solid #0073e6;
	background-color: transparent;
	text-decoration: none;
	transition: all 0.2s ease-in-out;
}

.filter-toggle-btn:hover {
	background-color: #e7f2fb;
}

.filter-toggle-btn.active {
	background-color: #0073e6;
	color: #fff;
	font-weight: bold;
	border-color: #0073e6;
}

/* .filter-toggle-btn.active::before {
	content: "✓ ";
} */

/* Responsive */
@media screen and (max-width: 768px) {
	.participant-controls-wrapper {
		flex-direction: column;
		align-items: stretch;
	}

	.company-search-wrapper,
	.participant-filters-bar {
		width: 100%;
	}
}

/* Company Button Styles */
.ninja-company-button {
	display: inline-block;
	padding: 8px 16px;
	font-size: 14px;
	text-align: center;
	text-decoration: none;
	border-radius: 4px;
	border: none;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.ninja-company-button-primary {
	background-color: #0073aa;
	color: #fff;
}

.ninja-company-button-secondary {
	background-color: #e2e2e2;
	color: #333;
}

.ninja-company-button-primary:hover,
.ninja-company-button-secondary:hover {
	opacity: 0.85;
}