/*
 * Pilote Xiaomi Store : socle léger sur le thème Hello Elementor (option C).
 * Bandeau, en-tête façon mi.com (barre blanche de 56 px, menu MiSans 15 px, orange #ff6900 au survol),
 * tiroir de menu du téléphone, bases des pages. Le logo animé et le panneau de recherche viennent d'entete.css.
 */

/* ---------- base neutre (remplace celle du thème, sur le modèle de Bootstrap Reboot qu'avait Besa) ----------
 * :where() ramène ces règles au poids d'un simple sélecteur d'élément, comme dans Bootstrap : la moindre classe des
 * composants de Pilote (cartes, boutons, titres…) l'emporte, ce qui n'était pas le cas avec « body.xs-socle a ».
 */

/* 1rem = 14 px comme avec Besa (cette feuille n'est chargée que sur le thème léger) */
html { font-size: 14px; }
:where(body.xs-socle) *,
:where(body.xs-socle) *::before,
:where(body.xs-socle) *::after { box-sizing: border-box; }
body.xs-socle { line-height: 24px; text-size-adjust: 100%; -webkit-text-size-adjust: 100%; } /* 24 px comme Besa */
:where(body.xs-socle) img,
:where(body.xs-socle) svg { vertical-align: middle; }
:where(body.xs-socle) img { max-width: 100%; height: auto; border-style: none; }
:where(body.xs-socle) :is(h1, h2, h3, h4, h5, h6) { margin-top: 0; margin-bottom: .5rem; font-weight: 500; line-height: 1.2; }
:where(body.xs-socle) p { margin-top: 0; margin-bottom: 1rem; }
:where(body.xs-socle) :is(ul, ol, dl) { margin-top: 0; margin-bottom: 1rem; }
:where(body.xs-socle) a { color: inherit; text-decoration: none; background-color: transparent; }
:where(body.xs-socle) b,
:where(body.xs-socle) strong { font-weight: bolder; }
:where(body.xs-socle) button { border-radius: 0; text-transform: none; }
:where(body.xs-socle) :is(button, input, select, textarea) { margin: 0; font-family: inherit; font-size: inherit; line-height: inherit; }
:where(body.xs-socle) table { border: 1px solid #f0f0f0; border-collapse: collapse; } /* filets de Besa */
:where(body.xs-socle) :is(th, td) { border-top: 1px solid #f0f0f0; border-left: 1px solid #f0f0f0; }
:where(body.xs-socle) th { text-align: inherit; }
:where(body.xs-socle) label { display: inline-block; }
:where(body.xs-socle) figure { margin: 0 0 1rem; }
:where(body.xs-socle) hr { height: 0; margin: 1rem 0; border: 0; border-top: 1px solid rgba(0, 0, 0, .1); }
body.xs-socle .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

body.xs-socle {
	--xs-police: "XS MiSans", CamphorProForXiaoMi, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--xs-orange: #ff6900;
	--xs-encre: #191919;
	--xs-gris: #6b6b6b;
	--xs-largeur: 1500px;
	margin: 0;
	/* comme Besa : fond gris clair (les cartes blanches s'en détachent), texte de base en Camphor 14 px noir ;
	   les éléments de Pilote (en-tête, bandeau, panier, compte, 404…) précisent MiSans eux-mêmes */
	background-color: #f5f5f5;
	font-family: CamphorProForXiaoMi, var(--xs-police);
	font-size: 14px;
	color: #000;
	-webkit-font-smoothing: antialiased;
}

/* ---------- CSS du site repris d'Elementor Pro (Réglages du site > CSS personnalisé, désactivé avec Pro) ----------
 * Nouveau prix (<ins> des prix WooCommerce) sans soulignement ; onglets Elementor centrés. La règle qui rendait les
 * anciens prix (<del>) invisibles, correctif provisoire, est retirée (22/11) : ils s'affichent barrés.
 */
ins { text-decoration: none !important; }
.elementor-widget-tabs .elementor-tabs { text-align: center !important; }

/* ---------- bandeau ---------- */

.xs-bandeau {
	padding: 7px 16px;
	font-family: var(--xs-police);
	background: var(--xs-encre);
	color: #fff;
	font-size: 13px;
	line-height: 18px;
	text-align: center;
	letter-spacing: .01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.xs-bandeau__msg + .xs-bandeau__msg::before {
	content: "·";
	margin: 0 14px;
	color: rgba(255, 255, 255, .55);
}

@media (max-width: 767px) {
	.xs-bandeau__msg + .xs-bandeau__msg { display: none; }
}

/* ---------- en-tête ---------- */

.xs-tete {
	position: sticky;
	top: 0;
	z-index: 1000;
	font-family: var(--xs-police);
	background: #fff;
	box-shadow: 0 6px 16px rgba(25, 25, 25, .06);
}
body.admin-bar .xs-tete { top: 32px; }
@media (max-width: 782px) {
	body.admin-bar .xs-tete { top: 0; }
}
.xs-tete__in {
	position: static; /* panneau de recherche et hypermenus calés sur toute la largeur de l'en-tête, comme en ligne */
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: var(--xs-largeur);
	height: 56px;
	margin: 0 auto;
	padding: 0 16px;
	box-sizing: border-box;
}
.xs-tete .xs-ent-icone {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 56px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--xs-encre);
	cursor: pointer;
	text-decoration: none;
}
.xs-tete .xs-ent-icone:hover,
.xs-tete .xs-ent-icone:focus-visible { color: var(--xs-orange); }
.xs-tete .xs-ent-icone:focus-visible { outline: 2px solid #ff6900; outline-offset: -6px; }
.xs-tete .xs-ent-ico { display: block; width: 28px; height: 28px; }
/* Logo au-dessus du panneau de recherche ouvert, comme en ligne. */
.xs-tete__logo { position: relative; z-index: 3; display: flex; align-items: center; flex: 0 0 auto; }
.xs-tete__nom { font-weight: 600; text-decoration: none; }
.xs-tete__nav { display: none; }
/* Menu : mêmes valeurs que l'en-tête en ligne (entete.css). Seuls les titres sont visés (> li > a), pas les liens des
 * hypermenus, qui gardent leurs propres styles. Trait orange au bas de la barre, sur la largeur du titre. */
.xs-tete__menu { display: flex; flex-wrap: nowrap; justify-content: flex-start; margin: 0; padding: 0; list-style: none; }
.xs-tete__menu > li { margin: 0 48px 0 0; }
.xs-tete__menu > li:last-child { margin-right: 0; }
.xs-tete__menu > li > a {
	display: flex;
	align-items: center;
	height: 56px;
	margin: 0;
	padding: 0;
	background: none;
	box-shadow: inset 0 -2px 0 transparent;
	color: #191919;
	font-family: var(--xs-police);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.25;
	letter-spacing: 0;
	text-decoration: none;
	text-transform: none;
	white-space: nowrap;
	transition: color .2s, box-shadow .2s;
}
.xs-tete__menu > li > a:hover,
.xs-tete__menu > li > a:focus-visible,
.xs-tete__menu > li.xs-hm-li-ouvert > a {
	box-shadow: inset 0 -2px 0 #ff6900;
	color: #ff6900;
}
.xs-tete__menu > li > a[aria-current="page"] { color: #ff6900; }
.xs-tete__menu > li > a:focus-visible { outline: none; }
.xs-tete__actions { display: flex; align-items: center; margin-left: auto; }
.xs-tete__panier { position: relative; }
/* Pastille du panier : bulle orange en haut à droite du pictogramme (28 px centré dans le bouton de 44 px). */
.xs-tete__nb {
	position: absolute;
	top: 9px;
	right: -2px;
	min-width: 18px;
	height: 16px;
	padding: 0 5px;
	border-radius: 8px 8px 0 8px;
	background: #ff6900;
	color: #fff;
	font-family: var(--xs-police);
	font-size: 11px;
	font-weight: 500;
	line-height: 16px;
	text-align: center;
	box-sizing: border-box;
}
.xs-tete__nb[hidden] { display: none; }

/* Recherche : panneau blanc sur toute la largeur, par-dessus l'en-tête (le logo reste visible), voile gris ; champ
 * arrondi avec loupe, « Nouveautés » ; mêmes valeurs que l'en-tête en ligne (entete.css). */
.xs-tete .xs-ent-voile { position: fixed; inset: 0; z-index: 1; background: rgba(153, 153, 153, .5); }
.xs-tete .xs-ent-rech {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: 2;
	padding: 72px 16px 40px;
	background: #fff;
	box-shadow: 0 6px 16px rgba(25, 25, 25, .06);
	text-align: left;
}
.xs-tete .xs-ent-rech__fermer { position: absolute; top: 0; right: 8px; }
.xs-tete .xs-ent-rech__in { max-width: 832px; margin: 0 auto; }
.xs-tete__form {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	height: 56px;
	margin: 0;
	border: 1px solid #e0e0e0;
	border-radius: 14px;
	background: #fff;
	box-sizing: border-box;
	transition: border-color .2s;
}
.xs-tete__form:focus-within { border-color: #ff6900; }
.xs-tete__form::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 18px;
	width: 24px;
	height: 24px;
	margin-top: -12px;
	background-color: #8c8c8c;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.6'/%3E%3Cpath d='M15.9 15.9l4.6 4.6'/%3E%3C/svg%3E") center / 24px 24px no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.6'/%3E%3Cpath d='M15.9 15.9l4.6 4.6'/%3E%3C/svg%3E") center / 24px 24px no-repeat;
	pointer-events: none;
}
.xs-tete__form input[type="search"] {
	width: 100%;
	height: 54px;
	margin: 0;
	padding: 0 20px 0 54px;
	flex: 1 1 auto;
	border: 0;
	border-radius: 14px;
	background: transparent;
	box-shadow: none;
	outline: 0;
	color: #191919;
	font-family: var(--xs-police);
	font-size: 18px;
	line-height: 54px;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}
.xs-tete__form input[type="search"]::placeholder { color: #8c8c8c; opacity: 1; }
.xs-tete__form input[type="search"]::-webkit-search-cancel-button,
.xs-tete__form input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.xs-tete .xs-ent-rech__liens { margin: 28px 0 0; padding: 0 20px; }
.xs-tete .xs-ent-rech__liens[hidden] { display: none; }
.xs-tete .xs-ent-rech__titre {
	margin: 0 0 8px;
	color: #898989;
	font-family: var(--xs-police);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.4;
}
.xs-tete .xs-ent-rech__liens ul { margin: 0; padding: 0; list-style: none; }
.xs-tete .xs-ent-rech__liens li { margin: 0; padding: 0; }
.xs-tete .xs-ent-rech__liens a {
	display: block;
	padding: 8px 0 8px 22px;
	color: #5f5f5f;
	font-family: var(--xs-police);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	text-decoration: none;
	transition: color .2s;
}
.xs-tete .xs-ent-rech__liens a:hover,
.xs-tete .xs-ent-rech__liens a:focus-visible { color: #ff6900; }

/* Suggestions pendant la frappe (socle.js), à la place de « Nouveautés ». */
.xs-tete__sugg { margin: 16px 0 0; }
.xs-tete__sugg[hidden] { display: none; }
.xs-tete__sugg ul { margin: 0; padding: 0; list-style: none; }
.xs-tete__sugg li { margin: 0; padding: 0; }
.xs-tete__sugg li a {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 8px 20px;
	border-radius: 12px;
	color: #191919;
	font-family: var(--xs-police);
	font-size: 16px;
	line-height: 1.4;
	text-decoration: none;
	transition: background-color .2s, color .2s;
}
.xs-tete__sugg li a:hover,
.xs-tete__sugg li a:focus-visible,
.xs-tete__sugg li a.xs-actif { background: #f5f5f5; color: #ff6900; }
.xs-tete__sugg-img { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 8px; background: #f5f5f5; object-fit: contain; }
.xs-tete__sugg-nom { flex: 1 1 auto; min-width: 0; }
.xs-tete__sugg-prix { flex: 0 0 auto; color: #191919; font-size: 15px; font-weight: 500; white-space: nowrap; }
.xs-tete__sugg-prix del { margin-right: 6px; color: #8c8c8c; font-size: 13px; font-weight: 400; }
.xs-tete__sugg-prix ins { text-decoration: none; }
.xs-tete__sugg-vide { margin: 8px 0 0; padding: 0 20px; color: #6b6b6b; font-size: 15px; }
.xs-tete__sugg-tout { display: inline-block; margin: 12px 0 0 20px; color: #ff6900; font-size: 15px; text-decoration: none; }
.xs-tete__sugg-tout:hover { text-decoration: underline; }

/* Téléphone : bouton de menu à gauche, logo, puis recherche et panier. */
.xs-tete__compte { display: none !important; }

@media (min-width: 1200px) {
	/* Barre comme en ligne : 1548 px au plus, marges de 24 px, menu à 48 px du logo, pictogrammes espacés de 32 px. */
	.xs-tete__in { gap: 0; max-width: 1548px; min-height: 56px; padding: 0 24px; }
	.xs-tete__burger { display: none !important; }
	.xs-tete__nav { display: block; min-width: 0; margin-left: 48px; flex: 1 1 auto; }
	.xs-tete__actions { gap: 32px; }
	.xs-tete__compte { display: inline-flex !important; }
	.xs-tete .xs-ent-rech { padding: 80px 24px 48px; }
	.xs-tete .xs-ent-rech__fermer { right: max(24px, calc((100% - 1500px) / 2)); }
	.xs-tete__form input[type="search"] { font-size: 20px; }
}

/* ---------- tiroir du téléphone ---------- */

.xs-tiroir[hidden] { display: none; }
.xs-tiroir { position: fixed; inset: 0; z-index: 100000; } /* au-dessus de la barre d'administration (99999) */
.xs-tiroir__voile { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); }
.xs-tiroir__panneau {
	position: absolute;
	top: 0;
	font-family: var(--xs-police);
	bottom: 0;
	left: 0;
	width: min(86vw, 360px);
	overflow-y: auto;
	padding: 0 24px 32px;
	background: #fff;
	box-sizing: border-box;
	animation: xs-tiroir-entree .2s ease-out;
}
@keyframes xs-tiroir-entree { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) {
	.xs-tiroir__panneau { animation: none; }
}
.xs-tiroir__haut { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.xs-tiroir__titre { font-size: 15px; color: var(--xs-gris); }
.xs-tiroir__menu,
.xs-tiroir__liens { margin: 0; padding: 0; list-style: none; }
.xs-tiroir__menu a {
	display: block;
	padding: 14px 0;
	border-bottom: 1px solid #eee;
	font-size: 18px;
	line-height: 24px;
	text-decoration: none;
}
.xs-tiroir__menu a[aria-current="page"] { color: var(--xs-orange); }
.xs-tiroir__liens { margin-top: 24px; }
.xs-tiroir__liens a { display: block; padding: 10px 0; color: var(--xs-gris); font-size: 15px; text-decoration: none; }
body.xs-tiroir-ouvert { overflow: hidden; }

/* ---------- pages ---------- */

body.xs-socle .site-main,
body.xs-socle .page-content { box-sizing: border-box; }
body.xs-socle:not(.elementor-page) .site-main {
	max-width: 1200px; /* conteneur de Besa : 1200 px, marges de 15 px */
	margin: 0 auto;
	padding: 32px 15px 64px;
}

/* titre de page écrit par le thème (pages hors Elementor, panier, compte) */
body.xs-socle .page-header { margin: 0 0 20px; }
body.xs-socle .page-header .entry-title {
	margin: 0;
	font-family: var(--xs-police);
	color: var(--xs-encre);
	font-size: 32px;
	font-weight: 600;
	line-height: 40px;
}

/* page de commande de Pilote : même largeur qu'avec Besa (1200 px), sans titre du thème */
body.xs-socle.xs-commande-mi .site-main,
body.xs-socle.xs-commande-merci .site-main {
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 16px 48px;
}
body.xs-socle.xs-commande-mi .page-header,
body.xs-socle.xs-commande-merci .page-header { display: none; }
/* commande « sans distraction » : logo seul en haut, ni bandeau ni pied de page complet */
body.xs-socle.xs-commande-simple .xs-bandeau,
body.xs-socle.xs-commande-simple .xs-pied { display: none !important; }
body.xs-socle.xs-commande-simple .xs-tete__burger,
body.xs-socle.xs-commande-simple .xs-tete__nav,
body.xs-socle.xs-commande-simple .xs-tete__actions { visibility: hidden; pointer-events: none; }

/* fiche produit et catalogue rendus par Pilote (templates/socle-produit.php, socle-catalogue.php), comme dans
   les sections Elementor pleine largeur des anciens modèles WooLentor */
body.xs-socle .site-main.xs-socle-fiche,
body.xs-socle .site-main.xs-socle-catalogue { max-width: none; margin: 0; padding: 0; }
body.xs-socle .site-main.xs-socle-catalogue { padding: 0 15px; }

/* page 404 de Pilote (templates/socle-404.php) */
body.xs-socle .site-main.xs-404 {
	max-width: 720px;
	font-family: var(--xs-police);
	color: var(--xs-encre);
	margin: 0 auto;
	padding: 72px 16px 96px;
	text-align: center;
}
.xs-404__code { margin: 0; color: var(--xs-orange); font-size: 72px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
body.xs-socle .xs-404__titre { margin: 16px 0 8px; font-size: 32px; font-weight: 600; line-height: 40px; }
.xs-404__texte { margin: 0 auto 28px; max-width: 480px; color: var(--xs-gris); font-size: 16px; line-height: 24px; }
.xs-404__recherche { display: flex; gap: 8px; max-width: 520px; margin: 0 auto 28px; }
.xs-404__recherche input[type="search"] {
	flex: 1;
	min-width: 0;
	height: 48px;
	padding: 0 16px;
	border: 1px solid #d4d4d4;
	border-radius: 8px;
	background: #fff;
	color: var(--xs-encre);
	font-size: 16px;
}
.xs-404__recherche input[type="search"]:focus { border-color: var(--xs-orange); outline: 0; box-shadow: 0 0 0 3px rgba(255, 105, 0, .15); }
body.xs-socle .xs-404__recherche button {
	height: 48px;
	padding: 0 22px;
	border: 0;
	border-radius: 8px;
	background: var(--xs-orange);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}
body.xs-socle .xs-404__recherche button:hover { background: #e65e00; }
.xs-404__rayons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.xs-404__rayons a {
	display: block;
	padding: 8px 16px;
	border: 1px solid #e0e0e0;
	border-radius: 999px;
	color: var(--xs-encre);
	font-size: 14px;
	line-height: 20px;
}
.xs-404__rayons a:hover { border-color: var(--xs-orange); color: var(--xs-orange); }
.xs-404__accueil a { color: var(--xs-orange); font-size: 15px; }

@media (max-width: 767px) {
	body.xs-socle .page-header .entry-title { font-size: 24px; line-height: 32px; }
	body.xs-socle.xs-commande-mi .site-main,
	body.xs-socle.xs-commande-merci .site-main { padding: 12px 12px 32px; }
	body.xs-socle .site-main.xs-404 { padding: 48px 16px 64px; }
	.xs-404__code { font-size: 56px; }
	body.xs-socle .xs-404__titre { font-size: 24px; line-height: 32px; }
}
body.xs-socle .woocommerce a.button,
body.xs-socle .woocommerce button.button,
body.xs-socle .woocommerce input.button,
body.xs-socle .woocommerce #respond input#submit {
	padding: 12px 24px;
	border-radius: 4px;
	background: var(--xs-orange);
	color: #fff;
	font-weight: 500;
}
body.xs-socle .woocommerce a.button:hover,
body.xs-socle .woocommerce button.button:hover { background: #e65e00; color: #fff; }
