/*
 * Optimum Transfert : module de réservation (trajet, informations, confirmation).
 * Structure uniquement (grilles, positions, états). Couleurs, typographies,
 * tailles et espacements viennent des contrôles Elementor du widget.
 */

.optr-bk {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
}

.optr-bk__panel,
.optr-bk__map-panel {
	position: relative;
	min-width: 0;
}

.optr-bk__title {
	margin: 0 0 24px;
	text-align: center;
}

/* ---------- Étape trajet : carte et formulaire côte à côte ---------- */

.optr-bk--map-left,
.optr-bk--map-right {
	align-items: stretch;
}

.optr-bk--map-left {
	grid-template-columns: minmax(0, var(--optr-map-width, 52%)) minmax(0, 1fr);
}

.optr-bk--map-right {
	grid-template-columns: minmax(0, 1fr) minmax(0, var(--optr-map-width, 52%));
}

.optr-bk--map-right .optr-bk__map-panel {
	order: 2;
}

.optr-bk__map-panel {
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.optr-bk__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	grid-template-areas:
		"from from"
		"to to"
		"date date"
		"vehicle vehicle"
		"pax bags";
}

.optr-bk__field--from { grid-area: from; }
.optr-bk__field--to { grid-area: to; }
.optr-bk__field--date { grid-area: date; }
.optr-bk__field--vehicle { grid-area: vehicle; }
.optr-bk__field--pax { grid-area: pax; }
.optr-bk__field--bags { grid-area: bags; }

.optr-bk__field {
	min-width: 0;
}

.optr-bk__label {
	display: block;
}

.optr-bk abbr.optr-bk__req {
	color: #c62828;
	text-decoration: none;
	border: 0;
	cursor: help;
}

/* ---------- Champs ---------- */

