/* Template dedie archive-kdrama.php : grille et cartes 100% autonomes,
   aucune dependance aux classes/JS de colonnes ou masonry du theme. */

/* Masque l'image "a la une" du module GP Premium (celle du 1er kdrama de la
   liste), affichee au-dessus du <main> avant meme le titre de l'archive.
   Meme chose sur les archives de la taxonomie diffusion (tax-diffusion),
   qui reutilisent cette meme grille de cartes. */
.post-type-archive-kdrama .content-area > figure.post-image,
.tax-diffusion .content-area > figure.post-image {
	display: none;
}

/* ---- Fiche kdrama : "autres dramas du meme realisateur/scenariste" ---- */

.kf-crew-related {
	margin: 2rem 0;
}

.kf-crew-related h2 {
	margin-bottom: 0.9rem;
}

/* ---- Bandeau CTA vers le moteur de recommandation ------------------- */

.kf-cta-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	background: linear-gradient(135deg, #e5195f, #ff5f8f);
	color: #fff;
	border-radius: 12px;
	padding: 1.1rem 1.4rem;
	margin: 0 0 1.5rem;
}

.kf-cta-text {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.kf-cta-text strong {
	font-size: 1.05rem;
	color: #fff;
}

.kf-cta-text span {
	font-size: 0.88rem;
	opacity: 0.92;
}

.kf-cta-btn {
	background: #fff;
	color: #e5195f;
	text-decoration: none;
	font-weight: 700;
	padding: 0.6rem 1.2rem;
	border-radius: 999px;
	white-space: nowrap;
	transition: opacity 0.15s ease;
}

.kf-cta-btn:hover {
	opacity: 0.85;
	color: #e5195f;
}

/* ---- Grille ----------------------------------------------------------- */

.kf-archive-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1.25rem;
}

@media (min-width: 1024px) {
	.kf-archive-grid {
		grid-template-columns: repeat(5, 1fr);
	}
}

@media (max-width: 480px) {
	.kf-archive-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.85rem;
	}
}

/* ---- Carte -------------------------------------------------------------- */

.kf-archive-card {
	list-style: none;
	margin: 0;
	/* post_class() ajoute aussi les anciennes classes GeneratePress
	   (grid-33, tablet-grid-50...) dont la regle width:33% s'appliquerait
	   sinon a l'interieur de cette grille (33% d'une colonne = case ecrasee). */
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
}

.kf-archive-card-link {
	display: block;
	color: inherit;
	text-decoration: none;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	height: 100%;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.kf-archive-card-link:hover {
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.kf-archive-poster {
	aspect-ratio: 2 / 3;
	overflow: hidden;
	background: #f4f4f5;
}

.kf-archive-poster img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	opacity: 1;
}

.kf-archive-body {
	padding: 0.7rem 0.8rem 0.9rem;
}

.kf-archive-title {
	font-size: 1rem;
	margin: 0 0 0.5rem;
	line-height: 1.25;
	color: #222222;
	font-weight: 700;
}

.kf-archive-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
	margin-bottom: 0.3rem;
}

.kf-archive-meta .kf-badge {
	background: #f4f4f5;
	color: #222222;
	border-radius: 999px;
	padding: 0.15rem 0.55rem;
	font-size: 0.72rem;
	font-weight: 600;
}

.kf-archive-meta .kf-badge-rating {
	background: #fff2d6;
	color: #8a5a00;
}

.kf-archive-sub {
	font-size: 0.78rem;
	color: #666666;
	margin-top: 0.15rem;
}

/* ---- Indication du tri par popularite ---------------------------------- */

.kf-sort-hint {
	font-size: 0.9rem;
	font-weight: 600;
	color: #8a5a00;
	background: #fff2d6;
	display: inline-block;
	padding: 0.4rem 0.9rem;
	border-radius: 999px;
	margin: 0 0 1.1rem;
}

.kf-archive-poster {
	position: relative;
}

.kf-top-ribbon {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 2;
	background: #e5195f;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	padding: 0.25rem 0.6rem;
	border-radius: 999px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* ---- Pagination -----------------------------------------------------------
   Le theme remplace le wrapper <nav class="navigation pagination"> de
   WordPress par sa propre structure : on cible .nav-links / .page-numbers
   directement, ce sont les seules classes garanties par WP core. */

.post-type-archive-kdrama .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	margin: 2rem 0 0;
	width: 100%;
}

.post-type-archive-kdrama .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.4rem;
	height: 2.4rem;
	padding: 0 0.9rem;
	border-radius: 999px;
	border: 1px solid #e2e2e2;
	background: #fff;
	color: #222222 !important;
	text-decoration: none !important;
	font-weight: 600;
	font-size: 0.9rem;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.post-type-archive-kdrama .page-numbers:hover {
	border-color: #e5195f;
	color: #e5195f !important;
}

.post-type-archive-kdrama .page-numbers.current {
	background: #e5195f;
	border-color: #e5195f;
	color: #fff !important;
}

.post-type-archive-kdrama .page-numbers.dots {
	border: none;
	background: transparent;
	min-width: auto;
}
