/* Dax E-com — styles de base. Toutes les valeurs viennent des variables --dxe-* (réglages du thème). */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--dxe-bg);
	color: var(--dxe-text);
	font-family: var(--dxe-font-body);
	font-weight: var(--dxe-weight-body);
	font-size: var(--dxe-size-body);
	line-height: var(--dxe-line-height);
	-webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--dxe-accent); }
:focus-visible { outline: 2px solid var(--dxe-text); outline-offset: 2px; }
.dxe-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dxe-skip { position: absolute; left: -9999px; top: 0; z-index: 100000; background: var(--dxe-bg); padding: 10px 14px; }
.dxe-skip:focus { left: 10px; top: 10px; }

/* Titres */
h1, h2, h3, h4, h5, h6, .dxe-title {
	font-family: var(--dxe-font-heading);
	font-weight: var(--dxe-weight-heading);
	text-transform: var(--dxe-heading-transform);
	line-height: 1.15;
	color: var(--dxe-text);
	margin: 1.4em 0 .5em;
}
/* Dans les gabarits du thème, ses polices passent avant les réglages globaux d'Elementor (pendant la migration). */
body .dxe-main { font-family: var(--dxe-font-body); font-size: var(--dxe-size-body); line-height: var(--dxe-line-height); }
body .dxe-main h1, body .dxe-main h2, body .dxe-main h3, body .dxe-main h4 { font-family: var(--dxe-font-heading); font-weight: var(--dxe-weight-heading); }
body .dxe-main p, body .dxe-main li { font-family: var(--dxe-font-body); }
h1, .dxe-title { font-size: var(--dxe-size-h1); margin-top: .4em; }
h2 { font-size: var(--dxe-size-h2); }
h3 { font-size: var(--dxe-size-h3); }
p, ul, ol { margin: 0 0 1em; }
small, .dxe-meta { font-size: var(--dxe-size-small); color: var(--dxe-muted); }

/* Boutons */
.dxe-btn, .wp-element-button, .wp-block-button__link, button.dxe-btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 12px 24px;
	background: var(--dxe-btn-bg);
	color: var(--dxe-btn-text);
	border: 1px solid var(--dxe-btn-bg);
	border-radius: var(--dxe-radius);
	font-family: var(--dxe-font-body);
	font-size: var(--dxe-size-btn);
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
}
.dxe-btn:hover, .wp-element-button:hover, .wp-block-button__link:hover { filter: brightness(.85); color: var(--dxe-btn-text); }

/* Conteneurs */
.dxe-container { width: 100%; max-width: var(--dxe-container); margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
.dxe-narrow { max-width: 760px; }
.dxe-main { min-height: 50vh; }
.dxe-page-head { padding: 24px 0 8px; }
.dxe-content > *:first-child { margin-top: 0; }
.dxe-content .alignwide { max-width: min(1100px, 100%); margin-left: auto; margin-right: auto; }
.dxe-content .alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.dxe-hero { margin: 0 0 24px; }
.dxe-hero img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--dxe-radius); }

/* Bandeau d'annonce */
.dxe-announce { background: var(--dxe-text); color: var(--dxe-bg); text-align: center; font-size: 11px; letter-spacing: .02em; padding: 7px 16px; }
.dxe-announce a { color: inherit; text-decoration: none; }

/* En-tête du thème */
.dxe-header-wrap { position: relative; z-index: 900; }
.dxe-sticky-header .dxe-header-wrap { position: sticky; top: 0; }
.admin-bar.dxe-sticky-header .dxe-header-wrap { top: 32px; }
.dxe-header { background: var(--dxe-bg); border-bottom: 1px solid var(--dxe-line); transition: background .25s, border-color .25s; }
.dxe-header-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 14px max(20px, 2vw); }
.dxe-header-left { display: flex; align-items: center; min-width: 0; }
.dxe-brand { text-align: center; line-height: 0; }
.dxe-brand img { height: var(--dxe-logo-h); width: auto; display: block; margin: 0 auto; }
.dxe-brand-name { font-family: var(--dxe-font-heading); font-size: 22px; line-height: 1.2; text-decoration: none; letter-spacing: .02em; color: var(--dxe-text); }
.dxe-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.dxe-menu a { text-decoration: none; font-size: var(--dxe-size-small); color: var(--dxe-text); }
.dxe-menu a:hover, .dxe-menu .current-menu-item > a { text-decoration: underline; text-underline-offset: 4px; }
.dxe-menu .sub-menu { list-style: none; margin: 0; padding: 8px 0 0 12px; }
.dxe-nav-head { display: none; }
.dxe-tools { display: flex; justify-content: flex-end; align-items: center; gap: 18px; }
.dxe-tool { position: relative; display: inline-flex; align-items: center; color: var(--dxe-text); text-decoration: none; font-size: var(--dxe-size-small); }
.dxe-account-icon.is-mobile-only { display: none; }
.dxe-cart-count { position: absolute; top: -6px; right: -8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--dxe-text); color: var(--dxe-bg); font-size: 10px; line-height: 16px; text-align: center; }
.dxe-cart-count[data-count="0"] { display: none; }
.dxe-menu-toggle { display: none; background: none; border: 0; padding: 4px; color: var(--dxe-text); cursor: pointer; }

