.thresto-login-link {
	margin: 0 0 16px;
	font-size: 14px;
}

.thresto-front-panel {
	margin-bottom: 24px;
	padding: 16px;
	border: 1px solid #ddd;
	border-radius: 6px;
}

.thresto-front-panel h3 {
	margin-top: 0;
}

.thresto-selecteur-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 20px 32px;
}

.thresto-mode-switch {
	display: flex;
	gap: 20px;
	margin-bottom: 0;
}

.thresto-mode-switch label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: normal;
	cursor: pointer;
}

.thresto-front-panel .thresto-field label {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
}

.thresto-front-panel select {
	width: 100%;
	max-width: 420px;
	padding: 8px;
}

.thresto-field-creneau {
	flex: 1 1 260px;
}

/* Masquage des champs d'adresse en retrait — piloté en CSS pur via la
   classe posée sur <body> (fiable dès le premier affichage, avant même
   que le JS s'exécute), le JS se contentant de la faire suivre le choix
   de mode une fois la page chargée. */
body.thresto-mode-retrait #billing_address_1_field,
body.thresto-mode-retrait #billing_address_2_field,
body.thresto-mode-retrait #billing_city_field,
body.thresto-mode-retrait #billing_postcode_field,
body.thresto-mode-retrait #billing_state_field,
body.thresto-mode-retrait #billing_country_field {
	display: none !important;
}


/* =====================================================================
   v0.14.33 — Page commande habillée comme la page panier ThResto
   (formulaire WooCommerce classique : form.checkout). Couleurs reprises de
   ThResto → Apparence panier.
   ===================================================================== */
body.woocommerce-checkout form.woocommerce-checkout {
	--tco-accent: var(--thresto-accent, #1e1e1e);
	--tco-contour: var(--thresto-contour, #1e1e1e);
	--tco-card-bg: var(--thresto-card-bg, #fff);
	--tco-card-text: var(--thresto-card-text, #1e1e1e);
	--tco-line: color-mix(in srgb, var(--tco-card-text) 14%, transparent);
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: 0 24px;
	align-items: start;
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 16px;
	box-sizing: border-box;
}
body.woocommerce-checkout form.woocommerce-checkout *,
body.woocommerce-checkout form.woocommerce-checkout *::before,
body.woocommerce-checkout form.woocommerce-checkout *::after {
	box-sizing: border-box;
}
/* Colonne de gauche : tout ce qui n'est pas le récapitulatif. */
body.woocommerce-checkout form.woocommerce-checkout > * {
	grid-column: 1;
}
body.woocommerce-checkout form.woocommerce-checkout > #order_review {
	grid-column: 2;
	grid-row: 1 / span 30;
}
body.woocommerce-checkout form.woocommerce-checkout > #order_review_heading {
	display: none;
}

/* Cartes */
body.woocommerce-checkout .thresto-front-panel,
body.woocommerce-checkout form.woocommerce-checkout #customer_details,
body.woocommerce-checkout form.woocommerce-checkout > #order_review {
	background: var(--tco-card-bg);
	color: var(--tco-card-text);
	border: 1px solid var(--tco-line);
	border-radius: 14px;
	padding: 20px;
	margin: 0 0 16px;
}
body.woocommerce-checkout form.woocommerce-checkout > #order_review {
	position: sticky;
	top: 24px;
}
body.woocommerce-checkout form.woocommerce-checkout > #order_review::before {
	content: "Récapitulatif";
	display: block;
	margin-bottom: 12px;
	font-size: 18px;
	font-weight: 700;
}
body.woocommerce-checkout #customer_details .col-1,
body.woocommerce-checkout #customer_details .col-2 {
	float: none;
	width: 100%;
	max-width: none;
	padding: 0;
}
body.woocommerce-checkout form.woocommerce-checkout h3 {
	margin: 0 0 12px;
	font-size: 18px;
	color: var(--tco-card-text);
}

/* Mode : deux "pastilles" sélectionnables */
body.woocommerce-checkout .thresto-mode-switch {
	gap: 10px;
	flex-wrap: wrap;
}
body.woocommerce-checkout .thresto-mode-switch label {
	position: relative;
	padding: 12px 18px;
	border: 2px solid var(--tco-line);
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	color: var(--tco-card-text);
	transition: border-color .12s ease;
}
body.woocommerce-checkout .thresto-mode-switch label:has(input:checked) {
	border-color: var(--tco-accent);
	color: var(--tco-accent);
}
body.woocommerce-checkout .thresto-mode-switch input {
	accent-color: var(--tco-accent);
}
body.woocommerce-checkout .thresto-front-panel select {
	max-width: none;
	height: 46px;
}

