.fgh-form {
	/* Couleurs du site foiesgrashirsch.fr (kit Elementor). */
	--fgh-accent: #5A493F;
	--fgh-accent-hover: #46382f;
	--fgh-yellow: #F8B535;
	--fgh-dark: #232323;
	--fgh-line: #e0e0e0;
	--fgh-soft: #fef6e6;
	--fgh-field: #cfcfcf;
	position: relative;
	max-width: 1180px;
	margin: 0 auto;
	container-type: inline-size;
}
.fgh-form *,
.fgh-form *::before,
.fgh-form *::after { box-sizing: border-box; }

.fgh-intro { margin: 0 0 1.5em; }

.fgh-cat { margin: 0 0 1.75em; }
.fgh-cat-title {
	margin: 0 0 .15em;
	padding-bottom: .15em;
	border-bottom: 2px solid var(--fgh-yellow);
	color: var(--fgh-dark);
	font-family: 'Grand Hotel', cursive;
	font-size: 2em;
	font-weight: 400;
	line-height: 1.2;
}

.fgh-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 10em 8em 6.5em;
	gap: .4em .9em;
	align-items: center;
	padding: .65em .5em;
	border-bottom: 1px solid var(--fgh-line);
	transition: background-color .15s;
}
.fgh-row.is-selected { background: var(--fgh-soft); }
.fgh-name strong { display: block; font-weight: 600; }
.fgh-detail,
.fgh-hint { display: block; font-size: .85em; opacity: .75; }
.fgh-email-hint { margin-top: 4px; }
.fgh-price { text-align: right; white-space: nowrap; }
.fgh-qty { display: flex; align-items: center; justify-content: flex-end; gap: .35em; }
.fgh-form .fgh-qty input {
	width: 5.5em;
	padding: .45em .5em;
	font: inherit;
	text-align: right;
	border: 1px solid var(--fgh-field);
	border-radius: 4px;
	background: #fff;
}
.fgh-unit { font-size: .9em; }
.fgh-sub { text-align: right; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Barre du total, en bas de l'écran (mobile et écrans étroits). */
.fgh-totalbar {
	position: sticky;
	bottom: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	margin: 1em 0 .4em;
	padding: .85em 1.1em;
	color: var(--fgh-dark);
	background: var(--fgh-yellow);
	border-radius: 6px;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, .12);
}
.fgh-totalbar strong { font-size: 1.3em; font-variant-numeric: tabular-nums; }
.fgh-small { margin: .2em 0 1.75em; font-size: .85em; opacity: .75; }

.fgh-box {
	margin: 0 0 1.5em;
	padding: 1em 1.2em 1.25em;
	border: 1px solid var(--fgh-line);
	border-radius: 6px;
}
.fgh-box legend { padding: 0 .4em; font-weight: 600; color: var(--fgh-accent); }
.fgh-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1em 1.25em; }
.fgh-field { display: block; margin: 0; font-size: .95em; }
.fgh-date-field label,
.fgh-slot-field label { display: block; line-height: inherit; }
.fgh-form .fgh-field input,
.fgh-form .fgh-field select,
.fgh-form .fgh-field textarea,
.fgh-field .fgh-cal {
	display: block;
	margin-top: .3em;
}
.fgh-form .fgh-field input,
.fgh-form .fgh-field select,
.fgh-form .fgh-field textarea {
	width: 100%;
	padding: .6em .7em;
	font: inherit;
	border: 1px solid var(--fgh-field);
	border-radius: 4px;
	background: #fff;
}
.fgh-full { grid-column: 1 / -1; }
.fgh-req { color: var(--fgh-accent); }
.fgh-field-error { margin: .2em 0 0; color: #b3261e; font-size: .9em; }
.fgh-field-error:empty { display: none; }

.fgh-form input:focus-visible,
.fgh-form select:focus-visible,
.fgh-form textarea:focus-visible,
.fgh-form button:focus-visible {
	outline: 2px solid var(--fgh-accent);
	outline-offset: 2px;
}

.fgh-error {
	margin: 0 0 1.25em;
	padding: .85em 1em;
	background: #fdecea;
	border-left: 4px solid #b3261e;
}
.fgh-error:empty { display: none; }

.fgh-conditions { margin: 0 0 1em; font-size: .9em; }

/* Boutons : sélecteurs renforcés pour passer devant les styles de bouton du thème (Hello Elementor). */
.fgh-form .fgh-submit,
.fgh-form .fgh-submit:hover,
.fgh-form .fgh-submit:focus {
	display: inline-block;
	padding: .9em 1.75em;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--fgh-accent);
	border: 0;
	border-radius: 5px;
	cursor: pointer;
	text-decoration: none;
}
.fgh-form .fgh-submit:hover { background: var(--fgh-accent-hover); }
.fgh-form .fgh-submit:disabled { opacity: .6; cursor: wait; }

