
:root{
  --bg:#0a0a0c; --panel:#131318; --panel-2:#1a1a20; --line:#2b2b35;
  --text:#f4f4f7; --muted:#b8b8c6; --gold:#d4af37; --gold-2:#f1d77a;
  --ok:#7be495; --shadow:0 18px 60px rgba(0,0,0,.38); --radius:22px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;height:100%;background:linear-gradient(180deg,#050506 0%,#0a0a0c 100%);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;overflow:hidden}
button,input,select,textarea{font:inherit}
.app{height:100vh;display:grid;grid-template-rows:72px 1fr}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 20px;border-bottom:1px solid rgba(212,175,55,.14);background:rgba(11,11,13,.92);backdrop-filter:blur(14px);position:relative;z-index:20}
.brand{display:flex;align-items:center;gap:12px;font-weight:800}
.brand-badge{width:40px;height:40px;border-radius:14px;background:radial-gradient(circle at 30% 30%,var(--gold-2),var(--gold));color:#111;display:grid;place-items:center;font-weight:900;box-shadow:var(--shadow)}
.top-actions,.top-actions-right{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.btn{padding:11px 14px;border-radius:14px;border:1px solid var(--line);background:#1a1a20;color:var(--text);cursor:pointer;transition:.18s transform,.18s border-color,.18s background}
.btn:hover{transform:translateY(-1px)}
.btn.primary{background:linear-gradient(135deg,var(--gold-2),var(--gold));color:#111;border:none;font-weight:800}
.btn.small{padding:9px 12px;border-radius:12px}
.btn.active{background:rgba(212,175,55,.12);border-color:rgba(212,175,55,.28);color:var(--gold-2)}
.workspace{min-height:0;display:grid;grid-template-columns:76px 1fr}
.dock{border-right:1px solid rgba(212,175,55,.12);background:linear-gradient(180deg,var(--panel),var(--panel-2));padding:12px 10px;display:flex;flex-direction:column;gap:10px;align-items:center}
.dock-btn{width:54px;height:54px;border-radius:16px;border:1px solid var(--line);background:#18181d;color:var(--text);cursor:pointer;display:grid;place-items:center;font-size:1.15rem}
.dock-btn.active{background:rgba(212,175,55,.12);border-color:rgba(212,175,55,.28);color:var(--gold-2)}
.main-area{min-width:0;min-height:0;display:grid;grid-template-columns:320px 1fr}
.panel-column{min-height:0;background:linear-gradient(180deg,var(--panel),var(--panel-2));border-right:1px solid rgba(212,175,55,.12);overflow:hidden}
.panel-wrap{height:100%;display:none;flex-direction:column}
.panel-wrap.active{display:flex}
.panel-head{padding:16px 16px 12px;border-bottom:1px solid rgba(255,255,255,.06)}
.panel-body{padding:16px;overflow:auto}
.panel-title{margin:0;color:var(--gold-2);font-size:1rem}
.hint{color:var(--muted);font-size:.92rem;line-height:1.55}
.section{border:1px solid rgba(255,255,255,.06);background:rgba(255,255,255,.02);border-radius:20px;padding:14px;margin-bottom:14px}
.section h3{margin:0 0 10px;color:var(--gold-2);font-size:1rem}
.stack{display:grid;gap:10px}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.row3{display:grid;grid-template-columns:90px 1fr 88px;gap:10px;align-items:center}
.field,.select,.textarea{width:100%;padding:13px 14px;border-radius:14px;background:#111116;border:1px solid var(--line);color:var(--text)}
.textarea{min-height:88px;resize:vertical}
.chip{padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:#18181d;color:var(--text);cursor:pointer}
.chip.active{background:rgba(212,175,55,.12);border-color:rgba(212,175,55,.28);color:var(--gold-2)}
.subline{font-size:.84rem;color:var(--muted)}
.canvas-area{min-width:0;min-height:0;display:grid;grid-template-rows:auto 1fr;background:radial-gradient(circle at 50% 25%, rgba(212,175,55,.08), transparent 30%), #101015}
.canvas-toolbar{display:grid;grid-template-columns:minmax(220px,1fr) 320px;align-items:start;gap:10px 16px;padding:14px 18px;border-bottom:1px solid rgba(212,175,55,.1)}
.toolbar-right{display:flex;flex-direction:column;gap:8px}
.status{display:inline-flex;align-items:center;gap:8px;padding:9px 12px;border-radius:999px;background:rgba(123,228,149,.1);color:var(--ok);border:1px solid rgba(123,228,149,.2)}
.status-box{min-height:44px;max-height:80px;overflow:auto;white-space:pre-wrap;padding:10px 12px;border:1px solid rgba(255,255,255,.08);border-radius:12px;background:#15151a;color:#d0d0d0;font-size:12px;line-height:1.45}
.contextbar{width:100%;min-height:56px;padding:8px 10px;border-radius:18px;background:rgba(19,19,24,.92);border:1px solid rgba(212,175,55,.18);box-shadow:var(--shadow);display:flex;flex-direction:column;gap:8px}
.context-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.context-row{display:none;align-items:center;gap:8px;flex-wrap:wrap}
.context-row.active{display:flex}
.mini-select,.mini-input,.mini-color{height:36px;padding:7px 9px;border-radius:12px;background:#111116;border:1px solid var(--line);color:var(--text)}
.mini-select{min-width:120px}
.mini-input{width:72px}
.mini-color{width:42px;padding:4px}
.canvas-shell{min-height:0;display:grid;place-items:center;padding:12px;overflow:hidden}
.workstage{width:100%;height:100%;display:grid;place-items:center;overflow:hidden}
.stage-wrap{position:relative}
.print-stage{position:relative;border-radius:28px;background:
  linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015)),
  repeating-linear-gradient(0deg, transparent 0 39px, rgba(255,255,255,.03) 39px 40px),
  repeating-linear-gradient(90deg, transparent 0 39px, rgba(255,255,255,.03) 39px 40px);
  border:1px solid rgba(212,175,55,.22);box-shadow:var(--shadow);overflow:hidden}
.safe-zone{display:none !important}
.stage-label,.stage-note{position:absolute;z-index:4;padding:10px 12px;border-radius:999px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);color:var(--muted)}
.stage-label{top:16px;left:16px}
.stage-note{bottom:16px;right:16px;font-size:.92rem}
canvas{display:block}
.text-list{display:grid;gap:8px}
.text-item{padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:#18181d;color:var(--text);cursor:pointer;text-align:left}
.text-item.active{background:rgba(212,175,55,.12);border-color:rgba(212,175,55,.28);color:var(--gold-2)}
.font-filters{display:grid;gap:10px}
.font-grid{display:grid;grid-template-columns:1fr;gap:8px;max-height:340px;overflow:auto}
.font-card{border:1px solid rgba(255,255,255,.08);background:#17171c;border-radius:14px;padding:10px 12px;text-align:left;cursor:pointer;color:var(--text)}
.font-card:hover{border-color:rgba(212,175,55,.28)}
.font-card.active{border-color:rgba(212,175,55,.38);background:rgba(212,175,55,.08)}
.font-preview{font-size:1.1rem;line-height:1.2;margin-bottom:6px}
.font-meta{font-size:.78rem;color:var(--muted)}
.font-count{font-size:.82rem;color:var(--gold-2)}
.mode-simple-only{display:none}
body[data-editor-mode="simple"] .mode-simple-only{display:block}
body[data-editor-mode="advanced"] .mode-simple-only{display:none}
.engine-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}
.tile-btn{background:#1f1f1f;color:#fff;border:1px solid #353535;border-radius:12px;padding:10px;cursor:pointer;text-align:center}
.tile-btn.active{border-color:#6fa8ff;background:#1f2e47;box-shadow: inset 0 0 0 1px rgba(111,168,255,.35)}
.engine-controls{display:grid;gap:10px;width:100%}
.left-panel-controls input[type="range"]{width:100%}
.left-panel-controls input[type="number"]{width:88px;padding:8px 10px;border-radius:8px;border:1px solid var(--line);background:#111116;color:var(--text)}
.left-panel-controls input[type="color"]{width:100%;height:36px;padding:2px;border-radius:8px;border:1px solid var(--line);background:#111116}
.left-panel-controls label{font-size:12px;color:#fff;font-weight:700}
.action-row{grid-template-columns:1fr 1fr !important}
@media (max-width:1200px){.canvas-toolbar{grid-template-columns:1fr}}
@media (max-width:1000px){.main-area{grid-template-columns:280px 1fr}}
@media (max-width:860px){
  html,body{overflow:auto}.app{height:auto;min-height:100vh;grid-template-rows:auto auto}.workspace{grid-template-columns:64px 1fr}.main-area{grid-template-columns:1fr}
  .panel-column{border-right:none;border-bottom:1px solid rgba(212,175,55,.12);max-height:45vh}.topbar{position:sticky;top:0}.canvas-toolbar{grid-template-columns:1fr}
}

.toolbar-empty{display:none}
.toolbar-right{display:none}

.row3-compact{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}

.quick-canvas-menu{
  position:absolute;
  z-index:60;
  min-width:320px;
  max-width:420px;
  padding:10px;
  border-radius:18px;
  border:1px solid rgba(212,175,55,.22);
  background:rgba(19,19,24,.96);
  box-shadow:0 18px 60px rgba(0,0,0,.38);
  backdrop-filter:blur(10px);
}
.quick-canvas-menu[hidden]{display:none !important}
.quick-canvas-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.quick-canvas-sep{height:1px;background:rgba(255,255,255,.08);margin:10px 0}

.mini-range{width:140px;height:36px;accent-color:var(--gold)}
.toggle-btn.is-on{background:rgba(212,175,55,.16);border-color:rgba(212,175,55,.42);color:var(--gold-2)}

.icon-toggle-btn{
  min-width:42px;
  padding:9px 10px;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:0;
}
.icon-toggle-btn strong,
.icon-toggle-btn em{
  font-size:15px;
  line-height:1;
}

/* guides are Fabric lines, no extra CSS needed */

.layer-list{display:grid;gap:8px}
.layer-item{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#18181d;
  color:var(--text);
  cursor:pointer;
  text-align:left;
}
.layer-item.active{
  background:rgba(212,175,55,.12);
  border-color:rgba(212,175,55,.28);
  color:var(--gold-2);
}
.effects-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.image-slider-row{
  grid-template-columns:90px 1fr 82px !important;
  align-items:center;
}
.image-slider-row label{
  font-size:12px;
  color:#fff;
  font-weight:700;
}
.image-slider-row input[type="range"]{width:100%}
.image-slider-row input[type="number"],
#imageColorizeAlpha{
  width:82px;
  padding:8px 10px;
  border-radius:8px;
  border:1px solid var(--line);
  background:#111116;
  color:var(--text);
}
#imageColorizeColor{
  width:100%;
  height:36px;
  padding:2px;
  border-radius:8px;
  border:1px solid var(--line);
  background:#111116;
}
.img-effect-btn.active{
  background:rgba(212,175,55,.16);
  border-color:rgba(212,175,55,.42);
  color:var(--gold-2);
}

.layer-list{display:grid;gap:8px}
.layer-item{padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:#18181d;color:var(--text);cursor:pointer;text-align:left}
.layer-item.active{background:rgba(212,175,55,.12);border-color:rgba(212,175,55,.28);color:var(--gold-2)}
.effects-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.image-slider-row{grid-template-columns:90px 1fr 82px !important;align-items:center}
.image-slider-row label{font-size:12px;color:#fff;font-weight:700}
.image-slider-row input[type="range"]{width:100%}
.image-slider-row input[type="number"],#imageColorizeAlpha,#imageColorizeAlphaMirror{width:82px;padding:8px 10px;border-radius:8px;border:1px solid var(--line);background:#111116;color:var(--text)}
#imageColorizeColor{width:100%;height:36px;padding:2px;border-radius:8px;border:1px solid var(--line);background:#111116}
.img-effect-btn.active{background:rgba(212,175,55,.16);border-color:rgba(212,175,55,.42);color:var(--gold-2)}
#imageContextBar{display:none}

.layer-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.layer-item-main{
  flex:1;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  background:transparent;
  border:none;
  color:inherit;
  text-align:left;
  cursor:pointer;
  padding:0;
}
.layer-item-actions{
  display:flex;
  align-items:center;
  gap:6px;
}
.layer-icon-btn{
  width:30px;
  height:30px;
  border-radius:8px;
  border:1px solid var(--line);
  background:#111116;
  color:var(--text);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:14px;
}
.layer-icon-btn.is-off{opacity:.55}
.layer-icon-btn.is-locked{
  color:var(--gold-2);
  border-color:rgba(212,175,55,.35);
}


/* ------------------------------
   Ergonomie panneau gauche
------------------------------ */
.app-shell,
.sidebar,
.left-panel,
.dock,
.panel-stack,
.panel-wrap,
.panel-body,
.toolbar,
.toolbar-right,
.layer-list,
#textList,
#imageList{
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.app-shell::-webkit-scrollbar,
.sidebar::-webkit-scrollbar,
.left-panel::-webkit-scrollbar,
.dock::-webkit-scrollbar,
.panel-stack::-webkit-scrollbar,
.panel-wrap::-webkit-scrollbar,
.panel-body::-webkit-scrollbar,
.toolbar::-webkit-scrollbar,
.toolbar-right::-webkit-scrollbar,
.layer-list::-webkit-scrollbar,
#textList::-webkit-scrollbar,
#imageList::-webkit-scrollbar{
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

/* un peu plus d'air dans le panneau */
.panel-body{
  padding-right: 24px;
}
.contextbar{
  padding-right: 24px;
}


/* ---- Calques texte : layout compact propre ---- */
.text-item,
.layer-item{
  min-width: 0;
}
.layer-item-main{
  max-width: calc(100% - 82px);
  padding-right: 8px;
}
.layer-item-actions{
  flex: 0 0 66px;
  width: 66px;
  justify-content: flex-end;
}
#textList .layer-item{
  padding-right: 12px;
}
#textList .layer-item-main{
  font-size: 14px;
}


/* scrollbars invisibles : polices */
#fontGrid,
#fontGrid *{
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#fontGrid::-webkit-scrollbar,
#fontGrid *::-webkit-scrollbar{
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

/* ---- Effets compacts par carte ---- */
.fx-tile-grid{grid-template-columns:1fr !important;gap:10px}
.fx-card{display:grid;gap:8px}
.fx-inline-panel{
  display:none;
  padding:12px;
  border:1px solid rgba(212,175,55,.16);
  border-radius:14px;
  background:rgba(17,17,22,.72);
}
.fx-inline-panel.is-open{display:grid;gap:10px}
.fx-inline-note{font-size:13px;color:#cfd2dc}
.fx-reset-wrap{padding-top:8px}
#panel-effects .image-slider-row{grid-template-columns:92px 1fr 84px !important}
#panel-effects .row2.image-slider-row input[type="file"]{max-width:100%;min-width:0}
#panel-effects .row2.image-slider-row span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.context-warning{
  margin-top:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(212,175,55,.22);
  background:rgba(212,175,55,.08);
  color:var(--gold-2);
  font-size:12px;
  line-height:1.35;
}

.context-warning-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.context-warning-text{
  flex:1;
  min-width:0;
}

#textMotorWarningPanel .context-warning{
  margin-top:0;
}


/* ---- Transformation compacte ciblée ---- */
#panel-transform .tf-stack{
  display:grid;
  gap:10px;
}
#panel-transform .tf-card{
  display:grid;
  gap:8px;
}
#panel-transform .tf-inline-panel{
  display:none;
  padding:12px;
  border:1px solid rgba(212,175,55,.16);
  border-radius:14px;
  background:rgba(17,17,22,.72);
}
#panel-transform .tf-inline-panel.is-open{
  display:grid;
  gap:10px;
}
#panel-transform .tf-inline-note{
  font-size:13px;
  color:#cfd2dc;
}
#panel-transform .image-slider-row{
  grid-template-columns:92px 1fr 84px !important;
}

.stage-label,.stage-note{display:none !important}

.simple-mode-only{display:none}
.simple-presets-grid{
  grid-template-columns:1fr 1fr;
}
body.simple-mode .simple-mode-only{display:block !important}
body.simple-mode [data-advanced-only]{display:none !important}

body.simple-mode #panel-image [data-advanced-only]{display:none !important}
body.simple-mode #panel-quick{display:none !important}
body.simple-mode [data-panel="quick"]{display:none !important}
body.simple-mode #simpleEffectsSection,
body.simple-mode #simpleTransformSection{display:block !important}
body.simple-mode #panel-effects .section:not(#simpleEffectsSection){display:none !important}
body.simple-mode #panel-transform .section:not(#simpleTransformSection){display:none !important}

.simple-effect-color-row{
  margin-bottom:10px;
}
.simple-effect-color-row input[type="color"]{
  width:100%;
  height:36px;
  padding:2px;
  border-radius:8px;
  border:1px solid var(--line);
  background:#111116;
}

body.simple-mode [data-advanced-only="text-vertical-btn"],
body.simple-mode [data-advanced-only="text-delete-btn"]{
  display:none !important;
}

body.simple-mode #deleteTextBtn,
body.simple-mode [data-advanced-only="text-delete-btn"]{
  display:none !important;
}


#tshirtOrientationWrap{margin-top:12px;}


.nts-admin-inline-field{display:flex;flex-direction:column;gap:6px}
.nts-admin-inline-field span{font-size:12px;opacity:.85}
.nts-admin-inline-field select{width:100%}

#panel-download .hint{font-size:12px;opacity:.8}
body.simple-mode [data-advanced-only="download-dock-btn"],
body.simple-mode [data-advanced-only="download-panel"]{display:none !important}


/* =========================================================
 * Download panel - safe visual refresh
 * ========================================================= */
#panel-download .section{
  border:1px solid rgba(212,175,55,.16);
  border-radius:14px;
  background:rgba(255,255,255,.03);
  padding:14px;
}
#panel-download .row2{
  gap:12px;
}
#panel-download label{
  display:flex;
  flex-direction:column;
  gap:8px;
  font-size:12px;
  font-weight:600;
  opacity:.92;
}
#panel-download select{
  width:100%;
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  padding:11px 34px 11px 12px;
  border-radius:12px;
  border:1px solid rgba(212,175,55,.24);
  background:rgba(17,24,39,.92);
  color:#fff;
  font:inherit;
  line-height:1.2;
  outline:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.02);
}
#panel-download select:focus{
  border-color:rgba(212,175,55,.58);
  box-shadow:0 0 0 3px rgba(212,175,55,.14);
}
#panel-download .btn{
  margin-top:14px;
}


