:root {
  --bg: #15151b;
  --sidebar: #202029;
  --sidebar-dark: #181820;
  --panel: #23222a;
  --panel-soft: #2a2932;
  --line: #363544;
  --line-soft: #2d2c37;
  --text: #f7f7fb;
  --muted: #b9b8c8;
  --faint: #85849a;
  --accent: #6d5dfc;
  --accent-rgb: 109, 93, 252;
  --accent-soft: #383365;
  --green: #48d17c;
  --orange: #f4a742;
  --red: #fb7185;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 78% 0%, rgba(var(--accent-rgb), 0.14), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

code {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #181820;
  color: #fff;
  padding: 1px 6px;
}

.site-hero,
.topbar,
.hero-copy,
.quick-docs,
.site-footer {
  display: none;
}

.public-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.public-sidebar,
.tag-rail {
  position: sticky;
  top: 0;
  min-height: 100vh;
  align-self: start;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-dark));
  border-right: 1px solid var(--line-soft);
  padding: 28px 22px;
}

.public-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.public-brand {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
}

.public-brand:has(img):not(:has(strong)) {
  grid-template-columns: 46px;
  justify-content: center;
}

.public-brand span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.95), rgba(var(--accent-rgb), 0.62));
  color: #fff;
  font-weight: 900;
}

.public-brand img {
  width: 46px;
  height: 46px;
  display: block;
  border-radius: 50%;
  background: var(--panel-soft);
  object-fit: cover;
}

.public-brand strong {
  min-width: 0;
  font-size: 1.12rem;
  letter-spacing: 0;
}

