/* SB Laser – Mode clair. Tout est limité à html[data-sb-theme="light"] : le mode sombre (par défaut) reste inchangé. */

html[data-sb-theme="light"] {
	--sbl-bg: #f4f2ee;
	--sbl-surface: #ffffff;
	--sbl-surface-2: #ebe8e3;
	--sbl-border: #dad6cf;
	--sbl-border-strong: #c4bfb7;
	--sbl-text: #1b1b1d;
	--sbl-muted: #5c5a55;
	--sbl-accent: #ff6a1a;
	--sbl-accent-text: #c2490a;
	color-scheme: light;
}

/* Variables du thème SB Laser (définies sur :root ET body) */
html[data-sb-theme="light"],
html[data-sb-theme="light"] body {
	--sb-bg: #f4f2ee;
	--sb-bg2: #ffffff;
	--sb-card: #ffffff;
	--sb-line: #dad6cf;
	--sb-txt: #1b1b1d;
	--sb-mut: #5c5a55;
	--wp--preset--color--base: #f4f2ee;
	--wp--preset--color--contrast: #1b1b1d;
	--wp--preset--color--accent-4: #5c5a55;
}

/* Header et pied de page : on garde l'identité sombre (logo métal, barre du haut). */
html[data-sb-theme="light"] header.wp-block-template-part,
html[data-sb-theme="light"] footer.wp-block-template-part,
html[data-sb-theme="light"] .sbgc-topbar {
	--sb-bg: #0d0d0e;
	--sb-bg2: #151517;
	--sb-card: #1b1b1e;
	--sb-line: #2a2a2e;
	--sb-txt: #e9e7e4;
	--sb-mut: #9a9893;
	color: #e9e7e4;
	--wp--preset--color--base: #0d0d0e;
	--wp--preset--color--contrast: #e9e7e4;
	--wp--preset--color--accent-4: #9a9893;
	color-scheme: dark;
}

html[data-sb-theme="light"] body {
	background-color: var(--sbl-bg);
	color: var(--sbl-text);
}

/* Titres et textes forcés en blanc dans le contenu */
html[data-sb-theme="light"] :is(main, .wp-site-blocks > :not(header):not(footer)) :is(h1, h2, h3, h4, h5, h6, .wp-block-post-title, .wp-block-query-title, .wp-block-post-title a),
html[data-sb-theme="light"] .wc-block-product :is(.wp-block-post-title, .wp-block-post-title a, h2, h3),
html[data-sb-theme="light"] :is(.wc-block-components-product-price, .wp-block-woocommerce-product-price),
html[data-sb-theme="light"] .sb-hero-txt .sb-hero-prix,
html[data-sb-theme="light"] :is(.sbg-step .sbg-title, .sbg-step label, .sbg-step h3, .sbg-step h4) {
	color: var(--sbl-text) !important;
}