/* En-tête transparent (accueil) */
.dxe-header-wrap.is-transparent { position: absolute; left: 0; right: 0; top: 0; }
.dxe-sticky-header .dxe-header-wrap.is-transparent { position: fixed; }
.admin-bar .dxe-header-wrap.is-transparent { top: 32px; }
.dxe-header-wrap.is-transparent .dxe-header { background: transparent; border-color: transparent; }
.dxe-header-wrap.is-transparent:not(.is-solid):not(.is-dark) .dxe-header, .dxe-header-wrap.is-transparent:not(.is-solid):not(.is-dark) .dxe-menu a, .dxe-header-wrap.is-transparent:not(.is-solid):not(.is-dark) .dxe-tool, .dxe-header-wrap.is-transparent:not(.is-solid):not(.is-dark) .dxe-menu-toggle, .dxe-header-wrap.is-transparent:not(.is-solid):not(.is-dark) .dxe-brand-name { color: #fff; }
.dxe-header-wrap.is-transparent.is-solid .dxe-header { background: var(--dxe-bg); border-color: var(--dxe-line); }
.dxe-logo-dark { display: none !important; }
.dxe-header-wrap.is-transparent.is-solid .dxe-logo-light { display: none !important; }
.dxe-header-wrap.is-transparent.is-solid .dxe-logo-dark { display: block !important; }

@media (max-width: 900px) {
	.dxe-menu-toggle { display: inline-flex; }
	.dxe-nav { position: fixed; inset: 0 auto 0 0; width: min(86vw, 340px); background: var(--dxe-bg); z-index: 100001; transform: translateX(-102%); transition: transform .25s ease; padding: 0 22px 22px; overflow-y: auto; box-shadow: 0 0 40px rgba(0,0,0,.18); }
	.dxe-nav.is-open { transform: none; }
	.dxe-nav-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--dxe-line); margin-bottom: 6px; line-height: 0; }
	.dxe-nav-head img { height: calc(var(--dxe-logo-h) * .8); width: auto; }
	.dxe-nav-close { background: none; border: 0; padding: 4px; cursor: pointer; color: var(--dxe-text); }
	.dxe-menu { flex-direction: column; gap: 0; }
	.dxe-menu a { display: block; padding: 14px 0; border-bottom: 1px solid var(--dxe-line); font-size: 15px; color: var(--dxe-text) !important; }
	.dxe-nav-overlay:not([hidden]) { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100000; }
	.dxe-header-in { grid-template-columns: 1fr auto 1fr; padding: 12px 16px; }
	.dxe-account-label { display: none; }
	.dxe-account-icon.is-mobile-only { display: inline-flex; }
	html.dxe-lock { overflow: hidden; }
}
@media (max-width: 782px) { .admin-bar.dxe-sticky-header .dxe-header-wrap, .admin-bar .dxe-header-wrap.is-transparent { top: 46px; } }

