/*
 * Resources space: the hub page (one tile per space), the tabs shared by the four archives (real links, one URL each)
 * and the lists of documents (rows with a download button, a grid of previews for the media kit).
 */

.renater-resources {
	display: grid;
	gap: 2rem;
}

/* ---------- Tabs ---------- */

.renater-resource-tabs ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.renater-resource-tabs li {
	margin: 0;
	padding: 0;
}

.renater-design .renater-resource-tabs a {
	display: block;
	padding: 0.6rem 1.25rem;
	font-weight: 700;
	color: var(--renater-navy);
	background: #fff;
	background-image: none;
	border-radius: 999px;
	box-shadow: 0 0 0 1px rgba(0, 69, 124, 0.2);
	text-decoration: none;
	transition: background-color 0.25s ease, color 0.25s ease;
}

.renater-design .renater-resource-tabs a:hover {
	background: color-mix(in srgb, var(--renater-sky) 10%, #fff);
}

.renater-design .renater-resource-tabs a[aria-current="page"] {
	color: #fff;
	background: var(--renater-navy);
	box-shadow: none;
}

/* ---------- Hub: one tile per rubric, all the same size; a new item is flagged and put forward ---------- */

/*
 * Columns: at most --renater-cols (set by the block from the number of tiles shown and the maximum chosen), fewer when
 * the screen is narrower (a tile is never narrower than 18rem).
 */
.renater-tiles {
	--renater-tiles-gap: 1.25rem;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(max(18rem, calc((100% - (var(--renater-cols, 3) - 1) * var(--renater-tiles-gap)) / var(--renater-cols, 3))), 1fr));
	gap: var(--renater-tiles-gap);
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
}

.renater-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	margin: 0;
	padding: 1.4rem 1.5rem 1.25rem;
	background: #fff;
	border-radius: 1.25rem;
	/* Every tile has a visible border; a new one gets a thicker one in the lighter blue. */
	box-shadow: 0 0 0 1.5px rgba(0, 69, 124, 0.22), 0 10px 24px -16px rgba(3, 26, 48, 0.18);
	transition: transform 0.35s var(--renater-ease), box-shadow 0.3s ease;
}

.renater-tile:hover {
	transform: translateY(-3px);
	box-shadow: 0 0 0 1.5px var(--renater-navy), 0 20px 40px -18px rgba(0, 69, 124, 0.3);
}

/* A new item: the tile gets the RENATER blue ring and the flag. */
.renater-tile--new,
.renater-tile--new:hover {
	box-shadow: 0 0 0 2px var(--renater-sky), 0 14px 30px -16px rgba(49, 152, 188, 0.55);
}

.renater-tile__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.renater-tile__icon {
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	color: var(--renater-navy);
	background: color-mix(in srgb, var(--renater-sky) 14%, #fff);
	border-radius: 0.9rem;
}

.renater-tile--new .renater-tile__icon {
	color: #fff;
	background: linear-gradient(135deg, var(--renater-navy), var(--renater-sky));
}

.renater-tile__flag {
	padding: 0.15rem 0.7rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
	background: var(--renater-sky);
	border-radius: 999px;
}

.renater-design .renater-tile__title {
	margin: 0.2rem 0 0;
	font-size: 1.25rem;
	line-height: 1.2;
}

.renater-design .renater-tile__title a {
	color: var(--renater-navy);
	background-image: none;
	text-decoration: none;
}

/* The title link covers the whole tile. */
.renater-tile__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.renater-tile__text {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.5;
	color: #3d4b59;
}

/* The latest item, always there so that the tiles keep the same height. When it is new its zone is tinted. */
.renater-tile__latest {
	margin-top: auto;
	min-height: 6.6rem;
	padding: 0.8rem 1rem;
	background: #f3f7fc;
	border-radius: 0.8rem;
}

.renater-tile--new .renater-tile__latest {
	background: color-mix(in srgb, var(--renater-sky) 15%, #fff);
}

.renater-tile__latest p {
	margin: 0;
}

.renater-tile__latest-label {
	font-size: 0.82rem;
	color: #5a6876;
}

.renater-tile__latest-date {
	color: inherit;
}

.renater-tile__latest-title {
	margin-top: 0.25rem;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--renater-ink-2);
}

.renater-tile__latest-title--empty {
	font-weight: 400;
	color: #5a6876;
}

.renater-tile__count {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--renater-navy);
}

