/* ==========================================================================
   Vault Zine : les dossiers de l’inexpliqué
   Nuit étoilée (Mokachupa), dossiers kraft, preuves épinglées, tampons à l’encre,
   annotations au stylo et lueurs « lumière noire ». Aucun style inline (CSP stricte).
   ========================================================================== */

/* --- Base --------------------------------------------------------------- */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	/* Le scotch qui dépasse des cartes ne doit jamais créer de défilement horizontal. */
	overflow-x: clip;
	background: var(--ground);
}

body {
	margin: 0;
	/* Hauteur visible de l’écran (svh) : sur iPhone, 100vh compte l’écran sans les barres de Safari,
	   ce qui laissait un grand vide sous le pied de page. Le pied de page est poussé en bas. */
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--ground-ink);
	background: var(--ground-backdrop);
	overflow-x: clip;
}

img,
svg {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

/* Survol des liens : sans poids (:where), pour que la couleur propre d’un lien (papier, bouton,
   dossier…) l’emporte toujours. Sur la nuit : l’accent du sol. Sur le papier : le stylo violet
   (--link-hover), lisible sur le kraft comme sur le crème (≥ 4.8:1). */
:where(a:hover) {
	color: var(--link-hover, var(--ground-accent));
}

:where(.card, .case, .dfolder, .duel, .extract, .gate-form, .index-card, .key, .lt__envelope, .lt__sheet,
.mini-ticket, .month-note, .nb, .note, .orders, .sealed__cover, .sheet, .spread, .sticky-note, .account-dialog) {
	--link-hover: var(--pen);
}

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

h1,
h2,
h3,
h4 {
	font-family: var(--font-occult);
	font-weight: 400;
	line-height: 1.1;
	margin: 0 0 0.5em;
	text-wrap: balance;
}

::selection {
	background: rgba(185, 123, 255, 0.45);
	color: inherit;
}

/* Sur le papier, le contour de focus passe à l’encre (la menthe y serait illisible). */
:is(.case, .sealed, .gate-form, .index-card, .sheet, .spread, .sticky-note, .note) :focus-visible {
	outline-color: var(--pen);
}

/* Texte réservé aux lecteurs d’écran. */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Interrupteur lune / soleil. */
.mode-toggle:not([hidden]) {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	color: var(--ground-ink);
	background: var(--ground-chip);
	border: 1px solid rgba(185, 123, 255, 0.4);
	border-radius: 50%;
	cursor: pointer;
	transition: color 0.2s ease, box-shadow 0.2s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mode-toggle:hover,
.mode-toggle:focus-visible {
	color: var(--ground-accent);
	box-shadow: var(--ground-glow);
	transform: rotate(-12deg);
}

.mode-toggle svg {
	grid-area: 1 / 1;
}

/* On montre l’astre du mode vers lequel on bascule. */
.mode-toggle[data-current="dark"] .mode-toggle__moon,
.mode-toggle[data-current="light"] .mode-toggle__sun {
	display: none;
}

.mode-corner {
	position: absolute;
	top: max(14px, env(safe-area-inset-top, 0px));
	right: max(14px, env(safe-area-inset-right, 0px));
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 8px;
}

.skip-link {
	position: absolute;
	left: 12px;
	top: -100px;
	z-index: 100;
	padding: 8px 14px;
	background: var(--paper);
	color: var(--paper-ink);
	font-family: var(--font-type);
}

.skip-link:focus {
	top: 12px;
}

/* Piège à robots de vault-core : hors écran. */
/* Piège à robots : masqué sur place (rogné à 1 px, invisible, inerte). Ne pas l’envoyer à
   left: -10000px : dans le dossier penché (0,6°), ce décalage devenait ~100 px vers le bas et
   allongeait la page (le vide noir sous le pied de page sur iPhone). */
.vault-hp {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip-path: inset(50%) !important;
	opacity: 0;
	pointer-events: none;
	white-space: nowrap;
}

/* Les objets en papier gardent des contrôles natifs clairs (cases, champs). */
.case,
.sealed,
.gate-form,
.index-card,
.sheet,
.sticky-note,
.spread {
	color-scheme: light;
}

/* --- Inclinaisons « posées à la main » ------------------------------------ */

.tilt-n3 { --tilt: -3deg; }
.tilt-n2 { --tilt: -2deg; }
.tilt-n1 { --tilt: -1deg; }
.tilt-0  { --tilt: 0.4deg; }
.tilt-p1 { --tilt: 1deg; }
.tilt-p2 { --tilt: 2deg; }
.tilt-p3 { --tilt: 2.8deg; }

[class*="tilt-"] {
	transform: rotate(var(--tilt, 0deg));
}

/* --- Objets récurrents ---------------------------------------------------- */

/* Washi tape aux couleurs néon, bords dentelés, translucide. */
.tape,
.card::before,
.card--tape-corners::after {
	--tape-color: rgba(185, 123, 255, 0.55);
	position: absolute;
	z-index: 3;
	width: 96px;
	height: 26px;
	background:
		repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.16) 0 4px, transparent 4px 9px),
		var(--tape-color);
	clip-path: polygon(0 8%, 6% 0, 12% 10%, 20% 2%, 30% 8%, 42% 0, 55% 9%, 68% 1%, 80% 8%, 90% 0, 100% 7%, 97% 52%, 100% 93%, 90% 100%, 78% 92%, 64% 100%, 50% 91%, 37% 100%, 24% 92%, 12% 100%, 4% 91%, 2% 50%);
	pointer-events: none;
}

.card--tape-center::before,
.tape--center {
	--tape-color: rgba(124, 244, 200, 0.6);
}

.card--tape-right::before,
.tape--cover {
	--tape-color: rgba(255, 61, 190, 0.5);
}

.tape--center {
	top: -12px;
	left: calc(50% - 48px);
	transform: rotate(-2deg);
}

/* Scotch des cartes : la carte réserve une marge (voir .card) pour que le scotch reste dans
   sa boîte. Sinon Chrome dessine le scotch de la 1re carte d’une colonne en bas de la précédente. */
.card--tape-center::before {
	top: 4px;
	left: calc(50% - 48px);
	transform: rotate(-2deg);
}

.card--tape-left::before {
	top: 6px;
	left: -18px;
	transform: rotate(-32deg);
}

.card--tape-right::before {
	top: 6px;
	right: -18px;
	transform: rotate(30deg);
}

.card--tape-corners::before {
	top: 8px;
	left: -20px;
	width: 70px;
	transform: rotate(-38deg);
}

.card--tape-corners::after {
	content: "";
	--tape-color: rgba(124, 244, 200, 0.55);
	bottom: 4px;
	right: -20px;
	width: 70px;
	transform: rotate(-38deg);
}

.tape--corners {
	top: -8px;
	left: -18px;
	width: 74px;
	transform: rotate(-36deg);
}

/* Trombone. */
.paperclip {
	position: absolute;
	z-index: 4;
	width: 22px;
	height: 60px;
	background: url("../img/paperclip.svg") no-repeat center / contain;
	pointer-events: none;
}

.paperclip--polaroid {
	top: -24px;
	right: 34px;
	transform: rotate(-8deg);
}

/* Étiquette tapée à la machine. */
.label-strip {
	display: inline-block;
	padding: 2px 12px 3px;
	font-family: var(--font-type);
	font-size: 0.8rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--paper-ink);
	background: var(--paper-white);
	box-shadow: var(--shadow-paper);
}

/* Tampon encreur : double filet, encre irrégulière, mélangée au papier. */
.stamp {
	display: inline-block;
	padding: 6px 14px 4px;
	font-family: var(--font-type);
	font-size: 1rem;
	line-height: 1.2;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--stamp-ink);
	border: 3px double currentColor;
	border-radius: 4px;
	opacity: 0.9;
	-webkit-mask-image: url("../img/ink-mask.svg");
	mask-image: url("../img/ink-mask.svg");
	-webkit-mask-size: 240px;
	mask-size: 240px;
}

/* Variante cachet rond, encre violette. */
.stamp--seal {
	display: grid;
	place-items: center;
	width: 92px;
	height: 92px;
	padding: 8px;
	text-align: center;
	font-size: 0.68rem;
	letter-spacing: 0.16em;
	color: var(--pen);
	border: 3px solid currentColor;
	border-radius: 50%;
	box-shadow: inset 0 0 0 4px transparent, inset 0 0 0 6px currentColor;
}

/* Bouton-tampon : l’action principale. */
.stamp-button {
	display: inline-block;
	padding: 12px 24px 10px;
	font-family: var(--font-type);
	font-size: 1.15rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--stamp-ink);
	background: transparent;
	border: 4px double currentColor;
	border-radius: 6px;
	transform: rotate(-2deg);
	cursor: pointer;
	transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.2s ease;
}

.stamp-button:hover,
.stamp-button:focus-visible {
	color: var(--paper-white);
	background: var(--stamp-ink);
	box-shadow: 0 0 26px rgba(255, 61, 190, 0.45);
	transform: rotate(-2deg) scale(1.03);
}

.stamp-button:active {
	transform: rotate(-2deg) scale(0.97);
}

/* Bouton secondaire : souligné au stylo. */
.ink-button {
	display: inline-block;
	padding: 4px 2px;
	font-family: var(--font-type);
	font-size: 0.95rem;
	color: var(--paper-ink);
	background: url("../img/scribble-underline.svg") no-repeat 0 100% / 100% 8px;
	border: 0;
	cursor: pointer;
}

.ink-button:hover {
	color: var(--stamp-ink);
}

.ink-button--danger {
	color: var(--stamp-ink);
}

/* Annotation manuscrite au stylo violet. */
.annotation {
	font-family: var(--font-hand);
	font-size: 1.6rem;
	line-height: 1.1;
	color: var(--pen);
	margin: 0;
}

/* Passage caviardé : la bande noire se lève sous la « lumière noire » (survol, focus). */
.scratch,
.redact {
	position: relative;
	text-decoration: none;
	color: transparent;
	background: var(--paper-ink);
	padding: 0 0.15em;
	border-radius: 1px;
	transition: color 0.4s ease, background-color 0.4s ease, text-shadow 0.4s ease;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.scratch.is-revealed,
.redact.is-revealed,
.case:focus-within .scratch {
	color: var(--mint);
	background: rgba(8, 6, 15, 0.9);
	text-shadow: 0 0 8px rgba(124, 244, 200, 0.8);
}

/* Survol : souris seulement (sur téléphone, le « survol » resterait collé après un tap). */
@media (hover: hover) {
	.scratch:hover,
	.redact:hover {
		color: var(--mint);
		background: rgba(8, 6, 15, 0.9);
		text-shadow: 0 0 8px rgba(124, 244, 200, 0.8);
	}
}

/* Message de retour : fiche de transmission agrafée, avec son tampon. */
.note {
	position: relative;
	margin: 0 0 22px;
	padding: 12px 16px 12px 18px;
	font-family: var(--font-type);
	font-size: 0.95rem;
	line-height: 1.45;
	color: var(--paper-ink);
	background:
		linear-gradient(90deg, var(--mint) 0 4px, transparent 4px),
		var(--paper-white) url("../img/grain.svg");
	background-blend-mode: normal, multiply;
	box-shadow: var(--shadow-paper);
	transform: rotate(-0.6deg);
}

.note--error {
	background:
		linear-gradient(90deg, var(--stamp-ink) 0 4px, transparent 4px),
		#fbeff4 url("../img/grain.svg");
	background-blend-mode: normal, multiply;
}

/* Tampon d’état posé sur la fiche (sent, erased…). */
.note__stamp {
	position: absolute;
	right: 10px;
	bottom: -14px;
	z-index: 2;
	padding: 4px 10px 2px;
	font-size: 0.72rem;
	background: rgba(251, 248, 241, 0.65);
	transform: rotate(-7deg);
	animation: stamp-slam 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) 0.15s both;
}

/* Données effacées : la fiche passe au caviar, tampon CLASSIFIED. */
.note--erased {
	padding-bottom: 46px;
}

.note--erased::after {
	content: "";
	position: absolute;
	left: 18px;
	right: 40%;
	bottom: 16px;
	height: 18px;
	background:
		linear-gradient(var(--paper-ink), var(--paper-ink)) 0 0 / 70% 7px no-repeat,
		linear-gradient(var(--paper-ink), var(--paper-ink)) 0 11px / 100% 7px no-repeat;
}

.note--erased .note__stamp {
	right: 16px;
	bottom: 8px;
	font-size: 1.05rem;
	padding: 6px 14px 4px;
	transform: rotate(-9deg);
}

@keyframes stamp-slam {
	0%   { opacity: 0; transform: rotate(-7deg) scale(2.4); }
	60%  { opacity: 1; }
	100% { opacity: 0.9; transform: rotate(-7deg) scale(1); }
}

.hint {
	display: block;
	margin-top: 4px;
	font-size: 0.8rem;
	color: var(--paper-ink-soft);
}

/* Mémo dactylographié (pages d’état, 404). */
.sticky-note {
	position: relative;
	max-width: 32rem;
	margin: 0 auto;
	padding: 34px 30px 30px;
	color: var(--paper-ink);
	background:
		linear-gradient(var(--paper-ink), var(--paper-ink)) 30px 76px / calc(100% - 60px) 1px no-repeat,
		var(--paper-white) url("../img/grain.svg");
	background-blend-mode: normal, multiply;
	box-shadow: var(--shadow-lift);
	font-size: 1rem;
	line-height: 1.6;
}

.memo-head {
	display: block;
	margin-bottom: 26px;
	font-family: var(--font-type);
	font-size: 0.72rem;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--paper-ink-soft);
}

.sticky-note h1 {
	font-size: 2.1rem;
	color: var(--paper-ink);
}

.sticky-note a {
	color: var(--stamp-ink);
}

.sticky-note .stamp {
	position: absolute;
	top: 18px;
	right: 18px;
	transform: rotate(8deg);
	font-size: 0.8rem;
}

/* Fiche cartonnée (compte, formulaires secondaires). */
.index-card {
	position: relative;
	max-width: 34rem;
	margin: 0 auto;
	padding: 36px 26px 22px;
	color: var(--paper-ink);
	background:
		linear-gradient(var(--stamp-ink), var(--stamp-ink)) 0 30px / 100% 1px no-repeat,
		repeating-linear-gradient(transparent 0 27px, var(--paper-line) 27px 28px) 0 30px / 100% calc(100% - 30px) no-repeat,
		var(--paper-white);
	box-shadow: var(--shadow-paper);
	line-height: 28px;
}

