/**
 * Footer Moderne 2025 - Clémence Fouquet
 * Design avec formes organiques, 4 colonnes, newsletter, accessibilité RGAA AA
 */

/* ========================================
   1. WAVE DIVIDER
   ======================================== */

.footer-wave {
	position: relative;
	width: 100%;
	height: 150px;
	overflow: hidden;
	line-height: 0;
	transform: translateZ(0);
	will-change: transform;
}

.footer-wave svg {
	position: relative;
	display: block;
	width: calc(100% + 1.3px);
	height: 150px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.footer-wave svg animate {
		animation-play-state: paused !important;
	}
}

/* ========================================
   2. FOOTER CONTAINER
   ======================================== */

.site-footer {
	position: relative;
	background-color: var(--wp--preset--color--violet-500, #5b2e7f);
	color: var(--wp--preset--color--beige-100, #fdf1dd);
	overflow: hidden;
}

/* Blob décoratif background */
.footer-blob {
	position: absolute;
	bottom: -100px;
	right: -100px;
	width: 400px;
	height: 400px;
	pointer-events: none;
	z-index: 0;
	opacity: 0.3;
	transform: translateZ(0);
	will-change: transform;
}

.footer-blob svg {
	width: 100%;
	height: 100%;
}

.footer-content {
	position: relative;
	z-index: 1;
	max-width: 1280px;
	margin: 0 auto;
	padding: 80px 24px 32px;
}

/* ========================================
   3. LAYOUT 4 COLONNES
   ======================================== */

.footer-columns {
	display: grid;
	grid-template-columns: 35% 20% 20% 25%;
	gap: 48px;
	margin-bottom: 48px;
}

.footer-col {
	animation: fadeInUp 0.6s ease-out backwards;
}

.footer-col-1 { animation-delay: 0.1s; }
.footer-col-2 { animation-delay: 0.2s; }
.footer-col-3 { animation-delay: 0.3s; }
.footer-col-4 { animation-delay: 0.4s; }

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ========================================
   4. TYPOGRAPHIE
   ======================================== */

.footer-heading {
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--wp--preset--color--orange-500, #f89420);
	margin: 0 0 1.5rem 0;
	font-family: var(--wp--preset--font-family--fraunces, "Fraunces", serif);
}

.footer-brand-title {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--wp--preset--color--white, #ffffff);
	margin: 0 0 0.5rem 0;
	font-family: var(--wp--preset--font-family--fraunces, "Fraunces", serif);
}

.footer-brand-subtitle {
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--wp--preset--color--orange-500, #f89420);
	margin: 0 0 1rem 0;
	font-family: var(--wp--preset--font-family--inter, "Inter", sans-serif);
}

.footer-brand-bio {
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--wp--preset--color--beige-100, #fdf1dd);
	margin: 0 0 1.5rem 0;
	font-family: var(--wp--preset--font-family--inter, "Inter", sans-serif);
}

.footer-text {
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--wp--preset--color--beige-100, #fdf1dd);
	margin: 0;
	font-family: var(--wp--preset--font-family--inter, "Inter", sans-serif);
}

/* ========================================
   5. LIENS NAVIGATION
   ======================================== */

.footer-nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.footer-nav-list a {
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--wp--preset--color--beige-100, #fdf1dd);
	text-decoration: none;
	font-family: var(--wp--preset--font-family--inter, "Inter", sans-serif);
	display: inline-block;
	transition: color 0.2s ease, transform 0.2s ease;
}

.footer-nav-list a:hover,
.footer-nav-list a:focus {
	color: var(--wp--preset--color--turquoise-400, #51c4b5);
	transform: translateX(4px);
	text-decoration: underline;
	outline: none;
}

.footer-nav-list a:focus-visible {
	outline: 2px solid var(--wp--preset--color--orange-500, #f89420);
	outline-offset: 4px;
	border-radius: 2px;
}

/* ========================================
   6. CTA BOUTON (Colonne 1)
   ======================================== */

.footer-cta-btn {
	display: inline-block;
	padding: 12px 24px;
	background: linear-gradient(90deg, var(--wp--preset--color--orange-500, #f89420), var(--wp--preset--color--turquoise-400, #51c4b5));
	color: var(--wp--preset--color--white, #ffffff);
	font-size: 0.9375rem;
	font-weight: 600;
	font-family: var(--wp--preset--font-family--inter, "Inter", sans-serif);
	text-decoration: none;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.footer-cta-btn:hover,
.footer-cta-btn:focus {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(248, 148, 32, 0.3);
	outline: none;
}

.footer-cta-btn:focus-visible {
	outline: 2px solid var(--wp--preset--color--white, #ffffff);
	outline-offset: 4px;
}

/* ========================================
   7. NEWSLETTER FORM
   ======================================== */

.footer-newsletter-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 1.5rem;
}

.footer-newsletter-label {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--wp--preset--color--beige-100, #fdf1dd);
	margin-bottom: 4px;
	font-family: var(--wp--preset--font-family--inter, "Inter", sans-serif);
}

.footer-newsletter-input {
	width: 100%;
	padding: 12px 16px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(253, 241, 221, 0.3);
	border-radius: 8px;
	color: var(--wp--preset--color--white, #ffffff);
	font-size: 0.9375rem;
	font-family: var(--wp--preset--font-family--inter, "Inter", sans-serif);
	transition: border-color 0.2s ease, background 0.2s ease;
}

.footer-newsletter-input::placeholder {
	color: rgba(253, 241, 221, 0.6);
}

.footer-newsletter-input:focus {
	outline: none;
	border-color: var(--wp--preset--color--orange-500, #f89420);
	background: rgba(255, 255, 255, 0.15);
	box-shadow: 0 0 0 3px rgba(248, 148, 32, 0.2);
}

.footer-newsletter-input:focus-visible {
	outline: 2px solid var(--wp--preset--color--orange-500, #f89420);
	outline-offset: 2px;
}

.footer-newsletter-submit {
	padding: 12px 24px;
	background: linear-gradient(90deg, var(--wp--preset--color--orange-500, #f89420), var(--wp--preset--color--turquoise-400, #51c4b5));
	color: var(--wp--preset--color--white, #ffffff);
	font-size: 0.9375rem;
	font-weight: 600;
	font-family: var(--wp--preset--font-family--inter, "Inter", sans-serif);
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.footer-newsletter-submit:hover,
.footer-newsletter-submit:focus {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(248, 148, 32, 0.3);
	outline: none;
}

.footer-newsletter-submit:focus-visible {
	outline: 2px solid var(--wp--preset--color--white, #ffffff);
	outline-offset: 4px;
}

.footer-newsletter-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.footer-privacy-notice {
	font-size: 0.75rem;
	line-height: 1.4;
	color: rgba(253, 241, 221, 0.8);
	margin: 0;
	font-family: var(--wp--preset--font-family--inter, "Inter", sans-serif);
}

.footer-privacy-notice a {
	color: var(--wp--preset--color--orange-500, #f89420);
	text-decoration: underline;
	transition: color 0.2s ease;
}

.footer-privacy-notice a:hover,
.footer-privacy-notice a:focus {
	color: var(--wp--preset--color--turquoise-400, #51c4b5);
}

/* ========================================
   8. RÉSEAUX SOCIAUX
   ======================================== */

.footer-social {
	display: flex;
	gap: 12px;
	margin-top: 1.5rem;
}

.footer-social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 50%;
	color: var(--wp--preset--color--beige-100, #fdf1dd);
	text-decoration: none;
	transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.footer-social-link:hover,
.footer-social-link:focus {
	transform: scale(1.15) rotate(5deg);
	background: rgba(255, 255, 255, 0.2);
	color: var(--wp--preset--color--orange-500, #f89420);
	outline: none;
}

.footer-social-link:focus-visible {
	outline: 2px solid var(--wp--preset--color--orange-500, #f89420);
	outline-offset: 4px;
}

.footer-social-link svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* ========================================
   9. BOTTOM BAR (Copyright + Legal)
   ======================================== */

.footer-bottom {
	padding-top: 2rem;
	border-top: 1px solid rgba(253, 241, 221, 0.2);
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
}

.footer-copyright {
	font-size: 0.875rem;
	color: rgba(253, 241, 221, 0.8);
	margin: 0;
	font-family: var(--wp--preset--font-family--inter, "Inter", sans-serif);
}

.footer-legal-nav {
	display: flex;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.footer-legal-link {
	font-size: 0.875rem;
	color: rgba(253, 241, 221, 0.8);
	text-decoration: none;
	font-family: var(--wp--preset--font-family--inter, "Inter", sans-serif);
	transition: color 0.2s ease;
	position: relative;
}

.footer-legal-link:not(:last-child)::after {
	content: "|";
	position: absolute;
	right: -0.85rem;
	color: rgba(253, 241, 221, 0.4);
}

.footer-legal-link:hover,
.footer-legal-link:focus {
	color: var(--wp--preset--color--turquoise-400, #51c4b5);
	text-decoration: underline;
	outline: none;
}

.footer-legal-link:focus-visible {
	outline: 2px solid var(--wp--preset--color--orange-500, #f89420);
	outline-offset: 4px;
	border-radius: 2px;
}

/* ========================================
   10. RESPONSIVE - TABLET (768-1023px)
   ======================================== */

@media (max-width: 1023px) {
	.footer-wave {
		height: 100px;
	}

	.footer-wave svg {
		height: 100px;
	}

	.footer-content {
		padding: 60px 24px 24px;
	}

	.footer-columns {
		grid-template-columns: 1fr 1fr;
		gap: 32px;
	}

	/* Brand + Newsletter en full width */
	.footer-col-1 {
		grid-column: 1 / -1;
	}

	.footer-col-4 {
		grid-column: 1 / -1;
	}

	.footer-blob {
		width: 300px;
		height: 300px;
		bottom: -50px;
		right: -50px;
	}
}

/* ========================================
   11. RESPONSIVE - MOBILE (≤767px)
   ======================================== */

@media (max-width: 767px) {
	.footer-wave {
		height: 60px;
	}

	.footer-wave svg {
		height: 60px;
	}

	.footer-content {
		padding: 40px 20px 20px;
	}

	.footer-columns {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.footer-col-1,
	.footer-col-2,
	.footer-col-3,
	.footer-col-4 {
		grid-column: 1;
	}

	.footer-brand-title {
		font-size: 1.25rem;
	}

	.footer-heading {
		font-size: 1rem;
	}

	.footer-cta-btn,
	.footer-newsletter-submit {
		width: 100%;
		text-align: center;
	}

	.footer-social {
		justify-content: center;
	}

	.footer-bottom {
		flex-direction: column;
		text-align: center;
		gap: 0.75rem;
	}

	.footer-legal-nav {
		flex-direction: column;
		gap: 0.5rem;
		align-items: center;
	}

	.footer-legal-link:not(:last-child)::after {
		display: none;
	}

	.footer-blob {
		width: 250px;
		height: 250px;
		bottom: 0;
		right: -75px;
	}
}

/* ========================================
   12. ACCESSIBILITÉ
   ======================================== */

/* Classe utilitaire pour labels cachés visuellement */
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* Focus visible pour tous les éléments interactifs */
*:focus-visible {
	outline: 2px solid var(--wp--preset--color--orange-500, #f89420);
	outline-offset: 4px;
	border-radius: 2px;
}

/* Désactiver animations si prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.footer-blob svg animate,
	.footer-wave svg animate {
		animation-play-state: paused !important;
	}
}

/* ========================================
   13. ÉTATS FORM (Success/Error)
   ======================================== */

.footer-newsletter-message {
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 500;
	margin-top: 12px;
	font-family: var(--wp--preset--font-family--inter, "Inter", sans-serif);
}

.footer-newsletter-message--success {
	background: rgba(81, 196, 181, 0.2);
	color: var(--wp--preset--color--turquoise-400, #51c4b5);
	border: 1px solid var(--wp--preset--color--turquoise-400, #51c4b5);
}

.footer-newsletter-message--error {
	background: rgba(248, 148, 32, 0.2);
	color: var(--wp--preset--color--orange-500, #f89420);
	border: 1px solid var(--wp--preset--color--orange-500, #f89420);
}

/* ========================================
   14. PRINT STYLES
   ======================================== */

@media print {
	.footer-wave,
	.footer-blob,
	.footer-newsletter-form,
	.footer-social {
		display: none !important;
	}

	.site-footer {
		background: none;
		color: #000;
	}

	.footer-content {
		padding: 20px 0;
	}
}
