/* =====================================================================
   details-new.css — refonte de la fiche asset (préversion)

   Chargé après style.css, index-new.css et assets-new.css : reprend
   jetons (--nx-*), boutons, libellés et grille de cartes. Préfixe
   .nxd-, scopé body.details-new.
   ===================================================================== */

body.details-new {
  --nxd-vote: #FFD36B;
  --nxd-finishing: #7FD3A0;
}

.nxd-ico {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =====================================================================
   HERO — cover plein cadre
   ===================================================================== */

.nxd-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: clamp(520px, 82vh, 860px);
  padding: 120px 0 clamp(40px, 5vw, 70px);
  background: var(--nx-ink-950);
}

.nxd-hero__media {
  position: absolute;
  inset: -4% 0 auto;
  height: 112%;
  z-index: -2;
  transform: translate3d(0, var(--nxd-y, 0px), 0) scale(1.02);
  will-change: transform;
}
.nxd-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: nxd-zoom 2.2s var(--nx-ease) both;
}
@keyframes nxd-zoom {
  from { transform: scale(1.08); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* Contenu réservé : la cover reste une ambiance, illisible */
.nxd-hero--locked .nxd-hero__media img {
  filter: blur(28px) grayscale(.6) brightness(.55);
  transform: scale(1.15);
  animation: none;
}

.nxd-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(11, 10, 12, .55) 0%, transparent 22%),
    linear-gradient(0deg, var(--nx-ink-900) 0%, rgba(18, 16, 19, .82) 30%, rgba(18, 16, 19, .15) 62%, transparent 100%),
    linear-gradient(90deg, rgba(11, 10, 12, .55) 0%, transparent 55%);
}

.nxd-hero__inner { width: 100%; }

.nxd-crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(22px, 3vw, 34px);
  font-size: var(--nx-fs-micro);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--nx-mute-soft);
}
.nxd-crumbs a { color: var(--nx-mute); text-decoration: none; transition: color .3s; }
.nxd-crumbs a:hover { color: var(--nx-orange-soft); }

.nxd-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px clamp(32px, 5vw, 80px);
}

.nxd-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 6px 13px;
  border-radius: var(--nx-r-sm);
  background: rgba(11, 10, 12, .6);
  border: 1px solid var(--nxd-c, var(--nx-orange-soft));
  color: var(--nx-white);
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.nxd-status__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--nxd-c, var(--nx-orange-soft)); }
.nxd-status--vote      { --nxd-c: var(--nxd-vote); }
.nxd-status--finishing { --nxd-c: var(--nxd-finishing); }
.nxd-status--beta      { --nxd-c: var(--nx-orange); }

.nxd-title {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2.6rem, 7vw, 6rem);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--nx-white);
  text-shadow: 0 4px 40px rgba(0, 0, 0, .35);
}
.nxd-type { margin-top: 14px; font-size: clamp(1.3rem, 2.4vw, 1.9rem); }

.nxd-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: clamp(24px, 3vw, 34px) 0 0;
  padding: 0;
  list-style: none;
}
.nxd-facts li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px clamp(18px, 2.4vw, 30px);
  border-left: 1px solid var(--nx-line-2);
}
.nxd-facts li:first-child { padding-left: 0; border-left: 0; }
.nxd-facts span {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--nx-mute-soft);
}
.nxd-facts strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--nx-white);
  font-variant-numeric: tabular-nums;
}
.nxd-star { color: var(--nxd-vote); }

/* --- Téléchargement --- */