.index-card h2 {
	margin: -24px 0 12px;
	font-family: var(--font-type);
	font-size: 1.05rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.index-card p {
	margin: 0 0 14px;
}

/* La fiche posée dans une page de contenu garde ses propres titres. */
.entry .index-card h2 {
	margin: -24px 0 12px;
	font-size: 1.05rem;
}

.index-card a {
	color: var(--paper-ink);
}

.index-card__actions {
	display: grid;
	gap: 14px;
	margin: 6px 0 14px;
}

/* ==========================================================================
   The Gate : un dossier sous la lampe, la nuit
   ========================================================================== */

.gate {
	position: relative;
	display: grid;
	place-items: center;
	/* Pas de perspective ici : elle ferait de <main> le cadre du halo et du projecteur (position: fixed),
	   qui s’arrêteraient net sous l’en-tête. La perspective est sur .case-cam. */
	align-content: center; /* Étiquette et dossier groupés au centre, sans grand vide entre eux. */
	padding: 36px var(--gutter) 40px;
}

/* Halo de la lampe derrière le dossier. Fixé sur tout l’écran (pas seulement <main>) :
   sinon le halo s’arrête net au bord de l’en-tête et du pied de page. */
.gate__glow {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background:
		radial-gradient(circle at 50% 44%, rgba(124, 244, 200, 0.12), transparent 38%),
		radial-gradient(circle at 50% 44%, rgba(185, 123, 255, 0.14), transparent 58%);
}

/* Projecteur, comme dans le héros de mokachupa.com : une lueur de 420 px qui suit la souris
   avec un léger retard, et dérive toute seule quand la souris ne bouge plus (vault.js). */
.gate__spotlight {
	position: fixed;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}

.gate__spotlight::before {
	content: "";
	position: absolute;
	left: var(--spot-x, 50%);
	top: var(--spot-y, 44%);
	width: 420px;
	height: 420px;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	background: radial-gradient(circle, var(--spot-color, rgba(185, 123, 255, 0.15)) 0%, transparent 65%);
}

/* Mode clair : la même lueur, en violet stylo, sur la lavande. */
@media (prefers-color-scheme: light) {
	:root:not([data-mode="dark"]) .gate__spotlight {
		--spot-color: rgba(91, 47, 168, 0.12);
	}
}

:root[data-mode="light"] .gate__spotlight {
	--spot-color: rgba(91, 47, 168, 0.12);
}

/* Le dossier de la Gate.
   Téléphone : une seule page (texte et formulaire), la couverture repliée derrière, son bord dépasse
   en haut. À l’envoi, elle passe par-dessus la charnière et se pose sur le formulaire.
   Écran large : double page, le texte à l’intérieur de la couverture, charnière au milieu. */
.case-cam {
	position: relative;
	z-index: 1;
	width: min(100%, 35rem);
	perspective: 1800px;
}

.case {
	--case-ease: cubic-bezier(0.45, 0.05, 0.25, 1);
	position: relative;
	display: grid;
	transform-style: preserve-3d;
	transform: rotate(-0.8deg);
	transition: transform 0.9s var(--case-ease);
}

.case__inner,
.case__outer,
.case__page,
.sealed__cover {
	color: var(--paper-ink);
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 30%),
		url("../img/grain.svg"),
		var(--manila);
	background-blend-mode: normal, multiply, normal;
}

.case__cover {
	position: absolute;
	inset: 0;
	z-index: 1;
	transform-style: preserve-3d;
	transform-origin: center top;
	transform: translateY(-7px) rotateX(360deg) translateZ(-24px);
	transition: transform 1.1s var(--case-ease);
	pointer-events: none; /* Décor : ne doit jamais prendre un toucher destiné au formulaire. */
}

/* Intérieur de la couverture : légèrement ombré vers la charnière. */
.case__inner {
	position: absolute;
	inset: 0;
	box-sizing: border-box;
	transform: rotateX(180deg);
	display: grid;
	align-content: center;
	gap: 6px;
	padding: 30px clamp(20px, 5vw, 40px) 16px;
	background:
		linear-gradient(0deg, rgba(43, 33, 64, 0.12), transparent 16%),
		url("../img/grain.svg"),
		var(--manila);
	background-blend-mode: normal, multiply, normal;
	border-radius: 4px;
	box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.9), 0 0 60px rgba(185, 123, 255, 0.16);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}

.case__outer {
	position: absolute;
	inset: 0;
	border-radius: 4px;
	box-shadow: 0 40px 70px -24px rgba(0, 0, 0, 0.95), 0 0 60px rgba(185, 123, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.35);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}

.case__page {
	position: relative;
	display: grid;
	align-content: center;
	gap: 6px;
	padding: 40px clamp(20px, 5vw, 40px) 26px;
	border-radius: 3px 3px 4px 4px;
	box-shadow: 0 40px 70px -24px rgba(0, 0, 0, 0.95), 0 0 60px rgba(185, 123, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Téléphone : le texte est sur la page ; l’intérieur de la couverture reste vierge. */
.case__inner > * {
	visibility: hidden;
}

.case__intro {
	display: grid;
	gap: 6px;
	margin-bottom: 8px;
}

.gate .dossier__pitch {
	margin: 0;
}

.annotation--gate {
	margin: 6px 0 0;
	justify-self: start; /* Aligné à gauche, penché, comme avant. */
	transform: rotate(-4deg);
	transform-origin: left center;
}

.annotation--gate::after {
	content: " ↓";
}

.case__page .gate__member {
	margin: 0;
	justify-self: center;
}

/* Fermeture : la couverture passe par-dessus la charnière et se pose sur le formulaire. */
.case.is-sealing,
.case.is-sealed {
	transform: rotate(-0.6deg);
}

.case.is-sealing .case__cover,
.case.is-sealed .case__cover {
	transform: translateY(0) rotateX(0deg) translateZ(3px); /* Juste devant la page : pas de scintillement. */
}

.case.is-sealing .case__page > :not(.dossier__tab),
.case.is-sealed .case__page > :not(.dossier__tab) {
	opacity: 0;
	transition: opacity 0.16s linear 0.4s;
}

/* Le tampon et le cachet n’arrivent qu’après l’envoi (page suivante). */
.case:not(.is-sealed) .stamp--sent,
.case:not(.is-sealed) .wax {
	visibility: hidden;
}

/* Étiquette de demande, sur la face avant. */
.case__label {
	position: absolute;
	top: 12%;
	left: 7%;
	width: min(64%, 17rem);
	padding: 12px 14px 10px;
	font-family: var(--font-type);
	font-size: 0.72rem;
	line-height: 1.7;
	letter-spacing: 0.06em;
	color: var(--paper-ink);
	background: var(--paper-white) url("../img/grain.svg");
	background-blend-mode: multiply;
	box-shadow: var(--shadow-paper);
	transform: rotate(-1.2deg);
}

.case__label strong {
	display: block;
	margin-bottom: 4px;
	font-weight: normal;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	border-bottom: 1px solid rgba(43, 33, 64, 0.3);
}

.case__redact {
	display: inline-block;
	width: 7em;
	height: 0.9em;
	vertical-align: -0.1em;
	background: var(--paper-ink);
}

/* Le grand tampon « Transmitted ». */
.stamp--sent {
	position: absolute;
	left: 46%;
	top: 62%;
	padding: 8px 16px 4px;
	font-size: clamp(1.35rem, 5.4vw, 2.1rem);
	border-width: 5px;
	-webkit-mask-size: 320px;
	mask-size: 320px;
	transform: translate(-50%, -50%) rotate(-11deg);
}

/* Cachet de cire, à cheval sur le bord qui s’ouvre (en bas sur téléphone, à droite sur écran large). */
.wax {
	--seal: clamp(58px, 15vw, 76px);
	--wax: #7f0c53;
	position: absolute;
	z-index: 3;
	left: 50%;
	bottom: calc(var(--seal) / -2);
	width: var(--seal);
	height: var(--seal);
	margin-left: calc(var(--seal) / -2);
	font-size: calc(var(--seal) / 4.6);
}

.wax__drop {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 0.9em;
	height: 1.15em;
	margin: -0.575em 0 0 -0.45em;
	border-radius: 50% 50% 50% 50% / 62% 62% 40% 40%;
	background: radial-gradient(circle at 35% 30%, #c43a8d, var(--wax) 60%, #4d0632);
	opacity: 0;
}

.wax__drop:nth-child(2) { margin-left: -0.15em; }
.wax__drop:nth-child(3) { margin-left: -0.7em; }

.wax__half {
	position: absolute;
	inset: 0;
	border-radius: 54% 46% 51% 49% / 47% 55% 45% 53%;
	background: radial-gradient(circle at 36% 30%, #b0247a, var(--wax) 52%, #4d0632 92%);
	box-shadow: 0 0.18em 0.35em rgba(0, 0, 0, 0.45), inset 0 -0.2em 0.4em rgba(0, 0, 0, 0.3), inset 0 0.15em 0.25em rgba(255, 255, 255, 0.12);
}

.wax__half:first-of-type { clip-path: polygon(-10% -10%, 58% -10%, 44% 36%, 57% 62%, 42% 110%, -10% 110%); }
.wax__half:last-of-type  { clip-path: polygon(58% -10%, 110% -10%, 110% 110%, 42% 110%, 57% 62%, 44% 36%); }

.wax__imprint {
	position: absolute;
	inset: 17%;
	display: grid;
	place-items: center;
	border-radius: 50%;
	font: 2.2em/1 var(--font-occult);
	color: #5a0839;
	text-shadow: 0.03em 0.05em 0 rgba(255, 255, 255, 0.15), -0.02em -0.03em 0 rgba(0, 0, 0, 0.45);
	box-shadow: inset 0.12em 0.16em 0.25em rgba(0, 0, 0, 0.55), inset -0.08em -0.1em 0.2em rgba(255, 255, 255, 0.18);
}

.wax__splat {
	position: absolute;
	width: 0.45em;
	height: 0.4em;
	border-radius: 50%;
	background: var(--wax);
}

.wax__splat:nth-child(6) { left: -6%; top: 22%; }
.wax__splat:nth-child(7) { right: -4%; bottom: 14%; width: 0.3em; height: 0.3em; }
.wax__splat:nth-child(8) { left: 30%; bottom: -10%; width: 0.32em; }

.wax__signet {
	position: absolute;
	inset: -12%;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.25) 55%, transparent 72%);
	opacity: 0;
}

/* Après l’envoi : place pour le petit mot, et la caméra reste dans le cadre. */
.gate--sealed {
	overflow: clip;
}

.case-cam {
	margin-bottom: 5.5rem; /* Même place avant et après l’envoi : le dossier ne saute pas. */
}

/* Le retour arrive sur « #vault-gate » (le formulaire, désormais sous la couverture) : sans ceci,
   le navigateur ferait défiler la page et le dossier sortirait par le haut sur téléphone. */
.case.is-sealed #vault-gate {
	scroll-margin-top: 100vh;
}

/* Le message « envoyé » du formulaire (caché sous la couverture) ne doit pas changer la hauteur. */
.case.is-sealed .gate-form .note {
	display: none;
}

/* Petit mot sous le dossier fermé. */
.case__note {
	position: absolute;
	top: calc(100% + 30px);
	left: 0;
	right: 0;
	z-index: 2;
	margin: 0;
	text-align: center;
	font-family: var(--font-hand);
	font-size: 1.35rem;
	line-height: 1.3;
	color: var(--ground-ink);
}

.case__note a {
	display: block;
	margin-top: 8px;
	font-family: var(--font-type);
	font-size: 0.8rem;
	letter-spacing: 0.06em;
	color: var(--ground-ink-soft);
}

/* Après l’envoi : la caméra s’approche du tampon, glisse jusqu’au bord pour la cire et le sceau,
   puis recule. CSS seul (la page arrive déjà fermée, sans JavaScript tout est à sa place). */
@media (prefers-reduced-motion: no-preference) {
	.case-cam--sealed {
		animation: case-cam-v 4.4s both;
	}

	.case.is-sealed {
		animation: case-thud 0.26s ease-out 1.13s;
	}

	.case.is-sealed .stamp--sent {
		animation: case-stamp 0.23s cubic-bezier(0.5, 0, 0.75, 0) 0.9s both;
	}

	.case.is-sealed .wax__drop:nth-child(1) { animation: wax-fall 0.24s cubic-bezier(0.5, 0, 0.9, 0.6) 2.25s both; }
	.case.is-sealed .wax__drop:nth-child(2) { animation: wax-fall 0.24s cubic-bezier(0.5, 0, 0.9, 0.6) 2.5s both; }
	.case.is-sealed .wax__drop:nth-child(3) { animation: wax-fall 0.24s cubic-bezier(0.5, 0, 0.9, 0.6) 2.74s both; }

	.case.is-sealed .wax__half {
		animation: wax-pool 1.19s linear 2.44s both;
	}

	.case.is-sealed .wax__splat:nth-child(6) { animation: wax-splat 0.14s ease-out 2.69s both; }
	.case.is-sealed .wax__splat:nth-child(7),
	.case.is-sealed .wax__splat:nth-child(8) { animation: wax-splat 0.14s ease-out 2.93s both; }

	.case.is-sealed .wax__signet {
		animation: wax-signet 0.55s ease 3.1s both;
	}

	.case.is-sealed .wax__imprint {
		animation: wax-imprint 0.16s linear 3.39s both;
	}

	.case-cam--sealed .case__note {
		animation: note-in 0.5s ease 4.3s both;
	}
}

/* Téléphone : le dossier est haut. La caméra remonte pour montrer le cachet (en bas du dossier),
   puis recule assez pour que le dossier et le petit mot tiennent dans l’écran. */
@keyframes case-cam-v {
	0%, 7%   { transform: translateY(0) scale(1); transform-origin: 46% 62%; animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1); }
	22%, 34% { transform: translateY(0) scale(1.4); transform-origin: 46% 62%; animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1); }
	49%, 80% { transform: translateY(-34%) scale(1.6); transform-origin: 50% 96%; animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1); }
	96%, 100% { transform: translateY(0) scale(0.8); transform-origin: 50% 0%; }
}

@keyframes case-cam-h {
	0%, 7%   { transform: scale(1); transform-origin: 48% 62%; animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1); }
	22%, 34% { transform: scale(1.45); transform-origin: 48% 62%; animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1); }
	49%, 80% { transform: scale(1.75); transform-origin: 75% 50%; animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1); }
	96%, 100% { transform: scale(1); transform-origin: 75% 50%; }
}

@keyframes case-stamp {
	from { opacity: 0; transform: translate(-50%, -50%) rotate(-11deg) scale(1.9); }
	to   { opacity: 0.9; transform: translate(-50%, -50%) rotate(-11deg) scale(1); }
}

@keyframes case-thud {
	0%   { translate: 0 0; }
	30%  { translate: 0 6px; }
	100% { translate: 0 0; }
}

@keyframes wax-fall {
	0%   { opacity: 0; transform: translateY(-9em) scaleY(1.35); } /* Invisible tant qu’elle n’est pas lâchée. */
	4%   { opacity: 1; transform: translateY(-8.6em) scaleY(1.35); }
	82%  { opacity: 1; transform: translateY(0) scaleY(1.35); }
	100% { opacity: 0; transform: translateY(0.2em) scale(1.6, 0.45); }
}

@keyframes wax-pool {
	0%       { transform: scale(0); }
	12%, 21% { transform: scale(0.42) rotate(8deg); }
	33%, 41% { transform: scale(0.7) rotate(-4deg); }
	53%, 75% { transform: scale(0.92); }
	85%      { transform: scale(1.16, 0.86); }
	93%      { transform: scale(0.97, 1.03); }
	100%     { transform: scale(1); }
}

@keyframes wax-splat {
	from { opacity: 0; transform: scale(0); }
	to   { opacity: 1; transform: scale(1); }
}

@keyframes wax-signet {
	0%   { opacity: 0; transform: scale(1.5); }
	42%  { opacity: 1; transform: scale(0.95); }
	100% { opacity: 0; transform: scale(1.3); }
}

@keyframes wax-imprint {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes note-in {
	from { opacity: 0; translate: 0 8px; }
	to   { opacity: 1; translate: 0 0; }
}

/* Écran large : double page, charnière au milieu, cachet sur le bord droit. */
@media (min-width: 860px) {
	.case-cam {
		width: min(100%, 62rem);
	}

	.case {
		grid-template-columns: 1fr 1fr;
	}

	.case__cover {
		position: relative;
		inset: auto;
		transform-origin: right center;
		transform: none;
		transition-duration: 0.9s;
	}

	.case__inner {
		position: relative;
		inset: auto;
		height: 100%;
		transform: none;
		padding: 44px clamp(22px, 3vw, 44px);
		background:
			linear-gradient(270deg, rgba(43, 33, 64, 0.12), transparent 16%),
			url("../img/grain.svg"),
			var(--manila);
		background-blend-mode: normal, multiply, normal;
		border-radius: 4px 0 0 4px;
	}

	.case__inner > * {
		visibility: visible;
	}

	.case__cover {
		pointer-events: auto; /* Écran large : le texte (et son mot caviardé) est sur la couverture. */
	}

	.case__outer {
		pointer-events: none;
	}

	.case__intro {
		display: none;
	}

	.case__outer {
		transform: rotateY(180deg);
	}

	.case__page {
		padding: 44px clamp(22px, 3vw, 40px) 30px;
		border-radius: 0 4px 4px 0;
		box-shadow: 0 40px 70px -24px rgba(0, 0, 0, 0.95), 0 0 60px rgba(185, 123, 255, 0.18), inset 1px 0 0 rgba(43, 33, 64, 0.14);
	}

	.annotation--gate::after {
		content: " →";
	}

	.case.is-sealing,
	.case.is-sealed {
		transform: translateX(-25%) rotate(-0.6deg);
	}

	.case.is-sealing .case__cover,
	.case.is-sealed .case__cover {
		transform: rotateY(180deg) translateZ(-3px); /* Retournée : -3 px la place juste devant la page. */
	}

	.wax {
		left: auto;
		right: calc(var(--seal) / -2);
		top: 50%;
		bottom: auto;
		margin: calc(var(--seal) / -2) 0 0;
	}

	.case-cam--sealed {
		animation-name: case-cam-h;
	}
}

/* Onglet du dossier, avec sa cote. */
.dossier__tab {
	position: absolute;
	top: -22px;
	left: 28px;
	padding: 4px 18px 0 16px;
	font-family: var(--font-type);
	font-size: 0.7rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--paper-ink-soft);
	background: var(--manila);
	border-radius: 7px 7px 0 0;
	clip-path: polygon(6% 0, 94% 0, 100% 100%, 0 100%);
}

