/**
 * Styles du tunnel de commande.
 *
 * Volontairement sobres et pilotés par des variables : la charte graphique est
 * portée par le thème enfant et par les blocs, ce fichier ne fait que rendre le
 * tunnel lisible et utilisable au doigt.
 */

.bn-options {
	/*
	 * La palette est celle de la marque, pas une palette propre au tunnel.
	 * Le client passe de l'accueil au paiement sans changer d'univers : une
	 * page de paiement qui ne ressemble pas au site inquiète, et l'inquiétude
	 * au moment de sortir sa carte se paie en paniers abandonnés.
	 */
	--bn-radius: 0;
	--bn-border: #ded2c1;
	--bn-accent: #a6703e;
	--bn-accent-soft: #d99a4e;
	--bn-ink: #3d2b1f;
	--bn-paper: #f5ede3;
	--bn-muted: rgba( 61, 43, 31, 0.65 );
	--bn-display: 'Fraunces', Georgia, 'Times New Roman', serif;

	display: grid;
	gap: 1.75rem;
	margin: 1.5rem 0;
	color: var( --bn-ink );
}

.bn-options__group legend {
	font-family: var( --bn-display );
	font-size: 1.15rem;
	font-weight: 600;
	letter-spacing: -0.01em;
}

/* L'option retenue doit se voir d'un coup d'œil, sans lire. */
.bn-option:has( input:checked ) {
	border-color: var( --bn-accent );
	background: var( --bn-paper );
	box-shadow: inset 3px 0 0 var( --bn-accent-soft );
}

/* Taille de la formule ------------------------------------------------------ */

.bn-options__sizes .bn-option--size span {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
}

.bn-option--size em {
	font-family: var( --bn-display );
	font-style: normal;
	font-weight: 600;
	font-size: 1.1rem;
	color: var( --bn-accent );
}

/* Régime de chaque part ------------------------------------------------------ */

.bn-portion {
	display: grid;
	gap: 0.4rem;
	padding: 0.75rem 0;
	border-top: 1px solid var( --bn-border );
}

.bn-portion:first-of-type {
	border-top: 0;
	padding-top: 0;
}

.bn-portion[hidden] {
	display: none;
}

.bn-portion__label {
	font-family: var( --bn-display );
	font-size: 0.95rem;
	color: var( --bn-muted );
}

.bn-options__group {
	border: 1px solid var(--bn-border);
	border-radius: var(--bn-radius);
	padding: 1rem 1.25rem 1.25rem;
	margin: 0;
}

.bn-options__group legend {
	font-weight: 600;
	padding: 0 0.5rem;
}

.bn-option {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.6rem 0;
	cursor: pointer;
	min-height: 44px; /* confort tactile */
}

.bn-option.is-disabled,
.bn-option.is-unavailable {
	opacity: 0.45;
	cursor: not-allowed;
}

.bn-option--date {
	justify-content: space-between;
	flex-wrap: wrap;
	border-bottom: 1px solid var(--bn-border);
}

.bn-option--date:last-of-type {
	border-bottom: 0;
}

.bn-option__state {
	color: var(--bn-muted);
	font-size: 0.9em;
	margin-left: auto;
}

.bn-option--date.is-unavailable .bn-option__state {
	color: #a1443a;
}

.bn-options__comment label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

.bn-options__comment textarea {
	width: 100%;
}

