/* Envie en Vue — Boîte à idées alpha85
   Refonte ciblée du haut de page, sans modifier les cartes d'idées ni les filtres métier. */

.library-alpha87 {
  --library-card-shadow: 0 14px 34px rgba(64, 58, 92, 0.09);
  gap: 18px;
}

.library-alpha87 .library-reference-hero {
  display: grid;
  min-height: 320px;
  grid-template-columns: minmax(0, 1.22fr) minmax(360px, 0.78fr);
  align-items: center;
  gap: clamp(24px, 3vw, 54px);
  overflow: hidden;
  padding: 28px clamp(26px, 3vw, 44px);
  border: 1px solid rgba(64, 58, 92, 0.08);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--library-card-shadow);
}

.library-alpha87 .library-reference-hero__identity {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.library-alpha87 .library-reference-hero__identity > img {
  width: 86px;
  height: 86px;
  flex-basis: 86px;
  border: 1px solid rgba(243, 164, 131, 0.2);
  border-radius: 19px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(64, 58, 92, 0.08);
}

.library-alpha87 .library-reference-hero__identity .section-eyebrow {
  margin: 0 0 8px;
  color: var(--eiv-turquoise-deep, #287f86);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.library-alpha87 .library-reference-hero__identity h2 {
  margin: 0;
  color: var(--eiv-plum, #403a5c);
  font-size: clamp(27px, 2.25vw, 39px);
  line-height: 1.1;
}

.library-alpha87 .library-reference-hero__identity p:last-child {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--eiv-text-secondary, #777086);
  font-size: 14px;
  line-height: 1.55;
}

.library-alpha87 .library-reference-hero__art {
  display: block;
  width: min(100%, 430px);
  height: 282px;
  justify-self: end;
  align-self: center;
  object-fit: contain;
  object-position: center;
}

.library-alpha87 .library-reference-controls {
  display: grid;
  gap: 15px;
}

.library-alpha87 .library-theme-section {
  display: grid;
  gap: 10px;
}

.library-alpha87 .reference-filter-label {
  margin: 0 0 2px 2px;
  color: var(--eiv-turquoise-deep, #287f86);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.library-alpha87 .reference-category-chips.library-theme-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  overflow: visible;
  padding: 0;
}

.library-alpha87 .library-theme-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 116px;
  grid-template-columns: 48px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 13px;
  padding: 18px 17px;
  border: 1px solid rgba(64, 58, 92, 0.16);
  border-radius: 20px;
  background: #fff;
  color: var(--eiv-plum, #403a5c);
  text-align: left;
  box-shadow: 0 8px 22px rgba(64, 58, 92, 0.045);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.library-alpha87 .library-theme-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(64, 58, 92, 0.08);
}

.library-alpha87 .library-theme-card:focus-visible {
  outline: 3px solid rgba(105, 201, 195, 0.35);
  outline-offset: 2px;
}

.library-alpha87 .library-theme-card.is-active {
  border-width: 2px;
  border-color: var(--eiv-plum, #403a5c);
  box-shadow: 0 0 0 4px rgba(64, 58, 92, 0.08), 0 12px 26px rgba(64, 58, 92, 0.08);
}

.library-alpha87 .library-theme-card__icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: rgba(64, 58, 92, 0.06);
}

.library-alpha87 .library-theme-card__icon svg {
  width: 28px;
  height: 28px;
}

.library-alpha87 .library-theme-card__copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.library-alpha87 .library-theme-card__copy strong {
  color: currentColor;
  font-size: 15px;
  line-height: 1.2;
}

.library-alpha87 .library-theme-card__copy small {
  color: var(--eiv-text-secondary, #777086);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.42;
}

.library-alpha87 .library-theme-card__chevron {
  justify-self: end;
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
}

.library-alpha87 .library-theme-card.category-tone--gold {
  border-color: rgba(220, 165, 52, 0.56);
  background: linear-gradient(135deg, rgba(255, 248, 227, 0.95), rgba(255, 255, 255, 0.98));
  color: #a66c05;
}
.library-alpha87 .library-theme-card.category-tone--raspberry {
  border-color: rgba(198, 75, 103, 0.5);
  background: linear-gradient(135deg, rgba(255, 238, 243, 0.96), rgba(255, 255, 255, 0.98));
  color: #b93256;
}
.library-alpha87 .library-theme-card.category-tone--lilac {
  border-color: rgba(127, 96, 187, 0.45);
  background: linear-gradient(135deg, rgba(246, 241, 255, 0.98), rgba(255, 255, 255, 0.98));
  color: #6841ac;
}
.library-alpha87 .library-theme-card.category-tone--coral {
  border-color: rgba(230, 113, 67, 0.5);
  background: linear-gradient(135deg, rgba(255, 242, 235, 0.98), rgba(255, 255, 255, 0.98));
  color: #c85422;
}
.library-alpha87 .library-theme-card.category-tone--green {
  border-color: rgba(76, 155, 112, 0.48);
  background: linear-gradient(135deg, rgba(236, 249, 241, 0.98), rgba(255, 255, 255, 0.98));
  color: #2f8657;
}
.library-alpha87 .library-theme-card.category-tone--turquoise {
  border-color: rgba(40, 127, 134, 0.46);
  background: linear-gradient(135deg, rgba(232, 249, 249, 0.98), rgba(255, 255, 255, 0.98));
  color: #167681;
}
.library-alpha87 .library-theme-card.category-tone--blue {
  border-color: rgba(78, 120, 189, 0.45);
  background: linear-gradient(135deg, rgba(238, 245, 255, 0.98), rgba(255, 255, 255, 0.98));
  color: #2d67b2;
}
.library-alpha87 .library-theme-card.category-tone--neutral {
  border-color: rgba(64, 58, 92, 0.35);
  background: linear-gradient(135deg, rgba(245, 243, 250, 0.98), rgba(255, 255, 255, 0.98));
  color: var(--eiv-plum, #403a5c);
}

.library-alpha87 .library-theme-card.category-tone--gold .library-theme-card__icon { background: rgba(220, 165, 52, 0.12); }
.library-alpha87 .library-theme-card.category-tone--raspberry .library-theme-card__icon { background: rgba(198, 75, 103, 0.1); }
.library-alpha87 .library-theme-card.category-tone--lilac .library-theme-card__icon { background: rgba(127, 96, 187, 0.1); }
.library-alpha87 .library-theme-card.category-tone--coral .library-theme-card__icon { background: rgba(230, 113, 67, 0.1); }
.library-alpha87 .library-theme-card.category-tone--green .library-theme-card__icon { background: rgba(76, 155, 112, 0.1); }
.library-alpha87 .library-theme-card.category-tone--turquoise .library-theme-card__icon { background: rgba(40, 127, 134, 0.1); }
.library-alpha87 .library-theme-card.category-tone--blue .library-theme-card__icon { background: rgba(78, 120, 189, 0.1); }

.library-alpha87 .library-sticky-controls {
  position: sticky;
  top: calc(var(--header-height, 64px) + 8px);
  z-index: 44;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: stretch;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(64, 58, 92, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--library-card-shadow);
  backdrop-filter: blur(14px);
}

.library-alpha87 .library-reference-search {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid rgba(64, 58, 92, 0.15);
  border-radius: 16px;
  background: #fff;
  color: var(--eiv-turquoise-deep, #287f86);
}

.library-alpha87 .library-reference-search > svg {
  position: static;
  inset: auto;
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
}

.library-alpha87 .library-reference-search input {
  min-width: 0;
  min-height: 52px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--eiv-plum, #403a5c);
  font-size: 14px;
}

.library-alpha87 .library-reference-search:focus-within {
  border-color: var(--eiv-turquoise, #69c9c3);
  box-shadow: 0 0 0 3px rgba(105, 201, 195, 0.2);
}

.library-alpha87 .library-view-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(64, 58, 92, 0.13);
  border-radius: 16px;
  background: #fff;
}

.library-alpha87 .library-view-switch button {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--eiv-text-secondary, #777086);
  font-weight: 900;
  cursor: pointer;
}

.library-alpha87 .library-view-switch button.is-active {
  background: var(--eiv-raspberry-pale, #fbe9ee);
  color: var(--eiv-raspberry, #c64b67);
}

.library-alpha87 .library-filter-toggle--toolbar {
  display: flex;
  min-width: 172px;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid rgba(64, 58, 92, 0.13);
  border-radius: 16px;
  background: #fff;
  color: var(--eiv-plum, #403a5c);
  font-weight: 900;
  cursor: pointer;
}

.library-alpha87 .library-filter-toggle--toolbar > svg {
  width: 20px;
  height: 20px;
  color: var(--eiv-turquoise-deep, #287f86);
}

.library-alpha87 .library-filter-toggle__count {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--eiv-lilac-pale, #f1edf6);
  color: var(--eiv-plum, #403a5c);
  font-size: 11px;
}

.library-alpha87 .library-filter-toggle__chevron {
  margin-left: 2px;
  color: var(--eiv-plum, #403a5c);
  font-size: 18px;
  transition: transform 160ms ease;
}

.library-alpha87 .library-filter-toggle--toolbar[aria-expanded="true"] .library-filter-toggle__chevron {
  transform: rotate(180deg);
}

.library-alpha87 .library-active-summary {
  display: grid;
  min-height: 78px;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
  border: 1px solid rgba(127, 96, 187, 0.16);
  border-radius: 19px;
  background: linear-gradient(90deg, rgba(245, 240, 253, 0.9), rgba(250, 248, 253, 0.98));
}

.library-alpha87 .library-active-summary__filters,
.library-alpha87 .library-active-summary__results {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.library-alpha87 .library-active-summary__results {
  padding-left: 20px;
  border-left: 1px solid rgba(64, 58, 92, 0.13);
}

.library-alpha87 .library-active-summary svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: #7447b5;
}

.library-alpha87 .library-active-summary strong {
  color: var(--eiv-plum, #403a5c);
  font-size: 13px;
  white-space: nowrap;
}

.library-alpha87 .library-active-summary__results span,
.library-alpha87 .library-active-summary__empty {
  color: var(--eiv-text-secondary, #777086);
  font-size: 11px;
}

.library-alpha87 .library-active-summary .filter-chip {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  background: #ebe0fa;
  color: #5e35a0;
  font-size: 11px;
  font-weight: 850;
}

.library-alpha87 .library-active-summary__reset {
  border: 0;
  background: transparent;
  color: #6841ac;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.library-alpha87 .library-filter-panel {
  margin: 0;
}

.library-alpha87 .library-results-heading {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin: 0;
}

.library-alpha87 .library-results-heading p {
  margin: 0 auto 0 0;
  color: var(--eiv-text-secondary, #777086);
  font-size: 11px;
}

@media (max-width: 1220px) {
  .library-alpha87 .library-reference-hero {
    min-height: 300px;
    grid-template-columns: minmax(0, 1fr) 340px;
  }
  .library-alpha87 .library-reference-hero__art {
    width: 340px;
    height: 260px;
  }
  .library-alpha87 .reference-category-chips.library-theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .library-alpha87 .library-reference-hero {
    min-height: 0;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .library-alpha87 .library-reference-hero__art {
    width: min(100%, 420px);
    height: auto;
    max-height: 320px;
    justify-self: center;
  }
  .library-alpha87 .library-sticky-controls {
    grid-template-columns: 1fr 1fr;
  }
  .library-alpha87 .library-reference-search {
    grid-column: 1 / -1;
  }
  .library-alpha87 .library-active-summary {
    grid-template-columns: 1fr;
  }
  .library-alpha87 .library-active-summary__results {
    padding-top: 12px;
    padding-left: 0;
    border-top: 1px solid rgba(64, 58, 92, 0.13);
    border-left: 0;
  }
}

@media (max-width: 680px) {
  .library-alpha87 {
    gap: 14px;
  }
  .library-alpha87 .library-reference-hero {
    padding: 18px;
    border-radius: 21px;
  }
  .library-alpha87 .library-reference-hero__identity {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
  }
  .library-alpha87 .library-reference-hero__identity > img {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    border-radius: 14px;
  }
  .library-alpha87 .library-reference-hero__identity h2 {
    font-size: 22px;
  }
  .library-alpha87 .library-reference-hero__identity p:last-child {
    font-size: 12px;
  }
  .library-alpha87 .library-reference-hero__art {
    display: block;
    width: min(100%, 330px);
    max-height: 260px;
  }
  .library-alpha87 .reference-category-chips.library-theme-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .library-alpha87 .library-theme-card {
    min-height: 96px;
  }
  .library-alpha87 .library-sticky-controls {
    position: static;
    grid-template-columns: 1fr;
  }
  .library-alpha87 .library-reference-search,
  .library-alpha87 .library-view-switch,
  .library-alpha87 .library-filter-toggle--toolbar {
    width: 100%;
  }
  .library-alpha87 .library-filter-toggle--toolbar {
    min-width: 0;
  }
  .library-alpha87 .library-active-summary {
    padding: 14px;
  }
  .library-alpha87 .library-active-summary__filters,
  .library-alpha87 .library-active-summary__results {
    flex-wrap: wrap;
  }
  .library-alpha87 .library-active-summary strong {
    white-space: normal;
  }
}
