/* ==========================================================
   KRS Utilitaire — habillage de Storefront
   (chargé après les styles de Storefront)
   ========================================================== */

/* ---------- Base ---------- */
body.krs-theme {
	font-family: var(--font-body);
	color: var(--noir);
	background: var(--blanc);
}
body.krs-theme a { color: var(--orange); }
body.krs-theme a:hover, body.krs-theme a:focus { color: var(--orange-light); }

body.krs-theme h1, body.krs-theme h2,
body.krs-theme .entry-title, body.krs-theme .page-title {
	font-family: var(--font-title);
	font-weight: 400;
	letter-spacing: 1px;
	line-height: 1;
	color: var(--noir);
}
body.krs-theme h1, body.krs-theme .entry-title, body.krs-theme .page-title { font-size: clamp(40px, 5vw, 64px); margin-bottom: 24px; }
body.krs-theme h2 { font-size: clamp(30px, 3.5vw, 40px); }
body.krs-theme h3 { font-family: var(--font-body); font-weight: 600; }

/* Les liens de nos blocs gardent leur couleur */
body.krs-theme .krs-header a, body.krs-theme .krs-footer a,
body.krs-theme .krs-hero a, body.krs-theme .krs-brand-card,
body.krs-theme .krs-product-card a, body.krs-theme .krs-see-all,
body.krs-theme .krs-cta a { color: inherit; }
body.krs-theme .krs-btn-primary, body.krs-theme .krs-btn-primary:hover,
body.krs-theme .krs-header-cta, body.krs-theme .krs-header-cta:hover { color: #fff; }
body.krs-theme .krs-btn-white { color: var(--orange); }
body.krs-theme .krs-btn-white:hover { color: #fff; }
body.krs-theme .krs-btn-add, body.krs-theme .krs-btn-add:hover { color: #fff; }
body.krs-theme .krs-menu a { color: rgba(255,255,255,.7); }
body.krs-theme .krs-menu a:hover, body.krs-theme .krs-menu .current-menu-item > a { color: var(--orange); }
body.krs-theme .krs-footer-col a { color: rgba(255,255,255,.5); }
body.krs-theme .krs-footer-col a:hover { color: var(--orange); }
body.krs-theme .krs-hero h1 { color: var(--blanc); font-size: clamp(60px, 9vw, 110px); line-height: .92; letter-spacing: 2px; margin-bottom: 28px; }
body.krs-theme .krs-cta-text h2 { color: #fff; }
body.krs-theme .krs-usp-title { font-family: var(--font-title); font-weight: 400; }

/* ---------- Structure Storefront ---------- */
body.krs-theme .site-content { padding-top: 0; }
body.krs-theme.home .site-content { padding: 0; }
body.krs-theme .col-full { max-width: 1280px; padding-left: var(--gutter); padding-right: var(--gutter); }
body.krs-theme .site-main { margin-bottom: 80px; }
body.krs-theme.home .site-main { margin-bottom: 0; }
body.krs-theme .content-area { width: 100%; float: none; margin: 0; }
body.krs-theme .krs-home { width: 100%; }

/* ---------- Fil d'Ariane ---------- */
body.krs-theme .storefront-breadcrumb { margin: 0 0 32px; padding: 32px 0 0; background: none; }
body.krs-theme .woocommerce-breadcrumb {
	font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gris-moyen);
	padding: 0; margin: 0;
}
body.krs-theme .woocommerce-breadcrumb a { color: var(--gris-moyen); text-decoration: none; }
body.krs-theme .woocommerce-breadcrumb a:hover { color: var(--orange); }
body.krs-theme .woocommerce-breadcrumb a:first-of-type::before { display: none; }
body.krs-theme .woocommerce-breadcrumb .breadcrumb-separator { color: rgba(0,0,0,.2); padding: 0 8px; }

/* ---------- Boutons ---------- */
body.krs-theme button, body.krs-theme input[type="button"], body.krs-theme input[type="reset"], body.krs-theme input[type="submit"],
body.krs-theme .button, body.krs-theme .wc-block-components-button:not(.is-link), body.krs-theme .added_to_cart {
	background: var(--noir); border: 0; color: #fff; border-radius: 2px;
	font-family: var(--font-body); font-weight: 600; letter-spacing: .6px; text-shadow: none;
	padding: 14px 24px; transition: background .2s;
}
body.krs-theme button:hover, body.krs-theme input[type="submit"]:hover, body.krs-theme .button:hover,
body.krs-theme .wc-block-components-button:not(.is-link):hover, body.krs-theme .added_to_cart:hover { background: var(--orange); color: #fff; }

body.krs-theme .button.alt, body.krs-theme button.alt, body.krs-theme input[type="submit"].alt,
body.krs-theme .single_add_to_cart_button, body.krs-theme .checkout-button, body.krs-theme #place_order,
body.krs-theme .wc-block-cart__submit-button, body.krs-theme .wc-block-components-checkout-place-order-button {
	background: var(--orange) !important; color: #fff !important;
}
body.krs-theme .button.alt:hover, body.krs-theme .single_add_to_cart_button:hover,
body.krs-theme .checkout-button:hover, body.krs-theme #place_order:hover { background: var(--orange-light) !important; }

body.krs-theme .krs-burger { background: none; padding: 8px; }
body.krs-theme .krs-burger:hover { background: none; }

/* ---------- Champs ---------- */
body.krs-theme input[type="text"], body.krs-theme input[type="email"], body.krs-theme input[type="tel"],
body.krs-theme input[type="password"], body.krs-theme input[type="search"], body.krs-theme input[type="number"],
body.krs-theme textarea, body.krs-theme select, body.krs-theme .input-text {
	background: #fff; border: 1px solid rgba(0,0,0,.18); border-radius: 2px; box-shadow: none; color: var(--noir);
}
body.krs-theme input:focus, body.krs-theme textarea:focus, body.krs-theme select:focus { border-color: var(--orange); background: #fff; }

/* ---------- Grille produits ---------- */
body.krs-theme .woocommerce-products-header { padding: 0 0 16px; }
body.krs-theme .storefront-sorting { margin-bottom: 24px; font-size: 13px; }
body.krs-theme .woocommerce-result-count { color: #6b6b62; }

body.krs-theme ul.products {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 0 48px;
}
body.krs-theme ul.products.columns-4 { grid-template-columns: repeat(4, 1fr); }
body.krs-theme ul.products::before, body.krs-theme ul.products::after { display: none; }

body.krs-theme ul.products li.product,
body.krs-theme ul.products li.product-category {
	width: auto !important; float: none !important; margin: 0 !important; clear: none !important;
	background: #fff; border: 1px solid rgba(0,0,0,.07); border-radius: 4px; overflow: hidden;
	display: flex; flex-direction: column; text-align: left; position: relative;
	transition: transform .25s, box-shadow .25s;
}
body.krs-theme ul.products li.product:hover,
body.krs-theme ul.products li.product-category:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,.12); }

body.krs-theme ul.products li.product a.woocommerce-LoopProduct-link,
body.krs-theme ul.products li.product-category > a { display: flex; flex-direction: column; flex: 1; color: var(--noir); text-decoration: none; }

body.krs-theme ul.products li.product img,
body.krs-theme ul.products li.product-category img {
	width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: 0 !important; border-radius: 0;
	background: linear-gradient(135deg, #1a1f2e 0%, #2d3348 100%);
}

body.krs-theme ul.products li.product .woocommerce-loop-product__title,
body.krs-theme ul.products li.product h2,
body.krs-theme ul.products li.product h3 {
	font-family: var(--font-body); font-weight: 600; font-size: 15px; letter-spacing: 0; line-height: 1.35;
	padding: 16px 20px 6px; margin: 0; color: var(--noir);
}
body.krs-theme ul.products li.product-category h2 {
	font-family: var(--font-title); font-weight: 400; font-size: 22px; letter-spacing: 1.5px; padding: 16px 20px 18px; margin: 0;
}
body.krs-theme ul.products li.product-category mark.count { background: none; color: var(--gris-moyen); font-family: var(--font-mono); font-size: 12px; }

body.krs-theme ul.products li.product .price {
	display: block; padding: 0 20px 16px; margin: auto 0 0; color: var(--noir);
	font-family: var(--font-title); font-size: 26px; letter-spacing: 1px; font-weight: 400;
}
body.krs-theme ul.products li.product .price del { font-size: .65em; color: var(--gris-moyen); opacity: 1; }
body.krs-theme ul.products li.product .price ins { font-weight: 400; text-decoration: none; }
body.krs-theme .price small { font-family: var(--font-body); font-size: 12px; font-weight: 600; color: var(--gris-moyen); }
body.krs-theme ul.products li.product .button { display: block; margin: 0 20px 20px; text-align: center; }
body.krs-theme ul.products li.product .added_to_cart { display: block; margin: -12px 20px 20px; text-align: center; padding: 10px; font-size: 13px; }

body.krs-theme .onsale, body.krs-theme ul.products li.product .onsale {
	position: absolute; top: 14px; left: 14px; z-index: 2; margin: 0;
	background: var(--orange); color: #fff; border: 0; border-radius: 2px; padding: 5px 10px;
	font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 500; line-height: 1;
}

/* Pagination */
body.krs-theme .woocommerce-pagination .page-numbers li .page-numbers {
	background: #fff; border: 1px solid rgba(0,0,0,.12); color: var(--noir); border-radius: 2px; min-width: 40px; padding: 8px 12px;
}
body.krs-theme .woocommerce-pagination .page-numbers li .page-numbers.current { background: var(--noir); border-color: var(--noir); color: #fff; }
body.krs-theme .woocommerce-pagination .page-numbers li a.page-numbers:hover { border-color: var(--orange); color: var(--orange); }

/* ---------- Fiche produit ---------- */
body.krs-theme.single-product div.product .product_title {
	font-family: var(--font-title); font-weight: 400; font-size: clamp(34px, 4vw, 52px); line-height: 1; letter-spacing: 1px; margin-bottom: 16px;
}
body.krs-theme.single-product div.product p.price {
	font-family: var(--font-title); font-size: 44px; letter-spacing: 1px; color: var(--noir); font-weight: 400; line-height: 1; margin-bottom: 20px;
}
body.krs-theme.single-product div.product p.price del { font-size: .55em; color: var(--gris-moyen); opacity: 1; }
body.krs-theme.single-product div.product p.price ins { font-weight: 400; }
body.krs-theme.single-product div.product p.price small { font-size: 15px; }
body.krs-theme.single-product div.product .woocommerce-product-details__short-description { border-top: 1px solid rgba(0,0,0,.08); padding-top: 20px; color: #44443e; }
body.krs-theme.single-product div.product form.cart { display: flex; flex-wrap: wrap; gap: 12px; padding: 0 0 24px; border: 0; }
body.krs-theme.single-product div.product form.cart .quantity { margin: 0; }
body.krs-theme.single-product div.product form.cart .qty { width: 80px; min-height: 50px; text-align: center; font-weight: 600; }
body.krs-theme.single-product div.product .single_add_to_cart_button { flex: 1; padding: 16px 28px; font-size: 15px; }
body.krs-theme.single-product div.product .woocommerce-product-gallery img { border-radius: 4px; }
body.krs-theme.single-product div.product .product_meta { font-family: var(--font-mono); font-size: 12px; color: var(--gris-moyen); border-top: 1px solid rgba(0,0,0,.08); }
body.krs-theme.single-product div.product .product_meta a { color: #55554d; }

body.krs-theme .woocommerce-tabs ul.tabs li a { font-size: 13px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gris-moyen); }
body.krs-theme .woocommerce-tabs ul.tabs li.active a, body.krs-theme .woocommerce-tabs ul.tabs li a:hover { color: var(--noir); }
body.krs-theme .woocommerce-tabs ul.tabs li.active::after { color: var(--orange); }
body.krs-theme .woocommerce-tabs .panel > h2:first-child { font-size: 28px; }

body.krs-theme .related > h2, body.krs-theme .upsells > h2, body.krs-theme .cross-sells > h2 { font-size: 40px; margin-bottom: 24px; }

/* Barre « ajouter au panier » collante de Storefront */
body.krs-theme .storefront-sticky-add-to-cart { background: var(--noir); color: #fff; border: 0; top: var(--header-h); }
body.krs-theme .storefront-sticky-add-to-cart__content-title, body.krs-theme .storefront-sticky-add-to-cart__content-title strong { color: #fff; }

/* ---------- Messages ---------- */
body.krs-theme .woocommerce-message, body.krs-theme .woocommerce-info, body.krs-theme .woocommerce-error, body.krs-theme .woocommerce-noreviews {
	background: var(--gris-clair); color: var(--noir); border-left: 3px solid var(--orange); border-radius: 2px;
}
body.krs-theme .woocommerce-error { border-left-color: #c0262d; }
body.krs-theme .woocommerce-message a, body.krs-theme .woocommerce-info a { color: var(--orange); }
body.krs-theme .woocommerce-message a.button, body.krs-theme .woocommerce-info a.button { color: #fff; }
body.krs-theme .woocommerce-message::before, body.krs-theme .woocommerce-info::before { color: var(--orange); }

/* ---------- Tableaux panier / commande ---------- */
body.krs-theme table th, body.krs-theme table td { background: transparent; }
body.krs-theme table:not(.has-background) tbody tr:nth-child(2n) td { background: transparent; }
body.krs-theme table.shop_table th { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gris-moyen); }
body.krs-theme .cart_totals h2, body.krs-theme #order_review_heading, body.krs-theme .woocommerce-billing-fields > h3 { font-family: var(--font-title); font-weight: 400; font-size: 28px; }
body.krs-theme #payment { background: var(--gris-clair); border-radius: 4px; }

/* ---------- Mon compte ---------- */
body.krs-theme .woocommerce-MyAccount-navigation ul li a { color: #44443e; }
body.krs-theme .woocommerce-MyAccount-navigation ul li.is-active a { color: var(--orange); }

/* ---------- Pied de page : neutralise les marges Storefront ---------- */
body.krs-theme .krs-footer h4 { font-family: var(--font-title); font-weight: 400; color: var(--blanc); }
body.krs-theme .krs-footer ul { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	body.krs-theme ul.products.columns-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
	body.krs-theme ul.products, body.krs-theme ul.products.columns-3, body.krs-theme ul.products.columns-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	body.krs-theme ul.products { gap: 10px; }
	body.krs-theme ul.products li.product .woocommerce-loop-product__title { font-size: 14px; padding: 12px 14px 4px; }
	body.krs-theme ul.products li.product .price { font-size: 22px; padding: 0 14px 12px; }
	body.krs-theme ul.products li.product .button { margin: 0 14px 14px; padding: 12px; font-size: 13px; }
}

/* ---------- Correctifs couleurs en-tête / pied ---------- */
body.krs-theme .krs-header { color: rgba(255,255,255,.75); }
body.krs-theme .krs-logo, body.krs-theme .krs-logo:hover { color: var(--blanc); }
body.krs-theme .krs-logo span { color: var(--orange); }
body.krs-theme .krs-account:hover, body.krs-theme .krs-cart:hover { color: var(--orange); }
body.krs-theme .krs-cart-count { color: #fff; }
body.krs-theme .krs-social { color: rgba(255,255,255,.5); }
body.krs-theme .krs-social:hover { color: #fff; }

/* La barre « ajouter au panier » collante passe sous notre en-tête tant qu'elle est masquée */
body.krs-theme .storefront-sticky-add-to-cart { z-index: 90; }

/* ---------- Accueil : priorité sur les titres Storefront ---------- */
body.krs-theme .krs-section-title { font-size: clamp(40px, 5vw, 64px); margin: 0; }
body.krs-theme .krs-cta-text h2 { font-size: clamp(36px, 5vw, 60px); margin-bottom: 12px; }
body.krs-theme .krs-hero .krs-btn-secondary { color: rgba(255,255,255,.7); }
body.krs-theme .krs-hero .krs-btn-secondary:hover { color: #fff; }
body.krs-theme .krs-product-card a.krs-btn-add, body.krs-theme .krs-product-card a.krs-btn-add:hover { color: #fff; }
body.krs-theme .krs-product-name { font-family: var(--font-body); font-weight: 600; font-size: 16px; line-height: 1.3; margin: 0; }
body.krs-theme .krs-product-card.is-featured .krs-product-name { font-size: 22px; }
body.krs-theme .krs-usp-title { font-size: 22px; letter-spacing: 1.5px; color: var(--blanc); }
body.krs-theme .krs-burger:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
body.krs-theme .krs-burger:focus:not(:focus-visible) { outline: none; }
