/* Page Téléchargements */

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Haut de page ---------- */
.dl-stage {
  min-height: calc(86svh - 56px);
}
#rain {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}
.dl-stage .glitch {
  font-size: clamp(2.1rem, 8.2vw, 6.4rem);
}
.dl-stage .lede {
  margin-top: 1.4rem;
}
.dl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
  pointer-events: auto;
}
.dl-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}
.dl-chip.warn {
  border-color: var(--accent);
  color: var(--ink);
}
.dl-chip .led {
  margin: 0;
  background: #4ade80;
  box-shadow: 0 0 10px #4ade80;
}
.dl-chip.warn .led {
  background: var(--accent-hot);
  box-shadow: 0 0 10px var(--accent-hot);
}

/* ---------- Barre d'outils ---------- */
.dl-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.8rem;
}
.dl-tools .filters {
  margin: 0;
}
.dl-search input,
.dl-sort select {
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  outline: none;
}
.dl-search input {
  min-width: min(100%, 260px);
}
.dl-search input:focus,
.dl-sort select:focus {
  border-color: var(--accent);
}
.dl-sort {
  margin-left: auto;
}
.dl-empty {
  color: var(--muted);
  text-align: center;
  padding: 3rem 0;
}

/* ---------- Cartes ---------- */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 540px), 1fr));
  gap: 1.5rem;
  align-items: start;
}
.dl-card.is-hidden {
  display: none;
}
.js .project.dl-card.reveal.in:hover,
.js .project.dl-card.reveal.in.is-hover {
  transform: none;
}
.dl-card.flash {
  animation: flash-card 1.8s ease-out;
}
@keyframes flash-card {
  0%,
  40% {
    box-shadow: 0 0 0 2px var(--accent-hot), 0 0 70px rgba(209, 25, 25, 0.6);
  }
  100% {
    box-shadow: none;
  }
}
.dl-card .body {
  gap: 1rem;
}
.dl-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.dl-tag {
  margin: 0 0 0.3rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text, var(--accent));
}
.dl-head h3 {
  font-size: 1.7rem;
}
.ver {
  flex: none;
  padding: 0.35rem 0.9rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: var(--ink);
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  box-shadow: 0 0 20px rgba(209, 25, 25, 0.25);
}
.ver.src {
  border-style: dashed;
  box-shadow: none;
  background: transparent;
  color: var(--muted);
}
.dl-desc {
  color: var(--muted);
}
.dl-main {
  display: grid;
  gap: 0.8rem;
}
.dl-loading,
.dl-none {
  color: var(--muted);
  font-size: 0.9rem;
}
.dl-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  color: var(--muted);
}
.dl-meta .dim {
  opacity: 0.75;
}
.pill {
  padding: 0.15rem 0.6rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 999px;
}
.note {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Fichiers */
.asset {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s, background 0.25s;
}
.asset:hover {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
}
.asset.rec {
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  background: linear-gradient(100deg, rgba(209, 25, 25, 0.14), rgba(0, 0, 0, 0.35));
}
.aicon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  color: var(--accent-text, var(--accent));
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.4);
}
.ainfo {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}
.aname {
  font-weight: 600;
  font-size: 0.92rem;
  word-break: break-all;
}
.ainfo small {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
}
.sha {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: var(--muted);
}
.sha code {
  color: var(--ink);
  opacity: 0.85;
}
.copy {
  padding: 0.15rem 0.6rem;
  font: inherit;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.copy:hover {
  color: var(--ink);
  border-color: var(--accent);
}
.copy.done {
  color: #4ade80;
  border-color: #4ade80;
}
.dl-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.3rem;
  overflow: hidden;
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.dl-btn::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
}
.dl-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 34px rgba(209, 25, 25, 0.5);
}
.dl-btn:hover::before {
  left: 130%;
  transition: left 0.6s;
}
.asset:not(.rec) .dl-btn,
.dl-none + .dl-btn {
  background: transparent;
  color: var(--ink);
}
.dl-none + .dl-btn {
  justify-self: start;
  background: var(--accent);
  color: #fff;
}
.cmd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.7rem 1rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  background: #060404;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.cmd code {
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

