/* ═══════════════════════════════════════════════════════════════
   PTC Réservation - Frontend Styles
   Palette: --color-peach #E8AA79, --color-sage #89BBB0, --color-brown #846834,
            --color-brown-dark #6B5429, --color-cream #F8EDD0, --color-cream-light #FDF8EE,
            --color-gold #F4D06C, --color-white #FFFFFF
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset & Container ───────────────────────────────────────── */
.ptc-widget {
	display: flex;
	max-width: 900px;
	margin: 0 auto;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 20px rgba(0,0,0,0.08);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 14px;
	color: #333;
	line-height: 1.5;
}
.ptc-widget * { box-sizing: border-box; }

/* ── Sidebar ─────────────────────────────────────────────────── */
.ptc-sidebar {
	width: 30%;
	min-width: 220px;
	background: var(--color-peach, #E8AA79);
	color: #fff;
	padding: 28px 20px;
	display: flex;
	flex-direction: column;
}
.ptc-sidebar-title {
	font-family: 'Georgia', 'Times New Roman', serif;
	font-size: 18px;
	font-weight: 400;
	margin: 0 0 28px 0;
	letter-spacing: 0.02em;
}

/* Steps */
.ptc-steps {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
}
.ptc-step {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px;
	border-radius: 8px;
	opacity: 0.6;
	cursor: pointer;
	transition: opacity 0.2s, background 0.2s;
}
.ptc-step.active {
	opacity: 1;
	background: rgba(255,255,255,0.15);
}
.ptc-step.done {
	opacity: 0.85;
}
.ptc-step-icon {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	background: rgba(255,255,255,0.2);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ptc-step.active .ptc-step-icon {
	background: rgba(255,255,255,0.35);
}
.ptc-step-content {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.ptc-step-label {
	font-weight: 600;
	font-size: 13px;
}
.ptc-step-summary {
	font-size: 12px;
	opacity: 0.85;
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}


/* ── Main Content ────────────────────────────────────────────── */
.ptc-main {
	flex: 1;
	background: #fff;
	padding: 32px;
	position: relative;
	min-height: 480px;
}

/* Panels */
.ptc-panel {
	display: none;
}
.ptc-panel.active {
	display: block;
}
.ptc-panel-title {
	font-family: 'Georgia', 'Times New Roman', serif;
	color: var(--color-brown, #846834);
	font-size: 20px;
	font-weight: 400;
	margin: 0 0 24px;
}
.ptc-panel-footer {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 28px;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.ptc-btn {
	padding: 12px 28px;
	border-radius: 8px;
	border: none;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, transform 0.1s;
}
.ptc-btn:active { transform: scale(0.98); }
.ptc-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}
.ptc-btn-primary {
	background: var(--color-peach, #E8AA79);
	color: #fff;
}
.ptc-btn-primary:hover:not(:disabled) { background: var(--color-brown, #846834); }
.ptc-btn-secondary {
	background: transparent;
	color: var(--color-brown, #846834) !important;
	border: 1px solid #ddd;
}
.ptc-btn-secondary:hover { background: var(--color-cream-light, #FDF8EE); color: var(--color-brown-dark, #6B5429) !important; }
.ptc-btn-confirm {
	background: var(--color-brown-dark, #6B5429);
	color: #fff;
}
.ptc-btn-confirm:hover:not(:disabled) { background: var(--color-brown, #846834); }

/* ── Participant Counter ─────────────────────────────────────── */
.ptc-counter {
	display: flex;
	align-items: center;
	gap: 20px;
	justify-content: center;
	margin: 40px 0;
}
.ptc-counter-btn {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 2px solid var(--color-peach, #E8AA79);
	background: #fff;
	color: var(--color-peach, #E8AA79);
	font-size: 24px;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, color 0.2s;
	line-height: 1;
}
.ptc-counter-btn:hover {
	background: var(--color-peach, #E8AA79);
	color: #fff;
}
.ptc-counter-value {
	font-size: 48px;
	font-weight: 700;
	color: var(--color-brown, #846834);
	min-width: 60px;
	text-align: center;
}
.ptc-counter-hint {
	text-align: center;
	font-size: 13px;
	color: var(--color-peach, #E8AA79);
	margin-top: -20px;
}

/* ── Calendar ────────────────────────────────────────────────── */
.ptc-calendar {
	margin-bottom: 24px;
}
.ptc-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}
.ptc-cal-nav {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid #ddd;
	background: #fff;
	font-size: 20px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--color-brown, #846834);
}
.ptc-cal-nav:hover { background: var(--color-cream-light, #FDF8EE); }
.ptc-cal-title {
	display: flex;
	gap: 8px;
	align-items: center;
}
.ptc-cal-select {
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 6px 10px;
	font-size: 14px;
	color: var(--color-brown, #846834);
	font-weight: 600;
	background: #fff;
	cursor: pointer;
}
.ptc-cal-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	text-align: center;
	font-size: 11px;
	color: #999;
	font-weight: 600;
	text-transform: uppercase;
	margin-bottom: 8px;
}
.ptc-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}
.ptc-cal-day {
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	font-size: 14px;
	cursor: default;
	position: relative;
}
.ptc-cal-day.empty { visibility: hidden; }
.ptc-cal-day.disabled {
	color: #ccc;
}
.ptc-cal-day.available {
	color: #333;
	background: var(--color-cream, #F8EDD0);
	cursor: pointer;
	font-weight: 500;
}
.ptc-cal-day.available:hover {
	background: var(--color-sage, #89BBB0);
	color: #fff;
}
.ptc-cal-day.selected {
	background: var(--color-sage, #89BBB0);
	color: #fff;
	font-weight: 700;
}
.ptc-cal-day.today::after {
	content: '';
	position: absolute;
	bottom: 4px;
	left: 50%;
	transform: translateX(-50%);
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--color-peach, #E8AA79);
}

/* ── Slots ────────────────────────────────────────────────────── */
.ptc-slots-title {
	color: var(--color-brown, #846834);
	font-size: 15px;
	margin: 0 0 12px;
	font-family: 'Georgia', 'Times New Roman', serif;
}
.ptc-slots-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.ptc-slot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	border: 2px solid #ddd;
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s;
}
.ptc-slot:hover {
	border-color: var(--color-sage, #89BBB0);
	background: var(--color-cream-light, #FDF8EE);
}
.ptc-slot.selected {
	border-color: var(--color-sage, #89BBB0);
	background: var(--color-cream, #F8EDD0);
}
.ptc-slot.full {
	opacity: 0.4;
	cursor: not-allowed;
	background: #f5f5f5;
}
.ptc-slot.hidden-full { display: none; }
.ptc-slot-time {
	font-weight: 600;
	color: #333;
}
.ptc-slot-capacity {
	font-size: 12px;
	color: #888;
}
.ptc-slot-capacity.low {
	color: var(--color-peach, #E8AA79);
}

/* ── Form ─────────────────────────────────────────────────────── */
.ptc-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
.ptc-field-full {
	grid-column: 1 / -1;
}
.ptc-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
	color: #555;
}
.ptc-required { color: var(--color-peach, #E8AA79); }
.ptc-field input,
.ptc-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 14px;
	transition: border-color 0.2s;
	font-family: inherit;
}
.ptc-field input:focus,
.ptc-field textarea:focus {
	outline: 2px solid var(--color-peach, #E8AA79);
	outline-offset: 1px;
	border-color: var(--color-peach, #E8AA79);
}
.ptc-field input.error,
.ptc-field textarea.error {
	border-color: var(--color-peach, #E8AA79);
}
.ptc-phone-input {
	display: flex;
	align-items: stretch;
	border: 1px solid #ddd;
	border-radius: 8px;
	overflow: hidden;
}
.ptc-phone-flag {
	display: flex;
	align-items: center;
	padding: 0 12px;
	background: var(--color-cream-light, #FDF8EE);
	font-size: 13px;
	white-space: nowrap;
	border-right: 1px solid #ddd;
}
.ptc-phone-input input {
	border: none;
	border-radius: 0;
}
.ptc-phone-input input:focus {
	border: none;
	box-shadow: none;
	outline: transparent;
}

/* ── Summary card ─────────────────────────────────────────────── */
.ptc-summary-card {
	background: var(--color-cream-light, #FDF8EE);
	border-radius: 8px;
	padding: 20px;
}
.ptc-summary-card table {
	width: 100%;
	border-collapse: collapse;
}
.ptc-summary-card td {
	padding: 8px 0;
	border-bottom: 1px solid #eee;
	font-size: 14px;
}
.ptc-summary-card td:first-child {
	color: #888;
	width: 120px;
}
.ptc-summary-card tr:last-child td {
	border-bottom: none;
}

/* ── Success ──────────────────────────────────────────────────── */
.ptc-success {
	text-align: center;
	padding: 40px 0;
}
.ptc-success-icon {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--color-sage, #89BBB0);
	color: #fff;
	font-size: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px;
}
.ptc-success-title {
	color: var(--color-brown, #846834);
	font-family: 'Georgia', 'Times New Roman', serif;
	font-size: 22px;
	margin: 0 0 12px;
}
.ptc-success-message {
	color: #555;
	max-width: 400px;
	margin: 0 auto;
}
.ptc-success-ref {
	margin-top: 16px;
	font-weight: 600;
	color: var(--color-brown, #846834);
}

/* ── Error ────────────────────────────────────────────────────── */
.ptc-error {
	background: var(--color-cream, #F8EDD0);
	color: var(--color-brown, #846834);
	padding: 12px 16px;
	border-radius: 8px;
	margin-top: 12px;
	font-size: 13px;
}

/* ── Focus Styles (Accessibility) ─────────────────────────────── */
.ptc-btn:focus-visible,
.ptc-counter-btn:focus-visible {
	outline: 2px solid var(--color-peach, #E8AA79);
	outline-offset: 2px;
}
.ptc-cal-nav:focus-visible {
	outline: 2px solid var(--color-peach, #E8AA79);
	outline-offset: 2px;
}
.ptc-cal-day.available:focus-visible {
	outline: 2px solid var(--color-sage, #89BBB0);
	outline-offset: -2px;
}
.ptc-slot:focus-visible {
	outline: 2px solid var(--color-sage, #89BBB0);
	outline-offset: 2px;
}
.ptc-phone-input:focus-within {
	border-color: var(--color-peach, #E8AA79);
	outline: 2px solid var(--color-peach, #E8AA79);
	outline-offset: 1px;
}
.ptc-phone-input.error {
	border-color: var(--color-peach, #E8AA79);
}

/* ── Loading ──────────────────────────────────────────────────── */
.ptc-loading {
	text-align: center;
	padding: 20px;
	color: #888;
}

/* ═══════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
	.ptc-widget {
		flex-direction: column;
		border-radius: 8px;
	}
	.ptc-sidebar {
		width: 100%;
		min-width: 0;
		padding: 16px 20px;
	}
	.ptc-sidebar-title {
		font-size: 16px;
		margin-bottom: 12px;
	}
	.ptc-steps {
		flex-direction: row;
		gap: 8px;
		overflow-x: auto;
	}
	.ptc-step {
		padding: 8px;
		flex-shrink: 0;
		min-width: 0;
	}
	.ptc-step-icon {
		width: 28px;
		height: 28px;
	}
	.ptc-step-icon svg {
		width: 16px;
		height: 16px;
	}
	.ptc-step-summary {
		display: none;
	}
	.ptc-main {
		padding: 20px;
		min-height: 400px;
	}
	.ptc-form-grid {
		grid-template-columns: 1fr;
	}
	.ptc-counter-value {
		font-size: 36px;
	}
	.ptc-counter-btn {
		width: 40px;
		height: 40px;
		font-size: 20px;
	}
	.ptc-panel-footer {
		flex-direction: column-reverse;
	}
	.ptc-btn {
		width: 100%;
		text-align: center;
	}
}

@media (max-width: 480px) {
	.ptc-cal-day {
		font-size: 12px;
	}
	.ptc-slot {
		padding: 10px 12px;
	}
}
