/* ECG — En-tête maison « Écrin Collector »
   Source : ecg-shop-projet/site/mu-plugins/ecg-entete.css (déployé dans wp-content/mu-plugins/).
   Reprend la maquette docs/refonte/maquette-accueil.html. Or réservé à l'accent : bouton recherche, pastille panier, survols, filet du bouton catégories, point et icône Coffrets. */

/* =========================================================================
   0. Correctif global des liens
   Le CSS additionnel dore tous les liens (a{color:#C9A24B}). Ici : texte clair, or au survol.
   Sélecteurs à faible spécificité (body a) : tout ce qui a une classe (boutons, prix) garde son style.
   Les prix (.price, .woocommerce-Price-amount) et boutons (.button…) ont des !important : intacts.
   ========================================================================= */
body {
	--theme-link-initial-color: #F2F0EB;
	--theme-link-hover-color: #E3C877;
}
body a { color: #F2F0EB; }
body a:hover,
body a:focus-visible { color: #E3C877; }
/* Liens dans le texte courant : on garde un repère or discret (filet souligné). */
body .entry-content p a:not(.button):not(.wp-element-button),
body .term-description a,
body .woocommerce-product-details__short-description a {
	color: #F2F0EB;
	text-decoration: underline;
	text-decoration-color: #C9A24B;
	text-underline-offset: 3px;
}
body .entry-content p a:not(.button):not(.wp-element-button):hover { color: #E3C877; }

/* =========================================================================
   1. Socle de l'en-tête
   ========================================================================= */
#header {
	position: relative;
	z-index: 9990;
	background: #0E0F13;
}
.ecg-entete {
	--e-fond: #0E0F13;
	--e-fond-r2: #101116;
	--e-carte: #16181F;
	--e-carte-2: #1E212B;
	--e-texte: #F2F0EB;
	--e-texte-2: #A0A2AD;
	--e-bord: #2A2D37;
	--e-or: #C9A24B;
	--e-or-clair: #E3C877;
	position: relative;
	background: var(--e-fond);
	color: var(--e-texte);
	font: 400 14px/1.5 "Inter", sans-serif;
}
.ecg-entete *,
.ecg-tiroir *,
.ecg-tiroir { box-sizing: border-box; }
.ecg-entete ul,
.ecg-tiroir ul { list-style: none; margin: 0; padding: 0; }
.ecg-entete a,
.ecg-tiroir a { text-decoration: none; }
.ecg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ecg-ico {
	display: block;
	width: 20px;
	height: 20px;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.ecg-boite {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 20px;
}
.ecg-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}
.ecg-entete a:focus-visible,
.ecg-entete button:focus-visible,
.ecg-tiroir a:focus-visible,
.ecg-tiroir button:focus-visible,
.ecg-tiroir summary:focus-visible {
	outline: 2px solid #E3C877;
	outline-offset: 2px;
}

/* =========================================================================
   2. Bandeau utilitaire (34 px)
   ========================================================================= */
.ecg-utilitaire {
	border-bottom: 1px solid var(--e-bord);
	font-size: 12.5px;
	color: var(--e-texte-2);
}
.ecg-utilitaire .ecg-boite {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 34px;
	gap: 20px;
}
.ecg-utilitaire .ecg-msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ecg-msg-court { display: none; }
.ecg-utiles { display: flex; gap: 22px; }
#header .ecg-utiles a { color: var(--e-texte-2); }
#header .ecg-utiles a:hover { color: var(--e-texte); }

/* =========================================================================
   3. Rangée 1 (84 px, collante à 64 px)
   ========================================================================= */
.ecg-r1-place { height: 84px; }
.ecg-r1 { background: var(--e-fond); }
.ecg-r1-grille {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	grid-template-areas: "logo recherche actions";
	gap: 36px;
	align-items: center;
	height: 84px;
	transition: height .2s ease;
}
#header .ecg-burger { display: none; }

/* Logo */
#header .ecg-logo {
	grid-area: logo;
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--e-texte);
	min-width: 0;
}
.ecg-logo-marque {
	width: 44px; height: 44px;
	flex: none;
	border: 1.5px solid var(--e-or);
	border-radius: 10px;
	display: grid;
	place-items: center;
	font: 700 15px "Space Grotesk", sans-serif;
	letter-spacing: .04em;
	color: var(--e-texte);
}
.ecg-logo-textes { display: flex; flex-direction: column; min-width: 0; }
.ecg-logo-nom { font: 700 19px/1.1 "Space Grotesk", sans-serif; letter-spacing: .02em; color: var(--e-texte); }
.ecg-logo-base {
	font-size: 11px;
	line-height: 1.5;
	color: var(--e-texte-2);
	letter-spacing: .14em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* Recherche (formulaire WooCommerce natif : ?s=…&post_type=product) */
#header .ecg-recherche {
	grid-area: recherche;
	display: flex;
	height: 50px;
	margin: 0;
	background: var(--e-carte);
	border: 1px solid var(--e-bord);
	border-radius: 12px;
	overflow: hidden;
	min-width: 0;
}
#header .ecg-recherche:focus-within { border-color: var(--e-or); }
#header .ecg-recherche input[type="search"] {
	-webkit-appearance: none;
	appearance: none;
	flex: 1;
	min-width: 0;
	width: auto;
	height: 100%;
	min-height: 0;
	margin: 0;
	padding: 0 16px;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	outline: 0;
	color: var(--e-texte);
	font: 400 15px "Inter", sans-serif;
}
#header .ecg-recherche input[type="search"]::placeholder { color: #6E717D; opacity: 1; }
#header .ecg-recherche button {
	width: 58px;
	min-height: 0;
	height: 100%;
	flex: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: var(--e-or);
	color: var(--e-fond);
	display: grid;
	place-items: center;
	cursor: pointer;
}
#header .ecg-recherche button:hover { background: var(--e-or-clair); }
#header .ecg-recherche button:focus-visible { outline-offset: -3px; outline-color: #0E0F13; }