/* Studio saved designs */
.nts-projects-grid{display:grid;grid-template-columns:1fr;gap:12px;margin-top:12px}
.nts-project-card{border:1px solid rgba(212,175,55,.18);border-radius:14px;background:rgba(255,255,255,.03);overflow:hidden}
.nts-project-card__preview{height:128px;background:rgba(17,24,39,.92);display:flex;align-items:center;justify-content:center;border-bottom:1px solid rgba(212,175,55,.12)}
.nts-project-card__preview img{display:block;max-width:100%;max-height:100%;object-fit:contain}
.nts-project-card__body{padding:12px;display:flex;flex-direction:column;gap:8px}
.nts-project-card__title{font-weight:700}
.nts-project-card__meta{font-size:12px;opacity:.82}
.nts-project-card__actions{display:flex;gap:8px;flex-wrap:wrap}
.nts-project-empty{font-size:13px;opacity:.84;padding:8px 10px}


/* Text context alignment buttons */
#textContextBar .icon-toggle-btn{
  min-width: 42px;
}

/* =========================================================
 * netteeshirt Studio UI Refresh v1.4.5.37
 * Objectif : interface plus moderne, moins aspect HTML natif.
 * Patch visuel uniquement : ne modifie pas le moteur arc/texture.
 * ========================================================= */
:root{
  --ui-glass:rgba(255,255,255,.045);
  --ui-glass-2:rgba(255,255,255,.075);
  --ui-line:rgba(255,255,255,.105);
  --ui-gold-soft:rgba(212,175,55,.17);
  --ui-gold-line:rgba(212,175,55,.34);
  --ui-blue-soft:rgba(91,141,255,.16);
}

