/* ==========================================================================
   GameFinds TNT Box — écran dédié (installation + personnalisation)
   Réutilise le thème du launcher (variables --acc, --panel, --line…) : la couleur d'accent suit le jeu.
   ========================================================================== */
#screen-tnt { padding: 0; align-items: stretch; justify-content: stretch; overflow: hidden; background: var(--bg); }
.tn-shell { display: flex; flex: 1; min-height: 0; width: 100%; }
.tn-rail { width: 224px; }
.tn-brand { display: flex; align-items: center; gap: 10px; padding: 2px 18px 16px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.tn-brand img { width: 34px; height: 34px; }
.tn-brand b { display: block; font-family: "Agency FB", "Oswald", "Segoe UI", sans-serif; font-size: 17px; letter-spacing: .08em; color: var(--txt); line-height: 1.1; }
.tn-brand small { color: var(--acc-2); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.tn-nav { display: flex; flex-direction: column; }
.tn-pill { font-size: 11px; font-weight: 700; padding: 5px 9px; text-align: center; border: 1px solid var(--line-2); color: var(--txt-dim); background: #000; border-radius: 999px; margin-bottom: 10px; }
.tn-pill.ok { color: var(--ok); border-color: rgba(143,209,79,.45); }

.tn-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: radial-gradient(70% 40% at 50% 0%, color-mix(in srgb, var(--gc) 8%, transparent), transparent 65%), var(--bg); }
.tn-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 22px 32px 14px; border-bottom: 1px solid var(--line); }
.tn-head h1 { font-size: 26px; font-weight: 700; color: var(--txt); line-height: 1.1; }
.tn-head p { color: var(--txt-dim); font-size: 13px; margin-top: 4px; }
.tn-save { font-size: 12px; font-weight: 600; color: var(--txt-dim); white-space: nowrap; min-height: 18px; }
.tn-save.saved { color: var(--ok); }
.tn-save.error { color: var(--danger); }
.tn-page { flex: 1; overflow-y: auto; padding: 22px 32px 40px; }
.tn-page::-webkit-scrollbar { width: 10px; }
.tn-page::-webkit-scrollbar-thumb { background: #2a2a31; border-radius: 6px; }

.tn-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; max-width: 1240px; }
.tn-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tn-stack { display: flex; flex-direction: column; gap: 16px; max-width: 1240px; }
@media (max-width: 1080px) { .tn-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- cartes et champs ---------- */
.tn-card { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tn-chead { padding: 14px 18px 10px; border-bottom: 1px solid var(--line); }
.tn-chead h3 { font-size: 15px; color: var(--txt); font-weight: 700; }
.tn-chead p { color: var(--txt-dim); font-size: 12.5px; margin-top: 3px; line-height: 1.45; }
.tn-cbody { padding: 6px 18px 16px; }
.tn-field { display: grid; grid-template-columns: minmax(180px, 38%) minmax(0, 1fr); gap: 6px 18px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.tn-field:first-child { border-top: 0; }
.tn-flabel { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tn-fname { font-size: 13.5px; color: var(--txt); font-weight: 600; }
.tn-fhelp { font-size: 11.5px; color: var(--txt-dim); line-height: 1.4; }
.tn-fctl { min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 760px) { .tn-field { grid-template-columns: 1fr; } }

.tn-num { display: flex; align-items: center; gap: 10px; width: 100%; }
.tn-num input[type=range], .tn-fsize input[type=range], .tn-mrow input[type=range] { flex: 1; min-width: 80px; accent-color: var(--acc); }
.tn-num input[type=number], .tn-rows { width: 74px; background: #0b0b0e; color: var(--txt); border: 1px solid var(--line-2); border-radius: 7px; padding: 6px 8px; font: inherit; font-size: 13px; text-align: right; }
.tn-unit { color: var(--txt-dim); font-size: 12px; min-width: 34px; }
input:focus, select:focus, button:focus-visible { outline: 2px solid color-mix(in srgb, var(--acc) 70%, transparent); outline-offset: 1px; }

.tn-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; cursor: pointer; }
.tn-switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.tn-switch span { position: absolute; inset: 0; background: #2a2a31; border: 1px solid var(--line-2); border-radius: 999px; transition: background .15s; }
.tn-switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #aab; transition: transform .15s, background .15s; }
.tn-switch input:checked + span { background: color-mix(in srgb, var(--acc) 55%, #000); border-color: var(--acc); }
.tn-switch input:checked + span::after { transform: translateX(18px); background: #fff; }
.tn-switch input:focus-visible + span { outline: 2px solid color-mix(in srgb, var(--acc) 70%, transparent); outline-offset: 2px; }

.tn-select, .tn-text, .tn-hex, .tn-custom, .tn-search, .tn-pin {
  background: #0b0b0e; color: var(--txt); border: 1px solid var(--line-2); border-radius: 7px; padding: 7px 10px; font: inherit; font-size: 13px; min-width: 0;
}
.tn-select { min-width: 190px; }
.tn-text { width: 100%; max-width: 320px; }
.tn-stackrow { display: flex; gap: 8px; flex-wrap: wrap; }
.tn-color { width: 38px; height: 32px; padding: 0; border: 1px solid var(--line-2); border-radius: 7px; background: none; cursor: pointer; }
.tn-hex { width: 92px; font-family: Consolas, monospace; text-transform: uppercase; }
.tn-colorctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tn-swatches { display: flex; gap: 5px; }
.tn-swatch { width: 20px; height: 20px; border-radius: 5px; border: 1px solid rgba(255,255,255,.25); cursor: pointer; padding: 0; }
.tn-swatch:hover { transform: scale(1.15); }

/* ---------- sélecteur de bloc ---------- */
.tn-block { display: inline-flex; align-items: center; gap: 9px; background: #0b0b0e; color: var(--txt); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px; min-width: 220px; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.tn-block:hover { border-color: var(--acc); }
.tn-bname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-caret { color: var(--txt-dim); }
.tn-sw { width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(255,255,255,.28); flex-shrink: 0; display: inline-block; }
.tn-pop { position: fixed; z-index: 60; display: flex; flex-direction: column; background: #121216; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.65); overflow: hidden; }
.tn-pop .tn-search { margin: 10px; width: calc(100% - 20px); }
.tn-pop-body { flex: 1; overflow-y: auto; padding: 0 10px 8px; }
.tn-pop-group { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--acc-2); margin: 10px 2px 6px; font-weight: 700; }
.tn-pop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.tn-pop-item { display: flex; align-items: center; gap: 8px; background: transparent; border: 1px solid transparent; border-radius: 7px; color: var(--txt); padding: 5px 7px; font: inherit; font-size: 12px; cursor: pointer; text-align: left; }
.tn-pop-item:hover { background: #1c1c22; border-color: var(--line-2); }
.tn-pop-item.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 14%, transparent); }
.tn-pop-empty { color: var(--txt-dim); font-size: 12px; padding: 14px 4px; }
.tn-pop-foot { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.tn-pop-foot .tn-custom { flex: 1; }

/* ---------- aperçu de la box ---------- */
.tn-prev { display: flex; justify-content: center; padding: 6px 0 2px; }
.tn-prev-svg { width: 100%; max-width: 250px; height: auto; }
.tn-prev-txt { fill: var(--txt-dim); font-size: 10.5px; font-family: "Segoe UI", sans-serif; }

/* ---------- couches ---------- */
.tn-layers { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; }
.tn-layer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #0e0e12; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.tn-lidx { width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--acc) 22%, #000); color: var(--acc-2); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.tn-lx { color: var(--txt-dim); }
.tn-lbtns { margin-left: auto; display: flex; gap: 4px; }
.tn-ib { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--line-2); background: #17171c; color: var(--txt); cursor: pointer; font-size: 13px; }
.tn-ib:hover:not(:disabled) { border-color: var(--acc); color: var(--acc-2); }
.tn-ib.del:hover:not(:disabled) { border-color: var(--danger); color: #ff8b8d; }
.tn-ib:disabled { opacity: .3; cursor: default; }
.tn-hint { color: var(--txt-dim); font-size: 12.5px; margin-top: 10px; line-height: 1.5; }

/* ---------- boutons ---------- */
.tn-btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tn-btnrow.v { flex-direction: column; align-items: stretch; margin-top: 0; }
.tn-card .btn, .tn-modal .btn { clip-path: none; border-radius: 8px; text-transform: none; letter-spacing: 0; font-family: inherit; font-size: 12.5px; padding: 8px 14px; }
.tn-danger { border-color: rgba(229,72,77,.5); color: #ff8b8d; }
.tn-danger:hover:not(:disabled) { background: rgba(229,72,77,.14); border-color: var(--danger); color: #ff8b8d; }

/* ---------- accueil ---------- */
.tn-msg { margin-top: 16px; padding: 10px 14px; border-radius: 9px; font-size: 13px; line-height: 1.45; }
.tn-msg.ok { background: rgba(143,209,79,.12); border: 1px solid rgba(143,209,79,.4); color: #c7eba0; }
.tn-msg.err { background: rgba(229,72,77,.12); border: 1px solid rgba(229,72,77,.45); color: #ffb0b2; }
.tn-path { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; width: 100%; }
.tn-path code { flex: 1; min-width: 200px; font-family: Consolas, monospace; font-size: 12px; color: var(--acc-2); background: #000; border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; word-break: break-all; }
.tn-conn { font-size: 12.5px; font-weight: 600; margin-top: 8px; }
.tn-conn.ok { color: var(--ok); }
.tn-conn.off { color: var(--txt-dim); }

/* ---------- textes à l'écran ---------- */
.tn-fontctl { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.tn-fsize { display: flex; align-items: center; gap: 10px; }
.tn-fsl { font-size: 12px; color: var(--txt-dim); min-width: 40px; }
.tn-tip { background: color-mix(in srgb, var(--acc) 10%, var(--panel)); border: 1px solid color-mix(in srgb, var(--acc) 40%, var(--line)); border-radius: 10px; padding: 12px 16px; font-size: 13px; color: var(--txt); line-height: 1.5; }

/* ---------- logos ---------- */
.tn-imggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tn-imgbody { display: flex; flex-direction: column; gap: 14px; padding-top: 14px; }
.tn-imgprev { display: flex; align-items: center; justify-content: center; min-height: 190px; border-radius: 10px; border: 1px dashed var(--line-2);
  background: conic-gradient(#1a1a20 25%, #14141a 0 50%, #1a1a20 0 75%, #14141a 0) 0 0 / 20px 20px; overflow: hidden; }
.tn-imgprev img { max-width: 100%; max-height: 190px; image-rendering: auto; }
.tn-imgprev.empty span { color: var(--txt-dim); font-size: 12.5px; padding: 10px; text-align: center; }

.tn-modal { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.72); padding: 20px; }
.tn-mbox { width: min(760px, 100%); max-height: 100%; overflow-y: auto; background: #121216; border: 1px solid var(--line-2); border-radius: 14px; padding: 20px 22px; box-shadow: 0 30px 80px rgba(0,0,0,.7); }
.tn-mbox h3 { font-size: 18px; margin-bottom: 14px; }
.tn-mbody { display: grid; grid-template-columns: 280px 1fr; gap: 22px; }
@media (max-width: 700px) { .tn-mbody { grid-template-columns: 1fr; } }
.tn-cwrap { background: conic-gradient(#1c1c22 25%, #15151a 0 50%, #1c1c22 0 75%, #15151a 0) 0 0 / 16px 16px; border: 1px solid var(--line-2); border-radius: 8px; width: 280px; height: 280px; }
.tn-canvas { width: 280px; height: 280px; display: block; border-radius: 8px; }
.tn-mctl { display: flex; flex-direction: column; gap: 12px; }
.tn-mrow { display: flex; align-items: center; gap: 10px; }
.tn-mrow > label:first-child { min-width: 82px; font-size: 12.5px; color: var(--txt-dim); }
.tn-mfoot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ---------- podium ---------- */
.tn-prow { display: flex; gap: 8px; align-items: center; padding: 6px 0; }
.tn-prow .tn-text { max-width: none; flex: 1; }
.tn-prow .tn-score { flex: 0 0 90px; }
.tn-rank { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #1a1205; flex-shrink: 0; }
.tn-rank.r1 { background: #ffd34d; } .tn-rank.r2 { background: #cfd3d8; } .tn-rank.r3 { background: #d08a4f; }

/* ---------- commandes TIK360 ---------- */
.tn-actions { display: flex; flex-direction: column; margin-top: 12px; }
.tn-acat { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--acc-2); margin: 18px 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.tn-arow { display: grid; grid-template-columns: minmax(180px, 24%) minmax(160px, 28%) minmax(0, 1fr); gap: 10px 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid #1b1b21; }
@media (max-width: 1100px) { .tn-arow { grid-template-columns: 1fr; } }
.tn-ainfo b { display: block; font-size: 13.5px; color: var(--txt); }
.tn-ainfo small { color: var(--txt-dim); font-size: 11.5px; line-height: 1.35; display: block; }
.tn-ain { display: flex; gap: 8px; flex-wrap: wrap; }
.tn-plabel { display: flex; flex-direction: column; gap: 2px; font-size: 10.5px; color: var(--txt-dim); }
.tn-pin { width: 120px; padding: 5px 8px; font-size: 12.5px; }
.tn-acmd { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tn-acmd .tn-btnrow { margin-top: 0; }
.tn-cmd { display: block; font-family: Consolas, monospace; font-size: 12px; color: var(--acc-2); background: #000; border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; word-break: break-all; user-select: text; }
.tn-search { width: 100%; max-width: 360px; }

/* ---------- notifications ---------- */
.tn-toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: #1b1b22; border: 1px solid var(--line-2); color: var(--txt); padding: 10px 18px; border-radius: 10px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 80; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.tn-toast.show { opacity: 1; transform: translate(-50%, 0); }
.tn-toast.ok { border-color: rgba(143,209,79,.5); }
.tn-toast.err { border-color: rgba(229,72,77,.6); color: #ffb0b2; }

/* ---------- carte du sélecteur de jeu ---------- */
.gc-art-logo-tnt::after {
  /* logo carré à fond transparent : entier (contain) sur le dégradé de la carte, jamais rogné */
  background-image: url("assets/logo-tnt-box.webp");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.tn-steps { margin: 10px 0 12px 18px; display: flex; flex-direction: column; gap: 6px; color: var(--txt); font-size: 13px; line-height: 1.5; }
.tn-steps li::marker { color: var(--acc); font-weight: 700; }

/* ==================== Accueil (refonte) : préfixe hm- ==================== */
.hm { display: flex; flex-direction: column; gap: 22px; max-width: 1400px; }
/* ---------- Hero ---------- */
.hm-hero { position: relative; overflow: hidden; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--gc) 40%, var(--line)); padding: 34px 38px 30px;
  background:
    radial-gradient(60% 120% at 88% 40%, color-mix(in srgb, var(--gc) 30%, transparent), transparent 70%),
    linear-gradient(135deg, color-mix(in srgb, var(--gc) 16%, #0d0d11), #0b0b0e 75%); }
.hm-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(#ffffff0d 1px, transparent 1px), linear-gradient(90deg, #ffffff0d 1px, transparent 1px); background-size: 34px 34px;
  mask-image: radial-gradient(70% 100% at 90% 50%, #000, transparent 75%); -webkit-mask-image: radial-gradient(70% 100% at 90% 50%, #000, transparent 75%); }
.hm-art { position: absolute; right: 56px; top: 50%; transform: translateY(-50%); width: 210px; height: 210px; pointer-events: none; }
.hm-art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 38px color-mix(in srgb, var(--gc) 70%, transparent)); animation: hm-float 5s ease-in-out infinite; }
@keyframes hm-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hm-body { position: relative; max-width: 620px; }
.hm-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 6px 13px 6px 10px; border-radius: 999px; background: #0008; border: 1px solid var(--line-2); color: var(--txt); }
.hm-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.hm-chip.todo i { background: #ffb23d; box-shadow: 0 0 10px #ffb23d; }
.hm-chip.busy i { background: var(--gc); box-shadow: 0 0 10px var(--gc); animation: hm-pulse 1s infinite; }
@keyframes hm-pulse { 50% { opacity: .3; } }
.hm-hero h2 { font-family: "Agency FB", "Oswald", "Segoe UI", sans-serif; font-size: 44px; line-height: 1; letter-spacing: .04em; text-transform: uppercase; color: #fff; margin: 16px 0 8px; }
.hm-hero .hm-lead { color: var(--txt); opacity: .82; font-size: 15px; line-height: 1.55; max-width: 520px; }
.hm-cta { display: flex; align-items: center; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hm-play { display: inline-flex; align-items: center; gap: 12px; border: 0; cursor: pointer; font: inherit; font-size: 17px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff;
  padding: 16px 40px 16px 30px; border-radius: 12px; background: linear-gradient(180deg, color-mix(in srgb, var(--gc) 100%, #fff 12%), color-mix(in srgb, var(--gc) 100%, #000 18%));
  box-shadow: 0 8px 28px color-mix(in srgb, var(--gc) 45%, transparent), inset 0 1px 0 #fff4; transition: transform .12s, box-shadow .12s; }
.hm-play:hover { transform: translateY(-2px); box-shadow: 0 12px 34px color-mix(in srgb, var(--gc) 60%, transparent), inset 0 1px 0 #fff4; }
.hm-play svg { width: 20px; height: 20px; fill: #fff; }
.hm-ghost { background: #0007; color: var(--txt); border: 1px solid var(--line-2); border-radius: 12px; padding: 15px 20px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.hm-ghost:hover { border-color: var(--gc); color: #fff; }
.hm-hint { margin-top: 14px; color: var(--txt-dim); font-size: 12.5px; display: flex; align-items: center; gap: 8px; }
.hm-prog { margin-top: 24px; max-width: 520px; }
.hm-prog .bar { height: 10px; border-radius: 99px; background: #000; border: 1px solid var(--line); overflow: hidden; }
.hm-prog .bar i { display: block; height: 100%; width: 46%; background: linear-gradient(90deg, var(--gc-dim), var(--gc)); border-radius: 99px; }
.hm-prog span { display: block; margin-top: 8px; font-size: 12.5px; color: var(--txt-dim); }

/* ---------- Statut ---------- */
.hm-sec { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.hm-sec h3 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--txt-dim); font-weight: 700; }
.hm-sec a { font-size: 12px; color: var(--acc-2); cursor: pointer; }
.hm-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.hm-tile { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 12px; padding: 14px 15px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hm-tile .top { display: flex; align-items: center; justify-content: space-between; }
.hm-tile .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: #1b1b21; color: var(--txt-dim); }
.hm-tile .ic svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hm-tile .st { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: #23232a; color: var(--txt-dim); }
.hm-tile b { display: block; font-size: 13px; color: var(--txt); font-weight: 650; }
.hm-tile small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--txt-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-tile.ok .ic { background: rgba(143,209,79,.14); color: var(--ok); }
.hm-tile.ok .st { background: rgba(143,209,79,.2); color: var(--ok); }
.hm-tile.todo { border-color: #ffb23d55; }
.hm-tile.todo .ic { background: #ffb23d22; color: #ffb23d; }
.hm-tile.todo .st { background: #ffb23d2a; color: #ffb23d; }
.hm-tile.live .st { background: transparent; }
.hm-tile.live .st i { width: 10px; height: 10px; border-radius: 50%; background: #55555f; display: block; }
.hm-tile.live.on .st i { background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: hm-ring 1.6s infinite; }
@keyframes hm-ring { 0% { box-shadow: 0 0 0 0 #8fd14f88; } 100% { box-shadow: 0 0 0 9px #8fd14f00; } }
.hm-tile.live.on .ic { background: rgba(143,209,79,.14); color: var(--ok); }

/* ---------- Démarrage rapide ---------- */
.hm-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hm-step { position: relative; text-align: left; font: inherit; color: inherit; cursor: pointer; background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s, transform .15s; }
.hm-step:hover { border-color: var(--gc); transform: translateY(-2px); }
.hm-step .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: color-mix(in srgb, var(--gc) 22%, #111); color: #fff; border: 1px solid color-mix(in srgb, var(--gc) 55%, transparent); }
.hm-step.done .n { background: rgba(143,209,79,.18); border-color: rgba(143,209,79,.5); color: var(--ok); }
.hm-step b { font-size: 15px; color: #fff; font-weight: 700; margin-top: 4px; }
.hm-step p { font-size: 12.5px; color: var(--txt-dim); line-height: 1.5; }
.hm-step .go { margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--acc-2); letter-spacing: .03em; }

/* ---------- Confort ---------- */
.hm-comfort { display: grid; grid-template-columns: 1fr 1fr; background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 14px; }
.hm-opt { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 20px; }
.hm-opt + .hm-opt { border-left: 1px solid var(--line); }
.hm-opt b { display: block; font-size: 13.5px; color: var(--txt); font-weight: 650; }
.hm-opt small { display: block; margin-top: 3px; font-size: 12px; color: var(--txt-dim); line-height: 1.45; }

/* ---------- Avancé ---------- */
.hm-adv { border: 1px solid var(--line); border-radius: 14px; background: #0c0c0f; }
.hm-adv summary { list-style: none; cursor: pointer; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 650; color: var(--txt-dim); }
.hm-adv summary::-webkit-details-marker { display: none; }
.hm-adv summary::after { content: "▾"; }
.hm-adv[open] summary { border-bottom: 1px solid var(--line); color: var(--txt); }
.hm-advbody { padding: 6px 20px 18px; display: flex; flex-direction: column; }
.hm-advrow { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; border-top: 1px solid var(--line); }
.hm-advrow:first-child { border-top: 0; }
.hm-advrow b { font-size: 13px; color: var(--txt); font-weight: 600; display: block; }
.hm-advrow small { font-size: 11.5px; color: var(--txt-dim); }
.hm-advrow code { font-size: 11.5px; color: var(--txt-dim); background: #000; border: 1px solid var(--line); padding: 4px 8px; border-radius: 6px; }
.hm-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.hm-sec .ok { font-size: 12px; color: var(--ok); }
.hm-sec .warn { font-size: 12px; color: #ffb23d; }
.hm-hero .tn-msg { margin-top: 18px; max-width: 560px; }
@media (max-width: 1180px) { .hm-tiles { grid-template-columns: repeat(3, 1fr); } .hm-art { display: none; } .hm-steps { grid-template-columns: 1fr; } .hm-comfort { grid-template-columns: 1fr; } .hm-opt + .hm-opt { border-left: 0; border-top: 1px solid var(--line); } }

/* ==================== La box (refonte) : préfixe bx- ==================== */
/* ---------- Atelier : aperçu + réglages principaux ---------- */
.bx-studio { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 0; border-radius: 18px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--gc) 38%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--gc) 12%, #0d0d11), #0b0b0e 70%); }
.bx-view { position: relative; padding: 22px 22px 18px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; min-height: 430px;
  background: radial-gradient(70% 60% at 50% 45%, color-mix(in srgb, var(--gc) 20%, transparent), transparent 75%); border-right: 1px solid var(--line); }
.bx-view::before { content: ""; position: absolute; inset: 0; opacity: .35; pointer-events: none;
  background-image: linear-gradient(#ffffff0c 1px, transparent 1px), linear-gradient(90deg, #ffffff0c 1px, transparent 1px); background-size: 28px 28px;
  mask-image: radial-gradient(60% 70% at 50% 50%, #000, transparent 80%); -webkit-mask-image: radial-gradient(60% 70% at 50% 50%, #000, transparent 80%); }
.bx-view h3 { position: relative; align-self: flex-start; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--txt-dim); font-weight: 700; }
.bx-stage { position: relative; display: flex; align-items: flex-end; justify-content: center; flex: 1; padding: 18px 0 8px; }
.bx-sum { position: relative; text-align: center; }
.bx-sum span { font-size: 12.5px; color: var(--txt-dim); }

.bx-ctl { padding: 26px 30px; display: flex; flex-direction: column; gap: 22px; justify-content: center; }
.bx-grp > label, .bx-grp > .lbl { display: flex; align-items: baseline; justify-content: space-between; font-size: 13.5px; color: var(--txt); font-weight: 650; margin-bottom: 9px; }
.bx-grp > .lbl small { font-weight: 400; font-size: 12px; color: var(--txt-dim); }
.bx-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.bx-seg button { flex: 1; min-width: 86px; background: #121216; color: var(--txt); border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-align: center; line-height: 1.25; transition: border-color .12s, background .12s; }
.bx-seg button small { display: block; font-weight: 400; font-size: 11px; color: var(--txt-dim); margin-top: 2px; }
.bx-seg button:hover { border-color: var(--gc); }
.bx-seg button.on { background: color-mix(in srgb, var(--gc) 22%, #121216); border-color: var(--gc); color: #fff; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gc) 60%, transparent); }
.bx-seg button.on small { color: #ffd2cc; }
.bx-alt { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #0b0b0e; border: 1px solid var(--line); }
.bx-alt .lbl { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--txt-dim); }
.bx-alt .lbl b { color: var(--txt); font-weight: 600; }

/* ---------- Matières ---------- */
.bx-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bx-mat { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.bx-mat .head b { display: block; font-size: 14px; color: #fff; font-weight: 700; }
.bx-mat .head small { font-size: 12px; color: var(--txt-dim); line-height: 1.45; display: block; margin-top: 2px; }
.bx-note { font-size: 11.5px; color: var(--txt-dim); line-height: 1.5; padding: 9px 11px; border-radius: 8px; background: #ffb23d12; border: 1px solid #ffb23d33; }

/* ---------- Options en cartes ---------- */
.bx-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.bx-opt { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.bx-opt b { display: block; font-size: 13.5px; color: #fff; font-weight: 650; }
.bx-opt small { display: block; margin-top: 4px; font-size: 12px; color: var(--txt-dim); line-height: 1.45; }
.bx-opt.wide { grid-column: span 3; align-items: center; }
.bx-opt .bx-slide { margin: 0; min-width: 320px; }

.bx-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 20px; border: 1px dashed var(--line-2); border-radius: 14px; }
.bx-foot span { font-size: 12.5px; color: var(--txt-dim); }
.bx-saved { color: var(--ok); font-size: 12px; font-weight: 600; }
@media (max-width: 1180px) { .bx-studio { grid-template-columns: 1fr; } .bx-view { border-right: 0; border-bottom: 1px solid var(--line); min-height: 340px; } .bx-two, .bx-opts { grid-template-columns: 1fr; } .bx-opt.wide { grid-column: auto; } }

.bx { display: flex; flex-direction: column; gap: 22px; max-width: 1400px; }
.bx-stage .tn-prev { padding: 0; }
.bx-stage .tn-prev-svg { max-width: 290px; filter: drop-shadow(0 14px 30px #000a); }
.bx-grp .tn-num { margin-top: 12px; }
.bx-alt[hidden] { display: none; }
.bx-alt .tn-num { margin-top: 10px; }
.bx-mat .tn-block { width: 100%; min-width: 0; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600; }
.bx-opt .tn-num { min-width: 340px; width: auto; }

/* ---------- aperçu 3D ---------- */
.pv3 { width: 100%; display: flex; flex-direction: column; align-items: center; }
.pv3-cv { width: 100%; max-width: 360px; height: 400px; cursor: grab; touch-action: none; display: block; }
.pv3-cv.grab { cursor: grabbing; }
.pv3-hint { margin-top: 4px; font-size: 11.5px; color: var(--txt-dim); }
.bx-stage { padding: 4px 0 0; }
.bx-stage .tn-prev { padding: 0; }

/* ---------- fenêtre de confirmation ---------- */
.tn-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.66); backdrop-filter: blur(3px); }
.tn-modal-box { width: min(440px, calc(100vw - 40px)); background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line-2); border-radius: 14px; padding: 22px 24px 18px; box-shadow: 0 24px 70px rgba(0,0,0,.7); }
.tn-modal-box h3 { font-size: 17px; color: #fff; font-weight: 700; }
.tn-modal-box p { margin-top: 8px; font-size: 13.5px; line-height: 1.55; color: var(--txt-dim); }
.tn-modal-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ---------- champs de nombre : pas de mini-flèches haut/bas (on tape la valeur ou on utilise le curseur) ---------- */
#screen-tnt input[type=number] { -moz-appearance: textfield; appearance: textfield; }
#screen-tnt input[type=number]::-webkit-inner-spin-button,
#screen-tnt input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }

/* ==================== Remplissage & chrono (refonte) : préfixe fl- ==================== */
.fl { display: flex; flex-direction: column; gap: 22px; max-width: 1400px; }
/* ---------- Atelier : aperçu + étages ---------- */
.fl-studio { display: grid; grid-template-columns: 380px minmax(0, 1fr); border-radius: 18px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--gc) 38%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--gc) 12%, #0d0d11), #0b0b0e 70%); }
.fl-view { position: relative; padding: 22px 22px 16px; display: flex; flex-direction: column; align-items: center; border-right: 1px solid var(--line);
  background: radial-gradient(70% 60% at 50% 45%, color-mix(in srgb, var(--gc) 18%, transparent), transparent 75%); }
.fl-view h3 { align-self: flex-start; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--txt-dim); font-weight: 700; }
.fl-view .pv3 { margin-top: 4px; }

.fl-edit { padding: 24px 28px 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.fl-head h3 { font-size: 16px; color: #fff; font-weight: 700; }
.fl-head p { font-size: 12.5px; color: var(--txt-dim); margin-top: 3px; line-height: 1.45; }
.fl-gauge { display: flex; height: 14px; border-radius: 99px; overflow: hidden; border: 1px solid var(--line-2); background: #000; }
.fl-gauge i { display: block; height: 100%; transition: flex .2s; border-right: 1px solid #0006; }
.fl-gauge-info { display: flex; align-items: center; justify-content: space-between; margin-top: -4px; font-size: 12.5px; color: var(--txt-dim); }
.fl-pill { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(143,209,79,.14); color: var(--ok); border: 1px solid rgba(143,209,79,.4); white-space: nowrap; }
.fl-pill.warn { background: #ffb23d18; color: #ffb23d; border-color: #ffb23d55; }

.fl-stack { display: flex; flex-direction: column; gap: 8px; position: relative; }
.fl-edge { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--txt-dim); display: flex; align-items: center; gap: 8px; }
.fl-edge::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.fl-layer { position: relative; display: grid; grid-template-columns: 6px 30px minmax(220px, 1fr) auto auto; align-items: center; gap: 14px; background: #0e0e12; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 10px 0; overflow: hidden; }
.fl-layer .stripe { align-self: stretch; }
.fl-layer .idx { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: #1b1b21; color: var(--txt-dim); }
.fl-layer .tn-block { width: 100%; min-width: 0; }
.fl-step { display: inline-flex; align-items: center; background: #0b0b0e; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.fl-step button { width: 34px; height: 34px; border: 0; background: transparent; color: var(--txt); font-size: 17px; cursor: pointer; }
.fl-step button:hover:not(:disabled) { background: #ffffff10; color: #fff; }
.fl-step button:disabled { opacity: .3; cursor: default; }
.fl-step b { min-width: 64px; text-align: center; font-size: 13.5px; color: #fff; font-weight: 700; }
.fl-step b small { font-weight: 400; color: var(--txt-dim); font-size: 11px; margin-left: 3px; }
.fl-tools { display: flex; gap: 4px; }
.fl-tools button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); background: #121216; color: var(--txt-dim); cursor: pointer; font-size: 13px; }
.fl-tools button:hover:not(:disabled) { color: #fff; border-color: var(--gc); }
.fl-tools button.del:hover:not(:disabled) { color: #ff8b8d; border-color: var(--danger); }
.fl-tools button:disabled { opacity: .3; cursor: default; }
.fl-add { border: 1.5px dashed var(--line-2); border-radius: 12px; background: transparent; color: var(--txt-dim); padding: 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.fl-add:hover { border-color: var(--gc); color: #fff; }

/* ---------- Chrono ---------- */
.fl-time { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 18px; }
.fl-line { display: flex; height: 44px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 650; }
.fl-line > div { display: flex; align-items: center; justify-content: center; padding: 0 10px; white-space: nowrap; overflow: hidden; }
.fl-line .a { flex: 3; background: repeating-linear-gradient(135deg, #1d1d24, #1d1d24 10px, #22222a 10px, #22222a 20px); color: var(--txt); }
.fl-line .b { flex: 5; background: color-mix(in srgb, var(--gc) 35%, #15110f); color: #fff; }
.fl-line .c { flex: .8; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--gc) 55%, #000), color-mix(in srgb, var(--gc) 55%, #000) 6px, color-mix(in srgb, var(--gc) 40%, #000) 6px, color-mix(in srgb, var(--gc) 40%, #000) 12px); color: #fff; }
.fl-line-legend { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--txt-dim); margin-top: -10px; }
.fl-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.fl-set { background: #0e0e12; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.fl-set b { font-size: 13.5px; color: #fff; font-weight: 650; }
.fl-set small { font-size: 12px; color: var(--txt-dim); line-height: 1.45; }

/* ---------- Test en jeu ---------- */
.fl-test { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.fl-test .who b { display: block; font-size: 14px; color: #fff; }
.fl-test .who small { font-size: 12px; color: var(--txt-dim); }
.fl-acts { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 420px; }
.fl-acts button { flex: 1; min-width: 120px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #121216; color: var(--txt); border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.fl-acts button:hover:not(:disabled) { border-color: var(--gc); color: #fff; }
.fl-acts button:disabled { opacity: .35; cursor: not-allowed; }
.fl-acts svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 1180px) { .fl-studio { grid-template-columns: 1fr; } .fl-view { border-right: 0; border-bottom: 1px solid var(--line); } .fl-three { grid-template-columns: 1fr; } .fl-layer { grid-template-columns: 6px 30px 1fr; } }
.fl .tn-num { margin-top: 4px; }
.fl-set .tn-num input[type=number] { width: 96px; font-size: 19px; font-weight: 700; padding: 7px 10px; }
.fl-set .tn-unit { min-width: 0; }
.fl-set em { font-style: normal; font-size: 12px; color: var(--acc-2); min-height: 16px; }
.fl-test .tn-conn { margin: 0 0 0 auto; order: 3; font-weight: 700; }
.fl-layer .tn-block { width: 100%; min-width: 0; }

/* ==================== Textes à l'écran (refonte) : préfixe tx- ==================== */
/* ---------- Choix du texte : 4 cartes ---------- */
.tx-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.tx-role { text-align: left; font: inherit; color: inherit; cursor: pointer; background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 14px; padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 10px; transition: border-color .12s, transform .12s; }
.tx-role:hover { border-color: color-mix(in srgb, var(--gc) 60%, var(--line)); transform: translateY(-2px); }
.tx-role.on { border-color: var(--gc); box-shadow: 0 0 0 1px var(--gc), 0 10px 30px color-mix(in srgb, var(--gc) 22%, transparent); }
.tx-thumb { height: 74px; border-radius: 9px; display: grid; place-items: center; overflow: hidden; border: 1px solid #0006;
  background: linear-gradient(180deg, #5d9bd9, #8fc0e6 58%, #6fa35a 59%, #5b8a49); }
.tx-thumb span { text-shadow: 2px 2px 0 rgba(0,0,0,.55); letter-spacing: .04em; white-space: nowrap; font-weight: 800; font-size: 20px; }
.tx-role b { font-size: 14px; color: #fff; font-weight: 700; padding: 0 4px; }
.tx-role small { font-size: 12px; color: var(--txt-dim); line-height: 1.4; padding: 0 4px; margin-top: -6px; }

/* ---------- Atelier : écran + réglages ---------- */
.tx-studio { display: grid; grid-template-columns: 540px minmax(0, 1fr); border-radius: 18px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--gc) 38%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--gc) 12%, #0d0d11), #0b0b0e 70%); }
.tx-view { padding: 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; background: radial-gradient(70% 60% at 50% 40%, color-mix(in srgb, var(--gc) 14%, transparent), transparent 75%); }
.tx-sticky { position: sticky; top: 8px; display: flex; flex-direction: column; gap: 12px; }
.tx-view h3 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--txt-dim); font-weight: 700; }
.tx-screen { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid #000a; box-shadow: 0 14px 40px #000a;
  background: linear-gradient(180deg, #4f8fd4, #8fc0e6 52%, #6fa35a 53%, #4f7d3d); }
.tx-screen::after { content: ""; position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); width: 62%; height: 22px; border: 2px solid #0008; background: #0003; border-radius: 3px; }
.tx-box { position: absolute; left: 50%; top: 56%; width: 96px; height: 96px; transform: translate(-50%, -50%); background: linear-gradient(135deg, #d44, #922); opacity: .0; }
.tx-txt { position: absolute; left: 50%; transform: translate(-50%, -50%); text-align: center; white-space: nowrap; text-shadow: 3px 3px 0 rgba(0,0,0,.55); letter-spacing: .04em; font-family: "Segoe UI", sans-serif; }
.tx-txt small { display: block; font-size: .42em; font-weight: 600; margin-top: 4px; letter-spacing: .06em; }
.tx-hint { font-size: 12px; color: var(--txt-dim); text-align: center; }

.tx-ctl { padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.tx-ctl h3 { font-size: 16px; color: #fff; font-weight: 700; }
.tx-ctl > p { font-size: 12.5px; color: var(--txt-dim); margin-top: -12px; }
.tx-grp > .lbl { display: flex; align-items: baseline; justify-content: space-between; font-size: 13.5px; color: var(--txt); font-weight: 650; margin-bottom: 9px; }
.tx-grp > .lbl small { font-weight: 400; font-size: 12px; color: var(--txt-dim); }
.tx-colors { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tx-two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.tx-size { display: flex; align-items: center; gap: 12px; }
.tx-size input[type=range] { flex: 1; accent-color: var(--acc); }
.tx-size .val { min-width: 62px; text-align: center; background: #0b0b0e; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 8px; font-size: 13px; color: #fff; font-weight: 600; }
.tx-opts { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: #0e0e12; }
.tx-opt { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--line); }
.tx-opt:first-child { border-top: 0; }
.tx-opt b { display: block; font-size: 13.5px; color: var(--txt); font-weight: 600; }
.tx-opt small { display: block; font-size: 12px; color: var(--txt-dim); margin-top: 2px; }
@media (max-width: 1180px) { .tx-studio { grid-template-columns: 1fr; } .tx-view { border-right: 0; border-bottom: 1px solid var(--line); } .tx-roles { grid-template-columns: repeat(2, 1fr); } .tx-two { grid-template-columns: 1fr; } }
.tx { display: flex; flex-direction: column; gap: 22px; max-width: 1400px; }
.tx-block { display: flex; flex-direction: column; gap: 18px; }
.tx-ctl .bx-seg button { min-width: 92px; }
.tx-colors .tn-colorctl { gap: 8px; }
.tx-colors .tn-swatches { gap: 8px; }
.tx-colors .tn-swatch { width: 34px; height: 34px; border-radius: 9px; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px #fff3; }
.tx-colors .tn-swatch:hover { border-color: #fff; }
.tx-ctl .tn-select { width: 100%; }
.tx-ctl .tn-text { max-width: none; width: 100%; padding: 10px 12px; }
.tx-fontrow { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.tx-fontname { font-size: 12px; color: var(--txt-dim); }
.tx-ctl .tn-num { margin-top: 2px; }
.tx-thumb span { color: #fff; }

/* ---------- Wins : texte à placer + section « Objectif de wins » ---------- */
.tx-drag { cursor: grab; touch-action: none; user-select: none; padding: 4px 8px; }
.tx-drag.grab { cursor: grabbing; }
.tx-drag::before { content: ""; position: absolute; inset: -2px; border: 1.5px dashed rgba(255,255,255,.55); border-radius: 6px; pointer-events: none; }
.tx-posrow { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.tx-spots { display: grid; grid-template-columns: repeat(3, 38px); gap: 5px; }
.tx-spots button { height: 34px; border-radius: 8px; border: 1px solid var(--line-2); background: #121216; color: var(--txt); font-size: 16px; cursor: pointer; }
.tx-spots button:hover { border-color: var(--gc); color: #fff; }
.tx-posnums { display: flex; gap: 14px; flex: 1; min-width: 240px; }
.tx-posnums > div { flex: 1; }
.tx-posnums small { display: block; font-size: 11.5px; color: var(--txt-dim); margin-bottom: 4px; }
.tx-posnums .tn-num input[type=range] { min-width: 60px; }

.wn-card { display: grid; grid-template-columns: 300px minmax(0, 1fr); background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.wn-left { padding: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; border-right: 1px solid var(--line);
  background: radial-gradient(80% 70% at 50% 40%, color-mix(in srgb, var(--gc) 16%, transparent), transparent 75%); }
.wn-left small { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--txt-dim); }
.wn-live { font-size: 44px; line-height: 1; letter-spacing: .04em; text-shadow: 3px 3px 0 rgba(0,0,0,.55); font-family: "Segoe UI", sans-serif; white-space: nowrap; }
.wn-right { padding: 6px 22px; display: flex; flex-direction: column; }
.wn-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.wn-row:first-child { border-top: 0; }
.wn-row b { display: block; font-size: 13.5px; color: #fff; font-weight: 650; }
.wn-row small { display: block; font-size: 12px; color: var(--txt-dim); margin-top: 2px; }
.wn-ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wn-step { display: inline-flex; align-items: center; background: #0b0b0e; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.wn-step button { width: 38px; height: 38px; border: 0; background: transparent; color: var(--txt); font-size: 18px; cursor: pointer; }
.wn-step button:hover { background: #ffffff10; color: #fff; }
.wn-step input { width: 78px; height: 38px; border: 0; border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2); background: transparent; color: #fff; text-align: center; font: inherit; font-size: 17px; font-weight: 700; }
@media (max-width: 1180px) { .wn-card { grid-template-columns: 1fr; } .wn-left { border-right: 0; border-bottom: 1px solid var(--line); } }
.tx-sepword { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; }
.tx-sepword .tn-text { text-align: center; }
.tx-sepword .tn-text:last-child { text-align: left; }

/* ==================== TNT & explosions (refonte) : préfixe t2- ==================== */
/* ---------- Atelier : schéma + explosion ---------- */
.t2-studio { display: grid; grid-template-columns: 400px minmax(0, 1fr); border-radius: 18px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--gc) 38%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--gc) 12%, #0d0d11), #0b0b0e 70%); }
.t2-view { padding: 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: radial-gradient(70% 55% at 50% 45%, color-mix(in srgb, var(--gc) 20%, transparent), transparent 75%); }
.t2-view h3 { align-self: flex-start; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--txt-dim); font-weight: 700; }
.t2-svg { width: 100%; max-width: 340px; aspect-ratio: 1; }
.t2-sum { text-align: center; }
.t2-sum b { display: block; font-size: 17px; color: #fff; font-weight: 700; }
.t2-sum span { font-size: 12.5px; color: var(--txt-dim); line-height: 1.5; display: block; margin-top: 3px; }
.t2-sum .warn { color: #ffb23d; }
.t2-ctl { padding: 24px 28px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.t2-grp > .lbl { display: flex; align-items: baseline; justify-content: space-between; font-size: 13.5px; color: var(--txt); font-weight: 650; margin-bottom: 9px; }
.t2-grp > .lbl small { font-weight: 400; font-size: 12px; color: var(--txt-dim); }
.t2-grp .tn-num { margin-top: 10px; }

/* ---------- Apparition ---------- */
.t2-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.t2-card { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.t2-card h4 { font-size: 14px; color: #fff; font-weight: 700; }
.t2-card > p { font-size: 12px; color: var(--txt-dim); margin-top: -10px; line-height: 1.45; }
.t2-only { display: none; flex-direction: column; gap: 16px; }
.t2-only.on { display: flex; }
.t2-opt { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 14px 16px; border-radius: 12px; background: #0e0e12; border: 1px solid var(--line); }
.t2-opt b { display: block; font-size: 13.5px; color: #fff; font-weight: 650; }
.t2-opt small { display: block; margin-top: 3px; font-size: 12px; color: var(--txt-dim); line-height: 1.45; }

/* ---------- Test en jeu ---------- */
.t2-test { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.t2-test-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.t2-test-head b { display: block; font-size: 14px; color: #fff; }
.t2-test-head small { font-size: 12px; color: var(--txt-dim); }
.t2-acts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.t2-acts button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; background: #121216; color: var(--txt); border: 1px solid var(--line-2); border-radius: 12px; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.t2-acts button i { font-style: normal; font-size: 22px; }
.t2-acts button small { font-weight: 400; font-size: 11px; color: var(--txt-dim); }
.t2-acts button:hover:not(:disabled) { border-color: var(--gc); color: #fff; transform: translateY(-2px); }
.t2-acts button:disabled { opacity: .35; cursor: not-allowed; }
@media (max-width: 1180px) { .t2-studio { grid-template-columns: 1fr; } .t2-view { border-right: 0; border-bottom: 1px solid var(--line); } .t2-two { grid-template-columns: 1fr; } .t2-acts { grid-template-columns: repeat(2, 1fr); } }
.t2 { display: flex; flex-direction: column; gap: 22px; max-width: 1400px; }
.t2-test .tn-conn { margin: 0; font-weight: 700; }
.t2-acts button i { font-style: normal; }
.fl-fix { display: inline-flex; align-items: center; gap: 10px; }
.fl-fix .btn { padding: 4px 12px; font-size: 12px; }

/* ---------- avertissement pseudo / podium ---------- */
.tn-notice { border: 1px solid #ffb23d66; border-left: 4px solid #ffb23d; background: #ffb23d12; border-radius: 12px; padding: 14px 18px; }
.tn-notice b { display: block; color: #ffd08a; font-size: 14px; }
.tn-notice p { margin-top: 5px; color: var(--txt); font-size: 13px; line-height: 1.55; }
.tn-notice p b { display: inline; font-size: inherit; color: #fff; }
.tn-notice code { font-family: Consolas, monospace; background: #000; border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; color: var(--acc-2); }
.pt-note { color: #ffb23d !important; font-size: 11.5px !important; margin-top: 3px; }

/* ==================== Podium (refonte) : préfixe pd- ==================== */
/* ---------- Atelier : podium + réglages ---------- */
.pd-studio { display: grid; grid-template-columns: 440px minmax(0, 1fr); border-radius: 18px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--gc) 38%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--gc) 12%, #0d0d11), #0b0b0e 70%); }
.pd-view { padding: 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: radial-gradient(70% 55% at 50% 50%, color-mix(in srgb, var(--gc) 18%, transparent), transparent 75%); }
.pd-view h3 { align-self: flex-start; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--txt-dim); font-weight: 700; }
.pd-scene { width: 100%; border-radius: 12px; padding: 18px 14px 0; min-height: 330px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; border: 1px solid #000a; box-shadow: 0 14px 40px #000a;
  background: linear-gradient(180deg, #4f8fd4, #8fc0e6 62%, #cfe4f2); transition: opacity .2s, filter .2s; }
.pd-scene.off { opacity: .35; filter: grayscale(1); }
.pd-title { font-size: 22px; font-weight: 800; letter-spacing: .06em; color: #ffd400; text-shadow: 2px 2px 0 rgba(0,0,0,.55); margin-bottom: auto; padding-top: 4px; text-align: center; }
.pd-steps { display: grid; grid-template-columns: 1fr 1.08fr 1fr; align-items: end; width: 100%; gap: 6px; }
.pd-col { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.pd-head { width: 38px; height: 38px; border-radius: 8px; border: 2px solid #0006; margin-bottom: 4px; position: relative; }
.pd-head::after { content: ""; position: absolute; left: 7px; top: 14px; width: 6px; height: 6px; background: #1b1b1b; box-shadow: 14px 0 #1b1b1b; }
.pd-name { font-size: 12.5px; font-weight: 800; color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,.6); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-score { font-size: 11px; color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,.6); margin-bottom: 4px; white-space: nowrap; }
.pd-block { width: 100%; display: grid; place-items: center; font-size: 28px; font-weight: 900; color: #fff; text-shadow: 2px 2px 0 rgba(0,0,0,.35); border-radius: 6px 6px 0 0; border: 1px solid #0004; border-bottom: 0; }
.pd-1 .pd-block { height: 120px; background: linear-gradient(180deg, #f6d03d, #c69b13); }
.pd-2 .pd-block { height: 86px; background: linear-gradient(180deg, #dcdcdc, #9a9a9a); }
.pd-3 .pd-block { height: 62px; background: linear-gradient(180deg, #d98a4e, #9a5a2a); }
.pd-sum { text-align: center; font-size: 12.5px; color: var(--txt-dim); line-height: 1.5; }

.pd-ctl { padding: 24px 28px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pd-grp > .lbl { display: flex; align-items: baseline; justify-content: space-between; font-size: 13.5px; color: var(--txt); font-weight: 650; margin-bottom: 9px; }
.pd-grp > .lbl small { font-weight: 400; font-size: 12px; color: var(--txt-dim); }
.pd-on { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-radius: 12px; background: #0e0e12; border: 1px solid var(--line); }
.pd-on b { display: block; font-size: 14px; color: #fff; }
.pd-on small { display: block; font-size: 12px; color: var(--txt-dim); margin-top: 2px; }
.pd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-chips button { background: #121216; color: var(--txt); border: 1px solid var(--line-2); border-radius: 999px; padding: 9px 16px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pd-chips button:hover { border-color: var(--gc); }
.pd-chips button.on { background: color-mix(in srgb, var(--gc) 24%, #121216); border-color: var(--gc); color: #fff; }
.pd-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- Automatique ---------- */
.pd-auto { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.pd-auto h4 { font-size: 15px; color: #fff; }
.pd-auto > p { font-size: 12.5px; color: var(--txt-dim); margin-top: -10px; }
.pd-how { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pd-step { display: flex; gap: 12px; align-items: flex-start; background: #0e0e12; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.pd-step .n { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; background: color-mix(in srgb, var(--gc) 22%, #111); color: #fff; border: 1px solid color-mix(in srgb, var(--gc) 55%, transparent); }
.pd-step p { font-size: 12.5px; color: var(--txt); line-height: 1.5; }
.pd-cmd { display: flex; align-items: center; gap: 10px; background: #000; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 8px 8px 14px; }
.pd-cmd code { flex: 1; font-family: Consolas, monospace; font-size: 14px; color: var(--acc-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- Placer à la main ---------- */
.pd-man { border: 1px solid var(--line); border-radius: 14px; background: #0c0c0f; }
.pd-man summary { list-style: none; cursor: pointer; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 650; color: var(--txt-dim); }
.pd-man summary::-webkit-details-marker { display: none; }
.pd-man summary::after { content: "▾"; }
.pd-man[open] summary { border-bottom: 1px solid var(--line); color: var(--txt); }
.pd-manbody { padding: 16px 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.pd-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 140px auto; gap: 10px; align-items: center; }
.pd-medal { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #111; }
.pd-medal.m1 { background: #f6d03d; } .pd-medal.m2 { background: #cfcfcf; } .pd-medal.m3 { background: #d98a4e; }

/* ---------- Test ---------- */
.pd-test { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.pd-test .who b { display: block; font-size: 14px; color: #fff; }
.pd-test .who small { font-size: 12px; color: var(--txt-dim); }
.pd-acts { display: flex; gap: 8px; flex: 1; min-width: 360px; flex-wrap: wrap; }
.pd-acts button { flex: 1; min-width: 140px; padding: 11px 12px; background: #121216; color: var(--txt); border: 1px solid var(--line-2); border-radius: 10px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pd-acts button:hover:not(:disabled) { border-color: var(--gc); color: #fff; }
.pd-acts button:disabled { opacity: .35; cursor: not-allowed; }
@media (max-width: 1180px) { .pd-studio { grid-template-columns: 1fr; } .pd-view { border-right: 0; border-bottom: 1px solid var(--line); } .pd-how, .pd-opts, .pd-two { grid-template-columns: 1fr; } }
.pd-warn { border: 1px solid #ffb23d66; border-left: 4px solid #ffb23d; background: #ffb23d12; border-radius: 12px; padding: 14px 18px; }
.pd-warn b { display: block; color: #ffd08a; font-size: 14px; }
.pd-warn p { margin-top: 5px; color: var(--txt); font-size: 13px; line-height: 1.55; }
.pd-warn p b { display: inline; color: #fff; font-size: inherit; }
.pd-warn code { font-family: Consolas, monospace; background: #000; border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; color: var(--acc-2); }
.pd-rules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pd-rule { background: #0e0e12; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.pd-rule h5 { font-size: 13.5px; color: #fff; font-weight: 700; }
.pd-rule p { font-size: 12px; color: var(--txt-dim); line-height: 1.45; flex: 1; }
.pd-rule .pt { align-self: flex-start; font-size: 12px; font-weight: 700; color: #ffd400; background: #ffd40018; border: 1px solid #ffd40044; border-radius: 999px; padding: 4px 10px; }
.pd-rule small { font-size: 11.5px; color: var(--txt-dim); }
.pd-foot { font-size: 12px; color: var(--txt-dim); line-height: 1.5; }
@media (max-width: 1180px) { .pd-rules { grid-template-columns: 1fr 1fr; } }
.pd { display: flex; flex-direction: column; gap: 22px; max-width: 1400px; }
.pd-ctl .tn-text { max-width: none; width: 100%; padding: 10px 12px; font-size: 14px; }
.pd-row .tn-text { max-width: none; width: 100%; }
.pd-sub { font-weight: 400; margin-left: 8px; font-size: 12px; }
.pd-test .tn-conn { margin: 0 0 0 auto; order: 3; font-weight: 700; }
.pd-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ==================== Logos & textures (refonte) : préfixe lg- ==================== */
.lg-how { display: flex; align-items: center; gap: 14px; background: color-mix(in srgb, var(--gc) 9%, var(--panel)); border: 1px solid color-mix(in srgb, var(--gc) 38%, var(--line)); border-radius: 12px; padding: 13px 18px; font-size: 13px; line-height: 1.5; color: var(--txt); }
.lg-how i { font-style: normal; font-size: 20px; }

/* ---------- Logo du sol : grande carte ---------- */
.lg-hero { display: grid; grid-template-columns: 420px minmax(0, 1fr); border-radius: 18px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--gc) 38%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--gc) 12%, #0d0d11), #0b0b0e 70%); }
.lg-view { padding: 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: radial-gradient(70% 55% at 50% 50%, color-mix(in srgb, var(--gc) 18%, transparent), transparent 75%); }
.lg-view h3 { align-self: flex-start; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--txt-dim); font-weight: 700; }
.lg-stage { width: 100%; height: 300px; display: grid; place-items: center; perspective: 700px; }
.lg-floor { position: relative; width: 250px; height: 250px; transform: rotateX(58deg) rotateZ(-28deg); transform-style: preserve-3d; border: 6px solid #f08fb4aa; box-shadow: 0 30px 40px #000a;
  display: grid; grid-template-columns: repeat(9, 1fr); background: #ece9e4; }
.lg-floor span { border: 1px solid #0000000d; }
.lg-floor span:nth-child(odd) { background: #00000006; }
.lg-floor img { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-fit: contain; }
.lg-floor .def { position: absolute; inset: 14px; display: grid; place-items: center; }
.lg-floor .def img { position: static; width: 100%; height: 100%; }
.lg-cap { font-size: 12.5px; color: var(--txt-dim); text-align: center; }

.lg-side { padding: 24px 28px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lg-side h3 { font-size: 17px; color: #fff; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.lg-side > p { font-size: 13px; color: var(--txt-dim); line-height: 1.55; margin-top: -8px; }
.lg-chip { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #ffffff10; color: var(--txt-dim); border: 1px solid var(--line-2); }
.lg-chip.on { background: rgba(143,209,79,.14); color: var(--ok); border-color: rgba(143,209,79,.4); }
.lg-drop { border: 2px dashed var(--line-2); border-radius: 14px; padding: 22px; text-align: center; color: var(--txt-dim); font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s; background: #0b0b0e; }
.lg-drop:hover, .lg-drop.over { border-color: var(--gc); background: color-mix(in srgb, var(--gc) 8%, #0b0b0e); color: #fff; }
.lg-drop b { display: block; font-size: 15px; color: #fff; margin-bottom: 4px; }
.lg-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.lg-tips { display: flex; gap: 8px; flex-wrap: wrap; }
.lg-tips span { font-size: 12px; color: var(--txt-dim); background: #121216; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; }

/* ---------- Cases d'objet ---------- */
.lg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.lg-item { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; display: flex; gap: 20px; align-items: flex-start; }
.lg-slot { width: 128px; height: 128px; flex-shrink: 0; border-radius: 10px; background: #8b8b8b; border: 4px solid; border-color: #373737 #fff #fff #373737; display: grid; place-items: center; position: relative; image-rendering: pixelated; }
.lg-slot::after { content: ""; position: absolute; inset: 0; box-shadow: inset 3px 3px 0 #0006, inset -3px -3px 0 #fff3; pointer-events: none; }
.lg-slot svg { width: 78px; height: 78px; }
.lg-item .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.lg-item h4 { font-size: 15px; color: #fff; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lg-item p { font-size: 12.5px; color: var(--txt-dim); line-height: 1.5; }
.lg-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 20px; border: 1px dashed var(--line-2); border-radius: 14px; }
.lg-foot span { font-size: 12.5px; color: var(--txt-dim); }
@media (max-width: 1180px) { .lg-hero { grid-template-columns: 1fr; } .lg-view { border-right: 0; border-bottom: 1px solid var(--line); } .lg-two { grid-template-columns: 1fr; } }
.lg-render { display: flex; align-items: flex-end; gap: 12px; padding: 12px 14px; background: #0b0b0e; border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.lg-render .r { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lg-render small { font-size: 11px; color: var(--txt-dim); }
.lg-render .arrow { color: var(--txt-dim); font-size: 20px; align-self: center; margin: 0 2px 12px; }
.cube { display: block; width: 44px; height: 44px; position: relative; transform: rotateX(-24deg) rotateY(-32deg); transform-style: preserve-3d; margin: 6px 6px 0; }
.cube::before, .cube::after { content: ""; position: absolute; width: 44px; height: 44px; border: 1px solid #0005; }
.cube { background: var(--c1); transform: none; width: 40px; height: 40px; border: 1px solid #0006; box-shadow: 10px -8px 0 -1px var(--c2), 12px -10px 0 0 #0004; }
.cube::before, .cube::after { display: none; }
.lg-block { align-items: flex-start; }
.lg { display: flex; flex-direction: column; gap: 22px; max-width: 1400px; }
.lg-slot img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.lg-floor .def img { max-width: 100%; max-height: 100%; }
.lg-chip { align-self: center; }

/* ==================== Monde & joueur (refonte) : préfixe wd- ==================== */
.wd-studio { display: grid; grid-template-columns: 460px minmax(0, 1fr); border-radius: 18px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--gc) 38%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--gc) 12%, #0d0d11), #0b0b0e 70%); }
.wd-view { padding: 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px;
  background: radial-gradient(70% 55% at 50% 45%, color-mix(in srgb, var(--gc) 16%, transparent), transparent 75%); }
.wd-view h3 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--txt-dim); font-weight: 700; }
.wd-scene { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; border: 1px solid #000a; box-shadow: 0 14px 40px #000a; transition: background .4s; }
.wd-badge { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; }
.wd-badge span { font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: #000a; color: #fff; }
.wd-chat { position: absolute; left: 10px; bottom: 10px; max-width: 68%; display: flex; flex-direction: column; gap: 3px; transition: opacity .3s; }
.wd-chat div { background: #000a; color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 3px; font-family: Consolas, monospace; }
.wd-chat.hidden { opacity: 0; }
.wd-inv { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 3px; }
.wd-inv i { width: 18px; height: 18px; background: #00000066; border: 2px solid #ffffff44; }
.wd-inv i.f { background: #d83a2e; border-color: #fff8; }
.wd-sum { font-size: 12.5px; color: var(--txt-dim); line-height: 1.5; }

.wd-ctl { padding: 24px 28px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.wd-ctl h3 { font-size: 16px; color: #fff; font-weight: 700; }
.wd-ctl > p { font-size: 12.5px; color: var(--txt-dim); margin-top: -8px; }
.wd-preset { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.wd-preset small { color: var(--txt-dim); font-size: 12px; }

.wd-group { display: flex; flex-direction: column; gap: 10px; }
.wd-gh { display: flex; align-items: baseline; justify-content: space-between; }
.wd-gh h4 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--txt-dim); font-weight: 700; }
.wd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.wd-opt { display: flex; align-items: flex-start; gap: 14px; background: #0e0e12; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: border-color .12s, background .12s; }
.wd-opt:hover { border-color: color-mix(in srgb, var(--gc) 60%, var(--line)); }
.wd-opt.on { background: color-mix(in srgb, var(--gc) 8%, #0e0e12); border-color: color-mix(in srgb, var(--gc) 50%, var(--line)); }
.wd-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; background: #1b1b21; flex-shrink: 0; }
.wd-opt.on .wd-ic { background: color-mix(in srgb, var(--gc) 22%, #15151a); }
.wd-opt .t { flex: 1; min-width: 0; }
.wd-opt b { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #fff; font-weight: 650; flex-wrap: wrap; }
.wd-opt small { display: block; margin-top: 3px; font-size: 12px; color: var(--txt-dim); line-height: 1.45; }
.wd-tag { font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #ffb23d22; color: #ffb23d; border: 1px solid #ffb23d55; letter-spacing: .03em; }
@media (max-width: 1180px) { .wd-studio { grid-template-columns: 1fr; } .wd-view { border-right: 0; border-bottom: 1px solid var(--line); } }
.wd { display: flex; flex-direction: column; gap: 22px; max-width: 1400px; }
.wd-scene { background: #000; }
.w3host, .w3, .w3-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.w3-cv { cursor: grab; touch-action: none; }
.w3-cv.grab { cursor: grabbing; }
.wd-badge, .wd-chat, .wd-inv { pointer-events: none; }
.tn-cmd { white-space: pre-wrap; }
.pd-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pd-mode { display: flex; align-items: flex-start; gap: 14px; text-align: left; font: inherit; color: inherit; cursor: pointer; background: #0e0e12; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; transition: border-color .12s, background .12s; }
.pd-mode:hover { border-color: color-mix(in srgb, var(--gc) 60%, var(--line)); }
.pd-mode.on { background: color-mix(in srgb, var(--gc) 10%, #0e0e12); border-color: var(--gc); box-shadow: 0 0 0 1px var(--gc); }
.pd-mode .ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 22px; background: #1b1b21; flex-shrink: 0; }
.pd-mode b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: #fff; }
.pd-mode small { display: block; margin-top: 4px; font-size: 12.5px; color: var(--txt-dim); line-height: 1.45; }
.pd-steps2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1180px) { .pd-modes, .pd-steps2 { grid-template-columns: 1fr; } }

/* ==================== TIK360 & commandes (refonte) : préfixe tk- ==================== */
.tk-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tk-step { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tk-step .head { display: flex; align-items: center; gap: 10px; }
.tk-step .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: color-mix(in srgb, var(--gc) 22%, #111); color: #fff; border: 1px solid color-mix(in srgb, var(--gc) 55%, transparent); flex-shrink: 0; }
.tk-step h4 { font-size: 15px; color: #fff; font-weight: 700; }
.tk-step p { font-size: 12.5px; color: var(--txt-dim); line-height: 1.5; }
.tk-url { display: flex; align-items: center; gap: 8px; background: #000; border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 7px 7px 12px; }
.tk-url code { flex: 1; font-family: Consolas, monospace; font-size: 14px; color: var(--acc-2); }
.tk-set { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.tk-set label { font-size: 12px; color: var(--txt-dim); display: flex; align-items: center; gap: 8px; }
.tk-set input[type=number] { width: 84px; }

.tk-warn { border: 1px solid #ffb23d66; border-left: 4px solid #ffb23d; background: #ffb23d12; border-radius: 12px; padding: 14px 18px; }
.tk-warn b { display: block; color: #ffd08a; font-size: 14px; }
.tk-warn p { margin-top: 5px; color: var(--txt); font-size: 13px; line-height: 1.55; }
.tk-warn p b { display: inline; color: #fff; font-size: inherit; }
.tk-warn code { font-family: Consolas, monospace; background: #000; border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; color: var(--acc-2); }

/* ---------- Variables ---------- */
.tk-vars { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.tk-vars label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--txt); font-weight: 650; }
.tk-vars label small { font-weight: 400; color: var(--txt-dim); font-size: 12px; }
.tk-vars input { background: #0b0b0e; color: #fff; border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 12px; font: inherit; font-family: Consolas, monospace; font-size: 14px; }

/* ---------- Commandes ---------- */
.tk-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tk-chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.tk-chips button { background: #121216; color: var(--txt); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 15px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.tk-chips button small { color: var(--txt-dim); font-weight: 500; margin-left: 5px; }
.tk-chips button:hover { border-color: var(--gc); }
.tk-chips button.on { background: color-mix(in srgb, var(--gc) 24%, #121216); border-color: var(--gc); color: #fff; }
.tk-search { background: #0b0b0e; color: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 14px; font: inherit; font-size: 13px; min-width: 240px; }
.tk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.tk-card { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.tk-card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tk-card b { font-size: 14.5px; color: #fff; font-weight: 700; display: block; }
.tk-card small { display: block; font-size: 12px; color: var(--txt-dim); line-height: 1.45; margin-top: 2px; }
.tk-pt { font-size: 10.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: #ffd40018; color: #ffd400; border: 1px solid #ffd40044; white-space: nowrap; letter-spacing: .02em; }
.tk-params { display: flex; gap: 10px; flex-wrap: wrap; }
.tk-params label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--txt-dim); }
.tk-params input { width: 74px; background: #0b0b0e; color: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; text-align: center; }
.tk-cmd { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; background: #000; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 8px 8px 12px; }
.tk-cmd code { flex: 1 1 100%; font-family: Consolas, monospace; font-size: 13px; color: var(--acc-2); white-space: pre-wrap; word-break: break-all; line-height: 1.5; }
.tk-cmd .btn { padding: 6px 12px; font-size: 12px; }
@media (max-width: 1180px) { .tk-steps, .tk-vars { grid-template-columns: 1fr; } }
.tk { display: flex; flex-direction: column; gap: 22px; max-width: 1400px; }
.tk-vars input, .tk-set input { background: #0b0b0e; color: #fff; border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 12px; font: inherit; font-family: Consolas, monospace; font-size: 14px; }
.tk-vars .tk-btns2 { display: flex; gap: 8px; margin-top: 2px; }
.tk-vars .tk-line { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #0e0e12; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.tk-vars .tk-line b { display: block; font-size: 13.5px; color: #fff; }
.tk-vars .tk-line small { display: block; margin-top: 3px; font-size: 12px; color: var(--txt-dim); line-height: 1.45; }
.tk-set .tn-text { width: 96px; }
.tk-step .tn-conn { margin: 0; font-weight: 700; }
.tk-card .top { align-items: flex-start; }
.tk-card .tt { flex: 1; min-width: 0; }
.tk-sel { display: flex; align-items: center; padding-top: 2px; cursor: pointer; }
.tk-sel input { width: 17px; height: 17px; accent-color: var(--gc); cursor: pointer; }
.tk-params label.coins input { width: 110px; font-family: Consolas, monospace; }
.tk-chips button { display: inline-flex; align-items: center; }
.tk-selbar { position: sticky; bottom: 10px; z-index: 5; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #17171c; border: 1px solid var(--gc); border-radius: 14px; padding: 12px 18px; box-shadow: 0 12px 40px #000c; }
.tk-selbar[hidden] { display: none; }
.tk-selbar b { color: #fff; font-size: 13.5px; }
.tk-selbar label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--txt-dim); margin-left: auto; }
.tk-selbar input { width: 120px; background: #0b0b0e; color: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; font: inherit; font-family: Consolas, monospace; font-size: 13px; }
.tk-set .lb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--txt-dim); }

/* ---- page Multiplicateur ---- */
.mu-in { width: 100%; min-width: 0; padding: 10px 12px; font: inherit; font-size: 18px; font-weight: 700; color: #fff; background: #17171d; border: 1px solid var(--line); border-radius: 10px; }
.mu-field { display: flex; align-items: center; gap: 10px; max-width: 200px; }
.mu-field span { font-size: 13px; color: var(--txt-dim); }
.mu-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.mu-rules { display: flex; flex-direction: column; gap: 10px; }
.mu-rules .pd-step p b { color: #fff; }
.mu-effect { display: flex; flex-direction: column; gap: 8px; }
.mu-fx { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 11px 15px; border-radius: 10px; background: #0e0e12; border: 1px solid var(--line); font-size: 13px; color: var(--txt-dim); }
.mu-fx b { font-size: 14px; color: #fff; }
.mu-kindsbox { display: flex; flex-direction: column; gap: 10px; }
.mu-kindsbox .lbl { font-size: 13.5px; color: var(--txt); font-weight: 650; }
.mu-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.mu-kind { font: inherit; font-size: 13.5px; color: var(--txt-dim); cursor: pointer; background: #17171d; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; }
.mu-kind.on { color: #fff; border-color: var(--gc); background: color-mix(in srgb, var(--gc) 22%, #17171d); font-weight: 650; }
.mu-kindsbtns { display: flex; gap: 8px; }
.mu-human { font-size: 13px; color: var(--txt-dim); margin-left: 2px; }
.mu-field { max-width: none; }

/* Page « Textes » et « Multiplicateur » : fenêtre réduite -> l'écran de jeu passe AU-DESSUS des réglages (plus de colonne coupée) */
@media (max-width: 1500px) {
  .tx-studio { grid-template-columns: minmax(0, 1fr); }
  .tx-view { border-right: 0; border-bottom: 1px solid var(--line); }
  .tx-sticky { position: static; }
  .tx-screen { max-width: 640px; margin: 0 auto; width: 100%; }
}
.tx-grp > .lbl { gap: 4px 12px; flex-wrap: wrap; }
.tx-posnums { flex-wrap: wrap; min-width: 0; }
.tx-posnums > div { min-width: 180px; }

/* vignettes des textes : toujours aussi larges que la carte, le texte est réduit pour tenir dedans */
.tx-thumb { align-self: stretch; width: 100%; box-sizing: border-box; }

/* ---- page Décor ---- */
.dc-cards { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.dc-card { align-items: stretch; }
.dc-thumb { height: 118px; border-radius: 9px; border: 1px solid #0006; background-size: cover; background-position: center; background-repeat: no-repeat; }
.dc-big { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid #000a; box-shadow: 0 14px 40px #000a; background-size: cover; background-position: center; }
.dc-bigcap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 14px; background: linear-gradient(180deg, transparent, #000d); }
.dc-bigtitle { font-size: 18px; font-weight: 800; color: #fff; }
.dc-bigdesc { font-size: 12.5px; color: #d5d5dc; margin-top: 3px; line-height: 1.45; }
.dc-dyes { display: flex; flex-wrap: wrap; gap: 9px; }
.dc-dye { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #ffffff30; color: #fff; font-weight: 900; cursor: pointer; display: grid; place-items: center; text-shadow: 0 1px 3px #000a; }
.dc-dye.on { border-color: #fff; box-shadow: 0 0 0 3px #ffffff30; }
.dc-dot { display: inline-block; width: 13px; height: 13px; border-radius: 50%; vertical-align: -2px; border: 1px solid #fff5; }
.dc-detected { text-align: left; line-height: 1.5; }
.dc-big { max-width: 760px; width: 100%; margin: 0 auto; }

/* aperçu 3D du décor */
.dc-big.d3on { background: linear-gradient(180deg, #4f8fd4, #9fd0ee 62%, #cfe7f5); aspect-ratio: 16 / 10; }
.d3-wrap { position: absolute; inset: 0; }
.d3-cv { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.d3-cv.grab { cursor: grabbing; }
.d3-hint { position: absolute; right: 10px; top: 10px; font-size: 11.5px; color: #fff; background: #0009; padding: 4px 10px; border-radius: 999px; pointer-events: none; }
.d3-status { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 13px; background: #000a; padding: 8px 16px; border-radius: 10px; pointer-events: none; }
.dc-big.d3on .dc-bigcap { pointer-events: none; }
.dc-big.d3on { aspect-ratio: 16 / 11; }
.dc-big.d3on .dc-bigcap { padding: 26px 16px 10px; }
.dc-big.d3on .dc-bigdesc { font-size: 11.5px; }

/* mes décors */
.dc-own { display: grid; place-items: center; background: linear-gradient(135deg, #2a2f3d, #141720); font-size: 38px; }
.dc-importrow { margin-top: 14px; display: flex; gap: 12px; align-items: center; }
.dc-minehint { text-align: left; max-width: 900px; margin-bottom: 14px; }

/* ---- page Wins par période ---- */
.ws { display: flex; flex-direction: column; gap: 26px; }
.ws-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.ws-card { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; border-radius: 14px; background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); }
.ws-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ws-head b { display: block; font-size: 15px; color: #fff; }
.ws-head small { color: var(--txt-dim); font-size: 12px; }
.ws-big { font-size: 40px; font-weight: 800; color: #fff; letter-spacing: .02em; }
.ws-edit { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ws-in { width: 100px; font-size: 14px; padding: 8px 10px; }
.ws-chartbox { padding: 18px 18px 8px; border-radius: 14px; background: #0e0e12; border: 1px solid var(--line); }
.ws-chart { display: flex; align-items: flex-end; gap: 5px; height: 150px; }
.ws-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.ws-bar { width: 100%; max-width: 26px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--gc), color-mix(in srgb, var(--gc) 40%, #111)); min-height: 2px; }
.ws-bar.neg { background: #b02e26; }
.ws-col span { font-size: 10px; color: var(--txt-dim); }

/* ---- page Auto-clic ---- */
.ac-status { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: #0e0e12; border: 1px solid var(--line); }
.ac-status .dot { width: 11px; height: 11px; border-radius: 50%; background: #555; flex-shrink: 0; }
.ac-status.on { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.ac-status.on .dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.ac-status b { color: #fff; font-size: 14px; }
.ac-status small { color: var(--txt-dim); font-size: 12.5px; margin-left: auto; text-align: right; }
.ac-key { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 22px 0 8px; }
.ac-key .cap { width: 74px; height: 74px; border-radius: 14px; display: grid; place-items: center; font-size: 34px; font-weight: 800; color: #fff; background: linear-gradient(180deg, #2c2c35, #17171d); border: 1px solid var(--line-2); box-shadow: 0 6px 0 #0a0a0d, 0 10px 24px #0008; }
.ac-key .arrow { font-size: 30px; color: var(--gc); }
.ac-key .clicks { display: flex; gap: 7px; }
.ac-key .clicks i { width: 14px; height: 14px; border-radius: 4px; background: var(--gc); animation: ac-pop 1s infinite; }
.ac-key .clicks i:nth-child(2) { animation-delay: .15s; } .ac-key .clicks i:nth-child(3) { animation-delay: .3s; }
.ac-key .clicks i:nth-child(4) { animation-delay: .45s; } .ac-key .clicks i:nth-child(5) { animation-delay: .6s; }
@keyframes ac-pop { 0%, 60%, 100% { opacity: .25; transform: scale(.8); } 30% { opacity: 1; transform: scale(1.15); } }
.ac-steps { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.ac-step { display: flex; gap: 12px; align-items: flex-start; background: #0e0e12; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.ac-step .n { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; background: color-mix(in srgb, var(--gc) 22%, #111); color: #fff; }
.ac-step b { display: block; font-size: 13.5px; color: #fff; } .ac-step small { color: var(--txt-dim); font-size: 12px; line-height: 1.5; }
.ac-cpsrow { margin-top: 6px; font-size: 12.5px; color: var(--txt-dim); }
.ac-tabs { margin-bottom: 18px; max-width: 560px; }
.ac-sets { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.ac-set { display: flex; justify-content: space-between; gap: 14px; padding: 11px 14px; border-radius: 10px; background: #0e0e12; border: 1px solid var(--line); font-size: 13px; color: var(--txt-dim); }
.ac-set b { color: #fff; font-weight: 650; text-align: right; }

.ac-keybtn { width: 190px; min-height: 74px; font-size: 18px; font-weight: 800; white-space: normal; line-height: 1.25; }
.ac-keybtn.listen { border-color: var(--gc); background: color-mix(in srgb, var(--gc) 25%, #14141a); animation: ac-listen 1s infinite; font-size: 13px; }
@keyframes ac-listen { 50% { opacity: .65; } }
.ac-warn { color: #ffb23d; text-align: center; margin-top: 4px; }
.ac-msrow { display: flex; align-items: center; gap: 12px; }
.ac-ms { width: 130px; font-size: 22px; }
.ac-unit { color: var(--txt-dim); font-size: 15px; }
.ac-rate { color: var(--acc-2); font-size: 14px; margin-left: 6px; }
.ac-keyhint { color: var(--txt-dim); font-size: 12.5px; }
/* raccourcis (puces) de l'auto-clic */
.mu-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.mu-chip { font: inherit; font-size: 13px; color: var(--txt); cursor: pointer; background: #17171d; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; transition: border-color .12s, background .12s; }
.mu-chip:hover { border-color: var(--gc); color: #fff; }
.mu-chip.on { background: color-mix(in srgb, var(--gc) 26%, #17171d); border-color: var(--gc); color: #fff; font-weight: 650; }

/* ================= refonte : menu, onglets, familles, repli, pupitre ================= */
.tn-sep { height: 1px; background: var(--line); margin: 10px 12px; }
.navitem { display: flex; align-items: center; gap: 12px; }
.ni-ic { width: 22px; text-align: center; font-size: 16px; flex-shrink: 0; }
.ni-badge { margin-left: auto; font-size: 9.5px; padding: 2px 7px; border-radius: 99px; background: var(--gc); color: #fff; font-weight: 800; letter-spacing: .06em; }
.tn-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 22px; border-bottom: 1px solid var(--line); }
.tn-tab { font: inherit; font-size: 14px; font-weight: 650; color: var(--txt-dim); background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; padding: 11px 18px; cursor: pointer; }
.tn-tab:hover { color: #fff; }
.tn-tab.on { color: #fff; border-bottom-color: var(--gc); }
.tn-fold { margin-top: 22px; border: 1px dashed var(--line-2); border-radius: 12px; padding: 4px 16px; }
.tn-fold > summary { cursor: pointer; padding: 12px 0; font-size: 13.5px; font-weight: 650; color: var(--txt-dim); list-style: none; }
.tn-fold > summary::before { content: "▸ "; }
.tn-fold[open] > summary::before { content: "▾ "; }
.tn-fold > summary:hover { color: #fff; }
.tn-fold-body { display: flex; flex-direction: column; gap: 22px; padding: 6px 0 18px; }
.tx-fams { display: flex; flex-direction: column; gap: 20px; }
.tx-fam h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--txt-dim); font-weight: 700; }
/* pupitre live */
.lv { display: flex; flex-direction: column; gap: 16px; max-width: 1300px; }
.lv-grid { display: grid; gap: 16px; }
.lv-grid.top { grid-template-columns: 1.15fr 1fr 1fr; } .lv-grid.bottom { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 1250px) { .lv-grid.top, .lv-grid.bottom { grid-template-columns: 1fr 1fr; } }
@media (max-width: 800px) { .lv-grid.top, .lv-grid.bottom { grid-template-columns: 1fr; } }
.lv-card { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-radius: 14px; background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); min-width: 0; }
.lv-card h3 { margin: 0; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--txt-dim); }
.lv-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lv-bigrow { display: flex; align-items: flex-end; gap: 14px; }
.lv-big { font-size: 52px; font-weight: 800; line-height: 1; color: #fff; }
.lv-goal { font-size: 16px; color: var(--txt-dim); padding-bottom: 6px; }
.lv-b { font-weight: 700; }
.lv-b.red { background: #5a1d18; border-color: #a83a30; } .lv-b.green { background: #1d4d27; border-color: #3a9a4c; }
.lv-b.pri { background: linear-gradient(180deg, #ff5a49, #d63a2b); border-color: #ff7a6b; }
.lv-in { width: 82px; font-size: 14px; padding: 9px 10px; } .lv-dname { width: 150px; }
.lv-chip { display: inline-flex; gap: 6px; align-items: baseline; padding: 7px 12px; border-radius: 10px; background: #17171d; border: 1px solid var(--line); font-size: 13px; }
.lv-chip small { color: var(--txt-dim); font-size: 11.5px; } .lv-chip b { color: #fff; }
.lv-pill { display: inline-block; padding: 7px 14px; border-radius: 99px; background: #1c1c23; color: var(--txt-dim); font-size: 13px; font-weight: 700; }
.lv-pill.wins.on { background: #4a3210; color: #ffb23d; } .lv-pill.act.on { background: #0f3a48; color: #7fdcff; }
.lv-lab { font-size: 12px; color: var(--txt-dim); }
.lv-donor { font-size: 22px; color: #fff; }
.lv-chipb { font: inherit; font-size: 13px; color: var(--txt); cursor: pointer; background: #17171d; border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; }
.lv-chipb small { color: #6fe38a; } .lv-chipb:hover { border-color: var(--gc); } .lv-chipb.on { border-color: var(--gc); background: color-mix(in srgb, var(--gc) 22%, #17171d); }
.lv-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .lv-keys .btn { text-align: left; }
.lv-state { font-size: 12.5px; color: var(--txt-dim); min-height: 18px; }
.lv-ac { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.lv-log { display: flex; flex-direction: column; gap: 6px; font-family: Consolas, monospace; font-size: 12.5px; color: var(--txt-dim); }
.lv-log b { color: #fff; }
.lv-warn { max-width: 720px; }
.ni-label { white-space: nowrap; }
.wn-left { min-width: 0; overflow: hidden; }
.wn-live { max-width: 100%; }
/* correctifs de largeur (menu plus large depuis la refonte) */
.fl-layer { grid-template-columns: 6px 30px minmax(150px, 1fr) auto auto; }
@media (max-width: 1500px) { .fl-studio { grid-template-columns: 1fr; } .fl-view { border-right: 0; border-bottom: 1px solid var(--line); } .fl-three { grid-template-columns: 1fr; } }
@media (max-width: 1180px) { .fl-layer { grid-template-columns: 6px 30px minmax(120px, 1fr) auto auto; gap: 10px; } }
.hm-tile small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fl-view .pv3, .fl-view canvas { max-height: 300px; }

/* pupitre : boutons arrondis, en minuscules (comme sur la maquette) */
.lv .btn { clip-path: none; border-radius: 9px; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 700; padding: 9px 15px; background: #1b1b22; border: 1px solid var(--line-2); }
.lv .btn:hover:not(:disabled) { border-color: var(--gc); color: #fff; }
.lv .lv-b.red { background: #5a1d18; border-color: #a83a30; } .lv .lv-b.green { background: #1d4d27; border-color: #3a9a4c; }
.lv .lv-b.pri { background: linear-gradient(180deg, #ff5a49, #d63a2b); border-color: #ff7a6b; color: #fff; }
.lv { max-width: none; }
.lv-card h3 { font-size: 13px; }
.lv-pop { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; color: var(--txt-dim); font-size: 13px; }
.lv-pop b { color: #fff; }
/* fenêtre pupitre seule */
html.pop .titlebar, html.pop .appfoot, html.pop .tn-rail, html.pop .tn-tabs, html.pop .lv-pop { display: none !important; }
html.pop .tn-head { padding: 14px 18px 10px; } html.pop .tn-head p { display: none; } html.pop .tn-page { padding: 14px 16px; }
html.pop .lv-grid.top, html.pop .lv-grid.bottom { grid-template-columns: 1fr; }

/* prison */
.pr-card { display: flex; flex-direction: column; gap: 16px; padding: 18px 20px; border-radius: 14px; background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); }
.pr-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.pr-row b { display: block; color: #fff; font-size: 14px; } .pr-row small { color: var(--txt-dim); font-size: 12px; }
.pr-test { display: flex; gap: 8px; flex-wrap: wrap; }
.pr-desc { text-align: left; }

/* Accueil : signaler un problème */
.hm-report { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 20px; background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 14px; }
.hm-report b { display: block; font-size: 13.5px; color: var(--txt); font-weight: 650; }
.hm-report small { display: block; margin-top: 3px; font-size: 12px; color: var(--txt-dim); line-height: 1.45; max-width: 640px; }
.hm-report.alert { border-color: rgba(255,176,46,.7); box-shadow: 0 0 0 1px rgba(255,176,46,.35) inset; }
.hm-report.alert b { color: #ffcf7a; }
@media (max-width: 1180px) { .hm-report { flex-direction: column; align-items: flex-start; } }

/* Mention obligatoire (Minecraft Usage Guidelines) : bas de chaque page TNT Box */
.tn-disclaimer { margin: 28px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11px; letter-spacing: .06em; text-align: center; color: var(--txt-dim); }

/* Décor : barre « Appliquer » (rien ne se construit dans le jeu avant le clic) */
.dc-apply { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; margin-bottom: 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.dc-apply-t { font-size: 13px; color: var(--txt-dim); line-height: 1.4; }
.dc-apply.pending { border-color: rgba(255,176,46,.7); box-shadow: 0 0 0 1px rgba(255,176,46,.35) inset, 0 6px 20px rgba(0,0,0,.35); }
.dc-apply.pending .dc-apply-t { color: #ffcf7a; font-weight: 600; }
.dc-apply.busy { border-color: rgba(53,214,255,.5); }
.dc-apply.off { opacity: .8; }
@media (max-width: 900px) { .dc-apply { flex-direction: column; align-items: stretch; } }
