/**
 * Reader Styles - Glassmorphisme Vigiline
 *
 * @package Vigiline_Dashboard_Catalogue
 */

:root {
	--vigiline-red: #E31E24;
	--vigiline-blue: #003DA5;
	--vigiline-dark: #1a1a1a;
	--vigiline-light: #ffffff;
	--glass-bg: rgba(255, 255, 255, 0.1);
	--glass-border: rgba(255, 255, 255, 0.2);
	--glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
	--glass-blur: 10px;
}

/* Reader Container */
.vigi-reader {
	position: relative;
	width: 100%;
	min-height: 100vh;
	background: linear-gradient(135deg,
		rgba(227, 30, 36, 0.05) 0%,
		rgba(0, 61, 165, 0.05) 100%
	);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

/* Reader mode landing - pas de min-height et hauteur max 600px desktop */
.vigi-reader:not(:fullscreen) {
	min-height: 0;
	max-height: 600px;
}

/* Fond gradient bleu-rouge Vigiline subtil en mode plein écran */
.vigi-reader:fullscreen {
	background: linear-gradient(135deg,
		#003DA5 0%,           /* Bleu Vigiline pur */
		#1a2d6f 50%,          /* Bleu-violet central */
		#4a1a1f 100%          /* Rouge très sombre (30% du rouge Vigiline) */
	);
}

/* Header Glassmorphisme - Apple style */
.vigi-reader-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 70px;
	z-index: 100;
	background: rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.5) inset,
	            0 1px 3px rgba(0, 0, 0, 0.04);
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 30px;
}

/* TOUJOURS masquer le header (hors plein écran) */
.vigi-reader:not(:fullscreen) .vigi-reader-header {
	display: none !important;
}

/* Afficher le header en mode plein écran */
.vigi-reader:fullscreen .vigi-reader-header {
	display: flex;
}

.vigi-logo {
	font-size: 24px;
	font-weight: 700;
	color: var(--vigiline-red);
	letter-spacing: -0.5px;
	display: flex;
	align-items: center;
}

.vigi-logo-img {
	max-height: 50px;
	width: auto;
	object-fit: contain;
}

.vigi-actions {
	display: flex;
	gap: 12px;
	align-items: center;
}

/* Buttons */
.vigi-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: none;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	background: var(--glass-bg);
	backdrop-filter: blur(var(--glass-blur));
	border: 1px solid var(--glass-border);
	color: var(--vigiline-dark);
}

.vigi-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
	text-decoration: none;
}

.vigi-btn svg {
	flex-shrink: 0;
}