/* 1. Base plus premium */
body{
  background:
    radial-gradient(circle at 18% 0%, rgba(212,175,55,.12), transparent 34%),
    radial-gradient(circle at 90% 12%, rgba(91,141,255,.10), transparent 28%),
    linear-gradient(180deg,#060608 0%,#0d0d12 100%);
}
.topbar{
  min-height:76px;
  border-bottom:1px solid rgba(212,175,55,.18);
  background:linear-gradient(180deg,rgba(17,17,22,.96),rgba(9,9,12,.92));
  box-shadow:0 14px 40px rgba(0,0,0,.34);
}
.brand-badge{
  border-radius:16px;
  box-shadow:0 12px 36px rgba(212,175,55,.16), inset 0 1px 0 rgba(255,255,255,.35);
}

/* 2. Boutons modernes */
.btn,.chip,.tile-btn,.dock-btn,.layer-icon-btn,.font-card,.text-item,.layer-item{
  position:relative;
  overflow:hidden;
  border-color:var(--ui-line);
  background:linear-gradient(180deg,rgba(255,255,255,.065),rgba(255,255,255,.028));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.055), 0 10px 24px rgba(0,0,0,.12);
}
.btn::before,.chip::before,.tile-btn::before,.dock-btn::before,.upload-hero-btn::before,.modern-file-trigger::before{
  content:"";
  position:absolute;
  inset:0;
  opacity:0;
  pointer-events:none;
  background:radial-gradient(circle at 30% 0%,rgba(255,255,255,.18),transparent 42%);
  transition:opacity .18s ease;
}
.btn:hover::before,.chip:hover::before,.tile-btn:hover::before,.dock-btn:hover::before,.upload-hero-btn:hover::before,.modern-file-trigger:hover::before{opacity:1}
.btn:hover,.chip:hover,.tile-btn:hover,.dock-btn:hover,.layer-icon-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(212,175,55,.28);
}
.btn.primary{
  border:1px solid rgba(255,255,255,.14);
  background:linear-gradient(135deg,#ffe89a 0%,#d4af37 48%,#a77f19 100%);
  box-shadow:0 16px 34px rgba(212,175,55,.20), inset 0 1px 0 rgba(255,255,255,.45);
}
.btn.small{
  min-height:38px;
}
.btn.active,.chip.active,.tile-btn.active,.dock-btn.active,.text-item.active,.layer-item.active,.img-effect-btn.active{
  background:linear-gradient(180deg,rgba(212,175,55,.20),rgba(212,175,55,.085));
  border-color:var(--ui-gold-line);
  color:#ffe89a;
  box-shadow:0 12px 28px rgba(212,175,55,.10), inset 0 1px 0 rgba(255,255,255,.08);
}

/* 3. Panneaux / sections */
.panel-column,.dock{
  background:linear-gradient(180deg,rgba(22,22,30,.96),rgba(12,12,17,.96));
}
.panel-head{
  padding:18px 18px 14px;
  background:linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,0));
}
.panel-title{
  font-size:1.05rem;
  letter-spacing:.01em;
}
.panel-body{
  padding:18px;
}
.section{
  border-color:var(--ui-line);
  background:linear-gradient(180deg,rgba(255,255,255,.052),rgba(255,255,255,.024));
  border-radius:22px;
  box-shadow:0 14px 36px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.045);
}
.section h3{
  font-size:.95rem;
  letter-spacing:.02em;
}
.section-title-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.section-subtitle{
  margin:4px 0 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}

/* 4. Champs, select, textarea : aspect application */
.field,.select,.textarea,.mini-select,.mini-input,.mini-color,
.image-slider-row input[type="number"],.left-panel-controls input[type="number"],
#imageColorizeAlpha,#imageColorizeAlphaMirror{
  border-color:var(--ui-line);
  background:linear-gradient(180deg,rgba(8,8,12,.92),rgba(18,18,24,.92));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.045);
  outline:none;
}
.field:focus,.select:focus,.textarea:focus,.mini-select:focus,.mini-input:focus,
.image-slider-row input[type="number"]:focus,.left-panel-controls input[type="number"]:focus{
  border-color:rgba(212,175,55,.52);
  box-shadow:0 0 0 3px rgba(212,175,55,.12), inset 0 1px 0 rgba(255,255,255,.05);
}
input[type="range"]{
  accent-color:var(--gold);
  cursor:pointer;
}
input[type="color"]{
  border-radius:12px !important;
  overflow:hidden;
  cursor:pointer;
}

/* 5. Import image : grande carte moderne */
.ui-upload-section{
  padding:16px;
}
.upload-hero-btn{
  width:100%;
  min-height:86px;
  display:grid;
  grid-template-columns:48px 1fr;
  align-items:center;
  gap:14px;
  text-align:left;
  border-radius:22px;
  padding:16px;
  color:#101014;
}
.upload-hero-icon{
  width:48px;
  height:48px;
  border-radius:16px;
  display:grid;
  place-items:center;
  background:rgba(0,0,0,.14);
  color:#111;
  font-size:28px;
  font-weight:900;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.30);
}
.upload-hero-btn strong,
.modern-file-trigger strong{
  display:block;
  font-size:14px;
  line-height:1.2;
}
.upload-hero-btn em,
.modern-file-trigger em{
  display:block;
  margin-top:4px;
  font-style:normal;
  font-size:12px;
  opacity:.74;
  line-height:1.25;
}

/* 6. Import texture : remplace le input file natif */
.texture-upload-card{
  display:block;
}
.modern-file-input{
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}
.modern-file-trigger{
  position:relative;
  display:grid;
  grid-template-columns:44px 1fr;
  align-items:center;
  gap:12px;
  min-height:72px;
  padding:14px;
  border-radius:20px;
  border:1px dashed rgba(212,175,55,.34);
  background:linear-gradient(180deg,rgba(212,175,55,.105),rgba(255,255,255,.028));
  cursor:pointer;
  color:var(--text);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.055);
}
.modern-file-trigger:hover{
  border-color:rgba(212,175,55,.58);
  transform:translateY(-1px);
}
.modern-file-icon{
  width:44px;
  height:44px;
  border-radius:15px;
  display:grid;
  place-items:center;
  color:#151515;
  background:linear-gradient(135deg,#ffe89a,#d4af37);
  box-shadow:0 10px 20px rgba(212,175,55,.14), inset 0 1px 0 rgba(255,255,255,.42);
  font-weight:900;
}

/* 7. Radios / checks modernisés */
.inline-check{
  min-height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:9px 10px;
  border-radius:14px;
  border:1px solid var(--ui-line);
  background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.026));
  cursor:pointer;
  color:var(--text);
  font-size:12px;
  font-weight:700;
}
.inline-check input{
  accent-color:var(--gold);
}
.inline-check:has(input:checked){
  border-color:var(--ui-gold-line);
  color:#ffe89a;
  background:linear-gradient(180deg,rgba(212,175,55,.18),rgba(212,175,55,.07));
}

/* 8. Effets / cartes */
.fx-card{
  border-radius:20px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.10);
  padding:8px;
}
.fx-inline-panel{
  border-radius:16px;
  background:rgba(0,0,0,.12);
  border-color:rgba(255,255,255,.07);
}
.fx-tile-grid,.tile-grid{
  gap:10px;
}

/* 9. Canvas stage plus propre */
.canvas-area{
  background:
    radial-gradient(circle at 50% 0%, rgba(212,175,55,.09), transparent 30%),
    radial-gradient(circle at 90% 90%, rgba(91,141,255,.08), transparent 34%),
    #101015;
}
.print-stage{
  border-radius:30px;
  border-color:rgba(212,175,55,.28);
  box-shadow:0 22px 70px rgba(0,0,0,.42), 0 0 0 1px rgba(255,255,255,.025);
}
.contextbar{
  background:linear-gradient(180deg,rgba(24,24,31,.94),rgba(13,13,18,.94));
  border-color:rgba(212,175,55,.20);
}

/* 10. Scrollbar invisible mais scroll fonctionnel */
.panel-body,.font-grid,.layer-list,.status-box{
  scrollbar-width:none;
}
.panel-body::-webkit-scrollbar,.font-grid::-webkit-scrollbar,.layer-list::-webkit-scrollbar,.status-box::-webkit-scrollbar{
  width:0;
  height:0;
}

@media (max-width:860px){
  .topbar{gap:10px;padding:12px}
  .top-actions{gap:6px}
  .btn.small{padding:8px 9px}
  .upload-hero-btn{min-height:76px;grid-template-columns:42px 1fr}
  .upload-hero-icon{width:42px;height:42px;border-radius:14px}
}


/* =========================================================
   PREMIUM SOFT GOLD UI — NETTEESHIRT STABLE IDENTITY
   Version UI: 2026-05-17 / v1.4.5.38
   Objectif: stabiliser l'interface sur la direction validée
   Noir & or premium, soft glass, boutons arrondis, menus premium,
   zones d'import modernes, scrollbars invisibles.
   ========================================================= */