html[data-sb-theme="light"] main ::placeholder { color: #8d8a84; }

/* Champs de formulaire */
html[data-sb-theme="light"] :is(main, .wc-block-components-drawer, .wp-block-woocommerce-checkout, .wp-block-woocommerce-cart) :is(input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select, textarea) {
	background-color: var(--sbl-surface);
	color: var(--sbl-text);
	border-color: var(--sbl-border-strong);
}

/* Boutons « contour » et liens de navigation dans le contenu */
html[data-sb-theme="light"] main :is(.is-style-outline .wp-block-button__link, .wp-block-button.is-style-outline > .wp-block-button__link) {
	color: var(--sbl-text) !important;
	border-color: var(--sbl-border-strong) !important;
}
html[data-sb-theme="light"] main .is-style-outline .wp-block-button__link:hover { color: var(--sbl-text); }
html[data-sb-theme="light"] main .wp-block-navigation a,
html[data-sb-theme="light"] .sb-ard-nav a { color: var(--sbl-muted); }
html[data-sb-theme="light"] .sb-ard-nav a:hover { color: var(--sbl-text); }

/* Cartes produits */
html[data-sb-theme="light"] .wc-block-product :is(.wc-block-components-product-image, .wp-block-woocommerce-product-image) {
	background-color: var(--sbl-surface);
}
html[data-sb-theme="light"] :is(.wc-block-product-template > li:hover, .wc-block-product:hover) { border-color: var(--sbl-border-strong); }

/* Encarts d'aide des configurateurs */
html[data-sb-theme="light"] :is(.sbg-help, .sbm-photo-tip, .sbg-note) {
	background-color: #fff3ea;
	border-color: #f3c3a2;
	color: var(--sbl-text);
}
html[data-sb-theme="light"] :is(.sbg-step button[aria-pressed="true"], .sbg-step button.is-active, .sbg-step button.active) {
	color: var(--sbl-text);
}

/* Carte cadeau */
html[data-sb-theme="light"] :is(.sbgc-preset, .sbgc-opt) {
	background: var(--sbl-surface);
	border-color: var(--sbl-border-strong);
	color: var(--sbl-text);
}
html[data-sb-theme="light"] :is(.sbgc-preset.is-on, .sbgc-opt.is-on) {
	background: #fff1e8;
	border-color: var(--sbl-accent);
	color: var(--sbl-text);
}
html[data-sb-theme="light"] :is(.sbgc-form, .sbgc-check) :is(input[type="text"], input[type="email"], input[type="number"], textarea) {
	background: var(--sbl-surface);
	color: var(--sbl-text);
	border-color: var(--sbl-border-strong);
}
html[data-sb-theme="light"] .sbgc-check { border-top-color: var(--sbl-border); }
html[data-sb-theme="light"] .sbgc-res.is-err { color: #b3261e; }

/* Liens orange : un peu plus foncés pour rester lisibles sur fond clair */
html[data-sb-theme="light"] main a:not(.wp-element-button):not(.wp-block-button__link):not(.wc-block-components-button):not([class*="sb-"]):not([class*="sbg"]) {
	text-decoration-color: currentColor;
}


/* Titres des configurateurs */
html[data-sb-theme="light"] :is(.sbg-title, .sbg-step .sbg-title) { color: var(--sbl-text) !important; }

/* Boutons « contour » orange des fiches produits : orange plus foncé pour la lisibilité */
html[data-sb-theme="light"] .wc-block-product :is(a.button, .wp-block-button__link, .wc-block-components-product-button__button):not(:hover),
html[data-sb-theme="light"] main .products :is(a.button):not(:hover) {
	color: var(--sbl-accent-text) !important;
	border-color: rgba(194, 73, 10, .55) !important;
}

/* Mini-panier (tiroir) : clair aussi */
html[data-sb-theme="light"] .wc-block-mini-cart__drawer {
	--sb-bg: #f4f2ee;
	--sb-bg2: #ffffff;
	--sb-card: #ffffff;
	--sb-line: #dad6cf;
	--sb-txt: #1b1b1d;
	--sb-mut: #5c5a55;
	--wp--preset--color--base: #ffffff;
	--wp--preset--color--contrast: #1b1b1d;
	color: #1b1b1d;
	color-scheme: light;
}
html[data-sb-theme="light"] .wc-block-mini-cart__drawer :is(.wc-block-components-drawer, .wp-block-woocommerce-mini-cart-contents, .wc-block-mini-cart__title, [class*="mini-cart-contents"]) {
	background-color: #ffffff !important;
	color: #1b1b1d !important;
}

/* Bouton de bascule */
.sbt-toggle {
	display: inline-flex;
	align-items: center;
	gap: .4em;
	height: 34px;
	padding: 0 .75em;
	border: 1px solid #2a2a2e;
	border-radius: 999px;
	background: transparent;
	color: #e9e7e4;
	font: inherit;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
	white-space: nowrap;
	transition: border-color .2s, background .2s;
}
.sbt-toggle:hover { border-color: #ff6a1a; background: rgba(255, 106, 26, .08); }
.sbt-toggle:focus-visible { outline: 2px solid #ff6a1a; outline-offset: 2px; }
.sbt-toggle svg { width: 16px; height: 16px; flex: 0 0 auto; }
.sbt-toggle .sbt-moon, html[data-sb-theme="light"] .sbt-toggle .sbt-sun { display: none; }
html[data-sb-theme="light"] .sbt-toggle .sbt-moon { display: block; }
.sbt-toggle .sbt-l-dark { display: none; }
html[data-sb-theme="light"] .sbt-toggle .sbt-l-light { display: none; }
html[data-sb-theme="light"] .sbt-toggle .sbt-l-dark { display: inline; }
@media (max-width: 781px) {
	.sbt-toggle { padding: 0; width: 34px; justify-content: center; }
	.sbt-toggle .sbt-label { display: none !important; }
}
.sbt-anim, .sbt-anim * { transition: background-color .25s ease, color .25s ease, border-color .25s ease !important; }
.wp-block-woocommerce-customer-account:has(.sbt-toggle) { display: flex; align-items: center; gap: 14px; }
.sbt-float { position: fixed; left: 16px; bottom: 16px; z-index: 9999; }
.sbt-float .sbt-toggle { background: #0d0d0e; }


/* sb-img-full : images affichées en entier (pas de recadrage/zoom) dans les galeries */
.wp-block-gallery.is-cropped .wp-block-image img,
.wp-block-gallery .wp-block-image img {
	object-fit: contain !important;
	background: var(--sb-card, #1b1b1e);
	border-radius: 6px;
}
