/*
Theme Name: Cross Tri Jablines
Description: Thème enfant de Twenty Twenty-Five pour le Cross Triathlon de Jablines-Annet : couleurs nature, en-tête fixe, menu mobile, cartes animées.
Author: Villepinte Aulnay Triathlon
Template: twentytwentyfive
Version: 1.4.0
Requires at least: 6.7
Requires PHP: 7.4
Text Domain: crosstri
*/

/* ---------- En-tête fixe ---------- */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 100;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	color: #fff;
}
/* Flou sur un pseudo-élément : sur l'en-tête lui-même, il enfermerait le menu mobile plein écran */
header.wp-block-template-part::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(15, 42, 18, 0.94);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}
.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) {
	.admin-bar header.wp-block-template-part { top: 46px; }
}
@media (max-width: 600px) {
	.admin-bar header.wp-block-template-part { top: 0; }
}

.ctj-header .wp-block-site-logo img {
	width: min(320px, 62vw) !important;
	max-width: none;
	height: auto;
}

/* En-tête vert foncé : menu en blanc */
.ctj-header .wp-block-navigation-item__content,
.ctj-header .wp-block-navigation__submenu-icon,
.ctj-header .wp-block-navigation__responsive-container-open {
	color: #fff !important;
}
.ctj-header .wp-block-navigation__submenu-container {
	background: var(--wp--preset--color--accent-6) !important;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35) !important;
}
.ctj-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--accent-3) !important;
}

/* Bouton « S'inscrire » de l'en-tête */
.ctj-header-right { gap: 24px; }
.ctj-header-cta .wp-block-button__link {
	padding: 0.55rem 1.3rem;
	font-size: 0.95rem;
	white-space: nowrap;
}
/* Lien « S'inscrire » du menu : seulement dans le menu ☰ ouvert */
.ctj-header .ctj-nav-mobile-only { display: none !important; }
.ctj-header .is-menu-open .ctj-nav-mobile-only { display: flex !important; margin-top: 12px; }
.ctj-header .is-menu-open .ctj-nav-mobile-only .wp-block-navigation-item__content {
	color: var(--wp--preset--color--accent-3) !important;
	font-weight: 800;
}
/* Tablette : bouton avant le ☰ ; téléphone : bouton masqué (il est dans le menu) */
@media (max-width: 1023px) {
	.ctj-header-right { gap: 12px; }
	.ctj-header-cta { order: -1; }
}
@media (max-width: 599px) {
	.ctj-header-cta { display: none !important; }
}

/* Liens du menu : soulignement animé */
.ctj-header .wp-block-navigation-item__content {
	font-weight: 600;
	position: relative;
}
.ctj-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -4px;
	height: 2px;
	background: var(--wp--preset--color--accent-2);
	transform: scaleX(0);
	transition: transform 0.25s ease;
}
.ctj-header .wp-block-navigation__container > .wp-block-navigation-item:hover > .wp-block-navigation-item__content::after {
	transform: scaleX(1);
}

/* Sous-menus en cartes */
.ctj-header .wp-block-navigation__submenu-container {
	border: 0 !important;
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(15, 42, 18, 0.15);
	padding: 8px 0 !important;
	min-width: 230px !important;
}
.ctj-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 8px 18px !important;
}

/* Menu en bouton ☰ jusqu'aux tablettes (le cœur WordPress ne le fait que sous 600 px) */
@media (min-width: 600px) and (max-width: 1023px) {
	.ctj-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}
	.ctj-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

/* Menu mobile ouvert : plein écran vert */
.ctj-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--accent-6) !important;
	color: #fff !important;
	padding: 24px !important;
}
.ctj-header .is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 48px;
}
.ctj-header .is-menu-open .wp-block-navigation-item__content {
	font-size: 1.25rem;
	color: #fff !important;
}
.ctj-header .is-menu-open .wp-block-navigation__submenu-container {
	box-shadow: none;
	background: transparent !important;
	padding: 4px 0 4px 16px !important;
}
.ctj-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-size: 1rem;
	opacity: 0.85;
	padding: 4px 0 !important;
}
.ctj-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content::after {
	display: none;
}
.ctj-header .wp-block-navigation__responsive-container-open svg,
.ctj-header .wp-block-navigation__responsive-container-close svg {
	width: 32px;
	height: 32px;
}

