/**
 * Studio Tabs - tunnel de commande et confirmation.
 *
 * Coordonnees a gauche, recapitulatif et paiement a droite, colles au
 * defilement. En mobile tout s'empile dans l'ordre du geste : on remplit, on
 * relit, on paie. Pas de barre fixe ici : le bouton de commande ne doit pas
 * pouvoir etre actionne avant que le formulaire soit sous les yeux.
 */

.st-checkout {
	display: grid;
	gap: var(--st-space-md);
	align-items: start;
	margin-bottom: var(--st-space-lg);
}

@media (min-width: 1025px) {
	.st-checkout {
		grid-template-columns: minmax(0, 1fr) 380px;
		gap: var(--st-space-lg);
	}

	.st-checkout__aside {
		position: sticky;
		top: var(--st-space-md);
	}
}

.st-checkout__title,
.woocommerce-checkout h3 {
	margin: 0 0 var(--st-space-sm);
	font-family: var(--st-font, "Cabin", sans-serif);
	font-size: 1.25rem !important;
	line-height: 1.2 !important;
	color: var(--st-ink, #3d1e14);
}

/* WooCommerce coupe le formulaire en deux colonnes flottantes. Une seule
   colonne suffit : l'adresse de livraison est celle de facturation. */
.woocommerce-checkout .col2-set,
.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
	width: auto;
	float: none;
	margin: 0;
}

.woocommerce-checkout .col2-set::before,
.woocommerce-checkout .col2-set::after {
	content: none;
}

/**
 * Champs.
 */
.woocommerce-checkout .form-row {
	display: block;
	margin: 0 0 var(--st-space-sm);
	padding: 0;
}

/* WooCommerce fait flotter prenom et nom a 47 % a toutes les largeurs : sur un
   telephone, cela donne deux champs de 160 pixels cote a cote. */
@media (max-width: 767px) {
	.woocommerce-checkout form .form-row-first,
	.woocommerce-checkout form .form-row-last {
		float: none !important;
		width: 100% !important;
		margin-right: 0;
	}
}

@media (min-width: 768px) {
	/* Prenom et nom tiennent sur une ligne. */
	.woocommerce-checkout .form-row-first,
	.woocommerce-checkout .form-row-last {
		display: inline-block;
		width: calc(50% - 8px);
		vertical-align: top;
	}

	.woocommerce-checkout .form-row-first {
		margin-right: 12px;
	}
}