.bn-closed {
	background: #fbf3e8;
	border-left: 4px solid var(--bn-accent, #8a5a2b);
	padding: 0.9rem 1rem;
	border-radius: 0 var(--bn-radius, 10px) var(--bn-radius, 10px) 0;
}

.bn-funnel__price {
	font-size: 1.4rem;
	font-weight: 600;
}

.bn-funnel__submit {
	width: 100%;
	min-height: 48px;
	margin-top: 1rem;
}

.bn-funnel__summary ul {
	list-style: none;
	margin: 0 0 0.75rem;
	padding: 0;
}

.bn-funnel__summary li {
	padding: 0.2rem 0;
}

.bn-zone-feedback {
	margin: 0.4rem 0 0;
	font-size: 0.92em;
}

.bn-zone-feedback.is-covered {
	color: #2f6b3f;
}

.bn-zone-feedback.is-out-of-zone {
	color: #a1443a;
	font-weight: 600;
}

/* Inscriptions : hors zone et liste d'attente ---------------------------- */

.bn-zone-lead {
	display: none;
	background: #fbf3e8;
	border-radius: 10px;
	padding: 1rem 1.25rem;
	margin: 1rem 0;
}

.bn-zone-lead.is-visible {
	display: block;
}

.bn-zone-lead h3 {
	margin-top: 0;
}

.bn-zone-lead__fields,
.bn-waitlist__fields {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.bn-zone-lead__fields input,
.bn-waitlist__fields input {
	flex: 1 1 12rem;
	min-height: 44px;
}

.bn-waitlist {
	background: #f6f3ee;
	border-radius: 8px;
	padding: 0.75rem 1rem;
	margin: 0 0 0.75rem;
	font-size: 0.95em;
}

.bn-zone-lead__feedback,
.bn-waitlist__feedback {
	margin: 0.5rem 0 0;
}

.bn-zone-lead__feedback.is-success,
.bn-waitlist__feedback.is-success {
	color: #2f6b3f;
	font-weight: 600;
}

.bn-zone-lead__feedback.is-error,
.bn-waitlist__feedback.is-error {
	color: #a1443a;
}

/* Espace client ----------------------------------------------------------- */

.bn-self-service__form,
.bn-self-service__cancel {
	border-top: 1px solid #e3ddd4;
	padding-top: 1.25rem;
	margin-top: 1.5rem;
}

.bn-self-service__form label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.25rem;
}

.bn-self-service__form input[type="text"],
.bn-self-service__form textarea {
	width: 100%;
	min-height: 44px;
}

.bn-self-service__details {
	list-style: none;
	padding: 0;
}

.bn-message {
	padding: 0.75rem 1rem;
	border-radius: 8px;
	margin: 1rem 0;
}

.bn-message--success {
	background: #edf5ee;
	color: #2f6b3f;
}

.bn-message--error {
	background: #fbeeec;
	color: #a1443a;
}

.bn-account-offer {
	border: 1px solid #e3ddd4;
	border-radius: 10px;
	padding: 1.25rem;
	margin: 2rem 0;
}

.bn-account-offer__form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

/* Largeur du tunnel ---------------------------------------------------------- */

/*
 * WordPress bride le contenu d'une page à sa largeur de lecture — autour de
 * 700 px, ce qui convient à un article et pas à un formulaire. Tout se
 * retrouvait empilé dans une colonne étroite, au centre : long à parcourir,
 * et serré au moment précis où l'on demande une carte bancaire.
 *
 * Le tunnel reprend donc la largeur des blocs du site.
 */

.entry-content .bn-funnel,
.entry-content > .bn-options,
.entry-content .woocommerce {
	max-width: 1080px;
	width: 100%;
	margin-inline: auto;
}

/* Deux colonnes sur grand écran ---------------------------------------------- */

/*
 * Les choix de la formule tiennent côte à côte : sauces et toppings ont le
 * même nombre d'options, dates et créneaux se lisent ensemble. On garde la
 * taille de formule et les régimes en pleine largeur — ce sont les deux
 * décisions qui engagent le prix et le contenu.
 */

@media ( min-width: 900px ) {
	.bn-options {
		grid-template-columns: 1fr 1fr;
		align-items: start;
		gap: 1.5rem;
	}

	.bn-options__sizes,
	.bn-options__diets,
	.bn-options__dates,
	.bn-options__comment,
	.bn-options > .bn-actions,
	.bn-options > p {
		grid-column: 1 / -1;
	}
}

/* Code promo ------------------------------------------------------------------ */

.bn-coupon {
	margin: 1.5rem 0;
}

.bn-coupon .checkout_coupon {
	border: 1px solid var( --bn-border );
	background: var( --bn-paper );
	padding: 1rem 1.25rem;
	margin: 0.75rem 0 0;
}

.bn-coupon .woocommerce-form-coupon-toggle .woocommerce-info {
	background: none;
	border: 0;
	border-left: 3px solid var( --bn-accent-soft );
	padding: 0.6rem 1rem;
	margin: 0;
	color: var( --bn-ink );
	font-size: 0.95rem;
}

.bn-coupon .checkout_coupon input[type='text'] {
	max-width: 18rem;
}