/* Champs */
body.woocommerce-checkout form.woocommerce-checkout .form-row {
	margin: 0 0 12px;
}
body.woocommerce-checkout form.woocommerce-checkout label {
	font-weight: 600;
	font-size: 14px;
	color: var(--tco-card-text);
}
body.woocommerce-checkout form.woocommerce-checkout input.input-text,
body.woocommerce-checkout form.woocommerce-checkout textarea,
body.woocommerce-checkout form.woocommerce-checkout select {
	width: 100%;
	min-height: 46px;
	padding: 10px 14px;
	border: 1px solid var(--tco-line);
	border-radius: 10px;
	background: #fff;
	color: #1e1e1e;
	font-size: 15px;
}
body.woocommerce-checkout form.woocommerce-checkout textarea {
	min-height: 90px;
}
body.woocommerce-checkout form.woocommerce-checkout input:focus,
body.woocommerce-checkout form.woocommerce-checkout select:focus,
body.woocommerce-checkout form.woocommerce-checkout textarea:focus {
	outline: none;
	border-color: var(--tco-accent);
}

/* Récapitulatif : tableau allégé */
body.woocommerce-checkout #order_review table.shop_table {
	width: 100%;
	margin: 0 0 14px;
	border: 0;
	border-collapse: collapse;
}
body.woocommerce-checkout #order_review table.shop_table th,
body.woocommerce-checkout #order_review table.shop_table td {
	padding: 10px 0;
	border: 0;
	border-bottom: 1px solid var(--tco-line);
	background: none;
	font-size: 14px;
	color: var(--tco-card-text);
	text-align: left;
	vertical-align: top;
}
body.woocommerce-checkout #order_review table.shop_table td:last-child,
body.woocommerce-checkout #order_review table.shop_table th:last-child {
	text-align: right;
	white-space: nowrap;
}
body.woocommerce-checkout #order_review table.shop_table thead {
	display: none;
}
body.woocommerce-checkout #order_review table.shop_table .product-name {
	font-weight: 600;
}
body.woocommerce-checkout #order_review table.shop_table .product-name dl,
body.woocommerce-checkout #order_review table.shop_table .product-name .variation {
	margin: 4px 0 0;
	font-size: 13px;
	font-weight: 400;
	opacity: .8;
}
body.woocommerce-checkout #order_review table.shop_table tr.order-total th,
body.woocommerce-checkout #order_review table.shop_table tr.order-total td {
	border-bottom: 0;
	padding-top: 14px;
	font-size: 17px;
	font-weight: 700;
}

/* Paiement + bouton "Commander" */
body.woocommerce-checkout #payment {
	background: transparent;
	border-radius: 0;
}
body.woocommerce-checkout #payment ul.payment_methods {
	padding: 0 0 10px;
	border-bottom: 1px solid var(--tco-line);
}
body.woocommerce-checkout #payment div.payment_box {
	background: color-mix(in srgb, var(--tco-card-text) 6%, transparent);
	color: var(--tco-card-text);
	border-radius: 10px;
}
body.woocommerce-checkout #payment div.payment_box::before {
	display: none;
}
body.woocommerce-checkout #payment .place-order {
	padding: 14px 0 0;
}
body.woocommerce-checkout #payment #place_order,
body.woocommerce-checkout button#place_order {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 50px;
	padding: 0 14px;
	border: 2px solid var(--tco-accent);
	border-radius: 10px;
	background: var(--tco-accent) !important;
	color: #fff !important;
	font-size: 17px;
	font-weight: 700;
	line-height: 1;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
}
body.woocommerce-checkout .woocommerce-privacy-policy-text {
	font-size: 12px;
	opacity: .7;
}

/* Bandeaux "code promo" / "déjà client" au-dessus du formulaire */
body.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info,
body.woocommerce-checkout .woocommerce-info {
	max-width: 1100px;
	margin: 0 auto 16px;
	padding: 12px 16px;
	border: 1px solid var(--thresto-contour, #1e1e1e);
	border-radius: 10px;
	background: transparent;
	color: inherit;
}
body.woocommerce-checkout .woocommerce-info::before {
	display: none;
}
body.woocommerce-checkout .thresto-login-link {
	margin: 0 0 12px;
	font-size: 14px;
}

@media (max-width: 860px) {
	body.woocommerce-checkout form.woocommerce-checkout {
		grid-template-columns: 1fr;
	}
	body.woocommerce-checkout form.woocommerce-checkout > #order_review {
		grid-column: 1;
		grid-row: auto;
		position: static;
	}
}

/* --- v0.14.34 : liste déroulante (créneau, pays…) : texte non rogné --- */
body.woocommerce-checkout form.woocommerce-checkout select,
body.woocommerce-checkout .thresto-front-panel select {
	box-sizing: border-box !important;
	height: 48px !important;
	min-height: 0 !important;
	padding: 0 36px 0 14px !important;
	line-height: normal !important;
	font-size: 15px !important;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* --- v0.14.35 : arrondi « doux » (16 px) pour les champs, le créneau, les pastilles de mode et le bouton Commander --- */
body.woocommerce-checkout form.woocommerce-checkout input.input-text,
body.woocommerce-checkout form.woocommerce-checkout textarea,
body.woocommerce-checkout form.woocommerce-checkout select,
body.woocommerce-checkout .thresto-front-panel select,
body.woocommerce-checkout .thresto-mode-switch label,
body.woocommerce-checkout #payment #place_order,
body.woocommerce-checkout button#place_order {
	border-radius: 16px !important;
}
body.woocommerce-checkout .thresto-front-panel,
body.woocommerce-checkout form.woocommerce-checkout #customer_details,
body.woocommerce-checkout form.woocommerce-checkout > #order_review {
	border-radius: 18px;
}