/* Compte / panier */
.ecg-actions { grid-area: actions; display: flex; gap: 26px; }
#header .ecg-action {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	line-height: 1.25;
	color: var(--e-texte-2);
	white-space: nowrap;
}
#header .ecg-action b {
	display: block;
	color: var(--e-texte);
	font: 600 13.5px "Inter", sans-serif;
}
.ecg-rond {
	position: relative;
	width: 42px; height: 42px;
	border: 1px solid var(--e-bord);
	border-radius: 50%;
	display: grid;
	place-items: center;
	color: var(--e-texte);
	transition: border-color .15s, color .15s;
}
#header .ecg-action:hover .ecg-rond { border-color: var(--e-or); color: var(--e-or-clair); }
#header .ecg-action:hover b { color: var(--e-or-clair); }
.ecg-panier-pastille {
	position: absolute;
	top: -4px; right: -4px;
	min-width: 18px; height: 18px;
	padding: 0 4px;
	border-radius: 9px;
	background: var(--e-or);
	color: var(--e-fond);
	font: 600 11px/18px "Inter", sans-serif;
	text-align: center;
}
.ecg-panier-pastille.ecg-vide { display: none; }

/* État collant (classe posée par ecg-entete.js) */
.ecg-r1.ecg-colle {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	left: 0; right: 0;
	z-index: 9990;
	border-bottom: 1px solid var(--e-bord);
	box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
	animation: ecg-glisse .2s ease;
}
.ecg-r1.ecg-colle .ecg-r1-grille { height: 64px; }
.ecg-r1.ecg-colle #ecg-recherche-champ { font-size: 14px; }
#header .ecg-r1.ecg-colle .ecg-recherche { height: 44px; }
@keyframes ecg-glisse { from { transform: translateY(-100%); } to { transform: none; } }

/* =========================================================================
   4. Rangée 2 (52 px)
   ========================================================================= */
