/*
Theme Name: APSAD 93
Theme URI: https://apsad93.fr/
Author: APSAD 93
Description: Thème bloc public de l’APSAD 93, conçu pour fonctionner avec APSAD Core.
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.1
Version: 0.2.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apsad93
Tags: block-patterns, full-site-editing, accessibility-ready, responsive-layout
*/

:root {
	--apsad-indigo: #38338a;
	--apsad-indigo-700: #2e2a72;
	--apsad-indigo-900: #1a1743;
	--apsad-teal: #77c8d0;
	--apsad-teal-600: #3a99a5;
	--apsad-blue: #4775af;
	--apsad-ink: #16162a;
	--apsad-muted: #6b6b85;
	--apsad-surface: #f8f8fb;
	--apsad-border: #e2e2eb;
	--apsad-gradient: linear-gradient(120deg, #77c8d0 0%, #4775af 52%, #38338a 100%);
	--apsad-shadow-sm: 0 2px 8px rgba(56, 51, 138, 0.08);
	--apsad-shadow-md: 0 6px 20px rgba(56, 51, 138, 0.1);
	--apsad-shadow-lg: 0 14px 40px rgba(56, 51, 138, 0.14);
	--apsad-radius-md: 12px;
	--apsad-radius-lg: 16px;
	--apsad-radius-xl: 20px;
	--apsad-radius-2xl: 28px;
	--apsad-radius-pill: 999px;
}

html {
	scroll-behavior: smooth;
}

body {
	background: var(--apsad-surface);
	color: var(--apsad-ink);
	-webkit-font-smoothing: antialiased;
}

a {
	text-underline-offset: 0.18em;
}

:where(a, button, input, select, textarea):focus-visible {
	outline: 3px solid rgba(71, 117, 175, 0.45);
	outline-offset: 3px;
}

.apsad-site-header {
	position: sticky;
	z-index: 50;
	top: 0;
	border-bottom: 1px solid rgba(226, 226, 235, 0.85);
	background: rgba(255, 255, 255, 0.9);
	box-shadow: var(--apsad-shadow-sm);
	backdrop-filter: blur(12px);
}

.apsad-site-header .wp-block-site-title {
	margin: 0;
	font-size: clamp(1.35rem, 2vw, 1.75rem);
	letter-spacing: -0.03em;
}

.apsad-site-header .wp-block-site-title a {
	color: var(--apsad-ink);
	text-decoration: none;
}

.apsad-site-header .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--outfit);
	font-weight: 650;
	text-decoration: none;
}

.apsad-site-header .apsad-mobile-only {
	display: none;
}

.apsad-page-shell {
	min-height: 60vh;
}

.apsad-page-shell > .wp-block-post-content.alignfull {
	width: 100%;
	max-width: none;
}

.apsad-page-shell > .wp-block-post-content > :not(.alignfull):not(.alignwide) {
	width: min(820px, calc(100% - 48px));
	margin-right: auto;
	margin-left: auto;
}

.apsad-page-shell > .wp-block-post-content > .alignwide {
	width: min(1180px, calc(100% - 48px));
	max-width: none;
	margin-right: auto;
	margin-left: auto;
}

.apsad-page-shell > .wp-block-post-content > .alignfull {
	width: 100%;
	max-width: none;
}

.apsad-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	border-radius: var(--apsad-radius-2xl);
	background: var(--apsad-gradient);
	box-shadow: var(--apsad-shadow-lg);
}

.apsad-hero::before,
.apsad-hero::after {
	position: absolute;
	z-index: -1;
	width: 24rem;
	height: 24rem;
	border: 2px solid rgba(255, 255, 255, 0.16);
	border-radius: 50%;
	content: "";
}

.apsad-hero::before {
	top: -12rem;
	right: -6rem;
}

.apsad-hero::after {
	right: 8rem;
	bottom: -19rem;
}

.apsad-eyebrow {
	font-family: var(--wp--preset--font-family--outfit);
	font-size: 0.78rem;
	font-weight: 750;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.apsad-section {
	padding-block: clamp(3rem, 6vw, 6rem);
}

.apsad-section-heading {
	max-width: 46rem;
}

.apsad-home-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--apsad-gradient);
	color: #fff;
}

.apsad-home-hero::before,
.apsad-home-hero::after {
	position: absolute;
	z-index: -1;
	border: 2px solid rgba(255, 255, 255, 0.15);
	border-radius: 50%;
	content: "";
}