/* ---------- Calendrier ---------- */

.fgh-cal {
	width: 100%;
	max-width: 340px;
	padding: .75em;
	background: #fff;
	border: 1px solid var(--fgh-field);
	border-radius: 6px;
}
.fgh-cal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 .5em;
}
.fgh-cal-head strong { font-weight: 600; text-transform: capitalize; }
.fgh-form .fgh-cal-nav,
.fgh-form .fgh-cal-nav:hover,
.fgh-form .fgh-cal-nav:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.2em;
	height: 2.2em;
	padding: 0;
	font: inherit;
	font-size: 1.2em;
	line-height: 1;
	color: var(--fgh-accent);
	background: #fff;
	border: 1px solid var(--fgh-line);
	border-radius: 50%;
	cursor: pointer;
}
.fgh-form .fgh-cal-nav:hover { background: var(--fgh-soft); }
.fgh-form .fgh-cal-nav:disabled { opacity: .3; cursor: default; background: #fff; }
.fgh-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	text-align: center;
}
.fgh-cal-dow { padding: .2em 0; font-size: .75em; text-transform: uppercase; opacity: .6; }
.fgh-cal-day {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	font-size: .92em;
	border-radius: 50%;
}
.fgh-cal-day.is-off { color: #c4c4c4; }
.fgh-form button.fgh-cal-day,
.fgh-form button.fgh-cal-day:focus {
	width: 100%;
	padding: 0;
	font: inherit;
	font-size: .92em;
	font-weight: 600;
	color: var(--fgh-dark);
	background: var(--fgh-soft);
	border: 1px solid var(--fgh-yellow);
	border-radius: 50%;
	cursor: pointer;
}
.fgh-form button.fgh-cal-day:hover { color: var(--fgh-dark); background: var(--fgh-yellow); border-color: var(--fgh-yellow); }
.fgh-form button.fgh-cal-day.is-selected,
.fgh-form button.fgh-cal-day.is-selected:hover {
	color: #fff;
	background: var(--fgh-accent);
	border-color: var(--fgh-accent);
}

/* ---------- Demi-journée (cartes) ---------- */

.fgh-slots { display: grid; gap: .6em; margin-top: .3em; }
.fgh-form .fgh-slot,
.fgh-form .fgh-slot:hover,
.fgh-form .fgh-slot:focus {
	display: flex;
	align-items: center;
	gap: .85em;
	width: 100%;
	padding: .8em 1em;
	font: inherit;
	text-align: left;
	color: var(--fgh-dark);
	background: #fff;
	border: 1.5px solid var(--fgh-field);
	border-radius: 8px;
	cursor: pointer;
	transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.fgh-form .fgh-slot:hover:not(:disabled) { background: var(--fgh-soft); border-color: var(--fgh-yellow); }
.fgh-form .fgh-slot.is-selected,
.fgh-form .fgh-slot.is-selected:hover {
	background: var(--fgh-soft);
	border-color: var(--fgh-accent);
	box-shadow: inset 0 0 0 1px var(--fgh-accent);
}
.fgh-form .fgh-slot:disabled { cursor: not-allowed; opacity: .45; background: #fafafa; }
.fgh-slot-icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 2.5em;
	height: 2.5em;
	color: var(--fgh-accent);
	background: var(--fgh-soft);
	border-radius: 50%;
}
.fgh-slot-icon svg { width: 1.45em; height: 1.45em; }
.fgh-slot.is-selected .fgh-slot-icon { background: var(--fgh-yellow); color: var(--fgh-dark); }
.fgh-slot-text { flex: 1; min-width: 0; }
.fgh-slot-text strong { display: block; font-weight: 600; line-height: 1.25; }
.fgh-slot-text small { display: block; font-size: .85em; opacity: .7; }
.fgh-slot-off { display: none !important; }
.fgh-slot.is-off .fgh-slot-hours { display: none; }
.fgh-slot.is-off .fgh-slot-off { display: block !important; }
.fgh-slot-radio {
	flex: none;
	width: 1.15em;
	height: 1.15em;
	border: 2px solid var(--fgh-field);
	border-radius: 50%;
}
.fgh-slot.is-selected .fgh-slot-radio {
	border-color: var(--fgh-accent);
	background: radial-gradient(circle, var(--fgh-accent) 0 45%, transparent 50%);
}
.fgh-slots-hint { margin: .45em 0 0; font-size: .88em; font-style: italic; opacity: .7; }
.fgh-slots-hint[hidden] { display: none; }

/* Retrait ou expédition : mêmes cartes que les demi-journées. */
.fgh-modes { display: grid; grid-template-columns: 1fr 1fr; gap: .6em; }
.fgh-mode input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.fgh-form .fgh-mode:has(input:checked) {
	background: var(--fgh-soft);
	border-color: var(--fgh-accent);
	box-shadow: inset 0 0 0 1px var(--fgh-accent);
}
.fgh-mode:has(input:checked) .fgh-slot-icon { background: var(--fgh-yellow); color: var(--fgh-dark); }
.fgh-mode:has(input:checked) .fgh-slot-radio {
	border-color: var(--fgh-accent);
	background: radial-gradient(circle, var(--fgh-accent) 0 45%, transparent 50%);
}
.fgh-mode:has(input:focus-visible) { outline: 2px solid var(--fgh-accent); outline-offset: 2px; }
.fgh-ship-box,
.fgh-ship-only { display: none; }
.fgh-form.is-ship .fgh-ship-box { display: block; }
.fgh-form.is-ship .fgh-ship-only { display: inline; }
.fgh-form.is-ship .fgh-recap-total .fgh-ship-only { display: block; }
.fgh-form.is-ship .fgh-pickup-box { display: none; }
.fgh-ship-only { font-size: .8em; font-weight: 400; opacity: .8; }
.fgh-ship-note { margin: .8em 0 0; padding: .6em .8em; font-size: .9em; background: var(--fgh-soft); border-left: 3px solid var(--fgh-yellow); }

.fgh-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ---------- Récapitulatif sur le côté ---------- */

.fgh-recap { display: none; }
.fgh-recap-inner {
	padding: 1.1em 1.2em 1.2em;
	background: #fff;
	border: 1px solid var(--fgh-line);
	border-top: 4px solid var(--fgh-yellow);
	border-radius: 6px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, .06);
}
.fgh-recap-title {
	margin: 0 0 .3em;
	color: var(--fgh-dark);
	font-family: 'Grand Hotel', cursive;
	font-size: 1.8em;
	font-weight: 400;
	line-height: 1.2;
}
.fgh-recap-lines {
	max-height: 42vh;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
}
.fgh-recap-lines li {
	display: flex;
	justify-content: space-between;
	gap: .75em;
	margin: 0;
	padding: .45em 0;
	font-size: .9em;
	border-bottom: 1px dashed var(--fgh-line);
}
.fgh-recap-lines small { display: block; font-size: .85em; opacity: .65; }
.fgh-recap-price { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fgh-recap-empty { margin: .2em 0 .6em; font-size: .9em; opacity: .7; }
.fgh-recap-empty[hidden] { display: none; }
.fgh-recap-pickup {
	margin: .9em 0 0;
	padding: .6em .75em;
	font-size: .88em;
	background: var(--fgh-soft);
	border-radius: 4px;
}
.fgh-recap-pickup:not(.is-set) { font-style: italic; opacity: .75; }
.fgh-recap-total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: .75em;
	margin: 1em 0;
	padding-top: .8em;
	font-weight: 600;
	border-top: 2px solid var(--fgh-yellow);
}
.fgh-recap-total strong { font-size: 1.35em; font-variant-numeric: tabular-nums; }
.fgh-form .fgh-recap .fgh-submit { width: 100%; text-align: center; }

/* Assez de place : récap fixe à droite, la barre du bas n'est plus utile. */
@container (min-width: 940px) {
	.fgh-layout {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 300px;
		gap: 2.5em;
		align-items: start;
	}
	.fgh-recap { display: block; position: sticky; top: 2em; }
	.fgh-totalbar { display: none; }
	.fgh-small { margin-top: 1em; }
}

@media (max-width: 640px) {
	.fgh-modes { grid-template-columns: 1fr; }
	.fgh-row {
		grid-template-columns: 1fr auto;
		grid-template-areas: "name name" "price price" "qty sub";
		padding: .75em .25em;
	}
	.fgh-name { grid-area: name; }
	.fgh-price { grid-area: price; text-align: left; }
	.fgh-qty { grid-area: qty; justify-content: flex-start; }
	.fgh-sub { grid-area: sub; }
	.fgh-grid { grid-template-columns: 1fr; }
	.fgh-box { padding: .9em .9em 1.1em; }
	.fgh-cal { max-width: none; }
	.fgh-form .fgh-submit { width: 100%; }
}

.fgh-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