/* La Gate : étiquette du Vault et signature à gauche de la barre, mode à droite (comme dans le Vault). */
.gate__brand {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	margin: 0;
	font-size: 1rem;
	font-weight: normal;
	line-height: 1.2;
	letter-spacing: normal;
}

/* Gate : le mode part à droite. Dans le Vault, c’est l’icône d’abonnement qui pousse les deux icônes à droite. */
.gate__brand ~ .mode-toggle {
	margin-left: auto;
}

.vault-bar__channel ~ .mode-toggle,
.lang-switch ~ .mode-toggle {
	margin-left: 8px;
}

/* Langue : « EN / FR » en texte, la langue en cours en clair, l’autre en lien discret. */
.lang-switch {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 40px;
	margin-left: auto;
	font-family: "Jura Variable", var(--font-body);
	font-size: 0.95rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	line-height: 1;
	color: var(--ground-ink-muted);
}

.lang-switch__item {
	padding: 8px 2px;
	color: var(--ground-ink-muted);
	text-decoration: none;
}

.lang-switch__item.is-current {
	font-weight: 600;
	color: var(--ground-ink);
}

a.lang-switch__item:hover,
a.lang-switch__item:focus-visible {
	color: var(--ground-ink);
	text-decoration: underline;
	text-underline-offset: 4px;
}

.lang-switch__sep {
	opacity: 0.8;
}

.mode-corner .lang-switch {
	margin-left: 0;
}

/* Carte d’une édition qui n’existe que dans l’autre langue. */
.card__lang {
	position: absolute;
	top: -10px;
	right: 14px;
	z-index: 3;
	padding: 3px 8px 1px;
	font-family: var(--font-type);
	font-size: 0.62rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #fbf8f1;
	background: var(--paper-ink);
	border-radius: 2px;
	pointer-events: none;
}

/* En tête d’une édition : lien vers la traduction, ou note « n’existe qu’en anglais ». */
.issue-lang {
	max-width: 46rem;
	margin: 0 auto 16px;
	text-align: center;
	font-family: var(--font-type);
	font-size: 0.85rem;
	letter-spacing: 0.06em;
	color: var(--ground-ink-soft);
}

.issue-lang a {
	color: var(--ground-ink);
}

.issue-lang--note {
	padding: 10px 14px;
	color: var(--ground-ink);
	border: 1px dashed var(--ground-ink-muted);
	border-radius: 4px;
}

.gate__by {
	display: inline-flex;
	align-items: baseline;
	gap: 0.4em;
	font-family: var(--font-body);
	font-size: 0.9rem;
	color: var(--ground-ink-soft);
}

/* Mot-symbole « mokachupa », même style que le logo de mokachupa.com. */
.wordmark {
	font-family: "Jura Variable", sans-serif;
	font-size: 1.25rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--ground-ink); /* #f0ecff la nuit, encre en mode clair. */
}

.dossier__pitch {
	margin: 0 0 6px;
	max-width: 28rem;
	font-size: clamp(0.95rem, 0.88rem + 0.35vw, 1.05rem);
	line-height: 1.65;
}

