/**
 * ChessDZ RSS Viewer — styles front
 * Palette ChessDZ : navy #1F3A5F, gold #C9A227, parchment #F4E8CE
 */

.chessdz-rss {
	--cdz-navy: #1f3a5f;
	--cdz-gold: #c9a227;
	--cdz-ink: #2a2a2a;
	--cdz-muted: #6b6b6b;
	--cdz-border: #e6e1d6;
	--cdz-bg: #ffffff;
	font-family: inherit;
	line-height: 1.5;
	margin: 0 0 1.5em;
}

.chessdz-rss * {
	box-sizing: border-box;
}

.chessdz-rss__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

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

.chessdz-rss--list .chessdz-rss__list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.chessdz-rss--list .chessdz-rss__item {
	background: var(--cdz-bg);
	border: 1px solid var(--cdz-border);
	border-left: 4px solid var(--cdz-gold);
	border-radius: 6px;
	padding: 14px 18px;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.chessdz-rss--list .chessdz-rss__item:hover {
	box-shadow: 0 4px 14px rgba(31, 58, 95, 0.12);
}

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

.chessdz-rss--grid .chessdz-rss__list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 18px;
}

.chessdz-rss--grid .chessdz-rss__item {
	background: var(--cdz-bg);
	border: 1px solid var(--cdz-border);
	border-top: 4px solid var(--cdz-gold);
	border-radius: 8px;
	padding: 16px 18px;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.chessdz-rss--grid .chessdz-rss__item:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(31, 58, 95, 0.14);
}

@media (max-width: 640px) {
	.chessdz-rss--grid .chessdz-rss__list {
		grid-template-columns: 1fr;
	}
}

/* --------------------------------- Éléments -------------------------------- */

.chessdz-rss__title {
	margin: 0 0 6px;
	font-size: 1.05rem;
	line-height: 1.3;
	font-weight: 700;
	color: var(--cdz-navy);
}

.chessdz-rss__title a {
	color: var(--cdz-navy);
	text-decoration: none;
}

.chessdz-rss__title a:hover {
	color: var(--cdz-gold);
	text-decoration: underline;
}

.chessdz-rss__date {
	display: block;
	font-size: 0.78rem;
	color: var(--cdz-muted);
	margin-bottom: 8px;
	letter-spacing: 0.02em;
}

.chessdz-rss__excerpt {
	margin: 0 0 10px;
	color: var(--cdz-ink);
	font-size: 0.92rem;
}

.chessdz-rss--grid .chessdz-rss__excerpt {
	flex: 1 1 auto;
}

.chessdz-rss__more {
	display: inline-block;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--cdz-navy);
	text-decoration: none;
}

.chessdz-rss__more:hover {
	color: var(--cdz-gold);
}

/* ---------------------------- États / messages ----------------------------- */

.chessdz-rss--error,
.chessdz-rss--empty {
	border: 1px dashed var(--cdz-border);
	border-radius: 6px;
	padding: 12px 16px;
	color: var(--cdz-muted);
	font-size: 0.9rem;
}

.chessdz-rss--error p,
.chessdz-rss--empty p {
	margin: 0;
}

/* --------------------------------- Footer ---------------------------------- */

.chessdz-rss__footer {
	margin-top: 14px;
	text-align: right;
}

.chessdz-rss__badge {
	display: inline-block;
	background: var(--cdz-navy);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	padding: 3px 10px;
	border-radius: 999px;
	text-decoration: none;
	transition: background 0.2s ease, opacity 0.2s ease;
}

.chessdz-rss__badge:hover,
.chessdz-rss__badge:focus {
	color: #fff;
	opacity: 0.85;
	text-decoration: none;
}

/* --- Nom de la source (mode agrégé) --- */
.chessdz-rss__source {
	display: inline-block;
	margin: 0 0 .4em;
	padding: .12em .6em;
	font-size: .72em;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: .02em;
	color: #fff;
	background: #1F3A5F;
	border-radius: 999px;
	text-transform: uppercase;
}

.chessdz-rss--aggregate .chessdz-rss__item {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}
