/**
 * NOVA Carousel Widget Styles
 * Complete and Professional Configuration
 */

/* ============================================
   MAIN WIDGET CONTAINER
   ============================================ */

.nova-carousel-widget {
	width: 100%;
	position: relative;
	box-sizing: border-box;
}

/* ============================================
   CONTAINER LAYOUT
   ============================================ */

.nova-carousel-container {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: stretch;
	justify-content: space-between;
	gap: 40px;
	width: 100%;
	box-sizing: border-box;
}

/* Permettre au padding Elementor de s'appliquer avec une spécificité plus élevée */
.elementor-element .nova-carousel-container {
	/* Le padding sera défini par Elementor - cette règle permet de s'assurer qu'il s'applique */
}

.nova-carousel-container>* {
	height: auto !important;
}

/* When content is hidden, slider takes full width */
.nova-carousel-slider.full-width {
	width: 100% !important;
	flex: 1 1 100% !important;
	max-width: 100% !important;
}

/* ============================================
   GRID MODE
   ============================================ */

.nova-carousel-grid {
	display: grid;
	/* Default fallback - will be overridden by data-grid-columns or JavaScript */
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	width: 100%;
	box-sizing: border-box;
}

/* CSS fallback using data attribute - applies when inline styles are removed by Elementor */
.nova-carousel-grid[data-grid-columns="1"] {
	grid-template-columns: repeat(1, 1fr) !important;
}

.nova-carousel-grid[data-grid-columns="2"] {
	grid-template-columns: repeat(2, 1fr) !important;
}

.nova-carousel-grid[data-grid-columns="3"] {
	grid-template-columns: repeat(3, 1fr) !important;
}

.nova-carousel-grid[data-grid-columns="4"] {
	grid-template-columns: repeat(4, 1fr) !important;
}

.nova-carousel-grid[data-grid-columns="5"] {
	grid-template-columns: repeat(5, 1fr) !important;
}

.nova-carousel-grid[data-grid-columns="6"] {
	grid-template-columns: repeat(6, 1fr) !important;
}

.nova-carousel-grid.full-width {
	width: 100% !important;
	flex: 1 1 100% !important;
	max-width: 100% !important;
}

.nova-carousel-grid .nova-carousel-item {
	width: 100%;
}

.nova-carousel-content {
	flex: 0 0 auto;
	flex-basis: auto;
	flex-grow: 0;
	flex-shrink: 0;
	max-width: 400px;
	min-width: 0;
	width: auto;
	box-sizing: border-box;
}

/* Hide empty content sections */
.nova-carousel-content-1:empty {
	display: none;
}

.nova-carousel-content-2:empty {
	display: none;
}

.nova-carousel-content-2 {
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
	position: relative;
	z-index: 10;
}

.nova-carousel-title {
	margin: 0 0 20px 0;
	padding: 0;
	font-size: 48px;
	font-weight: 700;
	line-height: 1.2;
	width: 100%;
}

.nova-carousel-item-text {
	margin: 0;
}

.nova-carousel-navigation>button,
.nova-carousel-navigation button {
	position: initial !important;
	margin: 0 !important;
	background: #fff !important;
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
}

.nova-carousel-navigation>button svg,
.nova-carousel-navigation button svg {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	width: 44px !important;
	height: 44px !important;
}

/* Owl Carousel navigation styles */
.nova-carousel-navigation .owl-nav {
	display: none;
}

.nova-carousel-description {
	margin: 0 0 0 0;
	padding: 0;
	font-size: 16px;
	line-height: 1.6;
	width: 100%;
}

.nova-carousel-item-date>* {
	margin: 0 !important;
}

.nova-carousel-button {
	display: inline-block;
	padding: 12px 24px;
	background-color: #0073aa;
	color: #ffffff;
	text-decoration: none;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 600;
	transition: background-color 0.3s ease;
}

.nova-carousel-button:hover {
	background-color: #005a87;
}

/* ============================================
   ITEM BUTTON (PER CARD)
   ============================================ */

.nova-carousel-item-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 12px;
	text-decoration: none;
	cursor: pointer;
	position: relative;
	z-index: 12;
	pointer-events: auto;
	transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Icon position: before (icon left of text) */
.nova-carousel-item-button.icon-before {
	flex-direction: row;
}