.apsad-home-hero::before {
	right: -8rem;
	bottom: -14rem;
	width: 30rem;
	height: 30rem;
}

.apsad-home-hero::after {
	right: 8rem;
	bottom: -17rem;
	width: 24rem;
	height: 24rem;
}

.apsad-home-hero h1 {
	max-width: 14ch;
	color: #fff;
}

.apsad-home-hero p {
	color: rgba(255, 255, 255, 0.9);
}

.apsad-home-stats {
	position: relative;
	z-index: 3;
	margin-top: -3rem;
}

.apsad-feature-panel {
	background: linear-gradient(135deg, #f0f5fb, #fff 70%);
}

.apsad-final-cta {
	overflow: hidden;
	border-radius: var(--apsad-radius-xl);
	background: var(--apsad-gradient);
	box-shadow: var(--apsad-shadow-lg);
}

.apsad-panel {
	border: 1px solid var(--apsad-border);
	border-radius: var(--apsad-radius-xl);
	background: #fff;
	box-shadow: var(--apsad-shadow-md);
}

.apsad-news-query .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
}

.apsad-news-query .wp-block-post {
	overflow: hidden;
	border: 1px solid var(--apsad-border);
	border-radius: var(--apsad-radius-lg);
	background: #fff;
	box-shadow: var(--apsad-shadow-sm);
}

.apsad-news-query .wp-block-post:first-child {
	grid-column: span 2;
	grid-row: span 2;
}

.apsad-news-query .wp-block-post-featured-image {
	margin: 0;
}

.apsad-news-query .wp-block-post-title,
.apsad-news-query .wp-block-post-excerpt,
.apsad-news-query .wp-block-post-date {
	padding-inline: 1.5rem;
}

.apsad-news-query .wp-block-post-date {
	padding-top: 1.25rem;
	color: var(--apsad-muted);
	font-size: 0.82rem;
}

.apsad-news-query .wp-block-post-excerpt {
	padding-bottom: 1.5rem;
}

.apsad-pricing-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
	gap: 1.25rem;
}

.apsad-price-card {
	overflow: hidden;
	border: 1px solid var(--apsad-border);
	border-radius: var(--apsad-radius-lg);
	background: #fff;
	box-shadow: var(--apsad-shadow-md);
}

.apsad-price-card > .wp-block-group:first-child {
	min-height: 4.25rem;
}

.apsad-price-card > .wp-block-group:first-child h3 {
	overflow-wrap: anywhere;
}

.apsad-price-card .apsad-price-values {
	margin-top: auto;
	border-top: 1px solid var(--apsad-border);
	padding-top: 1rem;
}

.apsad-footer {
	margin-top: clamp(3rem, 7vw, 7rem);
	background: var(--apsad-indigo-900);
	color: #fff;
}

.apsad-footer a {
	color: rgba(255, 255, 255, 0.82);
}

.apsad-footer a:hover {
	color: #fff;
}

@media (max-width: 1080px) {
	.apsad-site-header > .wp-block-group {
		gap: 1rem;
	}
}

@media (max-width: 782px) {
	.apsad-site-header {
		position: relative;
	}

	.apsad-news-query .wp-block-post-template,
	.apsad-pricing-grid {
		grid-template-columns: 1fr;
	}

	.apsad-news-query .wp-block-post:first-child {
		grid-column: auto;
		grid-row: auto;
	}

	.apsad-hero {
		border-radius: var(--apsad-radius-xl);
	}

	.apsad-home-hero > .wp-block-group {
		padding-top: 4rem !important;
		padding-bottom: 5rem !important;
	}

	.apsad-home-stats {
		margin-top: -2rem;
	}

	.apsad-site-header .apsad-mobile-only {
		display: block;
	}

	.apsad-site-header > .wp-block-group {
		padding-right: 1rem;
		padding-left: 1rem;
	}
}

@media (max-width: 600px) {
	.apsad-site-header .wp-block-site-title {
		font-size: 1.25rem;
	}

	.apsad-site-header > .wp-block-group > .apsad-button {
		display: none;
	}

	.apsad-page-shell > .wp-block-post-content > :not(.alignfull):not(.alignwide),
	.apsad-page-shell > .wp-block-post-content > .alignwide {
		width: min(calc(100% - 32px), 1180px);
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