.optr-bk__control {
	position: relative;
	display: flex;
	align-items: stretch;
	border: 1px solid;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.optr-bk__icon {
	display: inline-flex;
	flex: 0 0 52px;
	align-items: center;
	justify-content: center;
	border-right: 1px solid;
	border-color: inherit;
}

.optr-bk__icon svg {
	width: 18px;
	height: 18px;
}

.optr-bk .optr-bk__input {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	margin: 0;
	padding: 0 14px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font: inherit;
	color: inherit;
	outline: none;
}

.optr-bk select.optr-bk__input {
	cursor: pointer;
}

.optr-bk__control--area .optr-bk__input {
	padding-top: 12px;
	padding-bottom: 12px;
	resize: vertical;
}

.optr-bk__pair {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	gap: 12px;
}

.optr-bk__pair .optr-bk__icon {
	flex-basis: 44px;
}

.optr-bk__pair .optr-bk__input {
	padding: 0 10px;
}

/* Compteurs passagers et bagages */
.optr-bk .optr-bk__step {
	flex: 0 0 48px;
	margin: 0;
	padding: 0;
	border: 0;
	border-right: 1px solid;
	border-color: inherit;
	border-radius: 0;
	font-size: 1.25em;
	line-height: 1;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.optr-bk .optr-bk__step:last-child {
	border-right: 0;
	border-left: 1px solid;
	border-color: inherit;
}

.optr-bk .optr-bk__step:disabled {
	cursor: not-allowed;
	opacity: 0.4;
}

.optr-bk__count {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
}

/* Suggestions d'adresses */
.optr-bk__suggestions {
	position: absolute;
	top: calc(100% + 4px);
	left: -1px;
	right: -1px;
	z-index: 1000;
	max-height: 280px;
	margin: 0;
	padding: 6px 0;
	overflow-y: auto;
	list-style: none;
	border: 1px solid var(--e-global-color-f1c2d3e, #eef7fe);
	background: var(--e-global-color-c0f5a1e, #fff);
	box-shadow: 0 18px 40px -16px rgba(0, 32, 72, 0.35);
}

.optr-bk__suggestion {
	padding: 10px 16px;
	cursor: pointer;
	line-height: 1.35;
}

.optr-bk__suggestion:hover,
.optr-bk__suggestion[aria-selected="true"] {
	background: var(--e-global-color-f1c2d3e, #eef7fe);
}

.optr-bk__suggestion--empty {
	cursor: default;
	opacity: 0.7;
}

/* ---------- Prix du trajet ---------- */

/* Reprend la carte « CTA final » de l'accueil : dégradé bleu marine, vagues en bas, texte centré. */
.optr-bk__quote {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	margin-top: 28px;
	overflow: hidden;
	text-align: center;
	box-shadow: 0 24px 50px -26px rgba(0, 32, 72, 0.6);
}

.optr-bk__quote > :not(.optr-bk__quote-waves) {
	position: relative;
	z-index: 1;
}

.optr-bk__quote[hidden] {
	display: none;
}

.optr-bk__quote:not([hidden]) {
	animation: optr-bk-quote-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes optr-bk-quote-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
}

.optr-bk__quote-waves {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 100%;
	background-position: center bottom;
	background-repeat: no-repeat;
	background-size: 100% auto;
	pointer-events: none;
}

.optr-bk__quote-summary {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}

/* Pastille véhicule : même forme que la pastille « N passagers » des cartes de la flotte */
.optr-bk__quote-vehicle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
	padding: 5px 14px;
	border: 1px solid;
	border-radius: 999px;
	font-size: 0.85em;
	line-height: 1.3;
}

.optr-bk__quote-vehicle:has(span:empty) {
	display: none;
}

.optr-bk__quote-label,
.optr-bk__quote-meta,
.optr-bk__perk > span,
.optr-bk__quote-hint {
	opacity: var(--optr-quote-muted, 0.82);
}

.optr-bk__quote-label {
	font-size: 0.95em;
}

.optr-bk__quote-meta,
.optr-bk__perks {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.88em;
	line-height: 1.4;
}

.optr-bk__quote-meta {
	gap: 6px 18px;
	margin-top: 6px;
}

.optr-bk__perks {
	/* Bloc centré, lignes alignées à gauche : la coche reste devant le texte quand il passe à la ligne */
	display: grid;
	gap: 8px;
	text-align: left;
}

.optr-bk__quote-meta li,
.optr-bk__perk {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.optr-bk__perk {
	align-items: flex-start;
}

.optr-bk__perk svg {
	margin-top: 0.22em;
}

.optr-bk__quote-meta li:has(span:empty) {
	display: none;
}

.optr-bk__quote svg {
	flex: none;
	width: 0.95em;
	height: 0.95em;
	fill: currentColor;
}

.optr-bk__quote-hint {
	margin: -8px 0 0;
	font-size: 0.82em;
	line-height: 1.5;
}

.optr-bk__quote .optr-bk__error {
	margin: -8px 0 0;
	color: #ffc9c9;
}

.optr-bk__quote .optr-bk__back {
	color: inherit;
}

/* Étape informations : le bloc total suit la carte du récapitulatif */
.optr-bk__quote--total {
	margin-top: 0;
}

.optr-bk__quote--total .optr-bk__quote-hint {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.optr-bk__quote--total .optr-bk__quote-summary {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: baseline;
	align-self: stretch;
	justify-content: space-between;
	gap: 8px 16px;
}

.optr-bk__quote:not([hidden]) + .optr-bk__submit {
	margin-top: 0;
}

.optr-bk__quote:not([hidden]) + .optr-bk__submit .optr-bk__note {
	display: none;
}

.optr-bk__price {
	display: block;
	line-height: 1.15;
}

.optr-bk__quote .optr-bk__price {
	line-height: 1.05;
	letter-spacing: -0.01em;
}

.optr-bk__price.is-pending {
	font-family: inherit;
	font-size: 1rem;
	font-weight: 400;
	opacity: 0.75;
}

@media (prefers-reduced-motion: reduce) {
	.optr-bk__quote:not([hidden]) {
		animation: none;
	}
}

/* ---------- Boutons et messages ---------- */

.optr-bk__submit {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 20px 0 0;
	text-align: center;
}

.optr-bk .optr-bk__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 220px;
	border: 0;
	cursor: pointer;
	text-decoration: none;
	transition: color 0.3s ease, background-color 0.3s ease;
}

.optr-bk .optr-bk__button--block {
	width: 100%;
}

.optr-bk .optr-bk__button:disabled {
	cursor: progress;
	opacity: 0.7;
}

.optr-bk__button-icon {
	width: 0.9em;
	height: 0.9em;
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.optr-bk__button:hover .optr-bk__button-icon:not(.optr-bk__button-icon--static) {
	transform: translateX(4px);
}

.optr-bk .optr-bk__button[hidden] {
	display: none;
}

.optr-bk__note {
	margin: 14px 0 0;
	opacity: 0.85;
}

.optr-bk__error {
	margin: 14px 0 0;
	color: #b32d2e;
}

.optr-bk__back-wrap {
	margin: 10px 0 0;
	text-align: center;
}

.optr-bk .optr-bk__back {
	color: inherit;
	font: inherit;
	text-decoration: underline;
}

/* ---------- Carte ---------- */

.optr-bk__map {
	position: relative;
	z-index: 0;
	flex: 1 1 auto;
	width: 100%;
}

.optr-bk__map.leaflet-container {
	font: inherit;
}

.optr-bk__stats {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 500;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px 16px;
	background: var(--e-global-color-c0f5a1e, #fff);
	box-shadow: 0 10px 28px -12px rgba(0, 32, 72, 0.45);
	pointer-events: none;
}

.optr-bk__stat {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.optr-bk__stat svg {
	width: 1em;
	height: 1em;
}

/* Repères A et B (goutte inclinée) */
.optr-bk__pin-wrap {
	background: none;
	border: 0;
}

.optr-bk__pin {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 3px solid #fff;
	border-radius: 50% 50% 50% 0;
	box-shadow: 0 6px 14px -4px rgba(0, 0, 0, 0.45);
	transform: rotate(-45deg);
}

.optr-bk__pin > span {
	transform: rotate(45deg);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	line-height: 1;
}

/* ---------- Étapes informations et confirmation ---------- */

.optr-bk--checkout,
.optr-bk--confirmation {
	grid-template-columns: minmax(0, 1fr) minmax(0, var(--optr-aside-width, 40%));
}

.optr-bk__aside {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

/* La carte du devis garde une hauteur fixe dans la colonne de droite */
.optr-bk .optr-bk__map-panel--small .optr-bk__map {
	min-height: 0 !important;
	height: 300px;
	flex: 0 0 auto;
}

.optr-bk__title--icon {
	display: flex;
	align-items: center;
	gap: 16px;
	text-align: left;
}

.optr-bk__title--small {
	margin-bottom: 14px;
	font-size: 1.15em;
	text-align: left;
}

.optr-bk__title-icon {
	display: inline-flex;
	flex: 0 0 52px;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
}

.optr-bk__title-img {
	flex: none;
	width: 72px;
	height: 72px;
	object-fit: contain;
}

.optr-bk__title-icon svg {
	width: 22px;
	height: 22px;
}

.optr-bk__info-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.optr-bk__field--wide {
	grid-column: 1 / -1;
}

.optr-bk__info .optr-bk__input {
	padding: 0 16px;
}

.optr-bk__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.optr-bk__consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 24px 0 0;
	cursor: pointer;
}

.optr-bk__turnstile {
	margin-top: 16px;
}

.optr-bk__policy {
	margin: 8px 0 0 28px;
	font-size: 0.85em;
}

.optr-bk__policy a {
	color: inherit;
	text-decoration: underline;
}

.optr-bk__consent input {
	flex: 0 0 auto;
	margin-top: 0.3em;
}

/* ---------- Demande de devis sur mesure ---------- */

.optr-bk__field[hidden] {
	display: none;
}

.optr-bk__title--section {
	margin-top: 36px;
}

.optr-bk__types {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin: 0;
	padding: 0;
	border: 0;
}

.optr-bk__type {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 16px;
	border: 1px solid;
	cursor: pointer;
	outline: 2px solid transparent;
	outline-offset: 2px;
	transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.optr-bk__type:hover {
	box-shadow: 0 10px 24px -18px rgba(0, 32, 72, 0.45);
}

.optr-bk__type-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.optr-bk__type .optr-bk__type-icon {
	display: inline-flex;
	flex: 0 0 44px;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
}

.optr-bk__type-icon svg {
	width: 20px;
	height: 20px;
}

.optr-bk__type-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.optr-bk__type-title {
	font-size: 1.05em;
	line-height: 1.25;
}

.optr-bk__type-desc {
	font-size: 0.85em;
	line-height: 1.45;
	opacity: 0.85;
}

/* Coche dans l'angle de la carte choisie */
.optr-bk__type:has(:checked)::after {
	content: "";
	position: absolute;
	top: 10px;
	right: 10px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--e-global-color-secondary, #50b8f8) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.optr-bk__types + .optr-bk__title--section {
	margin-top: 32px;
}

.optr-bk--request .optr-bk__submit {
	align-items: stretch;
	margin-top: 24px;
}

/* Bloc de droite : même carte que le bloc prix, reste visible au défilement */
.optr-bk--request .optr-bk__aside {
	align-self: start;
	position: sticky;
	top: 24px;
}

.optr-bk__quote--request {
	margin-top: 0;
}

.optr-bk__quote-title {
	margin: 0;
	color: inherit;
	font-size: 1.5em;
	line-height: 1.2;
}

.optr-bk__quote--request .optr-bk__quote-label {
	margin: 6px 0 0;
	line-height: 1.5;
}

.optr-bk .optr-bk__whatsapp {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	align-self: stretch;
	padding: 14px 24px;
	border: 1px solid currentColor;
	color: inherit;
	text-decoration: none;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.optr-bk .optr-bk__whatsapp:hover,
.optr-bk .optr-bk__whatsapp:focus-visible {
	background-color: var(--e-global-color-c0f5a1e, #fff);
	color: var(--e-global-color-primary, #002048);
}

.optr-bk__whatsapp svg {
	width: 1.1em;
	height: 1.1em;
	fill: currentColor;
}

/* Récapitulatif du trajet : libellé à gauche, valeur à droite */
.optr-bk__recap {
	margin: 0;
}

.optr-bk__recap-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 20px;
	padding: 12px 0;
	border-bottom: 1px solid;
}

.optr-bk__recap-row:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.optr-bk__recap dt {
	flex: 0 0 auto;
	margin: 0;
	opacity: 0.8;
}

.optr-bk__recap dd {
	margin: 0;
	font-weight: 600;
	text-align: right;
}

.optr-bk__total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
}

.optr-bk__total-label {
	font-size: 0.85em;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.optr-bk__panel--total .optr-bk__note {
	text-align: center;
}

/* Confirmation */
.optr-bk__success {
	text-align: center;
}

.optr-bk__success-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin-bottom: 18px;
	border-radius: 50%;
	background: var(--e-global-color-e9a1b7c, #f4a91f);
	color: #fff;
	fill: #fff;
}

.optr-bk__success-icon svg {
	width: 26px;
	height: 26px;
}

.optr-bk__reference {
	display: inline-block;
	margin: 18px 0 0;
	padding: 8px 16px;
	background: var(--e-global-color-f1c2d3e, #eef7fe);
	font-family: monospace;
	letter-spacing: 0.04em;
}

.optr-bk--single {
	max-width: 760px;
	margin: 0 auto;
}

.optr-bk__panel--message {
	text-align: center;
}

/* ---------- Tablette et mobile ---------- */

@media (max-width: 1024px) {
	.optr-bk--map-left,
	.optr-bk--map-right,
	.optr-bk--checkout,
	.optr-bk--confirmation {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Le formulaire passe avant la carte */
	.optr-bk--trip .optr-bk__form {
		order: -1;
	}

	.optr-bk--map-right .optr-bk__map-panel {
		order: 0;
	}

	.optr-bk--trip .optr-bk__map {
		min-height: 360px !important;
	}

	.optr-bk--request .optr-bk__aside {
		position: static;
	}
}

@media (max-width: 767px) {
	/* Compteurs côte à côte : l'icône laisse la place aux boutons − / + */
	.optr-bk__control--stepper .optr-bk__icon {
		display: none;
	}

	.optr-bk .optr-bk__step {
		flex-basis: 44px;
	}

	.optr-bk__count {
		min-width: 0;
	}

	.optr-bk__info-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.optr-bk__types {
		grid-template-columns: minmax(0, 1fr);
	}

	.optr-bk .optr-bk__button {
		width: 100%;
		min-width: 0;
	}

	.optr-bk__stats {
		top: 8px;
		right: 8px;
		padding: 8px 12px;
	}

	.optr-bk__recap-row {
		flex-direction: column;
		gap: 2px;
	}

	.optr-bk__recap dd {
		text-align: left;
	}
}

@media (prefers-reduced-motion: reduce) {
	.optr-bk__control,
	.optr-bk .optr-bk__button,
	.optr-bk__button-icon,
	.optr-bk__type,
	.optr-bk .optr-bk__whatsapp {
		transition: none;
	}
}

/* Option « guide à disposition » : même carte sélectionnable que les besoins, sur toute la largeur */
.optr-bk__type--option {
	width: 100%;
	box-sizing: border-box;
	align-items: center;
}

/* Tarif minimum du véhicule choisi, sous la liste des véhicules */
.optr-bk__vehicle-info {
	margin: 8px 0 0;
	font-size: 0.88em;
	line-height: 1.45;
}

/* Prix minimum en gras (même police que le reste du texte). */
.optr-bk__vehicle-info strong {
	font-weight: 700;
}

/* ---------- Confirmation juste après le formulaire (page Informations, une colonne) ---------- */

@media (max-width: 1024px) {
	/* Le bloc « Total + Confirmer la réservation » passe avant la carte et le récapitulatif du trajet. */
	.optr-bk--checkout .optr-bk__quote--total {
		order: -1;
		margin-bottom: 24px;
	}
}
