/**
 * Espace Gold Change : fenêtre « Prendre rendez-vous » (centrée sur ordinateur, en bas de l'écran sur mobile).
 */
.egc-rdv,
.egc-rdv-recherche {
	--egc-rdv-or: var(--e-global-color-primary, #C59956);
	--egc-rdv-noir: var(--e-global-color-secondary, #231F20);
	--egc-rdv-creme: var(--e-global-color-egccreme, #F3EBDD);
}

.egc-rdv {
	width: 560px;
	max-width: calc(100vw - 30px);
	max-height: calc(100svh - 40px);
	margin: auto;
	padding: 0;
	overflow: hidden;
	border: 3px solid var(--egc-rdv-or);
	border-radius: 30px;
	background: #FFFFFF;
	color: var(--egc-rdv-noir);
	font-family: var(--e-global-typography-text-font-family, Roboto), sans-serif;
	box-shadow: 0 24px 60px rgba(35, 31, 32, 0.3);
}

.egc-rdv::backdrop {
	background: rgba(35, 31, 32, 0.6);
}

html.egc-rdv-ouvert {
	overflow: hidden;
}

.egc-rdv[open] {
	display: flex;
	animation: egc-rdv-entree 0.22s ease-out;
}

@keyframes egc-rdv-entree {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: none; }
}

.egc-rdv__boite {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: 100%;
	padding: 34px 34px 26px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.egc-rdv__boite > * {
	/* La liste qui s'allonge ne doit jamais écraser les éléments du haut. */
	flex-shrink: 0;
}

.egc-rdv .egc-rdv__fermer {
	position: absolute;
	top: 14px;
	right: 14px;
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 40px !important;
	min-width: 40px !important;
	height: 40px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: var(--egc-rdv-creme) !important;
	color: var(--egc-rdv-noir) !important;
	cursor: pointer;
}

.egc-rdv .egc-rdv__fermer svg {
	width: 20px;
	height: 20px;
}

.egc-rdv .egc-rdv__fermer:hover,
.egc-rdv .egc-rdv__fermer:focus-visible {
	background: var(--egc-rdv-noir) !important;
	color: #FFFFFF !important;
}

.egc-rdv__titre {
	margin: 0;
	padding-right: 44px;
	font-family: var(--e-global-typography-egch3-font-family, Roboto), sans-serif;
	font-size: 28px;
	font-weight: 700;
	line-height: 34px;
}

.egc-rdv__question {
	margin: -6px 0 4px;
	font-size: 16px;
	line-height: 22px;
}

.egc-rdv-recherche .egc-rdv__geo {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100% !important;
	height: 52px !important;
	padding: 0 20px !important;
	border: 0 !important;
	border-radius: 33px !important;
	background: var(--egc-rdv-or) !important;
	box-shadow: 0 4px 0 var(--egc-rdv-noir) !important;
	color: #FFFFFF !important;
	font-family: var(--e-global-typography-egcbouton-font-family, Roboto), sans-serif;
	font-size: 16px;
	font-weight: 900;
	line-height: 22px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.egc-rdv-recherche .egc-rdv__geo svg {
	width: 22px;
	height: 22px;
}

.egc-rdv-recherche .egc-rdv__geo:hover,
.egc-rdv-recherche .egc-rdv__geo:focus-visible {
	background: var(--egc-rdv-noir) !important;
}

.egc-rdv-recherche .egc-rdv__geo:focus-visible {
	outline: 2px solid var(--e-global-color-accent, #85622E);
	outline-offset: 3px;
}

/* Résultats affichés : en-tête compact (recherche seule, cible de localisation dans le champ). */
.egc-rdv-recherche.est-resultats .egc-rdv__geo,
.egc-rdv-recherche.est-resultats .egc-rdv__ou {
	display: none !important;
}

.egc-rdv-recherche .egc-rdv__recherche .egc-rdv__geo-mini {
	right: 46px;
	display: none !important;
	color: var(--egc-rdv-or) !important;
}

.egc-rdv-recherche.est-resultats .egc-rdv__recherche .egc-rdv__geo-mini {
	display: flex !important;
}

.egc-rdv-recherche.est-resultats .egc-rdv__recherche .egc-rdv__geo-mini[hidden] {
	display: none !important;
}

.egc-rdv-recherche .egc-rdv__recherche .egc-rdv__geo-mini:hover,
.egc-rdv-recherche .egc-rdv__recherche .egc-rdv__geo-mini:focus-visible {
	background: var(--egc-rdv-creme) !important;
}

.egc-rdv-recherche .egc-rdv__geo-mini.est-attente svg {
	animation: egc-rdv-tourne 1s linear infinite;
}

.egc-rdv-recherche.est-resultats .egc-rdv__recherche input[type="search"] {
	padding-right: 92px;
}

.egc-rdv-recherche .egc-rdv__geo.est-attente svg {
	animation: egc-rdv-tourne 1s linear infinite;
}

@keyframes egc-rdv-tourne {
	to { transform: rotate(360deg); }
}

.egc-rdv__ou {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 2px 0;
	color: var(--egc-rdv-or);
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
}

.egc-rdv__ou::before,
.egc-rdv__ou::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: var(--egc-rdv-or);
}

.egc-rdv__ou[hidden],
.egc-rdv__msg[hidden],
.egc-rdv-recherche .egc-rdv__geo[hidden] {
	display: none !important;
}

.egc-rdv__recherche {
	position: relative;
	margin: 0;
}

.egc-rdv-recherche .egc-rdv__recherche input[type="search"] {
	width: 100%;
	height: 48px;
	padding: 0 52px 0 20px;
	border: 1px solid var(--egc-rdv-or);
	border-radius: 24px;
	background: #FFFFFF;
	color: var(--egc-rdv-noir);
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
}

.egc-rdv-recherche .egc-rdv__recherche input[type="search"]::placeholder {
	color: #6B6466;
	opacity: 1;
}

.egc-rdv-recherche .egc-rdv__recherche input[type="search"]:focus {
	outline: 2px solid var(--e-global-color-accent, #85622E);
	outline-offset: 2px;
}

.egc-rdv-recherche .egc-rdv__recherche button {
	position: absolute;
	top: 4px;
	right: 4px;
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 40px !important;
	min-width: 40px !important;
	height: 40px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: transparent !important;
	color: var(--egc-rdv-noir) !important;
	cursor: pointer;
}

.egc-rdv-recherche .egc-rdv__recherche button svg {
	width: 20px;
	height: 20px;
}

.egc-rdv__msg {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 21px;
}

.egc-rdv__liste {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.egc-rdv__liste:empty {
	display: none;
}

.egc-rdv__agence {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 14px;
	border: 1px solid var(--egc-rdv-or);
	border-radius: 20px;
	background: #FFFFFF;
}

.egc-rdv__agence.est-proche {
	border-width: 2px;
	background: var(--egc-rdv-creme);
}

.egc-rdv__photo {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	border-radius: 12px;
	background: var(--egc-rdv-creme);
	object-fit: cover;
}

.egc-rdv__infos {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	min-width: 0;
}

.egc-rdv__badge {
	padding: 2px 10px;
	border-radius: 10px;
	background: var(--egc-rdv-noir);
	color: #FFFFFF;
	font-size: 12px;
	font-weight: 700;
	line-height: 18px;
}

.egc-rdv__nom {
	font-size: 17px;
	font-weight: 700;
	line-height: 23px;
}

.egc-rdv__km {
	color: var(--e-global-color-accent, #85622E);
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
}

.egc-rdv__adr {
	font-size: 14px;
	line-height: 20px;
}

.egc-rdv a.egc-rdv__tel {
	color: var(--e-global-color-accent, #85622E);
	font-size: 14px;
	font-weight: 700;
	line-height: 20px;
	text-decoration: none;
}

.egc-rdv a.egc-rdv__btn {
	flex: 0 0 auto;
	padding: 11px 18px;
	border-radius: 33px;
	background: var(--egc-rdv-or);
	box-shadow: 0 3px 0 var(--egc-rdv-noir);
	color: #FFFFFF;
	font-family: var(--e-global-typography-egcbouton-font-family, Roboto), sans-serif;
	font-size: 14px;
	font-weight: 900;
	line-height: 18px;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	transition: background-color 0.2s ease;
}

.egc-rdv a.egc-rdv__btn:hover,
.egc-rdv a.egc-rdv__btn:focus-visible {
	background: var(--egc-rdv-noir);
	color: #FFFFFF;
}

.egc-rdv a.egc-rdv__toutes {
	align-self: center;
	margin-top: 4px;
	color: var(--egc-rdv-noir);
	font-size: 14px;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Mobile : panneau posé en bas de l'écran, pleine largeur. */
@media (max-width: 767px) {
	.egc-rdv {
		width: 100%;
		max-width: 100%;
		max-height: 92svh;
		margin: auto 0 0;
		border-width: 3px 0 0;
		border-radius: 24px 24px 0 0;
	}

	.egc-rdv__boite {
		gap: 12px;
		padding: 24px 15px calc(20px + env(safe-area-inset-bottom));
	}

	.egc-rdv .egc-rdv__fermer {
		top: 12px;
		right: 12px;
	}

	.egc-rdv__titre {
		font-size: 22px;
		line-height: 28px;
	}

	.egc-rdv__question {
		font-size: 15px;
		line-height: 21px;
	}

	.egc-rdv__agence {
		flex-wrap: wrap;
		gap: 10px 12px;
		padding: 12px;
	}

	.egc-rdv__photo {
		flex-basis: 52px;
		width: 52px;
		height: 52px;
	}

	.egc-rdv__infos {
		flex-basis: calc(100% - 64px);
	}

	.egc-rdv a.egc-rdv__btn {
		flex: 1 1 100%;
		padding: 12px 18px;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.egc-rdv[open],
	.egc-rdv-recherche .egc-rdv__geo.est-attente svg {
		animation: none;
	}
}

/* Recherche d'agence dans une page (résultat de l'estimation). */
.egc-rdv-recherche--page {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.egc-rdv-recherche--page > * {
	flex-shrink: 0;
}

/* Recherche compacte (résultat de l'estimation) : sans question ni gros bouton, cible de localisation dans le champ. */
.egc-rdv-recherche--compacte .egc-rdv__question,
.egc-rdv-recherche--compacte .egc-rdv__geo,
.egc-rdv-recherche--compacte .egc-rdv__ou {
	display: none !important;
}

.egc-rdv-recherche.egc-rdv-recherche--compacte .egc-rdv__recherche .egc-rdv__geo-mini {
	display: flex !important;
}

.egc-rdv-recherche.egc-rdv-recherche--compacte .egc-rdv__recherche .egc-rdv__geo-mini[hidden] {
	display: none !important;
}

.egc-rdv-recherche.egc-rdv-recherche--compacte .egc-rdv__recherche input[type="search"] {
	padding-right: 92px;
}

/* Avis « estimation jointe » (une estimation est en cours dans la page). */
.egc-rdv__estimation {
	margin: 0 0 14px;
	padding: 10px 14px;
	border-radius: 12px;
	background: var(--e-global-color-egccreme, #F3EBDD);
	color: var(--e-global-color-accent, #85622E);
	font-size: 14px;
	font-weight: 700;
	line-height: 20px;
}

.egc-rdv__estimation[hidden] {
	display: none !important;
}
