/* ===== PAGE STRUCTURE ===== */
.audio__page {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 2rem;
	padding: 2rem;
	align-items: flex-start;
	max-width: 1344px;
	margin: 0 auto;
	background-color: #FFF;
}

/* ===== SIDEBAR ===== */
.audio__sidebar {
	background: #FCFBF7;
	padding: 1.5rem;
	border-radius: 12px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
	position: sticky;
	top: 100px;
	align-self: start;
}

.audio__sidebar p {
	font-weight: bold;
	margin: 1rem 0 0.5rem;
	color: #222;
	font-size: 1rem;
}

/* Barre de recherche avec loupe */
.audio__sidebar .search-box {
	position: relative;
	margin-bottom: 1rem;
}

.audio__sidebar .search-box input[type="text"] {
	width: 100%;
	padding: 0.6rem 0.8rem 0.6rem 2.2rem;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 0.95rem;
	transition: border 0.2s ease;
}

.audio__sidebar .search-box input[type="text"]:focus {
	outline: none;
	border-color: #01715d;
	box-shadow: 0 0 0 2px rgba(1, 113, 93, 0.15);
}

.audio__sidebar .search-box::before {
	content: "🔍";
	position: absolute;
	top: 50%;
	left: 8px;
	transform: translateY(-50%);
	font-size: 1rem;
	color: #666;
}

/* Checkboxes */
.audio__sidebar label {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin-bottom: 0.4rem;
	font-size: 0.95rem;
	cursor: pointer;
	color: #444;
}

.audio__sidebar input[type="checkbox"],
.audio__sidebar input[type="radio"] {
	accent-color: #01715d;
	width: 16px;
	height: 16px;
	cursor: pointer;
}

/* Groupes de filtres */
.audio__sidebar div {
	margin-bottom: 1.2rem;
	padding-bottom: 0.8rem;
	border-bottom: 1px solid #f0f0f0;
}

.audio__sidebar div:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

/* ===== LISTING EN COLONNE ===== */
#audio-list {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	padding: 2rem 0;
}

/* ===== AUDIO ITEM ===== */
.audio__item {
	display: flex;
	align-items: flex-start;
	gap: 1.5rem;
	padding: 1.2rem 0;
	border-bottom: 1px solid #e5e5e5;
	border-radius: 0;
	background: none;
	box-shadow: none;
}

.audio__item:last-child {
	border-bottom: none;
}

/* ===== THUMBNAIL RONDE ===== */
.audio__thumb {
	flex-shrink: 0;
	width: 160px;
	height: 160px;
	border-radius: 50%;
	overflow: hidden;
	background: #f0f0f0;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	align-self: center;
}

.audio__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

/* Bouton Play */
.audio__thumb .play-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: rgba(1, 113, 93, 0.9);
	border: none;
	border-radius: 50%;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.audio__thumb .play-btn img {
	width: 22px;
	height: 22px;
}

.audio__thumb:hover .play-btn {
	opacity: 1;
}

/* Badge */
.audio__thumb .listening-badge {
	position: absolute;
	bottom: 25px;
	left: 50%;
	transform: translateX(-50%);
	background: #f07c3b;
	color: white;
	padding: 2px 20px;
	border-radius: 0px;
	font-size: 0.75rem;
	font-weight: bold;
	display: none;
	width: 70%;
}

/* ===== CONTENU ===== */
.audio__content {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.audio__title {
	font-size: 1.2rem;
	font-weight: bold;
	margin-bottom: 0.3rem;
	color: #222;
}

.audio__meta {
	display: flex;
	gap: 1rem;
	align-items: center;
	font-size: 0.9rem;
	color: #666;
	margin-bottom: 0.5rem;
}

.audio__desc {
	font-size: 0.95rem;
	line-height: 1.5;
	color: #444;
	margin-bottom: 0.6rem;
}

/* ===== TAGS ===== */
.audio__cats {
	display: flex;
	gap: 0.4rem;
	flex-wrap: wrap;
}

.audio__cat {
	background: #FCFBF7;
	color: #333;
	padding: 4px 10px;
	border-radius: 12px;
	font-size: 0.75rem;
	text-transform: uppercase;
	font-weight: 600;
}

/* ===== PLAYLIST ===== */
.audio__playlist {
	display: none;
	margin-top: 0.8rem;
	border-top: 1px solid #eee;
	padding-top: 0.6rem;
}

.audio__playlist ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.audio__playlist li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.4rem 0;
	border-bottom: 1px dashed #ddd;
	font-size: 0.9rem;
	color: #444;
}

.audio__playlist li:last-child {
	border-bottom: none;
}

.audio__playlist .track-title {
	flex: 1;
	margin-left: 0.6rem;
}

.audio__playlist .track-duration {
	color: #777;
	font-size: 0.8rem;
	margin-left: 0.6rem;
	white-space: nowrap;
}

/* Bouton piste (rond vert) */
.track-play-btn {
	background: #eeeeee;
	border: none;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	min-width: 32px;
	min-height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.3s ease;
	flex-shrink: 0;
}

/* Icône à l’intérieur */
.track-play-btn img {
	width: 28px !important;
	height: 28px !important;
	filter: invert(1);
	object-fit: contain;
	display: block;
}

/* Hover */
.track-play-btn:hover {
	background: #ffd967;
}

/* Bouton toggle playlist */
.playlist-toggle-btn {
	margin-top: 0.8rem;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 0.95rem;
	color: #01715d;
	display: flex;
	align-items: center;
	gap: 6px;
}

.playlist-toggle-btn:hover {
	color: #f07c3b;
}

/* ===== PLAYER GLOBAL ===== */
.audio-player-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: #01715d;
	color: white;
	box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.2);
	z-index: 1000;
	border-top: 12px solid transparent;
	border-image: linear-gradient(to right,
			#7e9235 var(--progress, 0%),
			#ddd var(--progress, 0%)) 1;
}

.player-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0.6rem 1rem;
}

/* Texte et vignette */
.player-thumb {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	margin-right: 0.75rem;
}

#player-title {
	flex: 1;
	font-weight: 600;
	font-size: 1rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Boutons globaux */
.player-controls {
	display: flex;
	align-items: center;
	gap: 0.8rem;
}

.player-controls button {
	background: none;
	border: none;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s, background 0.2s;
}

.player-controls button img {
	width: 28px;
	height: 28px;
}

.player-controls button:hover {
	transform: scale(1.1);
	background: rgba(255, 255, 255, 0.15);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
	.audio__page {
		grid-template-columns: 1fr;
	}

	.audio__sidebar {
		position: relative;
		top: auto;
		margin-bottom: 1.5rem;
	}
}

@media (max-width: 768px) {
	.audio__item {
		text-align: center;
	}

	.audio__thumb {
		margin: 0 auto;
		width: 90px;
		height: 90px;
	}

	.audio__content {
		align-items: center;
	}

	.playlist-toggle-btn {
		align-self: center;
	}

	.player-container {
		flex-direction: column;
		gap: 0.5rem;
	}

	#player-title {
		text-align: center;
	}
}