/* Détails : notes, historique, guide */
.dl-notes,
.dl-hist,
.guide details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
}
.dl-notes > summary,
.dl-hist > summary,
.guide summary {
  list-style: none;
  cursor: pointer;
  padding: 0.8rem 1rem;
  font-weight: 500;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.dl-notes > summary::-webkit-details-marker,
.dl-hist > summary::-webkit-details-marker,
.guide summary::-webkit-details-marker,
.hist summary::-webkit-details-marker {
  display: none;
}
.dl-notes > summary::after,
.dl-hist > summary::after,
.guide summary::after {
  content: "+";
  margin-left: auto;
  font-family: "JetBrains Mono", monospace;
  color: var(--accent);
  transition: transform 0.25s;
}
details[open] > summary::after {
  content: "−";
}
.dl-notes[open] > summary,
.dl-hist[open] > summary,
.guide details[open] > summary {
  border-bottom: 1px solid var(--line);
}
.md {
  padding: 0.8rem 1rem 1rem;
  max-height: 340px;
  overflow-y: auto;
  font-size: 0.88rem;
  color: var(--muted);
  scrollbar-width: thin;
}
.md h4 {
  margin: 1rem 0 0.4rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text, var(--accent));
}
.md h4:first-child {
  margin-top: 0;
}
.md p {
  margin: 0 0 0.6rem;
}
.md ul,
.md ol {
  margin: 0 0 0.7rem;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.3rem;
}
.md ul {
  list-style: none;
  padding-left: 0;
}
.md ul li {
  position: relative;
  padding-left: 1rem;
}
.md ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  background: var(--accent);
  transform: rotate(45deg);
}
.md strong {
  color: var(--ink);
}
.md code {
  padding: 0.05rem 0.35rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8em;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}
.md a {
  color: var(--accent-text, var(--accent));
}
.md blockquote {
  margin: 0 0 0.7rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--accent);
}
.hist {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  display: grid;
  gap: 0.4rem;
}
.hist details {
  border: 1px solid var(--line);
  border-radius: 10px;
}
.hist summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.8rem;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
}
.hist summary b {
  font-family: "JetBrains Mono", monospace;
  color: var(--ink);
}
.hist summary .vname {
  color: var(--muted);
}
.hist summary time {
  margin-left: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
}
.vbody {
  display: grid;
  gap: 0.5rem;
  padding: 0.3rem 0.8rem 0.8rem;
}
.vasset {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.8rem;
  font-size: 0.85rem;
}
.vasset a {
  color: var(--accent-text, var(--accent));
  word-break: break-all;
}
.vasset small {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
}
.vbody .md {
  max-height: 220px;
  padding: 0.5rem 0 0;
  border-top: 1px solid var(--line);
}
.dl-src {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.2rem;
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.dl-src .link {
  margin: 0;
  font-size: 0.88rem;
}

/* ---------- Radar ---------- */
.radar-dl {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.tl-wrap {
  position: relative;
  padding: 1.4rem 0 0;
}
.lanes {
  position: relative;
  display: grid;
  gap: 1.1rem;
  padding-left: 7.5rem;
}
.lane {
  position: relative;
  display: flex;
  align-items: center;
}
.lname {
  position: absolute;
  right: 100%;
  margin-right: 1.1rem;
  width: 6.4rem;
  text-align: right;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.2;
}
.ltrack {
  position: relative;
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--line) 6%, var(--line) 94%, transparent);
}
.rdot {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  padding: 0;
  border: 2px solid var(--c);
  border-radius: 50%;
  background: #000;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}
.rdot:hover,
.rdot:focus-visible {
  transform: scale(1.5);
  background: var(--c);
  box-shadow: 0 0 18px var(--c);
}
.rdot.last {
  background: var(--c);
}
.rdot.last::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid var(--c);
  border-radius: 50%;
  animation: ring 2.4s ease-out infinite;
}
.axis {
  position: relative;
  height: 2rem;
  margin: 0.6rem 0 0 7.5rem;
  border-top: 1px solid var(--line);
}
.tick {
  position: absolute;
  top: 0.4rem;
  transform: translateX(-50%);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
}
.tick::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -0.45rem;
  width: 1px;
  height: 0.4rem;
  background: var(--line);
}
.now {
  position: absolute;
  top: 0;
  bottom: 2rem;
  left: 7.5rem;
  right: 0;
  pointer-events: none;
}
.now::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--now);
  border-left: 1px dashed var(--accent);
}
.now i {
  position: absolute;
  top: -1.3rem;
  left: var(--now);
  transform: translateX(-50%);
  font-style: normal;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text, var(--accent));
  white-space: nowrap;
}
.tl-tip {
  position: absolute;
  z-index: 5;
  display: grid;
  gap: 0.1rem;
  padding: 0.5rem 0.8rem;
  font-size: 0.75rem;
  white-space: nowrap;
  background: #060404;
  border: 1px solid var(--accent);
  border-radius: 10px;
  transform: translate(-50%, -100%);
  pointer-events: none;
}
.tl-tip[hidden] {
  display: none;
}
.tl-tip span {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
}
.bars-dl {
  display: grid;
  gap: 1.2rem;
}
.brow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 1rem;
  align-items: baseline;
}
.bname {
  font-size: 0.9rem;
}
.bval {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}
.bval b {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.5rem;
  color: var(--ink);
}
.bars-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text, var(--accent));
}
.btrack {
  grid-column: 1 / -1;
  height: 8px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.btrack i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--c);
  border-radius: inherit;
  box-shadow: 0 0 14px var(--c);
  transition: width 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.bars-dl.in .btrack i {
  width: var(--w);
}
.brow small {
  grid-column: 1 / -1;
  margin-top: -0.2rem;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
}

