/* ═══════════════════════════════════════════
   Photo Interactive – th- prefix
   ═══════════════════════════════════════════ */

.th-wrapper {
	position: relative;
	width: 100%;
}

.th-container {
	position: relative;
	width: 100%;
}

.th-image {
	width: 100%;
	height: auto;
	display: block;
}

/* ── Hotspot (button reset + flex centering) ── */
.th-hotspot {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background-color: var(--th-color, #00ADEE);
	border: 3px solid #fff !important;
	border-radius: 50% !important;
	padding: 0 !important;
	margin: 0;
	cursor: pointer;
	z-index: 10;
	box-shadow: 0 4px 15px rgba(0, 173, 238, 0.35);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	-webkit-tap-highlight-color: transparent;
	-webkit-appearance: none;
	appearance: none;
	/* Centre le point sur les coordonnées X/Y */
	transform: translate(-50%, -50%);
}

.th-hotspot:hover {
	transform: translate(-50%, -50%) scale(1.1);
	box-shadow: 0 6px 20px rgba(0, 173, 238, 0.55);
}

.th-hotspot:focus,
.th-hotspot:active,
.th-hotspot:focus-visible {
	background-color: var(--th-color, #00ADEE) !important;
	outline: none !important;
	box-shadow: 0 4px 15px rgba(0, 173, 238, 0.35) !important;
}

/* Anneau pulsant */
.th-hotspot::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background-color: var(--th-color, #00ADEE);
	opacity: 0.6;
	animation: th-pulse 2s infinite;
	pointer-events: none;
	z-index: 0;
}

@keyframes th-pulse {
	0%   { transform: scale(1);   opacity: 0.6; }
	50%  { transform: scale(1.5); opacity: 0.2; }
	100% { transform: scale(1);   opacity: 0.6; }
}

/* + : croix CSS, positionnement absolu pour un centrage parfait quel que soit la police */
.th-plus {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 1;
	pointer-events: none;
	width: 14px;
	height: 14px;
	color: #fff;
	font-size: 0;
}

.th-plus::before,
.th-plus::after {
	content: '';
	position: absolute;
	background-color: currentColor;
	border-radius: 1px;
}

/* barre verticale */
.th-plus::before {
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	transform: translateX(-50%);
}

/* barre horizontale */
.th-plus::after {
	left: 0;
	right: 0;
	top: 50%;
	height: 2px;
	transform: translateY(-50%);
}

/* ── Popup desktop (positionnée par JS) ── */
.th-popup {
	position: absolute;
	background: #fff;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	z-index: 50;
	width: 320px;
	pointer-events: none;
}

.th-popup.th-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Flèche */
.th-popup::before {
	content: '';
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 0;
	height: 0;
	border-style: solid;
}

.th-popup--right::before {
	left: -10px;
	border-width: 10px 10px 10px 0;
	border-color: transparent #fff transparent transparent;
}

.th-popup--left::before {
	right: -10px;
	border-width: 10px 0 10px 10px;
	border-color: transparent transparent transparent #fff;
}

/* Contenu popup – typo héritée des globaux Elementor */
.th-popup h2 {
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid #00ADEE;
}

.th-popup .th-text p {
	margin: 8px 0 0;
}

.th-popup .th-text p:first-child {
	margin-top: 0;
}

/* ── Modal backdrop ── */
.th-modal-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
	z-index: 99998;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.th-modal-backdrop.th-show {
	opacity: 1;
}

/* ── Modal ── */
.th-modal {
	display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #fff;
	border-radius: 16px;
	padding: 30px 25px;
	width: 85vw;
	max-width: 500px;
	max-height: 75vh;
	overflow-y: auto;
	z-index: 99999;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.th-modal.th-show {
	display: block;
}

/* Bouton fermer */
.th-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	background-color: var(--th-color, #00ADEE);
	color: #fff;
	border: none !important;
	border-radius: 50% !important;
	padding: 0 !important;
	margin: 0;
	cursor: pointer;
	transition: opacity 0.2s ease;
	z-index: 1;
	-webkit-appearance: none;
	appearance: none;
}

/* Croix CSS dans le bouton fermer */
.th-close-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 12px;
	height: 12px;
	color: inherit;
	pointer-events: none;
}

.th-close-icon::before,
.th-close-icon::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 2px;
	background-color: currentColor;
	border-radius: 1px;
}

.th-close-icon::before { transform: translateY(-50%) rotate(45deg); }
.th-close-icon::after  { transform: translateY(-50%) rotate(-45deg); }

.th-close:hover {
	opacity: 0.8;
}

/* Contenu modal */
.th-modal-content h2 {
	margin: 0 0 12px;
	padding-bottom: 8px;
	padding-right: 40px;
	border-bottom: 2px solid #00ADEE;
}

.th-modal-content .th-text p {
	margin: 8px 0 0;
}

.th-modal-content .th-text p:first-child {
	margin-top: 0;
}

/* ── Responsive ── */
@media (max-width: 980px) {
	.th-popup {
		display: none !important;
	}

	.th-hotspot {
		width: 36px !important;
		height: 36px !important;
	}

	.th-plus {
		width: 12px !important;
		height: 12px !important;
	}

	.th-modal {
		width: 80vw;
		max-height: 70vh;
		padding: 28px 24px;
	}
}

@media (max-width: 767px) {
	.th-hotspot {
		width: 32px !important;
		height: 32px !important;
	}

	.th-plus {
		width: 10px !important;
		height: 10px !important;
	}

	.th-modal {
		width: 90vw;
		max-height: 80vh;
		padding: 22px 20px;
	}

	.th-close {
		width: 30px !important;
		height: 30px !important;
		top: 10px;
		right: 10px;
	}

	.th-close-icon {
		width: 10px !important;
		height: 10px !important;
	}
}
