/* vignette-catalog.css — the public "Contenu" vignette card catalog
   (AD sign-off 2026-07-03; VignetteCatalogRenderer + pages/contenu-catalog.js).
   Clinical-Navy native: glass cards on the brand background, pill vocabulary,
   the accent gradient for the active niveau segment (blue = advances). All
   colours via the theme variables → day/night for free. */

/* ── Section head: title + live count ─────────────────────────────────── */
.vcat__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
}
.vcat__count {
	font-size: var(--font-size-sm);
	color: var(--text-muted);
	white-space: nowrap;
}

/* ── Filter bar: niveau segments · spécialité select · search ─────────── */
.vcat__filters {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin: 0.75rem 0 1rem;
}

.vcat__seg {
	display: inline-flex;
	gap: 2px;
	padding: 3px;
	background: var(--surface-glass);
	border: 1px solid var(--border-neutral);
	border-radius: var(--brand-radius-pill);
}
.vcat__seg-btn {
	font: inherit;
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-semibold);
	color: var(--text-muted);
	background: transparent;
	border: 0;
	border-radius: var(--brand-radius-pill);
	padding: 0.3rem 0.8rem;
	min-height: 32px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.vcat__seg-btn:hover { color: var(--text-color); background: var(--ink-overlay-faint); }
.vcat__seg-btn.is-on {
	background: var(--accent-gradient);
	color: #fff;
}

.vcat__spec,
.vcat__search {
	font: inherit;
	font-size: var(--font-size-sm);
	color: var(--text-color);
	background: var(--surface-glass);
	border: 1px solid var(--border-neutral);
	border-radius: var(--brand-radius-pill);
	padding: 0.4rem 0.9rem;
	min-height: 38px;
}
.vcat__search { flex: 1 1 10rem; min-width: 9rem; }
.vcat__spec { max-width: 16rem; }

/* The grouped SSP filter — MAIN/SUB header options, like the editor picker. */
.vcat__ssp-opt--main { font-weight: 700; color: var(--text-color); }
.vcat__ssp-opt--sub  { font-weight: 600; color: var(--text-muted); }
.vcat__ssp-opt--leaf { font-weight: 400; color: var(--text-color); }

.vcat__seg-btn:focus-visible,
.vcat__spec:focus-visible,
.vcat__search:focus-visible,
.vcat__card:focus-visible {
	outline: 2px solid var(--brand-accent);
	outline-offset: 2px;
}

/* ── Card grid ─────────────────────────────────────────────────────────── */
.vcat__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: 0.7rem;
}

.vcat__card {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	padding: 0.95rem 1rem 0.8rem;
	background: var(--surface-glass-strong);
	border: 1px solid var(--border-neutral);
	border-radius: var(--brand-radius);
	text-decoration: none;
	color: var(--text-color);
	transition: border-color 0.15s ease, transform 0.15s ease;
}
.vcat__card:hover {
	border-color: var(--accent-border-soft);
	transform: translateY(-1px);
}

.vcat__overline {
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-bold);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--brand-accent);
}
.vcat__title {
	font-size: var(--font-size-md, 1rem);
	font-weight: var(--font-weight-semibold);
	line-height: 1.35;
}

.vcat__meta {
	display: flex;
	gap: 0.35rem;
	flex-wrap: wrap;
}
.vcat__pill {
	font-size: var(--font-size-xs);
	padding: 0.12rem 0.6rem;
	border-radius: var(--brand-radius-pill);
	background: var(--ink-overlay-soft);
	color: var(--text-muted);
	white-space: nowrap;
}
.vcat__pill--level {
	background: var(--accent-bg-soft);
	color: var(--brand-accent-deep);
	font-weight: var(--font-weight-semibold);
}

.vcat__foot {
	margin-top: auto;
	padding-top: 0.55rem;
	border-top: 1px solid var(--border-neutral);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
}
.vcat__read {
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-semibold);
	color: var(--brand-accent);
	white-space: nowrap;
}
.vcat__locked {
	font-size: var(--font-size-xs);
	color: var(--text-muted);
	white-space: nowrap;
}

.vcat__empty {
	margin: 0.75rem 0 0;
	font-size: var(--font-size-sm);
	color: var(--text-muted);
}

/* ── Mobile (the catalog must be excellent on a phone) ─────────────────── */
@media (max-width: 700px) {
	/* The segment row scrolls sideways instead of wrapping into a blob. */
	.vcat__seg {
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.vcat__seg-btn { min-height: 44px; }   /* touch target */
	.vcat__spec { max-width: 100%; flex: 1 1 100%; }
	.vcat__search { flex: 1 1 100%; }
	.vcat__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.vcat__seg-btn,
	.vcat__card { transition: none; }
	.vcat__card:hover { transform: none; }
}
