/* ==========================================================================
   Barre de Filtrage Page Réalisation
   ========================================================================== */

.hd-vp-filters {
  --hd-border: #d9d9d9;
  --hd-border-hover: #bcbcbc;
  --hd-bg: #ffffff;
  --hd-text: var(--theme-palette-color-3);
  --hd-muted: #6f6f6f;
  --hd-soft: #f6f6f6;
  --hd-shadow: 0 10px 30px rgba(0,0,0,0.08);
  --hd-radius: 18px;
  --hd-radius-sm: 14px;

  margin: 24px 0 36px;

  display: flex;
  align-items: stretch;
  gap: 16px;
}

/* ==========================================================================
   Bouton "Tout afficher"
   ========================================================================== */

.hd-vp-filters__top {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  margin-bottom: 0;
  flex: 0 0 auto;
}

.hd-vp-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  padding: 0 22px;
  border: 1px solid var(--hd-border);
  border-radius: var(--hd-radius);
  background: var(--hd-bg);
  color: var(--hd-text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.hd-vp-reset:hover {
  border-color: var(--hd-border-hover);
  transform: translateY(-1px);
}
 

.hd-vp-reset.is-active {
  background: var(--theme-headings-color);
  color: #fff;
  border-color: var(--theme-headings-color);
}

/* ==========================================================================
   Grille des faux selects
   ========================================================================== */

.hd-vp-filters__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  flex: 1;
}

.hd-vp-filter {
  position: relative;
  min-width: 0;
}

.hd-vp-filter__toggle {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--hd-border);
  border-radius: var(--hd-radius);
  background: var(--hd-bg);
  color: var(--hd-text);
  cursor: pointer;
  text-align: left;
  box-shadow: none;
  transition: all 0.2s ease;
}

.hd-vp-filter__toggle:hover {
  border-color: var(--hd-border-hover);
  transform: translateY(-1px);
}

.hd-vp-filter.is-open .hd-vp-filter__toggle {
  border-color: var(--hd-text);
  box-shadow: var(--hd-shadow);
}

