.pdex-app {
	font-family: "Titillium Web", arial, helvetica, sans-serif;
}

.pdex-loading,
.pdex-empty {
	padding: 2em 0;
	color: #888;
	text-align: center;
}

.pdex-toolbar {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 10px;
}

.pdex-search {
	box-sizing: border-box;
	width: 100%;
	max-width: 460px;
	padding: 0.8em 1.1em;
	border: 1px solid #ddd;
	border-radius: 999px;
	font-size: 1em;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pdex-search:focus {
	border-color: #aa2200;
	outline: none;
	box-shadow: 0 0 0 3px rgba(170, 34, 0, 0.12);
}

.pdex-type-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.pdex-type-pill {
	padding: 5px 13px;
	border: 2px solid var(--pill-color);
	border-radius: 999px;
	background: #fff;
	color: var(--pill-color);
	font-size: 0.8em;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.15s ease;
}

.pdex-type-pill.is-active {
	background: var(--pill-color);
	color: #fff;
}

.pdex-count {
	margin: 0 0 14px;
	color: #888;
	font-size: 0.85em;
}

.pdex-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 14px;
}

.pdex-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 14px 10px;
	border: 1px solid #ececec;
	border-radius: 14px;
	background: #fff;
	text-decoration: none !important;
	color: inherit;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.pdex-card:hover {
	border-color: #ddd;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
	transform: translateY(-3px);
}

.pdex-card-id {
	align-self: flex-start;
	margin-bottom: 4px;
	color: #aaa;
	font-size: 0.72em;
	font-weight: 700;
}

.pdex-card-img {
	width: 84px;
	height: 84px;
	object-fit: contain;
	background: #f7f7f7;
	border-radius: 10px;
	margin-bottom: 8px;
}

.pdex-card-name {
	margin-bottom: 6px;
	color: #1a1a1a;
	font-weight: 700;
	font-size: 0.92em;
	text-align: center;
}

.pdex-card-types {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	justify-content: center;
}

.pdex-type-badge {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 999px;
	color: #fff;
	font-size: 0.68em;
	font-weight: 700;
	text-shadow: 0 1px 1px rgba(0,0,0,0.25);
}

/* ---------- Fiche détail (overlay) ---------- */

body.pdex-noscroll {
	overflow: hidden;
}

.pdex-detail-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	overflow-y: auto;
	padding: 40px 16px;
	background: rgba(20, 20, 20, 0.55);
	animation: pdex-fade-in 0.15s ease;
}

@keyframes pdex-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

.pdex-detail-panel {
	position: relative;
	width: 100%;
	max-width: 880px;
	padding: 28px 30px 34px;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	animation: pdex-pop-in 0.18s ease;
}

@keyframes pdex-pop-in {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.pdex-detail-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 34px;
	height: 34px;
	border: none;
	border-radius: 999px;
	background: #f3f3f3;
	color: #444;
	font-size: 1.3em;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease;
}

.pdex-detail-close:hover {
	background: #eee;
}

.pdex-detail-header {
	display: flex;
	align-items: center;
	gap: 22px;
	margin-bottom: 24px;
	flex-wrap: wrap;
}

.pdex-detail-img {
	flex: 0 0 120px;
	width: 120px;
	height: 120px;
	object-fit: contain;
	background: #f7f7f7;
	border-radius: 14px;
}

.pdex-detail-id {
	color: #aaa;
	font-weight: 700;
	font-size: 0.85em;
}

.pdex-detail-name {
	margin: 2px 0 8px;
	font-size: 1.6em;
}

.pdex-detail-types {
	display: flex;
	gap: 6px;
	margin-bottom: 8px;
}

.pdex-detail-tags {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.pdex-tag {
	padding: 2px 10px;
	border-radius: 999px;
	background: #f2f2f2;
	color: #555;
	font-size: 0.72em;
	font-weight: 700;
}

.pdex-detail-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 22px;
}

.pdex-detail-section-wide {
	grid-column: 1 / -1;
}

.pdex-detail-section h3 {
	margin: 0 0 10px;
	font-size: 0.95em;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #444;
}

.pdex-section-sub {
	margin: 10px 0 4px;
	color: #999;
	font-size: 0.75em;
	font-weight: 700;
	text-transform: uppercase;
}

.pdex-stat-row {
	display: grid;
	grid-template-columns: 70px 1fr 36px;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.pdex-stat-label {
	font-size: 0.78em;
	font-weight: 700;
	color: #555;
}

.pdex-stat-bar {
	display: block;
	height: 8px;
	border-radius: 999px;
	background: rgba(0,0,0,0.08);
	overflow: hidden;
}

.pdex-stat-fill {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, #aa2200, #d8532f);
}

.pdex-stat-value {
	font-size: 0.8em;
	font-weight: 700;
	text-align: right;
}

.pdex-move-list {
	margin: 0 0 6px;
	padding: 0;
	list-style: none;
}

.pdex-move-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	border-bottom: 1px solid #f2f2f2;
	font-size: 0.85em;
}

.pdex-move-type {
	flex: 0 0 auto;
	padding: 2px 8px;
	border-radius: 999px;
	color: #fff;
	font-size: 0.72em;
	font-weight: 700;
}

.pdex-move-name {
	flex: 1;
	font-weight: 600;
}

.pdex-stab {
	color: #f2a900;
}

.pdex-move-dps {
	color: #888;
	font-size: 0.85em;
}

.pdex-weakness-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 14px;
}

.pdex-empty-inline {
	color: #999;
	font-size: 0.85em;
	font-style: italic;
}

.pdex-counters-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
	gap: 10px;
}

.pdex-counter-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 10px 6px;
	border: 1px solid #eee;
	border-radius: 12px;
	text-decoration: none !important;
	color: #333;
	font-size: 0.78em;
	font-weight: 600;
	text-align: center;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.pdex-counter-card:hover {
	box-shadow: 0 4px 14px rgba(0,0,0,0.1);
	transform: translateY(-2px);
}

.pdex-counter-card img {
	width: 48px;
	height: 48px;
	object-fit: contain;
	background: #f7f7f7;
	border-radius: 8px;
}

@media only screen and (max-width: 45em) {
	.pdex-detail-grid {
		grid-template-columns: 1fr;
	}
	.pdex-detail-overlay {
		padding: 0;
	}
	.pdex-detail-panel {
		border-radius: 0;
		min-height: 100vh;
	}
}
