/*
 * Boutique PcLanD — colonne latérale des pages Boutique / catégorie (maillage interne)
 * Même rendu que la colonne « guide » du thème alpha GeneratePress.
 * Chargé seulement sur les pages qui ont la colonne (body.pcl-colonne). PHP : inc/pcland-colonne-categorie.php
 */

body.pcl-colonne {
	--pcl-marine: #14275a;
	--pcl-bleu: #1f3a7d;
	--pcl-ambre: #ffb020;
	--pcl-ciel: #eaf1fb;
	--pcl-ciel-vif: #5bb4f5;
	--pcl-fond: #f5f8fd;
	--pcl-gris: #5b6577;
}

/* ---------- La colonne elle-même : plus de cadre bleu clair, les blocs ont chacun leur carte ---------- */
body.pcl-colonne #secondary.secondary {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
}

/* ---------- Enveloppe des widgets (on neutralise le style « widget » d'origine) ---------- */
body.pcl-colonne .sidebar .pcl-col-widget,
.pcl-col-widget {
	margin: 0 0 14px;
	padding: 0;
	border: 0;
	background: none;
}

.pcl-col-widget::before,
.pcl-col-widget::after {
	display: none;
}

/* ---------- Blocs ---------- */
.pcl-col-widget .pcl-cat__bloc {
	padding: 16px 16px 14px;
	border: 1px solid #e3e9f2;
	border-radius: 14px;
	background: #ffffff;
}

.pcl-col-widget .pcl-cat__titre {
	margin: 0 0 10px;
	padding: 0;
	border: 0;
	color: var(--pcl-marine);
	font-size: 13px;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.pcl-col-widget .pcl-cat__retour {
	display: inline-block;
	margin-bottom: 8px;
	color: var(--pcl-gris);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.pcl-col-widget .pcl-cat__retour:hover {
	color: var(--pcl-bleu);
}

.pcl-col-widget .pcl-cat__liste,
.pcl-col-widget .pcl-cat__guides,
.pcl-col-widget .pcl-cat__ventes {
	margin: 0;
	padding: 0;
	list-style: none;
}

.pcl-col-widget .pcl-cat__liste li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 8px;
}

.pcl-col-widget .pcl-cat__liste li::before {
	display: none;
}

.pcl-col-widget .pcl-cat__liste li > a,
.pcl-col-widget .pcl-cat__liste li > span {
	flex: 1 1 auto;
	padding: 7px 8px;
	color: #1d2433;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
}

.pcl-col-widget .pcl-cat__liste li small {
	flex: 0 0 auto;
	min-width: 26px;
	margin-right: 4px;
	padding: 2px 7px;
	border-radius: 999px;
	background: var(--pcl-ciel);
	color: var(--pcl-bleu);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
}

.pcl-col-widget .pcl-cat__liste li:hover {
	background: var(--pcl-fond);
}

.pcl-col-widget .pcl-cat__liste li > a:hover {
	color: var(--pcl-bleu);
}

.pcl-col-widget .pcl-cat__liste li.pcl-cat__actif {
	background: var(--pcl-ciel);
	box-shadow: inset 3px 0 0 var(--pcl-bleu);
}

.pcl-col-widget .pcl-cat__liste li.pcl-cat__actif > span {
	color: var(--pcl-marine);
	font-weight: 800;
}

/* Guides du blog */
.pcl-col-widget .pcl-cat__guides li {
	margin: 0;
	padding: 0;
	border: 0;
}

.pcl-col-widget .pcl-cat__guides li + li {
	border-top: 1px solid #edf1f7;
}

.pcl-col-widget .pcl-cat__guides a {
	position: relative;
	display: block;
	padding: 9px 0 9px 22px;
	color: var(--pcl-bleu);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none;
}

.pcl-col-widget .pcl-cat__guides a::before {
	content: "";
	position: absolute;
	top: 13px;
	left: 2px;
	width: 12px;
	height: 12px;
	border-radius: 3px;
	background: var(--pcl-ciel);
	box-shadow: inset 0 0 0 2px var(--pcl-ciel-vif);
}

.pcl-col-widget .pcl-cat__guides a:hover {
	text-decoration: underline;
}

/* Meilleures ventes */
.pcl-col-widget .pcl-cat__ventes li {
	margin: 0;
	padding: 0;
	border: 0;
}

.pcl-col-widget .pcl-cat__ventes li + li {
	margin-top: 8px;
}

.pcl-col-widget .pcl-cat__ventes a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px;
	border-radius: 10px;
	text-decoration: none;
}

.pcl-col-widget .pcl-cat__ventes a:hover {
	background: var(--pcl-fond);
}

.pcl-col-widget .pcl-cat__ventes img {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	margin: 0;
	border-radius: 8px;
	object-fit: contain;
	background: #f6f8fc;
}

