/* ==========================================================================
   TILT Questionnaire — styles
   Palette : noir #1a1a1a / blanc cassé #faf7f2 / doré #b8935a
   Modifie ces variables pour ajuster rapidement la charte.
   ========================================================================== */

.tilt-q-wrapper {
	--tilt-gold: #b8935a;
	--tilt-gold-light: #f5ede0;
	--tilt-black: #1a1a1a;
	--tilt-gray: #6b6b6b;
	--tilt-border: #e5ddd0;
	--tilt-bg: #faf7f2;

	max-width: 1080px;
	margin: 0 auto;
	padding: 32px 20px 60px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--tilt-black);
}

/* ---------- Étape : fond plein écran, indépendant de la largeur du contenu ---------- */
.tilt-q-step {
	position: relative;
}

.tilt-q-step-bg {
	position: absolute;
	top: 0;
	left: 50%;
	width: 100vw;
	height: 100%;
	transform: translateX(-50%);
	background-size: cover;
	background-position: center;
	z-index: 0;
}

.tilt-q-step-inner {
	position: relative;
	z-index: 1;
}

.tilt-q-step-has-bg .tilt-q-step-inner {
	padding-top: 40px;
	padding-bottom: 40px;
}

/* ---------- Header / progress ---------- */
.tilt-q-header {
	position: relative;
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 40px;
	padding-top: 22px; /* laisse la place au texte d'étape centré au-dessus */
}

.tilt-q-back {
	background: none;
	border: none;
	color: var(--tilt-black);
	font-size: 14px;
	cursor: pointer;
	white-space: nowrap;
}

.tilt-q-progress-track {
	flex: 1;
}

.tilt-q-progress-label {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	white-space: nowrap;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tilt-gray);
}

.tilt-q-progress-bar {
	height: 4px;
	background: var(--tilt-border);
	border-radius: 2px;
	overflow: hidden;
}

.tilt-q-progress-fill {
	height: 100%;
	background: var(--tilt-gold);
	transition: width 0.35s ease;
}

.tilt-q-progress-pct {
	font-size: 13px;
	color: var(--tilt-gray);
	white-space: nowrap;
}

/* ---------- Titres ---------- */
.tilt-q-eyebrow {
	text-align: center;
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--tilt-gold);
	margin: 0 0 12px;
}

.tilt-q-title {
	text-align: center;
	font-size: clamp(28px, 4vw, 42px);
	font-weight: 500;
	line-height: 1.25;
	margin: 0 0 16px;
}

.tilt-q-title span {
	color: var(--tilt-gold);
	font-style: italic;
}

.tilt-q-subtitle {
	text-align: center;
	color: var(--tilt-gray);
	font-size: 15px;
	line-height: 1.5;
	max-width: 560px;
	margin: 0 auto 36px;
}

/* ---------- Champ label libre (ex: "Quel âge ont vos enfants ?") ---------- */
.tilt-q-field-label {
	font-weight: 600;
	margin: 24px 0 12px;
}