/* ---------- Guide ---------- */
.guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
  max-width: 860px;
}
.guide details,
.cmd {
  min-width: 0;
}
.guide details > :not(summary) {
  margin-inline: 1rem;
}
.guide details > p {
  margin-top: 0.9rem;
  color: var(--muted);
}
.guide details > p:last-child,
.guide details > .cmd:last-child {
  margin-bottom: 1rem;
}
.guide ol {
  margin: 0.9rem 1rem 1rem;
  padding-left: 1.3rem;
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
}
.guide code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85em;
  color: var(--ink);
}
.guide .cmd {
  margin-top: 0.8rem;
}
.guide b {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Fenêtre de téléchargement ---------- */
.dlm .dlm-box {
  width: min(640px, 100%);
}
.dlm-x {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
}
.dlm-x:hover {
  color: var(--ink);
}
.dlm-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.6rem;
  align-items: center;
  padding: 1.6rem 1.4rem 1rem;
}
.dlm-ring {
  --p: 0;
  position: relative;
  width: 124px;
  height: 124px;
  display: grid;
  place-items: center;
}
.dlm-ring svg {
  position: absolute;
  inset: 0;
  overflow: visible;
  transform: rotate(-90deg);
}
.dlm-ring circle {
  fill: none;
  stroke-width: 7;
}
.dlm-ring .trk {
  stroke: var(--line);
}
.dlm-ring .prg {
  stroke: var(--accent-hot);
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: calc(327 * (1 - var(--p)));
  filter: drop-shadow(0 0 8px var(--accent-hot));
}
.dlm-ring b {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.7rem;
}
.dlm.done .dlm-ring .prg {
  stroke: #4ade80;
  filter: drop-shadow(0 0 8px #4ade80);
}
.dlm-info {
  min-width: 0;
  display: grid;
  gap: 0.5rem;
}
.dlm-info h3 {
  font-size: 1.15rem;
  word-break: break-all;
}
.dlm-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.dlm-sha {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.66rem;
  color: var(--muted);
}
.dlm-sha code {
  max-width: 100%;
  overflow-x: auto;
  color: var(--ink);
  opacity: 0.85;
}
.dlm-steps {
  list-style: none;
  margin: 0.3rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.dlm-steps li::before {
  content: "○";
  margin-right: 0.6rem;
  color: var(--muted);
}
.dlm-steps li.ok {
  color: var(--ink);
}
.dlm-steps li.ok::before {
  content: "●";
  color: #4ade80;
}
.dlm-tips {
  padding: 0 1.4rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.dlm-tips ul {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
}
.dlm-ok {
  margin: 0;
  color: #4ade80;
}
.dlm-tips .warnline {
  color: var(--accent-text, var(--accent));
}
.dlm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 1rem 1.4rem 1.4rem;
}
.dlm-actions .btn {
  font: inherit;
  font-weight: 500;
  font-size: 0.88rem;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.dlm-actions .btn.primary {
  background: var(--accent);
  color: #fff;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.6rem;
  z-index: 10010;
  padding: 0.7rem 1.2rem;
  max-width: calc(100% - 2rem);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--ink);
  background: #060404;
  border: 1px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 0 40px rgba(209, 25, 25, 0.3);
  transform: translate(-50%, 20px);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}
.toast.in {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 900px) {
  .radar-dl {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .asset {
    grid-template-columns: auto 1fr;
  }
  .asset .dl-btn {
    grid-column: 1 / -1;
  }
  .dl-sort {
    margin-left: 0;
  }
  .lanes {
    padding-left: 5.2rem;
  }
  .lname {
    width: 4.4rem;
    font-size: 0.7rem;
    margin-right: 0.8rem;
  }
  .axis {
    margin-left: 5.2rem;
  }
  .now {
    left: 5.2rem;
  }
  .dlm-body {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .dlm-sha {
    justify-content: center;
  }
}

/* Crédit d'une image qui n'est pas la mienne */
.credit {
  margin: -0.3rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}
.credit a {
  color: var(--accent-text, var(--accent));
}
.project[data-repo="Dragon-Mounts-Legacy"] .shot.has-img > img {
  object-position: 50% 35%;
}