/* 1. Tokens Premium Soft Gold */
:root{
  --bg:#060606;
  --panel:#111111;
  --panel-2:#181714;
  --line:rgba(255,255,255,.105);
  --text:#f8f0dc;
  --muted:#a99f8f;
  --gold:#d4af37;
  --gold-2:#f4de8a;
  --gold-3:#fff0b8;
  --ok:#8ee8a8;
  --shadow:0 20px 70px rgba(0,0,0,.46);
  --radius:22px;

  --ntpsg-bg:#060606;
  --ntpsg-bg-soft:#10100f;
  --ntpsg-panel:rgba(18,18,18,.94);
  --ntpsg-panel-2:rgba(27,25,20,.94);
  --ntpsg-glass:linear-gradient(180deg,rgba(255,255,255,.065),rgba(255,255,255,.026));
  --ntpsg-gold-glass:linear-gradient(180deg,rgba(212,175,55,.18),rgba(212,175,55,.055));
  --ntpsg-gold-solid:linear-gradient(180deg,#f5df8d,#d4af37);
  --ntpsg-line:rgba(255,255,255,.10);
  --ntpsg-line-soft:rgba(255,255,255,.075);
  --ntpsg-line-gold:rgba(212,175,55,.34);
  --ntpsg-line-gold-strong:rgba(244,222,138,.62);
  --ntpsg-text:#f8f0dc;
  --ntpsg-muted:#a99f8f;
  --ntpsg-gold:#d4af37;
  --ntpsg-gold-2:#f4de8a;
  --ntpsg-gold-3:#fff0b8;
  --ntpsg-dark:#070707;
  --ntpsg-radius-xl:28px;
  --ntpsg-radius-lg:22px;
  --ntpsg-radius-md:16px;
  --ntpsg-radius-sm:12px;
  --ntpsg-shadow:0 20px 70px rgba(0,0,0,.46);
  --ntpsg-shadow-soft:0 14px 38px rgba(0,0,0,.28);
}

/* 2. Fond général premium */
html,body{
  background:
    radial-gradient(circle at 0% 0%, rgba(212,175,55,.16), transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(212,175,55,.07), transparent 38%),
    linear-gradient(145deg,#050505,#11100e 48%,#050505) !important;
  color:var(--ntpsg-text) !important;
}
body,button,input,select,textarea{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}

/* 3. Topbar Premium Soft Gold */
.topbar{
  min-height:76px;
  border-bottom:1px solid var(--ntpsg-line-gold) !important;
  background:
    radial-gradient(circle at top left, rgba(212,175,55,.13), transparent 32%),
    linear-gradient(180deg,rgba(18,18,18,.96),rgba(7,7,7,.94)) !important;
  backdrop-filter:blur(18px);
  box-shadow:0 12px 36px rgba(0,0,0,.36);
}
.brand{letter-spacing:-.02em;color:var(--ntpsg-text)}
.brand-badge{
  border-radius:16px !important;
  background:var(--ntpsg-gold-solid) !important;
  color:#090909 !important;
  box-shadow:0 12px 28px rgba(212,175,55,.18), inset 0 1px 0 rgba(255,255,255,.45) !important;
}

/* 4. Boutons principaux — Premium Gold Icon */
.btn,.chip,.tile-btn,.text-item,.font-card,.layer-item,.dock-btn,.tool-btn{
  border:1px solid var(--ntpsg-line) !important;
  background:var(--ntpsg-glass) !important;
  color:var(--ntpsg-text) !important;
  border-radius:var(--ntpsg-radius-md) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.055), 0 10px 24px rgba(0,0,0,.16);
  transition:transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease, color .16s ease !important;
}
.btn:hover,.chip:hover,.tile-btn:hover,.text-item:hover,.font-card:hover,.layer-item:hover,.dock-btn:hover,.tool-btn:hover{
  transform:translateY(-1px);
  border-color:var(--ntpsg-line-gold) !important;
  background:var(--ntpsg-gold-glass) !important;
  box-shadow:0 14px 32px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.08);
}
.btn:active,.chip:active,.tile-btn:active,.dock-btn:active{transform:translateY(0)}
.btn.primary,.upload-hero-btn{
  border-color:rgba(255,255,255,.22) !important;
  background:var(--ntpsg-gold-solid) !important;
  color:#090909 !important;
  font-weight:900 !important;
  box-shadow:0 12px 28px rgba(212,175,55,.18), inset 0 1px 0 rgba(255,255,255,.48) !important;
}
.btn.active,.chip.active,.tile-btn.active,.dock-btn.active,.text-item.active,.font-card.active,.layer-item.active,.toggle-btn.is-on{
  color:var(--ntpsg-gold-3) !important;
  border-color:var(--ntpsg-line-gold-strong) !important;
  background:linear-gradient(180deg,rgba(212,175,55,.22),rgba(212,175,55,.075)) !important;
  box-shadow:0 0 0 3px rgba(212,175,55,.07), inset 0 1px 0 rgba(255,255,255,.08) !important;
}
.btn.small{border-radius:14px !important;font-weight:800}
.icon-toggle-btn{border-radius:14px !important}

/* 5. Dock / panneau gauche */
.workspace{grid-template-columns:78px 1fr}
.dock{
  border-right:1px solid var(--ntpsg-line-gold) !important;
  background:
    radial-gradient(circle at top,rgba(212,175,55,.10),transparent 36%),
    linear-gradient(180deg,rgba(18,18,18,.96),rgba(9,9,9,.96)) !important;
  gap:11px;
}
.dock-btn{
  width:56px;height:56px;
  font-size:1.12rem;
}

/* 6. Colonnes et panneaux */
.main-area{grid-template-columns:330px 1fr}
.panel-column{
  background:
    linear-gradient(180deg,rgba(18,18,18,.96),rgba(13,12,10,.96)) !important;
  border-right:1px solid var(--ntpsg-line-gold) !important;
}
.panel-head{
  border-bottom:1px solid var(--ntpsg-line) !important;
  background:radial-gradient(circle at top right,rgba(212,175,55,.12),transparent 44%) !important;
  padding:18px 18px 14px !important;
}
.panel-title{
  color:var(--ntpsg-gold-2) !important;
  font-size:1.05rem !important;
  letter-spacing:.01em;
}
.panel-body{padding:18px !important}
.section,.ui-card,.fx-card{
  border:1px solid var(--ntpsg-line) !important;
  border-radius:var(--ntpsg-radius-lg) !important;
  background:
    radial-gradient(circle at top right,rgba(212,175,55,.085),transparent 38%),
    linear-gradient(180deg,rgba(255,255,255,.058),rgba(255,255,255,.024)) !important;
  box-shadow:var(--ntpsg-shadow-soft), inset 0 1px 0 rgba(255,255,255,.055) !important;
}
.section h3{
  color:var(--ntpsg-gold-2) !important;
  font-weight:900 !important;
  letter-spacing:.015em;
}
.hint,.subline,.font-meta,.section-subtitle{color:var(--ntpsg-muted) !important}

/* 7. Champs texte / inputs */
.field,.textarea,.mini-input,.mini-color,.image-slider-row input[type="number"],.left-panel-controls input[type="number"],#imageColorizeAlpha,#imageColorizeAlphaMirror{
  color:var(--ntpsg-text) !important;
  border:1px solid var(--ntpsg-line) !important;
  border-radius:var(--ntpsg-radius-md) !important;
  background:linear-gradient(180deg,rgba(8,8,8,.94),rgba(18,17,15,.94)) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.045) !important;
  outline:none !important;
}
.field:focus,.textarea:focus,.mini-input:focus,.image-slider-row input[type="number"]:focus,.left-panel-controls input[type="number"]:focus{
  border-color:var(--ntpsg-line-gold-strong) !important;
  box-shadow:0 0 0 3px rgba(212,175,55,.12), inset 0 1px 0 rgba(255,255,255,.06) !important;
}
input[type="range"]{accent-color:var(--ntpsg-gold);cursor:pointer}
input[type="color"]{border-radius:14px !important;cursor:pointer;overflow:hidden}

/* 8. Menus déroulants Premium Soft Gold */
.select,.mini-select,.tool-select select,select{
  appearance:none !important;
  -webkit-appearance:none !important;
  color:var(--ntpsg-text) !important;
  border:1px solid var(--ntpsg-line-gold) !important;
  border-radius:var(--ntpsg-radius-md) !important;
  background:
    linear-gradient(180deg,rgba(212,175,55,.13),rgba(212,175,55,.035)),
    #0a0a0a !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.055), 0 10px 24px rgba(0,0,0,.16) !important;
  font-weight:800 !important;
  cursor:pointer;
  outline:none !important;
  background-image:
    linear-gradient(180deg,rgba(212,175,55,.13),rgba(212,175,55,.035)),
    linear-gradient(45deg,transparent 50%,var(--ntpsg-gold-2) 50%),
    linear-gradient(135deg,var(--ntpsg-gold-2) 50%,transparent 50%) !important;
  background-position:
    0 0,
    calc(100% - 19px) 50%,
    calc(100% - 13px) 50% !important;
  background-size:
    100% 100%,
    6px 6px,
    6px 6px !important;
  background-repeat:no-repeat !important;
  padding-right:42px !important;
}
select option{background:#111 !important;color:#f8f0dc !important}
.select:focus,.mini-select:focus,.tool-select select:focus,select:focus{
  border-color:var(--ntpsg-line-gold-strong) !important;
  box-shadow:0 0 0 3px rgba(212,175,55,.12), inset 0 1px 0 rgba(255,255,255,.06) !important;
}

/* 9. Imports images / textures en cartes premium */
.ui-upload-section{padding:16px !important}
.upload-hero-btn{
  width:100%;
  min-height:92px;
  display:grid !important;
  grid-template-columns:52px 1fr;
  align-items:center;
  gap:15px;
  text-align:left;
  border-radius:24px !important;
  padding:17px !important;
}
.upload-hero-icon{
  width:52px;height:52px;
  border-radius:18px !important;
  display:grid;place-items:center;
  background:rgba(0,0,0,.16) !important;
  color:#0a0a0a !important;
  font-size:30px;font-weight:950;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.33) !important;
}
.upload-hero-btn strong,.modern-file-trigger strong{font-size:14px;font-weight:950}
.upload-hero-btn em,.modern-file-trigger em{font-style:normal;color:rgba(0,0,0,.70)}
.modern-file-trigger{
  border:1px dashed var(--ntpsg-line-gold-strong) !important;
  border-radius:22px !important;
  background:linear-gradient(180deg,rgba(212,175,55,.16),rgba(255,255,255,.035)) !important;
  color:var(--ntpsg-text) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06), 0 12px 30px rgba(0,0,0,.18) !important;
}
.modern-file-trigger:hover{transform:translateY(-1px);border-color:rgba(244,222,138,.78) !important}
.modern-file-icon{
  border-radius:16px !important;
  background:var(--ntpsg-gold-solid) !important;
  color:#0a0a0a !important;
  box-shadow:0 10px 20px rgba(212,175,55,.16), inset 0 1px 0 rgba(255,255,255,.44) !important;
}
.modern-file-trigger em{color:var(--ntpsg-muted) !important}

/* 10. Radios / choix texture en cartes premium */
.inline-check{
  border:1px solid var(--ntpsg-line) !important;
  border-radius:16px !important;
  background:var(--ntpsg-glass) !important;
  color:var(--ntpsg-text) !important;
  font-weight:850 !important;
}
.inline-check input{accent-color:var(--ntpsg-gold)}
.inline-check:has(input:checked){
  border-color:var(--ntpsg-line-gold-strong) !important;
  color:var(--ntpsg-gold-3) !important;
  background:var(--ntpsg-gold-glass) !important;
}

/* 11. Effets / grille / panneaux inline */
.fx-inline-panel{
  border:1px solid var(--ntpsg-line) !important;
  border-radius:18px !important;
  background:rgba(0,0,0,.16) !important;
}
.effects-grid,.tile-grid,.fx-tile-grid{gap:10px !important}

