/**
 * Accueil : cartes manga en ligne (jaquette à gauche, titre + chapitres à droite).
 * Une colonne sur petit écran ; 4 mangas par ligne dès 900px (comme .grid-4 du thème).
 */

body.dsc-home-manga-row-layout #home-page .h-list,
body.dsc-home-manga-row-layout #library-page .grid.grid-4,
body.dsc-home-manga-row-layout #trending-page .grid.grid-4 {
	display: flex;
	flex-direction: column;
	gap: 10px;
	overflow-x: visible;
	grid-auto-flow: unset;
}

body.dsc-home-manga-row-layout #home-page .grid.grid-4,
body.dsc-home-manga-row-layout #home-page .dmaj-page.grid-4,
body.dsc-home-manga-row-layout #library-page .grid.grid-4,
body.dsc-home-manga-row-layout #trending-page .grid.grid-4 {
	grid-template-columns: 1fr !important;
	overflow-x: visible !important;
}

body.dsc-home-manga-row-layout #home-page .h-list {
	display: flex;
}

/* Carte standard : lien (cover) + méta côte à côte */
body.dsc-home-manga-row-layout #home-page article.card.featured-card:not(.dsc-preview-card),
body.dsc-home-manga-row-layout #library-page article.card.featured-card:not(.dsc-preview-card),
body.dsc-home-manga-row-layout #trending-page article.card.featured-card:not(.dsc-preview-card) {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: 10px;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
}

body.dsc-home-manga-row-layout #home-page article.card.featured-card:not(.dsc-preview-card) > a.dsc-card-link,
body.dsc-home-manga-row-layout #library-page article.card.featured-card:not(.dsc-preview-card) > a.dsc-card-link,
body.dsc-home-manga-row-layout #trending-page article.card.featured-card:not(.dsc-preview-card) > a.dsc-card-link {
	flex: 0 0 38%;
	max-width: 152px;
	min-width: 86px;
	align-self: stretch;
	height: auto;
	min-height: 100%;
}

body.dsc-home-manga-row-layout #home-page article.card.featured-card:not(.dsc-preview-card) > a.dsc-card-link .cover,
body.dsc-home-manga-row-layout #library-page article.card.featured-card:not(.dsc-preview-card) > a.dsc-card-link .cover,
body.dsc-home-manga-row-layout #trending-page article.card.featured-card:not(.dsc-preview-card) > a.dsc-card-link .cover {
	aspect-ratio: auto;
	min-height: 100%;
	height: 100%;
	border-radius: var(--dsc-graphic-card-radius, 12px);
}

body.dsc-home-manga-row-layout #home-page article.card.featured-card:not(.dsc-preview-card) > .featured-meta,
body.dsc-home-manga-row-layout #library-page article.card.featured-card:not(.dsc-preview-card) > .featured-meta,
body.dsc-home-manga-row-layout #trending-page article.card.featured-card:not(.dsc-preview-card) > .featured-meta {
	flex: 1 1 0;
	min-width: 0;
	padding: 8px 10px 10px;
	align-self: stretch;
	display: flex;
	flex-direction: column;
}

body.dsc-home-manga-row-layout .featured-title {
	font-size: 14px;
	margin: 0 0 6px;
	line-height: 1.25;
}

/* Tags : compacter l’affichage type liste « mises à jour » */
body.dsc-home-manga-row-layout .dsc-manga-card__tags {
	display: none;
}

body.dsc-home-manga-row-layout .chapters {
	flex: 1 1 auto;
	min-height: 0;
	gap: 6px;
}

body.dsc-home-manga-row-layout .chapter-item {
	flex-wrap: nowrap;
	align-items: center;
	padding: 6px 8px;
	gap: 6px;
}

/* Bloc date graphique (jaune) : masqué pour une ligne type appli */
body.dsc-home-manga-row-layout .chapter-item > .chapter-release {
	display: none;
}

body.dsc-home-manga-row-layout .chapter-main {
	flex: 1 1 auto;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	min-width: 0;
}

body.dsc-home-manga-row-layout .chapter-label-row {
	flex: 1 1 auto;
	min-width: 0;
}

body.dsc-home-manga-row-layout .chapter-date--secondary {
	flex: 0 0 auto;
	white-space: nowrap;
	font-size: 10px;
	margin: 0;
}

body.dsc-home-manga-row-layout .chapter-badge--new {
	border-color: rgba(167, 139, 250, 0.55);
	background: rgba(109, 40, 217, 0.22);
	color: rgba(237, 233, 254, 0.98);
}

/* Carte aperçu (dossier image) : méta dans le <a> */
body.dsc-home-manga-row-layout #home-page article.featured-card.dsc-preview-card > a.dsc-card-link,
body.dsc-home-manga-row-layout #library-page article.featured-card.dsc-preview-card > a.dsc-card-link,
body.dsc-home-manga-row-layout #trending-page article.featured-card.dsc-preview-card > a.dsc-card-link {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: 10px;
	width: 100%;
}

body.dsc-home-manga-row-layout article.featured-card.dsc-preview-card .cover {
	flex: 0 0 38%;
	max-width: 152px;
	min-width: 86px;
	aspect-ratio: auto;
	min-height: 140px;
	height: auto;
}

body.dsc-home-manga-row-layout article.featured-card.dsc-preview-card .featured-meta {
	flex: 1 1 0;
	min-width: 0;
	padding: 8px 8px 10px;
}

body.dsc-home-manga-row-layout .grid .featured-title {
	font-size: 14px;
}

body.dsc-home-manga-row-layout .grid .chapter-item {
	padding: 6px 8px;
}

/* Grands écrans : 4 mangas par ligne */
@media (min-width: 900px) {
	body.dsc-home-manga-row-layout #home-page .h-list,
	body.dsc-home-manga-row-layout #library-page .grid.grid-4,
	body.dsc-home-manga-row-layout #trending-page .grid.grid-4 {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		flex-direction: unset;
	}

	body.dsc-home-manga-row-layout #home-page .grid.grid-4,
	body.dsc-home-manga-row-layout #home-page .dmaj-page.grid-4,
	body.dsc-home-manga-row-layout #library-page .grid.grid-4,
	body.dsc-home-manga-row-layout #trending-page .grid.grid-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	}

	body.dsc-home-manga-row-layout #home-page #dassouscan-list.grid-4 {
		overflow-x: visible;
	}

	/* Colonnes étroites : jaquette un peu plus compacte */
	body.dsc-home-manga-row-layout #home-page article.card.featured-card:not(.dsc-preview-card) > a.dsc-card-link,
	body.dsc-home-manga-row-layout #library-page article.card.featured-card:not(.dsc-preview-card) > a.dsc-card-link,
	body.dsc-home-manga-row-layout #trending-page article.card.featured-card:not(.dsc-preview-card) > a.dsc-card-link {
		flex: 0 0 36%;
		max-width: 108px;
		min-width: 0;
	}

	body.dsc-home-manga-row-layout article.featured-card.dsc-preview-card .cover {
		flex: 0 0 36%;
		max-width: 108px;
		min-width: 0;
	}

	body.dsc-home-manga-row-layout .grid .featured-title {
		font-size: 12px;
	}

	body.dsc-home-manga-row-layout .chapter-label {
		font-size: 11px;
	}

	body.dsc-home-manga-row-layout .chapter-date--secondary {
		font-size: 9px;
	}
}
