/* =====================================================================
   Delame Toolkit — checkout & panier en blocs WooCommerce.
   Chargée après wc-blocks-style, d'où le très faible besoin d'!important.
   ===================================================================== */

.wc-block-checkout,
.wp-block-woocommerce-cart {
	--dlm-co-font:   "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
	--dlm-co-ink:    var(--dlm-ink, #0F0E0E);
	--dlm-co-muted:  #6b6a6a;
	--dlm-co-line:   #dcdada;
	--dlm-co-focus:  var(--dlm-ink, #0F0E0E);
	--dlm-co-radius: 0;
	--dlm-co-on-ink: #fff;
	--dlm-co-sticky-top: 100px;   /* Dégagement sous l'en-tête fixe. */
}

/* --- Colonne récapitulative fixe -------------------------------------- */

.wc-block-checkout__sidebar.is-sticky,
.wc-block-components-sidebar.is-sticky {
	top: var(--dlm-co-sticky-top) !important;
}

/* --- Angles droits ----------------------------------------------------- */

/* Les blocs WooCommerce arrondissent par défaut champs, encarts de paiement
   et boutons. Une seule règle groupée vaut mieux qu'un rappel dans chaque
   composant : la charte est à angles droits, sans exception. */

.wc-block-checkout input,
.wc-block-checkout select,
.wc-block-checkout textarea,
.wc-block-checkout button,
.wc-block-checkout img,
.wc-block-checkout .wc-block-components-text-input,
.wc-block-checkout .wc-blocks-components-select,
.wc-block-checkout .wc-blocks-components-select__container,
.wc-block-checkout .wc-block-components-radio-control-accordion-option,
.wc-block-checkout .wc-block-components-radio-control__option,
.wc-block-checkout .wc-block-components-panel,
.wc-block-checkout .wc-block-components-address-card,
.wc-block-checkout .wc-block-components-order-summary-item__image,
.wc-block-checkout .wc-block-components-order-summary-item__quantity,
.wc-block-checkout .wc-block-components-checkbox__input,
.wc-block-checkout .wc-block-components-sidebar,
.wc-block-checkout .wc-block-components-notice-banner,
.wp-block-woocommerce-cart input,
.wp-block-woocommerce-cart select,
.wp-block-woocommerce-cart button,
.wp-block-woocommerce-cart img {
	border-radius: 0 !important;
}

/* --- Typographie globale --------------------------------------------- */

.wc-block-checkout,
.wc-block-checkout input,
.wc-block-checkout select,
.wc-block-checkout textarea,
.wc-block-checkout button,
.wc-block-checkout label,
.wc-block-checkout span,
.wc-block-checkout p,
.wc-block-checkout h1,
.wc-block-checkout h2,
.wc-block-checkout h3,
.wp-block-woocommerce-cart,
.wp-block-woocommerce-cart input,
.wp-block-woocommerce-cart select,
.wp-block-woocommerce-cart button,
.wp-block-woocommerce-cart label,
.wp-block-woocommerce-cart span,
.wp-block-woocommerce-cart p {
	font-family: var(--dlm-co-font);
	color: var(--dlm-co-ink);
}

/* --- Titres d'étape --------------------------------------------------- */

.wc-block-components-title,
.wc-block-components-checkout-step__title,
.wc-block-components-checkout-order-summary__title-text {
	font-family: var(--dlm-co-font);
	font-weight: 600;
	letter-spacing: .01em;
	color: var(--dlm-co-ink);
}

.wc-block-components-checkout-step__description,
.wc-block-checkout__guest-checkout-notice {
	color: var(--dlm-co-muted);
	font-size: .85rem;
}

/* --- Champs texte ----------------------------------------------------- */

.wc-block-components-text-input input[type="text"],
.wc-block-components-text-input input[type="email"],
.wc-block-components-text-input input[type="tel"],
.wc-block-components-text-input input[type="number"],
.wc-block-components-textarea,
.wc-blocks-components-select__select {
	font-family: var(--dlm-co-font);
	font-size: .95rem;
	color: var(--dlm-co-ink);
	background: #fff;
	border: 1px solid var(--dlm-co-line);
	border-radius: var(--dlm-co-radius);
	transition: border-color .15s ease, box-shadow .15s ease;
}

.wc-block-components-text-input input:focus,
.wc-block-components-textarea:focus,
.wc-blocks-components-select__select:focus {
	border-color: var(--dlm-co-focus);
	/* Un liseré doublé plutôt qu'un halo coloré : le contraste reste net
	   sans introduire une couleur étrangère à la charte. */
	box-shadow: 0 0 0 1px var(--dlm-co-focus);
	outline: none;
}

.wc-block-components-text-input label,
.wc-blocks-components-select__label {
	font-family: var(--dlm-co-font);
	color: var(--dlm-co-muted);
	font-size: .95rem;
}

.wc-block-components-text-input.is-active label,
.wc-block-components-text-input input:focus + label {
	color: var(--dlm-co-ink);
	font-size: .72rem;
	font-weight: 500;
}

/* --- Cases à cocher --------------------------------------------------- */

.wc-block-components-checkbox__label {
	font-size: .9rem;
	color: var(--dlm-co-ink);
}

.wc-block-components-checkbox__input[type="checkbox"] {
	border: 1px solid var(--dlm-co-line);
	border-radius: var(--dlm-co-radius);
}

.wc-block-components-checkbox__input[type="checkbox"]:checked {
	background: var(--dlm-co-ink);
	border-color: var(--dlm-co-ink);
}

.wc-block-components-checkbox__mark {
	fill: var(--dlm-co-on-ink);
}

/* --- Modes de paiement ------------------------------------------------ */

.wc-block-components-radio-control-accordion-option {
	border: 1px solid var(--dlm-co-line);
	border-radius: var(--dlm-co-radius);
}

.wc-block-components-radio-control-accordion-option--checked-option-highlighted,
.wc-block-components-radio-control__option-checked {
	border-color: var(--dlm-co-ink);
}

.wc-block-components-radio-control__label,
.wc-block-components-payment-method-label {
	font-weight: 500;
	color: var(--dlm-co-ink);
}

.wc-block-components-radio-control__input {
	accent-color: var(--dlm-co-ink);
}

.wc-block-components-radio-control-accordion-content {
	color: var(--dlm-co-muted);
	font-size: .88rem;
}

/* --- Récapitulatif ---------------------------------------------------- */

.wc-block-components-product-name,
.wc-block-components-totals-item__label,
.wc-block-components-totals-item__value,
.wc-block-formatted-money-amount {
	font-family: var(--dlm-co-font);
	color: var(--dlm-co-ink);
}

.wc-block-components-product-name {
	font-weight: 600;
	font-size: .92rem;
}

.wc-block-components-product-details__name,
.wc-block-components-product-details__value,
.wc-block-components-totals-footer-item-tax {
	color: var(--dlm-co-muted);
	font-size: .82rem;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-weight: 600;
	font-size: 1.05rem;
}

.wc-block-components-order-summary-item__quantity {
	background: var(--dlm-co-ink);
	color: var(--dlm-co-on-ink);
	border-color: var(--dlm-co-ink);
	font-family: var(--dlm-co-font);
	font-weight: 500;
}

.wc-block-components-panel__button {
	font-family: var(--dlm-co-font);
	font-weight: 500;
	color: var(--dlm-co-ink);
}

.wc-block-components-totals-wrapper {
	border-color: var(--dlm-co-line);
}

/* --- Liens ------------------------------------------------------------ */

.wc-block-checkout a,
.wc-block-checkout__login-prompt,
.wc-block-components-address-card__edit,
.wc-block-components-address-form__address_2-toggle {
	color: var(--dlm-co-ink);
	text-decoration: underline;
	text-underline-offset: .18em;
}

.wc-block-checkout a:hover,
.wc-block-checkout__login-prompt:hover,
.wc-block-components-address-card__edit:hover {
	text-decoration-thickness: 2px;
}

/* --- Bouton Commander ------------------------------------------------- */

.wc-block-components-checkout-place-order-button,
.wc-block-components-button.contained {
	font-family: var(--dlm-co-font);
	font-weight: 600;
	font-size: 1rem;
	letter-spacing: .02em;
	text-transform: none;
	min-height: var(--dlm-control, 2.75rem);
	background: var(--dlm-co-ink);
	color: var(--dlm-co-on-ink);
	border: 1px solid var(--dlm-co-ink);
	border-radius: var(--dlm-co-radius);
	transition: background-color .15s ease, color .15s ease;
}

.wc-block-components-checkout-place-order-button:hover:not( :disabled ),
.wc-block-components-checkout-place-order-button:focus-visible:not( :disabled ) {
	background: #fff;
	color: var(--dlm-co-ink);
}

.wc-block-components-checkout-place-order-button__text,
.wc-block-components-button__text {
	color: inherit;
	font-family: var(--dlm-co-font);
}

/* --- Focus clavier ---------------------------------------------------- */

.wc-block-checkout :focus-visible,
.wp-block-woocommerce-cart :focus-visible {
	outline: 2px solid var(--dlm-co-focus);
	outline-offset: 2px;
}

/* --- Messages d'erreur ------------------------------------------------ */

/* L'erreur garde une couleur propre : la signaler en noir de marque la
   rendrait indistinguable du texte courant. */
.wc-block-components-validation-error {
	font-family: var(--dlm-co-font);
	font-size: .8rem;
}