.language-switcher {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.language-switcher button {
  width: 46px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #22222a;
  color: transparent;
  cursor: pointer;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
}

.language-switcher button:hover,
.language-switcher button.is-active {
  border-color: rgba(var(--accent-rgb), 0.72);
  background: var(--accent-soft);
  color: #fff;
}

.flag-icon {
  width: 28px;
  height: 19px;
  display: block;
  flex: 0 0 auto;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

span.flag-fr {
  background: linear-gradient(90deg, #2449a9 0 33.33%, #fff 33.33% 66.66%, #ed2939 66.66%);
}

span.flag-us,
span.flag-en {
  position: relative;
  overflow: hidden;
  background: repeating-linear-gradient(
    to bottom,
    #b22234 0 7.69%,
    #fff 7.69% 15.38%
  );
}

span.flag-us::before,
span.flag-en::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 42%;
  height: 53.85%;
  background: #3c3b6e;
}

span.flag-us::after,
span.flag-en::after {
  content: "";
  position: absolute;
  top: 1.5px;
  left: 2px;
  width: calc(42% - 4px);
  height: calc(53.85% - 3px);
  background-image: radial-gradient(circle, #fff 0 0.65px, transparent 0.75px);
  background-size: 3px 2.5px;
  opacity: 0.95;
}

.side-block {
  display: grid;
  gap: 10px;
}

.side-title,
.eyebrow {
  margin: 0;
  color: #8f98b7;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.side-link {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--muted);
  text-decoration: none;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.side-link:hover,
.side-link.is-active {
  background: var(--panel-soft);
  border-color: var(--line-soft);
  color: var(--text);
}

.tag-cloud,
.tag-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-rail {
  align-content: flex-start;
}

.tag-rail::before {
  content: "Filtres";
  flex: 0 0 100%;
  color: #8f98b7;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.tag-filter,
.plugin-tags span,
.plugin-meta span {
  --tag-rgb: var(--accent-rgb);
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(var(--tag-rgb), 0.38);
  border-radius: 999px;
  background: rgba(var(--tag-rgb), 0.12);
  color: #d9d8ea;
  padding: 4px 11px;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.tag-filter {
  cursor: pointer;
  text-decoration: none;
}

.tag-filter:hover,
.tag-filter.is-active {
  border-color: rgba(var(--tag-rgb), 0.78);
  background: rgba(var(--tag-rgb), 0.24);
  color: #fff;
}

.tag-filter[data-tag-slug="deprecated"],
.tag-filter[data-tag-slug="deprecated"]:hover,
.tag-filter[data-tag-slug="deprecated"].is-active,
.plugin-tags span[data-tag-slug="deprecated"],
.plugin-meta span[data-tag-slug="deprecated"] {
  border-color: rgba(194, 87, 99, 0.45);
  background: rgba(194, 87, 99, 0.16);
  color: #e7a1aa;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  color: var(--faint);
  font-size: 0.92rem;
  font-style: italic;
}

.sidebar-footer a {
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.public-main,
main {
  min-width: 0;
  padding: 34px clamp(18px, 4vw, 56px) 56px;
}

.page-heading,
.section-heading {
  max-width: 900px;
  margin-bottom: 26px;
}

.page-heading h1,
.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(2.15rem, 4vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.page-heading p:not(.eyebrow),
.section-heading p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.heading-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.heading-meta span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #202029;
  color: var(--muted);
  padding: 4px 11px;
  font-size: 0.86rem;
}

.plugin-grid,
.plugin-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 20px;
}

.plugin-browser {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.plugin-card,
.empty-state,
.doc-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(35, 34, 42, 0.96);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.plugin-card,
.doc-panel {
  transition: opacity var(--filter-fade-in-ms, 1000ms) ease;
}

.plugin-card.is-filtering-out {
  opacity: 0;
  transition-duration: var(--filter-fade-out-ms, 1000ms);
  pointer-events: none;
}

.plugin-card.is-filtering-in,
.doc-panel.is-filtering-in {
  opacity: 0;
  transition-duration: var(--filter-fade-in-ms, 1000ms);
  pointer-events: none;
}

.plugin-card[hidden] {
  display: none;
}

.plugin-card__preview,
.plugin-card__media {
  position: relative;
  height: 280px;
  max-height: 280px;
  border-bottom: 1px solid var(--line-soft);
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.16), rgba(72, 209, 124, 0.08)),
    #171720;
  overflow: hidden;
}

.plugin-card__slides,
.plugin-card__slide {
  height: 100%;
}

.plugin-card__slide {
  display: none;
  position: relative;
}

.plugin-card__slide.is-active {
  display: block;
}

.media-open {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
  padding: 0;
}

.plugin-card__preview img,
.plugin-card__preview video,
.plugin-card__media img,
.plugin-card__media video {
  width: 100%;
  height: 100%;
  max-height: 280px;
  display: block;
  background: #121218;
  object-fit: cover;
  opacity: 1;
}

.plugin-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(19, 19, 24, 0.88));
  pointer-events: none;
}

.plugin-card__preview video:fullscreen,
.plugin-card__media video:fullscreen,
.lightbox-stage video:fullscreen {
  width: 100%;
  height: 100%;
  max-height: none;
  background: #000;
  object-fit: contain;
}

.plugin-card__preview video:-webkit-full-screen,
.plugin-card__media video:-webkit-full-screen,
.lightbox-stage video:-webkit-full-screen {
  width: 100%;
  height: 100%;
  max-height: none;
  background: #000;
  object-fit: contain;
}

.media-controls {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  pointer-events: none;
}

.media-controls button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(24, 24, 32, 0.78);
  color: var(--text);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  opacity: 0;
  pointer-events: auto;
  transition: opacity 160ms ease, background 160ms ease, border-color 160ms ease;
}

.plugin-card__preview:hover .media-controls button,
.plugin-card__preview:focus-within .media-controls button,
.media-controls button:hover {
  opacity: 1;
}

.media-controls button:hover {
  border-color: rgba(var(--accent-rgb), 0.68);
  background: var(--accent-soft);
}

.media-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  min-width: 48px;
  border: 1px solid rgba(247, 247, 251, 0.14);
  border-radius: 8px;
  background: rgba(24, 24, 32, 0.82);
  color: var(--muted);
  padding: 5px 8px;
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
}

.video-play-button {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 3;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(247, 247, 251, 0.18);
  border-radius: 999px;
  background: rgba(24, 24, 32, 0.78);
  color: #fff;
  cursor: pointer;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  transition: background 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.video-play-button span {
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 16px solid currentColor;
  margin-left: 4px;
}

.video-play-button:hover {
  background: var(--accent-soft);
  transform: translate(-50%, -50%) scale(1.04);
}

.plugin-card__slide.is-playing .video-play-button {
  opacity: 0;
  pointer-events: none;
}

.plugin-card__placeholder {
  height: 100%;
  display: grid;
  place-items: center;
}

.plugin-card__placeholder span {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 900;
}

.plugin-card__preview h2 {
  position: absolute;
  z-index: 1;
  left: 18px;
  right: 18px;
  bottom: 16px;
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1;
  letter-spacing: 0;
}

.plugin-card__body {
  padding: 18px;
  display: grid;
  gap: 15px;
}

.plugin-card__topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.plugin-card h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.plugin-card p,
.release-date {
  margin: 0;
  color: var(--muted);
}

.plugin-card__body > p {
  min-height: 48px;
  white-space: pre-line;
}

.compatibility {
  flex: 0 0 auto;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.76rem;
  font-weight: 850;
  white-space: nowrap;
}

.compatibility.is-compatible {
  background: rgba(72, 209, 124, 0.15);
  color: var(--green);
}

.compatibility.is-incompatible {
  background: rgba(251, 113, 133, 0.15);
  color: var(--red);
}

.compatibility.is-deprecated {
  background: rgba(194, 87, 99, 0.17);
  color: #e7a1aa;
}

.compatibility.is-unknown {
  background: rgba(244, 167, 66, 0.15);
  color: var(--orange);
}

.plugin-tags,
.plugin-meta {
  min-height: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plugin-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.plugin-facts div {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #282730;
  padding: 10px;
}

.plugin-facts dt {
  color: var(--faint);
  font-size: 0.74rem;
}

.plugin-facts dd {
  margin: 3px 0 0;
  color: #fff;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.plugin-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.plugin-action-group {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 0;
}

.button-link,
.text-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #1f1e26;
  color: var(--muted);
  padding: 8px 12px;
  text-decoration: none;
  font-weight: 850;
}

.plugin-action-group .button-link {
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.button-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.copy-link-button {
  position: relative;
  min-height: 42px;
  width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-soft);
  border-left: 0;
  border-radius: 8px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  background: #1f1e26;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.plugin-action-group .copy-link-button {
  box-shadow: inset 1px 0 0 rgba(247, 247, 251, 0.08);
}

.button-link:hover,
.button-link.button-primary,
.text-link:hover,
.copy-link-button:hover,
.copy-link-button.is-copied {
  border-color: rgba(var(--accent-rgb), 0.68);
  background: var(--accent-soft);
  color: #fff;
}

.copy-link-button.is-copy-error {
  border-color: rgba(251, 113, 133, 0.62);
  background: rgba(251, 113, 133, 0.16);
  color: #fecdd3;
}

.copy-feedback {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 5;
  opacity: 0;
  transform: translate(-50%, 4px);
  pointer-events: none;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(31, 30, 38, 0.96);
  color: var(--text);
  padding: 4px 8px;
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  box-shadow: var(--shadow);
  transition: opacity 160ms ease, transform 160ms ease;
}

.copy-link-button.is-copied .copy-feedback {
  opacity: 1;
  transform: translate(-50%, 0);
}

.empty-state {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  margin-bottom: 20px;
}

.empty-state img {
  width: 100%;
  height: 160px;
  display: block;
  object-fit: cover;
}

.empty-state div {
  padding: 20px;
}

.empty-state h2,
.empty-state h3,
.empty-state p {
  margin: 0;
}

.empty-state p {
  margin-top: 8px;
  color: var(--muted);
}

.doc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 18px;
}

.doc-panel {
  padding: 24px;
}

.doc-panel-large {
  grid-row: span 2;
}

.doc-panel h2 {
  margin: 8px 0 0;
  font-size: clamp(1.45rem, 2.7vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.doc-panel h3 {
  margin: 24px 0 0;
  font-size: 1.08rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.doc-panel p,
.doc-panel li {
  color: var(--muted);
}

.doc-panel ol {
  margin: 18px 0 0;
  padding-left: 1.25rem;
}

.doc-panel li + li {
  margin-top: 10px;
}

.doc-panel .button-link {
  margin-top: 18px;
}

.media-lightbox[hidden] {
  display: none;
}

.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  grid-template-rows: minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  background: rgba(12, 12, 16, 0.94);
  padding: 28px;
}

body.has-lightbox {
  overflow: hidden;
}

.lightbox-stage {
  min-width: 0;
  min-height: 0;
  height: calc(100vh - 56px);
  display: grid;
  place-items: center;
  grid-column: 2;
  grid-row: 1;
}

.lightbox-stage img,
.lightbox-stage video {
  max-width: 100%;
  max-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101016;
  box-shadow: var(--shadow);
  object-fit: contain;
}

.lightbox-nav {
  border: 1px solid rgba(247, 247, 251, 0.16);
  border-radius: 8px;
  background: rgba(35, 34, 42, 0.86);
  color: var(--text);
  cursor: pointer;
}

.lightbox-nav:hover {
  border-color: rgba(var(--accent-rgb), 0.72);
  background: var(--accent-soft);
}

.lightbox-nav {
  width: 48px;
  height: 64px;
  align-self: center;
  font-size: 1.7rem;
  line-height: 1;
}

.lightbox-prev {
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
}

.lightbox-next {
  grid-column: 3;
  grid-row: 1;
  justify-self: center;
}

.lightbox-counter {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 1px solid rgba(247, 247, 251, 0.14);
  border-radius: 8px;
  background: rgba(35, 34, 42, 0.86);
  color: var(--muted);
  padding: 6px 10px;
  font-weight: 850;
}

@media (max-width: 1120px) {
  .public-shell,
  .plugin-browser {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .plugin-grid,
  .plugin-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .public-shell,
  .plugin-browser {
    grid-template-columns: 1fr;
  }

  .public-sidebar,
  .tag-rail {
    position: static;
    min-height: auto;
    padding: 18px;
  }

  .public-sidebar {
    gap: 18px;
  }

  .side-link {
    width: fit-content;
  }

  .sidebar-footer {
    margin-top: 0;
  }

  .public-main,
  main {
    padding: 24px 14px 42px;
  }

  .doc-grid,
  .empty-state {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .page-heading h1,
  .section-heading h2 {
    font-size: 2.4rem;
  }

  .plugin-card__preview,
  .plugin-card__media {
    height: 220px;
    max-height: 220px;
  }

  .plugin-card__preview img,
  .plugin-card__preview video,
  .plugin-card__media img,
  .plugin-card__media video {
    max-height: 220px;
  }

  .plugin-card__topline {
    flex-direction: column;
  }

  .media-lightbox {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    padding: 18px;
  }

  .lightbox-stage {
    grid-column: 1 / -1;
    height: calc(100vh - 88px);
  }

  .lightbox-prev,
  .lightbox-next {
    grid-row: 2;
    width: 100%;
    height: 44px;
  }

  .lightbox-prev {
    grid-column: 1;
  }

  .lightbox-next {
    grid-column: 2;
  }

  .plugin-facts,
  .plugin-actions {
    grid-template-columns: 1fr;
  }
}

@media (hover: none) {
  .media-controls button {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .plugin-card,
  .doc-panel {
    transition: none;
  }

  .plugin-card.is-filtering-in,
  .plugin-card.is-filtering-out,
  .doc-panel.is-filtering-in {
    opacity: 1;
    pointer-events: auto;
  }
}
