/* Patch-notes · layout sidebar + contenu */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cp-hero--patch-notes .cp-hero__panel {
  flex-direction: row;
  align-items: stretch;
  margin: clamp(0.35rem, 0.75vh, 0.55rem) 0.4rem 0.4rem;
  padding: 0;
  gap: 0;
  background: #0c0c0c;
}

.reglement-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.reglement-sidebar {
  --sidebar-r: var(--mosaic-r, clamp(1.5rem, 3.5vw, 2.35rem));
  flex-shrink: 0;
  width: clamp(13.5rem, 19vw, 17rem);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #101010 0%, #0a0a0a 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--sidebar-r) 0 0 var(--sidebar-r);
  overflow: hidden;
  z-index: 2;
}

.reglement-sidebar__head {
  flex-shrink: 0;
  padding: clamp(0.85rem, 1.6vw, 1.1rem) clamp(0.85rem, 1.4vw, 1rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.reglement-sidebar__title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(0.82rem, 1.15vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
  margin-bottom: 0.75rem;
  padding: 0.15rem 0;
}

.patch-resume {
  display: none;
  width: 100%;
  margin-bottom: 0.65rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(30, 230, 160, 0.3);
  border-radius: 0.45rem;
  background: rgba(30, 230, 160, 0.06);
  color: #1ee6a0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(0.68rem, 0.9vw, 0.74rem);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.patch-resume.is-visible {
  display: block;
}

.patch-resume:hover,
.patch-resume:focus-visible {
  background: rgba(30, 230, 160, 0.12);
  border-color: rgba(30, 230, 160, 0.5);
  outline: none;
}

.reglement-sidebar__nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.45rem 0.5rem clamp(0.75rem, 1.5vw, 1rem);
  -webkit-overflow-scrolling: touch;
}

.reglement-nav__group {
  margin-bottom: 0.65rem;
}

.reglement-nav__group-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
  margin: 0 0 0.35rem 0.55rem;
}

.reglement-nav__item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.52rem 0.55rem;
  margin-bottom: 0.18rem;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(0.68rem, 0.95vw, 0.76rem);
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.reglement-nav__item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.reglement-nav__item.is-active {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.reglement-nav__radio {
  flex-shrink: 0;
  width: 0.65rem;
  height: 0.65rem;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  position: relative;
  transition: border-color 0.2s ease;
}

.reglement-nav__item.is-active .reglement-nav__radio {
  border-color: var(--reg-accent, #1ee6a0);
}

.reglement-nav__item.is-active .reglement-nav__radio::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: var(--reg-accent, #1ee6a0);
}

.reglement-nav__label {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}

.reglement-body {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.cp-hero--patch-notes .cp-page__scroll {
  flex: 1;
}

.cp-hero--patch-notes .cp-page__content {
  max-width: none;
  padding: clamp(1rem, 2.5vw, 1.75rem) clamp(1rem, 2.5vw, 2rem) clamp(2rem, 4vw, 3rem);
}

.patch-filter {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.45rem;
  background: rgba(0, 0, 0, 0.35);
  color: var(--sd-white);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
}

.patch-filter::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.patch-filter:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.22);
}

.patch-nav__item .reglement-nav__label {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.patch-nav__item strong {
  font-weight: 600;
  color: inherit;
}

.patch-nav__date {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.42);
  letter-spacing: 0.02em;
}

.patch-sidebar__empty {
  padding: 0.75rem 0.65rem;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.5;
}

.patch-empty {
  padding: clamp(2rem, 5vw, 3rem) 1rem;
  text-align: center;
  color: var(--sd-grey);
  font-size: 0.92rem;
}

.patch-empty[hidden] {
  display: none !important;
}

.patch-note {
  display: none;
  padding: clamp(1.1rem, 2.4vw, 1.6rem);
  border-radius: clamp(0.9rem, 1.8vw, 1.2rem);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.035) 0%, rgba(0, 0, 0, 0.25) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 28px rgba(0, 0, 0, 0.18);
}

.patch-note.is-current {
  display: block;
}

.patch-note__head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(0.85rem, 1.6vw, 1.15rem);
  padding: clamp(0.85rem, 1.5vw, 1.05rem);
  margin-bottom: clamp(1rem, 2vw, 1.35rem);
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(0, 0, 0, 0.22) 100%);
}