.woocommerce-checkout .form-row label {
	display: block;
	margin-bottom: 6px;
	color: var(--st-ink, #3d1e14);
	font-family: var(--st-font-ui, "Figtree", sans-serif);
	font-size: 0.875rem;
	font-weight: 600;
}

.woocommerce-checkout .form-row label .optional {
	color: var(--st-muted, #7a6a5f);
	font-weight: 400;
}

.woocommerce-checkout .form-row .required {
	color: var(--st-accent, #a3280a);
	text-decoration: none;
}

.woocommerce-checkout .input-text,
.woocommerce-checkout textarea,
.woocommerce-checkout select,
.woocommerce-checkout .select2-selection--single {
	width: 100%;
	height: 48px;
	padding: 0 14px;
	border: 1px solid var(--st-line, #e4ded9);
	border-radius: 8px;
	background-color: #ffffff;
	color: var(--st-ink, #3d1e14);
	font-family: var(--st-font-ui, "Figtree", sans-serif);
	font-size: 1rem;
}

.woocommerce-checkout textarea {
	height: auto;
	min-height: 96px;
	padding: 12px 14px;
	line-height: 1.5;
}

.woocommerce-checkout .input-text:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus {
	outline: 0;
	border-color: var(--st-ink, #3d1e14);
}

/* Le champ pays est rendu par Select2 : on l'aligne sur les autres. */
.woocommerce-checkout .select2-container--default .select2-selection--single {
	display: flex;
	align-items: center;
	height: 48px;
}

.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
	padding: 0;
	line-height: 1.4;
	color: var(--st-ink, #3d1e14);
}

.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 46px;
}

/**
 * Rappel de connexion et code promo, en tete de tunnel.
 */
.woocommerce-checkout .woocommerce-form-login-toggle,
.woocommerce-checkout .woocommerce-form-coupon-toggle,
.st-checkout-coupon {
	margin-bottom: var(--st-space-sm);
}

.woocommerce-checkout .woocommerce-form-login {
	padding: var(--st-space-sm);
	margin: 0 0 var(--st-space-sm);
	border: 1px solid var(--st-line, #e4ded9);
	border-radius: 0 0 0 var(--st-radius-md, 15px);
}

/**
 * Recapitulatif.
 */
.st-checkout__aside .st-summary {
	padding: var(--st-space-sm);
	background-color: var(--st-surface, #f6f6f6);
	border-radius: 0 0 0 var(--st-radius-md, 15px);
}

.st-summary__items {
	margin: 0 0 var(--st-space-sm);
	padding: 0 0 var(--st-space-xs);
	list-style: none;
	border-bottom: 1px solid var(--st-line, #e4ded9);
}

.st-summary__item {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) auto;
	align-items: start;
	gap: 12px;
	margin-bottom: var(--st-space-sm);
}

/* La pastille de quantite evite une colonne de plus dans 380 pixels. */
.st-summary__thumb {
	position: relative;
}

.st-summary__thumb img {
	display: block;
	width: 56px;
	height: 56px;
	object-fit: contain;
	padding: 5px;
	background-color: #ffffff;
	border-radius: 0 0 0 10px;
}

.st-summary__qty {
	position: absolute;
	top: -7px;
	right: -7px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: var(--st-radius-pill, 999px);
	background-color: var(--st-ink, #3d1e14);
	color: #ffffff;
	font-family: var(--st-font-ui, "Figtree", sans-serif);
	font-size: 0.6875rem;
	font-weight: 600;
}

.st-summary__name {
	margin: 0;
	font-family: var(--st-font, "Cabin", sans-serif);
	font-size: 0.9375rem;
	line-height: 1.3;
	color: var(--st-ink, #3d1e14);
}

.st-summary__specs {
	margin: 3px 0 0;
	color: var(--st-muted, #7a6a5f);
	font-size: 0.75rem;
}

.st-summary__price {
	margin: 0;
	white-space: nowrap;
	font-family: var(--st-font-ui, "Figtree", sans-serif);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--st-ink, #3d1e14);
}

/**
 * Paiement.
 */
.woocommerce-checkout #payment {
	margin-top: var(--st-space-sm);
	padding: 0;
	background: transparent;
	border-radius: 0;
}

.woocommerce-checkout #payment ul.payment_methods {
	padding: 0 0 var(--st-space-sm);
	margin: 0;
	border-bottom: 1px solid var(--st-line, #e4ded9);
	list-style: none;
}

.woocommerce-checkout #payment ul.payment_methods li {
	margin: 0 0 8px;
	padding: 0;
	list-style: none;
}

.woocommerce-checkout #payment ul.payment_methods label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	color: var(--st-ink, #3d1e14);
	font-size: 0.9375rem;
	cursor: pointer;
}

.woocommerce-checkout #payment ul.payment_methods input[type="radio"] {
	width: 18px;
	height: 18px;
	accent-color: var(--st-accent, #a3280a);
}

.woocommerce-checkout #payment div.payment_box {
	margin: 6px 0 12px;
	padding: 12px 14px;
	background-color: #ffffff;
	border-radius: 8px;
	color: var(--st-muted, #7a6a5f);
	font-size: 0.875rem;
	line-height: 1.5;
}

.woocommerce-checkout #payment div.payment_box::before {
	content: none;
}

.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
	padding: var(--st-space-sm) 0;
}

.woocommerce-checkout .woocommerce-privacy-policy-text p,
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper p {
	margin: 0 0 10px;
	color: var(--st-muted, #7a6a5f);
	font-size: 0.8125rem;
	line-height: 1.5;
}

.woocommerce-checkout .form-row.validate-required .woocommerce-form__label-for-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 0.875rem;
	font-weight: 400;
}

.woocommerce-checkout .woocommerce-form__input-checkbox {
	width: 18px;
	height: 18px;
	margin-top: 2px;
	accent-color: var(--st-accent, #a3280a);
}

/* Bouton de commande : le meme degrade que partout ailleurs. */
.woocommerce-checkout #place_order {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 52px;
	padding: 12px 26px;
	border: 0;
	border-radius: var(--st-radius-pill, 999px);
	background-color: transparent;
	background-image: var(--st-btn);
	color: #ffffff;
	font-family: var(--st-font-ui, "Figtree", sans-serif);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-image 0.25s ease;
}

.woocommerce-checkout #place_order:hover {
	background-image: var(--st-btn-hover);
}

.st-checkout__aside .st-summary__facts {
	margin: var(--st-space-sm) 0 0;
	padding: var(--st-space-sm) 0 0;
	border-top: 1px solid var(--st-line, #e4ded9);
	list-style: none;
	color: var(--st-muted, #7a6a5f);
	font-size: 0.8125rem;
	line-height: 1.5;
}

.st-checkout__aside .st-summary__facts li {
	position: relative;
	margin-bottom: 8px;
	padding-left: 18px;
}

.st-checkout__aside .st-summary__facts li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 7px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background-color: var(--st-accent, #a3280a);
}

.st-checkout__aside .st-summary__facts strong {
	color: var(--st-ink, #3d1e14);
}

.st-checkout__aside .st-paiement {
	margin-top: var(--st-space-sm);
	padding-top: var(--st-space-sm);
	border-top: 1px solid var(--st-line, #e4ded9);
}

/* Sept logos dans une colonne de 380 pixels : on les reduit pour qu'ils tiennent
   sur une seule rangee, une rangee de cinq plus une de deux se lit mal. */
.st-checkout__aside .st-paiement__list img {
	width: 38px;
	height: 26px;
}

/**
 * Confirmation de commande.
 */
.st-thankyou {
	max-width: 44rem;
	margin: 0 auto var(--st-space-lg);
	padding-top: var(--st-space-md);
}

.st-thankyou__title {
	margin: 0 0 10px;
	font-family: var(--st-font, "Cabin", sans-serif);
	font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.375rem);
	line-height: 1.15;
	color: var(--st-ink, #3d1e14);
}

.st-thankyou__text {
	margin: 0 0 var(--st-space-md);
	color: var(--st-muted, #7a6a5f);
	line-height: 1.7;
}

.st-thankyou__text strong {
	color: var(--st-ink, #3d1e14);
}

.st-thankyou__card {
	padding: var(--st-space-sm);
	margin-bottom: var(--st-space-md);
	background-color: var(--st-surface, #f6f6f6);
	border-radius: 0 0 0 var(--st-radius-md, 15px);
}

.st-thankyou__grid {
	display: grid;
	gap: var(--st-space-sm);
	grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
}

/* Un montant ne se coupe pas entre le nombre et sa devise. */
.st-thankyou__grid strong {
	white-space: nowrap;
}

.st-thankyou__grid span {
	display: block;
	margin-bottom: 3px;
	color: var(--st-muted, #7a6a5f);
	font-family: var(--st-font-ui, "Figtree", sans-serif);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.st-thankyou__grid strong {
	font-family: var(--st-font, "Cabin", sans-serif);
	font-size: 1.0625rem;
	font-weight: 500;
	color: var(--st-ink, #3d1e14);
}

.st-thankyou__heading {
	margin: 0 0 var(--st-space-sm);
	font-family: var(--st-font, "Cabin", sans-serif);
	font-size: 1.375rem !important;
	line-height: 1.2 !important;
	color: var(--st-ink, #3d1e14);
}

.st-steps {
	margin: 0 0 var(--st-space-md);
	padding: 0;
	list-style: none;
	counter-reset: st-step;
}

.st-steps li {
	position: relative;
	padding-left: 44px;
	margin-bottom: var(--st-space-sm);
	counter-increment: st-step;
}

.st-steps li::before {
	content: counter(st-step);
	position: absolute;
	left: 0;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background-color: var(--st-ink, #3d1e14);
	color: #ffffff;
	font-family: var(--st-font-ui, "Figtree", sans-serif);
	font-size: 0.8125rem;
	font-weight: 600;
}

.st-steps strong {
	display: block;
	margin-bottom: 2px;
	font-family: var(--st-font, "Cabin", sans-serif);
	font-size: 1.0625rem;
	font-weight: 500;
	color: var(--st-ink, #3d1e14);
}

.st-steps span {
	color: var(--st-muted, #7a6a5f);
	font-size: 0.9375rem;
	line-height: 1.6;
}

.st-thankyou__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--st-space-xs);
	margin: 0;
}

.st-thankyou .st-btn-solid,
.st-thankyou .st-btn-outline {
	width: auto;
}

/* Les details de commande et les coordonnees affiches sous la confirmation. */
.woocommerce-order-details,
.woocommerce-customer-details {
	max-width: 44rem;
	margin: var(--st-space-md) auto 0;
}

.woocommerce-order-details__title,
.woocommerce-column__title {
	font-family: var(--st-font, "Cabin", sans-serif);
	font-size: 1.25rem !important;
	line-height: 1.2 !important;
	color: var(--st-ink, #3d1e14);
}

/* Messages de WooCommerce, meme langue graphique que le reste du site. */
.woocommerce-checkout .woocommerce-message,
.woocommerce-checkout .woocommerce-error,
.woocommerce-checkout .woocommerce-info,
.woocommerce-order .woocommerce-message,
.woocommerce-order .woocommerce-info {
	border-top-color: var(--st-accent, #a3280a);
	background-color: var(--st-surface, #f6f6f6);
	color: var(--st-ink, #3d1e14);
	font-size: 0.9375rem;
}