/* 12. Canvas et barre contextuelle */
.canvas-area{
  background:
    radial-gradient(circle at 50% 0%, rgba(212,175,55,.12), transparent 30%),
    radial-gradient(circle at 100% 100%, rgba(212,175,55,.06), transparent 35%),
    #0d0d0d !important;
}
.canvas-toolbar{
  border-bottom:1px solid var(--ntpsg-line-gold) !important;
  background:linear-gradient(180deg,rgba(12,12,12,.64),rgba(7,7,7,.40)) !important;
}
.contextbar{
  border:1px solid var(--ntpsg-line-gold) !important;
  border-radius:22px !important;
  background:
    radial-gradient(circle at top right,rgba(212,175,55,.10),transparent 42%),
    linear-gradient(180deg,rgba(22,22,22,.96),rgba(10,10,10,.94)) !important;
  box-shadow:var(--ntpsg-shadow-soft) !important;
}
.print-stage{
  border:1px solid rgba(212,175,55,.32) !important;
  border-radius:32px !important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.032),rgba(255,255,255,.014)),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(212,175,55,.035) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(212,175,55,.035) 39px 40px) !important;
  box-shadow:0 24px 80px rgba(0,0,0,.48), 0 0 0 1px rgba(255,255,255,.024) !important;
}
.stage-label,.stage-note{
  border-color:var(--ntpsg-line) !important;
  background:rgba(8,8,8,.38) !important;
  color:var(--ntpsg-muted) !important;
  backdrop-filter:blur(10px);
}

/* 13. Statuts / messages */
.status{
  border:1px solid rgba(142,232,168,.26) !important;
  background:rgba(142,232,168,.10) !important;
  color:var(--ok) !important;
}
.status-box{
  border:1px solid var(--ntpsg-line) !important;
  background:rgba(0,0,0,.28) !important;
  color:#d7d0c0 !important;
  border-radius:14px !important;
}

/* 14. Menus rapides */
.quick-canvas-menu{
  border:1px solid var(--ntpsg-line-gold) !important;
  border-radius:22px !important;
  background:linear-gradient(180deg,rgba(22,22,22,.98),rgba(9,9,9,.98)) !important;
  box-shadow:var(--ntpsg-shadow) !important;
}
.quick-canvas-sep{background:var(--ntpsg-line) !important}

/* 15. Scrollbars invisibles mais scroll fonctionnel */
.panel-body,.font-grid,.layer-list,.status-box,.text-list,.quick-canvas-menu{
  scrollbar-width:none !important;
  -ms-overflow-style:none !important;
}
.panel-body::-webkit-scrollbar,.font-grid::-webkit-scrollbar,.layer-list::-webkit-scrollbar,.status-box::-webkit-scrollbar,.text-list::-webkit-scrollbar,.quick-canvas-menu::-webkit-scrollbar{
  width:0 !important;height:0 !important;
}

/* 16. Responsive */
@media (max-width:1000px){.main-area{grid-template-columns:300px 1fr}}
@media (max-width:860px){
  .workspace{grid-template-columns:66px 1fr}
  .main-area{grid-template-columns:1fr}
  .panel-column{border-right:none !important;border-bottom:1px solid var(--ntpsg-line-gold) !important}
  .topbar{padding:12px;gap:10px}
  .dock-btn{width:50px;height:50px;border-radius:16px !important}
  .upload-hero-btn{min-height:78px;grid-template-columns:44px 1fr}
  .upload-hero-icon{width:44px;height:44px;border-radius:15px !important}
}

/* =========================================================
   HOTFIX LAYOUT v1.4.5.39 — Premium Soft Gold compact stable
   Objectif : corriger les problèmes d'affichage dans l'iframe.
   - Topbar compacte qui ne pousse plus le canvas hors écran
   - Scroll interne restauré dans les panneaux
   - Dock scrollable si hauteur réduite
   - Canvas toujours visible sans obligation plein écran
   ========================================================= */

html,
body{
  width:100% !important;
  height:100% !important;
  min-height:0 !important;
  overflow:hidden !important;
}

.app{
  width:100% !important;
  height:100dvh !important;
  min-height:0 !important;
  max-height:100dvh !important;
  display:grid !important;
  grid-template-rows:auto minmax(0,1fr) !important;
  overflow:hidden !important;
}

.topbar{
  min-height:58px !important;
  max-height:72px !important;
  padding:8px 12px !important;
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  overflow:hidden !important;
}

.brand{
  flex:0 0 auto !important;
  min-width:145px !important;
}

.brand-badge{
  width:34px !important;
  height:34px !important;
  border-radius:12px !important;
}

.top-actions,
.top-actions-right{
  min-width:0 !important;
  display:flex !important;
  align-items:center !important;
  flex-wrap:nowrap !important;
  gap:7px !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  scrollbar-width:none !important;
  -ms-overflow-style:none !important;
}

.top-actions::-webkit-scrollbar,
.top-actions-right::-webkit-scrollbar{
  width:0 !important;
  height:0 !important;
  display:none !important;
}

.top-actions{
  flex:1 1 auto !important;
}

.top-actions-right{
  flex:0 1 auto !important;
  justify-content:flex-end !important;
}

.topbar .btn,
.topbar .btn.small{
  min-height:34px !important;
  padding:8px 10px !important;
  border-radius:12px !important;
  font-size:12px !important;
  white-space:nowrap !important;
  flex:0 0 auto !important;
}

.workspace{
  min-width:0 !important;
  min-height:0 !important;
  height:100% !important;
  overflow:hidden !important;
  grid-template-columns:66px minmax(0,1fr) !important;
}

.dock{
  min-height:0 !important;
  height:100% !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding:8px 7px 14px !important;
  gap:8px !important;
  scrollbar-width:none !important;
  -ms-overflow-style:none !important;
}

.dock::-webkit-scrollbar{
  width:0 !important;
  height:0 !important;
  display:none !important;
}

.dock-btn{
  width:48px !important;
  height:48px !important;
  min-height:48px !important;
  border-radius:14px !important;
  flex:0 0 auto !important;
}

.main-area{
  min-width:0 !important;
  min-height:0 !important;
  height:100% !important;
  overflow:hidden !important;
  grid-template-columns:300px minmax(0,1fr) !important;
}

.panel-column{
  min-width:0 !important;
  min-height:0 !important;
  height:100% !important;
  overflow:hidden !important;
}

.panel-wrap{
  min-width:0 !important;
  min-height:0 !important;
  height:100% !important;
  overflow:hidden !important;
}

.panel-wrap.active{
  display:flex !important;
}

.panel-head{
  flex:0 0 auto !important;
  padding:12px 14px 10px !important;
}

.panel-title{
  font-size:15px !important;
}

.panel-body{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding:12px 14px 76px !important;
  scrollbar-width:none !important;
  -ms-overflow-style:none !important;
}

.panel-body::-webkit-scrollbar{
  width:0 !important;
  height:0 !important;
  display:none !important;
}

.section,
.ui-card,
.fx-card{
  border-radius:18px !important;
  padding:12px !important;
  margin-bottom:12px !important;
}

.section h3{
  font-size:13px !important;
  margin-bottom:8px !important;
}

.stack{
  gap:8px !important;
}

.btn,
.chip,
.tile-btn,
.text-item,
.font-card,
.layer-item{
  min-height:34px;
}

.btn.small,
.chip{
  padding:8px 10px !important;
  font-size:12px !important;
}

.field,
.select,
.textarea,
.mini-select,
.mini-input,
.mini-color{
  min-height:36px !important;
  padding:9px 11px !important;
  border-radius:12px !important;
  font-size:13px !important;
}

.textarea{
  min-height:76px !important;
}

.canvas-area{
  min-width:0 !important;
  min-height:0 !important;
  height:100% !important;
  overflow:hidden !important;
  display:grid !important;
  grid-template-rows:auto minmax(0,1fr) !important;
}

.canvas-toolbar{
  min-height:0 !important;
  max-height:122px !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding:8px 10px !important;
  gap:8px !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) !important;
  scrollbar-width:none !important;
  -ms-overflow-style:none !important;
}

.canvas-toolbar::-webkit-scrollbar{
  width:0 !important;
  height:0 !important;
  display:none !important;
}

.contextbar{
  min-height:0 !important;
  padding:8px 10px !important;
  border-radius:18px !important;
  gap:6px !important;
}

.context-top,
.context-row{
  gap:6px !important;
}

.contextbar .btn.small,
.contextbar .mini-select,
.contextbar .mini-input,
.contextbar .mini-color{
  min-height:32px !important;
  height:32px !important;
  font-size:12px !important;
}

.canvas-shell,
.workstage{
  min-width:0 !important;
  min-height:0 !important;
  width:100% !important;
  height:100% !important;
  overflow:hidden !important;
}

.canvas-shell{
  padding:8px !important;
}

.print-stage{
  max-width:100% !important;
  max-height:100% !important;
  border-radius:24px !important;
}

.upload-hero-btn{
  min-height:72px !important;
  grid-template-columns:42px minmax(0,1fr) !important;
  padding:12px !important;
  border-radius:18px !important;
}

.upload-hero-icon{
  width:42px !important;
  height:42px !important;
  border-radius:14px !important;
  font-size:24px !important;
}

.modern-file-trigger{
  min-height:64px !important;
  grid-template-columns:40px minmax(0,1fr) !important;
  padding:12px !important;
  border-radius:18px !important;
}

.modern-file-icon{
  width:40px !important;
  height:40px !important;
  border-radius:14px !important;
}

.font-grid{
  max-height:260px !important;
  overflow-y:auto !important;
}

.status-box{
  max-height:54px !important;
}

/* Largeur moyenne : panneau plus compact pour voir le canvas */
@media (max-width:1180px){
  .main-area{grid-template-columns:280px minmax(0,1fr) !important;}
  .brand{min-width:118px !important;}
  .brand .subline{display:none !important;}
}

/* Tablette / petite fenêtre : le panneau devient horizontalement plus compact */
@media (max-width:920px){
  html,body{overflow:hidden !important;}
  .app{height:100dvh !important;min-height:0 !important;}
  .topbar{max-height:92px !important;align-items:flex-start !important;flex-wrap:wrap !important;}
  .brand{min-width:auto !important;}
  .top-actions{order:3;flex-basis:100% !important;}
  .workspace{grid-template-columns:58px minmax(0,1fr) !important;}
  .dock-btn{width:42px !important;height:42px !important;min-height:42px !important;}
  .main-area{grid-template-columns:260px minmax(0,1fr) !important;}
  .panel-body{padding-bottom:92px !important;}
}

