/* ── Flex Booking – Frontend styles ───────────────────────────── */

.fb-booking-wrapper {
	position: relative;
	max-width: 720px;
	margin: 0 auto;
	font-family: inherit;
}

/* Resource header (single resource) */
.fb-resource-header {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	margin-bottom: 24px;
	padding-bottom: 20px;
	border-bottom: 1px solid #e0e0e0;
}

.fb-resource-header-img img {
	width: 140px;
	height: 100px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
	flex-shrink: 0;
}

.fb-resource-header-body {
	flex: 1;
}

.fb-resource-title {
	margin: 0 0 8px;
	font-size: 22px;
}

.fb-resource-description {
	color: #555;
	font-size: 14px;
	line-height: 1.6;
}

.fb-resource-description p {
	margin: 0 0 8px;
}

/* Notes banner (étape 2 + récap) */
.fb-notes-banner {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	background: #fffde7;
	border-left: 4px solid #f0ad4e;
	border-radius: 0 4px 4px 0;
	padding: 12px 16px;
	margin-bottom: 20px;
	font-size: 14px;
	line-height: 1.6;
}

.fb-notes-banner-icon {
	font-size: 18px;
	flex-shrink: 0;
	line-height: 1.4;
}

@media (max-width: 480px) {
	.fb-resource-header {
		flex-direction: column;
	}
	.fb-resource-header-img img {
		width: 100%;
		height: 160px;
	}
}

/* Step indicator */
.fb-steps {
	display: flex;
	gap: 0;
	margin-bottom: 24px;
	border-bottom: 2px solid #e0e0e0;
}

.fb-step {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px 10px 8px;
	font-size: 13px;
	color: #999;
	flex: 1;
	cursor: default;
}

.fb-step-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #e0e0e0;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	flex-shrink: 0;
}

.fb-step.active .fb-step-number {
	background: #2271b1;
}

.fb-step.active {
	color: #2271b1;
	font-weight: 600;
}

.fb-step.done .fb-step-number {
	background: #5cb85c;
}

.fb-step.done {
	color: #5cb85c;
}

/* Panels */
.fb-panel {
	padding: 16px 0;
}

.fb-panel h3 {
	margin-top: 0;
	margin-bottom: 16px;
	font-size: 18px;
}

/* Resource grid */
.fb-resource-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
}

.fb-resource-card {
	border: 2px solid #ddd;
	border-radius: 6px;
	padding: 16px;
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s;
}

.fb-resource-card:hover,
.fb-resource-card:focus {
	border-color: #2271b1;
	box-shadow: 0 2px 8px rgba(34,113,177,.15);
	outline: none;
}

.fb-resource-card.selected {
	border-color: #2271b1;
	background: #f0f6fc;
}

.fb-resource-card img {
	width: 100%;
	height: 120px;
	object-fit: cover;
	border-radius: 4px;
	margin-bottom: 10px;
}

.fb-resource-info strong {
	display: block;
	font-size: 15px;
	margin-bottom: 4px;
}

.fb-resource-info p {
	margin: 0;
	font-size: 13px;
	color: #666;
}

/* Calendar */
.fb-calendar-wrapper {
	margin-bottom: 20px;
}

.fb-calendar-wrapper .flatpickr-calendar {
	box-shadow: 0 2px 12px rgba(0,0,0,.1);
	border-radius: 6px;
}

/* Slots */
.fb-slots-wrapper {
	margin-bottom: 20px;
}

.fb-slots-wrapper h4 {
	margin-bottom: 10px;
	font-size: 15px;
}

.fb-slots-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 10px;
}

.fb-slot-item {
	border: 2px solid #ddd;
	border-radius: 5px;
	padding: 12px;
	cursor: pointer;
	text-align: center;
	transition: border-color .15s, background .15s;
}

.fb-slot-item strong {
	display: block;
	font-size: 14px;
}

.fb-slot-item span {
	font-size: 12px;
	color: #666;
}

.fb-slot-item:hover {
	border-color: #2271b1;
}

.fb-slot-item.selected {
	border-color: #2271b1;
	background: #f0f6fc;
}

