/*
|--------------------------------------------------------------------------
| FAJAR — HISTORIQUE
|--------------------------------------------------------------------------
*/

.fajar-history {
	width: 100%;
	min-height: 100vh;
	background: var(--fj-surface);
	color: var(--fj-accent);
}


/*
|--------------------------------------------------------------------------
| Container
|--------------------------------------------------------------------------
*/

.fajar-history-container {
	width: min(1180px, calc(100% - 40px));
	margin: 0 auto;
}


/*
|--------------------------------------------------------------------------
| Hero
|--------------------------------------------------------------------------
*/

.fajar-history-hero {
	padding: 55px 0 45px;
	background: var(--fj-surface);
	border-bottom: 1px solid var(--fj-line);
}


.fajar-history-hero .fajar-history-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 30px;
}


.fajar-history-eyebrow {
	display: inline-block;
	margin-bottom: 10px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--fj-accent);
}


.fajar-history-heading h1 {
	margin: 0;
	font-size: clamp(30px, 4vw, 44px);
	line-height: 1.15;
	font-weight: 800;
	color: var(--fj-accent);
}


.fajar-history-heading p {
	max-width: 650px;
	margin: 14px 0 0;
	font-size: 16px;
	line-height: 1.7;
	color: var(--fj-muted);
}


/*
|--------------------------------------------------------------------------
| Compteur
|--------------------------------------------------------------------------
*/

.fajar-history-count {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 18px;
	background: var(--fj-surface);
	border: 1px solid var(--fj-line);
	border-radius: 14px;
	color: var(--fj-accent);
	white-space: nowrap;
}


.fajar-history-count > span {
	font-size: 22px;
	line-height: 1;
}


.fajar-history-count strong {
	font-size: 18px;
	font-weight: 800;
}


.fajar-history-count small {
	font-size: 14px;
	font-weight: 600;
	color: var(--fj-muted);
}


/*
|--------------------------------------------------------------------------
| Contenu
|--------------------------------------------------------------------------
*/

.fajar-history-content {
	padding: 45px 0 80px;
}


/*
|--------------------------------------------------------------------------
| Groupe
|--------------------------------------------------------------------------
*/

.fajar-history-group {
	margin-bottom: 42px;
}


.fajar-history-group:last-child {
	margin-bottom: 0;
}


.fajar-history-group-header {
	margin-bottom: 16px;
}


.fajar-history-group-header h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 800;
	color: var(--fj-accent);
}


/*
|--------------------------------------------------------------------------
| Liste
|--------------------------------------------------------------------------
*/

.fajar-history-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}


/*
|--------------------------------------------------------------------------
| Élément historique
|--------------------------------------------------------------------------
*/

.fajar-history-item {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr) auto;
	align-items: center;
	gap: 20px;
	padding: 14px;
	background: var(--fj-surface);
	border: 1px solid var(--fj-line);
	border-radius: 18px;
	box-shadow: 0 4px 16px rgb(var(--fj-accent-rgb) / 0.04);
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease,
		border-color 0.2s ease;
}


.fajar-history-item:hover {
	transform: translateY(-2px);
	border-color: var(--fj-accent);
	box-shadow: 0 10px 28px rgb(var(--fj-accent-rgb) / 0.08);
}


/*
|--------------------------------------------------------------------------
| Couverture
|--------------------------------------------------------------------------
*/

.fajar-history-cover {
	position: relative;
	width: 96px;
	height: 96px;
	overflow: hidden;
	border-radius: 13px;
	background: var(--fj-bg);
	flex-shrink: 0;
}


.fajar-history-cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}


.fajar-history-cover-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 10px;
	text-align: center;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 1px;
	color: var(--fj-accent);
	background: var(--fj-bg);
}


/*
|--------------------------------------------------------------------------
| Badge type
|--------------------------------------------------------------------------
*/

.fajar-history-type {
	position: absolute;
	left: 7px;
	bottom: 7px;
	padding: 4px 7px;
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.72);
	color: var(--fj-text);
	font-size: 9px;
	font-weight: 700;
	line-height: 1.2;
}


/*
|--------------------------------------------------------------------------
| Informations
|--------------------------------------------------------------------------
*/

.fajar-history-info {
	min-width: 0;
}


.fajar-history-info h3 {
	margin: 0;
	font-size: 17px;
	font-weight: 750;
	line-height: 1.35;
}


.fajar-history-info h3 a {
	color: var(--fj-accent);
	text-decoration: none;
}


.fajar-history-info h3 a:hover {
	color: var(--fj-accent);
}


.fajar-history-author {
	margin: 6px 0 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--fj-muted);
}


.fajar-history-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin-top: 10px;
	font-size: 12px;
	color: var(--fj-muted);
}


.fajar-history-meta span {
	display: inline-flex;
	align-items: center;
}


/*
|--------------------------------------------------------------------------
| Bouton
|--------------------------------------------------------------------------
*/

