/**
 * Page « Je donne mon avis » (slug je-participe).
 * Chargée après style.css, pages.css et page-content.css : reprend le système de l'accueil
 * (jetons --b-*, .sec-title, .sec-text, .cta, .arch).
 * Questionnaire : une question par écran, beaucoup d'air, peu d'habillage.
 */

.jp {
	--jp-card: #fffdf8;          /* surfaces sur fond Crème */
	--jp-line: rgba(14, 34, 49, .14);
	--jp-line-strong: rgba(14, 34, 49, .32);
	--jp-coral-text: #b0402b;    /* corail lisible en petit texte sur Crème (5.2:1) */
	--jp-sable: #f2e4cd;
	--jp-ease: cubic-bezier(.2, .7, .2, 1);
	color: var(--b-encre);
	font-family: var(--font-brand-text);
}
.jp :focus-visible { outline: 2px solid var(--b-encre); outline-offset: 3px; }
.jp .cta:focus-visible { outline-color: var(--b-encre); }
button.cta { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }

/* =========================================================
 * 1. Introduction
 * ======================================================= */
.jp-hero { padding: clamp(28px, 5.5vh, 64px) 0 clamp(24px, 4vh, 48px); }
.jp-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 720px) auto;
	justify-content: space-between;
	align-items: center;
	gap: 40px clamp(40px, 6vw, 112px);
}
.jp-hero__title { font-size: clamp(40px, 5.4vw, 80px); line-height: 1; letter-spacing: -.02em; }
.jp-hero__lead { font-size: 19px; max-width: 54ch; margin-top: 20px; }
.jp-hero__actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 16px; margin-top: 28px; }
.jp-hero__media.arch {
	height: min(calc(100svh - 300px), 480px);
	min-height: 340px;
	width: auto;
	justify-self: end;
}

/* Compte à rebours : chiffres sobres, une phrase, une date */
.jp-count {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 40px;
	margin-top: 32px;
	/* Minimal : ni carte ni bordure, les chiffres portent le bloc */
	max-width: 760px;
}
.jp-count__tiles { display: flex; flex: none; }
.jp-count__tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 56px;
	padding: 0 14px;
	overflow: hidden; /* le chiffre bascule dans sa case */
}
.jp-count__tile:first-child { padding-left: 0; }
.jp-count__num {
	display: block;
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: 38px;
	line-height: 1;
	letter-spacing: -.02em;
	font-variant-numeric: tabular-nums;
	color: var(--b-encre);
}
.jp-count__unit { margin-top: 6px; font-size: 13px; line-height: 1; color: var(--ink-text); }
.jp-count__text { flex: 1 1 240px; min-width: 0; }
.jp-count__lead {
	margin: 0;
	font-family: var(--font-brand);
	font-weight: 500;
	font-size: 18px;
	line-height: 1.35;
	color: var(--b-encre);
	text-wrap: balance;
}
.jp-count__lead strong { font-weight: 600; color: var(--jp-coral-text); }
.jp-count__lead .js-count-remain { white-space: nowrap; }
.jp-count__date { margin: 6px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-text); text-wrap: pretty; }
.jp-count--closed { display: block; }
.jp-count--closed .jp-count__lead strong { color: var(--b-encre); }

/* =========================================================
 * Partage : « Faire connaître la démarche » (un seul bouton)
 * ======================================================= */
.jp-share { position: relative; }
.jp-share__details { position: relative; }
.jp-share__btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 60px;
	padding: 0 24px 0 20px;
	border: 1.5px solid var(--jp-line-strong);
	border-radius: 60px;
	font-family: var(--font-brand);
	font-weight: 500;
	font-size: 16px;
	line-height: 1.25;
	color: var(--b-encre);
	cursor: pointer;
	list-style: none;
	user-select: none;
	transition: background-color .25s ease, border-color .25s ease;
}
.jp-share__btn::-webkit-details-marker { display: none; }
.jp-share__btn::marker { content: ""; }
.jp-share__btn:hover,
.jp-share__details[open] > .jp-share__btn { background: var(--ink-fill); border-color: var(--b-encre); }
.jp-share__icon { flex: none; transition: transform .3s var(--jp-ease); }
.jp-share__btn:hover .jp-share__icon { transform: translateY(-2px); }
.jp-share__menu {
	/* Dans le flux, sous le bouton : jamais rogné ni superposé, quel que soit l'écran */
	position: static;
	margin-top: 14px;
}
.jp-share__menu-title { margin: 0 0 10px; font-family: var(--font-brand); font-size: 13px; color: var(--ink-text); }
.jp-share__menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.jp-share__item {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 16px;
	border: 1px solid var(--jp-line-strong);
	border-radius: 60px;
	background: transparent;
	text-decoration: none;
	font-family: var(--font-brand);
	font-size: 16px;
	color: var(--b-encre);
	text-align: left;
	cursor: pointer;
}
.jp-share__item:hover,
.jp-share__item:focus-visible { background: var(--ink-fill); color: var(--b-encre); }
.jp-share__item:focus-visible { outline-offset: -2px; }
.jp-share__status { margin: 0; font-size: 14px; color: var(--ink-text); }
.jp-share__status:not(:empty) { margin-top: 8px; }