.vigi-btn-contact {
	background: linear-gradient(135deg, var(--vigiline-red), #ff4444);
	color: white;
	border: none;
	text-decoration: none !important;
}

.vigi-btn-contact:hover {
	text-decoration: none !important;
}

.vigi-btn-whatsapp {
	background: linear-gradient(135deg, #25D366, #128C7E);
	color: white;
	border: none;
	text-decoration: none !important;
}

.vigi-btn-whatsapp:hover {
	text-decoration: none !important;
}

.vigi-btn-print,
.vigi-btn-fullscreen {
	background: var(--glass-bg);
	color: var(--vigiline-dark);
}

/* Viewport - Centrage automatique responsive */
.vigi-reader-viewport {
	flex: 1;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 0;
	min-height: 100vh;
	position: relative;
}

/* Viewport mode landing - Structure pour centrage absolu du hint */
.vigi-reader:not(:fullscreen) .vigi-reader-viewport {
	padding: 0;
	min-height: 0;
	height: auto;
	max-height: 600px;
	flex-direction: column;
	justify-content: flex-start;
	align-items: stretch;
}

/* Wrapper image + hint - Position relative pour centrage du bouton */
.vigi-image-wrapper {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
}

.vigi-reader:fullscreen .vigi-image-wrapper {
	display: contents;
}

/* Image desktop - Centrée dans le wrapper */
.vigi-reader:not(:fullscreen) .vigi-page-image {
	display: block;
	margin: 0 auto;
}

/* Viewport en mode plein écran - Padding automatique responsive */
.vigi-reader:fullscreen .vigi-reader-viewport {
	padding: 0 20px;
	min-height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
}

.vigi-page-image {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
	transition: opacity 0.3s ease, transform 0.3s ease;
	cursor: pointer;
	transform-origin: center center;
}

/* Image landing - Supprimer marges et limiter hauteur */
.vigi-reader:not(:fullscreen) .vigi-page-image {
	display: block !important;
	margin: 0 !important;
	max-height: 600px !important;
}

/* Hover seulement hors plein écran (mode landing) */
.vigi-reader:not(:fullscreen) .vigi-page-image {
	cursor: pointer;
	transition: all 0.3s ease;
}

.vigi-reader:not(:fullscreen) .vigi-page-image:hover {
	transform: scale(1.02);
	box-shadow: 0 30px 80px rgba(227, 30, 36, 0.3);
}

/* Hover en plein écran (normal) */
.vigi-reader:fullscreen .vigi-page-image:hover {
	box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
}

/* Image en plein écran - Hauteur adaptative */
.vigi-reader:fullscreen .vigi-page-image {
	max-height: calc(100vh - 140px);
	max-width: calc(100vw - 40px);
}

/* === ANIMATIONS SLIDE HORIZONTAL - Style Moderne === */

/* Viewport en mode transition - overflow hidden seulement pendant l'animation */
.vigi-reader-viewport.page-slide-next,
.vigi-reader-viewport.page-slide-prev {
	overflow: hidden;
}

/* Animation slide vers la page suivante (depuis la droite) */
@keyframes slideInRight {
	from {
		transform: translateX(100%);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

@keyframes slideOutLeft {
	from {
		transform: translateX(0);
		opacity: 1;
	}
	to {
		transform: translateX(-100%);
		opacity: 0;
	}
}

/* Animation slide vers la page précédente (depuis la gauche) */
@keyframes slideInLeft {
	from {
		transform: translateX(-100%);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

@keyframes slideOutRight {
	from {
		transform: translateX(0);
		opacity: 1;
	}
	to {
		transform: translateX(100%);
		opacity: 0;
	}
}

/* Page suivante : nouvelle page entre depuis la droite */
.vigi-reader-viewport.page-slide-next .vigi-page-image {
	animation: slideInRight 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Page précédente : nouvelle page entre depuis la gauche */
.vigi-reader-viewport.page-slide-prev .vigi-page-image {
	animation: slideInLeft 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* === ZOOM CONTROLS - Style Apple minimaliste === */

.vigi-zoom-controls {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	padding: 4px 10px;
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	border-radius: 20px;
	border: 0.5px solid rgba(0, 0, 0, 0.1);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08),
	            inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.vigi-zoom-btn {
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: rgba(0, 0, 0, 0.85);
	font-size: 20px;
	font-weight: 300;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s ease;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Hover effect */
.vigi-zoom-btn:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.95);
	color: var(--vigiline-blue);
	transform: scale(1.08);
	box-shadow: 0 2px 8px rgba(0, 61, 165, 0.15);
}

/* Active/Click effect */
.vigi-zoom-btn:active:not(:disabled) {
	transform: scale(0.92);
	background: rgba(0, 0, 0, 0.12);
}

/* Disabled state */
.vigi-zoom-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

/* Zoom level indicator */
.vigi-zoom-level {
	font-size: 13px;
	font-weight: 600;
	color: rgba(0, 0, 0, 0.75);
	text-align: center;
	min-width: 48px;
	letter-spacing: -0.3px;
	font-variant-numeric: tabular-nums;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.vigi-loading {
	text-align: center;
	color: var(--vigiline-dark);
}

/* Landing hint - Message d'invitation au clic CLICABLE */
.vigi-landing-hint {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	padding: 14px 32px;
	background: rgba(227, 30, 36, 0.95);
	color: white;
	border-radius: 25px;
	font-size: 18px;
	font-weight: 600;
	box-shadow: 0 8px 24px rgba(227, 30, 36, 0.4);
	z-index: 50;
	opacity: 0;
	animation: fadeInBounce 0.6s ease forwards 0.5s;
	pointer-events: auto;
	cursor: pointer;
	backdrop-filter: blur(10px);
	width: fit-content;
	text-align: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vigi-landing-hint:hover {
	transform: translate(-50%, -50%) scale(1.05);
	box-shadow: 0 12px 32px rgba(227, 30, 36, 0.5);
}

/* Masquer texte mobile par défaut */
.vigi-landing-hint-mobile {
	display: none;
}

.vigi-landing-hint p {
	margin: 0;
	text-align: center;
	line-height: 1.4;
}

/* Masquer le hint en mode plein écran */
.vigi-reader:fullscreen .vigi-landing-hint {
	display: none;
}

/* Animation apparition du hint */
@keyframes fadeInBounce {
	0% {
		opacity: 0;
		transform: translateX(-50%) translateY(20px);
	}
	60% {
		opacity: 1;
		transform: translateX(-50%) translateY(-5px);
	}
	100% {
		opacity: 1;
		transform: translateX(-50%) translateY(0);
	}
}

.vigi-spinner {
	width: 50px;
	height: 50px;
	border: 4px solid rgba(227, 30, 36, 0.1);
	border-top-color: var(--vigiline-red);
	border-radius: 50%;
	animation: vigi-spin 0.8s linear infinite;
	margin: 0 auto 20px;
}

@keyframes vigi-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Footer - Apple style */
.vigi-reader-footer {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	height: 70px;
	z-index: 100;
	background: rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	border-top: 0.5px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 -1px 0 0 rgba(255, 255, 255, 0.5) inset,
	            0 -1px 3px rgba(0, 0, 0, 0.04);
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 30px;
	gap: 20px;
}

/* TOUJOURS masquer le footer (hors plein écran) */
.vigi-reader:not(:fullscreen) .vigi-reader-footer {
	display: none !important;
}

/* Afficher le footer en mode plein écran */
.vigi-reader:fullscreen .vigi-reader-footer {
	display: flex;
}

.vigi-nav-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	border: none;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	background: linear-gradient(135deg, var(--vigiline-blue), #0055cc);
	color: white;
	transition: all 0.3s ease;
}

.vigi-nav-btn:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 12px 24px rgba(0, 61, 165, 0.3);
}

.vigi-nav-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.vigi-page-counter {
	font-size: 14px;
	font-weight: 600;
	color: rgba(0, 0, 0, 0.85);
	padding: 8px 20px;
	background: rgba(255, 255, 255, 0.75);
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	border-radius: 20px;
	border: 0.5px solid rgba(255, 255, 255, 0.3);
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08),
	            0 1px 3px rgba(0, 0, 0, 0.04),
	            inset 0 0 0 0.5px rgba(255, 255, 255, 0.5);
	letter-spacing: -0.2px;
	font-variant-numeric: tabular-nums;
}

.vigi-page-counter .vigi-current {
	color: var(--vigiline-red);
	font-weight: 700;
	font-size: 15px;
}

/* Desktop - Force comportement max-height */
@media (min-width: 769px) {
	.vigi-reader:fullscreen .vigi-page-image {
		width: auto;
		height: auto;
		max-height: calc(100vh - 160px);
		max-width: 100%;
	}
}

/* Responsive Mobile */
@media (max-width: 768px) {
	.vigi-reader-header {
		height: 60px;
		padding: 0 15px;
	}

	.vigi-reader-footer {
		height: 60px;
		padding: 0 10px;
		gap: 8px;
		justify-content: space-between;
		align-items: center;
	}

	.vigi-logo {
		font-size: 20px;
	}

	.vigi-logo-img {
		max-height: 40px;
	}

	.vigi-actions {
		gap: 8px;
	}

	.vigi-btn {
		padding: 8px 12px;
		font-size: 13px;
	}

	.vigi-btn-text {
		display: none;
	}

	/* Reader et viewport mobile - Mode landing sans espace vide */
	.vigi-reader:not(:fullscreen) {
		min-height: 0;
		height: auto;
	}

	.vigi-reader:not(:fullscreen) .vigi-reader-viewport {
		padding: 0;
		min-height: 0;
		height: auto;
		justify-content: flex-start;
		align-items: stretch;
	}

	/* Viewport mobile - Mode plein écran responsive */
	.vigi-reader:fullscreen .vigi-reader-viewport {
		padding: 0 10px;
		min-height: 100vh;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	/* Wrapper image mobile - Pas de hauteur forcée */
	.vigi-reader:not(:fullscreen) .vigi-image-wrapper {
		display: block;
		width: 100%;
		height: auto;
		position: relative;
	}

	/* Image mobile - Mode landing (largeur 100%, hauteur auto) */
	.vigi-reader:not(:fullscreen) .vigi-page-image {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		height: auto !important;
		max-height: none !important;
		border-radius: 0;
		object-fit: contain;
		margin: 0;
	}

	/* Image mobile - Mode plein écran prend toute la largeur */
	.vigi-reader:fullscreen .vigi-page-image {
		width: 100% !important;
		max-width: 100% !important;
		height: auto !important;
		max-height: calc(100vh - 120px) !important;
		object-fit: contain;
	}

	/* Navigation buttons - fins et modernes, bien centrés */
	.vigi-nav-btn {
		background: linear-gradient(135deg, var(--vigiline-blue), #0055cc) !important;
		padding: 0;
		width: 42px;
		height: 42px;
		min-width: 42px;
		border-radius: 10px;
		box-shadow: 0 2px 6px rgba(0, 61, 165, 0.25);
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.vigi-nav-btn .vigi-nav-icon {
		font-size: 28px;
		color: white;
		line-height: 1;
		font-weight: 400;
		display: block;
	}

	.vigi-nav-btn .vigi-nav-text {
		display: none;
	}

	.vigi-nav-btn:hover:not(:disabled) {
		background: linear-gradient(135deg, #0055cc, #003da5) !important;
		transform: scale(1.05);
		box-shadow: 0 3px 10px rgba(0, 61, 165, 0.35);
	}

	.vigi-nav-btn:disabled {
		opacity: 0.4;
		cursor: not-allowed;
	}

	/* Compteur de pages - compact, sans fond blanc */
	.vigi-page-counter {
		padding: 6px 10px;
		font-size: 14px;
		flex-shrink: 0;
		background: transparent !important;
		border: none;
		box-shadow: none;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
	}

	.vigi-page-counter .vigi-page-text {
		display: none;
	}

	.vigi-page-counter .vigi-current {
		font-weight: 700;
		color: var(--vigiline-red);
	}

	/* Zoom controls mobile - SANS fond, légers et discrets */
	.vigi-zoom-controls {
		gap: 4px;
		padding: 0;
		background: transparent;
		border: none;
		box-shadow: none;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
		display: flex;
		align-items: center;
	}

	.vigi-zoom-btn {
		width: 28px;
		height: 28px;
		font-size: 20px;
		background: transparent !important;
		border-radius: 6px;
		color: white;
		font-weight: 400;
		display: flex;
		align-items: center;
		justify-content: center;
		line-height: 1;
	}

	.vigi-zoom-btn:hover:not(:disabled) {
		background: rgba(255, 255, 255, 0.2) !important;
		transform: scale(1.08);
		box-shadow: none;
	}

	.vigi-zoom-level {
		font-size: 12px;
		min-width: 36px;
		color: white;
		font-weight: 600;
		text-align: center;
	}

	/* Landing hint mobile - Centré sur l'image */
	.vigi-reader:not(:fullscreen) .vigi-landing-hint {
		position: absolute !important;
		top: 50% !important;
		left: 50% !important;
		transform: translate(-50%, -50%) !important;
		width: auto !important;
		border-radius: 25px !important;
		padding: 12px 24px !important;
		font-size: 15px !important;
		text-align: center !important;
		margin: 0 !important;
	}

	/* Afficher texte court mobile */
	.vigi-landing-hint-mobile {
		display: block;
	}

	/* Masquer texte long desktop */
	.vigi-landing-hint-desktop {
		display: none;
	}
}

@media (max-width: 480px) {
	.vigi-reader-header {
		height: 50px;
		padding: 0 10px;
	}

	.vigi-reader-footer {
		height: 55px;
		padding: 0 8px;
		gap: 6px;
		justify-content: space-between;
		align-items: center;
	}

	.vigi-btn {
		padding: 6px 10px;
	}

	.vigi-nav-btn {
		background: linear-gradient(135deg, var(--vigiline-blue), #0055cc) !important;
		padding: 0;
		width: 38px;
		height: 38px;
		min-width: 38px;
		border-radius: 9px;
		box-shadow: 0 2px 6px rgba(0, 61, 165, 0.25);
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.vigi-nav-btn .vigi-nav-icon {
		font-size: 24px;
		color: white;
		line-height: 1;
		font-weight: 400;
		display: block;
	}

	.vigi-nav-btn .vigi-nav-text {
		display: none;
	}

	.vigi-nav-btn:hover:not(:disabled) {
		background: linear-gradient(135deg, #0055cc, #003da5) !important;
		transform: scale(1.05);
		box-shadow: 0 3px 10px rgba(0, 61, 165, 0.35);
	}

	.vigi-nav-btn:disabled {
		opacity: 0.4;
		cursor: not-allowed;
	}

	.vigi-page-counter {
		padding: 5px 8px;
		font-size: 13px;
		flex-shrink: 0;
		background: transparent !important;
		border: none;
		box-shadow: none;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
	}

	.vigi-page-counter .vigi-page-text {
		display: none;
	}

	.vigi-page-counter .vigi-current {
		font-weight: 700;
		color: var(--vigiline-red);
	}

	/* Zoom controls mobile très petit - SANS fond, légers */
	.vigi-zoom-controls {
		gap: 3px;
		padding: 0;
		background: transparent;
		border: none;
		box-shadow: none;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
		display: flex;
		align-items: center;
	}

	.vigi-zoom-btn {
		width: 26px;
		height: 26px;
		font-size: 18px;
		background: transparent !important;
		border-radius: 6px;
		color: white;
		font-weight: 400;
		display: flex;
		align-items: center;
		justify-content: center;
		line-height: 1;
	}

	.vigi-zoom-btn:hover:not(:disabled) {
		background: rgba(255, 255, 255, 0.2) !important;
		transform: scale(1.08);
		box-shadow: none;
	}

	.vigi-zoom-level {
		font-size: 11px;
		min-width: 34px;
		color: white;
		font-weight: 600;
		text-align: center;
	}

	/* Reader et viewport mobile très petit - Mode landing sans espace */
	.vigi-reader:not(:fullscreen) {
		min-height: 0;
		height: auto;
	}

	.vigi-reader:not(:fullscreen) .vigi-reader-viewport {
		padding: 0 !important;
		min-height: 0;
		height: auto;
	}

	/* Wrapper image mobile très petit */
	.vigi-reader:not(:fullscreen) .vigi-image-wrapper {
		display: block;
		width: 100%;
		height: auto;
		position: relative;
	}

	/* Viewport mobile très petit - Mode plein écran responsive */
	.vigi-reader:fullscreen .vigi-reader-viewport {
		padding: 0 5px;
		min-height: 100vh;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	/* Image mobile très petit - Pleine largeur sans hauteur forcée */
	.vigi-reader:not(:fullscreen) .vigi-page-image {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		height: auto !important;
		max-height: none !important;
		object-fit: contain;
		margin: 0;
	}

	/* Image mobile très petit - Mode plein écran prend toute la largeur */
	.vigi-reader:fullscreen .vigi-page-image {
		width: 100% !important;
		max-width: 100% !important;
		height: auto !important;
		max-height: calc(100vh - 110px) !important;
		object-fit: contain;
	}

	/* Landing hint très petit écran - Centré sur l'image */
	.vigi-reader:not(:fullscreen) .vigi-landing-hint {
		position: absolute !important;
		top: 50% !important;
		left: 50% !important;
		transform: translate(-50%, -50%) !important;
		width: auto !important;
		border-radius: 20px !important;
		padding: 10px 20px !important;
		font-size: 14px !important;
		text-align: center !important;
		margin: 0 !important;
	}

	/* Afficher texte court mobile */
	.vigi-landing-hint-mobile {
		display: block;
	}

	/* Masquer texte long desktop */
	.vigi-landing-hint-desktop {
		display: none;
	}
}

/* CSS Fullscreen mode for iOS */
.vigi-reader.vigi-css-fullscreen {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	max-height: 100vh !important;
	min-height: 100vh !important;
	margin: 0 !important;
	padding: 0 !important;
	z-index: 2147483647 !important; /* Maximum z-index */
	background: linear-gradient(135deg,
		#003DA5 0%,
		#1a2d6f 50%,
		#4a1a1f 100%
	) !important;
	overflow: hidden !important;
	display: flex !important;
	flex-direction: column !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* Bloquer scroll du body quand en mode CSS fullscreen */
body:has(.vigi-css-fullscreen) {
	overflow: hidden !important;
	position: fixed !important;
	width: 100% !important;
}

/* Viewport en mode CSS fullscreen */
.vigi-css-fullscreen .vigi-reader-viewport {
	flex: 1 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

/* Image visible en mode CSS fullscreen */
.vigi-css-fullscreen .vigi-page-image {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* Controls visibles en mode CSS fullscreen */
.vigi-css-fullscreen .vigi-reader-header,
.vigi-css-fullscreen .vigi-reader-footer {
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* Print Styles */
@media print {
	.vigi-reader-header,
	.vigi-reader-footer {
		display: none;
	}

	.vigi-reader-viewport {
		padding: 0;
	}

	.vigi-page-image {
		max-width: 100%;
		max-height: none;
		box-shadow: none;
	}
}

/* ============================================
   iOS EXPANDED MODE (PLAN B)
   Solution simple pour contourner les limitations iOS
   ============================================ */

/* Reader en mode expanded iOS */
.vigi-reader.vigi-ios-expanded {
	position: relative !important;
	width: 100vw !important;
	min-height: 100vh !important;
	min-height: 100dvh !important; /* iOS 15.4+ */
	min-height: -webkit-fill-available !important; /* iOS ancien */
}

/* Viewport en mode expanded */
.vigi-reader.vigi-ios-expanded .vigi-reader-viewport {
	min-height: calc(100vh - 120px) !important;
	min-height: calc(100dvh - 120px) !important;
	padding: 65px 10px !important;
}

/* Image en mode expanded */
.vigi-reader.vigi-ios-expanded .vigi-page-image {
	width: 100% !important;
	height: auto !important;
	max-height: calc(100vh - 130px) !important;
	max-height: calc(100dvh - 130px) !important;
	object-fit: contain !important;
}

/* Header en mode expanded */
.vigi-reader.vigi-ios-expanded .vigi-reader-header {
	position: sticky !important;
	top: 0 !important;
	z-index: 10 !important;
	background: rgba(0, 0, 0, 0.8) !important;
}

/* Footer en mode expanded */
.vigi-reader.vigi-ios-expanded .vigi-reader-footer {
	position: sticky !important;
	bottom: 0 !important;
	z-index: 10 !important;
	background: rgba(0, 0, 0, 0.8) !important;
}

/* Mobile small optimisations */
@media (max-width: 480px) {
	.vigi-reader.vigi-ios-expanded .vigi-reader-viewport {
		padding: 55px 5px !important;
		min-height: calc(100vh - 100px) !important;
		min-height: calc(100dvh - 100px) !important;
	}

	.vigi-reader.vigi-ios-expanded .vigi-page-image {
		max-height: calc(100vh - 110px) !important;
		max-height: calc(100dvh - 110px) !important;
	}
}

/* Empêcher le scroll du body quand expanded */
body:has(.vigi-ios-expanded) {
	overflow: hidden !important;
}

/* Fallback pour navigateurs sans :has() */
body.vigi-ios-fullscreen-active {
	overflow: hidden !important;
}