@media (max-width:760px){
  .main-area{grid-template-columns:1fr !important;grid-template-rows:minmax(190px,42vh) minmax(0,1fr) !important;}
  .panel-column{border-right:none !important;border-bottom:1px solid var(--ntpsg-line-gold) !important;}
  .canvas-toolbar{max-height:96px !important;}
}

/* =========================================================
   HOTFIX LISIBILITÉ v1.4.5.40 — Premium Soft Gold balanced
   Objectif : garder le layout .39 fonctionnel, mais agrandir
   les contrôles trop petits : couleurs, champs, mini-boutons,
   labels et zones cliquables.
   ========================================================= */

:root{
  --ntpsg-readable-control-h:40px;
  --ntpsg-readable-mini-h:38px;
  --ntpsg-readable-color-h:44px;
  --ntpsg-readable-radius:14px;
}

/* 1. Typographie panneau : un peu plus lisible sans agrandir toute l’interface */
.panel-body,
.section,
.stack{
  font-size:14px !important;
}

.section h3,
.panel-title{
  font-size:1.02rem !important;
  line-height:1.25 !important;
}

.hint,
.section-subtitle,
.subline{
  font-size:13px !important;
  line-height:1.45 !important;
}

.left-panel-controls label,
.image-slider-row label,
.select-label,
.field-label{
  font-size:13px !important;
  line-height:1.25 !important;
  font-weight:800 !important;
  color:#fff4cf !important;
}

/* 2. Boutons principaux et chips : plus confortables */
.btn,
.chip,
.tile-btn,
.text-item,
.layer-item,
.font-card{
  min-height:var(--ntpsg-readable-control-h) !important;
  padding:11px 14px !important;
  font-size:14px !important;
  line-height:1.2 !important;
}

.btn.small,
.contextbar .btn.small,
.inline-check{
  min-height:var(--ntpsg-readable-mini-h) !important;
  height:auto !important;
  padding:9px 12px !important;
  font-size:13px !important;
  line-height:1.2 !important;
  border-radius:13px !important;
}

/* 3. Champs et menus : plus hauts et plus lisibles */
.field,
.select,
.textarea,
.mini-select,
.mini-input,
.image-slider-row input[type="number"],
.left-panel-controls input[type="number"],
#imageColorizeAlpha,
#imageColorizeAlphaMirror{
  min-height:var(--ntpsg-readable-control-h) !important;
  height:auto !important;
  padding:10px 12px !important;
  font-size:14px !important;
  border-radius:var(--ntpsg-readable-radius) !important;
}

.contextbar .mini-select,
.contextbar .mini-input{
  min-height:var(--ntpsg-readable-mini-h) !important;
  height:var(--ntpsg-readable-mini-h) !important;
  font-size:13px !important;
  padding:8px 10px !important;
}

.mini-select{
  min-width:138px !important;
}

.mini-input{
  width:82px !important;
}

/* 4. Couleurs : gros point important signalé par Mika */
input[type="color"],
.mini-color,
.left-panel-controls input[type="color"],
#imageColorizeColor,
#imageColorizeColorMirror,
.simple-effect-color-row input[type="color"]{
  width:58px !important;
  min-width:58px !important;
  height:var(--ntpsg-readable-color-h) !important;
  min-height:var(--ntpsg-readable-color-h) !important;
  padding:3px !important;
  border-radius:14px !important;
  border:1px solid rgba(212,175,55,.42) !important;
  background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.025)) !important;
  box-shadow:0 8px 20px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.08) !important;
}

.contextbar .mini-color{
  width:52px !important;
  min-width:52px !important;
  height:38px !important;
  min-height:38px !important;
}

input[type="color"]::-webkit-color-swatch-wrapper{
  padding:0 !important;
}

input[type="color"]::-webkit-color-swatch{
  border:none !important;
  border-radius:10px !important;
}

input[type="color"]::-moz-color-swatch{
  border:none !important;
  border-radius:10px !important;
}

/* 5. Sliders : hauteur et zone tactile plus confortables */
input[type="range"],
.mini-range,
.left-panel-controls input[type="range"],
.image-slider-row input[type="range"]{
  min-height:34px !important;
  height:34px !important;
}

.mini-range{
  width:160px !important;
}

/* 6. Lignes de réglage : conserver le layout .39, mais avec colonnes un peu plus lisibles */
.row3,
#panel-transform .image-slider-row,
.image-slider-row{
  gap:10px !important;
  align-items:center !important;
}

.left-panel-controls input[type="number"]{
  width:96px !important;
}

.image-slider-row input[type="number"],
#imageColorizeAlpha,
#imageColorizeAlphaMirror{
  width:92px !important;
}

/* 7. Cartes import : rester premium, mais texte plus lisible */
.upload-hero-btn strong,
.modern-file-trigger strong{
  font-size:15px !important;
  line-height:1.25 !important;
}

.upload-hero-btn em,
.modern-file-trigger em{
  font-size:13px !important;
  line-height:1.35 !important;
}

/* 8. Dock : garder compact mais pas minuscule */
.dock-btn{
  width:48px !important;
  height:48px !important;
  min-height:48px !important;
  border-radius:15px !important;
  font-size:1.05rem !important;
}

/* 9. Layout : on garde la correction .39, en ajoutant juste un peu de respiration */
.panel-body{
  padding:14px !important;
}

.section{
  padding:14px !important;
  margin-bottom:12px !important;
}

.canvas-toolbar{
  max-height:136px !important;
}

.contextbar{
  padding:9px 10px !important;
}

/* 10. Petite fenêtre : garder l’affichage complet prioritaire */
@media (max-width:920px){
  .btn,
  .chip,
  .tile-btn{
    min-height:38px !important;
    padding:9px 11px !important;
    font-size:13px !important;
  }

  input[type="color"],
  .mini-color,
  .left-panel-controls input[type="color"]{
    width:52px !important;
    min-width:52px !important;
    height:40px !important;
    min-height:40px !important;
  }

  .main-area{grid-template-columns:270px minmax(0,1fr) !important;}
  .canvas-toolbar{max-height:128px !important;}
}

@media (max-width:760px){
  .panel-body{padding:12px !important;}
  .section{padding:12px !important;}
  .canvas-toolbar{max-height:112px !important;}
}

/* =========================================================
   HOTFIX v1.4.5.41 — Topbar contextuelle fixe
   Objectif : empêcher le canvas de monter/descendre quand
   la barre contextuelle change selon l'outil ou la sélection.
   La zone reste réservée en permanence, avec scroll interne.
   ========================================================= */
:root{
  --ntpsg-contextbar-h:136px;
}

.canvas-area{
  grid-template-rows:var(--ntpsg-contextbar-h) minmax(0,1fr) !important;
}

.canvas-toolbar{
  height:var(--ntpsg-contextbar-h) !important;
  min-height:var(--ntpsg-contextbar-h) !important;
  max-height:var(--ntpsg-contextbar-h) !important;
  overflow:hidden !important;
  align-content:start !important;
  box-sizing:border-box !important;
}

.contextbar,
.toolbar-right,
.toolbar-empty{
  max-height:calc(var(--ntpsg-contextbar-h) - 18px) !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  scrollbar-width:none !important;
}

.contextbar::-webkit-scrollbar,
.toolbar-right::-webkit-scrollbar,
.toolbar-empty::-webkit-scrollbar{
  width:0 !important;
  height:0 !important;
}

/* Même sans sélection, la zone reste physiquement présente. */
.toolbar-empty{
  display:block !important;
  min-height:56px !important;
  visibility:hidden !important;
  pointer-events:none !important;
}

/* Les barres cachées par JS ne doivent pas supprimer la hauteur globale. */
#textContextBar[style*="display:none"],
#imageContextBar[style*="display:none"]{
  display:none !important;
}

/* Responsive : hauteur réservée adaptée, mais toujours fixe. */
@media (max-width:920px){
  :root{--ntpsg-contextbar-h:128px;}
  .canvas-area{grid-template-rows:var(--ntpsg-contextbar-h) minmax(0,1fr) !important;}
  .canvas-toolbar{
    height:var(--ntpsg-contextbar-h) !important;
    min-height:var(--ntpsg-contextbar-h) !important;
    max-height:var(--ntpsg-contextbar-h) !important;
  }
}

@media (max-width:760px){
  :root{--ntpsg-contextbar-h:118px;}
  .canvas-area{grid-template-rows:var(--ntpsg-contextbar-h) minmax(0,1fr) !important;}
  .canvas-toolbar{
    height:var(--ntpsg-contextbar-h) !important;
    min-height:var(--ntpsg-contextbar-h) !important;
    max-height:var(--ntpsg-contextbar-h) !important;
  }
}


/* =========================================================
   HOTFIX v1.4.5.43 — Restauration plein écran après import
   ---------------------------------------------------------
   Bouton affiché uniquement si le navigateur refuse de revenir
   automatiquement en plein écran après le sélecteur de fichiers.
   ========================================================= */
.nts-restore-fullscreen-btn{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:99999;
  min-height:46px;
  padding:0 18px;
  border-radius:999px;
  border:1px solid rgba(212,175,55,.48);
  color:#101010;
  background:linear-gradient(180deg,#f5df8d,#d4af37);
  box-shadow:0 18px 48px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.28);
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:14px;
  font-weight:900;
  letter-spacing:-.01em;
  cursor:pointer;
}
.nts-restore-fullscreen-btn[hidden]{display:none!important;}
.nts-restore-fullscreen-btn:hover{filter:brightness(1.05);transform:translateY(-1px);}

/* =========================================================
   HOTFIX v1.4.5.46 — Déformation image native Fabric
   ---------------------------------------------------------
   - Contrôles plus lisibles pour scaleX / scaleY / skewX / skewY / angle
   - Aucun moteur custom : uniquement propriétés Fabric natives
   ========================================================= */
.nt-image-deform-section {
  border-color: rgba(212, 175, 55, .34) !important;
  background: linear-gradient(145deg, rgba(212,175,55,.08), rgba(255,255,255,.035)) !important;
}

