@charset "UTF-8";
/**
 * Carougrid Blog for WP - Styles
 *
 * @package CarougridBlog
 * @version 3.1.4
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
	--cg-gap: 40px;
	--cg-gap-mobile: 20px;
	--cg-border-radius: 10px;
	--cg-transition: 0.5s ease;
	--cg-overlay-bg: rgba(0, 0, 0, 0.5);

	/* Palette de Couleurs Dynamique */
	--cg-primary: #0069e2;
	--cg-primary-hover: #0069e2;
	--cg-secondary: #4ECDC4;
	--cg-accent: #FFE66D;
	--cg-gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

	/* Texte avec contraste */
	--cg-text-primary: #2D3748;
	--cg-text-secondary: #718096;
	--cg-text-light: #A0AEC0;
}

/* ========================================
   Grid Container
   ======================================== */
.grid-container {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	grid-template-rows: auto auto;
	grid-column-gap: var(--cg-gap);
	grid-row-gap: var(--cg-gap);
	grid-template-areas:
		"slider slider right"
		"col1   col2   right";
}

/* Grid Areas */
.col1 {
	grid-area: col1;
}

.col2 {
	grid-area: col2;
}

.col3 {
	grid-area: right;
}

/* ========================================
   Slider
   ======================================== */
/* ========================================
   Slider (CSS Scroll Snap)
   ======================================== */
.merged-slider {
	grid-area: slider;
	position: relative;
	overflow: hidden;
	border-radius: var(--cg-border-radius);
	user-select: none;
	width: 100%;
	aspect-ratio: 1.49 / 1;
	cursor: pointer;
}

.merged-slider .slides {
	display: flex;
	height: 100%;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE/Edge */
}

.merged-slider .slides::-webkit-scrollbar {
	display: none; /* Chrome/Safari */
}

.merged-slider .slide {
	position: relative;
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	box-sizing: border-box;
}

.slide-image-container {
	position: relative;
	height: 100%;
}

.merged-slider .slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: var(--cg-border-radius);
	user-drag: none;
	user-select: none;
	-webkit-user-drag: none;
	transition: transform 8s ease-out;
	transform: scale(1);
}

.merged-slider .slide img:hover {
	transform: scale(1.1);
}

/* Slider Navigation */
/* Reset natif navigateur pour <button> */
button.cg-slide-nav {
	appearance: none;
	-webkit-appearance: none;
	border: none;
	padding: 0;
	margin: 0;
	font: inherit;
	cursor: pointer;
	background: none;
}

.cg-slide-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%) scale(1);
	width: clamp(34px, 6vw, 44px);
	height: clamp(34px, 6vw, 44px);
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff !important;
	text-decoration: none !important;
	display: grid;
	place-items: center;
	z-index: 11;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}


.cg-slide-nav:focus {
	outline: none;
}


.cg-slide-prev {
	left: 12px;
}

.cg-slide-next {
	right: 12px;
}

.cg-slide-prev::before,
.cg-slide-next::before {
	content: '';
	display: block;
	line-height: 1;
	font-size: 28px;
	transform: translateY(-4px);
}

.cg-slide-prev::before { content: '‹'; }
.cg-slide-next::before { content: '›'; }

.merged-slider:hover .cg-slide-nav,
.merged-slider:focus-within .cg-slide-nav {
	opacity: 1;
	pointer-events: auto;
}

.cg-slide-nav:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.9);
	outline-offset: 2px;
}

.cg-slide-nav:hover {
	background: rgba(0, 0, 0, 0.7);
	transform: translateY(-50%) scale(1.06);
}

@media (hover: none) {
	.cg-slide-nav {
		opacity: 1;
		pointer-events: auto;
	}
}

/* Slide Title Overlay */
.slide-title-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	/* Gradient overlay plus prononc */
	background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 70%, rgba(0, 0, 0, 0) 100%);
	/* Padding top augmenté pour laisser place au bouton CTA */
	padding: 70px 30px 25px 30px;
	color: #fff;
	overflow: visible;
}

.slide-title-overlay a {
	text-decoration: none;
	color: inherit;
}

.slide-title-overlay a:hover,
.slide-title-overlay a:visited,
.slide-title-overlay a:active {
	text-decoration: none;
	color: #fff;
}

