/**
 * Genève Urban Trail - Brand foundation (canonical, loaded by the plugin so it
 * works regardless of the active theme).
 * Tokens, typography (.font-display / .gut-display), shadows, radius, keyframes.
 */

/* Smooth anchor scrolling (e.g. infos sommaire → rubrique), unless reduced motion. */
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* Kill theme/browser OUTLINE on every GUT interactive element (hover/focus/active/click).
   Scoped to GUT modules; box-shadows are left untouched (they are part of the design). */
.fl-module[class*="fl-module-gut-"] a,
.fl-module[class*="fl-module-gut-"] a:hover,
.fl-module[class*="fl-module-gut-"] a:focus,
.fl-module[class*="fl-module-gut-"] a:focus-visible,
.fl-module[class*="fl-module-gut-"] a:active,
.fl-module[class*="fl-module-gut-"] button,
.fl-module[class*="fl-module-gut-"] button:hover,
.fl-module[class*="fl-module-gut-"] button:focus,
.fl-module[class*="fl-module-gut-"] button:focus-visible,
.fl-module[class*="fl-module-gut-"] button:active,
.fl-module[class*="fl-module-gut-"] [role="button"]:focus,
.fl-module[class*="fl-module-gut-"] [role="button"]:focus-visible,
.fl-module[class*="fl-module-gut-"] input:focus,
.fl-module[class*="fl-module-gut-"] select:focus,
.fl-module[class*="fl-module-gut-"] textarea:focus {
	outline: 0 !important;
	-webkit-tap-highlight-color: transparent !important;
}

/* Kill theme/browser BORDERS on GUT links & buttons, keeping the few intentional ones
   (race-selector pills, infos tabs, infos direct-link rows). */
.fl-module[class*="fl-module-gut-"] a:not(.gut-it__acc-link),
.fl-module[class*="fl-module-gut-"] a:not(.gut-it__acc-link):hover,
.fl-module[class*="fl-module-gut-"] a:not(.gut-it__acc-link):focus,
.fl-module[class*="fl-module-gut-"] a:not(.gut-it__acc-link):active,
.fl-module[class*="fl-module-gut-"] button:not(.gut-sel__pill):not(.gut-it__tab),
.fl-module[class*="fl-module-gut-"] button:not(.gut-sel__pill):not(.gut-it__tab):hover,
.fl-module[class*="fl-module-gut-"] button:not(.gut-sel__pill):not(.gut-it__tab):focus,
.fl-module[class*="fl-module-gut-"] button:not(.gut-sel__pill):not(.gut-it__tab):active {
	border: 0 !important;
}

:root {
	--gut-orange: #ec6436;
	--gut-green: #00a184;
	--gut-blue: #81d4da;
	--gut-yellow: #febf2c;
	--gut-purple: #7d7ebc;
	--gut-cream: #f0eeea;
	--gut-ink: #14110f;
	--gut-paper: #ffffff;

	--gut-shadow-sm: 0 1px 2px rgba(20, 17, 15, 0.04), 0 1px 3px rgba(20, 17, 15, 0.06);
	--gut-shadow: 0 4px 12px rgba(20, 17, 15, 0.06), 0 2px 4px rgba(20, 17, 15, 0.04);
	--gut-shadow-lg: 0 12px 32px rgba(20, 17, 15, 0.08), 0 4px 8px rgba(20, 17, 15, 0.04);
	--gut-shadow-xl: 0 24px 48px rgba(20, 17, 15, 0.10), 0 8px 16px rgba(20, 17, 15, 0.06);

	--gut-radius-sm: 12px;
	--gut-radius-md: 16px;
	--gut-radius-lg: 24px;
	--gut-radius-xl: 32px;
	--gut-radius-2xl: 40px;
	--gut-radius-pill: 9999px;

	--gut-font-display: 'Bungee', Impact, sans-serif;
	--gut-font-body: 'Open Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

/* ---------- Typography ---------- */
.font-display {
	font-family: 'Bungee', Impact, sans-serif;
	letter-spacing: 0;
	text-transform: uppercase;
	font-weight: 400;
	line-height: 0.95;
}

.gut-display {
	font-family: 'Bungee', Impact, sans-serif;
	font-weight: 400;
	line-height: 0.95;
	letter-spacing: 0;
	text-transform: uppercase;
}

.gut-body {
	font-family: var(--gut-font-body);
}

.gut-eyebrow {
	font-family: var(--gut-font-body);
	font-size: 11px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	font-weight: 700;
}

/* GUT display, numbers & eyebrow text: never break mid-word or hyphenate
   (Bungee / uppercase labels like "ÉPREUVES", "DÉCOUVERTE", race names). */
.font-display,
.gut-display,
.gut-eyebrow {
	overflow-wrap: normal;
	word-break: keep-all;
	hyphens: none;
}

/* ---------- Shared atoms ---------- */
.gut-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	border-radius: var(--gut-radius-pill);
	padding: 0.75rem 1.5rem;
	font-family: var(--gut-font-body);
	font-weight: 700;
	font-size: 0.95rem;
	line-height: 1;
	text-decoration: none;
	transition: transform .25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow .25s, background-color .25s;
}