/* Formulaire : demande d’accès tapée sur papier déchiré. */
.gate-form {
	position: relative;
	margin-top: 10px;
	padding: 26px 20px 18px;
	color: var(--paper-ink);
	background:
		linear-gradient(transparent 0 calc(100% - 1px), rgba(43, 33, 64, 0.08) 0) 0 0 / 100% 28px,
		var(--paper-white) url("../img/grain.svg");
	background-blend-mode: normal, multiply;
	box-shadow: var(--shadow-paper);
	-webkit-mask:
		url("../img/torn-top.svg") top / 400px 14px repeat-x,
		linear-gradient(#000, #000) 0 13px / 100% calc(100% - 13px) no-repeat;
	mask:
		url("../img/torn-top.svg") top / 400px 14px repeat-x,
		linear-gradient(#000, #000) 0 13px / 100% calc(100% - 13px) no-repeat;
}

.gate-form p {
	margin: 0 0 14px;
}

.gate-form__field label {
	display: block;
	margin-bottom: 6px;
	font-family: var(--font-type);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--paper-ink-soft);
}

.gate-form__field input {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	padding: 11px 14px;
	font-family: var(--font-body);
	font-size: 1rem; /* 16px : iOS ne zoome pas sur le champ. */
	line-height: 1.3;
	color: var(--paper-ink);
	background: #fff;
	border: 2px solid var(--paper-ink-soft);
	border-radius: 6px;
	box-shadow: inset 0 2px 3px rgba(43, 33, 64, 0.12);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gate-form__field input::placeholder {
	color: #6f6386; /* ≥ 4.5:1 sur blanc */
}

.gate-form__field input:focus {
	/* Le contour de :focus-visible reste actif ; la bordure passe aussi au violet. */
	border-color: var(--pen);
	box-shadow: inset 0 2px 3px rgba(43, 33, 64, 0.12), 0 0 0 3px rgba(91, 47, 168, 0.22);
}

.gate-form a {
	color: var(--paper-ink);
}

.gate-form__submit {
	padding-top: 4px;
}

/* Action principale de la Gate : un vrai bouton (plein, droit, pleine largeur), pas un tampon.
   Texte centré en flex (le lien <a> ne centre pas tout seul dans sa hauteur minimale), puis
   recentré à l’œil : Special Elite dessine ses capitales haut dans la ligne. */
.action-button {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 52px;
	padding: 16px 20px 10px;
	font-family: var(--font-type);
	font-size: 1.05rem;
	line-height: 1.2;
	letter-spacing: 0.1em;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none;
	color: #fff;
	background: #7f0c53; /* blanc sur prune : 10.1:1 */
	border: 0;
	border-radius: 999px; /* Pilule. */
	box-shadow: 0 2px 0 #4d0632, 0 8px 18px -8px rgba(127, 12, 83, 0.75);
	cursor: pointer;
	transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

/* Survol : un ton plus sombre (12.1:1) et une lueur rose, pour rester lisible et vivant. */
.action-button:hover,
.action-button:focus-visible {
	color: #fff;
	background: #6a0945;
	box-shadow: 0 2px 0 #3f0529, 0 10px 24px -8px rgba(255, 61, 190, 0.5);
}

.action-button:focus-visible {
	outline: 2px solid #6a0945;
	outline-offset: 3px;
}

.action-button:active {
	transform: translateY(2px);
	box-shadow: 0 0 0 #4d0632, 0 4px 10px -6px rgba(127, 12, 83, 0.75);
}

/* Bouton seul (membre déjà connecté) : à la taille du texte, marges de côté réduites. */
.gate__member .action-button {
	display: inline-flex;
	width: auto;
	padding-inline: 32px; /* Un peu plus qu’un bouton carré : les bouts arrondis mangent la place. */
}

/* Phrase de consentement sous le bouton : c’est elle qui dit ce que le bouton déclenche. */
.gate-form__terms {
	margin: 0 !important;
	font-size: 0.78rem;
	line-height: 1.6;
	text-align: center;
	color: var(--paper-ink-soft);
}

.gate-form__terms strong {
	color: var(--paper-ink);
}

/* --- Extrait déclassifié de la Gate ------------------------------------------------------
   Une feuille de papier posée sur la page de gauche (écran large) ou sous le formulaire
   (téléphone), comme la page déclassifiée d’une édition : tampon, mots noircis, fondu, pointillés. */
.extract {
	position: relative;
	padding: 30px clamp(20px, 3.4vw, 32px) 20px;
	color: var(--paper-ink);
	background: var(--paper) url("../img/grain.svg");
	background-blend-mode: multiply;
	border-radius: 2px;
	box-shadow: 0 18px 34px -16px rgba(0, 0, 0, 0.55), 0 2px 4px rgba(0, 0, 0, 0.18);
	transform: rotate(-1.2deg);
}

/* Un bout de scotch en haut de la feuille. */
.extract::before {
	content: "";
	position: absolute;
	top: -11px;
	left: 50%;
	width: 84px;
	height: 22px;
	transform: translateX(-50%) rotate(2deg);
	background: rgba(255, 250, 235, 0.55);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.extract__stamp {
	position: absolute;
	top: 22px;
	right: 18px;
	padding: 4px 9px 1px;
	font-family: var(--font-type);
	font-size: 0.72rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--stamp-ink);
	border: 3px double var(--stamp-ink);
	opacity: 0.85;
	transform: rotate(10deg);
}

.extract__kicker,
.extract__meta {
	display: block;
	font-family: var(--font-type);
	font-size: 0.7rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.extract__kicker {
	padding-right: 7.5rem; /* Pas sous le tampon. */
	color: var(--stamp-ink);
}

.extract__title {
	margin: 6px 0 4px;
	font-family: var(--font-occult);
	font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem);
	font-weight: 400;
	line-height: 1.1;
	color: var(--paper-ink);
}

.extract__meta {
	margin: 0 0 14px;
	letter-spacing: 0.12em;
	color: var(--paper-ink-soft);
}

.extract__text {
	position: relative;
	max-height: 15em;
	overflow: hidden;
	font-size: 0.95rem;
	line-height: 1.7;
}

.extract__text p {
	margin: 0 0 12px;
}

/* Fondu par masque (et non par dégradé posé dessus) : le grain du papier reste continu. */
.extract__text {
	-webkit-mask-image: linear-gradient(#000 calc(100% - 5em), transparent);
	mask-image: linear-gradient(#000 calc(100% - 5em), transparent);
}

/* Mot noirci : une barre de la longueur du mot ; le mot lui-même n’est jamais dans la page. */
.redaction-bar {
	display: inline-block;
	height: 1em;
	vertical-align: -0.12em;
	background: var(--paper-ink);
	border-radius: 1px;
}

/* Fin de la feuille : pointillés, puis l’invitation, dans la typo du bouton. */
.extract__more {
	margin: 8px 0 0;
	padding-top: 14px;
	border-top: 1px dashed var(--paper-line);
	text-align: center;
}

.extract__more a {
	font-family: var(--font-type);
	font-size: 0.95rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	color: #7f0c53; /* La prune du bouton : 8.9:1 sur le papier. */
}

.extract__more a::after {
	content: " ↑";
}

.extract__more a:hover,
.extract__more a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Téléphone : la feuille sous le formulaire, séparée par la marge de la page. */
.case__extract {
	margin-top: 26px;
	padding: 0 2px 6px;
}

/* À l’envoi, la feuille s’efface : le dossier retrouve sa taille, cachet et petit mot restent
   dans l’écran (sinon la couverture, posée sur toute la page, devient une longue bande vide). */
.case.is-sealing .case__extract,
.case.is-sealed .case__extract {
	display: none;
}

.case__extract .extract__stamp {
	top: 12px;
	right: 10px;
}

@media (min-width: 860px) {
	/* La feuille est sur la couverture (page de gauche) ; le texte d’accueil passe au-dessus du formulaire. */
	.case__extract {
		display: none;
	}

	.case--extract .case__inner {
		padding: 40px clamp(22px, 2.6vw, 34px);
	}

	.case--extract .case__intro {
		display: grid;
	}

	.case--extract .annotation--gate::after {
		content: " ↓";
	}

	.extract__more a::after {
		content: " →";
	}
}

/* ==========================================================================
   Le Vault : le tableau d’enquête, la nuit
   ========================================================================== */

.vault-bar {
	position: relative;
	z-index: 10;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 18px;
	align-items: center;
	justify-content: flex-start;
	padding: 18px var(--gutter);
}

.vault-bar__brand,
.vault-bar__brand a {
	text-decoration: none;
}

/* Logo, pastille d’accès et icônes : même hauteur (40 px), même ligne, rien de penché. */
.vault-bar__brand .label-strip {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	height: 40px;
	padding: 7px 16px 0; /* Special Elite dessine ses capitales haut dans la ligne : on les recentre à l’œil, sur les icônes. */
	line-height: 1;
	border-radius: 2px;
	font-size: 0.95rem;
	color: var(--brand-ink);
	background: var(--brand-bg);
	box-shadow: var(--brand-glow);
}

/* Accès restant + déconnexion : une seule pastille, l’icône à droite après un trait. */
.vault-bar__session {
	display: inline-flex;
	align-items: center;
	box-sizing: border-box;
	height: 40px;
	gap: 2px;
	padding: 0 3px 0 14px;
	font-family: var(--font-type);
	font-size: 0.85rem;
	line-height: 1;
	color: var(--ground-ink-soft);
	background: var(--ground-chip);
	border: 1px solid rgba(185, 123, 255, 0.4);
	border-radius: 999px;
}

.vault-bar__session.is-ending {
	color: var(--ground-accent);
	border-color: currentColor;
}

/* Icônes rondes de l’en-tête (déconnexion, abonnement), comme l’interrupteur de mode. */
.vault-bar__icon {
	box-sizing: border-box;
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	color: var(--ground-ink);
	text-decoration: none;
	background: var(--ground-chip);
	border: 1px solid rgba(185, 123, 255, 0.4);
	border-radius: 50%;
	transition: color 0.2s ease, box-shadow 0.2s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vault-bar__icon:hover,
.vault-bar__icon:focus-visible {
	color: var(--ground-accent);
	box-shadow: var(--ground-glow);
}

/* Lien vers #vault : pastille avec un point (menthe quand le salon est ouvert). Pousse le groupe de droite. */
.vault-bar__channel {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 40px;
	margin-left: auto;
	padding: 3px 14px 0;
	font-family: var(--font-type);
	font-size: 0.9rem;
	line-height: 1;
	text-decoration: none;
	color: var(--ground-ink);
	background: var(--ground-chip);
	border: 1px solid rgba(185, 123, 255, 0.4);
	border-radius: 999px;
	transition: color 0.2s ease, box-shadow 0.2s ease;
}

.vault-bar__channel:hover,
.vault-bar__channel:focus-visible,
.vault-bar__channel[aria-current="page"] {
	color: var(--ground-accent);
	box-shadow: var(--ground-glow);
}

.vault-bar__dot {
	width: 8px;
	height: 8px;
	margin-top: -3px;
	border-radius: 50%;
	background: var(--ground-ink-muted);
}

.vault-bar__channel.is-open .vault-bar__dot {
	background: #2fd39b;
	box-shadow: 0 0 8px rgba(124, 244, 200, 0.8);
}

.vault-bar__account:hover svg,
.vault-bar__account:focus-visible svg {
	transform: rotate(45deg);
}

.vault-bar__account svg {
	transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.desk {
	padding: 8px var(--gutter) 40px;
	max-width: 1500px;
	margin: 0 auto;
}

.desk__head {
	display: grid;
	gap: 18px;
	justify-items: center;
	margin: 28px 0 40px;
	text-align: center;
}

/* Titre des archives : sans fond, lettres qui luisent dans la nuit (halo plus discret en mode clair). */
.desk__title {
	--title-glow: 0 0 18px rgba(185, 123, 255, 0.55), 0 0 46px rgba(124, 244, 200, 0.22);
}

@media (prefers-color-scheme: light) {
	:root:not([data-mode="dark"]) .desk__title {
		--title-glow: 0 0 22px rgba(91, 47, 168, 0.22);
	}
}

:root[data-mode="light"] .desk__title {
	--title-glow: 0 0 22px rgba(91, 47, 168, 0.22);
}

.desk__title h1 {
	margin: 0;
	font-size: clamp(2.2rem, 6vw, 3.6rem);
	line-height: 1.05;
	color: var(--ground-ink);
	text-shadow: var(--title-glow);
	text-wrap: balance;
}

.desk__count {
	margin: 6px 0 0;
	font-family: var(--font-hand);
	font-size: 1.45rem;
	color: var(--ground-accent);
	text-shadow: var(--ground-glow-text);
}

/* Onglets de rubriques : intercalaires néon. */
.tabs ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tabs a {
	display: inline-block;
	padding: 5px 14px 4px;
	font-family: var(--font-type);
	font-size: 0.85rem;
	text-decoration: none;
	color: var(--ground-ink-soft);
	border: 1px solid rgba(185, 123, 255, 0.35);
	border-radius: 999px;
	background: var(--ground-chip);
	transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tabs li:nth-child(3n + 1) a { --tab: 124, 244, 200; }
.tabs li:nth-child(3n + 2) a { --tab: 185, 123, 255; }
.tabs li:nth-child(3n) a     { --tab: 255, 140, 220; }

.tabs a:hover,
.tabs a:focus-visible {
	color: rgb(var(--tab));
	border-color: rgba(var(--tab), 0.6);
	box-shadow: 0 0 18px rgba(var(--tab), 0.25);
}

/* Mode clair : le néon est illisible sur la pastille claire ; il reste en bordure et en halo. */
@media (prefers-color-scheme: light) {
	:root:not([data-mode="dark"]) .tabs a:hover,
	:root:not([data-mode="dark"]) .tabs a:focus-visible {
		color: var(--ground-ink);
		border-color: rgba(var(--tab), 0.9);
		box-shadow: 0 0 0 1px rgba(var(--tab), 0.9), 0 0 18px rgba(var(--tab), 0.35);
	}
}

:root[data-mode="light"] .tabs a:hover,
:root[data-mode="light"] .tabs a:focus-visible {
	color: var(--ground-ink);
	border-color: rgba(var(--tab), 0.9);
	box-shadow: 0 0 0 1px rgba(var(--tab), 0.9), 0 0 18px rgba(var(--tab), 0.35);
}

.tabs li a[aria-current="page"] {
	color: var(--night);
	background: rgb(var(--tab));
	border-color: transparent;
	box-shadow: 0 0 22px rgba(var(--tab), 0.35);
}

/* Mode clair : onglet actif en encre profonde, lettres de sa couleur (menthe, ciel ou rose). */
@media (prefers-color-scheme: light) {
	:root:not([data-mode="dark"]) .tabs li a[aria-current="page"] {
		color: rgb(var(--tab));
		background: var(--brand-bg);
		box-shadow: var(--brand-glow);
	}
}

:root[data-mode="light"] .tabs li a[aria-current="page"] {
	color: rgb(var(--tab));
	background: var(--brand-bg);
	box-shadow: var(--brand-glow);
}

/* La grille : colonnes CSS, sans JavaScript. */
.board {
	column-gap: clamp(22px, 3vw, 40px);
	column-count: 1;
}

@media (min-width: 640px)  { .board { column-count: 2; } }
@media (min-width: 980px)  { .board { column-count: 3; } }
@media (min-width: 1320px) { .board { column-count: 4; } }

/* --- Carte : socle commun ------------------------------------------------- */

.card {
	position: relative;
	display: block;
	break-inside: avoid;
	padding: 16px 0 12px;
	margin: 0 0 clamp(14px, 2.4vw, 30px);
	transform: rotate(var(--tilt, 0deg));
	transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card::before {
	content: "";
}

.card__link {
	position: relative;
	display: block;
	text-decoration: none;
	color: var(--paper-ink);
	box-shadow: var(--shadow-paper);
	transition: box-shadow 0.25s ease;
}

.card:hover,
.card:focus-within {
	transform: rotate(0deg) translateY(-5px);
	z-index: 4;
}

.card:hover .card__link,
.card:focus-within .card__link {
	box-shadow: var(--shadow-lift);
}

.card__link:hover {
	color: var(--paper-ink);
}

.card__title {
	display: block;
	font-family: var(--font-occult);
	font-size: 1.45rem;
	line-height: 1.15;
}

.card__meta,
.card__kicker {
	display: block;
	font-family: var(--font-type);
	font-size: 0.74rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--paper-ink-soft);
}

.card__excerpt {
	display: block;
	margin-top: 10px;
	font-size: 0.92rem;
	line-height: 1.55;
	color: var(--paper-ink-soft);
}

/* --- Polaroïd : la photo de preuve ------------------------------------------- */

.card--polaroid .card__link {
	padding: 14px 14px 18px;
	background: var(--paper-white);
}

.card--polaroid .card__photo {
	position: relative;
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--night-well);
}

.card--polaroid .card__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: saturate(0.8) contrast(1.08) hue-rotate(-8deg);
	transition: filter 0.4s ease;
}

/* Grain et lueur verte « vision de nuit » sur la photo. */
.card--polaroid .card__photo::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(circle at 50% 40%, transparent 45%, rgba(8, 6, 15, 0.45)),
		url("../img/grain.svg");
	mix-blend-mode: multiply;
}

.card--polaroid:hover .card__photo img {
	filter: saturate(1) contrast(1.05);
}

/* Pas de photo : une plaque « pas encore développée », un ovni flou à l’horizon. */
.card__photo-empty {
	display: block;
	width: 100%;
	height: 100%;
	background:
		radial-gradient(ellipse 18% 6% at 62% 34%, rgba(124, 244, 200, 0.75), transparent 70%),
		radial-gradient(ellipse 30% 12% at 62% 34%, rgba(124, 244, 200, 0.22), transparent 70%),
		linear-gradient(180deg, transparent 72%, rgba(0, 0, 0, 0.55) 72%),
		url("../img/starfield.svg") center / 260px,
		linear-gradient(160deg, #1e1830, #08060f);
}

.card--polaroid .card__title {
	margin-top: 14px;
	font-family: var(--font-hand);
	font-size: 1.9rem;
	font-weight: 700;
	line-height: 1;
	color: var(--paper-ink);
}

.card--polaroid .card__meta {
	margin-top: 6px;
}

/* --- Ticket : l’étiquette de pièce à conviction ---------------------------------- */

.card--ticket .card__link {
	display: grid;
	grid-template-columns: 54px 1fr;
	min-height: 150px;
	background: url("../img/grain.svg"), var(--manila);
	background-blend-mode: multiply, normal;
	-webkit-mask:
		radial-gradient(circle 9px at 54px 0, transparent 98%, #000) top / 100% 51% no-repeat,
		radial-gradient(circle 9px at 54px 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
	mask:
		radial-gradient(circle 9px at 54px 0, transparent 98%, #000) top / 100% 51% no-repeat,
		radial-gradient(circle 9px at 54px 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
	box-shadow: none;
}

/* Le masque rognerait une ombre posée sur le lien : l’ombre est portée par la carte. */
.card--ticket,
.card--notebook,
.card--clipping {
	filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.6));
}

.card--ticket:hover,
.card--notebook:hover,
.card--clipping:hover,
.card--ticket:focus-within,
.card--notebook:focus-within,
.card--clipping:focus-within {
	filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 22px rgba(185, 123, 255, 0.3));
}

.card--ticket .card__stub {
	display: grid;
	place-items: center;
	border-right: 2px dashed rgba(43, 33, 64, 0.4);
	font-family: var(--font-type);
	font-size: 0.85rem;
	letter-spacing: 0.15em;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	color: var(--stamp-ink);
}

.card--ticket .card__body {
	display: grid;
	align-content: center;
	gap: 8px;
	padding: 18px 20px;
	border: 2px solid rgba(168, 18, 111, 0.35);
	border-left: 0;
	margin: 8px 8px 8px 0;
}

.card--ticket .card__kicker {
	color: var(--stamp-ink);
}

/* --- Carnet de terrain ----------------------------------------------------------- */

.card--notebook .card__link {
	padding: 30px 22px 22px 48px;
	background:
		linear-gradient(var(--stamp-ink), var(--stamp-ink)) 36px 0 / 1px 100% no-repeat,
		repeating-linear-gradient(transparent 0 25px, var(--paper-line) 25px 26px) 0 22px / 100% 100% no-repeat,
		var(--paper-white);
	line-height: 26px;
	-webkit-mask:
		url("../img/torn-top.svg") top / 400px 14px repeat-x,
		linear-gradient(#000, #000) 0 13px / 100% calc(100% - 13px) no-repeat;
	mask:
		url("../img/torn-top.svg") top / 400px 14px repeat-x,
		linear-gradient(#000, #000) 0 13px / 100% calc(100% - 13px) no-repeat;
	box-shadow: none;
}

.card--notebook .card__title {
	font-family: var(--font-hand);
	font-size: 2rem;
	font-weight: 700;
	line-height: 26px;
	padding-top: 2px;
	margin-bottom: 4px;
	color: var(--pen);
}

.card--notebook .card__excerpt {
	margin-top: 0;
	font-family: var(--font-hand);
	font-size: 1.3rem;
	line-height: 26px;
	color: var(--paper-ink-soft);
}

.card--notebook .card__meta {
	line-height: 26px;
}

.card--notebook .card__number {
	display: inline-block;
	margin-top: 8px;
	padding: 0 8px;
	font-family: var(--font-type);
	font-size: 0.8rem;
	line-height: 22px;
	color: var(--stamp-ink);
	border: 2px solid currentColor;
	border-radius: 50%;
	transform: rotate(-6deg);
}

/* --- Enveloppe scellée ------------------------------------------------------------ */

.card--envelope .card__link {
	min-height: 200px;
	padding: 92px 22px 22px;
	background: url("../img/grain.svg"), var(--manila-dark);
	background-blend-mode: multiply, normal;
	overflow: hidden;
}

/* Le rabat. */
.card--envelope .card__link::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 76px;
	background: linear-gradient(rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.14)), var(--manila);
	clip-path: polygon(0 0, 100% 0, 50% 100%);
	filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.25));
}

/* Cachet de cire à la pointe du rabat : le même que celui de la Gate (prune, « V »), déjà posé. */
.card__wax {
	--seal: 50px;
	--wax: #7f0c53;
	position: absolute;
	z-index: 2;
	top: 50px;
	left: 50%;
	width: var(--seal);
	height: var(--seal);
	margin-left: calc(var(--seal) / -2);
	font-size: calc(var(--seal) / 4.6);
	transform: rotate(-6deg);
}

.card--envelope .card__postage {
	position: absolute;
	top: 14px;
	right: 14px;
	display: grid;
	place-items: center;
	width: 58px;
	height: 70px;
	padding: 6px;
	font-family: var(--font-type);
	font-size: 0.68rem;
	line-height: 1.2;
	text-align: center;
	text-transform: uppercase;
	color: var(--mint);
	background:
		linear-gradient(var(--night-card), var(--night-card)) 6px 6px / calc(100% - 12px) calc(100% - 12px) no-repeat,
		var(--paper-white);
	-webkit-mask:
		radial-gradient(circle 3px, transparent 97%, #000) -4px -4px / 8px 8px,
		linear-gradient(#000, #000) 3px 3px / calc(100% - 6px) calc(100% - 6px) no-repeat;
	mask:
		radial-gradient(circle 3px, transparent 97%, #000) -4px -4px / 8px 8px,
		linear-gradient(#000, #000) 3px 3px / calc(100% - 6px) calc(100% - 6px) no-repeat;
	transform: rotate(4deg);
	z-index: 1;
}

.card--envelope .card__postage span:first-child {
	font-size: 1rem;
}

.card--envelope .card__postmark {
	position: absolute;
	top: 26px;
	left: 16px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 66px;
	height: 66px;
	font-family: var(--font-type);
	font-size: 0.66rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: rgba(43, 33, 64, 0.7);
	border: 2px solid rgba(43, 33, 64, 0.55);
	border-radius: 50%;
	transform: rotate(-16deg);
	-webkit-mask-image: url("../img/ink-mask.svg");
	mask-image: url("../img/ink-mask.svg");
}

.card--envelope .card__address {
	display: block;
	position: relative;
	padding: 10px 14px;
	background: rgba(251, 248, 241, 0.92);
	border-left: 3px solid var(--pen);
}

.card--envelope .card__title {
	font-family: var(--font-hand);
	font-size: 1.8rem;
	font-weight: 700;
	line-height: 1.05;
}

/* --- Coupure de presse --------------------------------------------------------- */

.card--clipping .card__link {
	padding: 24px 22px 26px;
	background: #ece7da url("../img/grain.svg");
	background-blend-mode: multiply;
	-webkit-mask:
		url("../img/pinked-top.svg") top / 120px 10px repeat-x,
		url("../img/pinked-bottom.svg") bottom / 120px 10px repeat-x,
		linear-gradient(#000, #000) 0 9px / 100% calc(100% - 18px) no-repeat;
	mask:
		url("../img/pinked-top.svg") top / 120px 10px repeat-x,
		url("../img/pinked-bottom.svg") bottom / 120px 10px repeat-x,
		linear-gradient(#000, #000) 0 9px / 100% calc(100% - 18px) no-repeat;
	box-shadow: none;
}

.card--clipping .card__kicker {
	padding-bottom: 6px;
	border-bottom: 3px double var(--paper-ink);
}

.card--clipping .card__title {
	margin-top: 10px;
	font-family: var(--font-occult-sc);
	font-size: 1.6rem;
	letter-spacing: 0.01em;
}

.card--clipping .card__excerpt {
	column-count: 2;
	column-gap: 16px;
	column-rule: 1px solid rgba(43, 33, 64, 0.2);
	font-size: 0.85rem;
	hyphens: auto;
	-webkit-hyphens: auto;
}

/* --- Pagination ---------------------------------------------------------------- */

.pager ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

.pager a,
.pager span {
	display: inline-block;
	min-width: 44px;
	padding: 6px 14px;
	font-family: var(--font-type);
	text-align: center;
	text-decoration: none;
	color: var(--ground-ink-soft);
	border: 1px solid rgba(185, 123, 255, 0.35);
	border-radius: 999px;
	background: var(--ground-chip);
}

.pager a:hover {
	color: var(--ground-accent);
	border-color: rgba(124, 244, 200, 0.5);
}

.pager .current {
	color: var(--night);
	background: var(--violet);
	border-color: transparent;
}

/* « Mon abonnement » : la fiche bristol, en fenêtre modale. */
.account-dialog {
	width: min(560px, calc(100vw - 32px));
	max-height: calc(100dvh - 32px);
	padding: 24px 0 0;
	overflow: visible; /* La fiche penchée, le ruban et la croix débordent un peu : pas de barres de défilement. */
	color: inherit;
	background: transparent;
	border: 0;
}

/* Écran trop bas pour la fiche : défilement vertical seulement. */
@media (max-height: 640px) {
	.account-dialog {
		overflow: hidden auto;
		padding: 24px 8px 8px;
	}
}

.account-dialog::backdrop {
	background: rgba(8, 6, 15, 0.72);
	backdrop-filter: blur(2px);
}

.account-dialog .index-card {
	margin: 0;
}

/* Sans JavaScript : l’ancre #vault-account affiche la fiche à sa place. */
.account-dialog:not([open]):has(#vault-account:target) {
	position: static;
	display: block;
	margin: 30px auto 10px;
}

.account-dialog__close {
	position: absolute;
	top: 0;
	right: 4px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	color: var(--paper-ink);
	background: var(--paper-white);
	border: 1px solid var(--paper-line);
	border-radius: 50%;
	box-shadow: var(--shadow-paper);
	cursor: pointer;
}

.account-dialog__close:hover,
.account-dialog__close:focus-visible {
	color: var(--stamp-ink);
}

/* Déconnexion : sous la fiche, sur la nuit, comme les pastilles de l’en-tête. */
.account-dialog__logout {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: fit-content;
	height: 40px;
	margin: 18px auto 4px;
	padding: 3px 18px 0;
	font-family: var(--font-type);
	font-size: 0.9rem;
	line-height: 1;
	text-decoration: none;
	color: var(--ground-ink);
	background: var(--ground-chip);
	border: 1px solid rgba(185, 123, 255, 0.4);
	border-radius: 999px;
	transition: color 0.2s ease, box-shadow 0.2s ease;
}

.account-dialog__logout svg {
	margin-top: -3px;
}

.account-dialog__logout:hover,
.account-dialog__logout:focus-visible {
	color: var(--ground-accent);
	box-shadow: var(--ground-glow);
}

.account-dialog:not([open]) .account-dialog__close {
	display: none;
}

.vault-bar__timer {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 22px;
	padding-right: 10px;
	border-right: 1px solid rgba(185, 123, 255, 0.4);
	cursor: help;
	font-variant-numeric: tabular-nums;
}

/* Même correction optique que le logo : texte et horloge recentrés à l’œil sur les icônes. */
.vault-bar__timer > span {
	padding-top: 3px;
}

.vault-bar__timer svg {
	margin-top: 1px;
}

/* Roue des paramètres (ou déconnexion sans le plugin) au bout de la pastille d’accès. */
.vault-bar__account,
.vault-bar__logout {
	display: inline-grid;
	place-items: center;
	width: 32px;
	height: 32px;
	color: var(--ground-ink);
	border-radius: 50%;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.vault-bar__account:hover,
.vault-bar__account:focus-visible,
.vault-bar__logout:hover,
.vault-bar__logout:focus-visible {
	color: var(--ground-accent);
	background: rgba(124, 244, 200, 0.12);
}

/* Téléphone : logo, abonnement et mode sur la première ligne ; accès et déconnexion sur la seconde. */
@media (max-width: 640px) {
	/* Ligne 1 : logo et signature (qui passe dessous si la place manque), abonnement, mode. Ligne 2 : accès. */
	.vault-bar {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto auto;
		gap: 12px 8px;
	}

	.vault-bar > .lang-switch {
		grid-column: 2;
		grid-row: 1;
		margin-left: 0;
		align-self: start;
	}

	.vault-bar__brand {
		grid-column: 1;
		grid-row: 1;
	}

	.vault-bar > .mode-toggle {
		grid-column: 3;
		grid-row: 1;
		margin-left: 0;
		justify-self: end;
		align-self: start; /* À la hauteur de l’étiquette, pas de la signature. */
	}

	/* Accès : toute la largeur, le texte à gauche, la déconnexion au bout à droite. */
	.vault-bar__channel {
		grid-column: 2;
		grid-row: 2;
		margin-left: 0;
		justify-self: end;
	}

	.vault-bar__session {
		grid-column: 1 / -1;
		grid-row: 2;
		display: flex;
		justify-self: stretch;
		font-size: 0.8rem;
	}

	.vault-bar__timer {
		flex: 1;
		min-width: 0;
	}

	/* « THE VAULT by mokachupa » reste sur une ligne : tout rétrécit avec la largeur de l’écran. */
	.gate__brand {
		flex-wrap: nowrap;
		gap: clamp(6px, 2vw, 12px);
	}

	.vault-bar__brand .label-strip {
		height: clamp(34px, 10vw, 40px);
		padding: 6px clamp(8px, 2.6vw, 16px) 0;
		font-size: clamp(0.68rem, 3.1vw, 0.95rem);
		letter-spacing: clamp(0.1em, 0.6vw, 0.2em);
		white-space: nowrap;
	}

	.gate__by {
		gap: 0.3em;
		font-size: clamp(0.62rem, 2.6vw, 0.9rem);
		white-space: nowrap;
	}

	.wordmark {
		font-size: clamp(0.8rem, 3.6vw, 1.1rem);
	}
}


/* ==========================================================================
   Lecture : le rapport d’enquête ouvert
   ========================================================================== */

.reading {
	max-width: 1240px;
	margin: 0 auto;
	padding: 10px var(--gutter) 40px;
}

.reading__back {
	margin: 0 0 18px;
}

.sticky-tab {
	display: inline-block;
	padding: 5px 16px;
	font-family: var(--font-type);
	font-size: 0.9rem;
	text-decoration: none;
	color: var(--ground-ink);
	border: 1px solid rgba(124, 244, 200, 0.4);
	border-radius: 999px;
	background: var(--ground-chip);
	transition: box-shadow 0.2s ease, color 0.2s ease;
}

.sticky-tab:hover,
.sticky-tab:focus-visible {
	color: var(--ground-accent);
	box-shadow: var(--ground-glow);
}

/* La chemise ouverte : volet kraft à gauche, rapport tapé à droite. */
.spread {
	position: relative;
	display: grid;
	color: var(--paper-ink);
	background: var(--manila);
	box-shadow: 0 40px 70px -24px rgba(0, 0, 0, 0.95), 0 0 70px rgba(185, 123, 255, 0.16);
	border-radius: 4px;
}

@media (min-width: 920px) {
	.spread {
		grid-template-columns: minmax(260px, 0.8fr) 1.6fr;
	}

	/* Le pli de la chemise. */
	.spread::after {
		content: "";
		position: absolute;
		top: 0;
		bottom: 0;
		left: calc(100% * 0.8 / 2.4);
		width: 40px;
		margin-left: -20px;
		background: linear-gradient(90deg, transparent, rgba(60, 40, 10, 0.18) 45%, rgba(60, 40, 10, 0.26) 50%, rgba(60, 40, 10, 0.1) 55%, transparent);
		pointer-events: none;
	}
}

.spread__left {
	position: relative;
	padding: 44px 30px 34px;
	background:
		url("../img/moth-faint.svg") no-repeat 50% calc(100% - 32px) / 220px, /* Papillon mokachupa, entier, en bas de la page. */
		url("../img/grain.svg");
	background-blend-mode: normal, multiply;
	border-bottom: 1px dashed rgba(43, 33, 64, 0.25);
}

/* Fiche signalétique en tête du volet. */
.spread__label {
	display: block;
	margin-bottom: 12px;
	font-family: var(--font-type);
	font-size: 0.7rem;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--paper-ink-soft);
}

@media (min-width: 920px) {
	.spread__left {
		border-bottom: 0;
	}
}

.spread__number {
	margin: 0;
	font-family: var(--font-occult);
	font-size: clamp(2.8rem, 6vw, 4.2rem);
	line-height: 1;
	color: var(--pen);
}

.stamp--month {
	margin: 12px 0 18px;
	transform: rotate(-4deg);
}

.stamp--declass {
	position: absolute;
	top: 30px;
	right: 20px;
	transform: rotate(9deg);
	font-size: 0.7rem;
	padding: 4px 10px 2px;
	color: var(--pen);
}

.spread__title {
	font-size: clamp(1.9rem, 3.6vw, 2.7rem);
}

.spread__topics {
	font-family: var(--font-type);
	font-size: 0.8rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--paper-ink-soft);
}

.annotation--spread {
	margin: 18px 0;
	transform: rotate(-1.5deg);
}

.polaroid {
	position: relative;
	margin: 22px 0 0;
	padding: 12px 12px 34px;
	background: var(--paper-white);
	box-shadow: var(--shadow-paper);
	max-width: 280px;
}

.spread__right {
	position: relative;
	padding: 46px clamp(22px, 5vw, 64px) 52px clamp(44px, 6vw, 72px);
	background:
		linear-gradient(var(--stamp-ink), var(--stamp-ink)) 22px 0 / 1px 100% no-repeat,
		url("../img/grain.svg"),
		var(--paper-white);
	background-blend-mode: normal, multiply, normal;
	box-shadow: -6px 0 14px -10px rgba(0, 0, 0, 0.5);
}

/* Contenu éditorial : base typographique. Les blocs ont leurs styles dans blocks.css. */
.entry > * {
	max-width: 42rem;
}

.entry > .alignwide,
.entry > .wp-block-gallery,
.entry > .wp-block-columns,
.entry > .wp-block-media-text,
.entry > .wp-block-cover,
.entry > .wp-block-table {
	max-width: 100%;
}

.entry p,
.entry ul,
.entry ol {
	margin: 0 0 1.1em;
}

/* :where() : spécificité minimale, les liens stylés des blocs (boutons…) gardent leur couleur. */
.entry :where(a) {
	color: var(--pen);
}

.tickets {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 18px;
	margin-top: 36px;
}

.mini-ticket {
	display: grid;
	gap: 4px;
	min-width: min(100%, 260px);
	padding: 14px 20px;
	text-decoration: none;
	color: var(--paper-ink);
	background: url("../img/grain.svg"), var(--manila);
	background-blend-mode: multiply, normal;
	border: 2px dashed rgba(168, 18, 111, 0.45);
	box-shadow: var(--shadow-paper);
	transition: box-shadow 0.25s ease;
}

.mini-ticket:hover,
.mini-ticket:focus-visible {
	color: var(--paper-ink);
	box-shadow: var(--shadow-lift);
}

.mini-ticket__kicker {
	font-family: var(--font-type);
	font-size: 0.72rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--stamp-ink);
}

.mini-ticket__title {
	font-family: var(--font-occult);
	font-size: 1.25rem;
}

/* ==========================================================================
   Pages papier (confidentialité…), pages clé et désinscription
   ========================================================================== */

.sheet-wrap {
	max-width: 52rem;
	margin: 0 auto;
	padding: 30px var(--gutter) 40px;
}

.sheet {
	position: relative;
	padding: 52px clamp(22px, 6vw, 64px) 140px; /* Place du papillon en bas. */
	color: var(--paper-ink);
	background:
		url("../img/moth-faint.svg") no-repeat 50% calc(100% - 30px) / 130px, /* Au pied de la feuille, dans sa propre place (comme la page d’édition). */
		url("../img/grain.svg"),
		var(--paper-white);
	background-blend-mode: normal, multiply, normal;
	box-shadow: var(--shadow-lift);
	transform: rotate(-0.4deg);
}

.sheet__head {
	display: block;
	margin-bottom: 18px;
	padding-bottom: 10px;
	font-family: var(--font-type);
	font-size: 0.7rem;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--paper-ink-soft);
	border-bottom: 3px double var(--paper-ink);
}

.sheet__title {
	font-size: clamp(2rem, 4.4vw, 2.8rem);
}

.sheet .index-card {
	margin: 2em 0;
	transform: rotate(0.6deg);
}

.key {
	display: grid;
	place-items: center;
	min-height: calc(100vh - 64px);
	padding: 40px var(--gutter);
	color: var(--paper-ink);
	perspective: 1600px;
}

/* Dossier scellé (page clé) : celui de la Gate, fermé. Au clic, le sceau casse, la couverture se
   soulève côté cachet, une lumière menthe s’échappe. Charnière en haut (téléphone) ou à gauche. */
.sealed-wrap {
	perspective: 1600px; /* Sur le parent direct : sinon la couverture pivote « à plat », sans relief. */
	display: grid;
	justify-items: center;
	gap: 56px; /* Le cachet dépasse sous le dossier : de la place avant le bouton. */
	width: min(100%, 30rem);
}

.sealed {
	position: relative;
	display: grid;
	width: 100%;
	min-height: clamp(17rem, 72vw, 20rem);
	transform-style: preserve-3d;
	transform: rotate(-0.6deg);
	transition: transform 0.7s cubic-bezier(0.3, 0.7, 0.2, 1);
}

.sealed__page {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	align-content: center;
	gap: 14px;
	border-radius: 4px;
	background:
		repeating-linear-gradient(transparent 0 25px, var(--paper-line) 25px 26px),
		var(--paper-white);
	box-shadow: 0 40px 70px -20px rgba(0, 0, 0, 0.95);
	transform: translateZ(-10px);
	overflow: hidden;
}

.sealed__glow {
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 50% 92%, rgba(124, 244, 200, 0.65), transparent 62%);
	opacity: 0;
	transition: opacity 0.5s ease;
}

.sealed .dossier__tab {
	transform: translateZ(-10px);
}

.sealed__cover {
	position: relative;
	display: grid;
	align-content: start;
	gap: 18px;
	padding: 26px clamp(20px, 6vw, 34px) 56px;
	border-radius: 4px;
	box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.9), 0 0 60px rgba(185, 123, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.35);
	transform-origin: center top;
	transition: transform 0.6s cubic-bezier(0.3, 1.3, 0.5, 1), box-shadow 0.5s ease;
}

.sealed__label {
	position: relative;
	top: auto;
	left: auto;
	width: auto;
	max-width: 21rem;
	padding: 16px 18px 14px;
	transform: rotate(-1deg);
}

.sealed__title {
	margin: 0 0 6px;
	font-family: var(--font-occult);
	font-size: clamp(1.7rem, 6vw, 2.2rem);
	line-height: 1.05;
	letter-spacing: 0;
	text-transform: none;
	color: var(--paper-ink);
}

.sealed__label p {
	margin: 0;
	font-family: var(--font-body);
	font-size: 0.95rem;
	line-height: 1.5;
	letter-spacing: 0;
}

.sealed .stamp--sent {
	top: auto;
	left: auto;
	right: 7%;
	bottom: 16%;
	font-size: clamp(1rem, 4vw, 1.3rem);
	border-width: 4px;
	transform: rotate(-9deg);
}

.sealed__wax {
	display: contents;
}

.sealed-wrap .action-button {
	width: auto;
	padding-inline: 32px;
}

/* Ouverture : le sceau se brise, la couverture se soulève, le dossier monte vers soi. */
.sealed.is-opening .wax__half {
	opacity: 0;
	transition: transform 0.52s cubic-bezier(0.3, 0, 0.7, 1), opacity 0.52s ease;
}

.sealed.is-opening .wax__half:first-of-type { transform: translate(-1.4em, 3.6em) rotate(-38deg); }
.sealed.is-opening .wax__half:last-of-type  { transform: translate(1.5em, 4.2em) rotate(30deg); }

.sealed.is-opening .wax__splat {
	opacity: 0;
	transition: opacity 0.3s ease;
}

.sealed.is-opening .sealed__cover {
	transform: rotateX(22deg);
	transition-delay: 0.27s;
	box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.9), 0 0.6em 2.4em rgba(124, 244, 200, 0.55);
}

.sealed.is-opening .sealed__glow {
	opacity: 1;
	transition-delay: 0.27s;
}

.sealed.is-opening {
	transform: rotate(-0.6deg) translateY(-2%) scale(1.05);
	transition-delay: 0.37s;
}

/* Effacement : le dossier n’est pas ouvert, il est classé. */
.stamp--slam {
	position: absolute;
	top: 46%;
	left: 50%;
	z-index: 5;
	font-size: clamp(1.4rem, 6vw, 2.2rem);
	padding: 10px 20px 6px;
	border-width: 6px;
	color: var(--pink);
	background: transparent;
	filter: drop-shadow(0 0 10px rgba(255, 61, 190, 0.55));
	opacity: 0;
	transform: translate(-50%, -50%) rotate(-12deg) scale(2.6);
	pointer-events: none;
}

.sealed.is-classifying .stamp--slam {
	animation: classify 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) forwards;
}

.sealed.is-classifying .sealed__label p,
.sealed.is-classifying .sealed__title {
	color: transparent;
	background: var(--paper-ink);
	transition: color 0.3s ease 0.35s, background-color 0.3s ease 0.35s;
}

@keyframes classify {
	0%   { opacity: 0; transform: translate(-50%, -50%) rotate(-12deg) scale(2.6); }
	70%  { opacity: 1; }
	100% { opacity: 0.95; transform: translate(-50%, -50%) rotate(-12deg) scale(1); }
}

.stamp-button--danger {
	color: var(--stamp-ink);
}

/* ==========================================================================
   Accueil du Vault : le dossier entrouvert s’ouvre, on plonge dedans, accès accordé
   ========================================================================== */

.welcome {
	position: fixed;
	inset: 0;
	z-index: 50;
	display: grid;
	place-items: center;
	padding: 0 var(--gutter);
	background: var(--ground-backdrop);
	perspective: 1600px;
	pointer-events: none;
	animation: welcome-fade 0.45s ease 1.95s forwards;
}

.sealed--welcome {
	--dive: 1.6; /* Assez pour plonger, sans couper le titre ni le tampon sur téléphone. */
	width: min(100%, 30rem);
	transform: rotate(-0.6deg) translateY(-2%) scale(1.05);
	animation: welcome-dive 1s cubic-bezier(0.65, 0, 0.25, 1) 0.45s both;
}

.sealed--welcome .sealed__cover {
	backface-visibility: hidden; /* Seulement ici : la couverture se retourne complètement. */
	-webkit-backface-visibility: hidden;
	transform: rotateX(22deg);
	box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.9), 0 0.6em 2.4em rgba(124, 244, 200, 0.55);
	animation: welcome-open-v 0.95s cubic-bezier(0.55, 0.05, 0.25, 1) 0.2s both;
}

.sealed--welcome .sealed__glow {
	opacity: 1;
	animation: welcome-glow 0.5s ease 0.8s both;
}

.welcome__title {
	position: relative;
	font-family: var(--font-occult);
	font-size: clamp(2rem, 8vw, 3rem);
	line-height: 1;
	color: var(--paper-ink);
}

.stamp--welcome {
	position: relative;
	font-size: 1rem;
	animation: welcome-stamp 0.4s cubic-bezier(0.2, 1.6, 0.4, 1) 1.15s both;
}

/* Le tableau se remplit : les cartes tombent une à une sous le dossier qui s’efface. */
@media (prefers-reduced-motion: no-preference) {
	.is-welcome .board > .card {
		animation: card-drop 0.55s cubic-bezier(0.2, 1.3, 0.4, 1) 2.45s both;
	}

	.is-welcome .board > .card:nth-child(1) { animation-delay: 1.95s; }
	.is-welcome .board > .card:nth-child(2) { animation-delay: 2.02s; }
	.is-welcome .board > .card:nth-child(3) { animation-delay: 2.09s; }
	.is-welcome .board > .card:nth-child(4) { animation-delay: 2.16s; }
	.is-welcome .board > .card:nth-child(5) { animation-delay: 2.23s; }
	.is-welcome .board > .card:nth-child(6) { animation-delay: 2.3s; }
	.is-welcome .board > .card:nth-child(7) { animation-delay: 2.37s; }
}

@keyframes welcome-dive {
	from { transform: rotate(-0.6deg) translateY(-2%) scale(1.05); }
	to   { transform: rotate(0deg) translateY(0) scale(var(--dive)); }
}

@keyframes welcome-open-v {
	from { transform: rotateX(22deg); }
	to   { transform: rotateX(172deg); }
}

@keyframes welcome-open-h {
	from { transform: rotateY(-24deg); }
	to   { transform: rotateY(-172deg); }
}

@keyframes welcome-glow {
	to { opacity: 0; }
}

@keyframes welcome-stamp {
	0%   { opacity: 0; transform: rotate(-8deg) scale(2.4); }
	100% { opacity: 0.9; transform: rotate(-8deg) scale(1); }
}

@keyframes welcome-fade {
	to { opacity: 0; visibility: hidden; }
}

@keyframes card-drop {
	from { opacity: 0; translate: 0 -28px; }
	to   { opacity: 1; translate: 0 0; }
}

/* Écran large : charnière à gauche, cachet sur le bord droit, lumière de ce côté. */
@media (min-width: 860px) {
	.sealed__cover {
		transform-origin: left center;
		padding-bottom: 26px;
		padding-right: 64px;
	}

	.sealed__glow {
		background: radial-gradient(circle at 92% 50%, rgba(124, 244, 200, 0.65), transparent 62%);
	}

	.sealed.is-opening .sealed__cover {
		transform: rotateY(-24deg);
	}

	.sealed--welcome {
		--dive: 2.6;
	}

	.sealed--welcome .sealed__cover {
		transform: rotateY(-24deg);
		animation-name: welcome-open-h;
	}
}

/* ==========================================================================
   Pied de page
   ========================================================================== */

body > main {
	flex: 1 0 auto; /* Le contenu prend la place libre : le pied de page reste en bas, sans vide dessous. */
}

.site-foot {
	position: relative;
	z-index: 1; /* Au-dessus du halo fixe de la Gate. */
	padding: 16px var(--gutter) max(20px, env(safe-area-inset-bottom, 0px));
	font-family: var(--font-type);
	font-size: 0.76rem;
	letter-spacing: 0.04em;
	text-align: center;
	color: var(--ground-ink-muted);
}

.site-foot a {
	color: var(--ground-ink-soft);
}

.site-foot a:hover {
	color: var(--ground-accent);
}

.site-foot p {
	margin: 0;
}

.site-foot p {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px 6px;
}

.site-foot__logo {
	width: 24px;
	height: 24px;
	border-radius: 6px;
}

.site-foot__nav ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 18px;
	margin: 0 0 6px;
	padding: 0;
	list-style: none;
}

/* ==========================================================================
   Préférences d’accessibilité
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-delay: 0s !important;
	}

	.welcome {
		display: none;
	}

	.card:hover,
	.card:focus-within {
		transform: rotate(var(--tilt, 0deg));
	}
}

@media (forced-colors: active) {
	.stamp,
	.card--envelope .card__postmark {
		-webkit-mask: none;
		mask: none;
	}

	.scratch,
	.redact {
		color: CanvasText;
		background: none;
	}

	.card__link,
	.gate-form,
	.card--ticket .card__link,
	.card--notebook .card__link,
	.card--clipping .card__link {
		-webkit-mask: none;
		mask: none;
		border: 1px solid CanvasText;
	}
}

@media print {
	body {
		background: #fff;
		color: #000;
	}

	.vault-bar,
	.site-foot,
	.account-dialog,
	.tickets,
	.reading__back,
	.tape,
	.gate__glow,
	.gate__spotlight {
		display: none;
	}

	.spread {
		display: block;
		box-shadow: none;
	}
}

/* ==========================================================================
   #vault : le salon, un écran de terminal (sombre dans les deux modes)
   ========================================================================== */

.channel {
	padding: 8px var(--gutter) 32px;
}

.vault-chat {
	--chat-bg: #0b0916;
	--chat-ink: #e8e3fb;
	--chat-muted: #9a90b8;   /* ≥ 6:1 sur le fond */
	--chat-line: rgba(185, 123, 255, 0.28);
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	max-width: 980px;
	margin: 0 auto;
	color: var(--chat-ink);
	background: var(--chat-bg);
	border: 1px solid var(--chat-line);
	border-radius: 8px;
	box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.4) inset;
	font-family: var(--font-body);
	color-scheme: dark;
}

.vault-chat__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 14px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--chat-line);
}