.slide-title-overlay h3 {
	margin: 0 0 8px 0;
	/* Titre en 24px bold avec text-shadow */
	font-size: 24px;
	font-weight: 700;
	line-height: 1.3;
	color: #fff !important;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

/* Sous-titre / Extrait (2 lignes max) */
.slide-excerpt {
	margin: 0 0 12px 0;
	font-size: 15px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.9);
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}


/* Post Badges (New, Updated, Popular) */
/* Post Badges (New, Updated, Popular) */
.post-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	color: white;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	z-index: 5;

}

/* Positionnement par dfaut (Slider) */
.post-badge-floating {
	position: absolute;
	top: 20px;
	left: 20px;
}

/* 
   Nouvelles Couleurs (Optimisées pour le contraste des emojis)
   - New (✨) : Bleu Profond/Indigo pour faire ressortir le jaune
   - Updated (🔄) : Émeraude/Vert pour la fraîcheur
   - Popular (🔥) : Sombre/Noir pour faire éclater le rouge/orange du feu
*/


/* Badge Top Tendance (Matomo) */
.badge-trending {
	background: linear-gradient(135deg, #2563eb 0%, #10b981 100%);
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.45);
	border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Icône flèche tendance */
.cg-trending-container {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-right: 4px;
}

.cg-trending-arrow {
	font-size: 16px;
	font-weight: 700;
	transform: translateY(-1px);
}


.badge-new {
	background: black;
	box-shadow: none;
}


.badge-updated {
	background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
	box-shadow: 0 4px 12px rgba(17, 153, 142, 0.4);
}

.badge-popular {
	/* Fond sombre pour contraste maximal avec 🔥 */
	background: linear-gradient(135deg, #232526 0%, #414345 100%);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Badge Compact (Icon Only) - Force */
.post-badge-compact .badge-text {
	display: none;
}

.post-badge-compact {
	padding: 0;
	border-radius: 50%;
	width: 36px;
	/* Agrandissement : 26px -> 36px */
	height: 36px;
	justify-content: center;
	font-size: 18px;
	/* Icône plus grande */
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Positionnement par défaut pour les petits badges (Slider Mobile) */
.post-badge-floating.post-badge-compact {
	top: -10px;
	left: -10px;
}

/* SPÉCIFIQUE COLONNE LISTE (col3) : Pop-out en bas à gauche */
.col3 .post-badge-floating.post-badge-compact {
	bottom: -5px;
	left: -5px;
}

/* Badge Compact on Mobile */
@media (max-width: 768px) {
	.post-badge .badge-text {
		display: none;
	}

	.post-badge {
		padding: 0;
		border-radius: 50%;
		width: 34px;
		height: 34px;
		justify-content: center;
		font-size: 16px;
	}

	/* Même ajustement de position pour le mobile */
	.post-badge-floating {
		top: 10px;
		left: 10px;
	}
}

@keyframes pulse {

	0%,
	100% {
		transform: scale(1);
	}

	50% {
		transform: scale(1.05);
	}
}

/* Overlay Animation */
@keyframes fadeInOverlay {
	from {
		opacity: 0;
		transform: translateY(20px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.animate-overlay {
	animation: fadeInOverlay 0.5s ease forwards;
}

/* Progress Indicator */
.slider-progress {
	position: absolute;
	top: 3%;
	right: 3%;
	width: clamp(22px, 5vw, 34px);
	aspect-ratio: 1;
	z-index: 10;
}

.slider-progress svg circle:first-of-type {
	stroke: #000000 !important;
}



.slider-progress svg {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

@keyframes progress {
	from {
		stroke-dashoffset: 100;
	}

	to {
		stroke-dashoffset: 0;
	}
}



.progress-bar.animate {
	animation: progress 5s linear infinite;
}

/* Pause animation on hover */
.merged-slider:hover .progress-bar {
	animation-play-state: paused !important;
}

/* ========================================
   Cards (col1, col2)
   ======================================== */
.col1,
.col2 {
	text-align: center;
}

.carougrid-card {
	height: 100%;
	display: flex;
	flex-direction: column;
}

.col1 img,
.col2 img {
	width: 100%;
	border-radius: var(--cg-border-radius);
	display: block;
	transition: transform 0.3s ease;
}

.col1 a:hover img,
.col2 a:hover img {
	transform: scale(1.02);
}

.col1 h3,
.col2 h3 {
	font-size: 18px;
	margin: 10px 5px 5px;
	line-height: 1.4;
	color: var(--cg-text-primary);
	transition: color 0.3s ease;
}

.col1 a:hover h3,
.col2 a:hover h3 {
	color: var(--cg-primary);
}

.col1 p.post-desc,
.col2 p.post-desc {
	margin: 5px 0 0;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
	-webkit-line-clamp: 4;
	line-clamp: 4;
	line-height: 1.6;
	color: black;
	text-align:left;
}

/* ========================================
   List (col3)
   ======================================== */
.col3 {
	display: flex;
	flex-direction: column;
}

.col3 .post-item {
	display: flex;
	align-items: center;
	margin-bottom: 25px;
	transition: transform 0.2s ease;
}

.col3 .post-item {
	padding: 10px;
	margin-left: -10px;
}

.col3 .post-item:hover {
	transform: translateX(12px);
	box-shadow: -4px 0 0;
	background :#fafafa ;
	border-radius :0 10px 10px 0 ;
}

.col3 .col3-image {
	flex: 0 0 40%;
}

.col3 .col3-image img {
	width: 100%;
	display: block;
	border-radius: var(--cg-border-radius);
	transition: transform 0.3s ease;
}

.col3 .post-item:hover .col3-image img {
	transform: scale(1.05);
}

.col3 .col3-title {
	flex: 1;
	padding-left: 15px;
	position: relative;
	overflow: hidden;
}

.col3 .col3-title h3 {
	margin: 0;
	font-size: 16px;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	color: var(--cg-text-primary);
	transition: color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.col3 .post-item:hover h3 {
	color: var(--cg-primary);
	opacity: 0;
	transform: translateY(-10px);
}

/* Extrait qui apparat au hover */
.list-item-excerpt {
	position: absolute;
	top: 0;
	left: 15px;
	right: 0;
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: black;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
	-webkit-line-clamp: 4;
	line-clamp: 4;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
}

.col3 .post-item:hover .list-item-excerpt {
	opacity: 1;
	transform: translateY(0);
}

/* ========================================
   Links
   ======================================== */
.grid-container a {
	text-decoration: none;
	color: inherit;
	transition: opacity 0.2s ease;
}

.grid-container a:hover {
	opacity: 0.8;
}

/* ========================================
   Responsive - Desktop
   ======================================== */
@media (min-width: 769px) {
	.slide-title-overlay h3 {
		-webkit-line-clamp: 1;
		line-clamp: 1;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

/* ========================================
   Responsive - Tablet
   ======================================== */
@media (max-width: 1024px) and (min-width: 769px) {
	:root {
		--cg-gap: 30px;
	}

	.col3 .col3-title h3 {
		font-size: 15px;
	}
}

/* ========================================
   Responsive - Mobile
   ======================================== */
@media (max-width: 768px) {
	:root {
		--cg-gap: var(--cg-gap-mobile);
	}

	.grid-container {
		display: block;
	}

	.merged-slider {
		margin-bottom: 30px;
	}

	.slide-title-overlay {
		padding: 15px 20px;
	}

	.slide-title-overlay h3 {
		font-size: 20px;
		-webkit-line-clamp: 2;
		line-clamp: 2;
	}

	.slide-excerpt {
		font-size: 14px;
		margin-bottom: 10px;
	}

	/* Désactiver le CTA sur mobile (pas de hover) */
	.slide-cta {
		display: none;
	}

	.col1,
	.col2,
	.col3 {
		width: 100%;
		display: block;
		margin-bottom: 30px;
	}

	.col1 h3,
	.col2 h3 {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		overflow: hidden;
		-webkit-line-clamp: 2;
		line-clamp: 2;
	}

	.col3 .col3-title h3 {
		-webkit-line-clamp: 2;
		line-clamp: 2;
		font-size: 15px;
	}

	.col3 .post-item {
		margin-bottom: 20px;
	}
}

/* ========================================
   Accessibility
   ======================================== */
.grid-container a:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

.merged-slider:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

	.merged-slider .slides,
	.col1 img,
	.col2 img,
	.col3 .col3-image img,
	.grid-container a {
		transition: none;
	}

	.animate-overlay {
		animation: none;
	}

	.progress-bar {
		animation: none;
	}
}

/* ========================================
   HYBRID FLAME ANIMATION (Emoji + Particules)
   ======================================== */

.cg-fire-container {
	position: relative;
	width: 20px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: -2px;
	/* Ajustement visuel espacement */
}

/* Base statique : l'emoji reste net, sans dformation */
.cg-emoji-fire-base::before {
	content: "🔥";
	font-family: "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Symbol", sans-serif;
	font-size: 20px;
	line-height: 1;
	z-index: 2;
	position: relative;
	filter: drop-shadow(0 0 4px rgba(255, 69, 0, 0.4));
	display: inline-block;
}

/* Particules de flamme (halo dynamique autour de l'emoji) */
.particle-fire {
	position: absolute;
	border-radius: 50%;
	background: #FFD700;
	/* Or / Jaune par défaut */
	width: 4px;
	height: 4px;
	opacity: 0;
	z-index: 1;
	pointer-events: none;
}

/* Légres variations de position, taille et couleur */
.particle-fire.p1 {
	bottom: 4px;
	left: 22%;
	width: 4px;
	height: 4px;
	background: #FF9800;
	/* Orange */
	animation: particleUp 1.8s ease-out infinite;
}

.particle-fire.p2 {
	bottom: 6px;
	right: 20%;
	width: 3px;
	height: 3px;
	background: #FF5722;
	/* Rouge-Orange */
	animation: particleUp 1.6s ease-out infinite 0.4s;
}

.particle-fire.p3 {
	bottom: 4px;
	left: 52%;
	width: 2px;
	height: 2px;
	background: #FFFF66;
	/* Jaune vif */
	animation: particleUp 2.1s ease-out infinite 0.8s;
}

/* Particules qui montent légèrement + oscillation + variation de taille */
@keyframes particleUp {
	0% {
		opacity: 0;
		transform: translateX(0) translateY(0) scale(0.7);
	}

	15% {
		opacity: 1;
		transform: translateX(-1px) translateY(-6px) scale(0.9);
	}

	45% {
		opacity: 0.9;
		/* Moment le plus intense : flamme plus épaisse */
		transform: translateX(1px) translateY(-14px) scale(1.2);
	}

	75% {
		opacity: 0.5;
		/* Étirement vertical léger pour rappeler la forme d'une flamme */
		transform: translateX(-1px) translateY(-20px) scale(1.0, 1.3);
	}

	100% {
		opacity: 0;
		/* Fin de vie de la particule, hauteur max autour de 2224px */
		transform: translateX(0.5px) translateY(-22px) scale(0.6);
	}
}

/* Halo global / souffle de flamme (optionnel, si appliqu sur un pseudo-élment) */
@keyframes ghostFire {
	0% {
		transform: translate(-50%, -50%) scale(0.5);
		opacity: 0.35;
		filter: blur(0px);
	}

	50% {
		transform: translate(-50%, -58%) scale(0.58);
		opacity: 0.7;
		filter: blur(1px);
	}

	100% {
		transform: translate(-50%, -66%) scale(0.62);
		opacity: 0;
		filter: blur(3px);
	}
}

/* Remove Pulse on Popular badge because the fire itself is animated */
.badge-popular {
	animation: none !important;
}

/* Ensure icon alignment */
.badge-popular .cg-fire-container {
	display: inline-flex;
}



.cg-rec-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff2d2d; /* Rouge REC */
    display: inline-block;
    margin-right: 4px;
    box-shadow: 0 0 6px rgba(255, 0, 0, 0.5);
    animation: cg-rec-blink 1s linear infinite;
}

/* Visuellement : 50 % du temps ON, 50 % du temps OFF */
@keyframes cg-rec-blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}


.post-badge-topright {
	left: auto;
	right: 20px;
}

@media (max-width: 768px) {
	.post-badge-topright {
		right: 10px;
	}
		.col3 {
		display: none;
	}

}