@media (prefers-reduced-motion: reduce) {
	.renater-tile {
		transition: none;
	}

	.renater-tile:hover {
		transform: none;
	}
}

/* ---------- Lists ---------- */

.renater-resource-list {
	display: grid;
	gap: 1rem;
}

/*
 * One look for every list of the space (press releases, reports, HAL on the hub and on its own page): a single white
 * panel, hairlines between the rows, and the same three columns: a fixed left column (date, year or thumbnail), the
 * body, the action. The media kit keeps its gallery of tiles on its own page and takes this row form on the hub.
 */
.renater-resource-list:not(.renater-resource-list--cards),
.renater-hal-list {
	--renater-slot: 6.5rem;
	gap: 0;
	overflow: hidden;
	background: #fff;
	border-radius: 1rem;
	box-shadow: 0 0 0 1px rgba(3, 26, 48, 0.07), 0 14px 32px -16px rgba(3, 26, 48, 0.18);
}

.renater-resource {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.75rem 1.5rem;
	padding: 1.25rem 1.5rem;
	background: #fff;
	border-radius: 1.25rem;
	box-shadow: 0 0 0 1px rgba(3, 26, 48, 0.07), 0 10px 24px -16px rgba(3, 26, 48, 0.18);
}

.renater-resource-list:not(.renater-resource-list--cards) .renater-resource {
	grid-template-columns: var(--renater-slot) minmax(0, 1fr) auto;
	align-items: start;
	gap: 0.5rem 1.25rem;
	padding: 1.1rem 1.5rem;
	background: none;
	border-radius: 0;
	box-shadow: none;
}

.renater-resource-list:not(.renater-resource-list--cards) .renater-resource__body {
	grid-column: 2;
}

.renater-resource-list:not(.renater-resource-list--cards) .renater-resource__actions {
	grid-column: 3;
}

.renater-resource-list:not(.renater-resource-list--cards) .renater-resource + .renater-resource {
	border-top: 1px solid rgba(3, 26, 48, 0.08);
}

.renater-resource__when {
	margin: 0.2rem 0 0.25rem;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--renater-sky);
}

/* In the left column of a row the date is set in plain case so that it holds on two lines at most. */
.renater-resource-list:not(.renater-resource-list--cards) > .renater-resource > .renater-resource__when {
	font-size: 0.9rem;
	line-height: 1.35;
	letter-spacing: 0;
	text-transform: none;
}

.renater-design .renater-resource__title {
	margin: 0;
	font-size: 1.1rem;
	line-height: 1.3;
	color: var(--renater-ink-2);
}

.renater-resource__text {
	margin-top: 0.4rem;
	color: #3d4b59;
}

.renater-resource__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

/* Buttons of the lists: navy pill for the main action, outlined for the secondary one (light backgrounds). */
.renater-design .renater-resource__actions .renater-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem 1.15rem;
	font-size: 0.95rem;
	font-weight: 700;
	color: #fff;
	background: var(--renater-navy);
	background-image: none;
	border-radius: 999px;
	box-shadow: none;
	text-decoration: none;
}

.renater-design .renater-resource__actions .renater-btn--ghost {
	color: var(--renater-navy);
	background: #fff;
	box-shadow: inset 0 0 0 1.5px var(--renater-navy);
}

.renater-design .renater-resource__actions .renater-btn:hover {
	color: #fff;
	background: var(--renater-sky);
	box-shadow: none;
}