/* ---------- Accueil : sections collées ---------- */
.ctj-front .wp-block-post-content > * {
	margin-block-start: 0;
	margin-block-end: 0;
}

.ctj-section {
	padding: clamp(48px, 8vw, 96px) 20px;
}
.ctj-section--soft {
	background: var(--wp--preset--color--accent-5);
}
.ctj-section h2 {
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	margin-bottom: 0.4em;
}
.ctj-lead {
	font-size: 1.1rem;
	opacity: 0.8;
	max-width: 640px;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* ---------- Bandeau principal ---------- */
.ctj-hero {
	position: relative;
	overflow: hidden;
	padding: clamp(56px, 9vw, 120px) 20px;
	color: #fff;
	background:
		radial-gradient(circle at 85% 20%, rgba(240, 122, 26, 0.35), transparent 45%),
		radial-gradient(circle at 10% 90%, rgba(245, 197, 24, 0.18), transparent 40%),
		linear-gradient(135deg, #0f2a12 0%, #2f5d1e 55%, #3f7a2a 100%);
	background-size: 140% 140%, 140% 140%, 100% 100%;
	animation: ctj-glow 14s ease-in-out infinite alternate;
}
@keyframes ctj-glow {
	from { background-position: 0% 0%, 0% 0%, 0 0; }
	to { background-position: 100% 60%, 60% 100%, 0 0; }
}
.ctj-hero h1 {
	font-size: clamp(2.3rem, 6vw, 4.2rem);
	line-height: 1.05;
	margin: 0.3em 0;
	color: #fff;
}
.ctj-hero p { color: rgba(255, 255, 255, 0.9); }
.ctj-hero .ctj-hero-text { font-size: 1.15rem; }

.ctj-pill {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.25);
	font-size: 0.9rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}
.ctj-date {
	font-weight: 800;
	font-size: 1.2rem;
	color: var(--wp--preset--color--accent-3) !important;
}

.ctj-flyer img {
	border-radius: 18px;
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
	transform: rotate(3deg);
	transition: transform 0.4s ease;
}
.ctj-flyer:hover img { transform: rotate(0) scale(1.02); }

/* Boutons contour sur fond sombre */
.ctj-dark .is-style-outline .wp-block-button__link {
	color: #fff !important;
	border-color: rgba(255, 255, 255, 0.7) !important;
	background: transparent !important;
}
.ctj-dark .is-style-outline .wp-block-button__link:hover {
	background: #fff !important;
	color: var(--wp--preset--color--accent-6) !important;
}

.wp-block-button__link {
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(240, 122, 26, 0.3);
}

/* ---------- Chiffres clés ---------- */
.ctj-stats {
	background: var(--wp--preset--color--accent-2);
	color: #fff;
	padding: 28px 20px;
}
.ctj-stats .wp-block-columns { margin: 0; }
.ctj-stats p { margin: 0; text-align: center; color: #fff; }
.ctj-stat-num {
	font-size: clamp(1.6rem, 3.5vw, 2.2rem);
	font-weight: 800;
	line-height: 1.1;
}

/* ---------- Cartes ---------- */
.ctj-card {
	position: relative;
	background: #fff;
	border-radius: 20px;
	padding: 28px !important;
	box-shadow: 0 6px 24px rgba(15, 42, 18, 0.08);
	border-top: 5px solid var(--wp--preset--color--accent-1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ctj-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 18px 40px rgba(15, 42, 18, 0.16);
}
.ctj-card--xs { border-top-color: var(--wp--preset--color--accent-2); }
.ctj-card--m { border-top-color: var(--wp--preset--color--accent-1); }
.ctj-card h3 { margin-top: 0.3em; font-size: 1.6rem; }

.ctj-tag {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--wp--preset--color--accent-5);
	color: var(--wp--preset--color--accent-1);
	font-weight: 700;
	font-size: 0.85rem;
	margin: 0;
}

.ctj-legs {
	list-style: none;
	padding: 0 !important;
	margin: 1em 0;
}
.ctj-legs li {
	display: flex;
	align-items: baseline;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px dashed rgba(15, 42, 18, 0.15);
}
.ctj-legs li:last-child { border-bottom: 0; }
.ctj-legs strong {
	min-width: 90px;
	font-size: 1.35rem;
	color: var(--wp--preset--color--accent-6);
}

/* Carte entièrement cliquable */
.ctj-card--link a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 20px;
}
.ctj-card--link h3 a {
	text-decoration: none;
	color: inherit;
}
.ctj-card--link h3 a:hover { color: var(--wp--preset--color--accent-2); }
.ctj-arrow {
	font-weight: 700;
	color: var(--wp--preset--color--accent-2);
	margin-bottom: 0;
}

/* ---------- Bande résultats ---------- */
.ctj-band {
	padding: clamp(40px, 6vw, 72px) 20px;
	color: #fff;
	background: linear-gradient(120deg, #0f2a12, #2f5d1e);
}
.ctj-band h2 { color: #fff; margin-top: 0; }
.ctj-band p { color: rgba(255, 255, 255, 0.85); }
.ctj-live {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	color: var(--wp--preset--color--accent-3) !important;
	margin: 0;
}
.ctj-live::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #ff4d3d;
	animation: ctj-pulse 1.6s ease-out infinite;
}
@keyframes ctj-pulse {
	0% { box-shadow: 0 0 0 0 rgba(255, 77, 61, 0.7); }
	100% { box-shadow: 0 0 0 12px rgba(255, 77, 61, 0); }
}

/* ---------- Bandeau des pages intérieures ---------- */
.ctj-page-hero {
	padding: clamp(48px, 7vw, 88px) 20px;
	color: #fff;
	text-align: center;
	background:
		radial-gradient(circle at 85% 20%, rgba(240, 122, 26, 0.35), transparent 45%),
		linear-gradient(135deg, #0f2a12 0%, #2f5d1e 60%, #3f7a2a 100%);
}
.ctj-page-hero h1 {
	font-size: clamp(2.1rem, 5vw, 3.4rem);
	color: #fff;
	margin: 0.3em 0;
}
.ctj-page-hero p { color: rgba(255, 255, 255, 0.9); }

/* ---------- Étapes numérotées ---------- */
.ctj-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-2);
	color: #fff !important;
	font-weight: 800;
	font-size: 1.2rem;
	margin: 0;
}

/* ---------- Tableau des tarifs ---------- */
.ctj-table table {
	border-collapse: separate;
	border-spacing: 0;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 6px 24px rgba(15, 42, 18, 0.08);
	background: #fff;
}
.ctj-table th,
.ctj-table td {
	border: 0 !important;
	border-bottom: 1px solid rgba(15, 42, 18, 0.08) !important;
	padding: 14px 18px !important;
	text-align: left;
}
.ctj-table thead th {
	background: var(--wp--preset--color--accent-6);
	color: #fff;
}
.ctj-table tbody tr:last-child td { border-bottom: 0 !important; }
.ctj-table td:first-child { font-weight: 700; }

/* ---------- Questions dépliables ---------- */
.ctj-faq .wp-block-details {
	background: #fff;
	border-radius: 14px;
	padding: 16px 20px;
	margin-bottom: 12px;
	box-shadow: 0 4px 16px rgba(15, 42, 18, 0.06);
}
.ctj-faq .wp-block-details summary {
	font-weight: 700;
	cursor: pointer;
}
.ctj-faq .wp-block-details[open] summary {
	color: var(--wp--preset--color--accent-2);
	margin-bottom: 8px;
}

/* ---------- Encadré d'alerte (classe à ajouter dans l'éditeur : ctj-alerte) ---------- */
.ctj-alerte {
	position: relative;
	opacity: 1 !important;
	max-width: 640px;
	margin-left: auto !important;
	margin-right: auto !important;
	padding: 16px 20px 16px 56px !important;
	border-left: 5px solid var(--wp--preset--color--accent-2);
	border-radius: 12px;
	background: #fff3e6;
	color: var(--wp--preset--color--contrast) !important;
	font-weight: 600;
	text-align: left !important;
	box-shadow: 0 4px 16px rgba(232, 111, 18, 0.12);
}
.ctj-alerte::before {
	content: "!";
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-2);
	color: #fff;
	font-weight: 800;
	font-size: 0.95rem;
}