.hd-vp-filter__label {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  font-size: 0.8rem;
  line-height: 1.2;
  color: var(--hd-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hd-vp-filter__value {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 600;
  color: var(--hd-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hd-vp-filter__chevron {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  width: 12px;
  height: 12px;
  position: relative;
}

.hd-vp-filter__chevron::before {
  content: "";
  position: absolute;
  inset: 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.hd-vp-filter.is-open .hd-vp-filter__chevron::before {
  transform: rotate(-135deg);
}

/* ==========================================================================
   Menu déroulant
   ========================================================================== */

.hd-vp-filter__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 50;
  padding: 8px;
  border: 1px solid var(--hd-border);
  border-radius: var(--hd-radius);
  background: var(--hd-bg);
  box-shadow: var(--hd-shadow);
}

.hd-vp-filter__list {
  display: grid;
  gap: 6px;
  max-height: 340px;
  overflow: auto;
  padding-right: 2px;
}

.hd-vp-filter__option {
	display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 9px 12px;
    border-radius: var(--hd-radius-sm);
    color: var(--hd-text);
    text-decoration: none;

    line-height: 1.05;

  transition: background 0.2s ease, color 0.2s ease;
}

.hd-vp-filter__option:hover {
  background: var(--hd-soft);
}

.hd-vp-filter__option.is-active {
  background: var(--hd-text);
  color: #fff;
}

.hd-vp-filter__option-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hd-vp-filter__option-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--hd-soft);
  color: var(--hd-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.hd-vp-filter__option.is-active .hd-vp-filter__option-count {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

/* ==========================================================================
   Scrollbar menu
   ========================================================================== */

.hd-vp-filter__list::-webkit-scrollbar {
  width: 6px;
}

.hd-vp-filter__list::-webkit-scrollbar-track {
  background: transparent;
}

.hd-vp-filter__list::-webkit-scrollbar-thumb {
  background: var(--hd-border);
  border-radius: 999px;
}

.hd-vp-filter__list::-webkit-scrollbar-thumb:hover {
  background: var(--hd-border-hover);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  .hd-vp-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin: 20px 0 30px;
  }

  .hd-vp-filters__top,
  .hd-vp-filters__grid {
    width: 100%;
  }

  .hd-vp-filters__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hd-vp-reset {
    width: 100%;
    min-height: 54px;
    border-radius: 16px;
  }

  .hd-vp-filter__toggle {
    min-height: 58px;
    border-radius: 16px;
  }

  .hd-vp-filter__menu {
    position: static;
    margin-top: 8px;
    border-radius: 16px;
  }
}






/* ==========================================================================
   FILTRES VISUAL PORTFOLIO — STYLE HARD DÉCO
   ========================================================================== */

.hd-vp-filters {
	--hd-filter-navy: var(--theme-headings-color, #30465f);
	--hd-filter-cyan: var(--theme-palette-color-1, #20b9d7);
	--hd-filter-text: var(--theme-text-color, #587087);
	--hd-filter-border: #d8e0e6;
	--hd-filter-soft: #f3f6f8;

	position: relative;
	display: flex;
	align-items: stretch;
	gap: 12px;
	margin: 24px 0 40px;
	padding: 18px;
	 
	 
	background: var(--hd-filter-soft);
}

/* Tout afficher */

.hd-vp-filters__top {
	display: flex;
	flex: 0 0 auto;
	margin: 0;
}

.hd-vp-reset {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 66px;
	padding: 0 24px;
	border: 1px solid var(--hd-filter-border);
	border-radius: 4px;
	background: #fff;
	color: var(--hd-filter-navy);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	transition:
		color 180ms ease,
		border-color 180ms ease,
		background-color 180ms ease;
}

.hd-vp-reset:hover {
	border-color: var(--hd-filter-cyan);
	color: var(--hd-filter-cyan);
	transform: none;
}

.hd-vp-reset.is-active {
	border-color: var(--hd-filter-navy);
	background: var(--hd-filter-navy);
	color: #fff;
}

/* Colonnes */

.hd-vp-filters__grid {
	display: grid;
	flex: 1;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.hd-vp-filter {
	position: relative;
	min-width: 0;
}

/* Bouton du filtre */

.hd-vp-filter__toggle {
	position: relative;
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-rows: auto auto;
	align-items: center;
	gap: 4px 15px;
	width: 100%;
	min-height: 66px;
	padding: 12px 18px 12px 21px;
	overflow: hidden;
	border: 1px solid var(--hd-filter-border);
	border-radius: 4px;
	background: #fff;
	color: var(--hd-filter-navy);
	box-shadow: none;
	text-align: left;
	cursor: pointer;
	transition:
		border-color 180ms ease,
		background-color 180ms ease;
}

/* Signature cyan */

.hd-vp-filter__toggle::before {
	position: absolute;
	top: 13px;
	bottom: 13px;
	left: 0;
	width: 3px;
	background: var(--hd-filter-cyan);
	content: "";
}

.hd-vp-filter__toggle:hover {
	border-color: #afbec9;
	transform: none;
}

.hd-vp-filter.is-open .hd-vp-filter__toggle {
	border-color: var(--hd-filter-navy);
	background: #fff;
	box-shadow: 0 8px 20px rgb(48 70 95 / 8%);
}

.hd-vp-filter__label {
	grid-column: 1;
	grid-row: 1;
	color: var(--hd-filter-cyan);
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.hd-vp-filter__value {
	grid-column: 1;
	grid-row: 2;
	overflow: hidden;
	color: var(--hd-filter-navy);
	font-size: 1rem;
	font-weight: 650;
	line-height: 1.3;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hd-vp-filter__chevron {
	color: var(--hd-filter-cyan);
}

/* Menu */

.hd-vp-filter__menu {
	top: calc(100% + 7px);
	padding: 7px;
	border: 1px solid var(--hd-filter-border);
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 14px 30px rgb(48 70 95 / 12%);
}

.hd-vp-filter__list {
	gap: 3px;
}

.hd-vp-filter__option {
	position: relative;
	padding: 10px 13px;
	border-radius: 2px;
	color: var(--hd-filter-navy);
	line-height: 1.25;
}

.hd-vp-filter__option:hover {
	background: var(--hd-filter-soft);
}

.hd-vp-filter__option.is-active {
	padding-left: 17px;
	background: var(--hd-filter-navy);
	color: #fff;
}

.hd-vp-filter__option.is-active::before {
	position: absolute;
	top: 8px;
	bottom: 8px;
	left: 6px;
	width: 3px;
	background: var(--hd-filter-cyan);
	content: "";
}

/* Mobile */

@media (max-width: 768px) {
	.hd-vp-filters {
		flex-direction: column;
		gap: 10px;
		padding: 14px;
		margin: 20px 0 30px;
	}

	.hd-vp-filters__top,
	.hd-vp-filters__grid {
		width: 100%;
	}

	.hd-vp-filters__grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.hd-vp-reset {
		width: 100%;
		min-height: 52px;
	}

	.hd-vp-filter__toggle {
		min-height: 60px;
	}

	.hd-vp-filter__menu {
		position: static;
		margin-top: 7px;
	}
}