.pcl-col-widget .pcl-cat__ventes span {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.pcl-col-widget .pcl-cat__ventes strong {
	display: -webkit-box;
	overflow: hidden;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	color: #1d2433;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
}

.pcl-col-widget .pcl-cat__ventes em {
	color: var(--pcl-marine);
	font-size: 14px;
	font-style: normal;
	font-weight: 800;
}

.pcl-col-widget .pcl-cat__ventes em {
	display: block;
	line-height: 1.3;
}

.pcl-col-widget .pcl-cat__ventes em * {
	display: inline !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	color: inherit !important;
	font-size: inherit !important;
	font-weight: inherit !important;
	line-height: inherit !important;
	white-space: nowrap;
}

.pcl-col-widget .pcl-cat__ventes em del,
.pcl-col-widget .pcl-cat__ventes em del * {
	margin-right: 6px !important;
	color: var(--pcl-gris) !important;
	font-size: 12px !important;
	font-weight: 500 !important;
}

.pcl-col-widget .pcl-cat__ventes em ins {
	text-decoration: none;
}

/* Réassurance */
.pcl-col-widget .pcl-cat__bloc--confiance {
	border: 0;
	background: linear-gradient(160deg, #1f3a7d 0%, var(--pcl-marine) 100%);
	color: #ffffff;
}

.pcl-col-widget .pcl-cat__bloc--confiance .pcl-cat__titre {
	color: #ffffff;
}

.pcl-col-widget .pcl-cat__bloc--confiance ul {
	display: grid;
	gap: 9px;
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

.pcl-col-widget .pcl-cat__bloc--confiance li {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	padding: 0;
	border: 0;
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
}

.pcl-col-widget .pcl-col-icone {
	flex: 0 0 auto;
	color: var(--pcl-ambre);
}

.pcl-col-widget .pcl-cat__aide {
	display: block;
	padding: 9px 12px;
	border-radius: 10px;
	background: rgba(255, 255, 255, .1);
	color: #ffffff;
	font-size: 13px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
}

.pcl-col-widget .pcl-cat__aide:hover,
.pcl-col-widget .pcl-cat__aide:focus {
	background: rgba(255, 255, 255, .18);
	color: #ffffff;
}

/* ---------- Ordinateur (1 200 px et plus) : la zone des produits garde sa largeur actuelle,
   la colonne (290 px) se place dans la marge et suit le défilement ---------- */
@media (min-width: 1200px) {
	body.pcl-colonne #content.site-content.container {
		width: auto;
		max-width: 1530px;
		padding-left: 36px;
		padding-right: 36px;
	}

	body.pcl-colonne #content.site-content > .row {
		display: flex;
		align-items: stretch;
	}

	body.pcl-colonne #content.site-content > .row::before,
	body.pcl-colonne #content.site-content > .row::after {
		display: none;
	}

	body.pcl-colonne #content.site-content > .row > .content-area {
		left: auto;
		right: auto;
		flex: 1 1 auto;
		width: auto;
		min-width: 0;
		float: none;
	}

	body.pcl-colonne #content.site-content > .row > .sidebar {
		left: auto;
		right: auto;
		flex: 0 0 320px;
		width: 320px;
		float: none;
	}

	body.pcl-colonne--gauche #content.site-content > .row > .sidebar {
		order: -1;
	}

	/* La colonne suit le défilement ; si elle est plus haute que l'écran, elle défile à l'intérieur. */
	body.pcl-colonne #content.site-content > .row > .sidebar > .secondary {
		position: sticky;
		top: calc(var(--pcl-col-haut, 0px) + 16px);
		max-height: calc(100vh - var(--pcl-col-haut, 0px) - 32px);
		overflow-y: auto;
		overscroll-behavior: contain;
		scrollbar-width: thin;
		scrollbar-color: #c7d3e6 transparent;
		transition: top .2s ease;
	}

	body.pcl-colonne .sidebar > .secondary::-webkit-scrollbar {
		width: 6px;
	}

	body.pcl-colonne .sidebar > .secondary::-webkit-scrollbar-thumb {
		border-radius: 6px;
		background: #c7d3e6;
	}

	/* Les widgets s'empilent sur toute la largeur de la colonne. */
	body.pcl-colonne .sidebar > .secondary > [class*="col-"] {
		float: none;
		width: auto;
		padding-left: 0;
		padding-right: 0;
	}
}

/* ---------- Tablette et mobile (moins de 1 200 px) : la colonne passe sous les produits, en grille ---------- */
@media (max-width: 1199px) {
	body.pcl-colonne .sidebar > .secondary {
		display: flex;
		flex-wrap: wrap;
		margin: 24px -8px 0;
	}

	body.pcl-colonne .sidebar > .secondary > [class*="col-"] {
		float: none;
		flex: 1 1 300px;
		width: auto;
		padding-left: 8px;
		padding-right: 8px;
	}

	body.pcl-colonne .sidebar > .secondary > [class*="col-"] > .pcl-col-widget {
		height: calc(100% - 14px);
	}

	body.pcl-colonne .sidebar > .secondary > [class*="col-"] > .pcl-col-widget > .pcl-cat__bloc {
		height: 100%;
	}
}

/* Badge latéral de la Société des Avis Garantis (collé au bord gauche) : quand la colonne arrive jusqu'au bord,
   il descend en bas à gauche, plus petit, pour ne pas la recouvrir. */
@media (min-width: 1200px) and (max-width: 1699px) {
	body.pcl-colonne--gauche #agWidgetSide,
	body.pcl-colonne--gauche [id^="agWidgetSide"] {
		top: auto !important;
		bottom: 90px !important;
		transform: scale(.7) !important;
		transform-origin: left bottom !important;
	}
}

/* ---------- Mobile : panneau du bas (bouton « Rayons » de la barre de tri) ---------- */
.pcl-sheet--bottom #sidebar .widget.pcl-col-widget {
	margin: 0 0 12px !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
}

.pcl-sheet--bottom #sidebar .secondary {
	display: block;
	margin: 0;
}

.pcl-sheet--bottom #sidebar .secondary > [class*="col-"] {
	float: none;
	width: auto;
	padding: 0;
}