/* Pied de page */
.dxe-footer { margin-top: 64px; background: var(--dxe-bg); }
.dxe-footer-in { padding: 40px max(20px, 2vw) 24px; font-size: var(--dxe-size-small); color: var(--dxe-muted); }
.dxe-footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin-bottom: 32px; }
.dxe-footer-title { margin: 0 0 12px; font-weight: 600; color: var(--dxe-text); font-size: 13px; }
.dxe-footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.dxe-footer-menu a { text-decoration: none; color: var(--dxe-text); font-size: 12px; }
.dxe-footer-menu a:hover { text-decoration: underline; }
.dxe-footer-news p { margin: 0 0 10px; font-size: 12px; }
.dxe-news-form { display: flex; border-bottom: 1px solid var(--dxe-text); margin: 0 0 10px; flex-wrap: wrap; }
.dxe-news-form input[type=email] { flex: 1; min-width: 0; border: 0; padding: 10px 0; background: transparent; font-size: 12px; border-radius: 0; }
.dxe-news-form input[type=email]:focus { outline: none; }
.dxe-news-form button { background: none; border: 0; padding: 0 0 0 10px; font: inherit; font-size: 12px; color: var(--dxe-text); cursor: pointer; white-space: nowrap; }
.dxe-news-form.is-done input, .dxe-news-form.is-done button { display: none; }
.dxe-news-msg { width: 100%; margin: 6px 0 8px !important; color: var(--dxe-text); }
.dxe-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; }
.dxe-footer-text { font-size: 11px; color: var(--dxe-muted); }
.dxe-footer-text a { color: inherit; }
.dxe-copy { margin: 0; padding-top: 18px; border-top: 1px solid var(--dxe-line); text-align: center; font-size: 11px; }
@media (max-width: 900px) { .dxe-footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dxe-footer-news { grid-column: 1 / -1; } }

/* Listes d'articles */
.dxe-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px 20px; }
.dxe-card-img img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--dxe-radius); }
.dxe-card-title { font-size: var(--dxe-size-h3); margin: 12px 0 6px; }
.dxe-card-title a { text-decoration: none; }
.dxe-card-excerpt { color: var(--dxe-muted); }
.nav-links { display: flex; gap: 8px; justify-content: center; margin: 32px 0; }
.page-numbers { padding: 6px 12px; border: 1px solid var(--dxe-line); border-radius: var(--dxe-radius); text-decoration: none; }
.page-numbers.current { background: var(--dxe-text); color: var(--dxe-bg); border-color: var(--dxe-text); }

/* Formulaires */
input[type=text], input[type=email], input[type=search], input[type=tel], input[type=number], input[type=password], input[type=url], textarea, select {
	font: inherit; color: var(--dxe-text); background: var(--dxe-bg);
	border: 1px solid var(--dxe-line); border-radius: var(--dxe-radius); padding: 10px 12px; max-width: 100%;
}

/* Tiroirs (guide des tailles, panier latéral) */
.dxe-drawer[hidden] { display: none; }
.dxe-drawer { position: fixed; inset: 0; z-index: 100002; }
.dxe-drawer-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.dxe-drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(92vw, 460px); background: var(--dxe-bg); display: flex; flex-direction: column; box-shadow: 0 0 40px rgba(0,0,0,.18); animation: dxe-in .25s ease; }
@keyframes dxe-in { from { transform: translateX(100%); } to { transform: none; } }
.dxe-drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--dxe-line); font-weight: 600; }
.dxe-drawer-close { background: none; border: 0; cursor: pointer; color: var(--dxe-text); padding: 2px; }
.dxe-drawer-body { padding: 18px; overflow-y: auto; flex: 1; font-size: 13px; }
html.dxe-lock { overflow: hidden; }

@media (prefers-reduced-motion: reduce) { .dxe-nav { transition: none; } .dxe-drawer-panel { animation: none; } }

/* Les boutons du thème gardent leurs couleurs même si une extension (Elementor…) colore tous les liens et boutons. */
body a.dxe-btn, body a.dxe-btn:hover, body button.dxe-btn { color: var(--dxe-btn-text) !important; background: var(--dxe-btn-bg) !important; }

/* En-tête transparent foncé (fiches produits) : uniquement sur ordinateur ; sur mobile, en-tête normal au-dessus du carrousel. */
@media (max-width: 899px) { .dxe-header-wrap.is-transparent.is-dark { position: relative; top: auto !important; } .dxe-header-wrap.is-transparent.is-dark .dxe-header { background: var(--dxe-bg); } }
@media (min-width: 900px) { .dxe-header-wrap.is-dark ~ .dxe-main .dxe-product-summary-in { padding-top: 110px; } }

/* Formulaire de recherche (page introuvable, résultats) */
.search-form { display: flex; gap: 8px; max-width: 420px; margin: 24px 0 0; }
.search-form label { flex: 1; margin: 0; }
.search-form .search-field { width: 100%; }
.search-form .search-submit { background: var(--dxe-bg); color: var(--dxe-text); border: 1px solid var(--dxe-text); border-radius: var(--dxe-radius); padding: 0 18px; font: inherit; font-size: var(--dxe-size-btn); cursor: pointer; }
.search-form .search-submit:hover { background: var(--dxe-text); color: var(--dxe-bg); }