/* Icon position: after (icon right of text) */
.nova-carousel-item-button.icon-after {
	flex-direction: row;
}

.nova-carousel-item-button-text {
	line-height: 1;
}

.nova-carousel-item-button-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	flex-shrink: 0;
}

.nova-carousel-item-button-icon svg {
	display: block;
	width: 1em;
	height: 1em;
}

.nova-carousel-item-button-icon i {
	display: inline-block;
	line-height: 1;
}

/* ============================================
   NAVIGATION
   ============================================ */

.nova-carousel-navigation {
	display: flex !important;
	flex-direction: row;
	gap: 4px;
	align-items: center;
	justify-content: flex-start;
	visibility: visible !important;
	opacity: 1 !important;
	position: relative;
	z-index: 10;
}

/* Position: Top */
.nova-carousel-widget>.nova-carousel-navigation {
	margin-bottom: 20px;
}

/* Position: Bottom */
.nova-carousel-container>.nova-carousel-navigation {
	margin-top: 20px;
}

/* Position: Left/Right - Wrapper pour slider et navigation */
.nova-carousel-slider-wrapper {
	display: flex;
	align-items: center;
	gap: 20px;
	width: 100%;
	position: relative;
}

.nova-carousel-slider-wrapper.nova-carousel-nav-position-left {
	flex-direction: row;
}

.nova-carousel-slider-wrapper.nova-carousel-nav-position-right {
	flex-direction: row-reverse;
}

.nova-carousel-slider-wrapper .nova-carousel-navigation {
	flex-direction: column;
	gap: 10px;
	flex-shrink: 0;
}

.nova-carousel-slider-wrapper .nova-carousel-slider {
	flex: 1;
}

/* Position: Outside - Boutons séparés de chaque côté */
.nova-carousel-slider-wrapper.nova-carousel-nav-position-outside {
	display: flex;
	align-items: center;
	gap: 24px;
	width: 100%;
	position: relative;
}

.nova-carousel-slider-wrapper.nova-carousel-nav-position-outside .nova-carousel-nav.nova-carousel-prev {
	flex-shrink: 0;
	order: 1;
}

.nova-carousel-slider-wrapper.nova-carousel-nav-position-outside .nova-carousel-slider {
	flex: 1;
	order: 2;
}

.nova-carousel-slider-wrapper.nova-carousel-nav-position-outside .nova-carousel-nav.nova-carousel-next {
	flex-shrink: 0;
	order: 3;
}

/* Responsive pour position outside */
@media (max-width: 768px) {
	.nova-carousel-slider-wrapper.nova-carousel-nav-position-outside {
		gap: 10px;
	}
}

/* ============================================
   NAVIGATION BUTTONS
   ============================================ */

.nova-carousel-nav {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid #ddd;
	background-color: #ffffff;
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.3s ease;
	pointer-events: auto !important;
	visibility: visible !important;
	opacity: 1 !important;
	position: relative;
	z-index: 10;
	padding: 0;
	margin: 0;
}

.nova-carousel-nav:hover {
	background-color: #f5f5f5;
	border-color: #0073aa;
}

.nova-carousel-nav svg {
	width: 44px !important;
	height: 44px !important;
	display: block !important;
	flex-shrink: 0;
	visibility: visible !important;
	opacity: 1 !important;
}

.nova-carousel-nav.owl-nav-disabled,
.nova-carousel-nav.disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}



/* ============================================
   SWIPER.JS SPECIFIC STYLES
   ============================================ */

/* S'assurer que le conteneur Swiper commence à gauche */
.nova-carousel-slider .swiper {
	width: 100%;
	overflow: hidden;
	padding-left: 0 !important;
	margin-left: 0 !important;
}

.nova-carousel-slider .swiper-wrapper {
	display: flex;
	align-items: stretch;
	justify-content: flex-start;
}

/* S'assurer que le premier slide est complètement visible et aligné à gauche */
.nova-carousel-slider .swiper-slide {
	margin-left: 0 !important;
}

.nova-carousel-slider .swiper-slide:first-child {
	margin-left: 0 !important;
}

/* Si centeredSlides est désactivé, forcer l'alignement à gauche */
.nova-carousel-slider .swiper:not(.swiper-centered) .swiper-wrapper {
	transform: translate3d(0px, 0, 0) !important;
}