/* =========================================================
 * 2. Questionnaire : une question par écran
 * ======================================================= */
.jp-q { padding: clamp(48px, 8vh, 96px) 0 clamp(56px, 9vh, 104px); scroll-margin-top: 16px; }
.jp-flow { width: 100%; } /* pleine largeur (gouttière de .wrap) */

.jp-q__head { margin-bottom: 44px; }
@media (min-width: 992px) {
	/* En-tête sur deux colonnes : titre + introduction à gauche, durée et anonymat à droite */
	.jp-q__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 8px 64px; align-items: end; }
	.jp-q__head > .jp-q__title, .jp-q__head > .jp-q__intro { grid-column: 1; }
	.jp-q__head > .jp-q__meta { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
}
.jp-q__title {
	margin: 0;
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: clamp(22px, 2vw, 26px);
	line-height: 1.2;
	color: var(--b-encre);
}
.jp-q__intro { margin: 10px 0 0; font-size: 16.5px; line-height: 1.6; color: var(--ink-text); max-width: 62ch; text-wrap: pretty; }
.jp-q__meta { display: flex; flex-direction: column; gap: 2px; margin: 12px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-text); }

/* Progression : « 3 / 12 » et un trait */
.jp-progress { display: flex; align-items: center; gap: 16px; margin: 0 0 28px; }
.jp-progress[hidden] { display: none; }
.jp-progress__label {
	flex: none;
	min-width: 6ch;
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: 15px;
	font-variant-numeric: tabular-nums;
	color: var(--b-encre);
}
.jp-progress__bar { flex: 1; height: 3px; border-radius: 3px; background: var(--ink-line); overflow: hidden; }
.jp-progress__bar i {
	display: block;
	height: 100%;
	background: var(--b-corail);
	transform: scaleX(0);
	transform-origin: 0 50%;
	transition: transform .6s var(--jp-ease);
}
.jp-flow__note { margin: -12px 0 20px; font-size: 14.5px; color: var(--ink-text); }
.jp-flow__note:empty { display: none; }

/* Écrans */
.jp-screen { margin: 0 0 56px; }
.jp-form.is-stepped .jp-screen { margin: 0; min-height: 300px; }
.jp-screen[hidden] { display: none; }
.jp-screen__part { margin: 0 0 14px; font-family: var(--font-brand); font-weight: 600; font-size: 14.5px; color: var(--jp-coral-text); }
.jp-screen__lead { margin: 0 0 18px; font-size: 16px; line-height: 1.6; color: var(--ink-text); max-width: 60ch; text-wrap: pretty; }
.jp-screen__q {
	margin: 0 0 24px;
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: clamp(25px, 2.7vw, 36px);
	line-height: 1.16;
	letter-spacing: -.01em;
	color: var(--b-encre);
	max-width: 46ch;
	text-wrap: balance;
}
.jp-screen__q label { cursor: pointer; }
.jp .jp-screen__q:focus, .jp .jp-screen__q:focus-visible { outline: none; } /* reçoit le focus par script, ce n'est pas une commande */
.jp-screen__help { margin: -8px 0 20px; font-size: 16px; line-height: 1.6; color: var(--ink-text); max-width: 60ch; text-wrap: pretty; }
.jp-fs { min-width: 0; margin: 0; padding: 0; border: 0; }

