/**
 * Kiosque — grille de numéros et bibliothèque.
 *
 * La couverture est l'élément qui vend un numéro : la grille lui donne
 * une proportion de vrai journal (2/3) et la laisse dominer la carte.
 */

.nkpw-kiosk {
	--nkpw-accent: #146B5E;
	--nkpw-muted: #5b6670;
	--nkpw-line: #e3e6e8;

	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 168px, 1fr ) );
	gap: 1.75rem 1.25rem;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}

.nkpw-kiosk__item {
	display: flex;
	flex-direction: column;
	margin: 0;
	text-align: left;
}

.nkpw-kiosk__cover {
	position: relative;
	aspect-ratio: 2 / 3;
	margin-bottom: .7rem;
	overflow: hidden;
	border: 1px solid var(--nkpw-line);
	border-radius: 3px;
	background: #f2f4f4;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, .1 ), 0 6px 14px rgba( 0, 0, 0, .06 );
}

.nkpw-kiosk__cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nkpw-kiosk__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: var(--nkpw-muted);
	font-size: 2.2em;
	font-weight: 700;
	text-transform: uppercase;
	opacity: .35;
}

.nkpw-kiosk__owned {
	position: absolute;
	top: .5rem;
	left: .5rem;
	padding: .2em .6em;
	border-radius: 3px;
	background: var(--nkpw-accent);
	color: #fff;
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
}

.nkpw-kiosk__title {
	margin: 0 0 .2rem;
	font-size: .98em;
	line-height: 1.3;
}

.nkpw-kiosk__meta {
	margin: 0 0 .5rem;
	color: var(--nkpw-muted);
	font-size: .8em;
}

.nkpw-kiosk__price {
	margin: auto 0 .5rem;
	font-size: 1.15em;
	font-weight: 700;
}

.nkpw-kiosk__buy {
	width: 100%;
	padding: .6rem 1rem;
	border: 1px solid var(--nkpw-accent);
	border-radius: 4px;
	background: transparent;
	color: var(--nkpw-accent);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}

.nkpw-kiosk__buy:hover,
.nkpw-kiosk__buy:focus-visible {
	background: var(--nkpw-accent);
	color: #fff;
}

.nkpw-kiosk__actions {
	display: flex;
	align-items: center;
	gap: .75rem;
	margin-top: auto;
	padding-top: .3rem;
}

.nkpw-kiosk__read {
	flex: 1;
	padding: .55rem .8rem;
	border-radius: 4px;
	background: var(--nkpw-accent);
	color: #fff;
	font-size: .9em;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
}

.nkpw-kiosk__read:hover,
.nkpw-kiosk__read:focus-visible {
	filter: brightness( 1.12 );
	color: #fff;
}

.nkpw-kiosk__download {
	color: var(--nkpw-muted);
	font-size: .82em;
	text-decoration: underline;
	white-space: nowrap;
}

.nkpw-kiosk__empty {
	padding: 1.5rem;
	border: 1px dashed var(--nkpw-line, #e3e6e8);
	border-radius: 5px;
	color: #5b6670;
	text-align: center;
}

.nkpw-kiosk__gate {
	padding: 1.5rem;
	border: 1px solid #e3e6e8;
	border-radius: 5px;
	background: #f5f7f7;
	text-align: center;
}

.nkpw-kiosk__gate .nkpw__pay {
	display: inline-block;
	width: auto;
	min-width: 200px;
	text-decoration: none;
}

.nkpw-kiosk__checkout {
	max-width: 460px;
	margin-inline: auto;
}

.nkpw-kiosk__checkout[hidden] {
	display: none;
}

/* Achat en un clic : les champs déjà connus ne sont pas réaffichés,
   seul le retour d'état reste visible. */
.nkpw-kiosk__checkout--direct .nkpw__field,
.nkpw-kiosk__checkout--direct .nkpw__form-title,
.nkpw-kiosk__checkout--direct .nkpw__pay {
	display: none;
}

.nkpw-kiosk__checkout--direct {
	max-width: 460px;
	padding: 0;
	border: 0;
	background: none;
}

@media ( max-width: 480px ) {
	.nkpw-kiosk {
		grid-template-columns: repeat( 2, 1fr );
		gap: 1.4rem .9rem;
	}

	.nkpw-kiosk__actions {
		flex-direction: column;
		align-items: stretch;
		gap: .4rem;
	}

	.nkpw-kiosk__download {
		text-align: center;
	}
}
