/*
Theme Name: Silver Age Vesontio
Theme URI: https://silveragevesontio.com
Description: Thème enfant de Twenty Twenty-Four pour Silver Age Vesontio, association bisontine. Met en avant les Besançon Senior Games 2028, le mécénat et les partenariats.
Author: Silver Age Vesontio
Author URI: https://silveragevesontio.com
Template: twentytwentyfour
Version: 1.3.0
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: silveragevesontio-child
*/

:root {
	--sav-navy:    #152848;
	--sav-brand:   #2c5582;
	--sav-cyan:    #4fb8d3;
	--sav-bright:  #6fd3eb;
	--sav-cream:   #f4f0e8;
	--sav-paper:   #f8fafc;
	--sav-ink:     #0e1a2e;
	--sav-muted:   #46587a;
	--sav-border:  rgba(14, 26, 46, 0.08);
	--sav-shadow:    0 12px 40px -16px rgba(14, 26, 46, 0.25);
	--sav-shadow-lg: 0 24px 60px -20px rgba(14, 26, 46, 0.35);
}

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

/* ---------- Header ---------- */
.wp-block-template-part header.wp-block-template-part {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: saturate(150%) blur(12px);
	-webkit-backdrop-filter: saturate(150%) blur(12px);
	border-bottom: 1px solid var(--sav-border);
}
.sav-header { padding-block: clamp(0.6rem, 1.2vw, 1rem) !important; }
.sav-logo img { height: clamp(40px, 6vw, 56px) !important; width: auto !important; display: block; }
.sav-header .wp-block-navigation a.wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--sav-display);
	font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em; color: var(--sav-ink);
}
.sav-header .wp-block-navigation a.wp-block-navigation-item__content:hover { color: var(--sav-brand); }

/* ---------- Hero ---------- */
.sav-hero { position: relative; overflow: hidden; isolation: isolate; }
.sav-hero::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background:
		radial-gradient(60% 80% at 80% 20%, rgba(111, 211, 235, 0.35), transparent 60%),
		radial-gradient(50% 70% at 15% 90%, rgba(79, 184, 211, 0.25), transparent 60%),
		linear-gradient(135deg, #0e1a2e 0%, #152848 35%, #2c5582 70%, #4fb8d3 100%);
}
.sav-hero-eyebrow {
	display: inline-flex; align-items: center; gap: 0.6em;
	padding: 0.5em 1em; border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.18);
	color: var(--sav-bright);
	font-family: var(--wp--preset--font-family--sav-display);
	font-weight: 600; font-size: 0.78rem;
	letter-spacing: 0.16em; text-transform: uppercase;
}
.sav-hero-eyebrow::before {
	content: ""; width: 8px; height: 8px; border-radius: 50%;
	background: var(--sav-bright); box-shadow: 0 0 12px rgba(111, 211, 235, 0.8);
}
.sav-hero-logo { max-width: clamp(140px, 22vw, 200px); height: auto;
	filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35)); }

/* ---------- Section dark (replaces wp:cover for Partenariat) ---------- */
.sav-section-dark {
	position: relative; overflow: hidden; isolation: isolate;
	color: #fff;
	background: linear-gradient(135deg, #0e1a2e 0%, #152848 35%, #2c5582 80%, #4fb8d3 110%);
}
.sav-section-dark::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background:
		radial-gradient(50% 80% at 85% 30%, rgba(111, 211, 235, 0.20), transparent 60%),
		radial-gradient(50% 80% at 10% 100%, rgba(44, 85, 130, 0.4), transparent 60%);
}
.sav-section-dark h2,
.sav-section-dark h3,
.sav-section-dark p,
.sav-section-dark strong,
.sav-section-dark li,
.sav-section-dark .sav-num-desc {
	color: inherit !important;
}

/* ---------- Badges ---------- */
.sav-event-badge {
	display: inline-block;
	background: linear-gradient(135deg, var(--sav-brand), var(--sav-cyan));
	color: #fff; padding: 0.4em 0.95em; border-radius: 999px;
	font-family: var(--wp--preset--font-family--sav-display);
	font-size: 0.82rem; font-weight: 700;
	letter-spacing: 0.06em; text-transform: uppercase;
	box-shadow: 0 6px 18px -6px rgba(44, 85, 130, 0.55);
}

.sav-section-eyebrow {
	font-family: var(--wp--preset--font-family--sav-display);
	font-weight: 700; font-size: 0.8rem;
	letter-spacing: 0.18em; text-transform: uppercase;
	color: var(--sav-brand);
}

/* ---------- Cards ---------- */
.sav-card {
	background: #fff;
	border: 1px solid var(--sav-border);
	border-radius: 18px;
	padding: clamp(1.5rem, 3vw, 2.25rem) !important;
	box-shadow: var(--sav-shadow);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	height: 100%;
}
.sav-card--auto { height: auto !important; }
.sav-card:hover { transform: translateY(-4px); box-shadow: var(--sav-shadow-lg); }
.sav-card-icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 52px; height: 52px; border-radius: 14px;
	background: linear-gradient(135deg, var(--sav-brand), var(--sav-cyan));
	color: #fff; font-size: 1.5rem; font-weight: 700;
	margin-bottom: 1rem;
	box-shadow: 0 8px 20px -6px rgba(44, 85, 130, 0.45);
}