.nt-image-deform-section .section-subtitle {
  margin: -4px 0 12px;
  color: rgba(246, 240, 220, .70);
  font-size: 12px;
  line-height: 1.45;
}

.nt-image-deform-section .image-slider-row label {
  min-width: 92px;
}

.nt-image-deform-section input[type="number"] {
  min-width: 72px;
}

.nt-pulse-soft {
  animation: ntPulseSoftGold .85s ease-out 1;
}

@keyframes ntPulseSoftGold {
  0% { box-shadow: 0 0 0 0 rgba(212,175,55,.0); }
  28% { box-shadow: 0 0 0 4px rgba(212,175,55,.20), 0 0 28px rgba(212,175,55,.18); }
  100% { box-shadow: 0 0 0 0 rgba(212,175,55,.0); }
}

/* =========================================================
   11.8 - Zones image masquées — Premium Soft Gold
   ========================================================= */
.nt-mask-zone-section,
.nt-mask-zone-controls {
  border-color: rgba(212, 175, 55, 0.28) !important;
  background:
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.11), transparent 42%),
    linear-gradient(145deg, rgba(22,22,22,.94), rgba(9,9,9,.94)) !important;
}

.mask-shape-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.mask-shape-grid .btn {
  min-height: 42px;
  justify-content: center;
  border-color: rgba(212, 175, 55, 0.35);
  background: linear-gradient(180deg, rgba(212,175,55,.13), rgba(255,255,255,.035));
}

.mask-zone-hint,
.mask-zone-status {
  margin: 12px 0 0;
  color: rgba(246, 240, 220, 0.72);
  font-size: 12px;
  line-height: 1.45;
}

.mask-zone-status {
  padding: 10px 12px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 14px;
  background: rgba(0,0,0,.18);
}

.nt-mask-zone-controls select.mini-select {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(212,175,55,.32);
  color: #f6f0dc;
  background: #0d0d0d;
  font-weight: 800;
}

.nt-mask-zone-controls .danger {
  border-color: rgba(255, 112, 112, 0.32) !important;
  color: #ffd5d5 !important;
  background: rgba(255, 68, 68, 0.08) !important;
}

/* =========================================================
   11.9 - Panneau Image en sous-panneaux — Premium Soft Gold
   ---------------------------------------------------------
   Objectif UX : éviter un long scroll dans Image. Chaque bouton
   ouvre un panneau court : importer, catalogue, zones, réglages,
   effets, etc.
   ========================================================= */
#panel-image .panel-body {
  padding-top: 14px;
}

.nt-image-panel-switcher {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 12px;
  margin: -2px 0 14px;
  border: 1px solid rgba(212, 175, 55, .24);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(212,175,55,.12), transparent 42%),
    linear-gradient(145deg, rgba(20,20,20,.98), rgba(8,8,8,.96));
  box-shadow: 0 14px 38px rgba(0,0,0,.34);
  backdrop-filter: blur(12px);
}

.nt-image-panel-tab {
  min-height: 42px;
  border: 1px solid rgba(212, 175, 55, .26);
  border-radius: 14px;
  padding: 9px 10px;
  color: #f7f0dc;
  background: linear-gradient(180deg, rgba(212,175,55,.10), rgba(255,255,255,.035));
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 850;
  line-height: 1.1;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 7px 18px rgba(0,0,0,.20);
  transition: transform .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
}

.nt-image-panel-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(243, 218, 132, .55);
}

.nt-image-panel-tab.is-active {
  color: #111;
  border-color: rgba(255,255,255,.18);
  background: linear-gradient(180deg, #f3da84, #d4af37);
  box-shadow: 0 10px 26px rgba(212,175,55,.16);
}

#panel-image [data-image-tool-panel] {
  display: none;
  animation: ntImagePanelFade .18s ease both;
}

#panel-image [data-image-tool-panel].is-active {
  display: block;
}

#panel-image [data-image-tool-panel][hidden] {
  display: none !important;
}

@keyframes ntImagePanelFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

#panel-image .section.is-active,
#panel-image [data-image-tool-panel].is-active {
  border-color: rgba(212,175,55,.32);
}

.nt-mask-zone-controls .stack,
.nt-image-deform-section .stack,
#panel-image [data-image-tool-panel="adjustments"] .stack,
#panel-image [data-image-tool-panel="colorize"] .stack,
#panel-image [data-image-tool-panel="basic-transform"] .stack {
  gap: 14px;
}

@media (max-width: 860px) {
  .nt-image-panel-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }

  .nt-image-panel-tab {
    min-height: 44px;
    font-size: 12px;
  }
}

/* =========================================================
   HOTFIX v1.4.5.50 — Lisibilité / anti-débordement Zones image
   ---------------------------------------------------------
   - Corrige le panneau « Réglages zone image » qui débordait
     horizontalement dans le panneau Image.
   - Garde l’UX par boutons validée en v1.4.5.48.
   - Ne touche pas au moteur masque/clipPath Fabric.
   ========================================================= */

@media (min-width: 1001px) {
  .main-area {
    grid-template-columns: 340px minmax(0, 1fr) !important;
  }
}

#panel-image,
#panel-image * {
  min-width: 0;
}

#panel-image .panel-body {
  overflow-x: hidden !important;
}

.nt-mask-zone-controls {
  max-width: 100% !important;
  overflow: hidden !important;
}

.nt-mask-zone-controls .stack {
  gap: 12px !important;
}

.nt-mask-zone-controls .image-slider-row {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
  align-items: stretch !important;
}

.nt-mask-zone-controls .image-slider-row label {
  min-width: 0 !important;
  width: 100% !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
}

.nt-mask-zone-controls .image-slider-row input[type="range"] {
  width: 100% !important;
  min-width: 0 !important;
}

.nt-mask-zone-controls .image-slider-row input[type="number"] {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

.nt-mask-zone-controls select.mini-select,
.nt-mask-zone-controls .mini-select {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.nt-mask-zone-controls .row2:not(.image-slider-row) {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 9px !important;
  width: 100% !important;
}

.nt-mask-zone-controls .row2:not(.image-slider-row) .btn {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  padding: 9px 8px !important;
  white-space: normal !important;
  line-height: 1.15 !important;
  text-align: center !important;
  justify-content: center !important;
  overflow-wrap: anywhere !important;
}

.nt-mask-zone-controls #maskZoneReplaceBtn,
.nt-mask-zone-controls #maskZoneFitBtn,
.nt-mask-zone-controls #maskZoneDuplicateBtn,
.nt-mask-zone-controls #maskZoneDeleteBtn {
  font-size: 13px !important;
}

.mask-zone-status {
  width: 100% !important;
  overflow-wrap: anywhere !important;
}

@media (max-width: 520px) {
  .nt-mask-zone-controls .row2:not(.image-slider-row) {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
   v1.4.5.50 — Zones image V2 : sous-panneaux, contours, effets
   ========================================================= */
.nt-mask-zone-v2{
  gap:12px !important;
  max-width:100%;
}
.nt-zone-subpanel{
  border:1px solid rgba(212,175,55,.22);
  border-radius:18px;
  background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(0,0,0,.14));
  overflow:hidden;
}
.nt-zone-subpanel-head{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:44px;
  padding:12px 14px;
  border:0;
  color:#f3da84;
  background:rgba(212,175,55,.08);
  font-weight:900;
  font-family:inherit;
  cursor:pointer;
  text-align:left;
}
.nt-zone-subpanel-head::after{
  content:'⌄';
  color:#d4af37;
  font-size:18px;
  line-height:1;
}
.nt-zone-subpanel-body{
  display:none;
  padding:12px;
}
.nt-zone-subpanel-body.is-open{
  display:grid;
  gap:12px;
}
.nt-mask-zone-controls .row2,
.nt-mask-zone-v2 .row2{
  max-width:100%;
  min-width:0;
}
.nt-mask-zone-v2 .image-slider-row{
  grid-template-columns:minmax(86px,116px) minmax(0,1fr) minmax(58px,76px) !important;
  gap:9px !important;
  align-items:center;
}
.nt-mask-zone-v2 .image-slider-row label{
  min-width:0;
  white-space:normal;
  line-height:1.15;
}
.nt-mask-zone-v2 .image-slider-row input[type="range"]{
  min-width:0;
  width:100%;
}
.nt-mask-zone-v2 .image-slider-row input[type="number"],
.nt-mask-zone-v2 .image-slider-row input[type="color"],
.nt-mask-zone-v2 .image-slider-row select,
.nt-mask-zone-v2 .image-slider-row button{
  min-width:0;
  max-width:100%;
}
.nt-mask-zone-v2 .image-slider-row input[type="color"]{
  width:64px !important;
  height:42px !important;
  padding:4px !important;
  border-radius:14px !important;
}
.nt-mask-zone-v2 .mini-select{
  width:100%;
  min-width:0;
}
.nt-mask-zone-v2 .btn.small{
  min-height:42px;
  white-space:normal;
  line-height:1.1;
}
.mask-shape-grid{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
}
@media (max-width:760px){
  .nt-mask-zone-v2 .image-slider-row{
    grid-template-columns:1fr !important;
  }
  .nt-mask-zone-v2 .image-slider-row input[type="number"],
  .nt-mask-zone-v2 .image-slider-row input[type="color"],
  .nt-mask-zone-v2 .image-slider-row select,
  .nt-mask-zone-v2 .image-slider-row button{
    width:100% !important;
  }
}

/* =========================================================
   v1.4.5.51 — Masques : rectangles H/V + effets image complets
   ========================================================= */
.mask-effects-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.mask-effects-grid .btn.small{
  min-height:38px;
  padding:8px 10px;
}
.mask-effects-grid .btn.small.active,
.mask-effect-btn.active{
  border-color:rgba(243,218,132,.75) !important;
  color:#120f05 !important;
  background:linear-gradient(180deg,#f4df8d,#d4af37) !important;
  box-shadow:0 10px 24px rgba(212,175,55,.16);
}
@media (max-width:760px){
  .mask-effects-grid{
    grid-template-columns:1fr;
  }
}

/* =========================================================
   V1.4.5.54 — Modèles prédéfinis / templates
   ========================================================= */
.nt-mask-template-section{
  border:1px solid rgba(212,175,55,.18);
  border-radius:22px;
  background:linear-gradient(180deg, rgba(20,20,26,.96), rgba(12,12,16,.98));
}
.nt-template-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  margin-top:8px;
}
.nt-template-card{
  width:100%;
  text-align:left;
  display:grid;
  gap:6px;
  padding:14px 15px;
  border-radius:18px;
  border:1px solid rgba(212,175,55,.22);
  background:linear-gradient(180deg, rgba(40,40,46,.78), rgba(18,18,24,.96));
  color:#f8f1d0;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05), 0 10px 20px rgba(0,0,0,.18);
  cursor:pointer;
}
.nt-template-card strong{
  font-size:15px;
  font-weight:800;
  color:#ffe9a9;
}
.nt-template-card span{
  font-size:12px;
  line-height:1.45;
  color:rgba(255,244,212,.76);
}
.nt-template-card:hover{
  border-color:rgba(243,218,132,.38);
  box-shadow:0 0 0 1px rgba(243,218,132,.12), 0 12px 28px rgba(0,0,0,.24);
}
.nt-template-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:12px;
}
@media (max-width: 640px){
  .nt-template-actions{grid-template-columns:1fr;}
}


/* =========================================================
   V1.4.5.56 — Admin Studio / export modèles JSON
   ========================================================= */
.nt-admin-only[hidden]{
  display:none !important;
}
.nt-admin-studio-card{
  border:1px solid rgba(212,175,55,.18);
  border-radius:22px;
  background:linear-gradient(180deg, rgba(22,22,28,.96), rgba(12,12,16,.98));
}
.nt-admin-json-output{
  min-height:240px;
  width:100%;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(212,175,55,.20);
  background:rgba(0,0,0,.28);
  color:#f8f1d0;
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size:11px;
  line-height:1.45;
  resize:vertical;
}
.nt-admin-info-list{
  display:grid;
  gap:10px;
}
.nt-admin-info-list > div{
  display:grid;
  gap:4px;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(212,175,55,.14);
  background:rgba(255,255,255,.035);
}
.nt-admin-info-list strong{
  color:#ffe9a9;
  font-size:13px;
}
.nt-admin-info-list span{
  color:rgba(255,244,212,.72);
  font-size:12px;
  line-height:1.4;
}
#panel-admin-studio .field{
  display:grid;
  gap:7px;
}
#panel-admin-studio .field span{
  color:#f3da84;
  font-size:12px;
  font-weight:800;
}
#panel-admin-studio input,
#panel-admin-studio textarea{
  width:100%;
  border-radius:14px;
  border:1px solid rgba(212,175,55,.20);
  background:rgba(0,0,0,.26);
  color:#fff7dc;
  padding:10px 12px;
}
#panel-admin-studio textarea:not(.nt-admin-json-output){
  min-height:80px;
}


