/**
 * ================================
 * Sticky Edition CTA Full Width Styles
 * ================================
 */

/* Container principal du sticky CTA - positionnement sticky */
.sticky-edition-cta-fullwidth {
	position: sticky;
	top: 80px; /* Décalage fixe de 80px sous la navbar */
	left: 0;
	right: 0;
	width: 100%;
	max-height: 0;
	overflow: hidden;
	z-index: 50; /* Sous la navbar (100+), au-dessus du contenu */
	transition: max-height 0.3s ease-out,
	            opacity 0.3s ease-out,
	            visibility 0.3s ease-out;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	display: none; /* Masqué par défaut, n'apparaît qu'après scroll */
}

/* Quand le CTA est actif */
.sticky-edition-cta-fullwidth.active {
	display: block; /* Afficher seulement après scroll */
	max-height: 100px; /* Réduit à 80px + padding */
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Wrapper pour respecter le container */
.sticky-cta-fullwidth-wrapper {
	display: flex;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: white;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Container avec les mêmes margins que la page */
.sticky-cta-fullwidth-wrapper > .sticky-cta-fullwidth-content {
	width: 100%;
	max-width: var(--container-max-width, 1200px);
	padding: 0 var(--container-padding, 20px);
	margin: 0 auto;
}

/* Contenu du sticky CTA */
.sticky-cta-fullwidth-content {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 20px;
	animation: slideDown 0.3s ease-out;
	height: 80px;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Image du sticky CTA */
.sticky-cta-fullwidth-image {
	width: 80px;
	height: 80px;
	border-radius: 6px;
	background-size: cover;
	background-position: center;
	flex-shrink: 0;
}

/* Texte du sticky CTA */
.sticky-cta-fullwidth-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
	min-width: 0;
}

/* Titre du sticky CTA */
.sticky-cta-fullwidth-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	color: #333;
}

/* Lien du sticky CTA */
.sticky-cta-fullwidth-link {
	display: inline-block;
	font-size: 14px;
	font-weight: 600;
	color: white;
	background: #333;
	padding: 8px 16px;
	border-radius: 4px;
	text-decoration: none;
	transition: all 0.2s ease;
	text-align: center;
	width: fit-content;
	border: none;
	cursor: pointer;
	flex-shrink: 0;
}

.sticky-cta-fullwidth-link:hover {
	background: #000;
	transform: translateY(-2px);
}

/**
 * ================================
 * Modal / Popin Styles
 * ================================
 */

/* Overlay de la popin */
.sticky-cta-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 1000;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

/* Quand la popin est active */
.sticky-cta-modal.active {
	display: flex;
	opacity: 1;
	visibility: visible;
}

/* Contenu de la popin */
.sticky-cta-modal-content {
	position: relative;
	background: white;
	border-radius: 8px;
	padding: 32px;
	max-width: 400px;
	width: 90%;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	animation: popinSlideIn 0.3s ease-out;
}

@keyframes popinSlideIn {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Bouton close */
.sticky-cta-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	background: none;
	border: none;
	font-size: 28px;
	color: #999;
	cursor: pointer;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s ease;
}

.sticky-cta-modal-close:hover {
	color: #333;
}

/* Body de la popin */
.sticky-cta-modal-body {
	text-align: center;
}

.sticky-cta-modal-body h3 {
	margin: 0 0 12px 0;
	font-size: 18px;
	font-weight: 600;
	color: #333;
}

.sticky-cta-edition-name {
	margin: 0;
	font-size: 16px;
	color: #666;
	font-weight: 500;
}

/* Responsive : sur tablet */
@media (max-width: 768px) {
	.sticky-cta-fullwidth-content {
		gap: 12px;
		padding: 10px 16px;
		height: 90px;
	}
	
	.sticky-cta-fullwidth-image {
		width: 80px;
		height: 80px;
	}
	
	.sticky-cta-fullwidth-title {
		font-size: 14px;
	}
	
	.sticky-cta-fullwidth-link {
		font-size: 13px;
		padding: 6px 12px;
	}
}

/* Très petit écran - mobile */
@media (max-width: 480px) {
	.sticky-edition-cta-fullwidth.active {
		max-height: 150px;
	}
	
	.sticky-cta-fullwidth-content {
		gap: 10px;
		padding: 8px 12px;
		height: auto;
		flex-wrap: wrap;
	}
	
	.sticky-cta-fullwidth-image {
		width: 70px;
		height: 70px;
	}
	
	.sticky-cta-fullwidth-title {
		font-size: 13px;
		-webkit-line-clamp: 1;
	}
	
	.sticky-cta-fullwidth-link {
		font-size: 12px;
		padding: 5px 10px;
	}
}
