/**
 * Styles pour la navigation des topics
 *
 * @package KadenceChild
 * @since 1.0.0
 */

/* === Layout principal === */
.arpp-topic-layout {
	display: flex;
	gap: 0;
	position: relative;
}

/* === Bouton toggle (mobile uniquement) === */
.arpp-topic-nav-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	position: fixed;
	bottom: 20px;
	left: 20px;
	z-index: 998;
	padding: 12px 16px;
	background: #FBB040;
	color: white;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transition: all 0.2s;
}

.arpp-topic-nav-toggle:hover {
	background: #e59f36;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.arpp-topic-nav-toggle svg {
	width: 20px;
	height: 20px;
}

/* === Overlay (mobile uniquement) === */
.arpp-topic-nav-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 999;
	opacity: 0;
	transition: opacity 0.3s;
}

.arpp-topic-nav-overlay.is-active {
	display: block;
	opacity: 1;
}

/* === Navigation sidebar === */
.arpp-topic-navigation {
	width: 320px;
	background: white;
	border-right: 1px solid #e5e7eb;
	display: flex;
	flex-direction: column;
	height: 100vh;
	position: sticky;
	top: 0;
	overflow-y: auto;
	flex-shrink: 0;
}

/* Mobile : popup fullscreen */
@media (max-width: 1023px) {
	.arpp-topic-navigation {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		z-index: 1000;
		transform: translateX(-100%);
		transition: transform 0.3s ease;
		box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
	}

	.arpp-topic-navigation.is-open {
		transform: translateX(0);
	}
}

/* Desktop : bouton toggle caché */
@media (min-width: 1024px) {
	.arpp-topic-nav-toggle,
	.arpp-topic-nav-overlay {
		display: none;
	}
}

/* === Header de navigation === */
.arpp-topic-nav-header {
	padding: 20px;
	border-bottom: 1px solid #e5e7eb;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-shrink: 0;
}

.arpp-topic-nav-title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	flex: 1;
}

.arpp-topic-nav-title a {
	color: #1f2937;
	text-decoration: none;
}

.arpp-topic-nav-title a:hover {
	color: #FBB040;
}

.arpp-topic-nav-close {
	display: none;
	padding: 8px;
	background: transparent;
	border: none;
	cursor: pointer;
	color: #6b7280;
	border-radius: 4px;
	transition: all 0.2s;
}

.arpp-topic-nav-close:hover {
	background: #f3f4f6;
	color: #1f2937;
}

@media (max-width: 1023px) {
	.arpp-topic-nav-close {
		display: block;
	}
}

/* === Contenu de navigation === */
.arpp-topic-nav-content {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
}

/* === Lesson (chapitre) === */
.arpp-topic-nav-lesson {
	margin-bottom: 16px;
}

.arpp-topic-nav-lesson-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.arpp-topic-nav-lesson-title {
	flex: 1;
	font-size: 14px;
	font-weight: 600;
	color: #1f2937;
	text-decoration: none;
	padding: 8px 0;
}

.arpp-topic-nav-lesson-title:hover {
	color: #FBB040;
}

.arpp-topic-nav-check {
	flex-shrink: 0;
}

/* === Topics (cours) === */
.arpp-topic-nav-topics {
	list-style: none;
	margin: 0;
	padding: 0;
}

.arpp-topic-nav-topic {
	margin-bottom: 4px;
}

.arpp-topic-nav-topic-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	border-radius: 6px;
	text-decoration: none;
	color: #6b7280;
	font-size: 13px;
	transition: all 0.2s;
}

.arpp-topic-nav-topic-link:hover {
	background: #f9fafb;
	color: #1f2937;
}

/* Topic actuel */
.arpp-topic-nav-topic.is-current .arpp-topic-nav-topic-link {
	background: #fef3e2;
	color: #1f2937;
	font-weight: 600;
}

/* Topic complété */
.arpp-topic-nav-topic.is-completed .arpp-topic-nav-topic-link {
	color: #9ca3af;
}

.arpp-topic-nav-topic-status {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.arpp-topic-nav-topic-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #d1d5db;
	display: block;
}

.arpp-topic-nav-topic.is-current .arpp-topic-nav-topic-dot {
	background: #FBB040;
}

.arpp-topic-nav-topic-title {
	flex: 1;
}

/* === Contenu principal === */
.arpp-topic-content {
	flex: 1;
	min-width: 0;
}

/* Ajustement du wrapper LearnDash */
.arpp-topic-content .learndash-wrapper {
	max-width: 900px;
	margin: 0 auto;
	padding: 32px 20px;
}

/* Scrollbar personnalisée */
.arpp-topic-navigation::-webkit-scrollbar {
	width: 6px;
}

.arpp-topic-navigation::-webkit-scrollbar-track {
	background: #f9fafb;
}

.arpp-topic-navigation::-webkit-scrollbar-thumb {
	background: #d1d5db;
	border-radius: 3px;
}

.arpp-topic-navigation::-webkit-scrollbar-thumb:hover {
	background: #9ca3af;
}