.ecg-r2 {
	border-top: 1px solid var(--e-bord);
	border-bottom: 1px solid var(--e-bord);
	background: var(--e-fond-r2);
}
.ecg-r2-grille { display: flex; align-items: center; height: 52px; gap: 6px; }
#header .ecg-btn-cat {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: none;
	height: 52px;
	min-height: 0;
	margin: 0 14px 0 0;
	padding: 0 20px;
	background: var(--e-carte-2);
	border: 0;
	border-left: 1px solid var(--e-bord);
	border-right: 1px solid var(--e-bord);
	border-bottom: 2px solid var(--e-or);
	border-radius: 0;
	box-shadow: none;
	color: var(--e-texte);
	font: 600 14px "Space Grotesk", sans-serif;
	letter-spacing: .02em;
	cursor: pointer;
}
#header .ecg-btn-cat .ecg-ico { color: var(--e-or); }
#header .ecg-btn-cat:hover,
#header .ecg-btn-cat[aria-expanded="true"] { background: #252935; }
.ecg-rayons {
	display: flex;
	flex: 1;
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
}
.ecg-rayons::-webkit-scrollbar { display: none; }
#header .ecg-rayons a {
	padding: 0 14px;
	height: 52px;
	display: flex;
	align-items: center;
	white-space: nowrap;
	font: 500 14px "Inter", sans-serif;
	color: var(--e-texte);
}
#header .ecg-rayons a:hover { color: var(--e-or-clair); }
#header .ecg-rayons a.ecg-coffrets::before {
	content: "";
	width: 6px; height: 6px;
	flex: none;
	border-radius: 50%;
	background: var(--e-or);
	margin-right: 8px;
}
.ecg-liens-droite { display: flex; gap: 20px; flex: none; font-size: 13px; }
#header .ecg-liens-droite a { color: var(--e-texte-2); }
#header .ecg-liens-droite a:hover { color: var(--e-texte); }

/* =========================================================================
   5. Méga-menu (se superpose au contenu)
   ========================================================================= */
.ecg-mega {
	position: absolute;
	left: 0; right: 0;
	top: 100%;
	z-index: 9980;
	background: var(--e-carte);
	border-bottom: 1px solid var(--e-bord);
	box-shadow: 0 24px 40px rgba(0, 0, 0, .45);
}
.ecg-mega[hidden] { display: none !important; }
.ecg-mega-grille {
	display: grid;
	grid-template-columns: repeat(var(--ecg-cols, 4), minmax(0, 1fr));
	gap: 28px;
	padding-top: 26px;
	padding-bottom: 28px;
}
.ecg-mega.ecg-avec-vedette .ecg-mega-grille {
	grid-template-columns: repeat(var(--ecg-cols, 4), minmax(0, 1fr)) 300px;
}
.ecg-groupe + .ecg-groupe { margin-top: 22px; }
#header .ecg-groupe-titre {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--e-bord);
	font: 600 15px "Space Grotesk", sans-serif;
	letter-spacing: -.01em;
	color: var(--e-texte);
}
#header .ecg-groupe-titre .ecg-ico { color: var(--e-texte-2); }
#header .ecg-groupe-titre:hover { color: var(--e-or-clair); }
#header .ecg-groupe-coffrets .ecg-groupe-titre .ecg-ico { color: var(--e-or); }
#header .ecg-mega li a {
	display: block;
	padding: 5px 0;
	color: var(--e-texte-2);
	font-size: 13.5px;
}
#header .ecg-mega li a:hover { color: var(--e-texte); }
#header .ecg-mega li.ecg-tout a { color: var(--e-texte); font-weight: 500; }
#header .ecg-mega li.ecg-tout a:hover { color: var(--e-or-clair); }