.nxd-dl { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.nxd-dl__btn { box-shadow: 0 18px 40px rgba(234, 136, 69, .28); }
.nxd-dl__note {
  margin: 0;
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--nx-mute-soft);
}
.nxd-dl__locked {
  margin: 0;
  font-size: var(--nx-fs-micro);
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--nx-orange-soft);
}
.nxd-dl__notice {
  max-width: 360px;
  padding: 18px 20px;
  border: 1px solid rgba(234, 136, 69, .45);
  border-radius: var(--nx-r-md);
  background: rgba(11, 10, 12, .55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.nxd-dl__notice p { margin: 0 0 12px; font-size: .86rem; line-height: 1.6; color: var(--nx-mute); }

/* =====================================================================
   CORPS — galerie + fiche
   ===================================================================== */

.nxd-body {
  background: var(--nx-ink-900);
  padding: clamp(40px, 5vw, 72px) 0 var(--nx-space-section);
}

.nxd-body__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.nxd-main  { grid-column: 1; grid-row: 1; min-width: 0; }
.nxd-aside { grid-column: 2; grid-row: 1; align-self: stretch; }
.nxd-aside__inner {
  position: sticky;
  top: 70px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nxd-card {
  padding: clamp(22px, 2.4vw, 30px);
  border: 1px solid var(--nx-line-2);
  border-radius: var(--nx-r-lg);
  background: var(--nx-ink-800);
}
.nxd-card .nx-label { margin-bottom: 16px; }

.nxd-desc {
  font-size: .95rem;
  line-height: 1.75;
  color: rgba(250, 245, 240, .78);
}

.nxd-specs { margin: 0; }
.nxd-specs > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--nx-line);
}
.nxd-specs > div:last-child { border-bottom: 0; }
.nxd-specs dt {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--nx-mute-soft);
}
.nxd-specs dd {
  margin: 0;
  text-align: right;
  font-size: .9rem;
  font-weight: 700;
  color: var(--nx-white);
  font-variant-numeric: tabular-nums;
}
.nxd-specs dd a { color: var(--nx-orange-soft); text-decoration: none; }
.nxd-specs dd a:hover { text-decoration: underline; text-underline-offset: 3px; }

.nxd-aside__dl { margin-top: 22px; }
.nxd-aside__dl .nx-btn { width: 100%; justify-content: center; box-sizing: border-box; }

.nxd-share {
  margin-top: 20px;
  background: none;
  border: 0;
  padding: 0 0 4px;
  cursor: pointer;
  font-family: inherit;
}

/* --- Galerie : une image en tête, puis grille de deux --- */

.nxd-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 16px);
}

.nxd-shot {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--nx-r-lg);
  background: var(--nx-ink-800);
  cursor: zoom-in;
}
.nxd-shot--lead { grid-column: 1 / -1; aspect-ratio: 16 / 9; }

.nxd-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--nx-ease), filter .6s;
}
.nxd-shot:hover img { transform: scale(1.04); filter: brightness(1.06); }

/* Le liseré et le reflet de style.css (.gallery-item::before/::after)
   restent actifs ; on aligne simplement leur arrondi. */
body.details-new .nxd-shot::before { border-radius: var(--nx-r-lg); }

.nxd-shot__zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 12;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(11, 10, 12, .6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s, transform .45s var(--nx-ease);
  pointer-events: none;
}
.nxd-shot__zoom svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--nx-white);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nxd-shot:hover .nxd-shot__zoom { opacity: 1; transform: none; }

/* =====================================================================
   COMMENTAIRES
   ===================================================================== */

.nxd-comments { margin-top: clamp(48px, 6vw, 80px); }

.nxd-comments__head {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--nx-line);
}
.nxd-h3 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--nx-white);
}
.nxd-count {
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: 0;
  padding: 4px 9px;
  border: 1px solid var(--nx-line-2);
  border-radius: var(--nx-r-sm);
  color: var(--nx-mute);
}

/* style.css stylise `form` et `textarea` globalement : on repart à zéro */
body.details-new form.nxd-form,
body.details-new form.nxd-inline {
  width: auto;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
body.details-new form.nxd-form { margin-bottom: 30px; }

.nxd-form textarea {
  display: block;
  width: 100%;
  min-height: 96px;
  box-sizing: border-box;
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--nx-line-2);
  border-radius: var(--nx-r-md);
  background: var(--nx-ink-800);
  color: var(--nx-white);
  font: 500 .95rem/1.6 "Figtree", system-ui, sans-serif;
  resize: vertical;
  outline: none;
  transition: border-color .3s;
}
.nxd-form textarea::placeholder { color: var(--nx-mute-soft); }
.nxd-form textarea:focus { border-color: var(--nx-orange); }

.nxd-form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
}
.nxd-form__row .nx-btn { margin-left: auto; }

.nxd-optin {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  color: var(--nx-mute);
  cursor: pointer;
}
.nxd-optin input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--nx-orange);
  -webkit-appearance: checkbox;
  appearance: auto;
}

.nxd-login,
.nxd-empty {
  margin: 0 0 26px;
  font-size: .92rem;
  color: var(--nx-mute);
}
.nxd-login .nx-link { margin-left: 10px; }
.nxd-empty {
  padding: 30px;
  border: 1px dashed var(--nx-line-2);
  border-radius: var(--nx-r-lg);
  text-align: center;
}

.nxd-thread { margin: 0; padding: 0; list-style: none; }

