/*
Theme Name: Funnl
Theme URI: https://funnl.ch
Author: Funnl
Author URI: https://funnl.ch
Description: Landing premium — coachs sportifs, formulaire multi-étapes.
Version: 2.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: funnl
*/

:root {
	--bg: #080a12;
	--surface: #080a12;
	--accent: #1c64f2;
	--accent-hover: #1a56db;
	--indigo: #6366f1;
	--font: "Inter", system-ui, -apple-system, sans-serif;
	--ease: ease;
	--t: 0.2s;
	--nav-h: 64px;
	--page-x: 40px;
	--form-max: 720px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
	color: #ffffff;
	background: #080a12;
	min-height: 100vh;
}

a {
	color: var(--accent);
	text-decoration: none;
	transition: opacity var(--t) var(--ease);
}

a:hover {
	opacity: 0.9;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.site {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* ——— Navbar ——— */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	height: var(--nav-h);
	display: flex;
	align-items: center;
	padding: 0 var(--page-x);
	background: rgba(8, 10, 18, 0.88);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: none;
	transition:
		background var(--t) var(--ease),
		backdrop-filter var(--t) var(--ease),
		-webkit-backdrop-filter var(--t) var(--ease);
}

.site-header.is-scrolled {
	background: rgba(8, 10, 18, 0.95);
}

.site-header__inner {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 1rem;
}

.navbar-logo {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	color: inherit;
}

.navbar-logo:hover {
	opacity: 1;
	text-decoration: none;
}

.navbar-logo img {
	height: 32px;
	width: auto;
	display: block;
}

/* ——— Main ——— */

.site-main {
	flex: 1;
	width: 100%;
}

/* ——— Hero ——— */

.hero {
	position: relative;
	z-index: 0;
	padding-top: 100px;
	padding-left: var(--page-x);
	padding-right: var(--page-x);
	padding-bottom: 1.5rem;
	text-align: center;
	overflow: visible;
}

.hero::before {
	content: "";
	position: absolute;
	width: 400px;
	height: 300px;
	left: 50%;
	top: -80px;
	transform: translateX(-50%);
	background: rgb(28, 100, 242);
	opacity: 0.12;
	filter: blur(80px);
	-webkit-filter: blur(80px);
	border-radius: 50%;
	z-index: -1;
	pointer-events: none;
}

.hero::after {
	content: "";
	position: absolute;
	width: 300px;
	height: 300px;
	right: -40px;
	bottom: -60px;
	background: #6366f1;
	opacity: 0.06;
	filter: blur(100px);
	-webkit-filter: blur(100px);
	border-radius: 50%;
	z-index: -1;
	pointer-events: none;
}

.hero__inner {
	position: relative;
	z-index: 1;
	max-width: 800px;
	margin: 0 auto;
	animation: hero-in 0.6s var(--ease) both;
}

@keyframes hero-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.hero__badge {
	display: inline-flex;
	align-items: center;
	margin: 0 0 1.25rem;
	padding: 6px 16px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #7aa4f7;
	background: rgba(28, 100, 242, 0.12);
	border: 1px solid rgba(28, 100, 242, 0.25);
	border-radius: 999px;
}

.hero__title {
	margin: 0 auto;
	max-width: 720px;
	font-size: 72px;
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.02em;
	color: #ffffff;
}

.hero__title-em {
	position: relative;
	z-index: 1;
	display: inline-block;
	padding-bottom: 0;
	margin-bottom: 0;
	isolation: isolate;
}

.hero__title-em-svg {
	position: absolute;
	bottom: -4px;
	left: -4px;
	width: 108%;
	height: 16px;
	overflow: visible;
	pointer-events: none;
	z-index: -1;
	opacity: 1;
}

.hero__title-em-path {
	animation: draw 0.8s ease forwards;
}

.hero__title-em-path--main {
	stroke-dasharray: 500;
	stroke-dashoffset: 500;
	animation-delay: 0.5s;
}

.hero__title-em-path--sub {
	stroke-dasharray: 450;
	stroke-dashoffset: 450;
	opacity: 0.3;
	animation-delay: 0.7s;
}

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

@media (prefers-reduced-motion: reduce) {
	.hero__title-em-path {
		animation: none;
		stroke-dashoffset: 0;
	}
}

.hero__subtitle {
	margin: 20px auto 0;
	max-width: 560px;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.55;
	color: #9ca3af;
	letter-spacing: -0.015em;
}

.hero__stats.ticker-wrapper {
	margin: 1.5rem auto 0;
	max-width: 900px;
	width: 100%;
	overflow: hidden;
	mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
	-webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.ticker-track {
	display: flex;
	gap: 40px;
	width: max-content;
	align-items: center;
	animation: ticker 20s linear infinite;
}

.ticker-track .ticker-stat {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #6b7280;
	white-space: nowrap;
	line-height: 1.45;
}

.ticker-dot {
	color: #2a2d3a;
	font-size: 18px;
	line-height: 1;
	flex-shrink: 0;
	user-select: none;
}

.hero__stats-icon {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	display: block;
}

@keyframes ticker {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-33.333%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero__inner {
		animation: none;
	}

	.ticker-track {
		animation: none;
		transform: none;
	}
}

/* ——— Quiz section ——— */

.quiz-section {
	padding: 0 var(--page-x) clamp(2.5rem, 6vw, 4rem);
}

.quiz {
	width: 100%;
	max-width: var(--form-max);
	margin: 0 auto;
	height: auto;
	min-height: unset;
}

/* Carte formulaire */
.quiz__card--form {
	position: relative;
	height: auto;
	min-height: unset;
	max-height: none;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 24px;
	box-shadow:
		0 0 0 1px rgba(28, 100, 242, 0.1),
		0 32px 80px rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	padding: 48px;
	overflow: visible;
}

/* Retour discret en haut du formulaire (étapes 2–6) */
.quiz__toolbar {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	min-height: 28px;
	margin: 0 0 0.5rem;
}

.quiz__back-top {
	font-family: inherit;
	font-size: 13px;
	color: #6b7280;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 4px 0;
	line-height: 1.2;
	transition: color var(--t) var(--ease);
}

.quiz__back-top:hover {
	color: #ffffff;
}

.quiz__back-top:focus-visible {
	outline: 2px solid rgba(28, 100, 242, 0.45);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Barre de progression (en tête du formulaire) */
.quiz__progress-track {
	height: 2px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	overflow: hidden;
	margin: 0 0 1.25rem;
}

.quiz__progress-fill {
	height: 100%;
	width: calc(100% / 6);
	background: linear-gradient(90deg, #1c64f2, #6366f1);
	border-radius: 999px;
	transition: width 0.4s ease;
}

/* Panels — une étape visible, les autres masquées */
.quiz__panels {
	display: block;
	position: relative;
	min-height: 0;
	height: auto;
}

.quiz-step,
.form-step {
	display: none;
	width: 100%;
	height: auto;
	min-height: unset;
}

.quiz-step.is-active,
.form-step.is-active {
	display: block;
}

.quiz__question {
	margin: 0 0 24px;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.02em;
	color: #ffffff;
}

.quiz__field {
	display: block;
	margin-bottom: 1.25rem;
}

.quiz__label {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 13px;
	font-weight: 500;
	color: #e5e7eb;
}

.quiz__input {
	width: 100%;
	padding: 16px 20px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 400;
	color: #ffffff;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	outline: none;
	transition:
		border-color var(--t) var(--ease),
		box-shadow var(--t) var(--ease);
}

.quiz__input::placeholder {
	color: rgba(255, 255, 255, 0.25);
}

.quiz__input:hover {
	border-color: rgba(255, 255, 255, 0.14);
}

.quiz__input:focus {
	border-color: #1c64f2;
	box-shadow: 0 0 0 4px rgba(28, 100, 242, 0.12);
}

.quiz__fields-grid {
	display: grid;
	gap: 1rem;
	margin-bottom: 0.5rem;
}

@media (min-width: 480px) {
	.quiz__fields-grid {
		grid-template-columns: 1fr 1fr;
	}
}

.quiz__field--full {
	grid-column: 1 / -1;
}

/* Choix */
.quiz__choices {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
}

.quiz__choices--two {
	gap: 0.5rem;
}

.quiz__choice {
	position: relative;
	display: block;
	width: 100%;
	padding: 16px 44px 16px 20px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	text-align: left;
	color: #e5e7eb;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	cursor: pointer;
	transition:
		background var(--t) var(--ease),
		border-color var(--t) var(--ease),
		color var(--t) var(--ease),
		font-weight var(--t) var(--ease);
}

.quiz__choice:hover {
	background: rgba(28, 100, 242, 0.08);
	border-color: rgba(28, 100, 242, 0.3);
}

.quiz__choice.is-selected {
	background: rgba(28, 100, 242, 0.12);
	border-color: #1c64f2;
	color: #ffffff;
	font-weight: 500;
}

.quiz__choice.is-selected::after {
	content: "✓";
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1rem;
	color: #1c64f2;
	line-height: 1;
}

/* Actions */
.quiz__actions {
	margin-top: 0.25rem;
}

.quiz__actions::after {
	content: "";
	display: table;
	clear: both;
}

.quiz__actions--split .quiz__btn--ghost {
	float: left;
}

.quiz__actions--split .quiz__btn--primary {
	float: right;
}

.quiz__actions:not(.quiz__actions--split) .quiz__btn--primary {
	float: right;
}

.quiz__actions:not(.quiz__actions--split) .quiz__btn--ghost {
	float: left;
}

.quiz__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 14px 32px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: -0.02em;
	border-radius: 12px;
	border: none;
	cursor: pointer;
	transition:
		background var(--t) var(--ease),
		opacity var(--t) var(--ease),
		color var(--t) var(--ease),
		transform var(--t) var(--ease),
		box-shadow var(--t) var(--ease);
}

.quiz__btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.quiz__btn--primary {
	background: #1c64f2;
	color: #ffffff;
	box-shadow: 0 4px 20px rgba(28, 100, 242, 0.4);
}

.quiz__btn--primary:not(:disabled):hover {
	background: #1a56db;
	transform: translateY(-1px);
}

.quiz__btn--next .quiz__btn-arrow {
	font-size: 1.1em;
	line-height: 1;
	margin-left: 2px;
}

.quiz__btn--ghost {
	background: transparent;
	color: #9ca3af;
	font-weight: 500;
	padding: 8px 0;
	min-height: auto;
	box-shadow: none;
}

.quiz__btn--ghost:hover {
	color: #e5e7eb;
	transform: none;
}

/* Confirmations */
.quiz__done.quiz__card {
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 24px;
	box-shadow:
		0 0 0 1px rgba(28, 100, 242, 0.1),
		0 32px 80px rgba(0, 0, 0, 0.5);
	background: rgba(255, 255, 255, 0.03);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	max-width: var(--form-max);
	margin-left: auto;
	margin-right: auto;
}

.quiz__done {
	text-align: center;
	padding: 3rem 2.5rem;
	animation: hero-in 0.45s var(--ease) both;
	height: auto;
	min-height: unset;
	max-height: none;
	overflow: visible;
}

#quiz-done-success.quiz__done--success {
	max-width: 900px;
}

.confirmation-qualified {
	width: 100%;
}

.confirmation-header {
	margin-bottom: 0;
}

.calendly-inline-widget {
	border-radius: 16px;
	overflow: hidden;
	margin-top: 24px;
	width: 100%;
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
}

.quiz__done-callout {
	margin: 1.75rem auto 0;
	max-width: 22rem;
	padding: 1rem 1.25rem;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(0, 0, 0, 0.2);
}

.quiz__done-callout-text {
	margin: 0 0 0.75rem;
	font-size: 14px;
	line-height: 1.45;
	color: #9ca3af;
}

.quiz__done-callout-row {
	display: inline-flex;
	align-items: flex-start;
	justify-content: center;
	gap: 0.5rem;
	text-align: left;
}

.quiz__callout-icon {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	margin-top: 2px;
	display: block;
}

.quiz__done-callout-link {
	display: inline-block;
	font-size: 14px;
	font-weight: 500;
	color: #7aa4f7;
}

.quiz__done-callout-link:hover {
	opacity: 1;
	color: #93b4f8;
}

.quiz__done--later .quiz__done-icon-later {
	margin: 0 auto 1.25rem;
	line-height: 0;
	display: flex;
	justify-content: center;
}

.quiz__done-later-svg {
	display: block;
	width: 48px;
	height: 48px;
}

.quiz__done-title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.375rem, 3.5vw, 1.625rem);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.25;
	color: #ffffff;
}