/* ---------- Grille de cartes ---------- */
.tilt-q-choices {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

@media (max-width: 900px) {
	.tilt-q-choices { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
	.tilt-q-choices { grid-template-columns: repeat(2, 1fr); gap: 10px; }

	/* Images moins hautes sur mobile pour réduire le défilement :
	   on garde 2 colonnes (au lieu d'1 pleine largeur) et un ratio
	   moins carré, plutôt que de perdre l'image qui aide au choix. */
	.tilt-q-card-image { aspect-ratio: 4 / 3; }
	.tilt-q-card-body { padding: 12px 10px 14px; gap: 2px; }
	.tilt-q-card-icon { font-size: 18px; margin-bottom: 2px; }
	.tilt-q-card-label { font-size: 13.5px; }
	.tilt-q-card-desc { font-size: 11px; }
}

.tilt-q-card {
	position: relative;
	background: #fff;
	border: 1px solid var(--tilt-border);
	border-radius: 14px;
	overflow: hidden;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.tilt-q-card:hover {
	transform: translateY(-2px);
}

.tilt-q-card:focus-visible {
	outline: 2px solid var(--tilt-gold);
	outline-offset: 2px;
}

.tilt-q-card.is-selected {
	border-color: var(--tilt-gold);
	background: var(--tilt-gold-light);
}

.tilt-q-card-image {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	background-color: #eee; /* couleur de repli pendant le chargement / si l'image ne charge pas */
}

.tilt-q-card-body {
	padding: 18px 14px 20px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.tilt-q-card-icon {
	font-size: 22px;
	margin-bottom: 4px;
}

.tilt-q-card-label {
	font-weight: 600;
	font-size: 15px;
}

.tilt-q-card-desc {
	font-size: 12.5px;
	color: var(--tilt-gray);
	line-height: 1.4;
}

.tilt-q-card-check {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 2px solid #fff;
	background: rgba(255, 255, 255, 0.6);
	box-shadow: 0 0 0 1px var(--tilt-border);
}

.tilt-q-card.is-selected .tilt-q-card-check {
	background: var(--tilt-gold);
	border-color: var(--tilt-gold);
	box-shadow: none;
}

.tilt-q-card.is-selected .tilt-q-card-check::after {
	content: "";
	position: absolute;
	left: 6px;
	top: 2px;
	width: 5px;
	height: 10px;
	border-right: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(45deg);
}

/* ---------- Message « X choix maximum » ---------- */
.tilt-q-max-hint {
	text-align: center;
	margin: 0 0 14px;
	padding: 10px 14px;
	border-radius: 10px;
	background: var(--tilt-gold-light);
	color: var(--tilt-black);
	font-size: 13.5px;
}

.tilt-q-max-hint[hidden] { display: none; }

/* ---------- Layout "inline" (ex: tranches d'âge) ---------- */
.tilt-q-layout-inline .tilt-q-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.tilt-q-layout-inline .tilt-q-card {
	flex: 0 0 auto;
	border-radius: 999px;
	padding: 10px 18px;
}

.tilt-q-layout-inline .tilt-q-card-image { display: none; }
.tilt-q-layout-inline .tilt-q-card-body { padding: 0; flex-direction: row; }
.tilt-q-layout-inline .tilt-q-card-check { display: none; }
.tilt-q-layout-inline .tilt-q-card.is-selected { background: var(--tilt-black); border-color: var(--tilt-black); }
.tilt-q-layout-inline .tilt-q-card.is-selected .tilt-q-card-label { color: #fff; }

/* ---------- Champs texte ---------- */
.tilt-q-input-text,
.tilt-q-input-textarea {
	width: 100%;
	border: 1px solid var(--tilt-border);
	border-radius: 10px;
	padding: 14px 16px;
	font-size: 14px;
	font-family: inherit;
	margin-top: 16px;
}

.tilt-q-input-textarea {
	min-height: 140px;
	resize: vertical;
}

.tilt-q-char-count {
	display: block;
	text-align: right;
	font-size: 12px;
	color: var(--tilt-gray);
	margin-top: 4px;
}

/* ---------- Navigation ---------- */
.tilt-q-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 36px;
}

.tilt-q-btn {
	border-radius: 999px;
	padding: 13px 28px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid transparent;
}

.tilt-q-prev {
	background: #fff;
	border-color: var(--tilt-border);
	color: var(--tilt-black);
}

.tilt-q-next,
.tilt-q-submit {
	background: var(--tilt-black);
	color: #fff;
}

.tilt-q-next:hover,
.tilt-q-submit:hover {
	opacity: 0.85;
}

.tilt-q-submit:disabled {
	opacity: 0.4;
	cursor: default;
}

.tilt-q-skip {
	display: block;
	margin: 18px auto 0;
	background: none;
	border: none;
	text-decoration: underline;
	color: var(--tilt-gray);
	font-size: 13px;
	cursor: pointer;
}

.tilt-q-thankyou {
	text-align: center;
	padding: 60px 20px;
	font-size: 20px;
}


/* ---------- Minimum 1 réponse par section ---------- */
.tilt-q-min-hint {
	text-align: center;
	margin: 18px 0 0;
	padding: 10px 14px;
	border-radius: 10px;
	background: var(--tilt-gold-light);
	color: var(--tilt-black);
	font-size: 14px;
}
.tilt-q-min-hint[hidden] { display: none; }
.tilt-q-btn.is-blocked {
	opacity: .5;
}