/* ---------- Tuiles des années (page Résultats) ---------- */
.ctj-year { margin: 0 !important; }
.ctj-year a {
	display: block;
	padding: 22px 8px;
	text-align: center;
	font-size: 1.6rem;
	font-weight: 800;
	text-decoration: none;
	color: var(--wp--preset--color--accent-6);
	background: #fff;
	border-radius: 16px;
	border-bottom: 4px solid var(--wp--preset--color--accent-1);
	box-shadow: 0 4px 16px rgba(15, 42, 18, 0.08);
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.ctj-year a:hover,
.ctj-year a:focus-visible {
	transform: translateY(-4px);
	background: var(--wp--preset--color--accent-1);
	color: #fff;
}

/* Année sans course : tuile grisée, non cliquable */
.ctj-year--off {
	padding: 14px 8px 12px;
	text-align: center;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--wp--preset--color--accent-4);
	background: transparent;
	border: 2px dashed rgba(15, 42, 18, 0.2);
	border-radius: 16px;
}
.ctj-year--off::first-line {
	font-size: 1.6rem;
	font-weight: 800;
}

/* ---------- Programme horaire (page Dossards et horaires) ---------- */
.ctj-schedule {
	list-style: none;
	padding: 0 !important;
	margin: 1em 0;
}
.ctj-schedule li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 9px 0;
	border-bottom: 1px dashed rgba(15, 42, 18, 0.15);
}
.ctj-schedule li:last-child { border-bottom: 0; }
.ctj-schedule strong {
	font-weight: 600;
	color: var(--wp--preset--color--accent-4);
}
.ctj-schedule em {
	font-style: normal;
	font-weight: 800;
	color: var(--wp--preset--color--accent-6);
	text-align: right;
}

