/**
 * Styles pour les popups front-end
 * 
 * @package AirZen_Popups
 */

.airzen-popup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.airzen-popup.active {
	opacity: 1;
	visibility: visible;
}

.popup-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(2px);
	cursor: pointer;
}

.popup-container {
	position: relative;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	max-width: 90%;
	max-height: 90vh;
	width: 100%;
	max-width: 600px;
	overflow: hidden;
	transform: scale(0.9);
	transition: transform 0.3s ease;
	z-index: 1;
}

.airzen-popup.active .popup-container {
	transform: scale(1);
}

.popup-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 32px;
	height: 32px;
	border: none;
	background: rgba(0, 0, 0, 0.1);
	border-radius: 50%;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	transition: background 0.2s ease;
}

.popup-close:hover {
	background: rgba(0, 0, 0, 0.2);
}

.popup-close:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

/* Image de la popup */
.popup-image {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 8px 8px 0 0;
	object-fit: cover;
	max-height: 250px;
}

.popup-content {
	padding: 30px;
	overflow-y: auto;
	max-height: calc(90vh - 60px);
}

/* Titre de la popup */
.popup-title {
	margin: 0 0 15px 0;
	font-size: 1.75rem;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.3;
}

/* Description de la popup */
.popup-description {
	font-size: 1rem;
	line-height: 1.7;
	color: #555;
	margin-bottom: 20px;
}

.popup-description p {
	margin: 0 0 12px 0;
}

.popup-description p:last-child {
	margin-bottom: 0;
}

.popup-description a {
	color: #5A00D2;
	text-decoration: underline;
}

.popup-description a:hover {
	color: #3d008f;
}

/* Bouton CTA */
.popup-cta-btn {
	display: inline-block;
	margin-top: 20px;
	padding: 14px 28px;
	background: linear-gradient(135deg, #5A00D2 0%, #7B2FE0 100%);
	color: #fff;
	text-decoration: none;
	border-radius: 8px;
	font-weight: 600;
	font-size: 1rem;
	text-align: center;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(90, 0, 210, 0.3);
}

.popup-cta-btn:hover {
	background: linear-gradient(135deg, #4a00b2 0%, #6a1fd0 100%);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(90, 0, 210, 0.4);
	color: #fff;
}

.popup-cta-btn:focus {
	outline: 2px solid #5A00D2;
	outline-offset: 2px;
}

/* Ancien style CTA (rétrocompatibilité) */
.popup-cta-link {
	display: inline-block;
	margin-top: 20px;
	padding: 12px 24px;
	background: #5A00D2;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	transition: background 0.2s ease;
}

.popup-cta-link:hover {
	background: #4a00b2;
}

.popup-cta-link:focus {
	outline: 2px solid #5A00D2;
	outline-offset: 2px;
}

/* Legacy: popup-body pour rétrocompatibilité */
.popup-body {
	font-size: 16px;
	line-height: 1.6;
	color: #333;
}

.popup-body h1,
.popup-body h2,
.popup-body h3 {
	margin-top: 0;
	margin-bottom: 15px;
}

.popup-body p {
	margin-bottom: 15px;
}

.popup-body img {
	max-width: 100%;
	height: auto;
}

.popup-never-again {
	display: block;
	margin-top: 20px;
	padding-top: 15px;
	border-top: 1px solid #eee;
	font-size: 14px;
	color: #666;
}

.popup-never-again input[type="checkbox"] {
	margin-right: 8px;
}

/* Responsive */
@media (max-width: 768px) {
	.popup-container {
		max-width: 95%;
		margin: 20px;
	}
	
	.popup-image {
		max-height: 180px;
	}
	
	.popup-content {
		padding: 20px;
	}
	
	.popup-title {
		font-size: 1.4rem;
	}
	
	.popup-description {
		font-size: 0.9rem;
	}
	
	.popup-cta-btn {
		padding: 12px 24px;
		font-size: 0.9rem;
		width: 100%;
		box-sizing: border-box;
	}
	
	.popup-body {
		font-size: 14px;
	}
}

/* Accessibilité : focus visible */
.airzen-popup *:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

/* Animation d'entrée */
@keyframes popupFadeIn {
	from {
		opacity: 0;
		transform: scale(0.9);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.airzen-popup.active .popup-container {
	animation: popupFadeIn 0.3s ease;
}