.gut-pill:hover {
	transform: translateY(-2px);
	box-shadow: var(--gut-shadow-lg);
}

.gut-pill--orange {
	background: var(--gut-orange);
	color: #fff;
}

.gut-pill--ink {
	background: var(--gut-ink);
	color: #fff;
}

.gut-pill--ghost {
	background: transparent;
	color: var(--gut-ink);
	box-shadow: inset 0 0 0 2px rgba(20, 17, 15, 0.12);
}

.gut-pill--ghost:hover {
	box-shadow: inset 0 0 0 2px var(--gut-orange);
}

/* ---------- Reveal-on-scroll ---------- */
.gut-reveal {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity .7s cubic-bezier(0.22, 1, 0.36, 1), transform .7s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: opacity, transform;
}

.gut-reveal.is-visible {
	opacity: 1;
	transform: none;
}

.fl-builder-edit .gut-reveal {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.gut-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ====== Custom reveal-on-scroll - distinct animation per module type ====== */
/* Hidden until the wrapper enters the viewport (.is-visible added by gut-reveal.js). */
/* program-timeline is excluded: it is too tall to reveal as one block - its items reveal individually (see below). */
.fl-module[class*="fl-module-gut-"]:not([class*="gut-finish-stripe"]):not([class*="gut-program-timeline"]):not([class*="gut-banner-hero"]) {
	opacity: 0;
	will-change: opacity, transform;
}

.fl-builder-edit .fl-module[class*="fl-module-gut-"] {
	opacity: 1 !important;
}

/* Header & footer chrome (persistent across navigations, outside the swapped
   content): never reveal-animate, always visible. */
header[data-type="header"] .fl-module[class*="fl-module-gut-"],
footer[data-type="footer"] .fl-module[class*="fl-module-gut-"],
.fl-module-gut-footer-brand,
.fl-module-gut-social,
.fl-module-gut-footer-menu,
.fl-module-gut-contact-card,
.fl-module-gut-legal-strip,
.fl-module-gut-newsletter,
.fl-module-gut-contact-form {
	opacity: 1 !important;
	animation: none !important;
	transform: none !important;
}

/* Default - dynamic rise with a slight overshoot. */
.fl-module[class*="fl-module-gut-"].is-visible {
	animation: gut-rise .7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Big panels - cinematic wipe-up (reveals top → bottom). */
.fl-module-gut-photo-banner.is-visible,
.fl-module-gut-cta.is-visible {
	animation: gut-wipe .9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Highlight blocks - pop in with a springy ease. */
.fl-module-gut-dossard-counter.is-visible,
.fl-module-gut-course-map.is-visible,
.fl-module-gut-photo-route-map.is-visible,
.fl-module-gut-itinerary-ticket.is-visible {
	animation: gut-pop .7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Grids & sliders - the wrapper only fades; children come in staggered. */
.fl-module-gut-races-slider.is-visible,
.fl-module-gut-advantages-slider.is-visible,
.fl-module-gut-village-reveal.is-visible,
.fl-module-gut-stat.is-visible,
.fl-module-gut-partners-marquee.is-visible {
	animation: gut-fade .4s ease both;
}

/* Staggered children (delay driven by --gi set in JS). */
.fl-module-gut-races-slider.is-visible .gut-rc,
.fl-module-gut-advantages-slider.is-visible .gut-adv__card,
.fl-module-gut-village-reveal.is-visible .gut-vr__card,
.fl-module-gut-stat.is-visible .gut-stats__item {
	animation: gut-pop .6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
	animation-delay: calc(var(--gi, 0) * .08s);
}

/* Timeline - each item reveals individually as it scrolls in (the section is too tall to reveal at once). */
.fl-module-gut-program-timeline .gut-tl__item {
	opacity: 0;
	will-change: opacity, transform;
}

.fl-builder-edit .fl-module-gut-program-timeline .gut-tl__item {
	opacity: 1 !important;
}

.fl-module-gut-program-timeline .gut-tl__item.is-visible {
	animation: gut-rise .7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {

	.fl-module[class*="fl-module-gut-"],
	.fl-module[class*="fl-module-gut-"] .gut-rc,
	.fl-module[class*="fl-module-gut-"] .gut-adv__card,
	.fl-module[class*="fl-module-gut-"] .gut-vr__card,
	.fl-module[class*="fl-module-gut-"] .gut-stats__item,
	.fl-module[class*="fl-module-gut-"] .gut-tl__item {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
		clip-path: none !important;
	}
}

/* ---------- Keyframes ---------- */
@keyframes gut-marquee {
	from {
		transform: translateX(0);
	}

	to {
		transform: translateX(-50%);
	}
}

@keyframes gut-mascot-bounce {

	0%,
	100% {
		transform: translateY(0) rotate(-2deg);
	}

	50% {
		transform: translateY(-10px) rotate(2deg);
	}
}

@keyframes gut-banner-drift {

	0%,
	100% {
		transform: translate3d(0, 0, 0) scale(1);
	}

	50% {
		transform: translate3d(-3%, 2%, 0) scale(1.05);
	}
}

@keyframes gut-route-flow {
	to {
		stroke-dashoffset: -32;
	}
}

@keyframes gut-pulse-ring {
	0% {
		transform: scale(0.9);
		opacity: 0.6;
	}

	100% {
		transform: scale(1.8);
		opacity: 0;
	}
}

@keyframes gut-rise-in {
	from {
		opacity: 0;
		transform: translateY(28px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes gut-route-draw {
	to {
		stroke-dashoffset: 0;
	}
}

@keyframes gut-rise {
	0% {
		opacity: 0;
		transform: translateY(40px);
	}

	60% {
		opacity: 1;
		transform: translateY(-6px);
	}

	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes gut-pop {
	0% {
		opacity: 0;
		transform: scale(.9) translateY(14px);
	}

	100% {
		opacity: 1;
		transform: none;
	}
}

@keyframes gut-wipe {
	0% {
		opacity: 0;
		clip-path: inset(0 0 100% 0);
		transform: translateY(24px);
	}

	100% {
		opacity: 1;
		clip-path: inset(0 0 0 0);
		transform: none;
	}
}

@keyframes gut-fade {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}
/* Swup: hold GUT entrance animations while the curtain covers the swap, so they
   play AFTER the curtain has lifted (not behind the veil). Released on visit:end. */
html.gut-swapping .fl-page-content .fl-module[class*="fl-module-gut-"]:not([class*="gut-banner-hero"]):not([class*="gut-finish-stripe"]),
html.gut-swapping .fl-page-content .gut-hero__col--text,
html.gut-swapping .fl-page-content .gut-hero__col--visual {
	animation: none !important;
	opacity: 0 !important;
}

/* ---- Pages à hero plein écran (Home/Entreprises) : header en blanc tant qu'on est tout en haut (overlay, pas encore collé) ---- */
html.gut-cover-hero header[data-type="header"]:not(.fl-theme-builder-header-scrolled) .gut-nav__desktop .gut-nav__list a,
html.gut-cover-hero header[data-type="header"]:not(.fl-theme-builder-header-scrolled) .gut-nav__toggle,
html.gut-cover-hero header[data-type="header"]:not(.fl-theme-builder-header-scrolled) .gut-hcta__btn--ghost { color: #fff; }
html.gut-cover-hero header[data-type="header"]:not(.fl-theme-builder-header-scrolled) .gut-hcta__btn--ghost { border-color: rgba(255,255,255,0.6); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.6); background: transparent; }

/* ---- Page Contact + formulaires Contact Form 7 ---- */
.gut-contact { max-width: 1120px; margin: 0 auto; padding: 56px 20px 72px; }
.gut-contact__intro { text-align: center; margin: 0 0 40px; }
.gut-contact__intro h1 { font-family: 'Bungee', Impact, sans-serif; text-transform: uppercase; font-size: clamp(34px, 6vw, 56px); line-height: 0.95; color: var(--gut-ink,#14110f); margin: 0 0 12px; }
.gut-contact__intro p { font-family: var(--gut-font-body,sans-serif); color: rgba(20,17,15,0.7); font-size: 16px; max-width: 620px; margin: 0 auto; }
.gut-contact__grid { display: grid; gap: 24px; }
@media (min-width:900px){ .gut-contact__grid { grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; } }
.gut-contact__col { background: var(--gut-paper,#fff); border-radius: 28px; padding: 26px; box-shadow: var(--gut-shadow); }
@media (min-width:768px){ .gut-contact__col { padding: 36px; } }
.gut-contact__col h2 { font-family: 'Bungee', Impact, sans-serif; text-transform: uppercase; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.05; color: var(--gut-ink,#14110f); margin: 0 0 8px; }
.gut-contact__col > p { font-family: var(--gut-font-body,sans-serif); color: rgba(20,17,15,0.6); font-size: 14px; margin: 0 0 22px; }
.gut-contact .gut-cf__field { display: block; font-family: var(--gut-font-body,sans-serif); font-weight: 600; font-size: 13px; color: var(--gut-ink,#14110f); margin: 0 0 16px; }
.gut-contact .gut-cf__two { display: grid; gap: 0 16px; }
@media (min-width:560px){ .gut-contact .gut-cf__two { grid-template-columns: 1fr 1fr; } }
.gut-contact .wpcf7-form-control-wrap { display: block; margin-top: 6px; }
.gut-contact .wpcf7-form-control { width: 100%; padding: 12px 16px; border: 1.5px solid rgba(20,17,15,0.15); border-radius: 12px; background: var(--gut-cream,#f0eeea); font-family: var(--gut-font-body,sans-serif); font-size: 15px; color: var(--gut-ink,#14110f); transition: border-color .2s ease, background .2s ease; }
.gut-contact .wpcf7-form-control::placeholder { color: rgba(20,17,15,0.4); }
.gut-contact .wpcf7-form-control:focus { outline: none; border-color: var(--gut-orange,#ec6436); background: #fff; }
.gut-contact textarea.wpcf7-form-control { min-height: 140px; resize: vertical; }
.gut-contact select.wpcf7-form-control { appearance: none; -webkit-appearance: none; cursor: pointer; }
.gut-contact .wpcf7-submit { margin-top: 6px; background: var(--gut-orange,#ec6436); color: #fff; border: 0; border-radius: 9999px; padding: 14px 30px; font-family: var(--gut-font-body,sans-serif); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; box-shadow: var(--gut-shadow); transition: transform .2s ease, filter .2s ease; }
.gut-contact .wpcf7-submit:hover { transform: translateY(-2px); filter: brightness(1.06); }
.gut-contact .wpcf7-spinner { margin: 0 0 0 10px; }
.gut-contact .wpcf7 .wpcf7-response-output { border-radius: 12px; margin: 18px 0 0; padding: 12px 16px; font-family: var(--gut-font-body,sans-serif); font-size: 14px; }
.gut-contact .wpcf7-not-valid-tip { font-family: var(--gut-font-body,sans-serif); font-size: 12px; color: #d33; margin-top: 4px; }

/* Page Contact : masquer le titre par défaut du thème (on garde le h1 ’intro stylé) */
body.page-id-1856 .fl-post-header { display: none; }

/* Footer newsletter (CF7) — rendu identique au formulaire natif .gut-nl__form. */
/* Les visuels input/bouton viennent des classes .gut-nl__input / .gut-nl__btn (CSS du module). */
/* Ici on neutralise seulement les wrappers que CF7 ajoute (autop <p>, span de champ, spinner). */
.gut-nl__cf7 .wpcf7-form { margin: 0; }
.gut-nl__cf7 .gut-nlcf { display: flex; flex-direction: column; gap: 8px; }
@media (min-width:560px){ .gut-nl__cf7 .gut-nlcf { flex-direction: row; align-items: center; flex-wrap: wrap; } }
.gut-nl__cf7 .gut-nlcf > p { display: contents; margin: 0; }
.gut-nl__cf7 .wpcf7-form-control-wrap { flex: 1 1 auto; min-width: 0; display: block; }
.gut-nl__cf7 input.gut-nl__input { width: 100%; }
.gut-nl__cf7 .wpcf7-spinner { display: none; }
.gut-nl__cf7 .wpcf7-not-valid-tip { font-family: var(--gut-font-body,sans-serif); font-size: 12px; color: #ff8d7a; margin-top: 4px; }
.gut-nl__cf7 .wpcf7-response-output { flex-basis: 100%; width: 100%; margin: 6px 0 0; padding: 0; border: 0; font-family: var(--gut-font-body,sans-serif); font-size: 13px; font-weight: 600; color: rgba(240,238,234,0.8); }
.gut-nl__cf7 .wpcf7-response-output.wpcf7-mail-sent-ok { color: #5fd3b0; }
.gut-nl__cf7 .wpcf7-response-output.wpcf7-validation-errors, .gut-nl__cf7 .wpcf7-response-output.wpcf7-mail-sent-ng, .gut-nl__cf7 .wpcf7-response-output.wpcf7-spam-blocked { color: #ff8d7a; }

/* === CF7 — message de réponse propre (remplace l'encadré bleu/vert par défaut) === */
.wpcf7 form.wpcf7-form .wpcf7-response-output { margin: 14px 0 0; padding: 11px 16px; border: 0; border-radius: 12px; font-family: var(--gut-font-body,sans-serif); font-size: 13px; font-weight: 600; line-height: 1.5; }
.wpcf7 form.wpcf7-form.sent .wpcf7-response-output { background: rgba(0,161,132,0.12); color: #00a184; }
.wpcf7 form.wpcf7-form.invalid .wpcf7-response-output, .wpcf7 form.wpcf7-form.failed .wpcf7-response-output, .wpcf7 form.wpcf7-form.spam .wpcf7-response-output, .wpcf7 form.wpcf7-form.unaccepted .wpcf7-response-output { background: rgba(211,51,51,0.08); color: #d33; }
.wpcf7 form.wpcf7-form .wpcf7-not-valid-tip { font-family: var(--gut-font-body,sans-serif); font-size: 12px; font-weight: 600; color: #d33; margin-top: 6px; }

/* === Newsletter footer via formulaire Brevo [sibwp_form] — rendu = ancienne newsletter (e-mail + bouton sur une ligne) === */
.gut-nl__cf7 .sib_signup_form { margin: 0; }
.gut-nl__cf7 .sib_signup_box_inside_1 { display: flex; flex-direction: column; gap: 8px; }
@media (min-width:560px){ .gut-nl__cf7 .sib_signup_box_inside_1 { flex-direction: row; align-items: center; flex-wrap: wrap; } }
.gut-nl__cf7 .sib_signup_form p { margin: 0; }
.gut-nl__cf7 .sib_signup_form p.sib-email-area { flex: 1; min-width: 0; }
.gut-nl__cf7 .sib_signup_form input[type="email"] { width: 100%; background: rgba(240,238,234,0.1); border: 1px solid rgba(240,238,234,0.15); border-radius: 9999px; padding: 11px 18px; font-family: var(--gut-font-body,sans-serif); font-size: 14px; color: var(--gut-cream,#f0eeea); }
.gut-nl__cf7 .sib_signup_form input[type="email"]::placeholder { color: rgba(240,238,234,0.4); }
.gut-nl__cf7 .sib_signup_form input[type="email"]:focus { outline: none; border-color: var(--gut-orange,#ec6436); background: rgba(240,238,234,0.15); }
.gut-nl__cf7 .sib-default-btn { display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; padding: 11px 24px; border-radius: 9999px; background: var(--gut-orange,#ec6436); color: #fff; font-family: var(--gut-font-body,sans-serif); font-weight: 600; font-size: 14px; white-space: nowrap; transition: filter .2s ease, transform .2s ease; }
.gut-nl__cf7 .sib-default-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.gut-nl__cf7 .sib_loader { display: none !important; }
.gut-nl__cf7 .sib_msg_disp { flex-basis: 100%; width: 100%; }
.gut-nl__cf7 .sib_msg_disp:empty { display: none; }
.gut-nl__cf7 .sib_signup_form .sib-alert-message { margin: 0 !important; padding: 9px 14px !important; border: 0 !important; border-radius: 10px !important; font-family: var(--gut-font-body,sans-serif); font-size: 13px; font-weight: 600; }
.gut-nl__cf7 .sib_signup_form .sib-alert-message-error { background: rgba(211,51,51,0.16) !important; color: #ff8d7a !important; }
.gut-nl__cf7 .sib_signup_form .sib-alert-message-success { background: rgba(0,161,132,0.18) !important; color: #5fd3b0 !important; }