/* S'assurer que le conteneur parent n'a pas de padding qui décale */
.nova-carousel-slider-wrapper .nova-carousel-slider {
	margin-left: 0 !important;
}

.nova-carousel-track {
	/* Owl Carousel structure */
	width: 100%;
}

.nova-carousel-slider .owl-stage {
	display: flex;
}

/* ============================================
   ITEM
   ============================================ */

.nova-carousel-item {
	/* Flex Properties */
	flex: 0 0 auto;
	flex-basis: auto;
	flex-grow: 0;
	flex-shrink: 0;

	/* Layout Properties */
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	align-content: flex-start;
	justify-content: flex-start;

	/* Size Properties */
	width: 100%;
	min-width: 0;
	min-height: 0;

	/* Position Properties */
	position: relative;

	/* Box Model */
	padding: 0;
	box-sizing: border-box;
	margin: 0;

}

.nova-carousel-item.has-background-image {
	position: relative;
}

.nova-carousel-item.has-background-image .nova-carousel-item-content {
	position: relative;
	z-index: 3;
	pointer-events: none;
}

.nova-carousel-item.has-background-image .nova-carousel-item-content * {
	pointer-events: auto;
}

/* Background créatif avec masque */
.nova-carousel-item.has-creative-background {
	position: relative;
}

/* ============================================
   ITEM IMAGE
   ============================================ */

.nova-carousel-item-image {
	/* Flex Properties */
	flex: 0 0 auto;
	flex-basis: auto;
	flex-grow: 0;
	flex-shrink: 0;

	/* Layout Properties */
	display: block;
	width: 100%;

	/* Box Model */
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	position: relative;
}

.nova-carousel-item-image img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

/* Image Overlay */
.nova-carousel-item-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
	pointer-events: none;
	box-sizing: border-box;
}

.nova-carousel-item.has-background-image .nova-carousel-item-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
	pointer-events: none;
	box-sizing: border-box;
}

.nova-carousel-item.has-creative-background .nova-carousel-item-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
	pointer-events: none;
	box-sizing: border-box;
}

.nova-carousel-item.has-background-image.has-creative-background .nova-carousel-item-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
	pointer-events: none;
	box-sizing: border-box;
}

.nova-carousel-item-image {
	position: relative;
}

.nova-carousel-item-image .nova-carousel-item-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
	pointer-events: none;
	box-sizing: border-box;
}

/* ============================================
   ITEM CONTENT
   ============================================ */

.nova-carousel-item-content {
	/* Flex Properties */
	flex: 1 1 auto;
	flex-basis: auto;
	flex-grow: 1;
	flex-shrink: 1;

	/* Layout Properties */
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	align-content: flex-start;
	justify-content: flex-start;

	/* Size Properties */
	width: 100%;
	min-width: 0;
	min-height: 0;

	/* Position Properties */
	position: relative;
	z-index: 3;
	pointer-events: none;

	/* Box Model */
	padding: 0;
	box-sizing: border-box;
	margin: 0;
}

.nova-carousel-item-content * {
	pointer-events: auto;
}

/* ============================================
   ITEM TEXT ELEMENTS
   ============================================ */

.nova-carousel-item-text {
	/* Flex Properties */
	flex: 0 1 auto;
	flex-basis: auto;
	flex-grow: 0;
	flex-shrink: 1;

	/* Typography */
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
	color: #333;

	/* Layout Properties */
	display: block;
	width: 100%;
	margin-top: 0;

	/* Box Model */
	padding: 0;
	box-sizing: border-box;
}

a.nova-carousel-item-button .nova-carousel-item-button-icon {
	transition: transform 0.3s ease;
}

a.nova-carousel-item-button:hover .nova-carousel-item-button-icon {
	animation: slideIcon 0.3s ease-in-out infinite alternate;
}

.nova-carousel-item-icon {
	/* Flex Properties */
	flex: 0 0 auto;
	flex-basis: auto;
	flex-grow: 0;
	flex-shrink: 0;

	/* Layout Properties */
	display: flex;
	align-items: center;
	justify-content: center;

	/* Box Model */
	box-sizing: border-box;

	/* Typography */
	line-height: 1;
}

.nova-carousel-item-icon i,
.nova-carousel-item-icon svg {
	display: inline-block;
}