/* ---------- Photo cards (rounded image displays) ---------- */
.sav-photo {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: var(--sav-shadow);
	background: #f0f4f8;
}
.sav-photo img { display: block; width: 100%; height: auto; }
.sav-photo--cover img { aspect-ratio: 4/3; object-fit: cover; }
.sav-photo--portrait img { aspect-ratio: 3/4; object-fit: cover; }
.sav-photo--logo {
	display: flex; align-items: center; justify-content: center;
	padding: clamp(1.5rem, 4vw, 3rem);
	background: #fff;
	border-radius: 18px;
	box-shadow: var(--sav-shadow);
}
.sav-photo--logo img { max-width: 100%; height: auto; }

.sav-photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(0.75rem, 1.5vw, 1rem); }

/* ---------- Stats row (hero) ---------- */
.sav-stats {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	gap: clamp(0.5rem, 1.2vw, 1rem);
}
.sav-stats > * {
	text-align: center;
	padding: clamp(1rem, 2vw, 1.5rem) clamp(0.4rem, 1vw, 0.85rem);
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 14px;
	backdrop-filter: blur(8px);
}
.sav-stat-num {
	display: block;
	font-family: var(--wp--preset--font-family--sav-display);
	font-weight: 800; font-size: clamp(1.75rem, 3.5vw, 2.85rem); line-height: 1;
	background: linear-gradient(135deg, #fff 0%, var(--sav-bright) 100%);
	-webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent; color: transparent;
	letter-spacing: -0.02em;
}
.sav-stat-label {
	display: block; margin-top: 0.5rem;
	font-family: var(--wp--preset--font-family--sav-display);
	font-size: 0.72rem; font-weight: 600;
	letter-spacing: 0.1em; text-transform: uppercase;
	color: rgba(255, 255, 255, 0.85);
}

/* ---------- Numbered list ---------- */
.sav-numbered { list-style: none !important; counter-reset: sav 0; padding: 0 !important; margin: 0 !important; }
.sav-numbered li {
	display: grid;
	grid-template-columns: 44px 1fr;
	gap: clamp(0.85rem, 2vw, 1.25rem);
	align-items: flex-start;
	padding: clamp(0.85rem, 1.5vw, 1.1rem) 0;
	border-top: 1px solid var(--sav-border);
}
.sav-numbered li:first-child { border-top: none; padding-top: 0; }
.sav-numbered li::before {
	counter-increment: sav;
	content: counter(sav, decimal-leading-zero);
	display: flex; align-items: center; justify-content: center;
	width: 44px; height: 44px;
	background: var(--sav-ink); color: #fff;
	font-family: var(--wp--preset--font-family--sav-display);
	font-weight: 700; font-size: 0.85rem;
	border-radius: 999px;
	letter-spacing: 0.04em;
}
.sav-numbered strong {
	display: block;
	font-family: var(--wp--preset--font-family--sav-display);
	font-weight: 700; font-size: 1.05rem;
	color: var(--sav-ink); margin-bottom: 0.2rem;
}
.sav-numbered .sav-num-desc { color: var(--sav-muted); font-size: 0.95rem; line-height: 1.55; }

.sav-numbered--dark li { border-top-color: rgba(255, 255, 255, 0.15) !important; }
.sav-numbered--dark li::before { background: var(--sav-bright) !important; color: var(--sav-ink) !important; }
.sav-numbered--dark strong { color: #fff !important; }
.sav-numbered--dark .sav-num-desc { color: rgba(255, 255, 255, 0.82) !important; }

/* ---------- Timeline ---------- */
.sav-timeline { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.sav-timeline-item {
	display: grid;
	grid-template-columns: clamp(120px, 18vw, 160px) 1fr;
	gap: clamp(1rem, 2.5vw, 1.75rem);
	align-items: flex-start;
	padding: clamp(1rem, 2vw, 1.5rem) 0;
	border-top: 1px solid var(--sav-border);
}
.sav-timeline-item:first-child { border-top: none; padding-top: 0; }
.sav-timeline-date {
	font-family: var(--wp--preset--font-family--sav-display);
	font-weight: 800; color: var(--sav-brand);
	font-size: 0.95rem; letter-spacing: 0.03em;
}
.sav-timeline-date span { display: block; font-size: 1.65rem; line-height: 1; margin-top: 0.2rem; color: var(--sav-ink); letter-spacing: -0.02em; }
.sav-timeline-text { color: var(--sav-muted); line-height: 1.6; }
.sav-timeline-text strong { color: var(--sav-ink); font-weight: 600; }

/* ---------- Identity ---------- */
.sav-identity {
	background: #fff; border: 1px solid var(--sav-border);
	border-radius: 18px; padding: clamp(1.5rem, 3vw, 2.5rem) !important;
	box-shadow: var(--sav-shadow);
}
.sav-identity dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 1.5rem; margin: 0; }
.sav-identity dt {
	font-family: var(--wp--preset--font-family--sav-display);
	font-weight: 700; font-size: 0.78rem;
	letter-spacing: 0.1em; text-transform: uppercase;
	color: var(--sav-brand); white-space: nowrap; padding-top: 0.15em;
}
.sav-identity dd { margin: 0; color: var(--sav-ink); }

/* ---------- Buttons ---------- */
.wp-element-button,
.wp-block-button__link {
	font-family: var(--wp--preset--font-family--sav-display) !important;
	font-weight: 600; letter-spacing: 0.01em;
	padding: 0.85em 1.6em !important;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link {
	box-shadow: 0 8px 20px -6px rgba(44, 85, 130, 0.45);
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(44, 85, 130, 0.55);
}
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent !important; }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: rgba(255, 255, 255, 0.12) !important; }

/* ---------- Form ---------- */
.sav-form {
	background: #fff;
	border: 1px solid var(--sav-border);
	border-radius: 22px;
	padding: clamp(1.5rem, 3vw, 2.5rem);
	box-shadow: var(--sav-shadow-lg);
	display: grid; gap: 1rem;
}
.sav-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.sav-form label {
	display: block;
	font-family: var(--wp--preset--font-family--sav-display);
	font-weight: 600; font-size: 0.85rem;
	color: var(--sav-ink); margin-bottom: 0.4rem;
	letter-spacing: 0.01em;
}
.sav-form label .sav-req { color: var(--sav-cyan); }
.sav-form input[type="text"],
.sav-form input[type="email"],
.sav-form textarea {
	width: 100%; box-sizing: border-box;
	padding: 0.85em 1em;
	font: inherit; color: var(--sav-ink);
	background: #f8fafc;
	border: 1.5px solid var(--sav-border);
	border-radius: 12px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.sav-form input:focus,
.sav-form textarea:focus {
	outline: none;
	background: #fff;
	border-color: var(--sav-brand);
	box-shadow: 0 0 0 4px rgba(44, 85, 130, 0.15);
}
.sav-form textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.sav-form-hp { position: absolute; left: -9999px; height: 0; width: 0; opacity: 0; pointer-events: none; }
.sav-form-button {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 0.95em 1.8em;
	background: linear-gradient(135deg, var(--sav-brand), var(--sav-cyan));
	color: #fff !important;
	font-family: var(--wp--preset--font-family--sav-display);
	font-weight: 700; font-size: 1rem;
	border: none; border-radius: 999px;
	cursor: pointer;
	box-shadow: 0 8px 20px -6px rgba(44, 85, 130, 0.55);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sav-form-button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(44, 85, 130, 0.65); }
.sav-form-button:disabled { opacity: 0.55; cursor: progress; }
.sav-form-status {
	padding: 0.85em 1em; border-radius: 12px;
	font-size: 0.95rem; line-height: 1.55;
	display: none;
}
.sav-form-status.is-visible { display: block; }
.sav-form-status.is-success { background: rgba(79, 184, 211, 0.12); color: var(--sav-brand); border: 1px solid rgba(79, 184, 211, 0.3); }
.sav-form-status.is-error { background: rgba(220, 38, 38, 0.08); color: #b91c1c; border: 1px solid rgba(220, 38, 38, 0.25); }
.sav-form-consent {
	font-size: 0.85rem; color: var(--sav-muted); line-height: 1.5;
}

/* ---------- Footer ---------- */
.sav-footer { background: var(--sav-ink) !important; color: rgba(255, 255, 255, 0.8); }
.sav-footer a { color: var(--sav-bright); text-decoration: none; }
.sav-footer a:hover { text-decoration: underline; }
.sav-footer-logo img {
	height: clamp(56px, 8vw, 72px) !important; width: auto !important;
	filter: brightness(0) invert(1) opacity(0.95);
}

/* ---------- Responsive ---------- */
@media (max-width: 781px) {
	html { scroll-padding-top: 4rem; }
	.sav-stats { grid-template-columns: repeat(2, 1fr); }
	.sav-identity dl { grid-template-columns: 1fr; gap: 0.2rem; }
	.sav-identity dt { padding-top: 0.75rem; }
	.sav-identity dt:first-of-type { padding-top: 0; }
	.sav-timeline-item { grid-template-columns: 1fr; gap: 0.5rem; }
	.sav-form-row { grid-template-columns: 1fr; }
	.sav-photo-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
	.sav-stats { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
	.sav-stat-num { font-size: clamp(1.5rem, 7vw, 2.25rem); }
	.sav-stat-label { font-size: 0.65rem; letter-spacing: 0.08em; }
	.sav-numbered li { grid-template-columns: 36px 1fr; gap: 0.75rem; }
	.sav-numbered li::before { width: 36px; height: 36px; font-size: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.sav-card { transition: none; }
	.sav-card:hover { transform: none; }
	.wp-element-button, .wp-block-button__link, .sav-form-button { transition: none; }
	.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { transform: none; }
}
