/**
 * Tools Adapter — Boîtes d'image (Grille & Carrousel)
 * Styles modernes, responsive et hautement personnalisables
 */

/* Conteneur principal */
.ta-image-box-wrapper {
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

/* ==========================================================================
   MODE GRILLE
   ========================================================================== */
.ta-image-box__grid {
	display: grid;
	width: 100%;
	box-sizing: border-box;
}

.ta-image-box__grid-inner {
	display: contents;
}

/* ==========================================================================
   CARTE COMMUNE (GRILLE ET CARROUSEL)
   ========================================================================== */
.ta-image-box__card {
	display: flex;
	flex-direction: column;
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 4px 16px rgba(11, 37, 69, 0.05);
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
	            box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
	            border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	box-sizing: border-box;
	height: 100%;
	position: relative;
}

.ta-image-box__card:hover {
	transform: translateY(-8px);
	box-shadow: 0 16px 40px rgba(11, 37, 69, 0.12);
	border-color: rgba(0, 119, 182, 0.4);
}

/* ==========================================================================
   MÉDIA / COUVERTURE & BADGE
   ========================================================================== */
.ta-image-box__media {
	position: relative;
	width: 100%;
	height: 240px;
	overflow: hidden;
	background-color: #f1f5f9;
}

.ta-image-box__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.ta-image-box__card:hover .ta-image-box__img {
	transform: scale(1.08);
}

/* Badge flottant */
.ta-image-box__badge {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	border-radius: 9999px;
	background-color: rgba(11, 37, 69, 0.9);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #ffffff;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ta-badge-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ta-badge-icon svg,
.ta-badge-icon i {
	width: 1em;
	height: 1em;
}

/* ==========================================================================
   CONTENU TEXTE
   ========================================================================== */
.ta-image-box__content {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding: 28px;
	box-sizing: border-box;
}

/* Titre */
.ta-image-box__title {
	margin: 0 0 12px 0;
	font-family: inherit;
	font-size: 1.35rem;
	font-weight: 700;
	color: #0b2545;
	line-height: 1.3;
	transition: color 0.25s ease;
}

.ta-image-box__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.25s ease;
}

.ta-image-box__card:hover .ta-image-box__title,
.ta-image-box__title a:hover {
	color: #0077b6;
}

/* Description */
.ta-image-box__desc {
	font-size: 0.93rem;
	color: #64748b;
	line-height: 1.6;
	margin-bottom: 20px;
	flex-grow: 1;
}

/* ==========================================================================
   LISTE DE CARACTÉRISTIQUES (PUCES AVEC CHECKMARK)
   ========================================================================== */
.ta-image-box__features {
	list-style: none;
	margin: 0 0 20px 0;
	padding: 0;
}

.ta-image-box__features.has-border-top {
	border-top: 1px solid #e2e8f0;
	padding-top: 16px;
}

.ta-image-box__features li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 8px;
	font-size: 0.9rem;
	color: #1e293b;
	line-height: 1.5;
}

.ta-image-box__features li:last-child {
	margin-bottom: 0;
}

.ta-feature-icon {
	color: #0077b6;
	font-size: 0.9rem;
	flex-shrink: 0;
	margin-top: 3px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ta-feature-icon svg,
.ta-feature-icon i {
	width: 1em;
	height: 1em;
}

.ta-feature-text {
	flex-grow: 1;
}

/* ==========================================================================
   FOOTER & BOUTON D'ACTION
   ========================================================================== */
.ta-image-box__footer {
	margin-top: auto;
	padding-top: 6px;
}

.ta-image-box__action {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	font-size: 0.92rem;
	color: #0077b6;
	text-decoration: none;
	transition: gap 0.25s ease, color 0.25s ease;
}

.ta-link-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.25s ease;
}

.ta-link-icon svg,
.ta-link-icon i {
	width: 1em;
	height: 1em;
}

.ta-image-box__card:hover .ta-image-box__action,
.ta-image-box__action:hover {
	color: #0b2545;
	gap: 12px;
}

.ta-image-box__card:hover .ta-link-icon,
.ta-image-box__action:hover .ta-link-icon {
	transform: translateX(4px);
}

/* ==========================================================================
   MODE CARROUSEL
   ========================================================================== */
.ta-image-box--carousel-mode .ta-carousel-viewport {
	overflow: hidden;
	width: 100%;
	position: relative;
	box-sizing: border-box;
}

.ta-image-box--carousel-mode .ta-carousel-track {
	display: flex;
	will-change: transform;
	box-sizing: border-box;
}

.ta-image-box--carousel-mode .ta-carousel-slide {
	flex-shrink: 0;
	box-sizing: border-box;
	height: auto; /* Permet un alignement égal */
}

/* Navigation Flèches Carrousel */
.ta-carousel-nav-header {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	margin-bottom: 20px;
}

.ta-carousel-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background-color: #ffffff;
	border: 1.5px solid #e2e8f0;
	color: #0b2545;
	font-size: 1rem;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	transition: all 0.25s ease;
	outline: none;
}

.ta-carousel-arrow:hover {
	background-color: #0077b6;
	border-color: #0077b6;
	color: #ffffff;
	transform: scale(1.05);
	box-shadow: 0 6px 16px rgba(0, 119, 182, 0.25);
}

/* Points de pagination (Dots) */
.ta-carousel-dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 25px;
}

.ta-carousel-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: #cbd5e1;
	border: none;
	padding: 0;
	cursor: pointer;
	transition: all 0.3s ease;
}

.ta-carousel-dot.is-active {
	width: 28px;
	border-radius: 9999px;
	background-color: #0077b6;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
	.ta-image-box__media {
		height: 210px;
	}
	.ta-image-box__content {
		padding: 24px;
	}
}

@media (max-width: 768px) {
	.ta-image-box__media {
		height: 200px;
	}
	.ta-image-box__content {
		padding: 20px;
	}
	.ta-image-box__title {
		font-size: 1.2rem;
	}
}