.fajar-history-action {
	display: flex;
	align-items: center;
	justify-content: flex-end;
}


.fajar-history-listen-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 42px;
	padding: 0 16px;
	border-radius: 11px;
	background: var(--fj-accent);
	color: var(--fj-on-accent);
	font-size: 13px;
	font-weight: 750;
	text-decoration: none;
	transition:
		background 0.2s ease,
		transform 0.2s ease;
}


.fajar-history-listen-button:hover {
	background: var(--fj-accent);
	color: var(--fj-on-accent);
	transform: translateY(-1px);
}


.fajar-history-listen-button span:first-child {
	font-size: 11px;
}


/*
|--------------------------------------------------------------------------
| Historique vide
|--------------------------------------------------------------------------
*/

.fajar-history-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	max-width: 650px;
	min-height: 420px;
	margin: 0 auto;
	padding: 50px 30px;
	text-align: center;
	background: var(--fj-surface);
	border: 1px solid var(--fj-line);
	border-radius: 22px;
}


.fajar-history-empty-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 76px;
	height: 76px;
	margin-bottom: 22px;
	border-radius: 50%;
	background: var(--fj-bg);
	color: var(--fj-accent);
	font-size: 32px;
}


.fajar-history-empty h2 {
	margin: 0;
	font-size: 25px;
	font-weight: 800;
	color: var(--fj-accent);
}


.fajar-history-empty p {
	max-width: 500px;
	margin: 12px 0 24px;
	font-size: 15px;
	line-height: 1.7;
	color: var(--fj-muted);
}


.fajar-history-discover-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 19px;
	border-radius: 11px;
	background: var(--fj-accent);
	color: var(--fj-on-accent);
	font-size: 13px;
	font-weight: 750;
	text-decoration: none;
}


.fajar-history-discover-button:hover {
	background: var(--fj-accent);
	color: var(--fj-on-accent);
}


/*
|--------------------------------------------------------------------------
| Responsive tablette
|--------------------------------------------------------------------------
*/

@media (max-width: 850px) {

	.fajar-history-hero {
		padding: 40px 0 35px;
	}


	.fajar-history-hero .fajar-history-container {
		align-items: flex-start;
		flex-direction: column;
	}


	.fajar-history-count {
		width: fit-content;
	}


	.fajar-history-item {
		grid-template-columns: 82px minmax(0, 1fr);
	}


	.fajar-history-cover {
		width: 82px;
		height: 82px;
	}


	.fajar-history-action {
		grid-column: 2;
		justify-content: flex-start;
	}


	.fajar-history-listen-button {
		min-height: 40px;
	}

}


/*
|--------------------------------------------------------------------------
| Responsive mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 600px) {

	.fajar-history-container {
		width: min(
			100%,
			calc(100% - 24px)
		);
	}


	.fajar-history-hero {
		padding: 32px 0 28px;
	}


	.fajar-history-heading h1 {
		font-size: 30px;
	}


	.fajar-history-heading p {
		font-size: 14px;
	}


	.fajar-history-content {
		padding: 30px 0 55px;
	}


	.fajar-history-item {
		grid-template-columns: 72px minmax(0, 1fr);
		gap: 13px;
		padding: 11px;
		border-radius: 15px;
	}


	.fajar-history-cover {
		width: 72px;
		height: 72px;
		border-radius: 10px;
	}


	.fajar-history-type {
		left: 5px;
		bottom: 5px;
		font-size: 8px;
	}


	.fajar-history-info h3 {
		font-size: 15px;
	}


	.fajar-history-author {
		font-size: 12px;
	}


	.fajar-history-meta {
		flex-direction: column;
		gap: 3px;
		margin-top: 7px;
		font-size: 11px;
	}


	.fajar-history-action {
		grid-column: 1 / -1;
	}


	.fajar-history-listen-button {
		width: 100%;
	}


	.fajar-history-empty {
		min-height: 360px;
		padding: 35px 20px;
	}


	.fajar-history-empty h2 {
		font-size: 22px;
	}


	.fajar-history-empty p {
		font-size: 14px;
	}

}

/*
|--------------------------------------------------------------------------
| Actions historique
|--------------------------------------------------------------------------
*/

.fajar-history-action {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}


.fajar-history-delete {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid var(--fj-line);
	border-radius: 11px;
	background: var(--fj-surface);
	color: var(--fj-muted);
	font-size: 14px;
	cursor: pointer;
	transition:
		background 0.2s ease,
		color 0.2s ease,
		border-color 0.2s ease;
}


.fajar-history-delete:hover {
	border-color: #f1caca;
	background: var(--fj-surface);
	color: #d64545;
}


@media (max-width: 850px) {

	.fajar-history-action {
		justify-content: flex-start;
	}

}


@media (max-width: 600px) {

	.fajar-history-action {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 42px;
		width: 100%;
	}

	.fajar-history-listen-button {
		width: 100%;
	}

}