.renater-design .renater-resource__actions .renater-btn--ghost:hover {
	color: var(--renater-navy);
	background: color-mix(in srgb, var(--renater-sky) 12%, #fff);
	box-shadow: inset 0 0 0 1.5px var(--renater-navy);
}

.renater-resource__meta {
	margin-left: 0.35rem;
	font-weight: 400;
	opacity: 0.8;
}

/* Media kit: a grid of previews. */
.renater-resource-list--cards {
	grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

.renater-resource--card {
	grid-template-columns: 1fr;
	align-items: start;
}

.renater-resource__preview {
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 10;
	padding: 1rem;
	background: color-mix(in srgb, var(--renater-sky) 8%, #fff);
	border-radius: 0.9rem;
}

.renater-resource__preview img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

@media (max-width: 47.99em) {
	.renater-resource,
	.renater-resource-list:not(.renater-resource-list--cards) .renater-resource {
		grid-template-columns: 1fr;
	}

	.renater-resource-list:not(.renater-resource-list--cards) .renater-resource__body,
	.renater-resource-list:not(.renater-resource-list--cards) .renater-resource__actions {
		grid-column: 1;
	}
}

/* ---------- Publications HAL ---------- */

/*
 * Hierarchy of the space: the page title "Resources" (hero), the tabs that move between the rubrics, then the rubric
 * itself under a thin rule: its title, smaller than the page title, and its introduction right under it.
 */
.renater-resources {
	gap: 1.5rem;
}

.renater-design .renater-resources__heading {
	margin: 1rem 0 0;
	padding-top: 1.75rem;
	font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.7rem);
	letter-spacing: -0.01em;
	color: var(--renater-navy);
	border-top: 1px solid rgba(0, 69, 124, 0.15);
}

/* The introduction of the rubric stays close to its title. */
.renater-resources__heading + .blocks-container {
	margin-top: -0.75rem;
	max-width: 62ch;
	font-size: 1.05rem;
	line-height: 1.6;
	color: #3d4b59;
}

.renater-resources__heading + .blocks-container > * {
	margin-block: 0;
}

/* More air between the intro and the search box that starts the list. */
.renater-resources__heading + .blocks-container + .renater-hal-search {
	margin-top: 0.75rem;
}

/* Search box above the results. */
.renater-hal-search {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.renater-hal-search input[type="search"] {
	flex: 1 1 16rem;
	padding: 0.65rem 1rem;
	font: inherit;
	color: var(--renater-ink);
	background: #fff;
	border: 1px solid rgba(0, 69, 124, 0.3);
	border-radius: 999px;
}

/* The part of the page that changes without a reload (assets/js/hal-filters.js). */
.renater-hal-app {
	display: grid;
	gap: 1.5rem;
}

.renater-hal-app[aria-busy="true"] .renater-hal {
	opacity: 0.55;
	transition: opacity 0.2s ease;
}

.renater-hal__results:focus {
	outline: none;
}

/* Two columns like HAL: "Filter your results" on the left, the results on the right. */
.renater-hal {
	display: grid;
	grid-template-columns: minmax(14rem, 17rem) minmax(0, 1fr);
	gap: 2rem;
	align-items: start;
}

.renater-hal-facets {
	display: grid;
	gap: 1rem;
}

.renater-hal-facets__title {
	margin: 0;
	font-weight: 700;
	color: var(--renater-ink-2);
}

.renater-hal-facet {
	padding: 0.25rem 1rem 0.5rem;
	background: #fff;
	border-radius: 0.9rem;
	box-shadow: 0 0 0 1px rgba(3, 26, 48, 0.07), 0 10px 24px -16px rgba(3, 26, 48, 0.18);
}

.renater-hal-facet summary {
	padding: 0.6rem 0;
	font-weight: 700;
	color: var(--renater-navy);
	cursor: pointer;
}

.renater-hal-facet ul {
	display: grid;
	gap: 0.1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.renater-hal-facet li {
	margin: 0;
	padding: 0;
}

.renater-design .renater-hal-check {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.3rem 0;
	font-size: 0.95rem;
	color: var(--renater-ink);
	background-image: none;
	text-decoration: none;
}

.renater-design .renater-hal-check:hover .renater-hal-check__label {
	color: var(--renater-sky);
}

.renater-hal-check__box {
	flex: none;
	width: 1.05rem;
	height: 1.05rem;
	border-radius: 0.25rem;
	background: #fff;
	box-shadow: inset 0 0 0 1.5px rgba(0, 69, 124, 0.45);
}

.renater-hal-check[aria-checked="true"] .renater-hal-check__box {
	background: var(--renater-navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") center / 100% no-repeat;
	box-shadow: none;
}

.renater-hal-check__label {
	flex: 1;
	min-width: 0;
}

.renater-hal-check__count {
	font-size: 0.85rem;
	color: #5a6876;
}

.renater-hal__results {
	display: grid;
	gap: 1rem;
	min-width: 0;
}

.renater-hal-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.5rem;
}

.renater-hal-bar--end {
	justify-content: flex-end;
}

.renater-hal-count__sort {
	font-weight: 400;
	color: #5a6876;
}

/* One publication: thumbnail, title, authors, venue, tags. */
.renater-hal-list {
	display: grid;
}

.renater-hal-doc {
	display: grid;
	grid-template-columns: var(--renater-slot, 6.5rem) minmax(0, 1fr);
	gap: 1.25rem;
	padding: 1.1rem 1.5rem;
}

.renater-hal-doc + .renater-hal-doc {
	border-top: 1px solid rgba(3, 26, 48, 0.08);
}

.renater-design .renater-hal-doc__thumb {
	display: block;
	min-height: 6.25rem;
	background-image: none;
}

.renater-hal-doc__thumb img {
	display: block;
	width: 4.5rem;
	height: auto;
	border-radius: 0.2rem;
	box-shadow: 0 0 0 1px rgba(3, 26, 48, 0.12);
}

.renater-hal-doc__body {
	display: grid;
	gap: 0.3rem;
	align-content: start;
	min-width: 0;
}

.renater-hal-doc__body > * {
	margin: 0;
}

.renater-design .renater-hal-doc__title {
	margin: 0;
	font-size: 1.1rem;
	line-height: 1.3;
}

.renater-design .renater-hal-doc__title a {
	color: var(--renater-ink-2);
	background-image: none;
	text-decoration: none;
}

.renater-design .renater-hal-doc__title a:hover {
	color: var(--renater-sky);
	text-decoration: underline;
}

.renater-hal-doc__authors {
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--renater-navy);
}

.renater-hal-doc__venue {
	font-size: 0.9rem;
	font-style: italic;
	color: #5a6876;
}

.renater-hal-doc__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 0.2rem;
}

.renater-design .renater-hal-tag {
	display: inline-block;
	padding: 0.1rem 0.55rem;
	font-size: 0.8rem;
	font-weight: 700;
	color: #fff;
	background: #7a7ba8;
	background-image: none;
	border-radius: 0.25rem;
	text-decoration: none;
}

.renater-design .renater-hal-tag--id {
	color: var(--renater-ink-2);
	background: color-mix(in srgb, var(--renater-sky) 12%, #fff);
}

.renater-design .renater-hal-tag--open {
	color: #0b5a3a;
	background: #dff3e8;
}

@media (max-width: 61.99em) {
	.renater-hal {
		grid-template-columns: 1fr;
	}
}

.renater-hal-count,
.renater-hal-note,
.renater-hal-credit {
	margin: 0;
	color: #3d4b59;
}

.renater-hal-count {
	font-weight: 700;
	color: var(--renater-navy);
}

.renater-hal-pages {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.renater-design .renater-hal-pages a {
	display: grid;
	place-items: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.6rem;
	font-weight: 700;
	color: var(--renater-navy);
	background: #fff;
	background-image: none;
	border-radius: 999px;
	box-shadow: 0 0 0 1px rgba(0, 69, 124, 0.2);
	text-decoration: none;
}

.renater-design .renater-hal-pages a[aria-current="page"] {
	color: #fff;
	background: var(--renater-navy);
	box-shadow: none;
}

/* Detail of a publication. */
.renater-hal-detail {
	display: grid;
	gap: 1rem;
	padding: clamp(1.25rem, 3vw, 2.25rem);
	background: #fff;
	border-radius: 1.5rem;
	box-shadow: 0 0 0 1px rgba(3, 26, 48, 0.07), 0 14px 32px -16px rgba(3, 26, 48, 0.18);
}

.renater-hal-detail > * {
	margin: 0;
}

.renater-design .renater-hal-detail__title {
	margin: 0;
	font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem);
	line-height: 1.2;
	color: var(--renater-ink-2);
}

.renater-hal-detail__meta {
	display: grid;
	grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr);
	gap: 0.5rem 1.5rem;
	margin: 0;
}

.renater-hal-detail__meta dt {
	font-weight: 700;
	color: var(--renater-navy);
}

.renater-hal-detail__meta dd {
	margin: 0;
	overflow-wrap: anywhere;
}

.renater-design .renater-resource__title a {
	color: inherit;
	background-image: none;
	text-decoration: none;
}

.renater-design .renater-resource__title a:hover {
	color: var(--renater-sky);
	text-decoration: underline;
}

@media (max-width: 47.99em) {
	.renater-hal-detail__meta {
		grid-template-columns: 1fr;
		gap: 0.15rem;
	}

	.renater-hal-detail__meta dd {
		margin-bottom: 0.6rem;
	}
}

/* Default icon placeholder (shown when a card has no thumbnail). */
.renater-resource__preview--placeholder {
	color: var(--renater-sky);
	opacity: 0.7;
}

/* Media kit page: the link to the videos comes first. */
.renater-resources__videos {
	margin: 0 0 1.5rem;
}