.vault-chat__title {
	margin: 0;
	font-family: var(--font-type);
	font-size: 1.15rem;
	letter-spacing: 0.04em;
	color: #7cf4c8;
}

.vault-chat__topic {
	flex: 1 1 16rem;
	margin: 0;
	font-size: 0.9rem;
	color: var(--chat-muted);
}

.vault-chat__state {
	flex-basis: 100%;
	margin: 0;
	font-size: 0.85rem;
	color: #ffd27a;
}

.vault-chat__log {
	height: clamp(300px, 58svh, 640px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 10px 16px;
	scrollbar-color: var(--chat-line) transparent;
}

.vault-chat__lines {
	margin: 0;
	padding: 0;
	list-style: none;
}

.vault-chat__line {
	position: relative;
	padding: 1px 0;
	font-size: 0.95rem;
	line-height: 1.55;
	overflow-wrap: anywhere;
	border-radius: 3px;
}

/* Place des outils de l’opérateur, seulement sur les lignes qui en ont. */
.vault-chat__line:has(.vault-chat__tools) {
	padding-right: 64px;
}

.vault-chat__line:hover {
	background: rgba(185, 123, 255, 0.07);
}

.vault-chat__time,
.vault-chat__sys,
.vault-chat__line--empty {
	color: var(--chat-muted);
}

.vault-chat__time {
	font-size: 0.85em;
}

.vault-chat__sys,
.vault-chat__body--me {
	font-style: italic;
}

/* Lignes visibles seulement pour soi (/help…) : comme les messages du serveur sur IRC. */
.vault-chat__local {
	font-style: normal;
	color: #7ae8f5;
}

/* Le pseudo dans une ligne (à ne pas confondre avec le formulaire .vault-chat__nick). */
.vault-chat__who {
	font-weight: 700;
}

/* Une couleur par pseudo, toutes lisibles sur le fond (≥ 7:1). */
.vault-chat__c0 { color: #7cf4c8; }
.vault-chat__c1 { color: #6cc7ff; }
.vault-chat__c2 { color: #c79bff; }
.vault-chat__c3 { color: #ff8cdc; }
.vault-chat__c4 { color: #ffd27a; }
.vault-chat__c5 { color: #ffa98a; }
.vault-chat__c6 { color: #c6f57a; }
.vault-chat__c7 { color: #7ae8f5; }

/* Outils de l’opérateur : au survol (souris), toujours visibles au toucher. */
.vault-chat__tools {
	position: absolute;
	top: 0;
	right: 0;
	display: inline-flex;
	gap: 4px;
	opacity: 0;
}

.vault-chat__line:hover .vault-chat__tools,
.vault-chat__line:focus-within .vault-chat__tools {
	opacity: 1;
}

@media (hover: none) {
	.vault-chat__tools {
		opacity: 1;
	}
}

.vault-chat__tool {
	min-width: 26px;
	height: 24px;
	padding: 0 6px;
	font: inherit;
	font-size: 0.8rem;
	color: var(--chat-ink);
	background: #1d1830;
	border: 1px solid var(--chat-line);
	border-radius: 4px;
	cursor: pointer;
}

.vault-chat__tool:hover,
.vault-chat__tool:focus-visible {
	color: #ff8cdc;
	border-color: #ff8cdc;
}

.vault-chat__notice {
	min-height: 1.4em;
	margin: 0;
	padding: 4px 16px 0;
	font-size: 0.85rem;
	color: #ffd27a;
}

.vault-chat__notice:empty {
	padding: 0;
	min-height: 0;
}

.vault-chat__form,
.vault-chat__nick {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 10px 16px 14px;
	border-top: 1px solid var(--chat-line);
}

.vault-chat__form[hidden],
.vault-chat__nick[hidden] {
	display: none;
}

.vault-chat__nick label {
	flex-basis: 100%;
	font-family: var(--font-type);
	color: #7cf4c8;
}

.vault-chat__row {
	display: flex;
	flex: 1;
	gap: 8px;
	min-width: 0;
}

.vault-chat__hint {
	flex-basis: 100%;
	font-size: 0.8rem;
	color: var(--chat-muted);
}

.vault-chat__prompt {
	font-weight: 700;
	color: #7cf4c8;
	white-space: nowrap;
}

.vault-chat input[type="text"] {
	flex: 1;
	min-width: 0;
	padding: 8px 10px;
	font: inherit;
	font-size: 1rem; /* 16 px : pas de zoom sur iPhone. */
	color: var(--chat-ink);
	background: #14102a;
	border: 1px solid var(--chat-line);
	border-radius: 4px;
	caret-color: #7cf4c8;
}

.vault-chat input[type="text"]:focus {
	border-color: #7cf4c8;
	outline: none;
	box-shadow: 0 0 0 2px rgba(124, 244, 200, 0.25);
}

.vault-chat input:disabled,
.vault-chat button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.vault-chat__form button,
.vault-chat__nick button {
	padding: 8px 14px;
	font-family: var(--font-type);
	font-size: 0.9rem;
	color: #08060f;
	background: #7cf4c8;
	border: 0;
	border-radius: 4px;
	cursor: pointer;
}

@media (max-width: 640px) {
	.channel {
		padding-inline: 8px;
	}

	.vault-chat__log {
		height: clamp(260px, 56svh, 560px);
		padding-inline: 10px;
	}

	.vault-chat__line {
		font-size: 0.88rem;
	}
}

/* ==========================================================================
   Intérieur d’une édition : variantes « carnet » et « lettre » (prototype)
   ========================================================================== */

/* --- Carnet : page lignée à spirale, titre manuscrit, post-it et photo scotchée. --- */
.nb {
	--line: 32px;
	--margin-x: clamp(38px, 7vw, 76px);
	position: relative;
	display: grid;
	gap: 0 28px;
	max-width: 56rem;
	margin: 30px auto 0;
	padding: 70px clamp(20px, 5vw, 56px) 48px calc(var(--margin-x) + clamp(14px, 2.5vw, 26px));
	color: var(--paper-ink);
	color-scheme: light;
	background:
		linear-gradient(90deg, transparent var(--margin-x), rgba(168, 18, 111, 0.45) var(--margin-x) calc(var(--margin-x) + 1.5px), transparent 0),
		url("../img/grain.svg"),
		var(--paper-white);
	background-blend-mode: normal, multiply, normal;
	border-radius: 4px 4px 6px 6px;
	box-shadow: 0 40px 70px -24px rgba(0, 0, 0, 0.95), 0 0 70px rgba(185, 123, 255, 0.16);
}

/* Trous de la reliure, puis la spirale par-dessus. */
.nb::before {
	content: "";
	position: absolute;
	top: 20px;
	left: 26px;
	right: 26px;
	height: 12px;
	background: radial-gradient(circle at 17px 6px, #0c0918 0 4.5px, transparent 5px) 0 0 / 34px 12px repeat-x;
	opacity: 0.85;
}

.nb__rings {
	position: absolute;
	top: -16px;
	left: 26px;
	right: 26px;
	height: 44px;
	background:
		radial-gradient(ellipse 6px 20px at 17px 22px, transparent 3px, #d8d2e4 3.5px 4.5px, #7d7590 5.5px, transparent 6px) 0 0 / 34px 44px repeat-x;
	filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.35));
	pointer-events: none;
}

.nb__head {
	min-width: 0;
}

.nb__date {
	margin: 0;
	font-family: var(--font-type);
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--stamp-ink);
}

.nb__title {
	margin: 10px 0 4px;
	font-family: var(--font-hand);
	font-size: clamp(2.6rem, 2rem + 3vw, 4.2rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	color: var(--pen);
	transform: rotate(-1.2deg);
	transform-origin: left center;
}

.nb__topics {
	margin: 6px 0 0;
	font-family: var(--font-hand);
	font-size: 1.35rem;
	color: var(--paper-ink-soft);
}

.nb__pinned {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 18px;
	margin: 22px 0 8px;
}

.nb__photo {
	position: relative;
	width: min(calc(50% - 9px), 15rem); /* Téléphone : photo et post-it côte à côte. */
	margin: 0;
	padding: 10px 10px 30px;
	background: #fff;
	box-shadow: var(--shadow-paper);
	transform: rotate(2.5deg);
}

.nb__photo img {
	width: 100%;
	height: auto;
}

.nb__sticky {
	width: min(calc(50% - 9px), 15rem);
	margin: 0;
	padding: 18px 18px 22px;
	font-family: var(--font-hand);
	font-size: clamp(1.1rem, 0.9rem + 1vw, 1.35rem);
	line-height: 1.25;
	color: #2b2140;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), transparent 18%), #ffe98a;
	box-shadow: 0 12px 18px -10px rgba(0, 0, 0, 0.45);
	transform: rotate(-2deg);
}

/* Le texte s’écrit sur les lignes. */
.nb__body {
	grid-column: 1 / -1;
	margin-top: 26px;
	line-height: var(--line);
	background: repeating-linear-gradient(transparent 0 calc(var(--line) - 1px), var(--paper-line) calc(var(--line) - 1px) var(--line)) 0 3px;
}

.nb__body p,
.nb__body ul,
.nb__body ol {
	margin: 0 0 var(--line);
}

.nb__doodle {
	grid-column: 1 / -1;
	justify-self: end;
	width: 120px;
	height: 80px;
	margin-top: 8px;
	background: url("../img/moth-faint.svg") no-repeat center / contain;
	transform: rotate(-8deg);
}

@media (min-width: 820px) {
	.nb {
		grid-template-columns: minmax(0, 1fr) 15rem;
		grid-template-areas: "head pin" "body pin" "doodle doodle";
		align-content: start;
	}

	.nb__head { grid-area: head; }
	.nb__body { grid-area: body; }
	.nb__doodle { grid-area: doodle; }

	/* Photo et post-it dans la marge de droite, le texte coule à côté. */
	.nb__photo,
	.nb__sticky {
		width: 100%;
	}

	.nb__pinned {
		grid-area: pin;
		flex-direction: column;
		align-items: center;
		margin: 0;
	}
}

/* --- Lettre : l’enveloppe ouverte est posée derrière, la feuille dépliée devant. --- */
.lt {
	--env-w: min(80%, 28rem);
	position: relative;
	max-width: 52rem;
	margin: 26px auto 0;
	padding-top: calc(var(--env-w) / 1.6 * 0.55); /* La feuille recouvre la moitié basse de l’enveloppe. */
	color-scheme: light;
}

/* Recto de l’enveloppe : plus petite, de biais, ouverte au coupe-papier (bord haut dentelé). */
.lt__envelope {
	position: absolute;
	top: 0;
	right: clamp(0px, 3vw, 28px);
	width: var(--env-w);
	aspect-ratio: 1.6;
	color: var(--paper-ink);
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 40%),
		url("../img/grain.svg"),
		#e7d5a8;
	background-blend-mode: normal, multiply, normal;
	border-radius: 3px;
	box-shadow: 0 26px 40px -22px rgba(0, 0, 0, 0.85), inset 0 0 0 1px rgba(60, 40, 10, 0.12);
	clip-path: polygon(0 3%, 4% 1%, 9% 3.5%, 15% 0.5%, 22% 3%, 30% 1%, 38% 3.5%, 46% 0.8%, 54% 3%, 62% 1%, 70% 3.4%, 78% 0.6%, 86% 3%, 93% 1%, 100% 3%, 100% 100%, 0 100%);
	transform: rotate(4deg);
}

.lt__env-from {
	position: absolute;
	top: 12%;
	left: 7%;
	font-family: var(--font-type);
	font-size: clamp(0.58rem, 0.5rem + 0.4vw, 0.72rem);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--paper-ink-soft);
}

.lt__env-to {
	position: absolute;
	top: 34%;
	left: 30%;
	font-family: var(--font-hand);
	font-size: clamp(1.1rem, 0.8rem + 1.4vw, 1.6rem);
	line-height: 1.1;
	color: var(--pen);
	transform: rotate(-3deg);
}

/* Timbre dentelé (image à la une, sinon le papillon) et cachet de la poste avec ses ondulations. */
.lt__stamp {
	position: absolute;
	top: 9%;
	right: 6%;
	width: 17%;
	aspect-ratio: 0.82;
	padding: 5px;
	background: url("../img/moth-faint.svg") no-repeat center / 72%, #f2ecff;
	box-shadow: 0 0 0 5px #fff;
	-webkit-mask: radial-gradient(circle 3px at center, transparent 96%, #000) -4px -4px / 8px 8px, linear-gradient(#000, #000) 5px 5px / calc(100% - 10px) calc(100% - 10px) no-repeat;
	mask: radial-gradient(circle 3px at center, transparent 96%, #000) -4px -4px / 8px 8px, linear-gradient(#000, #000) 5px 5px / calc(100% - 10px) calc(100% - 10px) no-repeat;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

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

.lt__postmark {
	position: absolute;
	z-index: 1;
	top: 14%;
	right: 17%;
	display: grid;
	place-items: center;
	width: 19%;
	aspect-ratio: 1;
	font-family: var(--font-type);
	font-size: clamp(0.48rem, 0.4rem + 0.35vw, 0.6rem);
	line-height: 1.35;
	letter-spacing: 0.08em;
	text-align: center;
	text-transform: uppercase;
	color: rgba(91, 47, 168, 0.8);
	border: 2px solid rgba(91, 47, 168, 0.55);
	border-radius: 50%;
	transform: rotate(-12deg);
}

.lt__postmark::after {
	content: "";
	position: absolute;
	top: 18%;
	right: 92%;
	width: 150%;
	height: 64%;
	background: url("../img/postmark-waves.svg") no-repeat center / 100% 100%;
}

/* La feuille, pliée en trois, posée devant. */
.lt__sheet {
	position: relative;
	z-index: 1;
	width: min(100%, 46rem);
	padding: 40px clamp(22px, 6vw, 64px) 56px;
	color: var(--paper-ink);
	background:
		linear-gradient(transparent calc(33.3% - 1px), rgba(43, 33, 64, 0.07) calc(33.3% - 1px) 33.3%, transparent 33.3% calc(66.6% - 1px), rgba(43, 33, 64, 0.07) calc(66.6% - 1px) 66.6%, transparent 66.6%),
		url("../img/grain.svg"),
		var(--paper-white);
	background-blend-mode: normal, multiply, normal;
	border-radius: 2px;
	box-shadow: var(--shadow-lift);
	/* Droite : la feuille est très haute, le moindre angle décalait le haut hors de l’écran sur téléphone. */
	transform-origin: 50% 0;
}

@media (prefers-reduced-motion: no-preference) {
	.lt__sheet {
		animation: lt-unfold 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both;
	}
}

/* Elle vient de l’enveloppe (en haut à droite) et se pose. */
@keyframes lt-unfold {
	from { transform: translate(6%, -90px) rotate(2deg) scale(0.97); opacity: 0.6; }
	to   { transform: none; opacity: 1; }
}

.lt__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 10px 18px;
	margin-bottom: 26px;
	padding-bottom: 16px;
	border-bottom: 1px solid rgba(43, 33, 64, 0.2);
}

.lt__from {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: 0;
}

.lt__brand {
	padding: 6px 12px 4px;
	font-family: var(--font-type);
	font-size: 0.85rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: #7cf4c8;
	background: #2b2140;
}

.lt__by {
	font-family: var(--font-body);
	font-size: 0.85rem;
	color: var(--paper-ink-soft);
}

.lt__by .wordmark {
	font-size: 1.1rem;
	color: var(--paper-ink);
}

.lt__date {
	margin: 0;
	font-family: var(--font-body);
	font-size: 0.95rem;
	color: var(--paper-ink-soft);
}

.lt__title {
	margin: 0 0 6px;
	font-family: var(--font-occult);
	font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem);
	line-height: 1.05;
	letter-spacing: 0;
	text-transform: none;
}

.lt__re {
	margin: 0 0 22px;
	font-family: var(--font-type);
	font-size: 0.85rem;
	letter-spacing: 0.08em;
	color: var(--stamp-ink);
}

.lt__opening {
	margin: 0 0 24px;
	font-family: var(--font-hand);
	font-size: 1.65rem;
	line-height: 1.25;
	color: var(--pen);
}

.lt__sign {
	margin: 40px 0 0;
	text-align: right;
	font-family: var(--font-hand);
	font-size: 2.2rem;
	line-height: 1;
	color: var(--pen);
}

.lt__sign span {
	display: block;
	margin-bottom: 6px;
	font-size: 1.3rem;
	color: var(--paper-ink-soft);
}

@media (max-width: 640px) {
	.lt {
		--env-w: 92%;
	}
}

/* =========================================================================
 * Missions (vault-core 0.12+) : carte « ordre de mission » épinglée en tête
 * des Archives, et page /vault/missions/.
 * ====================================================================== */

/* --- Le bureau : dossiers au-dessus des Archives ----------------------------
 * Missions : papier crème, plus grand, penché, trombone, tampon, liseré et halo.
 * Drive, boutique, communauté : kraft terne, droits, comme des intercalaires.
 * L’onglet et le corps ne font qu’une forme (même fond, ombre en drop-shadow).
 * Téléphone tactile : les trois intercalaires défilent au doigt. Sur ordinateur,
 * même étroit, ils passent à la ligne : rien n’est jamais coupé.
 * ------------------------------------------------------------------------- */
.vdesk {
	--folder-edge: rgba(124, 244, 200, 0.9);
	--folder-halo: rgba(124, 244, 200, 0.32);
	--folder-chat-bg: #171127; /* La pastille de l’en-tête, posée sur la nuit : ici, sur le kraft, un fond plein. */
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
	gap: 34px 26px;
	align-items: start;
	margin: 34px 0 6px;
}

@media (prefers-color-scheme: light) {
	:root:not([data-mode="dark"]) .vdesk {
		--folder-edge: rgba(91, 47, 168, 0.7);
		--folder-halo: rgba(91, 47, 168, 0.25);
		--folder-chat-bg: #fbf8ff;
	}
}

:root[data-mode="light"] .vdesk {
	--folder-edge: rgba(91, 47, 168, 0.7);
	--folder-halo: rgba(91, 47, 168, 0.25);
	--folder-chat-bg: #fbf8ff;
}

.vdesk--alone {
	grid-template-columns: minmax(0, 40rem);
	justify-content: center;
}

.vdesk__strip {
	display: contents;
}

.vdesk__swipe {
	display: none;
}

.dfolder {
	position: relative;
	display: block;
	min-width: 0;
	padding: 26px 18px 16px;
	color: var(--paper-ink);
	text-decoration: none;
	background: #d3c191;
	border-radius: 0 4px 4px 4px;
	filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.45));
	transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dfolder__tab {
	position: absolute;
	top: -19px;
	left: 0;
	display: flex;
	align-items: center;
	height: 20px;
	padding: 3px 12px 0;
	font-family: var(--font-type);
	font-size: 0.62rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--paper-ink-soft);
	background: inherit;
	border-radius: 6px 6px 0 0;
}

.dfolder__title {
	display: block;
	margin: 0 0 10px;
	font-family: var(--font-occult);
	font-size: 1.45rem;
	font-weight: normal;
	line-height: 1.1;
	color: var(--paper-ink);
}

.dfolder__foot {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	margin-top: 12px;
	padding-top: 9px;
	border-top: 1px dashed rgba(43, 33, 64, 0.25);
}

.dfolder__small {
	min-width: 0;
	font-family: var(--font-type);
	font-size: 0.62rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--paper-ink-soft);
}

.dfolder__go {
	flex: none;
	font-family: var(--font-hand);
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	color: var(--paper-ink);
	text-decoration: none;
}

a.dfolder__go:hover,
a.dfolder__go:focus-visible {
	text-decoration: underline;
}

.dfolder__hint {
	margin: 8px 0 0;
	font-family: var(--font-type);
	font-size: 0.62rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--paper-ink-soft);
}

/* Missions */
.dfolder--missions {
	padding: 34px 24px 20px;
	background: #fff5de;
	transform: rotate(-1.4deg);
	filter: drop-shadow(0 0 0.6px var(--folder-edge)) drop-shadow(0 0 0.6px var(--folder-edge)) drop-shadow(0 0 22px var(--folder-halo)) drop-shadow(0 16px 16px rgba(0, 0, 0, 0.5));
}

/* Survol réservé aux souris : sur iPhone, un effet au survol fait que le premier tap ne fait que
   « survoler » le dossier, et il faut taper une seconde fois pour l’ouvrir. */
.dfolder--missions:focus-visible {
	transform: rotate(-0.4deg) translateY(-5px);
}

@media (hover: hover) and (pointer: fine) {
	.dfolder--missions:hover {
		transform: rotate(-0.4deg) translateY(-5px);
	}

	.dfolder--missions:hover .dfolder__go {
		text-decoration: underline;
	}

	.vdesk__strip .dfolder:hover {
		transform: translateY(-4px);
	}
}

.dfolder--missions .dfolder__tab {
	color: var(--paper-ink);
}

.dfolder--missions .dfolder__title {
	padding-right: 90px;
	font-size: 2rem;
}

.dfolder--missions .dfolder__go {
	font-size: 1.45rem;
}

.dfolder--missions:focus-visible .dfolder__go {
	text-decoration: underline;
}

.dfolder__clip {
	position: absolute;
	z-index: 2;
	top: -26px;
	right: 28%;
	color: #a7adba;
	transform: rotate(8deg);
}

.dfolder__clip svg {
	display: block;
}

.dfolder__stamp {
	position: absolute;
	top: 16px;
	right: 14px;
	padding: 3px 8px 0;
	font-family: var(--font-type);
	font-size: 0.72rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--stamp-ink);
	border: 3px double currentColor;
	border-radius: 3px;
	opacity: 0.85;
	transform: rotate(9deg);
}

.dfolder__lines {
	display: grid;
	gap: 8px;
	font-family: var(--font-body);
	font-size: 0.9rem;
	line-height: 1.35;
}

.dfolder__line {
	display: flex;
	gap: 8px;
	align-items: baseline;
}

.dfolder__line b {
	flex: none;
	padding: 2px 6px 0;
	font-family: var(--font-type);
	font-size: 0.6rem;
	font-weight: normal;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #fff;
	background: var(--stamp-ink);
	border-radius: 2px;
}

.dfolder__pips {
	display: inline-flex;
	gap: 4px;
	margin-left: 6px;
	vertical-align: middle;
}

.dfolder__pips i {
	width: 16px;
	height: 5px;
	background: rgba(43, 33, 64, 0.18);
	border-radius: 3px;
}

.dfolder__pips i.is-on {
	background: #7f0c53;
}

/* Intercalaires : se soulèvent un peu au survol. */
.vdesk__strip .dfolder:focus-within {
	transform: translateY(-4px);
}

/* Drive */
.dfolder__thumbs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dfolder__thumbs a {
	position: relative;
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	background: #fffdf7;
	border: 1px solid rgba(43, 33, 64, 0.12);
}

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

.dfolder__new {
	position: absolute;
	top: 3px;
	left: 3px;
	padding: 1px 4px 0;
	font-family: var(--font-type);
	font-size: 0.5rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #08060f;
	background: #7cf4c8;
}

/* Boutique */
.dfolder__product {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 10px;
	align-items: center;
	color: var(--paper-ink);
	text-decoration: none;
}

.dfolder__product:hover .dfolder__product-name,
.dfolder__product:focus-visible .dfolder__product-name {
	text-decoration: underline;
}

.dfolder__product img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	background: #fffdf7;
	border: 1px solid rgba(43, 33, 64, 0.12);
}

.dfolder__product > span:only-child {
	grid-column: 1 / -1;
}

.dfolder__product-name {
	display: block;
	font-weight: 700;
	line-height: 1.2;
}

.dfolder__product-line {
	display: block;
	font-size: 0.8rem;
	color: var(--paper-ink-soft);
}

/* Communauté : #chat, la même pastille que dans l’en-tête, sur toute la largeur. */
.dfolder__links {
	display: grid;
	gap: 7px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dfolder__chat {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	height: 40px;
	margin-bottom: 4px;
	padding: 3px 14px 0;
	font-family: var(--font-type);
	font-size: 0.9rem;
	line-height: 1;
	color: var(--ground-ink);
	text-decoration: none;
	background: var(--folder-chat-bg);
	border: 1px solid rgba(185, 123, 255, 0.4);
	border-radius: 999px;
	transition: color 0.2s ease, box-shadow 0.2s ease;
}

.dfolder__chat:hover,
.dfolder__chat:focus-visible {
	color: var(--ground-accent);
	box-shadow: var(--ground-glow);
}

.dfolder__chat.is-open .vault-bar__dot {
	background: #2fd39b;
	box-shadow: 0 0 8px rgba(124, 244, 200, 0.8);
}

.dfolder__state {
	margin-left: auto;
	font-size: 0.62rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ground-ink-muted);
}

.dfolder__chat.is-open .dfolder__state {
	color: var(--ground-accent);
}

.dfolder__link {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--paper-ink);
	text-decoration: none;
}

.dfolder__link:hover span:last-child,
.dfolder__link:focus-visible span:last-child {
	text-decoration: underline;
}

.dfolder__ico {
	display: grid;
	place-items: center;
	width: 20px;
	height: 20px;
	flex: none;
	font-size: 0.7rem;
	color: #fff;
	background: #7f0c53;
	border-radius: 3px;
}

/* Écrans moyens : Missions sur sa ligne, les autres en dessous (ou à la ligne). */
@media (max-width: 1199px) {
	.vdesk {
		grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	}

	.dfolder--missions {
		grid-column: 1 / -1;
		justify-self: center;
		width: 100%;
		max-width: 42rem;
	}
}

/* Deux colonnes : le troisième dossier prend toute la ligne au lieu de laisser un trou. */
@media (min-width: 520px) and (max-width: 779px) and (pointer: fine) {
	.vdesk__strip > .dfolder:last-child:nth-child(3) {
		grid-column: 1 / -1;
	}
}

/* Téléphone tactile : les trois intercalaires défilent au doigt. */
@media (max-width: 759px) and (pointer: coarse) {
	.vdesk {
		display: block;
		margin-top: 40px;
	}

	.dfolder--missions {
		margin-bottom: 26px;
	}

	.dfolder--missions .dfolder__title {
		font-size: 1.7rem;
	}

	.vdesk__swipe {
		display: block;
		margin: 0;
		font-family: var(--font-type);
		font-size: 0.62rem;
		letter-spacing: 0.14em;
		text-transform: uppercase;
		text-align: right;
		color: var(--ground-ink-muted);
	}

	.vdesk__strip {
		display: grid;
		grid-auto-flow: column;
		grid-auto-columns: 78%;
		gap: 16px;
		margin: 0 calc(var(--gutter) * -1);
		padding: 26px var(--gutter) 20px;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: var(--gutter);
		scrollbar-width: none;
	}

	.vdesk__strip::-webkit-scrollbar {
		display: none;
	}

	.vdesk__strip > .dfolder {
		scroll-snap-align: start;
	}

	.vdesk__strip > .dfolder:only-child {
		grid-auto-columns: 100%;
	}
}

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

/* --- Page Missions ------------------------------------------------------- */
.missions-page {
	padding: 8px var(--gutter) 48px;
}

.missions {
	max-width: 1120px;
	margin: 0 auto;
}

.missions__head {
	--title-glow: 0 0 18px rgba(185, 123, 255, 0.55), 0 0 46px rgba(124, 244, 200, 0.22);
	display: grid;
	gap: 8px;
	justify-items: center;
	margin: 10px 0 36px;
	text-align: center;
}

@media (prefers-color-scheme: light) {
	:root:not([data-mode="dark"]) .missions__head {
		--title-glow: 0 0 22px rgba(91, 47, 168, 0.22);
	}
}

:root[data-mode="light"] .missions__head {
	--title-glow: 0 0 22px rgba(91, 47, 168, 0.22);
}

.missions__title {
	margin: 0;
	font-size: clamp(2.2rem, 6vw, 3.6rem);
	line-height: 1.05;
	color: var(--ground-ink);
	text-shadow: var(--title-glow);
}

.missions__sub {
	margin: 0;
	font-family: var(--font-hand);
	font-size: 1.45rem;
	color: var(--ground-accent);
	text-shadow: var(--ground-glow-text);
}

.missions__level {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 14px;
	margin-top: 6px;
	font-family: var(--font-type);
	font-size: 0.8rem;
	color: var(--ground-ink-soft);
}

.missions__badge {
	padding: 6px 12px 3px;
	font-size: 0.72rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--brand-ink);
	background: var(--brand-bg);
	border-radius: 2px;
	box-shadow: var(--brand-glow);
}