/* Champs de texte */
.jp .q-form .jp-input {
	display: block;
	width: 100%;
	min-height: 168px;
	margin: 0;
	padding: 18px 20px;
	font-family: var(--font-brand-text);
	font-size: 18px;
	line-height: 1.55;
	color: var(--b-encre);
	background: #fff;
	border: 1.5px solid var(--jp-line);
	border-radius: 22px;
	resize: vertical;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.jp .q-form .jp-input:hover { border-color: var(--jp-line-strong); }
.jp .q-form .jp-input:focus { outline: none; border-color: var(--b-encre); box-shadow: 0 0 0 4px rgba(255, 223, 163, .95); }
.jp .q-form .jp-input::placeholder { color: rgba(14, 34, 49, .7); opacity: 1; }

/* « Et si… » : trois propositions */
.jp-multi { display: flex; align-items: flex-start; gap: 14px; margin: 0 0 12px; }
.jp-multi__label {
	flex: none;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	margin-top: 12px;
	border-radius: 50%;
	background: var(--b-lumiere);
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: 15px;
	color: var(--b-encre);
}
.jp .q-form .jp-multi .jp-input { min-height: 88px; font-size: 17px; padding: 14px 18px; border-radius: 18px; }

/* Orientations : cartes à choisir, 3 au plus */
.jp-ask { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 16px; }
.jp-ask p { margin: 0; font-family: var(--font-brand); font-weight: 500; font-size: 16.5px; line-height: 1.4; color: var(--b-encre); }
.jp .q-count {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 60px;
	height: 38px;
	padding: 0 14px;
	margin: 0;
	border-radius: 999px;
	background: var(--ink-fill);
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: 16px;
	font-variant-numeric: tabular-nums;
	color: var(--b-encre);
	transition: background-color .3s ease, color .3s ease;
}
.jp .has-choice .q-count { background: var(--b-lumiere); }
.jp .q-count.is-full { background: var(--b-encre); color: var(--b-creme); }
.jp-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.jp .jp-chip {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	min-height: 56px;
	margin: 0;
	padding: 14px 16px;
	border: 1.5px solid var(--jp-line);
	border-radius: 18px;
	background: #fff;
	font-size: 16px;
	line-height: 1.42;
	color: var(--b-encre);
	cursor: pointer;
	transition: border-color .2s ease, background-color .2s ease, transform .2s var(--jp-ease);
}
.jp .jp-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
.jp-chip__box {
	flex: none;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	margin-top: 1px;
	border-radius: 7px;
	border: 2px solid var(--jp-line-strong);
	color: var(--b-creme);
	transition: background-color .2s ease, border-color .2s ease;
}
.jp-chip__box svg { opacity: 0; transform: scale(.6); transition: opacity .2s ease, transform .25s var(--jp-ease); }
.jp .jp-chip:hover { border-color: rgba(14, 34, 49, .45); }
.jp .jp-chip:has(input:checked) { border-color: var(--b-encre); background: rgba(255, 223, 163, .32); }
.jp-chip input:checked + .jp-chip__box { background: var(--b-encre); border-color: var(--b-encre); }
.jp-chip input:checked + .jp-chip__box svg { opacity: 1; transform: none; }
.jp .jp-chip:has(input:focus-visible) { border-color: var(--b-encre); box-shadow: 0 0 0 4px rgba(255, 223, 163, .95); }
.jp-chip input:focus-visible + .jp-chip__box { outline: 2px solid var(--b-encre); outline-offset: 2px; }
.jp .jp-chip.is-disabled { cursor: not-allowed; background: transparent; border-style: dashed; color: var(--ink-muted); }
.jp .jp-chip.is-disabled:hover { border-color: var(--jp-line); }
.jp-chip.is-disabled .jp-chip__box { border-color: var(--jp-line); }

/* Profil : pastilles */
.jp-profile { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; }
.jp-profile__legend {
	float: left;
	width: 100%;
	margin: 0 0 12px;
	padding: 0;
	font-family: var(--font-brand);
	font-weight: 500;
	font-size: 17px;
	line-height: 1.3;
	color: var(--b-encre);
}
.jp-seg { clear: both; display: flex; flex-wrap: wrap; gap: 8px; }
.jp-seg__opt { position: relative; display: inline-flex; margin: 0; }
.jp-seg__opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.jp-seg__opt span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	min-width: 72px;
	padding: 0 18px;
	border: 1.5px solid var(--jp-line-strong);
	border-radius: 999px;
	background: #fff;
	font-family: var(--font-brand);
	font-weight: 500;
	font-size: 15.5px;
	line-height: 1.2;
	color: var(--b-encre);
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
	pointer-events: none;
}
.jp-seg__opt:hover span { border-color: var(--b-encre); }
.jp-seg__opt input:checked + span { background: var(--b-encre); border-color: var(--b-encre); color: var(--b-creme); }
.jp-seg__opt input:focus-visible + span { outline: 2px solid var(--b-encre); outline-offset: 3px; box-shadow: 0 0 0 4px rgba(255, 223, 163, .95); }

