/* art.nsi.xyz — mur de tuiles
   Direction : sombre, dense, coins arrondis, aucune barre de navigation. */

:root {
	--bg: #07090d;
	--surface: #11161f;
	--surface-raised: #161d29;
	--ink: #eef3fb;
	--muted: #a5b1c2;
	--faint: #6e7c8f;
	--line: rgba(224, 234, 250, 0.09);
	--line-strong: rgba(224, 234, 250, 0.16);
	--accent: #adc8ff;
	--accent-soft: rgba(173, 200, 255, 0.14);
	--gap: 6px;
	--radius: 14px;
	--font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
	color-scheme: dark;
	font-synthesis: none;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	background: var(--bg);
}

body {
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0;
	background:
		radial-gradient(1100px 650px at 84% -14%, rgba(78, 112, 190, 0.18), transparent 66%),
		radial-gradient(900px 600px at -12% 18%, rgba(154, 92, 190, 0.1), transparent 64%),
		var(--bg);
	background-attachment: fixed;
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.4;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

body:has(dialog[open]) {
	overflow: hidden;
}

body.is-modal-open {
	overflow: hidden;
}

a {
	color: inherit;
}

button {
	color: inherit;
	font: inherit;
}

img {
	display: block;
	max-width: 100%;
}

::selection {
	background: var(--accent);
	color: #0a0e14;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

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

.wall {
	--cols: 5;
	--tile-size: 240px;
	display: grid;
	grid-auto-flow: row dense;
	grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
	grid-auto-rows: var(--tile-size);
	gap: var(--gap);
	min-height: 100vh;
	min-height: 100dvh;
	padding: var(--gap);
	align-items: stretch;
	position: relative;
	z-index: 1;
}

.wall[aria-busy="true"] {
	cursor: progress;
}

.tile {
	position: relative;
	display: block;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--ink);
	text-align: left;
	isolation: isolate;
	-webkit-tap-highlight-color: transparent;
	animation: tile-in 0.58s cubic-bezier(0.22, 0.7, 0.28, 1) both;
	animation-delay: calc(min(var(--i, 0), 42) * 9ms);
}

.tile[hidden] {
	display: none !important;
}

@keyframes tile-in {
	from {
		opacity: 0;
		transform: translateY(9px) scale(0.992);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.tile--masthead {
	order: -2;
	grid-column: span 2;
	container-type: inline-size;
	display: flex;
	flex-direction: column;
	gap: clamp(4px, 1.15cqw, 9px);
	padding: clamp(13px, 3.1cqw, 25px);
	overflow: hidden;
	border: 1px solid var(--line);
	background:
		radial-gradient(80% 90% at 102% -6%, rgba(120, 158, 255, 0.24), transparent 56%),
		radial-gradient(65% 50% at -8% 108%, rgba(185, 138, 255, 0.1), transparent 70%),
		linear-gradient(145deg, #192231 0%, #0e131b 54%, #090d13 100%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.05),
		0 1px 0 rgba(0, 0, 0, 0.25);
}

.tile--masthead::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	opacity: 0.42;
	background-image:
		linear-gradient(rgba(226, 238, 255, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(226, 238, 255, 0.035) 1px, transparent 1px);
	background-size: 38px 38px;
	mask-image: linear-gradient(to bottom, #000 0%, transparent 72%);
	-webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 72%);
}

.tile--masthead > * {
	position: relative;
	z-index: 1;
}

.eyebrow {
	margin: 0;
	color: var(--faint);
	font-size: clamp(8px, 1.6cqw, 10.5px);
	font-weight: 650;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.masthead__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.masthead__tools {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 6px;
	margin-left: auto;
}

.masthead__count {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	min-height: 24px;
	padding: 3px 8px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: rgba(8, 12, 18, 0.34);
	color: var(--muted);
	font-size: clamp(8px, 1.5cqw, 10px);
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.03em;
	white-space: nowrap;
}

.masthead__auth {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-height: 28px;
	padding: 5px 10px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--ink);
	color: #0a0e15;
	font-size: clamp(9px, 1.7cqw, 11.5px);
	font-weight: 650;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition:
		background 180ms ease,
		color 180ms ease,
		border-color 180ms ease;
}

.masthead__auth-arrow {
	font-size: 0.92em;
	opacity: 0.62;
	transition: transform 180ms ease;
}

.masthead__auth:hover {
	background: #ffffff;
	color: #07090d;
}

.masthead__auth:hover .masthead__auth-arrow {
	transform: translate(1px, -1px);
}

.masthead__auth:focus-visible {
	outline-offset: 2px;
}

.masthead__auth--account {
	min-height: 30px;
	gap: 6px;
	padding: 3px 9px 3px 4px;
	border-color: var(--line-strong);
	background: rgba(255, 255, 255, 0.075);
	color: var(--ink);
}

.masthead__auth--account:hover {
	border-color: rgba(224, 234, 250, 0.28);
	background: rgba(255, 255, 255, 0.13);
	color: var(--ink);
}

.masthead__avatar {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 50%;
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 9px;
	font-weight: 750;
	line-height: 1;
}

.masthead__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.masthead__auth-label {
	min-width: 0;
	max-width: 10ch;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.masthead__logout {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 4px;
	min-height: 28px;
	padding: 4px 6px;
	border-radius: 999px;
	color: var(--faint);
	font-size: clamp(8px, 1.5cqw, 10.5px);
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition:
		background 180ms ease,
		color 180ms ease;
}

.masthead__logout:hover {
	background: rgba(255, 255, 255, 0.06);
	color: var(--muted);
}

.masthead__logout:focus-visible {
	outline-offset: 1px;
}

.masthead__logout-icon {
	display: none;
}

.masthead__title {
	margin: 0;
	color: #f2f6ff;
	font-size: clamp(28px, 8.4cqw, 52px);
	font-weight: 580;
	letter-spacing: -0.058em;
	line-height: 0.88;
}

.masthead__title .dot {
	color: var(--accent);
}

.masthead__lede {
	max-width: 56ch;
	margin: 0;
	color: #b8c4d5;
	font-size: clamp(10px, 2.05cqw, 14px);
	line-height: 1.4;
	text-wrap: pretty;
}

.masthead__filters {
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin-top: auto;
	padding-top: clamp(3px, 0.9cqw, 7px);
}

.filter-row {
	display: flex;
	align-items: center;
	gap: 5px;
	flex-wrap: wrap;
	min-width: 0;
}

.filter-row--views {
	flex-wrap: wrap;
}

.filter-label {
	flex: 0 0 auto;
	color: var(--faint);
	font-size: clamp(8px, 1.45cqw, 10px);
	font-weight: 650;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.chips {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-wrap: wrap;
	min-width: 0;
}

.chip {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 25px;
	padding: clamp(3px, 1cqw, 5px) clamp(7px, 1.9cqw, 11px);
	border: 1px solid rgba(255, 255, 255, 0.09);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.035);
	color: #acb8c9;
	font-size: clamp(9px, 1.9cqw, 12px);
	font-weight: 550;
	line-height: 1.15;
	cursor: pointer;
	transition:
		background 180ms ease,
		border-color 180ms ease,
		color 180ms ease;
}

.chip:hover {
	border-color: var(--line-strong);
	background: rgba(255, 255, 255, 0.075);
	color: var(--ink);
}

.chip[aria-pressed="true"] {
	border-color: transparent;
	background: var(--ink);
	color: #0a0e15;
}

/* Compactage du masthead quand la tuile est petite. */
@container (max-width: 460px) {
	.masthead__kicker {
		display: none;
	}

	.masthead__top {
		justify-content: flex-end;
	}

	.masthead__lede {
		font-size: 10px;
		max-width: none;
	}
}

@container (max-width: 330px) {
	.masthead__lede {
		font-size: 9.5px;
		line-height: 1.32;
	}
}

/* -------------------------------------------------------------------------- */
/* Tuiles images                                                              */
/* -------------------------------------------------------------------------- */

.tile--oeuvre {
	container-type: inline-size;
	padding: 0;
	background: #0d121a;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.045);
	cursor: zoom-in;
}

.tile--oeuvre img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	image-rendering: auto;
	transform: scale(1.001);
	transition:
		transform 720ms cubic-bezier(0.2, 0.68, 0.22, 1),
		filter 360ms ease;
}

.tile--oeuvre.is-loaded img {
	opacity: 1;
}

.tile--oeuvre::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.045);
	pointer-events: none;
}

.tile--large {
	grid-column: span 2;
}

.tile--large img {
	object-position: center;
}

.oeuvre__shade {
	position: absolute;
	inset: 0;
	z-index: 2;
	background:
		linear-gradient(to top, rgba(2, 5, 9, 0.88) 0%, rgba(3, 7, 12, 0.34) 34%, transparent 62%);
	opacity: 0;
	transition: opacity 260ms ease;
	pointer-events: none;
}

.oeuvre__meta {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 3;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: clamp(9px, 3.2cqw, 17px);
	opacity: 0;
	transform: translateY(7px);
	transition:
		opacity 260ms ease,
		transform 320ms cubic-bezier(0.2, 0.7, 0.2, 1);
	pointer-events: none;
}

.oeuvre__title {
	display: -webkit-box;
	overflow: hidden;
	color: #ffffff;
	font-size: clamp(10px, 4cqw, 14px);
	font-weight: 620;
	letter-spacing: -0.012em;
	line-height: 1.18;
	text-wrap: balance;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.65);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.tile--large .oeuvre__title {
	font-size: clamp(11px, 2.35cqw, 16px);
}

.oeuvre__sub {
	overflow: hidden;
	color: rgba(236, 242, 252, 0.72);
	font-size: clamp(8px, 2.8cqw, 10.5px);
	line-height: 1.3;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tile--oeuvre:hover img,
.tile--oeuvre:focus-visible img {
	filter: brightness(1.045) saturate(1.02);
	transform: scale(1.042);
}

.tile--oeuvre:hover .oeuvre__shade,
.tile--oeuvre:focus-visible .oeuvre__shade,
.tile--oeuvre:hover .oeuvre__meta,
.tile--oeuvre:focus-visible .oeuvre__meta {
	opacity: 1;
	transform: translateY(0);
}

.tile--oeuvre:active {
	cursor: zoom-in;
}

.tile--oeuvre:active img {
	transform: scale(1.018);
}

.oeuvre__fallback {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: none;
	place-items: center;
	padding: 14px;
	background:
		radial-gradient(80% 80% at 30% 20%, rgba(120, 154, 220, 0.2), transparent 65%),
		#111722;
	color: var(--muted);
	font-size: clamp(10px, 2.8cqw, 12px);
	text-align: center;
}

.tile--broken .oeuvre__fallback {
	display: grid;
}

.tile--broken img {
	visibility: hidden;
}

/* -------------------------------------------------------------------------- */
/* Tuiles texte                                                               */
/* -------------------------------------------------------------------------- */

.tile--legal,
.tile--quote {
	container-type: inline-size;
	border: 1px solid var(--line);
}

.tile--legal {
	order: 10000;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 8px;
	padding: clamp(13px, 5.4cqw, 23px);
	background:
		radial-gradient(90% 95% at 0% 108%, rgba(94, 148, 151, 0.16), transparent 62%),
		linear-gradient(155deg, #141b22 0%, #0c1016 72%);
	cursor: pointer;
	transition:
		border-color 200ms ease,
		background-color 200ms ease;
}

.tile--legal:hover {
	border-color: rgba(155, 206, 208, 0.3);
}

.legal__mark {
	position: absolute;
	top: clamp(8px, 2.8cqw, 14px);
	right: clamp(12px, 4cqw, 20px);
	color: rgba(166, 214, 214, 0.16);
	font-family: var(--font-serif);
	font-size: clamp(36px, 18cqw, 68px);
	font-style: italic;
	line-height: 1;
	pointer-events: none;
}

.legal__body {
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin-top: auto;
}

.legal__title {
	max-width: 12ch;
	margin: 0;
	color: #eef4f5;
	font-size: clamp(16px, 7cqw, 25px);
	font-weight: 590;
	letter-spacing: -0.035em;
	line-height: 1.02;
}

.legal__text {
	max-width: 25ch;
	margin: 0;
	color: #a9b8bb;
	font-size: clamp(9px, 3.35cqw, 12px);
	line-height: 1.38;
}

.legal__cta {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: #b8d7d9;
	font-size: clamp(8px, 2.9cqw, 10.5px);
	font-weight: 650;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.tile--quote {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 9px;
	padding: clamp(14px, 6cqw, 26px);
	background:
		linear-gradient(155deg, rgba(23, 31, 41, 0.94), rgba(10, 14, 20, 0.98));
}

.tile--quote::before {
	content: "«";
	position: absolute;
	top: clamp(-13px, -2cqw, -6px);
	left: clamp(7px, 2.5cqw, 13px);
	color: rgba(173, 200, 255, 0.1);
	font-family: var(--font-serif);
	font-size: clamp(70px, 38cqw, 135px);
	line-height: 1;
	pointer-events: none;
}

.tile--quote.tone-2 {
	background:
		radial-gradient(90% 80% at 90% 105%, rgba(202, 165, 101, 0.09), transparent 65%),
		linear-gradient(155deg, #211d17, #0d1014 78%);
}

.tile--quote.tone-3 {
	background:
		radial-gradient(90% 80% at 0% 100%, rgba(107, 168, 145, 0.1), transparent 65%),
		linear-gradient(155deg, #14201d, #0a1012 78%);
}

.tile--quote.tone-4 {
	background:
		radial-gradient(90% 80% at 100% 0%, rgba(184, 112, 139, 0.09), transparent 65%),
		linear-gradient(155deg, #1e161b, #0d0f14 78%);
}

.tile--quote blockquote {
	position: relative;
	z-index: 1;
	margin: 0;
	color: #dde7f4;
	font-family: var(--font-serif);
	font-size: clamp(13px, 6.5cqw, 23px);
	font-style: italic;
	letter-spacing: -0.015em;
	line-height: 1.27;
	text-wrap: pretty;
}

.tile--quote figcaption {
	position: relative;
	z-index: 1;
	color: var(--faint);
	font-size: clamp(8px, 2.7cqw, 10px);
	font-style: normal;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.tile--empty {
	order: 9999;
	grid-column: span 2;
	container-type: inline-size;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 8px;
	padding: clamp(18px, 4cqw, 34px);
	border: 1px dashed rgba(173, 200, 255, 0.22);
	background: rgba(17, 22, 31, 0.72);
}

.tile--empty h2 {
	margin: 0;
	font-size: clamp(17px, 4.5cqw, 27px);
	font-weight: 580;
	letter-spacing: -0.03em;
}

.tile--empty p {
	max-width: 48ch;
	margin: 0;
	color: var(--muted);
	font-size: clamp(11px, 2.5cqw, 14px);
	line-height: 1.45;
}

.text-button {
	appearance: none;
	margin-top: 4px;
	padding: 7px 11px;
	border: 1px solid rgba(173, 200, 255, 0.3);
	border-radius: 999px;
	background: rgba(173, 200, 255, 0.08);
	color: var(--accent);
	font-size: clamp(10px, 2.2cqw, 12px);
	font-weight: 600;
	cursor: pointer;
}

.text-button:hover {
	background: rgba(173, 200, 255, 0.16);
	color: #e2ecff;
}

.tile--fatal {
	grid-column: span 2;
	grid-row: span 2;
	container-type: inline-size;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 10px;
	padding: clamp(22px, 5cqw, 42px);
	border: 1px solid var(--line);
	background:
		radial-gradient(80% 80% at 100% 0%, rgba(186, 108, 115, 0.12), transparent 60%),
		linear-gradient(145deg, #1c171c, #0c0f14 75%);
}

.tile--fatal h1 {
	margin: 0;
	font-size: clamp(24px, 6cqw, 46px);
	font-weight: 580;
	letter-spacing: -0.045em;
	line-height: 0.98;
}

.tile--fatal p {
	max-width: 46ch;
	margin: 0;
	color: var(--muted);
	font-size: clamp(11px, 2.5cqw, 14px);
	line-height: 1.5;
}

.tile--fatal code {
	padding: 1px 5px;
	border-radius: 5px;
	background: rgba(255, 255, 255, 0.06);
	color: #d6dfec;
	font-size: 0.92em;
}

/* Chargement initial */
.tile--boot {
	gap: 12px;
	justify-content: center;
	cursor: progress;
}

.boot__logo {
	color: #f2f6ff;
	font-size: clamp(30px, 9.6cqw, 60px);
	font-weight: 580;
	letter-spacing: -0.058em;
	line-height: 0.88;
}

.boot__logo span {
	color: var(--accent);
}

.boot__line {
	width: min(260px, 60%);
	height: 8px;
	border-radius: 999px;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
	background-size: 200% 100%;
	animation: shimmer 1.4s linear infinite;
}

.boot__line--short {
	width: min(160px, 38%);
}

@keyframes shimmer {
	from {
		background-position: 100% 0;
	}
	to {
		background-position: -100% 0;
	}
}

.nojs {
	margin: 20px;
	padding: 20px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--muted);
	text-align: center;
}

/* -------------------------------------------------------------------------- */
/* Détail plein écran                                                         */
/* -------------------------------------------------------------------------- */

.modal {
	position: fixed;
	inset: 0;
	width: 100vw;
	max-width: none;
	height: 100vh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ink);
	overflow: hidden;
}

.modal::backdrop {
	background: rgba(3, 5, 9, 0.82);
	backdrop-filter: blur(18px) saturate(0.82);
}

.modal--detail[open] {
	display: block;
}

.detail {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	height: 100vh;
	height: 100dvh;
	padding: clamp(8px, 1.4vw, 20px);
	overflow-y: auto;
	overscroll-behavior: contain;
	background:
		radial-gradient(900px 500px at 50% -10%, rgba(88, 119, 196, 0.11), transparent 70%),
		rgba(6, 8, 12, 0.62);
}

.detail__ambient {
	position: fixed;
	inset: -80px;
	z-index: 0;
	width: calc(100% + 160px);
	height: calc(100% + 160px);
	object-fit: cover;
	opacity: 0.38;
	filter: blur(64px) saturate(1.18) brightness(0.95);
	pointer-events: none;
}

.detail::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		radial-gradient(80% 60% at 50% 40%, transparent 0%, rgba(5, 7, 11, 0.32) 70%),
		rgba(5, 7, 11, 0.34);
}

.detail__bar,
.detail__stage,
.detail__caption {
	position: relative;
	z-index: 2;
}

.detail__bar {
	position: relative;
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 48px;
}

.detail__count {
	margin: 0;
	color: var(--faint);
	font-size: 10px;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.icon-button {
	appearance: none;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.055);
	color: var(--ink);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition:
		background 180ms ease,
		border-color 180ms ease,
		transform 180ms ease;
}

.icon-button:hover {
	border-color: var(--line-strong);
	background: rgba(255, 255, 255, 0.11);
}

.icon-button:active {
	transform: scale(0.94);
}

.detail__close {
	position: absolute;
	top: 50%;
	right: 0;
	transform: translateY(-50%);
}

.detail__close:active {
	transform: translateY(-50%) scale(0.94);
}

.detail__arrow[disabled] {
	opacity: 0.28;
	cursor: default;
}

.detail__arrow[disabled]:hover {
	border-color: var(--line);
	background: rgba(255, 255, 255, 0.055);
}

.detail__stage {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	min-height: 0;
	padding: 4px 0 12px;
}

.detail__image {
	width: auto;
	height: auto;
	max-width: min(1180px, 94vw);
	max-height: min(68vh, 68dvh, 760px);
	border-radius: clamp(10px, 1.4vw, 20px);
	background: #0b0f16;
	box-shadow: 0 36px 110px rgba(0, 0, 0, 0.62);
	object-fit: contain;
}

.detail__caption {
	display: flex;
	flex: 0 0 auto;
	align-items: flex-end;
	justify-content: space-between;
	gap: 22px;
	width: min(1180px, 94vw);
	margin: 0 auto;
	padding: 12px 2px 5px;
	border-top: 1px solid var(--line);
}

.detail__text {
	min-width: 0;
}

.detail__text .eyebrow {
	margin-bottom: 4px;
}

.detail__text h2 {
	margin: 0;
	color: #f4f7fd;
	font-size: clamp(23px, 3.3vw, 42px);
	font-weight: 580;
	letter-spacing: -0.045em;
	line-height: 1.02;
	text-wrap: balance;
}

.detail__authors {
	margin: 6px 0 0;
	color: var(--muted);
	font-size: clamp(11px, 1.2vw, 14px);
	line-height: 1.35;
}

.detail__actions {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 7px;
}

.button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 13px;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.055);
	color: var(--ink);
	font-size: clamp(10px, 0.85vw, 12px);
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition:
		background 180ms ease,
		border-color 180ms ease,
		color 180ms ease;
}

.button:hover {
	border-color: rgba(255, 255, 255, 0.3);
	background: rgba(255, 255, 255, 0.11);
}

.button--primary {
	border-color: transparent;
	background: var(--ink);
	color: #0a0e15;
}

.button--primary:hover {
	background: #ffffff;
	color: #07090d;
}

.button span {
	font-size: 0.9em;
	opacity: 0.7;
}

/* -------------------------------------------------------------------------- */
/* Mentions légales                                                           */
/* -------------------------------------------------------------------------- */

.modal--legal[open] {
	display: grid;
	place-items: center;
	padding: 18px;
	overflow-y: auto;
}

.legal {
	width: min(660px, 100%);
	max-height: calc(100vh - 36px);
	max-height: calc(100dvh - 36px);
	overflow-y: auto;
	padding: clamp(24px, 4.5vw, 44px);
	border: 1px solid var(--line);
	border-radius: clamp(18px, 2.4vw, 26px);
	background:
		radial-gradient(90% 70% at 100% 0%, rgba(97, 159, 163, 0.12), transparent 60%),
		linear-gradient(150deg, #141b22 0%, #0b0f15 78%);
	box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}

.legal__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 20px;
}

.legal__bar .eyebrow {
	color: #8faaa9;
}

.legal h2 {
	max-width: 12ch;
	margin: 0 0 18px;
	color: #f2f6f6;
	font-size: clamp(30px, 4.6vw, 46px);
	font-weight: 580;
	letter-spacing: -0.05em;
	line-height: 0.97;
}

.legal p {
	margin: 0;
	color: #b2c0c2;
	font-size: clamp(13px, 1.25vw, 15px);
	line-height: 1.62;
}

.legal p a {
	color: #d9e8e8;
	text-decoration: underline;
	text-decoration-color: rgba(217, 232, 232, 0.35);
	text-underline-offset: 3px;
}

.legal p a:hover {
	text-decoration-color: currentColor;
}

.legal__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 26px;
	padding-top: 18px;
	border-top: 1px solid var(--line);
}

.legal__links a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 8px 11px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.04);
	color: #dce9e9;
	font-size: 11px;
	font-weight: 600;
	text-decoration: none;
}

.legal__links a:hover {
	border-color: var(--line-strong);
	background: rgba(255, 255, 255, 0.09);
}

.legal__links span {
	color: #8faaa9;
	font-size: 0.95em;
}

/* -------------------------------------------------------------------------- */
/* Retour de connexion / déconnexion                                          */
/* -------------------------------------------------------------------------- */

.toast {
	position: fixed;
	left: 50%;
	bottom: calc(18px + env(safe-area-inset-bottom, 0px));
	z-index: 30;
	max-width: calc(100vw - 24px);
	margin: 0;
	padding: 9px 15px;
	transform: translateX(-50%);
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	background: rgba(10, 15, 23, 0.9);
	box-shadow: 0 14px 44px rgba(0, 0, 0, 0.48);
	color: var(--ink);
	font-size: 12px;
	line-height: 1.3;
	text-align: center;
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	pointer-events: none;
	animation: toast-in 220ms ease both;
}

.toast[hidden] {
	display: none;
}

@keyframes toast-in {
	from {
		opacity: 0;
		transform: translate(-50%, 7px);
	}
	to {
		opacity: 1;
		transform: translate(-50%, 0);
	}
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 559px) {
	:root {
		--gap: 4px;
		--radius: 11px;
	}

	.wall {
		--cols: 2;
	}

	.masthead__count {
		padding: 3px 6px;
	}

	.filter-row {
		gap: 4px;
	}

	.detail {
		padding: 8px;
	}

	.detail__bar {
		min-height: 40px;
		padding: 0 44px;
	}

	.detail__stage {
		flex: 0 0 auto;
		margin-top: auto;
		padding-bottom: 8px;
	}

	.detail__image {
		max-width: 94vw;
		max-height: 57vh;
		max-height: 57dvh;
	}

	.detail__caption {
		display: block;
		margin-bottom: auto;
		padding-top: 10px;
	}

	.detail__text h2 {
		font-size: clamp(22px, 7vw, 32px);
	}

	.detail__actions {
		justify-content: flex-start;
		margin-top: 12px;
	}

	.legal__links {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (min-width: 560px) {
	.wall {
		--cols: 3;
	}
}

@media (min-width: 820px) {
	.wall {
		--cols: 4;
	}
}

@media (min-width: 1120px) {
	.wall {
		--cols: 5;
	}
}

@media (min-width: 1520px) {
	.wall {
		--cols: 6;
	}
}

@media (min-width: 2000px) {
	.wall {
		--cols: 7;
	}
}

@media (hover: none), (pointer: coarse) {
	.tile--oeuvre .oeuvre__shade {
		opacity: 1;
	}

	.tile--oeuvre .oeuvre__meta {
		opacity: 1;
		transform: none;
	}

	.tile--oeuvre img {
		filter: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}

	.toast {
		animation: none;
	}

	.tile--oeuvre:hover img,
	.tile--oeuvre:focus-visible img {
		transform: scale(1.001);
	}
}

@media (prefers-contrast: more) {
	:root {
		--muted: #d1dae8;
		--faint: #a8b5c8;
		--line: rgba(224, 234, 250, 0.18);
		--line-strong: rgba(224, 234, 250, 0.3);
	}
}

/* Barres de défilement discrètes (navigateurs WebKit / Firefox). */
* {
	scrollbar-width: thin;
	scrollbar-color: rgba(173, 200, 255, 0.26) transparent;
}

::-webkit-scrollbar {
	width: 9px;
	height: 9px;
}

::-webkit-scrollbar-track {
	background: transparent;
}

::-webkit-scrollbar-thumb {
	border: 2px solid transparent;
	border-radius: 999px;
	background: rgba(173, 200, 255, 0.24);
	background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
	background: rgba(173, 200, 255, 0.38);
	background-clip: content-box;
}