/* Carte vedette (bureau et panneau mobile) */
.ecg-vedette {
	background: linear-gradient(160deg, #23262F 0%, #14151B 100%);
	border: 1px solid var(--e-bord, #2A2D37);
	border-radius: 14px;
	padding: 18px;
	display: flex;
	flex-direction: column;
	color: #F2F0EB;
	transition: border-color .15s;
}
#header .ecg-vedette,
body .ecg-tiroir .ecg-vedette { color: #F2F0EB; }
#header .ecg-vedette:hover,
body .ecg-tiroir .ecg-vedette:hover { border-color: #C9A24B; color: #F2F0EB; }
.ecg-vedette-visuel {
	height: 110px;
	border-radius: 10px;
	background: #0E0F13;
	display: grid;
	place-items: center;
	margin-bottom: 14px;
	color: #C9A24B;
}
.ecg-ico-grand {
	width: 64px; height: 64px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.2;
	stroke-linejoin: round;
	stroke-linecap: round;
}
.ecg-vedette small {
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #A0A2AD;
}
.ecg-vedette-titre { font: 600 17px/1.3 "Space Grotesk", sans-serif; margin: 2px 0 4px; }
.ecg-vedette-texte { font-size: 12.5px; line-height: 1.5; color: #A0A2AD; margin-bottom: 12px; }
.ecg-vedette-bas { display: flex; justify-content: flex-end; align-items: center; margin-top: auto; }
.ecg-btn-petit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 36px;
	padding: 0 14px;
	border-radius: 10px;
	background: #C9A24B;
	color: #0E0F13;
	font: 600 13px "Space Grotesk", sans-serif;
	letter-spacing: .02em;
}
.ecg-vedette:hover .ecg-btn-petit { background: #E3C877; }

/* =========================================================================
   6. Panneau latéral mobile
   ========================================================================= */
.ecg-voile {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, .6);
}
.ecg-voile[hidden],
.ecg-tiroir[hidden] { display: none !important; }
.ecg-tiroir {
	position: fixed;
	top: 0; bottom: 0; left: 0;
	z-index: 100001;
	width: min(340px, 88vw);
	overflow-y: auto;
	overscroll-behavior: contain;
	background: #0E0F13;
	border-right: 1px solid #2A2D37;
	color: #F2F0EB;
	font: 400 14px/1.5 "Inter", sans-serif;
	padding-bottom: 24px;
	animation: ecg-entre .2s ease;
}
@keyframes ecg-entre { from { transform: translateX(-100%); } to { transform: none; } }
.ecg-tiroir-tete {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 60px;
	padding: 0 8px 0 18px;
	border-bottom: 1px solid #2A2D37;
}
.ecg-tiroir-titre { font: 600 16px "Space Grotesk", sans-serif; }
body .ecg-tiroir .ecg-tiroir-fermer {
	width: 44px; height: 44px;
	min-height: 0;
	margin: 0; padding: 0;
	display: grid;
	place-items: center;
	background: transparent;
	border: 0;
	border-radius: 10px;
	box-shadow: none;
	color: #F2F0EB;
	cursor: pointer;
}
.ecg-tiroir-nav { padding: 6px 0; border-bottom: 1px solid #2A2D37; }
body .ecg-tiroir .ecg-tiroir-rayon {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 50px;
	padding: 0 18px;
	color: #F2F0EB;
	font: 600 15px "Space Grotesk", sans-serif;
	cursor: pointer;
	list-style: none;
}
.ecg-tiroir-rayon::-webkit-details-marker { display: none; }
body .ecg-tiroir .ecg-tiroir-rayon .ecg-ico { color: #A0A2AD; }
body .ecg-tiroir .ecg-groupe-coffrets .ecg-tiroir-rayon .ecg-ico:first-child { color: #C9A24B; }
body .ecg-tiroir .ecg-tiroir-rayon .ecg-chevron { margin-left: auto; width: 18px; height: 18px; transition: transform .15s; }
.ecg-tiroir-groupe[open] .ecg-chevron { transform: rotate(180deg); }
.ecg-tiroir-groupe ul { padding: 0 18px 10px 50px; }
body .ecg-tiroir .ecg-tiroir-groupe li a {
	display: block;
	padding: 8px 0;
	color: #A0A2AD;
	font-size: 14px;
}
body .ecg-tiroir .ecg-tiroir-groupe li.ecg-tout a { color: #F2F0EB; font-weight: 500; }
.ecg-tiroir-liens { padding: 8px 0; }
body .ecg-tiroir .ecg-tiroir-liens a {
	display: block;
	padding: 11px 18px;
	color: #F2F0EB;
	font-size: 14px;
}
body .ecg-tiroir a:hover { color: #E3C877; }
.ecg-tiroir-vedette { padding: 8px 18px 0; }
html.ecg-tiroir-ouvert,
html.ecg-tiroir-ouvert body { overflow: hidden; }

/* Bureau étroit : on resserre les rayons pour qu'ils tiennent sur une ligne. */
@media (max-width: 1239.98px) {
	#header .ecg-rayons a { padding: 0 9px; font-size: 13.5px; }
	#header .ecg-btn-cat { padding: 0 16px; margin-right: 8px; }
	.ecg-r1-grille { gap: 24px; }
}

/* =========================================================================
   7. Mobile et tablette (moins de 1000 px)
   ========================================================================= */
@media (max-width: 999.98px) {
	.ecg-boite { padding: 0 16px; }

	.ecg-utilitaire .ecg-boite { justify-content: center; height: 32px; }
	.ecg-utiles,
	.ecg-msg-long { display: none; }
	.ecg-msg-court { display: inline; }

	.ecg-r1-place { height: 116px; }
	.ecg-r1-grille {
		grid-template-columns: 44px minmax(0, 1fr) auto;
		grid-template-areas:
			"burger logo actions"
			"recherche recherche recherche";
		grid-template-rows: 60px 56px;
		column-gap: 10px;
		row-gap: 0;
		height: 116px;
	}
	#header .ecg-burger {
		grid-area: burger;
		display: grid;
		place-items: center;
		width: 44px; height: 44px;
		min-height: 0;
		margin: 0; padding: 0;
		background: transparent;
		border: 1px solid var(--e-bord);
		border-radius: 10px;
		box-shadow: none;
		color: var(--e-texte);
		cursor: pointer;
	}
	#header .ecg-logo { justify-content: center; gap: 10px; }
	.ecg-logo-marque { width: 36px; height: 36px; font-size: 13px; border-radius: 9px; }
	.ecg-logo-nom { font-size: 17px; }
	.ecg-logo-base { display: none; }
	#header .ecg-recherche { height: 44px; align-self: start; margin-top: 2px; }
	#header .ecg-recherche button { width: 48px; }
	.ecg-actions { gap: 8px; }
	.ecg-action-txt { display: none; }
	.ecg-rond { width: 40px; height: 40px; }

	/* Pas de barre de rayons ni de méga-menu : tout passe par le panneau latéral. */
	.ecg-r2,
	.ecg-mega { display: none !important; }

	/* Collant sur mobile : seule la ligne logo / compte / panier, la recherche reste dans la page. */
	.ecg-r1.ecg-colle .ecg-r1-grille { height: 60px; grid-template-rows: 60px; }
	#header .ecg-r1.ecg-colle .ecg-recherche { display: none; }
}
@media (max-width: 600px) {
	/* La barre d'administration WordPress n'est plus fixe sous 600 px. */
	.ecg-r1.ecg-colle { top: 0; }
}
@media (max-width: 360px) {
	.ecg-logo-marque { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.ecg-r1.ecg-colle,
	.ecg-tiroir { animation: none; }
	.ecg-r1-grille { transition: none; }
}

/* ============================================================
   Pages boutique (correctifs 12/11/2026, d'après la capture de Michel)
   ============================================================ */

/* Bandeau de titre Blocksy (« Shop », nom du rayon) : fond sombre, plus compact. */
.hero-section,
.hero-section[data-type="type-2"] {
	background-color: #0E0F13 !important;
	background-image: none !important;
	--container-padding: 0;
	min-height: 0 !important;
	padding-block: 28px 8px !important;
}
.hero-section .entry-header {
	background: transparent !important;
	min-height: 0 !important;
	height: auto !important;
	padding-block: 12px !important;
}

/* Photos produit entières : pas de recadrage, fond blanc uniforme comme chez les grands. */
ul.products li.product .ct-media-container,
ul.products li.product .ct-image-container {
	aspect-ratio: 1 / 1;
	background: #FFFFFF;
	border-radius: 10px;
	overflow: hidden;
}
ul.products li.product .ct-media-container img,
ul.products li.product .ct-image-container img,
ul.products li.product img.attachment-woocommerce_thumbnail {
	width: 100% !important;
	height: 100% !important;
	aspect-ratio: 1 / 1;
	object-fit: contain !important;
	padding: 8px;
	box-sizing: border-box;
}

/* Logo E-CG + SHOP (SVG, 12/11/2026) */
#header .ecg-logo .ecg-logo-svg { display: block; height: 52px; width: auto; }
@media (max-width: 900px) {
	#header .ecg-logo .ecg-logo-svg { height: 42px; }
}

/* 13/11 : avec le rayon « Composants PC », la barre déborde sous 1440 px -> on resserre plus tôt. */
@media (max-width: 1439.98px) {
	#header .ecg-rayons a { padding: 0 10px; font-size: 13.5px; }
	.ecg-liens-droite { gap: 14px; }
}
@media (max-width: 1239.98px) {
	#header .ecg-rayons a { padding: 0 7px; font-size: 13px; }
}

/* 13/11 (bis) : 10 rayons depuis « Claviers » -> encore plus serré sous 1440 px. */
@media (max-width: 1439.98px) {
	#header .ecg-rayons a { padding: 0 7px; font-size: 13px; }
	#header .ecg-btn-cat { padding: 0 14px; margin-right: 6px; }
}
@media (max-width: 1299.98px) {
	#header .ecg-rayons a { padding: 0 5px; font-size: 12.5px; }
	.ecg-liens-droite { display: none; }
}