.nova-carousel-item-date {
	/* Flex Properties */
	flex: 0 0 auto;
	flex-basis: auto;
	flex-grow: 0;
	flex-shrink: 0;

	/* Layout Properties */
	display: block;
	width: 100%;

	/* Box Model */
	margin: 10px 0 0 0;
	padding: 0;
	box-sizing: border-box;
}

.nova-carousel-item-excerpt {
	/* Flex Properties */
	flex: 0 1 auto;
	flex-basis: auto;
	flex-grow: 0;
	flex-shrink: 1;

	/* Typography */
	font-size: 14px;
	line-height: 1.6;
	color: #555;

	/* Layout Properties */
	display: block;
	width: 100%;
	min-width: 0;

	/* Box Model */
	margin: 10px 0 0 0;
	padding: 0;
	box-sizing: border-box;
}

.nova-carousel-item-author {
	/* Flex Properties */
	flex: 0 0 auto;
	flex-basis: auto;
	flex-grow: 0;
	flex-shrink: 0;

	/* Typography */
	font-size: 12px;
	color: #888;

	/* Layout Properties */
	display: block;
	width: 100%;

	/* Box Model */
	margin: 5px 0 0 0;
	padding: 0;
	box-sizing: border-box;
}

.nova-carousel-item-link {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	z-index: 10;
	text-decoration: none;
	cursor: pointer;
	box-sizing: border-box;
}

/* ============================================
   OWL CAROUSEL NAVIGATION
   ============================================ */

/* Hide default Owl Carousel navigation */
.owl-nav {
	display: none !important;
}

/* Custom navigation buttons */
.nova-carousel-nav {
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
	pointer-events: auto !important;
}

/* Owl Carousel dots/pagination */
.owl-dots {
	position: relative;
	bottom: auto;
	left: auto;
	width: auto;
	margin-top: 20px;
	text-align: center;
	display: flex;
	justify-content: center;
	gap: 8px;
}

.owl-dot {
	width: 8px;
	height: 8px;
	background-color: #ddd;
	opacity: 1;
	margin: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.3s ease;
	border: none;
	padding: 0;
}

.owl-dot.active,
.owl-dot:hover {
	background-color: #0073aa;
}

/* ============================================
   OWL CAROUSEL PERFORMANCE OPTIMIZATIONS
   ============================================ */


/* Ensure items are visible when Owl Carousel wraps them */
.nova-carousel-slider .owl-item {
	width: auto;
	min-width: 0;
	/* Remove any margin - Owl Carousel handles spacing via its margin property */
	/* margin: 0 !important; */
}

.nova-carousel-slider .owl-item .nova-carousel-item {
	width: 100%;
	display: flex;
	height: 100%;
	/* Remove any margin - Owl Carousel handles spacing via its margin property */
	margin: 0 !important;
}

/* Fix for Owl Carousel structure */
.nova-carousel-slider.owl-carousel {
	display: block;
}

.nova-carousel-slider .owl-stage-outer {
	position: relative;
	overflow: hidden;
	width: 100%;
}

.nova-carousel-slider .owl-stage {
	display: flex;
	position: relative;
	width: 100%;
}

/* Améliorer la réactivité du touch */
.nova-carousel-slider.owl-carousel {
	touch-action: pan-y pinch-zoom;
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	user-select: none;
}

/* ============================================
   HOVER EFFECTS
   ============================================ */

.nova-carousel-item[data-hover-effect="lift"]:hover {
	transform: translateY(-5px);
	transition: transform 0.3s ease;
}

.nova-carousel-item[data-hover-effect="scale"]:hover {
	transform: scale(1.05);
	transition: transform 0.3s ease;
}

.nova-carousel-item[data-hover-effect="shadow"]:hover {
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
	transition: box-shadow 0.3s ease;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
	.nova-carousel-container {
		flex-direction: column;
		gap: 20px;
	}

	.nova-carousel-content {
		max-width: 100%;
	}

	.nova-carousel-title {
		font-size: 32px;
	}
}

/* ============================================
   ELEMENTOR COMPATIBILITY - Permettre le padding
   ============================================ */

/* S'assurer que les styles Elementor (padding, margin, etc.) peuvent s'appliquer */
/* Les styles inline d'Elementor ont la priorité grâce à leur spécificité élevée */
/* Cette règle vide permet de documenter la compatibilité sans interférer */