.patch-note__head-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: clamp(0.75rem, 1.4vw, 1rem);
  border-right: 1px dashed rgba(255, 255, 255, 0.12);
}

.patch-note__head-side img {
  width: clamp(2.75rem, 5vw, 3.5rem);
  height: auto;
  object-fit: contain;
  opacity: 0.9;
}

.patch-note__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.48);
}

.patch-note__tag {
  display: inline-flex;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.patch-note__kicker {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(0.72rem, 1.1vw, 0.8rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sd-neon);
  margin: 0 0 0.3rem;
}

.patch-note__title {
  font-family: 'Anton', 'Bebas Neue', sans-serif;
  font-size: clamp(1.25rem, 2.8vw, 1.65rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.05;
  margin: 0 0 0.35rem;
}

.patch-note__authors {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(0.78rem, 1.1vw, 0.86rem);
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

.patch-note__author {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
}

.patch-note__author-sep {
  color: rgba(255, 255, 255, 0.28);
}

.patch-note__intro,
.patch-note__outro {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(0.88rem, 1.25vw, 0.98rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 clamp(1rem, 2vw, 1.35rem);
}

.patch-note__outro {
  margin-bottom: 0;
  padding-top: clamp(0.85rem, 1.6vw, 1.1rem);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.patch-note__sections {
  display: grid;
  gap: clamp(0.85rem, 1.6vw, 1.1rem);
  margin-bottom: clamp(1rem, 2vw, 1.35rem);
}

.patch-note__block {
  padding: clamp(0.85rem, 1.5vw, 1rem);
  border-radius: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

.patch-note__block[data-type="features"] { --patch-accent: #1ee6a0; }
.patch-note__block[data-type="refonte"] { --patch-accent: #38bdf8; }
.patch-note__block[data-type="optimisations"] { --patch-accent: #f59e0b; }
.patch-note__block[data-type="fixes"] { --patch-accent: #ef4444; }

.patch-note__block-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(0.92rem, 1.3vw, 1.02rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--patch-accent, var(--sd-neon));
  margin: 0 0 0.65rem;
}

.patch-note__block-icon {
  width: clamp(1.35rem, 2vw, 1.65rem);
  height: clamp(1.35rem, 2vw, 1.65rem);
  object-fit: contain;
  flex-shrink: 0;
}

.patch-note__block-title span {
  min-width: 0;
}

.patch-note__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.patch-note__list li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(0.84rem, 1.15vw, 0.92rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.68);
}

.patch-note__list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.patch-note__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.patch-note__list-text {
  display: block;
}

.patch-note__list li strong {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
}

.reglement-pager-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: clamp(0.85rem, 1.6vw, 1.15rem);
  margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
  padding: clamp(0.85rem, 1.5vw, 1rem);
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.reglement-pager__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.reglement-pager__brand:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
}

.reglement-pager__brand img {
  width: clamp(2rem, 3.5vw, 2.5rem);
  height: auto;
  object-fit: contain;
  opacity: 0.88;
}

.reglement-pager__body {
  min-width: 0;
}

.reglement-pager__status {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(0.72rem, 1vw, 0.82rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 0.55rem;
}

.reglement-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.reglement-pager__btn {
  padding: 0.48rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(0.68rem, 0.95vw, 0.76rem);
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.reglement-pager__btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.reglement-pager__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .cp-hero--patch-notes .cp-hero__panel {
    flex-direction: column;
  }

  .reglement-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--sidebar-r) var(--sidebar-r) 0 0;
    max-height: none;
  }

  .reglement-sidebar__nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0.25rem;
    padding: 0 0.5rem 0.75rem;
  }

  .reglement-nav__group {
    display: contents;
  }

  .reglement-nav__group-label {
    display: none;
  }

  .reglement-nav__item {
    flex-shrink: 0;
    width: auto;
    margin-bottom: 0;
    white-space: nowrap;
    padding: 0.45rem 0.75rem;
  }

  .reglement-nav__radio {
    display: none;
  }

  .patch-note__head {
    grid-template-columns: 1fr;
  }

  .patch-note__head-side {
    justify-content: flex-start;
    border-right: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
    padding-right: 0;
    padding-bottom: 0.75rem;
  }

  .reglement-pager-wrap {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .reglement-pager__brand {
    justify-self: center;
  }

  .reglement-pager {
    justify-content: center;
  }
}
