/* Visionneuse des photos d'un article sur téléphone (js/visionneuse.js, chargée par article-generator.php) : plein écran,
   calque OPAQUE de la couleur du fond (#f2f2f2) — un voile sombre ferait clignoter les barres de Safari iOS.
   Intertitre de la partie en haut, photo, vignettes du groupe, « Revenir au texte ». */

#vnDialog {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0 0 env(safe-area-inset-bottom);
	box-sizing: border-box;
	border: 0;
	background: #f2f2f2;
	color: #333;
	font-family: 'Source Sans Pro', sans-serif;
	overflow: hidden;
	overscroll-behavior: none;
	outline: none;
}
#vnDialog[open] {
	display: flex;
	flex-direction: column;
}
#vnDialog::backdrop {
	background: transparent;
}
html.vnOuverte { /* Le texte ne défile pas sous la visionneuse */
	overflow: hidden;
}
#vnDialog button {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	color: #222;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
#vnDialog svg {
	display: block;
}


/* En-tête : intertitre de la partie, et « Défilés P/E 2027 · 1 / 4 » */

#vnTete {
	flex: none;
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 56px;
	box-sizing: border-box;
	padding: calc(6px + env(safe-area-inset-top)) 4px 6px 20px;
}
#vnTitres {
	flex-grow: 1;
	min-width: 0;
}
#vnTitre {
	font-size: 20px;
	line-height: 24px;
	font-weight: 700;
	color: #222;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}
#vnSousTitre {
	font-size: 14px;
	line-height: 18px;
	color: #666;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}
#vnSousTitre:empty {
	display: none;
}
#vnFermer {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
}


/* Photo : une piste de diapos qui glisse (translateX posé par le script) */

#vnScene {
	position: relative;
	flex: 1 1 0;
	min-height: 0;
	overflow: hidden;
	touch-action: pan-y pinch-zoom; /* Le glissement horizontal est pour le script */
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
}
#vnPiste {
	display: flex;
	height: 100%;
	transition: transform .3s ease;
}
#vnPiste.vnSansAnimation {
	transition: none;
}
.vnDiapo {
	flex: 0 0 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}
.vnDiapo img {
	display: block;
	max-width: 100%;
	max-height: 100%;
}
#vnDialog .vnFleche {
	position: absolute;
	top: 50%;
	margin-top: -22px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .9);
	box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
	display: flex;
	align-items: center;
	justify-content: center;
}
#vnDialog .vnFleche[hidden] {
	display: none;
}
.vnFleche svg {
	width: 20px;
	height: 20px;
}
#vnPrec {
	left: 8px;
}
#vnSuiv {
	right: 8px;
}


/* Vignettes du groupe (défilent si elles ne tiennent pas), puis le bouton du bas */

#vnVignettes {
	flex: none;
	display: flex;
	justify-content: safe center;
	gap: 10px;
	padding: 14px 16px 6px; /* 6 px en bas : le cadre orange (outline 2 px à 2 px du bord) serait rogné par overflow-x */
	overflow-x: auto;
	scrollbar-width: none;
}
#vnVignettes::-webkit-scrollbar {
	display: none;
}
#vnVignettes button {
	flex: none;
	border-radius: 2px;
	outline: 2px solid transparent;
	outline-offset: 2px;
	opacity: .5;
}
#vnVignettes button.vnActive {
	outline-color: #ebac00;
	opacity: 1;
}
#vnVignettes img {
	display: block;
	width: 46px;
	height: 60px;
	object-fit: cover;
	border-radius: 2px;
}
#vnDialog #vnRetour {
	flex: none;
	display: flex;
	align-items: center;
	gap: 4px;
	min-height: 44px;
	margin: 10px auto 8px;
	padding: 0 16px;
	font-size: 15px;
	font-weight: 600;
}
#vnRetour svg {
	width: 18px;
	height: 18px;
}
#vnDialog.vnSeule #vnVignettes, #vnDialog.vnSeule .vnFleche {
	display: none;
}


/* Au retour dans le texte, le lien de la dernière photo vue est surligné un instant */

a.preview {
	transition: background-color .6s, box-shadow .6s;
	border-radius: 3px;
}
a.preview.vnVu {
	background-color: #fbebc5;
	box-shadow: 0 0 0 2px #fbebc5;
	transition: none;
}