.missions__pips {
	display: inline-flex;
	gap: 5px;
}

.missions__pips i {
	width: 22px;
	height: 6px;
	border-radius: 3px;
	background: rgba(185, 123, 255, 0.25);
	transition: background 0.3s ease;
}

.missions__pips i.is-done {
	background: var(--ground-accent);
	box-shadow: var(--ground-glow-text);
}

.missions__label {
	margin: 0 0 10px;
	font-family: var(--font-type);
	font-size: 0.72rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ground-ink-muted);
}

.missions__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: 32px;
	align-items: start;
}

.missions__grid.is-single {
	grid-template-columns: minmax(0, 1fr);
	max-width: 34rem;
	margin: 0 auto;
}

.missions__col {
	min-width: 0;
}

.missions__side {
	display: grid;
	gap: 30px;
}

.missions__side:empty {
	display: none;
}

@media (max-width: 860px) {
	.missions__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* --- Le vote : deux dessins sur une feuille ------------------------------ */
.duel {
	position: relative;
	padding: 22px clamp(16px, 3vw, 26px) 18px;
	color: var(--paper-ink);
	background: url("../img/grain.svg"), var(--paper-white);
	background-blend-mode: multiply, normal;
	border-radius: 2px;
	box-shadow: var(--shadow-lift);
}

.duel__top {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 6px 12px;
	margin-bottom: 18px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--paper-line);
}

