/*--------------------------------------------------------------
# Animations Modernes - RED/WHITE Theme
--------------------------------------------------------------*/

/* BOUTONS - Effets dynamiques */
button,
.btn,
a.button,
input[type="button"],
input[type="submit"] {
	position: relative;
	overflow: hidden;
	border-radius: 4px;
	font-weight: 600;
	letter-spacing: 0.5px;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
	cursor: pointer;
}

button:before,
.btn:before,
a.button:before,
input[type="button"]:before,
input[type="submit"]:before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.3);
	transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: -1;
}

button:hover:before,
.btn:hover:before,
a.button:hover:before,
input[type="button"]:hover:before,
input[type="submit"]:hover:before {
	left: 100%;
}

button:hover,
.btn:hover,
a.button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 20px rgba(255, 0, 0, 0.4);
}

button:active,
.btn:active,
a.button:active,
input[type="button"]:active,
input[type="submit"]:active {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}

/* LIENS - Underline animation */
a {
	position: relative;
	text-decoration: none;
	transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:not(.button):not(.site-title):not(.header-site-name-link)::before {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 0;
	height: 2px;
	background: var(--color-primary);
	transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover:not(.button):not(.site-title):not(.header-site-name-link)::before {
	width: 100%;
}

/* CARTES - Hover effects */
.post-card,
.article-card,
.card,
.content-card {
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	border-radius: 8px;
	overflow: hidden;
	position: relative;
}

.post-card:hover,
.article-card:hover,
.card:hover,
.content-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 16px 32px rgba(255, 0, 0, 0.2);
}

.post-card::before,
.article-card::before,
.card::before,
.content-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 4px;
	background: linear-gradient(90deg, var(--color-primary) 0%, transparent 100%);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 10;
}

.post-card:hover::before,
.article-card:hover::before,
.card:hover::before,
.content-card:hover::before {
	transform: scaleX(1);
}

/* IMAGES - Zoom effect */
.post-card img,
.article-card img,
.card img,
.featured-image {
	transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover img,
.article-card:hover img,
.card:hover img {
	transform: scale(1.05);
}

/* NAVIGATION - Animated underline */
.main-navigation a {
	position: relative;
	transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-navigation a::after {
	content: '';
	position: absolute;
	bottom: -4px;
	left: 50%;
	width: 0;
	height: 3px;
	background: #FFFFFF;
	transform: translateX(-50%);
	transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-navigation a:hover::after,
.main-navigation a.current::after {
	width: 100%;
}

/* HEADINGS - Entrance animation */
h1, h2, h3, h4, h5, h6 {
	animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

h1 {
	animation-delay: 0.1s;
}

h2 {
	animation-delay: 0.2s;
}

h3 {
	animation-delay: 0.3s;
}

/* PARAGRAPHES - Fade in effect */
p {
	animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) backwards;
	animation-delay: 0.4s;
}

/* LISTES - Stagger animation */
li {
	animation: slideInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

li:nth-child(1) {
	animation-delay: 0.1s;
}

li:nth-child(2) {
	animation-delay: 0.2s;
}

li:nth-child(3) {
	animation-delay: 0.3s;
}

li:nth-child(n+4) {
	animation-delay: calc(0.1s * (n - 3) + 0.3s);
}

/* INPUTS - Focus animation */
input:not([type="button"]):not([type="submit"]),
textarea,
select {
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	border: 2px solid #E0E0E0;
	border-radius: 4px;
	padding: 0.75rem;
	font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.1);
	transform: translateY(-2px);
}

/* BADGES - Pulse effect */
.badge,
.tag,
.label {
	display: inline-block;
	background: var(--color-primary);
	color: #FFFFFF;
	padding: 0.5rem 1rem;
	border-radius: 20px;
	font-size: 0.875rem;
	font-weight: 600;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	animation: scaleUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.badge:hover,
.tag:hover,
.label:hover {
	transform: scale(1.1);
	box-shadow: 0 0 16px rgba(255, 0, 0, 0.5);
	animation: pulse 1s infinite;
}

/* DIVIDERS - Animated lines */
hr,
.divider {
	height: 3px;
	background: linear-gradient(90deg, transparent 0%, var(--color-primary) 50%, transparent 100%);
	border: none;
	margin: var(--spacing-lg) 0;
	animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* SPINNERS - Loading animation */
.spinner,
.loading {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid rgba(255, 0, 0, 0.2);
	border-top-color: var(--color-primary);
	border-radius: 50%;
	animation: rotate 0.8s linear infinite;
}

/* TOOLTIPS - Fade in */
.tooltip {
	position: relative;
	animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tooltip::after {
	content: attr(data-tooltip);
	position: absolute;
	background: var(--color-primary);
	color: #FFFFFF;
	padding: 0.5rem 1rem;
	border-radius: 4px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transform: translateY(-10px);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 1000;
	font-size: 0.875rem;
	font-weight: 600;
}

.tooltip:hover::after {
	opacity: 1;
	transform: translateY(-30px);
}

/* TRANSITIONS PAGE */
.page-enter {
	animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-exit {
	animation: slideInDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) reverse;
}

/* HIGHLIGHT - Glow effect */
.highlight,
.featured,
.active {
	box-shadow: var(--glow-md);
	animation: glow 2s infinite;
}

/* SMOOTH SCROLL */
html {
	scroll-behavior: smooth;
}

/* REDUCED MOTION - Respect user preferences */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
