/* ============================================================
   Château Thieuley — Tarif dégressif, cadeau des grosses commandes
   Chargé sur les pages WooCommerce (ct_enqueue_boutique_prix)
   ============================================================ */

/* ── Tableau « Remise par cartons » (fiche produit) ── */
.ct-paliers { margin: 1.25rem 0; padding: 1.25rem 1.5rem; background: #F7F3EC; border: 1px solid #E8E2D9; border-radius: 2px; }
.ct-paliers[hidden] { display: none; }
.ct-paliers__titre { margin: 0 0 0.75rem; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: #3D5A3E; }
.ct-paliers__liste { list-style: none; margin: 0; padding: 0; }
.ct-paliers__liste li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid #E8E2D9; font-size: 0.9375rem; }
.ct-paliers__liste li:last-child { border-bottom: 0; }
.ct-paliers__qte { color: #4A4A4A; }
.ct-paliers__prix { font-weight: 600; color: #1A1A1A; white-space: nowrap; }
.ct-paliers__prix small { font-weight: 400; color: #6B6B6B; }
.ct-paliers__note { margin: 0.75rem 0 0; font-size: 0.8125rem; color: #6B6B6B; }

/* ── Bloc panier : palier + cadeau ── */
.ct-panier-bloc { margin: 0 0 2rem; display: grid; gap: 1rem; font-family: 'DM Sans', system-ui, sans-serif; }
.ct-panier-bloc *, .ct-panier-bloc *::before, .ct-panier-bloc *::after { box-sizing: border-box; }
.ct-palier-msg, .ct-cadeau { padding: 1.25rem 1.5rem; background: #F7F3EC; border: 1px solid #E8E2D9; border-radius: 2px; }
.ct-palier-msg p, .ct-cadeau p { margin: 0; font-size: 0.9375rem; line-height: 1.7; color: #4A4A4A; }
.ct-palier-msg strong, .ct-cadeau strong { color: #1A1A1A; }
.ct-cadeau__titre { margin-bottom: 0.75rem !important; font-size: 0.6875rem !important; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: #3D5A3E !important; }
.ct-cadeau__barre { height: 6px; margin-bottom: 0.75rem; background: #E8E2D9; border-radius: 3px; overflow: hidden; }
.ct-cadeau__barre span { display: block; height: 100%; background: #3D5A3E; border-radius: 3px; transition: width 0.4s ease; }

.ct-cadeau__form { margin-top: 1.25rem; }
.ct-cadeau__liste { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.ct-cadeau__liste label { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 2px 12px; align-items: center; height: 100%; padding: 12px; background: #FFFFFF; border: 1px solid #E8E2D9; border-radius: 2px; cursor: pointer; transition: border-color 0.2s; }
.ct-cadeau__liste label:hover { border-color: #8B7355; }
.ct-cadeau__liste input { position: absolute; opacity: 0; pointer-events: none; }
.ct-cadeau__liste label:has(input:checked) { border-color: #3D5A3E; box-shadow: 0 0 0 1px #3D5A3E; }
.ct-cadeau__liste label:has(input:focus-visible) { outline: 2px solid #3D5A3E; outline-offset: 2px; }
.ct-cadeau__image { grid-row: 1 / span 2; width: 56px; }
.ct-cadeau__image img { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: 2px; }
.ct-cadeau__nom { font-size: 0.875rem; line-height: 1.4; font-weight: 500; color: #1A1A1A; align-self: end; }
.ct-cadeau__valeur { font-size: 0.75rem; color: #6B6B6B; align-self: start; }
.ct-cadeau__bouton { background: #3D5A3E !important; color: #FFFFFF !important; border-radius: 2px !important; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.75rem !important; }

/* ── Bandeau du cadeau (page Boutique) ── */
.ct-cadeau-bandeau {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem;
  margin: 0 0 2rem; padding: 1rem 1.5rem;
  background: #FFFFFF; border: 1px solid #E0D9CE; border-left: 3px solid #3D5A3E;
  font-family: 'DM Sans', system-ui, sans-serif; box-sizing: border-box;
}
.ct-cadeau-bandeau *, .ct-cadeau-bandeau *::before, .ct-cadeau-bandeau *::after { box-sizing: border-box; }
.ct-cadeau-bandeau__texte { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: #4A4A4A; }
.ct-cadeau-bandeau__texte strong { display: block; font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; font-weight: 500; color: #1A1A1A; }
.ct-cadeau-bandeau__suivi { flex: 1; min-width: 240px; max-width: 420px; }
.ct-cadeau-bandeau .ct-cadeau__barre { margin: 0 0 0.45rem; }
.ct-cadeau-bandeau__reste { margin: 0; font-size: 0.8125rem; color: #4A4A4A; }
.ct-cadeau-bandeau__reste strong { color: #1A1A1A; }
.ct-cadeau-bandeau__reste a { color: #3D5A3E; text-decoration: none; border-bottom: 1px solid rgba(61,90,62,0.3); }
@media (max-width: 767px) { .ct-cadeau-bandeau { padding: 1rem; } .ct-cadeau-bandeau__suivi { max-width: none; } }

.ct-cadeau-bandeau--info { margin-bottom: 1rem; background: #F7F3EC; border-left-color: #8B7355; }

.ct-palier-msg--alerte { background: #FFFFFF; border-left: 3px solid #B5523B; }
.ct-palier-msg--alerte strong { color: #B5523B; }

/* ── Lignes du panier ── */
.ct-offert { font-weight: 600; color: #3D5A3E; }
.ct-offert__valeur { color: #6B6B6B; font-weight: 400; }
.ct-prix-barre { color: #8B7355; margin-right: 0.35rem; }

/* ── Vente sur demande ── */
.ct-sur-demande { margin: 1rem 0; font-size: 0.9375rem; color: #4A4A4A; }
.ct-sur-demande a { color: #3D5A3E; border-bottom: 1px solid rgba(61, 90, 62, 0.3); text-decoration: none; }

@media (max-width: 767px) {
	.ct-paliers, .ct-palier-msg, .ct-cadeau { padding: 1rem; }
	.ct-cadeau__liste { grid-template-columns: 1fr; }
}

/* ── Panier et commande en blocs : corrections du thème parent (Hello) ── */
/* Hello donne à .alignwide une marge de -80px : le panier sortait de l'écran sur mobile. */
.wp-block-woocommerce-cart.alignwide,
.wp-block-woocommerce-checkout.alignwide { margin-inline: 0; max-width: 100%; }
.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout { font-family: 'DM Sans', system-ui, sans-serif; }

/* Nom du produit : plus de lien rose souligné. */
.wc-block-cart .wc-block-components-product-name,
.wc-block-checkout .wc-block-components-product-name { color: #1A1A1A; font-weight: 500; text-decoration: none; }
.wc-block-cart .wc-block-components-product-name:hover,
.wc-block-checkout .wc-block-components-product-name:hover { color: #3D5A3E; text-decoration: underline; }

/* Boutons « Valider la commande » / « Passer la commande » aux couleurs de la maison. */
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	background: #3D5A3E !important; color: #FFFFFF !important; border: 0 !important; border-radius: 2px !important;
	text-decoration: none !important; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8125rem; font-weight: 600;
}
.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover { background: #2F4630 !important; }
.wc-block-cart__submit-button .wc-block-components-button__text,
.wc-block-components-checkout-place-order-button .wc-block-components-button__text { text-decoration: none !important; }