.nxd-comment {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--nx-line);
}
.nxd-comment:target { animation: nxd-flash 2s var(--nx-ease); }
@keyframes nxd-flash {
  0%, 30% { background: rgba(234, 136, 69, .08); }
  100%    { background: transparent; }
}

.nxd-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--nx-ink-700);
  border: 1px solid var(--nx-line-2);
  color: var(--nx-orange-soft);
  font-weight: 900;
}
.nxd-avatar img { width: 100%; height: 100%; object-fit: cover; }

.nxd-comment__meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 2px 0 8px;
}
.nxd-comment__meta strong { font-size: .95rem; color: var(--nx-white); }
.nxd-comment__meta time { font-size: .76rem; color: var(--nx-mute-soft); }
.nxd-badge {
  padding: 2px 8px;
  border: 1px solid var(--nx-orange);
  border-radius: 999px;
  color: var(--nx-orange);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nxd-comment__text {
  font-size: .94rem;
  line-height: 1.7;
  color: rgba(250, 245, 240, .8);
  overflow-wrap: anywhere;
}

.nxd-comment__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.nxd-thumb,
.nxd-delete {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid var(--nx-line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--nx-mute);
  font: 700 .78rem "Figtree", system-ui, sans-serif;
  cursor: pointer;
  transition: color .3s, border-color .3s, background-color .3s;
}
.nxd-thumb svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}
.nxd-thumb:hover { color: var(--nx-white); border-color: rgba(250, 245, 240, .34); }
.nxd-thumb.is-active {
  color: var(--nx-orange-soft);
  border-color: rgba(234, 136, 69, .6);
  background: rgba(234, 136, 69, .1);
}
.nxd-thumb.is-active svg { fill: rgba(234, 136, 69, .25); }
.nxd-delete { border-color: transparent; padding-left: 4px; padding-right: 4px; }
.nxd-delete:hover { color: #FF8A91; }

/* =====================================================================
   ACCÈS RÉSERVÉ
   ===================================================================== */

.nxd-lock {
  background: var(--nx-ink-900);
  padding: clamp(20px, 3vw, 40px) 0 var(--nx-space-section);
}
.nxd-lock__panel {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px);
  border: 1px solid rgba(234, 136, 69, .5);
  border-radius: var(--nx-r-lg);
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(234, 136, 69, .14), transparent 65%),
    var(--nx-ink-800);
  text-align: center;
}
.nxd-lock__panel .nx-label { justify-content: center; }
.nxd-lock__icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 22px;
  border-radius: 50%;
  border: 1px solid rgba(234, 136, 69, .5);
  background: rgba(234, 136, 69, .1);
}
.nxd-lock__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--nx-orange-soft);
  stroke-width: 1.6;
  stroke-linecap: round;
}
.nxd-lock__title {
  margin: 0;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: var(--nx-white);
}
.nxd-lock__text {
  max-width: 52ch;
  margin: 18px auto 28px;
  font-size: .98rem;
  line-height: 1.7;
  color: var(--nx-mute);
}
.nxd-lock__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 0;
}

/* =====================================================================
   MÊME CATÉGORIE
   ===================================================================== */

.nxd-related {
  background: var(--nx-ink-800);
  border-top: 1px solid var(--nx-line);
  padding: var(--nx-space-section) 0;
}
.nxd-related .nx-h2 { font-size: clamp(1.8rem, 4vw, 3rem); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

@media (max-width: 1000px) {
  .nxd-body__grid { grid-template-columns: 1fr; }
  .nxd-aside, .nxd-main { grid-column: 1; grid-row: auto; }
  .nxd-aside__inner { position: static; }
  /* la fiche (description + téléchargement) passe avant la galerie */
  .nxd-aside { order: -1; }
  /* le bouton est déjà dans le hero juste au-dessus */
  .nxd-aside__dl { display: none; }
}

@media (max-width: 760px) {
  .nxd-hero { min-height: 78svh; padding-top: 100px; }
  .nxd-hero__grid { grid-template-columns: 1fr; }
  .nxd-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .nxd-facts li { padding: 0; border-left: 0; }
  .nxd-gallery { grid-template-columns: 1fr 1fr; gap: 8px; }
  .nxd-shot { border-radius: var(--nx-r-md); }
  .nxd-shot__zoom { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nxd-hero__media { transform: none; }
  .nxd-hero__media img { animation: none; }
  .nxd-comment:target { animation: none; }
}