/* Commune (si « Oui ») */
.jp-sub { margin-top: 16px; }
.jp-sub[hidden] { display: none; }
.jp-sub__label { display: block; margin: 0 0 8px; font-family: var(--font-brand); font-weight: 500; font-size: 16px; color: var(--b-encre); }
.jp-select { position: relative; display: block; max-width: 360px; }
.jp-select::after {
	content: "";
	position: absolute;
	right: 20px;
	top: 50%;
	width: 9px;
	height: 9px;
	margin-top: -7px;
	border-right: 2px solid var(--b-encre);
	border-bottom: 2px solid var(--b-encre);
	transform: rotate(45deg);
	pointer-events: none;
}
.jp .jp-select select {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	min-height: 52px;
	padding: 0 48px 0 18px;
	border: 1.5px solid var(--jp-line-strong);
	border-radius: 16px;
	background: #fff;
	font-family: var(--font-brand);
	font-weight: 500;
	font-size: 16px;
	color: var(--b-encre);
	cursor: pointer;
}
.jp .jp-select select:hover { border-color: var(--b-encre); }
.jp .jp-select select:focus-visible { outline: 2px solid var(--b-encre); outline-offset: 3px; box-shadow: 0 0 0 4px rgba(255, 223, 163, .95); }
@media (prefers-reduced-motion: no-preference) {
	.jp-sub.is-revealed { animation: jp-reveal .4s var(--jp-ease) both; }
}
@keyframes jp-reveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Récapitulatif */
.jp-recap { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink-line); }
.jp-recap li { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; min-height: 64px; padding: 10px 0; border-bottom: 1px solid var(--ink-line); }
.jp-recap__part { font-family: var(--font-brand); font-weight: 600; font-size: 18px; color: var(--b-encre); }
.jp-recap__count { flex: 1; font-size: 16px; color: var(--ink-text); font-variant-numeric: tabular-nums; }
.jp-recap__error { margin: 16px 0 0; font-weight: 600; color: #9c3220; }
.jp-recap__error:empty { display: none; }
.jp-recap__clear { margin-top: 16px; }
.jp-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	min-width: 44px;
	padding: 0 4px;
	border: 0;
	background: none;
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: 15px;
	color: var(--b-encre);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.jp-link[hidden] { display: none; }
.jp-link:hover { color: var(--jp-coral-text); }

/* Navigation : Précédent / Suivant (ou Envoyer) */
.jp-nav {
	position: sticky;
	bottom: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 36px;
	padding: 16px 0;
	background: linear-gradient(180deg, rgba(252, 241, 218, 0), var(--b-creme) 28%);
}
.jp-nav__prev {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 52px;
	margin-right: auto;
	padding: 0 18px 0 12px;
	border: 0;
	border-radius: 60px;
	background: transparent;
	font-family: var(--font-brand);
	font-weight: 500;
	font-size: 16px;
	color: var(--b-encre);
	cursor: pointer;
	transition: background-color .2s ease, opacity .2s ease;
}
.jp-nav__prev:hover { background: var(--ink-fill); }
.jp-nav__prev[hidden], .jp-nav__next[hidden], .jp-submit[hidden] { display: none; }
.jp-nav__prev.is-off { opacity: 0; pointer-events: none; }
.jp-nav .cta__icon img { transform: rotate(45deg); transition: transform .3s var(--jp-ease); } /* flèche vers la droite */
.jp-nav .cta:hover .cta__icon, .jp-nav .cta:focus-visible .cta__icon { transform: none; }
.jp-nav .cta:hover .cta__icon img { transform: rotate(45deg) translateY(-3px); }
.jp-nav .cta__label { padding: 18px 26px; }
.jp-nav .cta__icon { padding: 18px; border-radius: 20px; }
.jp-submit:disabled, .jp-submit[aria-busy="true"] { cursor: progress; opacity: .8; }

/* Alerte (erreur renvoyée par le serveur) */
.jp-alert {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0 0 28px;
	padding: 16px 20px;
	border-radius: 20px;
	border: 1.5px solid var(--btn-icon);
	background: rgba(236, 114, 88, .12);
	color: var(--b-encre);
}
.jp-alert svg { flex: none; color: var(--jp-coral-text); }
.jp-alert p { margin: 0; font-size: 16px; line-height: 1.45; font-weight: 500; }

/* Confirmation / avant ouverture / clôture */
.jp-q--message { padding: clamp(48px, 8vh, 96px) 0; }
.jp-done {
	max-width: 780px;
	margin: 0 auto;
	padding: clamp(32px, 5vw, 56px);
	border-radius: 32px;
	background: var(--jp-card);
	border: 1px solid var(--jp-line);
}
.jp .jp-done:focus, .jp .jp-done:focus-visible, .jp .jp-alert:focus, .jp .jp-alert:focus-visible { outline: none; }
.jp-done__icon {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	margin-bottom: 24px;
	border-radius: 50%;
	background: var(--b-encre);
	color: var(--b-lumiere);
}
.jp-done__title { font-size: clamp(28px, 3vw, 44px); }
.jp-done .sec-text { font-size: 18px; }
.jp-done__actions { margin-top: 28px; }

/* =========================================================
 * Suivre la démarche (adresse e-mail, formulaire séparé du questionnaire)
 * ======================================================= */
.jp-suivi { margin: 64px 0 0; padding-top: 32px; border-top: 1px solid var(--ink-line); scroll-margin-top: 96px; } /* même largeur que le questionnaire (.jp-flow) */
.jp-suivi__form, .jp-suivi__status { max-width: 780px; }
.jp-suivi__title { margin: 0 0 16px; font-family: var(--font-brand); font-weight: 600; font-size: 22px; line-height: 1.2; color: var(--b-encre); }
.jp-suivi__row { display: flex; align-items: flex-end; gap: 12px; }
.jp-suivi__field { flex: 1; min-width: 0; }
.jp-suivi__label { display: block; margin: 0 0 6px; font-family: var(--font-brand); font-weight: 500; font-size: 15px; color: var(--b-encre); }
.jp .jp-suivi__input {
	display: block;
	width: 100%;
	height: 56px;
	padding: 0 18px;
	font-family: var(--font-brand-text);
	font-size: 17px;
	color: var(--b-encre);
	background: #fff;
	border: 1.5px solid var(--jp-line-strong);
	border-radius: 16px;
}
.jp .jp-suivi__input:focus { outline: none; border-color: var(--b-encre); box-shadow: 0 0 0 4px rgba(255, 223, 163, .95); }
.jp .jp-suivi__input[aria-invalid="true"] { border-color: #9c3220; }
.jp-suivi__btn { flex: none; }
.jp-suivi__btn .cta__label { padding: 18px 22px; }
.jp-suivi__btn .cta__icon { padding: 18px; border-radius: 18px; }
.jp-suivi__consent { position: relative; display: flex; align-items: flex-start; gap: 12px; min-height: 44px; margin: 16px 0 0; padding: 10px 0; font-size: 15.5px; line-height: 1.45; color: var(--b-encre); cursor: pointer; }
.jp-suivi__consent input { position: absolute; z-index: 1; left: 0; top: 10px; width: 24px; height: 24px; margin: 0; opacity: 0; cursor: pointer; }
.jp-suivi__box {
	flex: none;
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 7px;
	border: 2px solid var(--jp-line-strong);
	background: #fff;
	color: var(--b-creme);
	pointer-events: none;
}
.jp-suivi__box svg { opacity: 0; }
.jp-suivi__consent input:checked + .jp-suivi__box { background: var(--b-encre); border-color: var(--b-encre); }
.jp-suivi__consent input:checked + .jp-suivi__box svg { opacity: 1; }
.jp-suivi__consent input:focus-visible + .jp-suivi__box { outline: 2px solid var(--b-encre); outline-offset: 3px; }
.jp-suivi__consent input[aria-invalid="true"] + .jp-suivi__box { border-color: #9c3220; }
.jp-suivi__err { margin: 6px 0 0; font-size: 14.5px; font-weight: 600; color: #9c3220; }
.jp-suivi__err:empty { display: none; }
.jp-suivi__note { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-text); max-width: 64ch; }
.jp-suivi__status { margin: 0 0 16px; padding: 12px 16px; border-radius: 14px; font-weight: 500; }
.jp-suivi__status.is-ok { background: rgba(124, 152, 105, .16); color: var(--b-encre); }
.jp-suivi__status.is-error { background: rgba(236, 114, 88, .12); color: var(--b-encre); }
.jp .jp-suivi__status:focus { outline: none; }
.jp-q--message .jp-suivi { max-width: 780px; margin: 48px auto 0; } /* aligné sur le panneau de confirmation (centré) */
@media (max-width: 600px) {
	.jp-suivi { margin-top: 48px; }
	.jp-suivi__row { flex-direction: column; align-items: stretch; }
	.jp-suivi__btn .cta__label { flex: 1; justify-content: center; padding: 16px 18px; }
	.jp-suivi__btn .cta__icon { padding: 16px; }
}

/* =========================================================
 * 3. Remerciements
 * ======================================================= */
.jp-thanks { padding: var(--section-y) 0; background: var(--jp-sable); }
.jp-thanks__grid {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: 32px clamp(40px, 7vw, 128px);
	align-items: end;
}
.jp-thanks__body .sec-text { margin: 0 0 24px; }
/* Le menu s'ouvre toujours vers le bas, au-dessus de tout (jamais rogné par le bloc précédent) */
.jp-thanks .jp-share, .jp-done .jp-share { z-index: 40; }

/* =========================================================
 * Responsive
 * ======================================================= */
@media (max-width: 991px) {
	.jp-hero__grid { grid-template-columns: minmax(0, 1fr); }
	.jp-hero__media.arch { width: 100%; height: auto; min-height: 0; aspect-ratio: 5 / 2; justify-self: stretch; }
	.jp-thanks__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
	.jp-chips { grid-template-columns: minmax(0, 1fr); }
	.jp-profile { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 600px) {
	.jp-hero { padding: 20px 0 40px; }
	.jp-hero__title { font-size: clamp(34px, 10vw, 44px); }
	.jp-hero__lead { font-size: 16px; line-height: 1.55; margin-top: 14px; }
	.jp-count { margin-top: 24px; gap: 14px; }
	.jp-count__tile { min-width: 0; padding: 0 12px; }
	.jp-count__num { font-size: 32px; }
	.jp-count__lead { font-size: 17px; }
	.jp-count__date { font-size: 14px; }
	.jp-hero__actions { margin-top: 18px; gap: 10px; }
	.jp-hero__cta { width: 100%; }
	.jp-hero__cta .cta__label { flex: 1; justify-content: center; }
	.jp-share__btn { min-height: 52px; padding: 0 20px 0 16px; }
	.jp-hero__media.arch { aspect-ratio: 2 / 1; --ring-w: 7px; }

	.jp-q { padding: 40px 0 48px; }
	.jp-q__head { padding-bottom: 20px; margin-bottom: 24px; }
	.jp-q__intro { font-size: 15.5px; }
	.jp-q__meta { font-size: 14px; }
	.jp-progress { margin-bottom: 22px; }
	.jp-form.is-stepped .jp-screen { min-height: 0; }
	.jp-screen__q { font-size: clamp(23px, 6.4vw, 27px); margin-bottom: 20px; }
	.jp-screen__lead, .jp-screen__help { font-size: 15.5px; }
	.jp .q-form .jp-input { font-size: 17px; min-height: 150px; padding: 16px; border-radius: 18px; }
	.jp-multi { gap: 10px; }
	.jp-multi__label { width: 30px; height: 30px; font-size: 14px; }
	.jp-ask { align-items: flex-start; }
	.jp .jp-chip { padding: 13px 14px; font-size: 15.5px; }
	.jp-seg__opt { flex: 1 1 auto; }
	.jp-seg__opt span { width: 100%; }

	/* Zone du pouce : navigation pleine largeur collée au bas de l'écran */
	.jp-nav {
		margin: 28px calc(var(--gutter) * -1) 0;
		padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
		background: rgba(252, 241, 218, .94);
		-webkit-backdrop-filter: blur(12px);
		backdrop-filter: blur(12px);
		border-top: 1px solid var(--ink-line);
	}
	.jp-nav__prev { padding: 0 14px 0 8px; }
	.jp-nav .cta { flex: 1; }
	.jp-nav .cta__label { flex: 1; justify-content: center; padding: 15px 18px; }
	.jp-nav .cta__icon { padding: 15px; border-radius: 18px; }

	.jp-done { padding: 28px 20px; border-radius: 24px; }
}
@media (prefers-reduced-motion: reduce) {
	.jp *, .jp *::before, .jp *::after { transition-duration: 0s !important; }
}

/* =========================================================
 * Rythme et respiration (passe d'espacement)
 * Sections bien distinctes : intro (Crème) → questionnaire (Crème clair)
 * → « Suivre la démarche » (Crème, pleine largeur) → remerciements (Sable).
 * Espacements uniquement : aucun contenu ni comportement modifié.
 * ======================================================= */
.jp { --jp-q-bg: #fffaf2; }

/* Introduction */
.jp-hero { padding: clamp(40px, 7vh, 88px) 0 clamp(80px, 12vh, 136px); }
.jp-hero__lead { margin-top: 28px; }
.jp-count { margin-top: 40px; }
.jp-hero__actions { margin-top: 40px; gap: 14px 18px; }

/* Questionnaire : sa propre surface, un seul sujet par écran */
.jp-q {
	background: var(--jp-q-bg);
	border-top: 1px solid var(--ink-line);
	padding: clamp(80px, 12vh, 136px) 0 clamp(88px, 13vh, 144px);
	overflow-x: clip; /* la bande « Suivre » déborde en pleine largeur sans créer de défilement horizontal */
}
.jp-q__head { margin-bottom: clamp(56px, 8vh, 88px); padding-bottom: 44px; border-bottom: 1px solid var(--ink-line); }
.jp-q__intro { margin-top: 16px; }
.jp-q__meta { margin-top: 20px; gap: 6px; }
.jp-alert { margin-bottom: 40px; }
.jp-progress { margin-bottom: 52px; }
.jp-flow__note { margin: -28px 0 36px; }
.jp-screen__part { margin-bottom: 20px; }
.jp-screen__lead { margin-bottom: 32px; }
.jp-screen__q { margin-bottom: 40px; }
.jp-screen__help { margin: -14px 0 36px; }
.jp-ask { margin-bottom: 28px; }
.jp-chips { gap: 14px; }
.jp-multi { margin-bottom: 20px; }
.jp-profile { gap: 44px 56px; }
.jp-sub { margin-top: 22px; }
.jp-recap li { min-height: 76px; padding: 16px 0; }
.jp-recap__clear { margin-top: 24px; }
.jp-nav {
	margin-top: 72px;
	padding: 22px 0;
	background: linear-gradient(180deg, rgba(255, 250, 242, 0), var(--jp-q-bg) 28%);
}

/* Messages (confirmation, avant ouverture, clôture) */
.jp-q--message { padding: clamp(80px, 12vh, 136px) 0 clamp(88px, 13vh, 144px); }
.jp-done__icon { margin-bottom: 32px; }
.jp-done .sec-text { margin-top: 24px; }
.jp-done__actions { margin-top: 40px; }

/* « Suivre la démarche » : bande pleine largeur, nettement détachée du questionnaire */
.jp-q:has(.jp-suivi) { padding-bottom: 0; }
.jp-suivi,
.jp-q--message .jp-suivi {
	position: relative;
	margin-top: clamp(104px, 15vh, 160px);
	padding: clamp(64px, 9vh, 96px) 0 clamp(72px, 10vh, 104px);
	border-top: 0;
}
.jp-suivi::before {
	content: "";
	position: absolute;
	z-index: 0;
	top: 0;
	bottom: 0;
	left: calc(50% - 50vw);
	right: calc(50% - 50vw);
	background: var(--b-creme);
	border-top: 1px solid var(--ink-line);
}
.jp-suivi > * { position: relative; z-index: 1; }
.jp-suivi__title { margin-bottom: 28px; font-size: 24px; }
.jp-suivi__status { margin-bottom: 24px; }
.jp-suivi__consent { margin-top: 22px; }
.jp-suivi__note { margin-top: 16px; }

/* Remerciements */
.jp-thanks { padding: clamp(96px, 14vh, 152px) 0; }
.jp-thanks__grid { gap: 40px clamp(48px, 8vw, 144px); }
.jp-thanks__body .sec-text { margin-bottom: 32px; }

@media (max-width: 600px) {
	.jp-hero { padding: 28px 0 72px; }
	.jp-hero__lead { margin-top: 18px; }
	.jp-count { margin-top: 28px; }
	.jp-hero__actions { margin-top: 28px; gap: 12px; }
	.jp-q { padding: 64px 0 72px; }
	.jp-q__head { margin-bottom: 44px; padding-bottom: 32px; }
	.jp-progress { margin-bottom: 36px; }
	.jp-flow__note { margin: -16px 0 24px; }
	.jp-screen__part { margin-bottom: 16px; }
	.jp-screen__lead { margin-bottom: 24px; }
	.jp-screen__q { margin-bottom: 28px; }
	.jp-screen__help { margin: -8px 0 28px; }
	.jp-ask { margin-bottom: 20px; }
	.jp-chips { gap: 12px; }
	.jp-profile { gap: 36px; }
	.jp-nav { margin-top: 44px; background: rgba(255, 250, 242, .94); }
	.jp-q--message { padding: 64px 0 72px; }
	.jp-suivi, .jp-q--message .jp-suivi { margin-top: 80px; padding: 56px 0 64px; }
	.jp-thanks { padding: 80px 0; }
}

/* =========================================================
 * Audit UX (accessibilité et confort) : uniquement des réglages visuels.
 * ======================================================= */
.jp { --jp-field-line: rgba(14, 34, 49, .5); } /* contour des champs ≥ 3:1 (WCAG 1.4.11) */

/* La barre Précédent / Suivant collée en bas ne doit jamais cacher le champ qui a le focus (WCAG 2.4.11). */
html:has(.jp-form.is-stepped) { scroll-padding-top: 96px; scroll-padding-bottom: 140px; }


/* Arrivée depuis « Je donne mon avis » : la première question vient plus vite. */
.jp-q { padding-top: clamp(64px, 9vh, 104px); }
.jp-q__head { margin-bottom: 48px; padding-bottom: 28px; }

/* Contours des contrôles */
.jp .q-form .jp-input,
.jp .jp-select select,
.jp .jp-suivi__input { border-color: var(--jp-field-line); }
.jp .q-form .jp-input:hover,
.jp .jp-select select:hover,
.jp .jp-suivi__input:hover { border-color: var(--b-encre); }
.jp-chip__box,
.jp-suivi__box,
.jp-seg__opt span { border-color: var(--jp-field-line); }
.jp .jp-chip { border-color: rgba(14, 34, 49, .22); }
.jp-chip.is-disabled .jp-chip__box { border-color: var(--jp-line); }

/* Orientations : la limite de 3 choix se voit, à côté de la consigne et sous les cartes. */
.jp-ask { justify-content: flex-start; flex-wrap: wrap; gap: 8px 14px; }
.jp-ask p { flex: 0 1 auto; }
.jp-ask__max { font-weight: 400; color: var(--ink-text); white-space: nowrap; }
.jp .q-group.is-full .jp-limit.screen-reader-text:not(:empty) {
	position: static !important;
	width: auto;
	height: auto;
	margin: 18px 0 0;
	padding: 12px 16px;
	overflow: visible;
	clip: auto;
	clip-path: none;
	white-space: normal;
	border-radius: 14px;
	background: rgba(255, 223, 163, .5);
	font-size: 15px;
	line-height: 1.45;
	color: var(--b-encre);
}
.jp-screen--prio .jp-screen__q { margin-bottom: 24px; }
.jp-screen--prio .jp-screen__help { margin-bottom: 22px; }

/* Envoyer : même bouton, coche au lieu de la flèche (on ne le confond plus avec Suivant). */
.jp-submit__icon svg { display: block; }
.jp-nav .jp-submit:hover .cta__icon svg { transform: scale(1.08); transition: transform .3s var(--jp-ease); }

@media (max-width: 600px) {
	/* Zone du pouce : marges latérales et zone de sécurité de l'iPhone rétablies. */
	.jp-nav { padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); }
	html:has(.jp-form.is-stepped) { scroll-padding-bottom: 120px; }
	.jp-q { padding-top: 48px; }
	.jp-q__head { margin-bottom: 32px; padding-bottom: 20px; }
	.jp-screen--prio .jp-screen__q { margin-bottom: 20px; }
	.jp-screen--prio .jp-screen__help { margin-bottom: 18px; }
}

/* =========================================================
 * « Rester informé·e » : dernier écran (facultatif) du questionnaire
 * ======================================================= */
.jp-suivi-step { max-width: 620px; }
.jp-suivi-step .jp-suivi__label { font-size: 16px; margin-bottom: 8px; }
.jp-optional { font-family: var(--font-brand-text); font-weight: 400; color: var(--ink-text); }
.jp-req { color: #9c3220; font-weight: 600; } /* astérisque des questions obligatoires (même corail foncé que les erreurs, contraste ≥ 4.5:1) */
.jp-suivi-step .jp-suivi__consent { margin-top: 24px; }
.jp-suivi-step .jp-suivi__note { margin-top: 20px; }
.jp-done__note { margin: 20px 0 0; padding: 12px 16px; border-radius: 14px; background: rgba(255, 223, 163, .45); font-size: 15px; line-height: 1.45; color: var(--b-encre); }

/* =========================================================
 * Questionnaire pleine largeur (même largeur que l'en-tête et le pied de page, gouttière de .wrap).
 * Seuls les paragraphes d'aide / d'introduction gardent une mesure de lecture (~70 caractères).
 * ======================================================= */
.jp-form { max-width: none; }
.jp-suivi-step { max-width: none; }
.jp .jp-select { max-width: none; }
.jp-screen__lead,
.jp-screen__help,
.jp-q__intro,
.jp-suivi-step .jp-suivi__note { max-width: 70ch; }
.jp-screen__q { max-width: 36ch; } /* titre de question : lignes courtes, lisibles d'un coup d'œil */

/* Cartes d'actions : 3 par ligne sur grand écran, 2 sur tablette, 1 sur mobile. */
@media (min-width: 1200px) {
	.jp-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* =========================================================
 * Questions obligatoires : message entre la question et le champ (jamais caché par la barre Suivant sur mobile),
 * contour corail des champs concernés (aucune bordure ajoutée)
 * ======================================================= */
.jp-err { margin: 0 0 12px; font-family: var(--font-brand); font-size: 15px; font-weight: 600; line-height: 1.4; color: #9c3220; } /* corail foncé : contraste ≥ 4.5:1 sur le fond crème */
.jp-err:empty { display: none; }
.jp-screen--prio .jp-err { margin: -8px 0 16px; }
.jp-fs > .jp-err { clear: both; }
.jp-sub .jp-err { margin-bottom: 8px; }
.jp .q-form .jp-input[aria-invalid="true"],
.jp .jp-select select[aria-invalid="true"] { border-color: #c64a32; }
.jp .q-form .jp-input[aria-invalid="true"]:focus { border-color: #c64a32; }
.jp-seg__opt input[aria-invalid="true"] + span,
.jp-chip input[aria-invalid="true"] + .jp-chip__box { border-color: #c64a32; }

/* =========================================================
 * Audit mobile (13/11/2026) : réglages tactiles et petits écrans.
 * Aucun texte ni comportement de validation modifié.
 * ======================================================= */

/* Écrans tactiles : pas d'état « survol » qui reste collé après un appui. */
@media (hover: none) {
    .jp-share__details:not([open]) > .jp-share__btn:hover { background: transparent; border-color: var(--jp-line-strong); }
    .jp-share__btn:hover .jp-share__icon { transform: none; }
    .jp-share__item:hover:not(:focus-visible) { background: transparent; }
    .jp-nav__prev:hover { background: transparent; }
    .jp .jp-chip:hover { border-color: rgba(14, 34, 49, .22); }
    .jp-seg__opt:hover span { border-color: var(--jp-field-line); }
    .jp-link:hover { color: var(--b-encre); }
    .jp-nav .cta:hover .cta__icon img { transform: rotate(45deg); }
}

/* Saisie au clavier virtuel : la barre Précédent / Suivant reprend sa place sous le champ
 * (collée en bas, elle passerait sous le clavier ou mangerait la petite zone visible). */
@media (hover: none) and (pointer: coarse) {
    .jp-form:has(.jp-input:focus, .jp-suivi__input:focus) .jp-nav { position: relative; }
}

/* Téléphone à l'horizontale : trop peu de hauteur pour une barre collée. */
@media (max-height: 500px) and (orientation: landscape) {
    .jp-nav { position: relative; margin-top: 32px; padding-top: 16px; padding-bottom: 16px; }
    html:has(.jp-form.is-stepped) { scroll-padding-bottom: 24px; }
}

@media (max-width: 600px) {
    /* Rythme vertical : la question et son champ remontent dans le premier écran. */
    .jp-progress { margin-bottom: 28px; }
    .jp-screen__part { margin-bottom: 12px; }
    .jp-screen__lead { margin-bottom: 20px; }
    .jp-screen__q { margin-bottom: 24px; }
    .jp-screen__help { margin: -10px 0 24px; }

    /* « Faire connaître la démarche » : pleine largeur comme le bouton principal, sur une ligne. */
    .jp-share { width: 100%; }
    .jp-share__btn { display: flex; justify-content: center; padding: 0 16px; text-align: center; }

    /* Récapitulatif : intitulé et « Revoir » sur la même ligne, le décompte dessous (plus de coupure en trois lignes). */
    .jp-recap li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; }
    .jp-recap__part { grid-column: 1; grid-row: 1; }
    .jp-recap__count { grid-column: 1; grid-row: 2; }
    .jp-recap li > .jp-link { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 359px) {
    .jp-share__btn { gap: 8px; padding: 0 12px; font-size: 15px; }
}
@media (max-width: 600px) {
    /* Questions longues (5 à 6 lignes) : césure « pretty » plutôt qu'équilibrée, moins de lignes en escalier. */
    .jp-screen__q { text-wrap: pretty; }
}

/* =========================================================
 * iOS Safari (WebKit) : champs, appuis, hauteurs d'écran.
 * ======================================================= */
/* Pas de rectangle gris au toucher (les cartes, pastilles et cases ont leur propre état coché) ;
 * pas de zoom au double appui sur les commandes quand on coche vite plusieurs cartes. */
.jp { -webkit-tap-highlight-color: transparent; }
.jp-chip, .jp-seg__opt, .jp-suivi__consent, .jp-share__btn, .jp-share__item,
.jp-nav button, .jp-link, .jp-hero__cta, .jp-select select { touch-action: manipulation; }
/* Champs : sans l'ombre intérieure ni l'arrondi imposés par iOS (bordures et rayons restent ceux du thème). */
.jp .q-form .jp-input,
.jp .jp-suivi__input { -webkit-appearance: none; appearance: none; background-clip: padding-box; }
/* Hauteur d'écran : repli pour les anciens iOS (sans svh), puis la petite hauteur visible (barres de Safari affichées). */
.jp-hero__media.arch { height: min(calc(100vh - 300px), 480px); height: min(calc(100svh - 300px), 480px); }
@media (max-width: 991px) {
    .jp-hero__media.arch { height: auto; }
}
