/* Nano Réservations — styles des formulaires.
 * Les couleurs et polices reprennent celles du thème via les variables ci-dessous ;
 * un autre thème peut les redéfinir sur .nf.
 */
.nf {
	--nf-ink: var(--nc-ink, #1e140e);
	--nf-muted: var(--nc-muted, #6e6056);
	--nf-line: var(--nc-line, #ddd2c6);
	--nf-bg: var(--nc-surface, #ffffff);
	--nf-soft: var(--nc-paper, #f5f0ea);
	--nf-brand: var(--nc-brand, #5a3825);
	--nf-accent: var(--nc-accent, #d9a35b);
	--nf-accent-ink: var(--nc-ink, #1e140e);
	--nf-ticket: var(--nc-ticket, #f7ecdd);
	--nf-error: #b42318;
	--nf-warn-bg: #fff4d6;
	--nf-radius: 10px;
	--nf-font: inherit;
	--nf-display: var(--nc-font-display, inherit);
	font-family: var(--nf-font);
	color: var(--nf-ink);
	font-size: 1rem;
	line-height: 1.5;
	container-type: inline-size;
}

.nf *, .nf *::before, .nf *::after { box-sizing: border-box; }
.nf [hidden] { display: none !important; }

.nf-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.nf .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Étapes (progression) ---------- */
.nf-progress {
	display: flex;
	gap: 0;
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
	counter-reset: none;
}
.nf-progress-item {
	flex: 1 1 0;
	display: flex;
	align-items: center;
	gap: .6rem;
	position: relative;
	padding-right: 1rem;
	color: var(--nf-muted);
	font-size: .9rem;
	min-width: 0;
}
.nf-progress-item:not(:last-child)::after {
	content: "";
	flex: 1;
	height: 2px;
	background: var(--nf-line);
	margin-left: .25rem;
	min-width: 1rem;
}
.nf-progress-n {
	flex: none;
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	border: 2px solid var(--nf-line);
	background: var(--nf-bg);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}
.nf-progress-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nf-progress-item.is-current { color: var(--nf-ink); font-weight: 700; }
.nf-progress-item.is-current .nf-progress-n { border-color: var(--nf-brand); background: var(--nf-brand); color: #fff; }
.nf-progress-item.is-done { color: var(--nf-brand); cursor: pointer; }
.nf-progress-item.is-done .nf-progress-n { border-color: var(--nf-brand); color: var(--nf-brand); }
.nf-progress-item.is-done:hover .nf-progress-label { text-decoration: underline; }
.nf-progress-item.is-done:not(:last-child)::after { background: var(--nf-brand); }
.nf-progress-item:focus-visible { outline: 3px solid var(--nf-accent); outline-offset: 4px; border-radius: 6px; }

/* ---------- Mise en page ---------- */
.nf-layout {
	display: grid;
	gap: 2rem;
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
}
@container (min-width: 820px) {
	.nf--priced .nf-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; }
	.nf-ticket { position: sticky; top: calc(var(--nc-header-h, 80px) + 1.5rem); }
}

/* Sans JS, toutes les étapes sont visibles à la suite. */
.nf:not(.nf--js) .nf-progress,
.nf:not(.nf--js) .nf-ticket,
.nf:not(.nf--js) .nf-review { display: none; }
.nf:not(.nf--js) .nf-step + .nf-step { margin-top: 2.5rem; }
.nf--js.nf--steps .nf-step:not(.is-active) { display: none; }

.nf-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.nf-step-title {
	display: block;
	padding: 0;
	margin: 0 0 .35rem;
	font-family: var(--nf-display);
	font-size: clamp(1.35rem, 3cqi, 1.75rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -.01em;
}
.nf-step-title:focus { outline: none; }
.nf:not(.nf--steps) .nf-step-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nf:not(.nf--steps) .nf-grid { margin-top: 0; }
.nf-step-count {
	display: block;
	font-family: var(--nf-font);
	font-size: .85rem;
	font-weight: 400;
	color: var(--nf-muted);
	letter-spacing: 0;
	margin-bottom: .2rem;
}
.nf-step-intro { color: var(--nf-muted); margin: 0 0 1.5rem; max-width: 60ch; }

.nf-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 1.25rem 1rem;
	margin-top: 1.25rem;
}
.nf-grid > * { grid-column: span 6; }
@container (min-width: 520px) {
	.nf-grid > .nf-w-half { grid-column: span 3; }
	.nf-grid > .nf-w-third { grid-column: span 2; }
	.nf-grid > .nf-w-two-thirds { grid-column: span 4; }
}

/* ---------- Champs ---------- */
.nf-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.nf-label {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .15rem .6rem;
	font-weight: 700;
	margin-bottom: .4rem;
	padding: 0;
}
.nf-req { color: var(--nf-error); font-weight: 400; }
.nf-unit {
	font-weight: 400;
	font-size: .85rem;
	color: var(--nf-brand);
	background: color-mix(in srgb, var(--nf-brand) 9%, transparent);
	padding: .05rem .5rem;
	border-radius: 99px;
}
.nf-help { margin: .35rem 0 0; font-size: .875rem; color: var(--nf-muted); }
.nf-error { margin: .35rem 0 0; font-size: .875rem; color: var(--nf-error); font-weight: 700; }
.nf-error:empty { display: none; }

.nf input[type=text], .nf input[type=email], .nf input[type=tel], .nf input[type=number],
.nf input[type=date], .nf input[type=time], .nf select, .nf textarea {
	display: block;
	width: 100%;
	min-height: 3rem;
	padding: .7rem .85rem;
	font: inherit;
	color: inherit;
	background: var(--nf-bg);
	border: 1.5px solid var(--nf-line);
	border-radius: var(--nf-radius);
	transition: border-color .15s, box-shadow .15s;
	-webkit-appearance: none;
	appearance: none;
}
.nf select {
	padding-right: 2.5rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none' stroke='%236e6056' stroke-width='2'%3E%3Cpath d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right .9rem center;
}
.nf textarea { min-height: 7rem; resize: vertical; }
.nf input[type=number] { max-width: 12rem; font-variant-numeric: tabular-nums; }
.nf input:hover, .nf select:hover, .nf textarea:hover { border-color: var(--nf-muted); }
.nf input:focus-visible, .nf select:focus-visible, .nf textarea:focus-visible {
	outline: none;
	border-color: var(--nf-brand);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--nf-brand) 25%, transparent);
}
.nf .has-error input, .nf .has-error select, .nf .has-error textarea { border-color: var(--nf-error); }

/* Choix (radio / cases) */
.nf-choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.nf-choice {
	position: relative;
	display: inline-flex;
	align-items: center;
	cursor: pointer;
}
.nf-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.nf-choice span {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	min-height: 2.75rem;
	padding: .55rem 1rem;
	border: 1.5px solid var(--nf-line);
	border-radius: 99px;
	background: var(--nf-bg);
	transition: border-color .15s, background-color .15s;
}
.nf-choice span::before {
	content: "";
	flex: none;
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 50%;
	border: 2px solid var(--nf-muted);
	background: var(--nf-bg);
	transition: box-shadow .15s, border-color .15s;
}
.nf-choice input[type=checkbox] + span::before { border-radius: 4px; }
.nf-choice:hover span { border-color: var(--nf-muted); }
.nf-choice input:checked + span { border-color: var(--nf-brand); background: color-mix(in srgb, var(--nf-brand) 7%, var(--nf-bg)); }
.nf-choice input:checked + span::before { border-color: var(--nf-brand); box-shadow: inset 0 0 0 3px var(--nf-bg); background: var(--nf-brand); }
.nf-choice input:focus-visible + span { outline: 3px solid var(--nf-accent); outline-offset: 2px; }

.nf-choices--cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.nf-choices--cards .nf-choice { display: flex; }
.nf-choices--cards .nf-choice span {
	flex: 1;
	border-radius: var(--nf-radius);
	padding: 1rem 1.1rem;
	align-items: flex-start;
	min-height: 4rem;
	font-weight: 700;
}
.nf-choices--cards .nf-choice span::before { margin-top: .15rem; }

/* Case unique */
.nf-check {
	display: flex;
	gap: .75rem;
	align-items: flex-start;
	cursor: pointer;
	padding: .8rem 1rem;
	border: 1.5px solid var(--nf-line);
	border-radius: var(--nf-radius);
	background: var(--nf-bg);
	transition: border-color .15s, background-color .15s;
}
.nf-check:hover { border-color: var(--nf-muted); }
.nf-check input {
	flex: none;
	width: 1.25rem;
	height: 1.25rem;
	margin: .15rem 0 0;
	accent-color: var(--nf-brand);
}
.nf-check span { display: block; font-weight: 700; }
.nf-check .nf-unit { display: inline-block; margin-left: .5rem; }
.nf-check:has(input:checked) { border-color: var(--nf-brand); background: color-mix(in srgb, var(--nf-brand) 7%, var(--nf-bg)); }
.nf .has-error .nf-check { border-color: var(--nf-error); }

.nf-conditions {
	background: var(--nf-soft);
	border-radius: var(--nf-radius);
	padding: 1rem 1.25rem;
	margin-bottom: .75rem;
	font-size: .925rem;
}
.nf-conditions ul { margin: 0; padding-left: 1.1rem; }
.nf-conditions li + li { margin-top: .35rem; }

/* Infos */
.nf-info { padding-top: .5rem; }
.nf-info-title {
	font-family: var(--nf-display);
	font-weight: 700;
	font-size: 1.1rem;
	margin: 0;
	padding-top: 1rem;
	border-top: 1px solid var(--nf-line);
}
.nf-grid > .nf-info:first-child .nf-info-title { border-top: 0; padding-top: 0; }
.nf-info-text { margin: .3rem 0 0; color: var(--nf-muted); font-size: .925rem; max-width: 65ch; }
.nf-info:not(:has(.nf-info-title)) {
	padding: .8rem 1rem;
	border-left: 4px solid var(--nf-brand);
	background: var(--nf-soft);
	border-radius: 0 var(--nf-radius) var(--nf-radius) 0;
}
.nf-info:not(:has(.nf-info-title)) .nf-info-text { margin: 0; color: var(--nf-ink); }
.nf-info--warning:not(:has(.nf-info-title)) { border-left-color: #c48a00; background: var(--nf-warn-bg); }

/* Alerte */
.nf-alert {
	padding: .9rem 1.1rem;
	border-radius: var(--nf-radius);
	background: #fdecea;
	color: var(--nf-error);
	font-weight: 700;
	margin-bottom: 1.5rem;
}

/* Navigation */
.nf-nav {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	justify-content: space-between;
	margin-top: 2.25rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--nf-line);
}
.nf-nav [data-next], .nf-nav [data-submit] { margin-left: auto; }
.nf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	min-height: 3rem;
	padding: .75rem 1.6rem;
	font: inherit;
	font-weight: 700;
	border-radius: 99px;
	border: 2px solid transparent;
	cursor: pointer;
	transition: background-color .15s, transform .1s, border-color .15s;
}
.nf-btn:active { transform: translateY(1px); }
.nf-btn:focus-visible { outline: 3px solid var(--nf-brand); outline-offset: 3px; }
.nf-btn--primary { background: var(--nf-accent); color: var(--nf-accent-ink); }
.nf-btn--primary:hover { background: color-mix(in srgb, var(--nf-accent) 85%, #000); }
.nf-btn--ghost { background: transparent; color: var(--nf-ink); border-color: var(--nf-line); }
.nf-btn--ghost:hover { border-color: var(--nf-ink); }
.nf-btn[disabled] { opacity: .65; cursor: progress; }

/* ---------- Ticket d'estimation ---------- */
.nf-ticket {
	--notch: 11px;
	background: var(--nf-ticket);
	border-radius: 6px;
	padding: 1.25rem 1.4rem 1.2rem;
	-webkit-mask:
		radial-gradient(circle var(--notch) at 0 4.1rem, transparent 98%, #000) left / 51% 100% no-repeat,
		radial-gradient(circle var(--notch) at 100% 4.1rem, transparent 98%, #000) right / 51% 100% no-repeat;
	mask:
		radial-gradient(circle var(--notch) at 0 4.1rem, transparent 98%, #000) left / 51% 100% no-repeat,
		radial-gradient(circle var(--notch) at 100% 4.1rem, transparent 98%, #000) right / 51% 100% no-repeat;
}
.nf-ticket-head {
	height: 2.85rem;
	display: flex;
	align-items: flex-start;
	border-bottom: 2px dashed color-mix(in srgb, var(--nf-ink) 25%, transparent);
	margin: 0 -.2rem 1rem;
	padding: 0 .2rem;
}
.nf-ticket-title { font-family: var(--nf-display); font-weight: 700; font-size: 1.15rem; }
.nf-ticket-lines { list-style: none; margin: 0; padding: 0; font-size: .925rem; }
.nf-line { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; }
.nf-line + .nf-line { border-top: 1px solid color-mix(in srgb, var(--nf-ink) 10%, transparent); }
.nf-line-label small { display: block; color: var(--nf-muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.nf-line-amount { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.nf-line--note .nf-line-amount { font-weight: 400; font-style: italic; color: var(--nf-brand); }
.nf-line--empty { color: var(--nf-muted); font-style: italic; }
.nf-ticket-total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	margin-top: .8rem;
	padding-top: .8rem;
	border-top: 2px solid var(--nf-ink);
}
.nf-ticket-total strong {
	font-family: var(--nf-display);
	font-size: 1.6rem;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.nf-ticket-total strong.is-bump { animation: nf-bump .35s ease-out; }
@keyframes nf-bump { 40% { transform: scale(1.06); } }
.nf-ticket-note { margin: .8rem 0 0; font-size: .8rem; color: var(--nf-muted); }

/* ---------- Récapitulatif ---------- */
.nf-review { display: grid; gap: 1rem; margin-top: 1.25rem; }
.nf-review-block {
	border: 1.5px solid var(--nf-line);
	border-radius: var(--nf-radius);
	padding: 1rem 1.25rem;
}
.nf-review-block header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .5rem; }
.nf-review-block h4 { margin: 0; font-family: var(--nf-display); font-size: 1.05rem; }
.nf-review-block dl { margin: 0; display: grid; gap: .3rem; font-size: .925rem; }
.nf-review-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1rem; }
.nf-review-row dt { color: var(--nf-muted); }
.nf-review-row dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.nf-link {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: var(--nf-brand);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* ---------- Succès ---------- */
.nf-success {
	text-align: center;
	padding: 3rem 1.5rem;
	background: var(--nf-soft);
	border-radius: var(--nf-radius);
}
.nf-success:focus { outline: none; }
.nf-success-icon { width: 4rem; height: 4rem; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.nf-success-icon circle { fill: var(--nf-accent); stroke: none; }
.nf-success-icon path { stroke: var(--nf-ink); stroke-dasharray: 40; stroke-dashoffset: 40; animation: nf-check .5s .15s ease-out forwards; }
@keyframes nf-check { to { stroke-dashoffset: 0; } }
.nf-success-title { font-family: var(--nf-display); font-size: 1.6rem; margin: 1rem 0 .5rem; }
.nf-success-text { max-width: 48ch; margin: 0 auto; }
.nf-success-ref { margin-top: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Petits écrans ---------- */
@container (max-width: 560px) {
	.nf-progress { margin-bottom: 1.5rem; }
	.nf-progress-item { padding-right: .5rem; }
	.nf-progress-item:not(.is-current) .nf-progress-label { display: none; }
	.nf-progress-item:not(.is-current) { flex: 0 1 auto; }
	.nf-progress-item.is-current { flex: 1 1 auto; }
	.nf-review-row { grid-template-columns: 1fr; gap: 0; }
	.nf-nav .nf-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
	.nf *, .nf *::before, .nf *::after { animation: none !important; transition: none !important; }
	.nf-success-icon path { stroke-dashoffset: 0; }
}