.quiz__done-sub {
	margin: 0 auto;
	max-width: 24rem;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.55;
	color: #9ca3af;
	letter-spacing: -0.015em;
}

.quiz__done--later .quiz__later-edit {
	margin-top: 1.75rem;
	padding: 12px 24px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	color: #9ca3af;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 10px;
	cursor: pointer;
	transition:
		border-color var(--t) var(--ease),
		color var(--t) var(--ease);
}

.quiz__done--later .quiz__later-edit:hover {
	border-color: rgba(255, 255, 255, 0.3);
	color: #ffffff;
}

.quiz__done--later .quiz__later-edit:focus-visible {
	outline: 2px solid rgba(28, 100, 242, 0.45);
	outline-offset: 2px;
}

/* Ligne de confiance (sous le formulaire) */
.trust-line {
	max-width: 42rem;
	margin: 40px auto 0;
	font-size: 14px;
	color: #9ca3af;
	text-align: center;
	letter-spacing: 0.02em;
	line-height: 1.5;
}

/* ——— Mobile (≤768px) ——— */

@media (max-width: 768px) {
	.site-header {
		height: 52px;
		min-height: 52px;
		padding: 0 20px;
	}

	.hero {
		padding-top: 60px;
	}

	.hero__title {
		font-size: 36px;
	}

	.hero__subtitle {
		font-size: 15px;
	}

	.quiz-section {
		padding-left: 0;
		padding-right: 0;
	}

	.quiz {
		max-width: calc(100% - 32px);
		width: 100%;
		margin-left: 16px;
		margin-right: 16px;
	}

	.quiz__card--form {
		max-width: 100%;
		height: auto;
		min-height: unset;
		max-height: none;
		padding: 28px 24px;
		border-radius: 16px;
		overflow: visible;
	}

	.quiz__question {
		font-size: 17px;
	}

	.quiz__input {
		padding: 13px 16px;
	}

	.quiz__actions--split {
		display: flex;
		flex-direction: column;
		gap: 0.75rem;
	}

	.quiz__actions--split::after {
		display: none;
	}

	.quiz__actions--split .quiz__btn--ghost,
	.quiz__actions--split .quiz__btn--primary {
		float: none;
	}

	.quiz__actions:not(.quiz__actions--split) {
		display: flex;
		justify-content: stretch;
	}

	.quiz__actions:not(.quiz__actions--split)::after {
		display: none;
	}

	.quiz__actions:not(.quiz__actions--split) .quiz__btn--primary {
		float: none;
	}

	.quiz__btn--next {
		width: 100%;
		justify-content: center;
	}

	.quiz__done {
		max-width: calc(100% - 32px);
		margin-left: 16px;
		margin-right: 16px;
		padding: 2rem 1.25rem;
		border-radius: 16px;
		height: auto;
		min-height: unset;
		max-height: none;
		overflow: visible;
	}

	.calendly-inline-widget {
		height: 600px !important;
	}

	.trust-line {
		padding: 0 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.quiz__progress-fill,
	.quiz__done {
		transition: none;
		animation: none;
	}

	.quiz__btn--primary:hover {
		transform: none;
	}
}

/* ——— Footer ——— */

.site-footer {
	padding: 32px var(--page-x);
	margin-top: auto;
	border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.site-footer__copy {
	margin: 0;
	text-align: center;
	font-size: 12px;
	font-weight: 400;
	color: #374151;
	letter-spacing: -0.01em;
}