/* =====================================================================
   v0.14.36 — Même habillage pour les autres formulaires WooCommerce :
   connexion / inscription, mot de passe perdu, détails du compte,
   adresses, ainsi que les listes « pays / région » (selectWoo) du checkout.
   ===================================================================== */
body.woocommerce-account .woocommerce,
body.woocommerce-checkout .woocommerce {
	--tco-accent: var(--thresto-accent, #1e1e1e);
	--tco-contour: var(--thresto-contour, #1e1e1e);
	--tco-card-bg: var(--thresto-card-bg, #fff);
	--tco-card-text: var(--thresto-card-text, #1e1e1e);
	--tco-line: color-mix(in srgb, var(--tco-card-text) 14%, transparent);
}

/* Cartes */
body.woocommerce-account form.woocommerce-form-login,
body.woocommerce-account form.woocommerce-form-register,
body.woocommerce-account form.woocommerce-EditAccountForm,
body.woocommerce-account form.lost_reset_password,
body.woocommerce-account .woocommerce-address-fields,
body.woocommerce-account .u-column1.col-1 > h2 + form,
body.woocommerce-account .woocommerce-Address {
	background: var(--tco-card-bg);
	color: var(--tco-card-text);
	border: 1px solid var(--tco-line) !important;
	border-radius: 18px !important;
	padding: 20px !important;
	margin: 0 0 16px;
}
body.woocommerce-account .woocommerce h2,
body.woocommerce-account .woocommerce h3 {
	color: var(--tco-card-text);
}

/* Champs */
body.woocommerce-account .woocommerce form .form-row {
	margin: 0 0 12px;
	padding: 0;
}
body.woocommerce-account .woocommerce form label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 14px;
	color: var(--tco-card-text);
}
body.woocommerce-account .woocommerce form input.input-text,
body.woocommerce-account .woocommerce form input[type="text"],
body.woocommerce-account .woocommerce form input[type="email"],
body.woocommerce-account .woocommerce form input[type="password"],
body.woocommerce-account .woocommerce form input[type="tel"],
body.woocommerce-account .woocommerce form textarea,
body.woocommerce-account .woocommerce form select {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	padding: 10px 16px;
	border: 1px solid var(--tco-line);
	border-radius: 16px !important;
	background: #fff;
	color: #1e1e1e;
	font-size: 15px;
}
body.woocommerce-account .woocommerce form select {
	height: 48px;
	padding: 0 36px 0 16px;
	line-height: normal;
}
body.woocommerce-account .woocommerce form input:focus,
body.woocommerce-account .woocommerce form select:focus,
body.woocommerce-account .woocommerce form textarea:focus {
	outline: none;
	border-color: var(--tco-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--tco-accent) 18%, transparent);
}
body.woocommerce-checkout form.woocommerce-checkout input:focus,
body.woocommerce-checkout form.woocommerce-checkout select:focus,
body.woocommerce-checkout form.woocommerce-checkout textarea:focus {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--tco-accent) 18%, transparent);
}

/* Listes pays / région (selectWoo) */
body.woocommerce-account .select2-container--default .select2-selection--single,
body.woocommerce-checkout .select2-container--default .select2-selection--single {
	height: 48px;
	border: 1px solid var(--tco-line, #ddd);
	border-radius: 16px;
	background: #fff;
}
body.woocommerce-account .select2-container--default .select2-selection--single .select2-selection__rendered,
body.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
	padding: 0 36px 0 16px;
	line-height: 46px;
	color: #1e1e1e;
	font-size: 15px;
}
body.woocommerce-account .select2-container--default .select2-selection--single .select2-selection__arrow,
body.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 46px;
	right: 8px;
}
.select2-dropdown {
	border-radius: 16px !important;
	overflow: hidden;
}
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[data-selected] {
	background: var(--thresto-accent, #1e1e1e);
	color: #fff;
}

/* Boutons (Connexion, S'inscrire, Enregistrer, Réinitialiser…) */
body.woocommerce-account .woocommerce form .button,
body.woocommerce-account .woocommerce form button[type="submit"],
body.woocommerce-account .woocommerce .woocommerce-Button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 24px;
	border: 2px solid var(--tco-accent);
	border-radius: 16px !important;
	background: var(--tco-accent) !important;
	color: #fff !important;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
}
body.woocommerce-account .woocommerce form .button:hover,
body.woocommerce-account .woocommerce .woocommerce-Button:hover {
	filter: brightness(1.08);
}
body.woocommerce-account .woocommerce .woocommerce-form__label-for-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
}
body.woocommerce-account .woocommerce input[type="checkbox"] {
	accent-color: var(--tco-accent);
}

/* Messages WooCommerce (succès / erreur / info) */
body.woocommerce-account .woocommerce-message,
body.woocommerce-account .woocommerce-error,
body.woocommerce-account .woocommerce-info {
	border: 1px solid var(--tco-contour);
	border-radius: 16px;
	background: transparent;
	color: inherit;
}