.duel__question {
	margin: 0;
	font-size: clamp(1.4rem, 3vw, 1.8rem);
	line-height: 1.1;
}

.duel__time {
	font-family: var(--font-type);
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--stamp-ink);
}

.duel__pair {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	gap: 14px;
	align-items: start;
}

.duel__vs {
	align-self: center;
	margin-top: -60px;
	font-family: var(--font-occult);
	font-size: 1.9rem;
	color: var(--stamp-ink);
}

/* Téléphone : les deux dessins restent côte à côte, plus petits ; le « vs » s’efface. */
@media (max-width: 560px) {
	.duel__pair {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 12px;
	}

	.duel__vs {
		display: none;
	}

	.duel__name {
		font-size: 1.15rem;
	}

	.duel__plus {
		min-width: 0;
		width: 100%;
		padding-inline: 10px;
	}
}

.duel__cand {
	display: grid;
	gap: 10px;
	justify-items: center;
	min-width: 0;
}

.duel__img {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: #fffdf7;
	border: 1px solid rgba(43, 33, 64, 0.12);
	box-shadow: var(--shadow-paper);
	transform: rotate(-1.4deg);
	transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.duel__cand[data-side="b"] .duel__img {
	transform: rotate(1.2deg);
}

.duel__img:hover,
.duel__img:focus-visible {
	transform: rotate(0deg) translateY(-3px);
}

.duel__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.duel__file {
	position: absolute;
	z-index: 1;
	top: 8px;
	left: 8px;
	padding: 3px 7px 0;
	font-family: var(--font-type);
	font-size: 0.62rem;
	letter-spacing: 0.14em;
	color: var(--paper-ink-soft);
	background: rgba(228, 212, 171, 0.9);
}

.duel__selected {
	position: absolute;
	top: 44%;
	left: 50%;
	padding: 6px 12px 2px;
	font-family: var(--font-type);
	font-size: 1rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--stamp-ink);
	background: rgba(255, 253, 247, 0.7);
	border: 3px double currentColor;
	transform: translate(-50%, -50%) rotate(-12deg);
}

