/* =========================================================
   Page Prendre rendez-vous (refonte du 22/10/2026)
   Chargée sur cette page seulement, après main.css.
   ========================================================= */

/* En-tête : sous-titre court, centré sans justification (une ligne et demie
   justifiée écarte les mots, cf. le catalogue d'occasions). */
.rv-hero .page-header__sub { max-width: 640px; text-align: center; text-wrap: balance; }

.rv-section { background: var(--g50); padding: 44px 0 88px; }
.rv-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 28px;
	align-items: start;
}

/* ---------- Carte du formulaire ---------- */
.rv-carte {
	background: var(--white);
	border-radius: var(--radius-xl);
	box-shadow: 0 1px 2px rgba(15,49,76,.04), 0 14px 44px rgba(15,49,76,.08);
	padding: 40px 44px 36px;
}

/* Étapes numérotées par compteur : l'étape « Votre véhicule », masquée hors
   entretien, ne compte pas, les numéros suivent tout seuls. */
.rv-form { counter-reset: rv-etape; }
.rv-step { min-width: 0; margin: 0 0 40px; padding: 0; border: 0; counter-increment: rv-etape; }
.rv-step__titre {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 18px;
	padding: 0;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -.01em;
	color: var(--navy);
}
.rv-step__num {
	position: relative;
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--navy);
	color: var(--white);
	font-size: .85rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	transition: background-color .3s ease;
}
.rv-step__num::before,
.rv-step__num::after {
	transition: opacity .25s cubic-bezier(.2,0,0,1), scale .25s cubic-bezier(.2,0,0,1), filter .25s cubic-bezier(.2,0,0,1);
}
.rv-step__num::before { content: counter(rv-etape); }
/* Étape remplie : le numéro laisse place à une coche, sur fond rose. */
.rv-step__num::after {
	content: '';
	position: absolute;
	inset: 0;
	margin: auto;
	width: 14px;
	height: 14px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / contain;
	opacity: 0;
	scale: .25;
	filter: blur(4px);
}
.rv-step.is-complete .rv-step__num { background: var(--pink); }
.rv-step.is-complete .rv-step__num::before { opacity: 0; scale: .25; filter: blur(4px); }
.rv-step.is-complete .rv-step__num::after { opacity: 1; scale: 1; filter: blur(0); }
.rv-step__option { font-size: .8rem; font-weight: 600; letter-spacing: 0; color: var(--g400); }

.rv-step--atelier { display: none; }
.rv-form:has(input[name="type_lead"][value="atelier"]:checked) .rv-step--atelier {
	display: block;
	animation: rv-apparait .35s cubic-bezier(.2,.7,.2,1) both;
}

/* Coche ronde des cartes choisies (demande, concession). */
.rv-coche {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: 26px;
	height: 26px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--pink);
	color: var(--white);
	box-shadow: 0 4px 12px rgba(193,127,181,.45);
	pointer-events: none;
	opacity: 0;
	scale: .25;
	filter: blur(4px);
	transition: opacity .25s cubic-bezier(.2,0,0,1), scale .25s cubic-bezier(.2,0,0,1), filter .25s cubic-bezier(.2,0,0,1);
}
label:has(> input:checked) > .rv-coche { opacity: 1; scale: 1; filter: blur(0); }

/* Le bouton radio couvre toute sa carte, invisible : un clic n'importe où
   le coche, et le message « Veuillez sélectionner… » du navigateur pointe
   sur la carte. */