.fb-slot-item.unavailable {
	opacity: .45;
	cursor: not-allowed;
	text-decoration: line-through;
}

/* Options */
.fb-option {
	margin-bottom: 14px;
}

.fb-option label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	cursor: pointer;
}

.fb-option select {
	display: block;
	margin-top: 6px;
	padding: 6px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
}

.fb-option-price {
	font-size: 12px;
	color: #2271b1;
	font-weight: 600;
	margin-left: 4px;
}

/* Price summary */
.fb-price-summary {
	background: #f9f9f9;
	border-radius: 6px;
	padding: 14px 16px;
	margin-top: 16px;
}

.fb-price-line {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 4px 0;
	font-size: 14px;
}

.fb-price-total-line {
	font-size: 16px;
	font-weight: 700;
	border-top: 1px solid #ddd;
	padding-top: 8px;
	margin-top: 8px;
}

/* Customer form */
.fb-customer-form {
	max-width: 480px;
}

.fb-field {
	margin-bottom: 16px;
}

.fb-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 4px;
	color: #333;
}

.fb-field input,
.fb-field textarea {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
	font-family: inherit;
}

.fb-field input:focus,
.fb-field textarea:focus {
	border-color: #2271b1;
	outline: none;
	box-shadow: 0 0 0 2px rgba(34,113,177,.2);
}

.fb-field-error {
	display: block;
	color: #d9534f;
	font-size: 12px;
	margin-top: 4px;
}

/* Summary */
.fb-summary-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.fb-summary-table th,
.fb-summary-table td {
	padding: 8px 10px;
	border: 1px solid #ddd;
	text-align: left;
}

.fb-summary-table th {
	background: #f5f5f5;
	width: 35%;
}

/* Resource notes (wrapper dans le récap — le style visuel est sur .fb-notes-banner) */
.fb-resource-notes {
	margin-top: 16px;
	padding: 0;
	border-radius: 0 4px 4px 0;
	margin-top: 16px;
	font-size: 13px;
}

/* Stripe */
.fb-stripe-wrapper {
	margin-top: 20px;
}

.fb-stripe-wrapper h4 {
	margin-bottom: 10px;
}

/* Navigation */
.fb-step-nav {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 24px;
}

.fb-btn {
	padding: 10px 20px;
	border-radius: 4px;
	border: none;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	transition: background .15s;
}

.fb-btn:disabled {
	opacity: .5;
	cursor: not-allowed;
}

.fb-btn-primary {
	background: #2271b1;
	color: #fff;
}

.fb-btn-primary:hover:not(:disabled) {
	background: #135e96;
}

.fb-btn-secondary {
	background: #f0f0f0;
	color: #333;
}

.fb-btn-secondary:hover:not(:disabled) {
	background: #ddd;
}

/* Error */
.fb-error {
	color: #d9534f;
	background: #fff5f5;
	border: 1px solid #f5c6cb;
	border-radius: 4px;
	padding: 10px 14px;
	margin-top: 10px;
	font-size: 13px;
}

/* Loading overlay */
.fb-loading {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(255,255,255,.75);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 12px;
	z-index: 10;
	border-radius: 6px;
}

.fb-spinner {
	width: 36px;
	height: 36px;
	border: 4px solid #ddd;
	border-top-color: #2271b1;
	border-radius: 50%;
	animation: fb-spin .7s linear infinite;
}

@keyframes fb-spin {
	to { transform: rotate(360deg); }
}

/* Success */
.fb-success {
	text-align: center;
	padding: 40px 20px;
}

.fb-success-icon {
	width: 60px;
	height: 60px;
	background: #5cb85c;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 30px;
	margin-bottom: 16px;
}

.fb-success h3 {
	margin-bottom: 8px;
}

.fb-success-message {
	color: #666;
}

/* Responsive */
@media (max-width: 480px) {
	.fb-steps {
		flex-wrap: wrap;
		gap: 4px;
	}
	.fb-step {
		flex: auto;
		padding: 6px 8px;
	}
	.fb-step-label {
		display: none;
	}
	.fb-slots-list {
		grid-template-columns: 1fr 1fr;
	}
}