.duel__name {
	margin: 0;
	font-family: var(--font-hand);
	font-size: 1.4rem;
	font-weight: 700;
	line-height: 1;
	text-align: center;
}

.duel__plus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 6.5rem;
	height: 44px;
	padding: 4px 20px 0;
	font-family: var(--font-type);
	font-size: 0.95rem;
	color: #fff;
	background: #7f0c53;
	border: 0;
	border-radius: 999px;
	box-shadow: 0 6px 14px -6px rgba(127, 12, 83, 0.7);
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.duel__plus:hover,
.duel__plus:focus-visible {
	background: #6a0945;
	transform: translateY(-1px);
}

.duel__plus[disabled] {
	cursor: default;
	color: var(--paper-ink-soft);
	background: rgba(43, 33, 64, 0.1);
	box-shadow: none;
	transform: none;
}

.duel__plus.is-mine {
	color: #7cf4c8;
	background: #2b2140;
}

.duel__result {
	display: grid;
	gap: 4px;
	width: 100%;
}

.duel__result[hidden] {
	display: none;
}

.duel__bar {
	display: block;
	height: 10px;
	overflow: hidden;
	background: rgba(43, 33, 64, 0.1);
	border-radius: 5px;
}

.duel__fill {
	display: block;
	width: 0;
	height: 100%;
	background: #7f0c53;
	border-radius: 5px;
	transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.duel__nums {
	display: flex;
	justify-content: space-between;
	font-family: var(--font-type);
	font-size: 0.72rem;
	font-variant-numeric: tabular-nums;
	color: var(--paper-ink-soft);
}

.duel__foot {
	margin: 18px 0 0;
	font-size: 0.85rem;
	color: var(--paper-ink-soft);
}

/* --- Nouveautés du Drive -------------------------------------------------- */
.drive-news {
	padding: 16px;
	background: var(--ground-chip);
	border: 1px solid rgba(185, 123, 255, 0.35);
	border-radius: 8px;
}

.drive-news__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
}

.drive-news__head h2 {
	margin: 0;
	font-size: 1.35rem;
	color: var(--ground-ink);
}

.drive-news__count,
.drive-news__new {
	padding: 3px 7px 0;
	font-family: var(--font-type);
	font-size: 0.62rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--brand-ink);
	background: var(--brand-bg);
	border-radius: 2px;
}

.drive-news__thumbs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin: 12px 0;
	padding: 0;
	list-style: none;
}

.drive-news__thumbs a {
	position: relative;
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	background: #fffdf7;
	border-radius: 2px;
}

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

.drive-news__new {
	position: absolute;
	top: 5px;
	left: 5px;
	font-size: 0.55rem;
}

.drive-news__open {
	font-family: var(--font-type);
	font-size: 0.85rem;
	color: var(--ground-accent);
}

/* --- Mission du mois : post-it scotché ------------------------------------ */
.month-note {
	position: relative;
	padding: 24px 18px 16px;
	color: #3a2f00;
	background: #fff3a6;
	box-shadow: 0 14px 22px -14px rgba(0, 0, 0, 0.7);
	transform: rotate(1.2deg);
}

.month-note::before {
	content: "";
	position: absolute;
	top: -12px;
	left: 50%;
	width: 92px;
	height: 24px;
	margin-left: -46px;
	background: rgba(124, 244, 200, 0.6);
	transform: rotate(-3deg);
}

.month-note__label {
	font-family: var(--font-type);
	font-size: 0.66rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.month-note__text {
	margin: 6px 0 8px;
	font-family: var(--font-hand);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.15;
}

.month-note__go {
	font-family: var(--font-type);
	font-size: 0.85rem;
	color: #3a2f00;
}

/* --- Missions de base : feuille lignée ------------------------------------ */
.orders {
	margin-top: 40px;
	padding: 20px clamp(16px, 3vw, 26px);
	color: var(--paper-ink);
	background: url("../img/grain.svg"), var(--paper-white);
	background-blend-mode: multiply, normal;
	border-radius: 2px;
	box-shadow: var(--shadow-lift);
}

.orders__title {
	margin: 0 0 4px;
	padding-bottom: 8px;
	font-family: var(--font-type);
	font-size: 1rem;
	font-weight: normal;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	border-bottom: 2px solid #7f0c53;
}

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

.orders__item {
	display: grid;
	grid-template-columns: 26px minmax(0, 1fr) auto;
	gap: 12px;
	align-items: start;
	padding: 12px 0;
	border-bottom: 1px dashed var(--paper-line);
}

.orders__item:last-child {
	border-bottom: 0;
}

.orders__box {
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	margin-top: 1px;
	background: #fff;
	border: 2px solid var(--paper-ink);
	border-radius: 2px;
}

.orders__item.is-done .orders__box {
	border-color: var(--stamp-ink);
}

.orders__item.is-done .orders__box::after {
	content: "✓";
	font-family: var(--font-hand);
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1;
	color: var(--stamp-ink);
}

.orders__text {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.orders__name {
	font-weight: 700;
}

.orders__item.is-done .orders__name {
	text-decoration: line-through;
	text-decoration-color: var(--stamp-ink);
	text-decoration-thickness: 2px;
}

.orders__desc {
	font-size: 0.86rem;
	color: var(--paper-ink-soft);
}

.orders__warn {
	font-size: 0.8rem;
	color: #8a4b00;
}

.orders__go {
	align-self: center;
	font-family: var(--font-type);
	font-size: 0.82rem;
	white-space: nowrap;
}

.orders__go a {
	color: var(--pen);
	text-underline-offset: 3px;
}

.orders__state {
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--paper-ink-soft);
}

@media (max-width: 520px) {
	.orders__item {
		grid-template-columns: 26px minmax(0, 1fr);
	}

	.orders__go {
		grid-column: 2;
		justify-self: start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.duel__fill,
	.duel__img,
	.missions__pips i {
		transition: none;
	}
}

/* --- « Tip Me » (bureau, dossier Vault's circle) et fenêtre Ko-fi -------------------------------
   Le bouton reprend les couleurs du widget Ko-fi (#323842, blanc : 11.9:1). Le panneau Ko-fi n’est
   chargé qu’au clic, dans la fenêtre (vault.js) ; rien ne part vers Ko-fi avant. */
.dfolder__foot:has(.tip-button) {
	align-items: center;
}

.tip-button {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 9px;
	min-height: 42px;
	padding: 6px 18px 6px 12px;
	font-family: "Quicksand", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	color: #fff;
	background: #323842;
	border-radius: 999px;
	box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.55);
	transition: background-color 0.15s ease, transform 0.1s ease;
}

.tip-button__cup {
	display: block;
	flex: none;
	width: 30px;
	height: 22px;
}

.tip-button:hover,
.tip-button:focus-visible {
	color: #fff;
	background: #1f242b; /* 15.4:1 */
}

.tip-button:focus-visible {
	outline: 2px solid #323842;
	outline-offset: 3px;
}

.tip-button:active {
	transform: translateY(1px);
}

.kofi-dialog {
	width: min(440px, calc(100vw - 24px));
	max-height: calc(100dvh - 24px);
	padding: 0;
	overflow: visible;
	color: var(--paper-ink);
	background: transparent;
	border: 0;
}

.kofi-dialog::backdrop {
	background: rgba(8, 6, 15, 0.72);
	backdrop-filter: blur(2px);
}

.kofi-dialog__sheet {
	position: relative;
	display: grid;
	gap: 8px;
	max-height: calc(100dvh - 24px);
	box-sizing: border-box;
	padding: 22px 16px 14px;
	overflow: hidden auto;
	background: url("../img/grain.svg"), var(--manila);
	background-blend-mode: multiply, normal;
	border-radius: 4px;
	box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.85);
	--link-hover: var(--pen);
}

.kofi-dialog__close {
	position: absolute;
	top: 10px;
	right: 10px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	font-size: 1rem;
	color: var(--paper-ink);
	background: var(--paper-white);
	border: 1px solid rgba(43, 33, 64, 0.25);
	border-radius: 50%;
	cursor: pointer;
}

.kofi-dialog__close:hover,
.kofi-dialog__close:focus-visible {
	background: #fff;
	border-color: var(--paper-ink);
}

.kofi-dialog__title {
	margin: 0;
	padding-right: 44px;
	font-family: var(--font-occult);
	font-size: 1.6rem;
	font-weight: 400;
	line-height: 1.1;
}

.kofi-dialog__note {
	margin: 0;
	font-size: 0.78rem;
	line-height: 1.5;
	color: var(--paper-ink-soft);
}

/* Le panneau Ko-fi : blanc, sa hauteur d’origine (712 px), réduite si l’écran est plus bas. */
.kofi-dialog__frame {
	min-height: 120px;
	background: #f9f9f9;
	border-radius: 3px;
}

.kofi-dialog__frame iframe {
	display: block;
	width: 100%;
	height: min(712px, calc(100dvh - 190px));
	border: 0;
}

.kofi-dialog__alt {
	margin: 0;
	text-align: center;
	font-size: 0.78rem;
}

.kofi-dialog__alt a {
	color: var(--paper-ink);
}