/* =========================================================
   V1.4.5.57 — Bibliothèque admin modèles / masques SVG
   ========================================================= */
.nt-dynamic-library-block{
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid rgba(212,175,55,.16);
}
.nt-dynamic-library-block h3{
  margin:0 0 10px;
  color:#f3da84;
}
.nt-template-library-grid,
.nt-svg-mask-library-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.nt-library-category-title{
  grid-column:1/-1;
  margin-top:4px;
  color:#ffe9a9;
  font-size:12px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.nt-library-card{
  min-width:0;
  display:grid;
  gap:6px;
  text-align:left;
  padding:10px;
  border-radius:16px;
  border:1px solid rgba(212,175,55,.20);
  background:linear-gradient(180deg, rgba(34,34,40,.88), rgba(14,14,18,.98));
  color:#fff7dc;
  cursor:pointer;
}
.nt-library-card:hover{
  border-color:rgba(243,218,132,.45);
}
.nt-library-card img,
.nt-library-thumb-empty{
  width:100%;
  height:92px;
  display:grid;
  place-items:center;
  object-fit:contain;
  border-radius:12px;
  background:#050505;
  border:1px solid rgba(255,255,255,.08);
  color:#f3da84;
  font-size:12px;
  font-weight:900;
}
.nt-library-card strong{
  color:#ffe9a9;
  font-size:12px;
  line-height:1.2;
}
.nt-library-card small{
  color:rgba(255,244,212,.70);
  font-size:11px;
  line-height:1.3;
}
.nt-library-card-mask img{
  background:#111;
}
@media(max-width:640px){
  .nt-template-library-grid,
  .nt-svg-mask-library-grid{
    grid-template-columns:1fr;
  }
}


/* =========================================================
   V1.4.5.60 — Modale galerie de modèles Premium Soft Gold
   ========================================================= */
.nt-template-modal[hidden]{
  display:none !important;
}
.nt-template-modal{
  position:fixed;
  inset:0;
  z-index:99999;
  display:grid;
  place-items:center;
  padding:26px;
}
.nt-template-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.72);
  backdrop-filter:blur(8px);
}
.nt-template-modal__dialog{
  position:relative;
  width:min(1040px, calc(100vw - 42px));
  max-height:min(820px, calc(100vh - 42px));
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  border:1px solid rgba(212,175,55,.32);
  border-radius:28px;
  background:
    radial-gradient(circle at top left, rgba(212,175,55,.16), transparent 34%),
    linear-gradient(180deg, rgba(24,24,30,.98), rgba(8,8,12,.99));
  box-shadow:0 28px 90px rgba(0,0,0,.62);
  overflow:hidden;
}
.nt-template-modal__head{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-start;
  padding:24px 26px 18px;
  border-bottom:1px solid rgba(212,175,55,.16);
}
.nt-template-modal__head h2{
  margin:0;
  color:#ffe9a9;
  font-size:26px;
  line-height:1;
}
.nt-template-modal__head p{
  margin:8px 0 0;
  color:rgba(255,244,212,.70);
  font-size:13px;
}
.nt-template-modal__close{
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid rgba(212,175,55,.28);
  background:rgba(0,0,0,.26);
  color:#ffe9a9;
  font-size:28px;
  line-height:1;
  cursor:pointer;
}
.nt-template-modal__body{
  min-height:0;
  overflow:auto;
  padding:22px 26px 26px;
}
.nt-template-modal__section + .nt-template-modal__section{
  margin-top:24px;
  padding-top:20px;
  border-top:1px solid rgba(212,175,55,.14);
}
.nt-template-modal__section h3{
  margin:0 0 13px;
  color:#f3da84;
  font-size:15px;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.nt-template-modal__grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.nt-template-modal-card{
  min-width:0;
  display:grid;
  gap:9px;
  text-align:left;
  padding:13px;
  border-radius:20px;
  border:1px solid rgba(212,175,55,.22);
  background:linear-gradient(180deg, rgba(38,38,46,.86), rgba(14,14,18,.98));
  color:#fff7dc;
  cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05), 0 12px 28px rgba(0,0,0,.22);
}
.nt-template-modal-card:hover{
  border-color:rgba(243,218,132,.52);
  transform:translateY(-1px);
}
.nt-template-modal-card strong{
  color:#ffe9a9;
  font-size:14px;
  line-height:1.2;
}
.nt-template-modal-card small{
  color:rgba(255,244,212,.70);
  line-height:1.35;
}
.nt-template-modal-img,
.nt-template-modal-thumb{
  width:100%;
  height:156px;
  border-radius:15px;
  border:1px solid rgba(255,255,255,.08);
  background:#060606;
  object-fit:contain;
  display:grid;
  place-items:center;
  color:#f3da84;
  font-weight:900;
}
.nt-template-modal-thumb{
  position:relative;
  overflow:hidden;
}
.nt-template-modal-thumb::before,
.nt-template-modal-thumb::after{
  content:"";
  position:absolute;
  border:2px solid rgba(243,218,132,.65);
  border-radius:8px;
}
.nt-template-modal-thumb--poster::before{
  left:14%;
  top:18%;
  width:28%;
  height:58%;
}
.nt-template-modal-thumb--poster::after{
  right:13%;
  top:24%;
  width:30%;
  height:32%;
  box-shadow:0 64px 0 -3px rgba(243,218,132,.24);
}
.nt-template-modal-thumb--collage::before{
  left:12%;
  top:18%;
  width:32%;
  height:28%;
  box-shadow:0 62px 0 0 rgba(243,218,132,.16), 118px 0 0 0 rgba(243,218,132,.16), 118px 62px 0 0 rgba(243,218,132,.16);
}
.nt-template-modal-thumb--collage::after{
  right:12%;
  top:18%;
  width:32%;
  height:28%;
}
.nt-template-modal-thumb--banner::before{
  left:10%;
  top:22%;
  width:80%;
  height:34%;
}
.nt-template-modal-thumb--banner::after{
  left:16%;
  bottom:16%;
  width:28%;
  height:22%;
}
@media(max-width:900px){
  .nt-template-modal__grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:620px){
  .nt-template-modal{padding:12px;}
  .nt-template-modal__dialog{width:calc(100vw - 18px);max-height:calc(100vh - 18px);}
  .nt-template-modal__head{padding:18px;}
  .nt-template-modal__body{padding:18px;}
  .nt-template-modal__grid{grid-template-columns:1fr;}
}


/* =========================================================
   V1.4.5.61 — Retour texte initial visible
   ========================================================= */
.nt-motor-return-btn{
  display:none;
  border-color:rgba(243,218,132,.55) !important;
  color:#111 !important;
  background:linear-gradient(180deg,#f5df8d,#d4af37) !important;
  font-weight:900 !important;
  white-space:nowrap !important;
}
#textContextBar .context-top{
  align-items:center !important;
}
#textMotorWarning{
  flex-shrink:0 !important;
}


/* =========================================================
   V1.4.5.74 — Zone active nettoyée
   ========================================================= */
.nt-clean-zone-active-note{
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px dashed rgba(212,175,55,.32);
  border-radius: 12px;
  background: rgba(212,175,55,.07);
  color: #f3da84;
  font-size: 12px;
  line-height: 1.4;
}


/* =========================================================
   V1.4.5.90 — Modale choix masques SVG
   ========================================================= */
.nt-svg-mask-library-compact{
  display:grid;
  gap:10px;
}

.nt-svg-mask-library-compact #ntSvgMaskLibraryGrid[hidden]{
  display:none !important;
}

.nt-svg-mask-modal .nt-template-modal__dialog{
  max-width:980px;
}

.nt-svg-mask-modal__grid{
  grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
}

.nt-template-modal-card--mask{
  min-height:178px;
}

.nt-template-modal-card--mask .nt-template-modal-img{
  object-fit:contain;
  background:rgba(0,0,0,.24);
}
