/* Nikox-Game : calculateur de configuration Minecraft (/calculateur), chargé sur cette page seulement.
   S'appuie sur les composants du thème (nx-calc, nx-range, nx-gauge, nx-blocks, nx-btn) ; préfixe nx-cc-. */

/* ---------- en-tête ---------- */
.nx-cc-head { max-width: 46rem; }
.nx-cc-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; text-wrap: balance; }
.nx-cc-head p { margin-top: 1rem; font-size: 1.12rem; color: hsl(var(--color-muted)); max-width: 40rem; text-wrap: pretty; }

/* ---------- questions ---------- */
.nx-cc { align-items: stretch; }
.nx-cc-form { display: grid; gap: 2rem; align-content: start; }
.nx-cc-field { min-width: 0; border: 0; padding: 0; margin: 0; }
.nx-cc-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.nx-cc-row .nx-calc-label { margin-bottom: .2rem; }
.nx-cc-val { font-family: var(--font-mono); font-weight: 700; font-size: .95rem; color: var(--nx-violet-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.nx-cc-hint { font-size: .86rem; color: hsl(var(--color-muted)); max-width: 34rem; text-wrap: pretty; }

.nx-cc-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
@media (min-width: 560px) { .nx-cc-types { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .nx-cc-types { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.nx-cc-type { display: grid; gap: .15rem; text-align: left; padding: .7rem .8rem; border-radius: .9rem; border: 2px solid hsl(var(--color-neutral));
    background: hsl(var(--color-background-secondary)); color: hsl(var(--color-base)); cursor: pointer;
    transition: border-color .15s, background-color .15s, transform .2s cubic-bezier(.16, 1, .3, 1); }
.nx-cc-type b { font-weight: 800; font-size: .98rem; }
.nx-cc-type span { font-size: .78rem; line-height: 1.25; color: hsl(var(--color-muted)); }
.nx-cc-type:hover { transform: translateY(-2px); border-color: color-mix(in srgb, hsl(var(--color-primary)) 45%, hsl(var(--color-neutral))); }
.nx-cc-type[aria-pressed="true"] { border-color: hsl(var(--color-primary)); background: color-mix(in srgb, hsl(var(--color-primary)) 9%, hsl(var(--color-background-secondary)));
    box-shadow: 0 3px 0 var(--nx-violet-deep); transform: translateY(-2px); }
.nx-cc-type[aria-pressed="true"] b { color: var(--nx-violet-ink); }
.nx-cc-type:focus-visible { outline: 3px solid var(--nx-gold); outline-offset: 2px; }

.nx-cc-vanilla { border-radius: 1rem; background: var(--nx-sunk); padding: 1rem 1.1rem; }
.nx-cc-vanilla .nx-calc-label { margin-bottom: .35rem; }
.nx-cc-vanilla p:last-child { font-size: .92rem; color: hsl(var(--color-muted)); text-wrap: pretty; }

.nx-cc-scale { position: relative; height: 1.1rem; font-family: var(--font-mono); font-size: .72rem; color: hsl(var(--color-muted)); margin-bottom: .6rem; }
.nx-cc-scale span { position: absolute; top: 0; }
.nx-cc-scale span:first-child { left: .35rem; }
.nx-cc-scale span:last-child { right: .2rem; }
/* 10 se trouve à (10 − 3) / (16 − 3) = 53,8 % de la glissière */
.nx-cc-scale .nx-cc-scale-def { left: 53.8%; transform: translateX(-50%); white-space: nowrap; }

/* ---------- carte des chunks (vue du dessus) ---------- */
.nx-cc-vue { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .nx-cc-vue { grid-template-columns: minmax(0, 1fr) 12.5rem; align-items: start; } }
.nx-cc-map { margin: 0; }
.nx-cc-map-grid { --n: 33; position: relative; aspect-ratio: 1; width: 100%; max-width: 15rem; margin-inline: auto; border-radius: .9rem; overflow: hidden;
    background-color: var(--nx-sunk);
    background-image: linear-gradient(hsl(var(--color-neutral)) 1px, transparent 1px), linear-gradient(90deg, hsl(var(--color-neutral)) 1px, transparent 1px);
    background-size: calc(100% / var(--n)) calc(100% / var(--n)); background-position: -1px -1px;
    box-shadow: inset 0 0 0 1px hsl(var(--color-neutral)); }
/* zones à pleine taille réduites par transform (animation fluide) ; contour compensé pour rester à 1,5 px */
.nx-cc-map-grid i { position: absolute; inset: 0; border-radius: 2px; transition: transform .45s cubic-bezier(.16, 1, .3, 1); }
.nx-cc-map-vue { transform: scale(calc(var(--vue) / 33)); --c: color-mix(in srgb, hsl(var(--color-primary)) 70%, transparent);
    background: color-mix(in srgb, hsl(var(--color-primary)) 26%, transparent); box-shadow: inset 0 0 0 calc(1.5px * 33 / var(--vue)) var(--c); }
.nx-cc-map-sim { transform: scale(calc(var(--sim) / 33));
    background: color-mix(in srgb, var(--nx-gold) 55%, transparent); box-shadow: inset 0 0 0 calc(1.5px * 33 / var(--sim)) var(--nx-gold-deep); }
.nx-cc-map-grid .nx-cc-map-moi { inset: auto; left: 50%; top: 50%; translate: -50% -50%; transition: none; width: calc(100% / 33 + 2px); height: calc(100% / 33 + 2px); background: var(--nx-violet-deep); box-shadow: 0 0 0 2px #fff; border-radius: 50% !important; }
.dark .nx-cc-map-vue { --c: var(--nx-violet-ink); background: color-mix(in srgb, hsl(var(--color-primary)) 42%, transparent); }
.dark .nx-cc-map figcaption i.v { background: color-mix(in srgb, hsl(var(--color-primary)) 42%, transparent); box-shadow: inset 0 0 0 1.5px var(--nx-violet-ink); }
.dark .nx-cc-map-grid .nx-cc-map-moi, .dark .nx-cc-map figcaption i.m { background: #fff; box-shadow: 0 0 0 2px var(--nx-violet-deep); }
.nx-cc-map figcaption { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem .9rem; margin-top: .6rem; font-size: .76rem; color: hsl(var(--color-muted)); }
.nx-cc-map figcaption span { display: inline-flex; align-items: center; gap: .35rem; }
.nx-cc-map figcaption i { width: .8rem; height: .8rem; border-radius: 3px; display: inline-block; }
.nx-cc-map figcaption i.v { background: color-mix(in srgb, hsl(var(--color-primary)) 26%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, hsl(var(--color-primary)) 70%, transparent); }
.nx-cc-map figcaption i.s { background: color-mix(in srgb, var(--nx-gold) 55%, transparent); box-shadow: inset 0 0 0 1.5px var(--nx-gold-deep); }
.nx-cc-map figcaption i.m { background: var(--nx-violet-deep); border-radius: 50%; }

/* ---------- verdict ---------- */
.nx-cc-res { display: grid; align-content: start; }
.nx-cc-for { font-size: .9rem; font-weight: 700; color: var(--nx-on-violet-2); }
.nx-cc-ram { margin-bottom: .6rem; }
.nx-cc-ram small { white-space: nowrap; }
.nx-cc-sum { color: var(--nx-on-violet-2); font-size: .97rem; max-width: 30rem; text-wrap: pretty; min-height: 2.9em; }
.nx-cc-gauges { margin-top: 1.4rem; }
.nx-cc-gauges .nx-gauge { grid-template-columns: 5.7rem minmax(0, 1fr) auto; }
.nx-cc-gauges .nx-blocks i { transition: background-color .25s; }
.nx-cc-gauges .nx-blocks i.on.chaud { background: var(--nx-gold); }
.nx-cc-note { margin-top: .8rem; font-size: .78rem; line-height: 1.45; color: var(--nx-on-violet-2); }
.nx-cc-note span { display: block; margin-top: .2rem; font-weight: 700; }

.nx-cc-alert { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); gap: .65rem; margin-top: 1rem; padding: .85rem .95rem; border-radius: .9rem;
    background: rgb(255 255 255 / .12); font-size: .88rem; line-height: 1.45; }
.nx-cc-alert > svg { width: 1.25rem; height: 1.25rem; color: var(--nx-gold); margin-top: .05rem; }
.nx-cc-alert-fort { background: rgb(255 255 255 / .18); box-shadow: inset 0 0 0 1.5px var(--nx-gold); }
.nx-cc-alert-btn { margin-top: .5rem; font-weight: 800; font-size: .85rem; color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--nx-gold); cursor: pointer; }
.nx-cc-alert-btn:hover { text-decoration-thickness: 2px; }

.nx-cc-buy { margin-top: 1.5rem; padding-top: 1.3rem; border-top: 1px solid rgb(255 255 255 / .18); }
.nx-cc-price { font-size: 1rem; color: var(--nx-on-violet-2); }
.nx-cc-price b { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; color: #fff; margin-right: .2rem; }
.nx-cc-detail { font-size: .82rem; color: var(--nx-on-violet-2); margin-top: .15rem; }
.nx-cc-fine { font-size: .75rem; margin-top: .9rem; color: var(--nx-on-violet-2); }

/* ---------- mobile : barre de verdict (remplace la barre d'action du site sur cette page) ---------- */
.nx-mobile-cta { display: none !important; }
.nx-cc-bar { display: none; }
@media (max-width: 1023px) {
    .nx-cc-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
        padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom, 0px)); background: hsl(var(--color-primary)); color: #fff;
        box-shadow: 0 -10px 24px -12px rgb(27 20 51 / .45); transform: translateY(110%); transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
    .nx-cc-bar.on { transform: none; }
    .nx-cc-bar p { display: grid; line-height: 1.15; min-width: 0; }
    .nx-cc-bar b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
    .nx-cc-bar span { font-size: .8rem; color: var(--nx-on-violet-2); }
}

/* ---------- réglages ---------- */
.nx-cc-steps-wrap { margin-top: clamp(3rem, 7vw, 5rem); }
.nx-cc-lead { margin-top: .6rem; color: hsl(var(--color-muted)); max-width: 44rem; text-wrap: pretty; }
.nx-cc-steps { counter-reset: nx-cc; display: grid; gap: 1rem; margin-top: 1.8rem; }
@media (min-width: 900px) { .nx-cc-steps { grid-template-columns: 1fr 1.35fr .9fr; } }
.nx-cc-steps > li { counter-increment: nx-cc; position: relative; padding: 1.2rem 1.25rem 1.3rem; border-radius: 1.2rem; min-width: 0;
    background: hsl(var(--color-background-secondary)); border: 1px solid hsl(var(--color-neutral)); }
.nx-cc-steps > li::before { content: counter(nx-cc); display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: .6rem; margin-bottom: .75rem;
    font-family: var(--font-display); font-weight: 800; background: hsl(var(--color-primary)); color: #fff; box-shadow: 0 3px 0 var(--nx-violet-deep); }
.nx-cc-steps h3 { font-weight: 800; font-size: 1.05rem; line-height: 1.3; }
.nx-cc-steps p { margin-top: .3rem; font-size: .9rem; color: hsl(var(--color-muted)); text-wrap: pretty; }

.nx-cc-kv { display: grid; gap: .45rem; margin-top: .9rem; }
.nx-cc-kv div { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .55rem .75rem; border-radius: .7rem; background: var(--nx-sunk); }
.nx-cc-kv dt { font-size: .88rem; font-weight: 600; }
.nx-cc-kv dd { font-family: var(--font-mono); font-weight: 700; color: var(--nx-violet-ink); font-variant-numeric: tabular-nums; }

.nx-cc-code { position: relative; margin-top: .9rem; border-radius: .9rem; background: var(--nx-console); color: hsl(252 100% 95%); }
.nx-cc-code pre { margin: 0; padding: .9rem 1rem; padding-right: 6.5rem; overflow-x: auto; font-family: var(--font-mono); font-size: .84rem; line-height: 1.65; }
.nx-cc-code code { display: block; white-space: pre; }
.nx-cc-copy { position: absolute; top: .55rem; right: .55rem; display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .6rem; border-radius: .55rem;
    font-size: .78rem; font-weight: 700; color: #fff; background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .18); cursor: pointer; transition: background-color .15s; }
.nx-cc-copy:hover { background: rgb(255 255 255 / .18); }
.nx-cc-copy svg { width: 1rem; height: 1rem; }
.nx-cc-copy:focus-visible { outline: 3px solid var(--nx-gold); outline-offset: 2px; }

.nx-cc-more { margin-top: 2.6rem; }
.nx-cc-more h3 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 800; letter-spacing: -.02em; }
.nx-cc-tweaks { display: grid; margin-top: 1.1rem; border-radius: 1rem; overflow: hidden; border: 1px solid hsl(var(--color-neutral)); background: hsl(var(--color-background-secondary)); }
.nx-cc-tweaks li { display: grid; gap: .35rem .9rem; padding: .85rem 1rem; }
.nx-cc-tweaks li + li { border-top: 1px solid hsl(var(--color-neutral)); }
@media (min-width: 900px) { .nx-cc-tweaks li { grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr) minmax(0, 1.5fr); align-items: center; } }
.nx-cc-tw-key { display: grid; gap: .1rem; min-width: 0; }
.nx-cc-tw-key code { font-family: var(--font-mono); font-size: .84rem; font-weight: 700; overflow-wrap: anywhere; }
.nx-cc-tw-key span { font-family: var(--font-mono); font-size: .74rem; color: hsl(var(--color-muted)); overflow-wrap: anywhere; }
.nx-cc-tw-val { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-family: var(--font-mono); font-size: .84rem; }
.nx-cc-tw-val span { color: hsl(var(--color-muted)); text-decoration: line-through; text-decoration-color: color-mix(in srgb, hsl(var(--color-muted)) 60%, transparent); }
.nx-cc-tw-val svg { width: 1rem; height: 1rem; color: hsl(var(--color-muted)); flex: none; }
.nx-cc-tw-val b { color: var(--nx-violet-ink); padding: .1rem .45rem; border-radius: .45rem; background: color-mix(in srgb, hsl(var(--color-primary)) 10%, transparent); }
.nx-cc-tw-why { font-size: .88rem; color: hsl(var(--color-muted)); text-wrap: pretty; }

.nx-cc-exts { display: grid; gap: .55rem; margin-top: 1.1rem; }
@media (min-width: 720px) { .nx-cc-exts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nx-cc-exts li { display: grid; gap: .1rem; padding: .75rem .95rem; border-radius: .9rem; background: hsl(var(--color-background-secondary)); border: 1px solid hsl(var(--color-neutral)); }
.nx-cc-exts b { font-weight: 800; }
.nx-cc-exts span { font-size: .88rem; color: hsl(var(--color-muted)); }

.nx-cc-foot { margin-top: 2.6rem; font-size: .86rem; color: hsl(var(--color-muted)); max-width: 46rem; text-wrap: pretty; }
.nx-cc-foot a { font-weight: 700; color: var(--nx-violet-ink); text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
    .nx-cc-map-grid i, .nx-cc-type, .nx-cc-gauges .nx-blocks i, .nx-cc-bar { transition: none; }
}