.rv-type > input,
.rv-ville > input,
.rv-concession > input,
.rv-segment > input {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

/* ---------- 1. Votre demande : cartes photo ---------- */
.rv-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rv-type {
	position: relative;
	isolation: isolate;
	display: flex;
	align-items: flex-end;
	min-height: 150px;
	padding: 16px 18px;
	overflow: hidden;
	border-radius: 20px;
	background: var(--navy-dark);
	color: var(--white);
	cursor: pointer;
	transition: box-shadow .25s ease, scale .2s ease;
}
.rv-type__photo {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 30%;
	transition: scale .7s cubic-bezier(.2,.7,.2,1), filter .3s ease;
}
.rv-type::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(12,32,48,0) 30%, rgba(12,32,48,.55) 62%, rgba(12,32,48,.9) 100%);
}
.rv-type__texte { display: flex; flex-direction: column; gap: 3px; }
.rv-type__titre { font-size: 1.08rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.rv-type__desc { font-size: .82rem; font-weight: 600; color: rgba(255,255,255,.82); }
.rv-type:hover .rv-type__photo { scale: 1.05; }
.rv-type:active { scale: .98; }
.rv-type:has(input:checked) { box-shadow: 0 0 0 3px var(--pink), 0 14px 30px rgba(15,49,76,.2); }
/* Une fois le choix fait, les autres cartes passent au second plan. */
.rv-types:has(input:checked) .rv-type:not(:has(input:checked)) .rv-type__photo { filter: grayscale(.6) brightness(.75); }
.rv-type:has(input:focus-visible) { outline: 2px solid var(--pink); outline-offset: 4px; }

/* ---------- Votre véhicule (entretien) : période en segments ---------- */
.rv-label { font-size: .85rem; font-weight: 700; color: var(--navy); }
.rv-segments {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 4px;
	padding: 4px;
	border-radius: var(--radius);
	background: var(--g50);
	box-shadow: inset 0 0 0 1px var(--g100);
}
.rv-segment { position: relative; }
.rv-segment > span {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 4px 6px;
	border-radius: 10px;
	font-size: .85rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	color: var(--g600);
	transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.rv-segment small { font-size: .7rem; font-weight: 600; color: var(--g400); }
.rv-segment:hover > span { color: var(--navy); }
.rv-segment > input:checked + span { background: var(--white); color: var(--navy); box-shadow: 0 1px 3px rgba(15,49,76,.14); }
.rv-segment > input:focus-visible + span { outline: 2px solid var(--pink); outline-offset: 1px; }

/* ---------- Votre concession : villes puis cartes au logo ---------- */
.rv-villes { display: flex; flex-wrap: wrap; gap: 8px; }
.rv-ville { position: relative; }
.rv-ville > span {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 20px;
	border-radius: var(--radius-pill);
	background: var(--g50);
	box-shadow: inset 0 0 0 1px var(--g100);
	font-size: .92rem;
	font-weight: 700;
	color: var(--navy);
	transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, scale .15s ease;
}
.rv-ville:hover > span { background: var(--white); box-shadow: inset 0 0 0 1px var(--g200); }
.rv-ville:active > span { scale: .96; }
.rv-ville > input:checked + span { background: var(--navy); color: var(--white); box-shadow: inset 0 0 0 1px var(--navy); }
.rv-ville > input:focus-visible + span { outline: 2px solid var(--pink); outline-offset: 2px; }

.rv-concessions-zone { margin-top: 16px; }
.rv-concessions-vide {
	padding: 22px 18px;
	border-radius: 16px;
	border: 1.5px dashed var(--g200);
	font-size: .9rem;
	font-weight: 600;
	text-align: center;
	color: var(--g400);
}
.rv-form:has(input[name="ville"]:checked) .rv-concessions-vide { display: none; }
.rv-concessions { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.rv-concessions[hidden] { display: none; }
.rv-concession {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-height: 104px;
	padding: 12px;
	border-radius: 16px;
	background: var(--white);
	box-shadow: inset 0 0 0 1px var(--g100), 0 1px 2px rgba(15,49,76,.04);
	text-align: center;
	cursor: pointer;
	transition: box-shadow .2s ease, background-color .2s ease, translate .2s ease;
	animation: rv-apparait .35s cubic-bezier(.2,.7,.2,1) both;
	animation-delay: calc(var(--i, 0) * 25ms);
}
.rv-concession__logo { display: grid; place-items: center; height: 62px; }
/* Les logos du thème (772 × 392) ont leur marge dans le fichier : une boîte
   fixe à leur format les affiche à la même taille que sur l'accueil. */
.rv-concession__logo img { width: 122px; max-width: 100%; height: 62px; object-fit: contain; }
.rv-concession__nom { font-size: .9rem; font-weight: 700; line-height: 1.25; color: var(--navy); text-wrap: balance; }
.rv-concession__detail { font-size: .75rem; font-weight: 600; color: var(--g400); }
.rv-concession:hover { box-shadow: inset 0 0 0 1px var(--g200), 0 8px 22px rgba(15,49,76,.09); translate: 0 -2px; }
.rv-concession:has(input:checked) { background: #FBF4FA; box-shadow: inset 0 0 0 2px var(--pink), 0 8px 22px rgba(193,127,181,.22); }
.rv-concession:has(input:focus-visible) { outline: 2px solid var(--pink); outline-offset: 2px; }
.rv-concession .rv-coche { top: 8px; right: 8px; width: 22px; height: 22px; }

/* ---------- Accords et envoi ---------- */
.rv-accords {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0 0 26px;
	padding: 18px 20px;
	border-radius: 18px;
	background: var(--g50);
}
.rv-accord { display: flex; align-items: flex-start; gap: 12px; font-size: .85rem; line-height: 1.5; color: var(--g600); cursor: pointer; }
.rv-accord input {
	appearance: none;
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	border-radius: 6px;
	background: var(--white) no-repeat center / 12px;
	box-shadow: inset 0 0 0 1.5px var(--g200);
	cursor: pointer;
	transition: background-color .15s ease, box-shadow .15s ease;
}
.rv-accord:hover input { box-shadow: inset 0 0 0 1.5px var(--g400); }
.rv-accord input:checked {
	background-color: var(--navy);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
	box-shadow: inset 0 0 0 1.5px var(--navy);
}
.rv-accord input:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.rv-accord a { font-weight: 700; color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.rv-accord a:hover { color: var(--pink-dark); }

.rv-envoi__bouton { width: 100%; padding: 18px 28px; font-size: 1.02rem; }
.rv-envoi__bouton svg { transition: translate .2s ease; }
.rv-envoi__bouton:hover svg { translate: 3px 0; }

/* ---------- Après l'envoi ---------- */
.rv-carte.is-envoye .rv-form { display: none; }
.rv-layout:has(.rv-carte.is-envoye) .rv-recap { display: none; }
.rv-merci { padding: 36px 8px 20px; text-align: center; outline: none; }
.rv-merci[hidden] { display: none; }
.rv-merci__icone {
	display: grid;
	place-items: center;
	width: 68px;
	height: 68px;
	margin: 0 auto 20px;
	border-radius: 50%;
	background: var(--pink);
	color: var(--white);
	box-shadow: 0 14px 34px rgba(193,127,181,.42);
	animation: rv-pop .5s cubic-bezier(.2,.7,.2,1) both;
}
.rv-merci h2 { margin: 0 0 10px; font-size: clamp(1.5rem, 3vw, 1.85rem); color: var(--navy); text-wrap: balance; animation: rv-apparait .4s .1s cubic-bezier(.2,.7,.2,1) both; }
.rv-merci__texte { max-width: 460px; margin: 0 auto 28px; font-size: 1rem; color: var(--g600); text-wrap: balance; animation: rv-apparait .4s .18s cubic-bezier(.2,.7,.2,1) both; }
.rv-merci__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; animation: rv-apparait .4s .26s cubic-bezier(.2,.7,.2,1) both; }

/* ---------- Colonne de droite ---------- */
.rv-aside { position: sticky; top: 112px; display: flex; flex-direction: column; gap: 16px; }
.rv-recap,
.rv-ensuite {
	padding: 24px;
	border-radius: 24px;
	background: var(--white);
	box-shadow: 0 1px 2px rgba(15,49,76,.04), 0 14px 44px rgba(15,49,76,.08);
}
.rv-recap__tete { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.rv-recap__titre { font-size: 1.05rem; font-weight: 700; color: var(--navy); }
.rv-recap__compte { font-size: .85rem; font-weight: 700; color: var(--g400); font-variant-numeric: tabular-nums; }
.rv-recap__barre { height: 6px; margin-bottom: 20px; overflow: hidden; border-radius: 3px; background: var(--g100); }
.rv-recap__barre span {
	display: block;
	width: calc(var(--rv-progression, 0) * 100%);
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--pink), var(--pink-dark));
	transition: width .5s cubic-bezier(.2,.7,.2,1);
}
.rv-recap__liste { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.rv-recap__liste li { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 12px; row-gap: 1px; }
.rv-recap__etat {
	position: relative;
	grid-row: span 2;
	width: 22px;
	height: 22px;
	margin-top: 2px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1.5px var(--g200);
	transition: background-color .25s ease, box-shadow .25s ease;
}
.rv-recap__etat::after {
	content: '';
	position: absolute;
	inset: 0;
	margin: auto;
	width: 11px;
	height: 11px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / contain;
	opacity: 0;
	scale: .25;
	filter: blur(4px);
	transition: opacity .25s cubic-bezier(.2,0,0,1), scale .25s cubic-bezier(.2,0,0,1), filter .25s cubic-bezier(.2,0,0,1);
}
.rv-recap__liste li.is-fait .rv-recap__etat { background: var(--pink); box-shadow: none; }
.rv-recap__liste li.is-fait .rv-recap__etat::after { opacity: 1; scale: 1; filter: blur(0); }
.rv-recap__libelle { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--g400); }
.rv-recap__valeur { font-size: .95rem; font-weight: 700; color: var(--g400); overflow-wrap: anywhere; transition: color .2s ease; }
.rv-recap__liste li.is-fait .rv-recap__valeur { color: var(--navy); }

.rv-ensuite .kicker { margin-bottom: 16px; }
.rv-ensuite__liste { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; }
.rv-ensuite__liste li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; font-size: .88rem; line-height: 1.5; color: var(--g600); }
.rv-ensuite__liste strong { color: var(--navy); }
.rv-ensuite__num {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 10px;
	background: var(--g50);
	box-shadow: inset 0 0 0 1px var(--g100);
	font-size: .85rem;
	font-weight: 700;
	color: var(--navy);
	font-variant-numeric: tabular-nums;
}

@keyframes rv-apparait {
	from { opacity: 0; translate: 0 8px; }
	to { opacity: 1; translate: 0 0; }
}
@keyframes rv-pop {
	from { opacity: 0; scale: .5; }
	to { opacity: 1; scale: 1; }
}

/* ---------- Tablette et mobile ---------- */
@media (max-width: 1080px) {
	.rv-layout { grid-template-columns: minmax(0, 1fr); max-width: 780px; }
	.rv-aside { position: static; }
	/* Sous le formulaire, le récapitulatif ne servirait plus à rien. */
	.rv-recap { display: none; }
}
@media (max-width: 640px) {
	.rv-section { padding: 20px 0 64px; }
	.rv-carte { padding: 26px 18px 24px; border-radius: 24px; }
	.rv-step { margin-bottom: 34px; }
	.rv-step__titre { font-size: 1.12rem; }
	/* Une carte par ligne : à deux, titres et descriptions s'écrasaient
	   sur trois lignes. Les photos (720 × 360) gardent leur sujet au centre. */
	.rv-types { grid-template-columns: minmax(0, 1fr); gap: 10px; }
	.rv-type { min-height: 104px; padding: 14px 16px; border-radius: 16px; }
	.rv-type::after { background: linear-gradient(90deg, rgba(12,32,48,.88) 0%, rgba(12,32,48,.55) 55%, rgba(12,32,48,.1) 100%); }
	.rv-type__titre { font-size: 1.02rem; }
	.rv-type__desc { font-size: .78rem; }
	.rv-type .rv-coche { top: 50%; right: 14px; margin-top: -13px; }
	.rv-ville > span { padding: 0 16px; }
	.rv-concessions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.rv-concession { min-height: 96px; }
	.rv-accords { padding: 16px 14px; }
	.rv-ensuite { padding: 22px 20px; }
}
@media (prefers-reduced-motion: reduce) {
	.rv-concession,
	.rv-merci__icone,
	.rv-merci h2,
	.rv-merci__texte,
	.rv-merci__actions,
	.rv-form:has(input[name="type_lead"][value="atelier"]:checked) .rv-step--atelier { animation: none; }
	.rv-type__photo,
	.rv-recap__barre span { transition: none; }
}