/* ---------- Page Parcours ---------- */
.ctj-map img {
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(15, 42, 18, 0.18);
	cursor: zoom-in;
}
.ctj-map figcaption {
	text-align: center;
	font-size: 0.9rem;
	opacity: 0.75;
}
.ctj-card--swim { border-top-color: #2b7bb9; }
.ctj-card--bike { border-top-color: var(--wp--preset--color--accent-2); }
.ctj-card--run { border-top-color: #c8331f; }

/* Carte interactive [carte-parcours] */
.ctj-parcours {
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(15, 42, 18, 0.18);
}
.ctj-parcours__formats {
	display: flex;
	gap: 8px;
	padding: 12px;
	background: var(--wp--preset--color--accent-6);
}
.ctj-parcours__formats button {
	flex: 1;
	padding: 10px 14px;
	border: 2px solid rgba(255, 255, 255, 0.25);
	border-radius: 12px;
	background: transparent;
	color: #fff;
	font: inherit;
	text-align: center;
	cursor: pointer;
}
.ctj-parcours__formats button b { display: block; font-size: 1.05rem; }
.ctj-parcours__formats button span { font-size: 0.85rem; opacity: 0.8; }
.ctj-parcours__formats button[aria-pressed="true"] {
	border-color: var(--wp--preset--color--accent-3);
	background: var(--wp--preset--color--accent-3);
	color: var(--wp--preset--color--accent-6);
}
.ctj-parcours__formats button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
/* Seules les infos de la distance choisie sont visibles */
.ctj-parcours[data-format="s"] .ctj-parcours__ligne [data-format="m"],
.ctj-parcours[data-format="m"] .ctj-parcours__ligne [data-format="s"] { display: none; }
.ctj-parcours__carte {
	height: clamp(380px, 65vh, 600px);
	background: var(--wp--preset--color--accent-5);
	z-index: 0; /* les volets de Leaflet restent sous l'en-tête fixe */
}
/* Jour de course : boutons « Où suis-je ? » et « Quadrillage », bandeau de position */
.ctj-outils { display: flex; flex-direction: column; background: #fff; }
.ctj-outil {
	padding: 7px 10px;
	border: 0;
	border-bottom: 1px solid #ccc;
	background: #fff;
	color: var(--wp--preset--color--accent-6);
	font: 700 13px/1.2 system-ui, sans-serif;
	text-align: left;
	white-space: nowrap;
	cursor: pointer;
}
.ctj-outil:last-child { border-bottom: 0; }
.ctj-outil:hover { background: var(--wp--preset--color--accent-5); }
.ctj-outil[aria-pressed="true"],
.ctj-outil.actif { background: var(--wp--preset--color--accent-3); }
.ctj-outil.attention { animation: ctj-attention 1.2s ease-in-out 5; }
@keyframes ctj-attention {
	50% { background: var(--wp--preset--color--accent-3); }
}
.ctj-grille-case {
	color: rgba(15, 42, 18, 0.65);
	font: 700 11px/1 system-ui, sans-serif;
	white-space: nowrap;
	transform: translate(4px, 3px);
	text-shadow: 0 0 2px #fff, 0 0 2px #fff;
	pointer-events: none;
}
.ctj-parcours__carte .ctj-position {
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 26px;
	z-index: 1001;
	padding: 10px 14px;
	border-left: 6px solid #1a73e8;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
	font-size: 0.95rem;
}
.ctj-parcours__carte .ctj-position[hidden] { display: none; }
.ctj-position__case { margin: 0; font-size: 1.35rem; font-weight: 800; color: var(--wp--preset--color--accent-6); }
.ctj-position__detail { margin: 2px 0 8px; color: var(--wp--preset--color--accent-4); }
.ctj-position__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ctj-position__actions button,
.ctj-position__actions a {
	padding: 7px 14px;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--accent-1);
	color: #fff;
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}
.ctj-position__actions .ctj-position__arreter { background: var(--wp--preset--color--accent-4); }

/* Téléphone : message quand on touche la carte avec un seul doigt */
.ctj-parcours__carte .ctj-parcours__deux-doigts {
	position: absolute;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(15, 42, 18, 0.55);
	color: #fff;
	font-weight: 700;
	font-size: 1.1rem;
	text-align: center;
	opacity: 0;
	transition: opacity 0.25s ease;
	pointer-events: none;
}
.ctj-parcours__carte .ctj-parcours__deux-doigts.visible { opacity: 1; }
.ctj-parcours__liste {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 4px solid var(--wp--preset--color--accent-1);
}
.ctj-parcours__ligne {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 24px;
	padding: 14px 20px;
	border-left: 6px solid var(--ctj-couleur);
}
.ctj-parcours__ligne + .ctj-parcours__ligne { border-top: 1px solid rgba(15, 42, 18, 0.1); }
.ctj-parcours__nom { min-width: 9em; font-weight: 700; color: var(--ctj-couleur); }
label.ctj-parcours__nom { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.ctj-parcours__nom input { accent-color: var(--ctj-couleur); width: 18px; height: 18px; }
.ctj-parcours__stat { font-size: 0.95rem; }
.ctj-parcours__stat:empty { display: none; }
.ctj-parcours__stat b { font-size: 1.2rem; color: var(--wp--preset--color--accent-1); }
.ctj-parcours__gpx {
	margin-left: auto;
	padding: 8px 18px;
	border-radius: 999px;
	background: var(--wp--preset--color--accent-2);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}
.ctj-parcours__gpx::before { content: "⬇ "; }
.ctj-parcours__gpx:hover,
.ctj-parcours__gpx:focus-visible { background: var(--wp--preset--color--accent-1); color: #fff; }
.ctj-parcours .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.ctj-km,
.ctj-repere {
	width: 22px;
	height: 22px;
	box-sizing: border-box;
	border: 2px solid var(--ctj-couleur);
	border-radius: 50%;
	background: #fff;
	color: var(--ctj-couleur);
	font: 700 11px/18px system-ui, sans-serif;
	text-align: center;
}
.ctj-repere { background: var(--wp--preset--color--accent-3); border-color: #14231a; color: #14231a; }
.ctj-point {
	width: 22px;
	height: 22px;
	box-sizing: border-box;
	border: 4px solid #fff;
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}
.ctj-point--depart { background: var(--wp--preset--color--accent-1); }
.ctj-point--arrivee { background: var(--wp--preset--color--accent-3); }
.ctj-point--parc { background: var(--wp--preset--color--accent-2); }
.ctj-fleche { width: 20px; height: 20px; }
.ctj-fleche svg { display: block; fill: #fff; stroke: #0f2a12; stroke-width: 1.5; stroke-linejoin: round; }
@media (max-width: 600px) {
	.ctj-parcours__gpx { margin-left: 0; }
}

/* ---------- Infos de course (articles) ---------- */
/* Sections masquées tant qu'aucune info n'est publiée */
.ctj-flash-wrap:not(:has(.wp-block-post)),
.ctj-news-wrap:not(:has(.wp-block-post)) {
	display: none;
}

/* Bandeau « Info flash » : articles épinglés */
.ctj-flash-wrap {
	background: var(--wp--preset--color--accent-2);
	color: #fff;
	padding: 16px 20px;
}
.ctj-flash-wrap .wp-block-post-template { margin: 0; padding: 0; }
.ctj-flash-wrap .wp-block-post + .wp-block-post {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid rgba(255, 255, 255, 0.3);
}
.ctj-flash-wrap .ctj-flash-label {
	display: inline-block;
	margin: 0 0 4px;
	padding: 2px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.2);
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.ctj-flash-wrap .wp-block-post-title {
	margin: 0;
	font-size: clamp(1.15rem, 2.5vw, 1.4rem);
	color: #fff;
}
.ctj-flash-wrap .wp-block-post-excerpt,
.ctj-flash-wrap .wp-block-post-excerpt__excerpt { margin: 4px 0 0; color: #fff; }
.ctj-flash-wrap a { color: #fff; text-decoration: underline; }

/* Cartes d'infos */
.ctj-news-wrap .wp-block-post-template { gap: 20px; }
.ctj-news-wrap .wp-block-post-title {
	margin: 0.4em 0;
	font-size: 1.25rem;
}
.ctj-news-wrap .wp-block-post-title a { text-decoration: none; color: inherit; }
.ctj-news-wrap .wp-block-post-title a:hover { color: var(--wp--preset--color--accent-2); }
.ctj-news-wrap .wp-block-post-date { margin: 0; }
.ctj-news-wrap .wp-block-post .ctj-card { height: 100%; }

/* ---------- Page Partenaires ---------- */
.ctj-partners { gap: 24px !important; }
.ctj-partners .ctj-card {
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.ctj-partner-logo {
	height: 130px;
	width: 100%;
	display: flex !important;
	align-items: center;
	justify-content: center;
	margin: 0 0 8px !important;
}
.ctj-partner-logo img {
	max-height: 120px !important;
	max-width: 85% !important;
	width: auto !important;
	height: auto;
	object-fit: contain;
	transition: transform 0.3s ease;
}
.ctj-partners .ctj-card:hover .ctj-partner-logo img { transform: scale(1.06); }
.ctj-partners .ctj-card h3 { font-size: 1.2rem; margin: 0.2em 0; }
.ctj-partners .ctj-card p { margin: 0.3em 0; }
.ctj-organisateur img { max-width: min(420px, 90%) !important; height: auto; }

/* Les ancres (#inscriptions…) ne passent pas sous l'en-tête fixe */
html { scroll-padding-top: 96px; }

/* ---------- Pied de page ---------- */
.ctj-footer {
	background: var(--wp--preset--color--accent-6);
	color: rgba(255, 255, 255, 0.85);
	padding: 56px 20px 24px;
}
.ctj-footer h2,
.ctj-footer h3 { color: #fff; }
.ctj-footer a {
	color: #fff;
	text-decoration: none;
}
.ctj-footer a:hover { color: var(--wp--preset--color--accent-3); }
.ctj-footer .ctj-footer-links p { margin: 0.35em 0; }
.ctj-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	padding-top: 20px;
	margin-top: 40px !important;
	font-size: 0.85rem;
	opacity: 0.7;
}

/* ---------- Formulaire bénévole [formulaire-benevole] ---------- */
.ctj-form {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 6px 24px rgba(15, 42, 18, 0.08);
	padding: clamp(20px, 4vw, 36px);
}
.ctj-form-ligne {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 20px;
}
.ctj-form-champ { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.ctj-form label,
.ctj-form legend { display: block; font-weight: 600; margin-bottom: 6px; }
.ctj-form input[type="text"],
.ctj-form input[type="email"],
.ctj-form input[type="tel"],
.ctj-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	font: inherit;
	border: 1px solid rgba(15, 42, 18, 0.25);
	border-radius: 10px;
	background: var(--wp--preset--color--accent-5);
}
.ctj-form input:focus,
.ctj-form textarea:focus {
	outline: 2px solid var(--wp--preset--color--accent-1);
	outline-offset: 1px;
	background: #fff;
}
.ctj-form [aria-invalid="true"] { border-color: var(--wp--preset--color--accent-2); }
.ctj-form-choix { display: flex; flex-wrap: wrap; gap: 10px; }
.ctj-form-choix label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 10px 16px;
	font-weight: 500;
	border: 1px solid rgba(15, 42, 18, 0.25);
	border-radius: 999px;
	cursor: pointer;
}
.ctj-form-choix label:has(input:checked) {
	border-color: var(--wp--preset--color--accent-1);
	background: var(--wp--preset--color--accent-5);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--accent-1);
}
.ctj-form-choix input,
.ctj-form-accord input { accent-color: var(--wp--preset--color--accent-1); }
.ctj-form-accord label { display: flex; gap: 10px; font-weight: 400; font-size: 0.92rem; }
.ctj-form-accord input { margin-top: 4px; flex: none; }
.ctj-form-option { font-weight: 400; color: var(--wp--preset--color--accent-4); }
.ctj-form-erreur { display: block; margin-top: 6px; color: #b4500a; font-size: 0.9rem; font-weight: 600; }
.ctj-form-alerte {
	margin: 0 0 20px;
	padding: 12px 16px;
	border-radius: 10px;
	background: #fdeee2;
	color: #7a3405;
}
.ctj-form-piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ctj-form button { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.ctj-form-merci {
	padding: clamp(20px, 4vw, 36px);
	border-radius: 16px;
	background: var(--wp--preset--color--accent-5);
	border-left: 6px solid var(--wp--preset--color--accent-1);
}
.ctj-form-merci p { margin: 0 0 8px; }
.ctj-form-merci p:last-child { margin: 0; }
#formulaire { scroll-margin-top: 90px; }

/* ---------- Apparition au défilement ----------
   La règle .ctj-reveal est ajoutée par functions.php sur le site public seulement :
   dans l'éditeur, elle laisserait les sections invisibles. */
@keyframes ctj-up {
	from { opacity: 0; transform: translateY(40px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.ctj-hero, .ctj-live::before { animation: none; }
	.ctj-card, .ctj-flyer img, .wp-block-button__link { transition: none; }
}

/* ---------- Téléphone ---------- */
@media (max-width: 781px) {
	.ctj-flyer img { transform: none; margin-top: 24px; }
	.ctj-form-ligne { grid-template-columns: 1fr; }
	.ctj-hero .wp-block-buttons { justify-content: flex-start; }
	.ctj-stats .wp-block-column + .wp-block-column {
		border-top: 1px solid rgba(255, 255, 255, 0.3);
		padding-top: 12px;
	}
}
