/* studentcard.store Studio — shell isolé du site marketing (overrides styles.css) */

html[data-page="studio"] {
  --studio-menubar-h: 44px;
  --studio-toolbar-h: 44px;
  --studio-dock-h: 0px;
  --studio-left-w: 250px;
  --studio-right-w: 280px;
  --paper: #f4f1e9;
  --panel: #fbfaf6;
  --panel-2: #f0eee6;
  --ink: #16201e;
  --muted: #6c746f;
  --line: #d9dbd2;
  --forest: #173f3f;
  --lime: #c9ff4a;
  --coral: #ff7355;
}

html[data-page="studio"],
html[data-page="studio"] body {
  height: 100%;
  overflow: hidden !important;
  background: #dfe2d8 !important;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
}

/* Masquer tout le chrome marketing */
html[data-page="studio"] .topbar,
html[data-page="studio"] footer,
html[data-page="studio"] .hero,
html[data-page="studio"] .client-strip,
html[data-page="studio"] #catalogue,
html[data-page="studio"] .process,
html[data-page="studio"] .student-faq,
html[data-page="studio"] .student-focus,
html[data-page="studio"] .pool-section,
html[data-page="studio"] .cta-band,
html[data-page="studio"] .proof,
html[data-page="studio"] .gallery,
html[data-page="studio"] .pricing,
html[data-page="studio"] .templates,
html[data-page="studio"] .trust-strip,
html[data-page="studio"] .tracking-section,
html[data-page="studio"] .admin-section,
html[data-page="studio"] .config-heading {
  display: none !important;
}

html[data-page="studio"] .config-section {
  padding: 0 !important;
  margin: 0 !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  max-width: none !important;
  background: var(--paper) !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

html[data-page="studio"] .design-review-banner {
  margin: 0 !important;
  border-radius: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
}

/* ========== APP SHELL (casse l’ancien .studio 2 colonnes) ========== */
html[data-page="studio"] .studio.studio-app {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: var(--studio-menubar-h) var(--studio-toolbar-h) minmax(0, 1fr) !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--paper) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
  color: var(--ink);
}

/* Menubar */
html[data-page="studio"] .studio-menubar {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: #161f1d !important;
  color: #f4f1e9 !important;
  z-index: 40;
  min-height: 0;
  border: 0 !important;
}

html[data-page="studio"] .studio-menus {
  display: flex;
  gap: 2px;
  flex: 1;
  min-width: 0;
  align-items: center;
}
html[data-page="studio"] .studio-menu { position: relative; }
html[data-page="studio"] .studio-menu > button[data-menu] {
  border: 0;
  background: transparent;
  color: #e8ebe4;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
html[data-page="studio"] .studio-menu > button[data-menu]:hover,
html[data-page="studio"] .studio-menu > button[aria-expanded="true"] {
  background: rgba(255,255,255,.08);
  color: #fff;
}
html[data-page="studio"] .studio-menu-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  padding: 6px;
  border-radius: 10px;
  background: #1c2623;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
html[data-page="studio"] .studio-menu-panel[hidden] { display: none !important; }
html[data-page="studio"] .studio-menu-panel button {
  border: 0;
  background: transparent;
  color: #eef2ee;
  text-align: left;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
html[data-page="studio"] .studio-menu-panel button:hover {
  background: rgba(201,255,74,.16);
  color: #fff;
}
html[data-page="studio"] .studio-menu-panel hr {
  border: 0;
  border-top: 1px solid rgba(255,255,255,.1);
  margin: 4px 6px;
}

/* Brand pack (marque univ. sur style libre) — compact */
html[data-page="studio"] .brand-pack-bar {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 8px 0 4px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
}
html[data-page="studio"] .brand-pack-open {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  height: auto !important;
  min-height: 32px;
  padding: 7px 10px !important;
  border: 1px solid #c9d4cc !important;
  border-radius: 8px !important;
  background: #173f3f !important;
  color: #f4f1e9 !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html[data-page="studio"] .brand-pack-open:disabled {
  opacity: .45;
  cursor: not-allowed;
}
html[data-page="studio"] .brand-pack-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 100%;
  min-height: 0;
}
html[data-page="studio"] .brand-pack-status-row:empty,
html[data-page="studio"] .brand-pack-status-row:not(:has(:not([hidden]))) {
  display: none;
}
html[data-page="studio"] .brand-pack-status {
  font-size: 11px;
  font-weight: 700;
  color: #173f3f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-page="studio"] .brand-pack-clear {
  margin-left: auto;
  height: 26px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid #c9d4cc;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
html[data-page="studio"] .brand-pack-help,
html[data-page="studio"] .design-flow-steps,
html[data-page="studio"] .country-unavailable-note,
html[data-page="studio"] .design-az-hint,
html[data-page="studio"] .studio-random-tools {
  display: none !important;
}
html[data-page="studio"] .country-chips-lite {
  margin: 6px 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
}
html[data-page="studio"] .country-chips-lite button {
  min-height: 28px !important;
  padding: 4px 9px !important;
  font-size: 11px !important;
  gap: 0 !important;
}
html[data-page="studio"] .country-chips-lite button i {
  display: none !important;
}
.brand-pack-dialog {
  width: min(440px, calc(100vw - 24px));
  border: 0;
  border-radius: 16px;
  padding: 0;
  background: #fff;
  color: #172018;
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
}
.brand-pack-dialog::backdrop { background: rgba(16,24,22,.45); }
.brand-pack-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 8px;
}
.brand-pack-dialog header small {
  display: block;
  font-size: 10px;
  letter-spacing: .12em;
  color: #6b7a73;
}
.brand-pack-dialog header b { font-size: 16px; }
.brand-pack-dialog-close {
  width: 32px; height: 32px;
  border: 0; border-radius: 8px;
  background: #eef2ef;
  font-size: 18px;
  cursor: pointer;
}
.brand-pack-dialog-lead {
  margin: 0 16px 10px;
  font-size: 13px;
  color: #4d5b55;
  line-height: 1.4;
}
.brand-pack-option {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 16px 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f3f6f4;
  border: 1px solid #dde5e0;
  font-size: 12px;
  font-weight: 700;
  color: #173f3f;
  cursor: pointer;
}
.brand-pack-option input {
  width: 16px;
  height: 16px;
  accent-color: #173f3f;
  flex-shrink: 0;
}
.brand-pack-option em {
  font-style: normal;
  font-weight: 600;
  color: #6b7a73;
}
.logo-cartouche-option {
  margin: 6px 0 10px !important;
}
.brand-pack-filters {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  padding: 0 16px 10px;
}
.brand-pack-filters label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #5b6b64;
}
.brand-pack-filters select,
.brand-pack-filters input {
  height: 34px;
  border-radius: 8px;
  border: 1px solid #d5ddd8;
  padding: 0 10px;
  font: inherit;
}
.brand-pack-list {
  max-height: min(48vh, 360px);
  overflow: auto;
  padding: 0 10px 10px;
  display: grid;
  gap: 6px;
}
.brand-pack-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid #e2e8e4;
  background: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
}
.brand-pack-item:hover,
.brand-pack-item.active {
  border-color: #173f3f;
  background: #f4f8f5;
}
.brand-pack-thumb {
  width: 44px;
  height: 34px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e8eeea;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-pack-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.brand-pack-item b { display: block; font-size: 13px; }
.brand-pack-item small { color: #6b7a73; font-size: 11px; }
.brand-pack-empty {
  margin: 12px;
  text-align: center;
  color: #6b7a73;
  font-size: 13px;
}
.brand-pack-dialog-footer {
  display: flex;
  justify-content: flex-end;
  padding: 8px 16px 14px;
  border-top: 1px solid #eef2ef;
}
.brand-pack-dialog-footer .ghost {
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #d5ddd8;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* Identité Simple / Avancé */
.identity-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 0 10px;
  padding: 4px;
  border-radius: 12px;
  background: #e8eee9;
  border: 1px solid #d5ddd8;
}
.identity-mode-toggle button {
  border: 0;
  border-radius: 9px;
  padding: 9px 10px;
  background: transparent;
  font: 800 12px Manrope, sans-serif;
  color: #5b6b64;
  cursor: pointer;
}
.identity-mode-toggle button.active {
  background: #173f3f;
  color: #f4f1e9;
}
.identity-mode-hint {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.4;
  color: #5b6b64;
}
.identity-advanced-block {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #d7ddd6;
  background: #f7f9f5;
  display: grid;
  gap: 10px;
}
.identity-advanced-lead {
  margin: 0;
  font: 800 11px/1.2 Manrope, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #5b6b64;
}
.identity-brand-cta {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}
.brand-univ-cta {
  display: grid !important;
  gap: 4px;
  width: 100%;
  text-align: left;
  border: 2px solid #c9ff4a !important;
  border-radius: 16px !important;
  padding: 14px 16px 12px !important;
  background: linear-gradient(135deg, #173f3f 0%, #1f524c 100%) !important;
  color: #fff !important;
  cursor: pointer;
  box-shadow: 0 8px 0 #0f2a2a, 0 14px 28px rgba(23,63,63,.28);
  transform: translateY(0);
  transition: transform .12s ease, box-shadow .12s ease;
}
.brand-univ-cta:hover {
  transform: translateY(1px);
  box-shadow: 0 6px 0 #0f2a2a, 0 10px 22px rgba(23,63,63,.24);
}
.brand-univ-cta:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #0f2a2a, 0 6px 14px rgba(23,63,63,.2);
}
.brand-univ-cta-kicker {
  font-size: 9px !important;
  font-weight: 900 !important;
  letter-spacing: .12em;
  color: #c9ff4a !important;
}
.brand-univ-cta strong {
  font: 800 17px/1.2 Manrope, sans-serif !important;
  color: #fff !important;
}
.brand-univ-cta-help {
  font-size: 12px !important;
  line-height: 1.4;
  color: #c9d8d2 !important;
  font-weight: 600 !important;
}
.brand-univ-cta-action {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: #c9ff4a;
  color: #173f3f;
  font: 800 12px/1 Manrope, sans-serif;
  font-style: normal;
}
.mobile-brand-howto {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.4;
  color: #3f6f66;
  font-weight: 700;
}
.mobile-brand-hero { display: none; }

.catalog-country-row { margin-top: 8px; flex-wrap: wrap; }

html[data-page="studio"] .studio-brand {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-family: Manrope, sans-serif;
  font-size: 13px;
  color: inherit !important;
  text-decoration: none !important;
  flex-shrink: 0;
}

html[data-page="studio"] .studio-brand b { color: var(--lime); font-weight: 800; }
html[data-page="studio"] .studio-brand em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #9ac1ba;
}

html[data-page="studio"] .studio-brand .mark {
  width: 22px; height: 22px;
  position: relative;
  display: inline-block;
  background: var(--paper);
  border-radius: 6px;
  flex-shrink: 0;
}
html[data-page="studio"] .studio-brand .mark i {
  position: absolute;
  width: 10px; height: 14px;
  border: 2px solid var(--ink);
  border-radius: 50% 50% 10% 50%;
  transform: rotate(45deg);
  left: 3px; top: 3px;
}
html[data-page="studio"] .studio-brand .mark i + i {
  left: 8px;
  transform: rotate(225deg);
}

html[data-page="studio"] .studio-menubar-actions {
  margin-left: auto;
  display: flex !important;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}
html[data-page="studio"] .studio-menubar-hooks,
html[data-page="studio"] .studio-menubar-hooks[hidden] {
  display: none !important;
}
html[data-page="studio"] .studio-menubar-mobile { display: none !important; }

html[data-page="studio"] .studio-menubar-actions > .ghost:not([hidden]),
html[data-page="studio"] .studio-menubar-actions > .accent:not([hidden]),
html[data-page="studio"] .studio-menubar-actions > a.ghost:not([hidden]) {
  border: 0 !important;
  border-radius: 999px !important;
  padding: 7px 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center;
  white-space: nowrap;
  box-shadow: none !important;
}
html[data-page="studio"] .studio-menubar-actions [hidden],
html[data-page="studio"] .studio-toolbar .tool[hidden] {
  display: none !important;
}

html[data-page="studio"] .studio-menubar-actions > .ghost:not([hidden]) {
  background: rgba(255, 255, 255, .1) !important;
  color: #fff !important;
}
html[data-page="studio"] .studio-menubar-actions > .accent:not([hidden]) {
  background: var(--lime) !important;
  color: #172018 !important;
}

/* Toolbar */
html[data-page="studio"] .studio-toolbar {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: var(--panel) !important;
  border-bottom: 1px solid var(--line) !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

html[data-page="studio"] .tool-group {
  display: flex !important;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
html[data-page="studio"] .tool-group.grow {
  flex: 1;
  min-width: 0;
}

html[data-page="studio"] .studio-toolbar .side-toggle {
  display: flex !important;
  width: auto !important;
  background: #e5e5df !important;
  padding: 3px !important;
  border-radius: 999px !important;
}

html[data-page="studio"] .studio-toolbar .tool,
html[data-page="studio"] .studio-toolbar .side-toggle .tool {
  border: 1px solid var(--line) !important;
  background: #fff !important;
  border-radius: 999px !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer;
  color: var(--ink) !important;
  white-space: nowrap;
  flex: 0 0 auto !important;
  box-shadow: none !important;
}

html[data-page="studio"] .studio-toolbar .side-toggle .tool {
  border: 0 !important;
  background: transparent !important;
}

html[data-page="studio"] .studio-toolbar .tool.active,
html[data-page="studio"] .studio-toolbar .side-toggle .tool.active {
  background: var(--forest) !important;
  color: #fff !important;
  border-color: var(--forest) !important;
}

html[data-page="studio"] .studio-toolbar .muted,
html[data-page="studio"] #editorModeHint {
  color: var(--muted) !important;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Workspace 3 colonnes */
html[data-page="studio"] .studio-workspace {
  display: grid !important;
  grid-template-columns: var(--studio-left-w) minmax(0, 1fr) var(--studio-right-w) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  min-height: 0 !important;
  height: 100% !important;
  background: #e7e8e0 !important;
  overflow: hidden !important;
}

html[data-page="studio"] .studio-panel,
html[data-page="studio"] .controls.studio-panel {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background: var(--panel) !important;
  border: 0 !important;
  border-right: 1px solid var(--line) !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

html[data-page="studio"] .studio-panel.right {
  border-right: 0 !important;
  border-left: 1px solid var(--line) !important;
}

html[data-page="studio"] .studio-panel .panel-tabs,
html[data-page="studio"] .studio-panel .control-tabs-visible {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 4px;
  padding: 8px !important;
  margin: 0 !important;
  background: var(--panel-2) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  flex-shrink: 0;
  position: static !important;
  top: auto !important;
}

html[data-page="studio"] .studio-panel .panel-tabs button,
html[data-page="studio"] .studio-panel .control-tabs-visible button {
  border: 0 !important;
  background: transparent !important;
  border-radius: 10px !important;
  padding: 8px 6px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--muted) !important;
  cursor: pointer;
  min-height: 36px;
  box-shadow: none !important;
}

html[data-page="studio"] .studio-panel .panel-tabs button.active,
html[data-page="studio"] .studio-panel .control-tabs-visible button.active {
  background: #fff !important;
  color: var(--ink) !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04) !important;
}

html[data-page="studio"] .studio-panel .panel-scroll {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: auto !important;
  padding: 12px !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

html[data-page="studio"] .studio-panel .control-panel {
  display: none !important;
}
html[data-page="studio"] .studio-panel .control-panel.active {
  display: block !important;
}
html[data-page="studio"] .studio-panel.left .control-panel#panel-design {
  display: block !important;
}

html[data-page="studio"] .studio-panel .control-tabs,
html[data-page="studio"] .studio-global-actions,
html[data-page="studio"] .wizard-progress {
  display: none !important;
}

/* Canvas centre */
html[data-page="studio"] .studio-canvas,
html[data-page="studio"] .preview-workspace.studio-canvas {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  height: 100% !important;
  padding: 16px 14px 12px !important;
  overflow: auto !important;
  background: linear-gradient(160deg, #e9ebe3, #d9dcd3) !important;
  border: 0 !important;
}

html[data-page="studio"] .studio-canvas .card-stage {
  flex: 1 1 auto !important;
  display: grid !important;
  place-items: center !important;
  min-height: 200px !important;
  padding: 8px 0 12px !important;
  perspective: 1200px;
}

html[data-page="studio"] .studio-canvas .scaled-card-frame {
  max-width: 100% !important;
}

html[data-page="studio"] .studio-canvas .scaled-card-frame > .live-card {
  width: 650px !important;
  height: 410px !important;
  max-width: none !important;
  margin: 0 !important;
  transform: none !important;
}
/* Verso fiable (zoom casse rotateY) */
html[data-page="studio"] .scaled-card-frame > .live-card .front-side {
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 2 !important;
  pointer-events: auto !important;
  transform: none !important;
  backface-visibility: visible !important;
  -webkit-backface-visibility: visible !important;
}
html[data-page="studio"] .scaled-card-frame > .live-card .back-side {
  opacity: 0 !important;
  visibility: hidden !important;
  z-index: 1 !important;
  pointer-events: none !important;
  transform: none !important;
  backface-visibility: visible !important;
  -webkit-backface-visibility: visible !important;
}
html[data-page="studio"] .scaled-card-frame > .live-card.show-back .front-side {
  opacity: 0 !important;
  visibility: hidden !important;
  z-index: 1 !important;
  pointer-events: none !important;
}
html[data-page="studio"] .scaled-card-frame > .live-card.show-back .back-side {
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 2 !important;
  pointer-events: auto !important;
}

html[data-page="studio"] .studio-canvas .order-bar {
  margin-top: auto !important;
  flex-shrink: 0;
  display: flex !important;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(251, 250, 246, .96) !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  padding: 10px 12px !important;
  position: static !important;
  bottom: auto !important;
  z-index: 5;
}

html[data-page="studio"] .studio-canvas .studio-pool-notice {
  margin-top: 8px;
  border-radius: 12px;
  flex-shrink: 0;
}

html[data-page="studio"] .canvas-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}

html[data-page="studio"] .studio-mobile-nav,
html[data-page="studio"] .studio-dock {
  display: none !important;
}

html[data-page="studio"] .studio-panel .draft-status {
  flex-shrink: 0;
  margin: 0 !important;
  padding: 8px 12px !important;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
  font-size: 11px;
}

html[data-page="studio"] .admin-studio-tools {
  margin: 8px !important;
  border-radius: 12px;
  flex-shrink: 0;
}
html[data-page="studio"] .studio-admin-menu-panel {
  min-width: 300px;
  max-width: min(360px, 92vw);
  padding: 8px;
  right: auto;
  left: 0;
}
html[data-page="studio"] .admin-studio-tools-menu {
  margin: 0 !important;
  padding: 10px !important;
  display: grid;
  gap: 8px;
  background: transparent !important;
  color: #eef2ee;
  border: 0 !important;
  border-radius: 0 !important;
}
html[data-page="studio"] .admin-studio-tools-menu .admin-studio-tools-head {
  padding-bottom: 8px;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
html[data-page="studio"] .admin-studio-tools-menu .admin-studio-tools-head span {
  color: var(--lime);
  font-size: 9px;
  letter-spacing: .12em;
}
html[data-page="studio"] .admin-studio-tools-menu .admin-studio-tools-head b {
  color: #fff;
  font-size: 13px;
}
html[data-page="studio"] .admin-studio-tools-menu .admin-studio-back {
  color: #b7c0bb;
  font-size: 12px;
  text-decoration: none;
}
html[data-page="studio"] .admin-studio-tools-menu label {
  color: #c5cdc8 !important;
  margin: 0 !important;
  display: grid;
  gap: 4px;
  font-size: 11px !important;
}
html[data-page="studio"] .admin-studio-tools-menu select {
  width: 100%;
  background: #29322f;
  color: #fff;
  border: 1px solid #44504c;
  border-radius: 9px;
  padding: 9px 10px;
}
html[data-page="studio"] .admin-studio-tools-menu .admin-studio-actions {
  display: grid;
  gap: 6px;
}
html[data-page="studio"] .admin-studio-tools-menu .admin-studio-actions button,
html[data-page="studio"] .studio-admin-menu-panel .admin-studio-tools-menu button {
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 800;
  padding: 10px;
  text-align: center;
}
html[data-page="studio"] .admin-studio-tools-menu .admin-secondary-button {
  background: #fff !important;
  color: var(--ink) !important;
}
html[data-page="studio"] .admin-studio-tools-menu .admin-client-memory {
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  font-size: 12px;
}
html[data-page="studio"] .admin-studio-tools-menu .design-link-result {
  display: flex;
  gap: 6px;
  align-items: center;
}
html[data-page="studio"] .admin-studio-tools-menu .design-link-result input {
  flex: 1;
  min-width: 0;
  border-radius: 8px;
  border: 1px solid #44504c;
  background: #111816;
  color: #fff;
  padding: 8px;
}
html[data-page="studio"] #studioAdminMenu > button[data-menu="admin"] {
  color: var(--lime);
  font-weight: 800;
}
.admin-tools-dialog #adminToolsDialogMount {
  margin-top: 8px;
}
.admin-tools-dialog .admin-studio-tools-menu,
.admin-tools-dialog .admin-studio-tools {
  margin: 0 !important;
  background: #17201e !important;
  color: #fff !important;
  border-radius: 12px !important;
  padding: 12px !important;
}

html[data-page="studio"].admin-studio-mode .studio-menubar,
html.admin-studio-mode[data-page="studio"] .studio-menubar {
  box-shadow: inset 0 -2px 0 var(--lime);
}
html[data-page="studio"].admin-studio-mode #studioModeLabel,
html.admin-studio-mode[data-page="studio"] #studioModeLabel {
  color: var(--lime);
}

/* Contrôles denses */
html[data-page="studio"] .studio-panel label {
  display: grid !important;
  gap: 4px;
  margin-bottom: 10px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--muted) !important;
}

/* Mode Simple : masque org / titre / filière / logo (doit rester APRÈS .studio-panel label) */
html[data-identity-mode="simple"] .identity-advanced-only,
html[data-page="studio"][data-identity-mode="simple"] .identity-advanced-only,
html[data-page="studio"][data-identity-mode="simple"] .studio-panel label.identity-advanced-only,
html[data-page="studio"][data-identity-mode="simple"] .studio-panel .identity-advanced-only,
html[data-page="studio"][data-identity-mode="simple"] .studio-panel .identity-advanced-block,
html[data-page="studio"][data-identity-mode="simple"] .studio-panel .identity-advanced-block label,
html[data-page="studio"][data-identity-mode="simple"] .controls label.identity-advanced-only {
  display: none !important;
}
html[data-identity-mode="simple"] .upload-grid,
html[data-page="studio"][data-identity-mode="simple"] .upload-grid {
  grid-template-columns: 1fr !important;
}
html[data-identity-mode="simple"] .upload-logo-field,
html[data-page="studio"][data-identity-mode="simple"] .upload-logo-field {
  display: none !important;
}

html[data-page="studio"] .studio-panel input,
html[data-page="studio"] .studio-panel select,
html[data-page="studio"] .studio-panel textarea {
  width: 100% !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  padding: 9px 10px !important;
  background: #fff !important;
  color: var(--ink) !important;
  font-weight: 600;
  font-size: 14px;
  box-sizing: border-box;
}

html[data-page="studio"] .studio-panel .two-cols {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
}

html[data-page="studio"] .birth-age-tools {
  display: grid;
  grid-template-columns: auto 64px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

html[data-page="studio"] .birth-age-label {
  font-size: 10px;
  font-weight: 800;
  color: #63706b;
  white-space: nowrap;
}

html[data-page="studio"] .studio-panel .birth-age-tools #birthAgeSelect {
  min-height: 34px;
  padding: 6px 7px !important;
  text-align: center;
  font-size: 13px;
}

html[data-page="studio"] .birth-age-tools #randomBirthBtn {
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid #173f3b;
  border-radius: 9px;
  background: #173f3b;
  color: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  cursor: pointer;
}

html[data-page="studio"] .birth-age-tools #randomBirthBtn:hover {
  background: #0f312e;
}

html[data-page="studio"] .birth-age-hint {
  display: block !important;
  margin-top: 2px;
}

@media (max-width: 520px) {
  html[data-page="studio"] .birth-age-tools {
    grid-template-columns: auto 58px minmax(0, 1fr);
  }
  html[data-page="studio"] .birth-age-tools #randomBirthBtn {
    min-height: 42px;
    font-size: 10px;
  }
}

html[data-page="studio"] .studio-designs {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  max-height: min(62vh, 560px) !important;
  overflow: auto !important;
  margin-bottom: 12px !important;
  padding-right: 2px;
}

html[data-page="studio"] .studio-design,
html[data-page="studio"] .studio-design-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 6px !important;
  min-height: 0 !important;
  padding: 6px !important;
  border-radius: 12px !important;
}

html[data-page="studio"] .studio-design .design-thumb {
  display: none !important;
}

html[data-page="studio"] .studio-design .design-card-viewport,
html[data-page="studio"] .studio-design .design-choice-viewport {
  display: block !important;
  width: 100% !important;
  min-height: 70px;
  border-radius: 8px !important;
  position: relative;
  overflow: hidden;
}

html[data-page="studio"] .studio-design {
  position: relative;
}
html[data-page="studio"] .design-preview-card.has-brand-preview [data-layer="logo"] img {
  object-fit: contain;
}

html[data-page="studio"] .design-browser-head,
html[data-page="studio"] .design-results-head,
html[data-page="studio"] .panel-intro {
  margin-bottom: 10px !important;
}

html[data-page="studio"] .panel-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
}

html[data-page="studio"] #layerControls {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: #fff;
}
html[data-page="studio"] #layerControls[hidden] {
  display: none !important;
}

html[data-page="studio"] .upload-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
}

html[data-page="studio"] .studio-panel .upload {
  min-height: 72px;
  border-radius: 12px;
}

/* Verrouille le PVC : ignore les shrinks marketing du styles.css */
html[data-page="studio"] .scaled-card-frame .card-side {
  padding: 38px !important;
}
html[data-page="studio"] .scaled-card-frame .live-content {
  gap: 30px !important;
  margin-top: 33px !important;
}
html[data-page="studio"] .scaled-card-frame .live-photo {
  width: 145px !important;
  height: 170px !important;
}
html[data-page="studio"] .scaled-card-frame .live-info h3 {
  font-size: var(--holder-name-size, 38px) !important;
}
html[data-page="studio"] .scaled-card-frame .id-row {
  gap: 14px !important;
  flex-direction: row !important;
  margin-top: 27px !important;
}
html[data-page="studio"] .scaled-card-frame .student-meta {
  display: grid !important;
}
html[data-page="studio"] .scaled-card-frame .live-footer {
  left: 38px !important;
  right: 38px !important;
  bottom: 28px !important;
}
html[data-page="studio"] .scaled-card-frame .back-side .magnetic {
  width: calc(100% + 76px) !important;
  margin: 20px -38px 25px !important;
  border-radius: 0 !important;
}
html[data-page="studio"] .scaled-card-frame .back-side.is-real-back .magnetic {
  width: calc(100% + 36px) !important;
  margin-left: -18px !important;
  margin-right: -18px !important;
  border-radius: 0 !important;
}
html[data-page="studio"] .scaled-card-frame .live-card[data-template="ribbon"] .live-content {
  margin-top: 48px !important;
}
html[data-page="studio"] .scaled-card-frame .live-card[data-template="geometry"] .live-info {
  max-width: 58% !important;
}


/* Pastille modèle (liste compacte) */
html[data-page="studio"] .design-thumb {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--p, #173f3f) 0 58%, var(--a, #c9ff4a) 58%);
  color: #fff;
  font: 800 9px/1 Manrope, sans-serif;
  letter-spacing: .02em;
  flex-shrink: 0;
}
html[data-page="studio"] .studio-design[hidden] {
  display: none !important;
}

/* ========== TABLETTE ========== */
@media (max-width: 1100px) {
  html[data-page="studio"] {
    --studio-left-w: 220px;
    --studio-right-w: 250px;
  }
}


/* Desktop : extras identité à plat */
@media (min-width: 901px) {
  html[data-page="studio"] details.identity-extras { display: contents !important; }
  html[data-page="studio"] details.identity-extras > summary,
  html[data-page="studio"] .mobile-only-mirror,
  html[data-page="studio"] .mobile-panel-title,
  html[data-page="studio"] .mobile-step-actions,
  html[data-page="studio"] .mobile-face-toggle,
  html[data-page="studio"] .mobile-editor-bar,
  html[data-page="studio"] .mobile-print-sides,
  html[data-page="studio"] .mobile-profile-sheet { display: none !important; }

  html[data-page="studio"] #desktopModelProfile.active,
  html[data-page="studio"] #menubarModelProfile.active {
    background: var(--lime) !important;
    color: var(--ink) !important;
  }
  html[data-page="studio"] .desktop-profile-rail {
    display: block !important;
  }
  html[data-page="studio"] .profiles-entry {
    margin: 0 0 10px !important;
  }
  html[data-page="studio"] .model-profiles {
    display: none !important;
  }
  html[data-page="studio"] .design-browser-head b,
  html[data-page="studio"] .design-results-head small {
    font-size: 10px !important;
  }
  html[data-page="studio"] .student-country-presets > div {
    gap: 4px !important;
  }
  html[data-page="studio"] .student-country-presets button {
    padding: 6px 7px !important;
    min-height: 0 !important;
  }
  html[data-page="studio"] .preview-zoom-tools {
    display: flex !important;
    align-items: center;
    gap: 4px;
  }
}

html[data-page="studio"] .mobile-face-toggle,
html[data-page="studio"] .mobile-editor-bar,
html[data-page="studio"] .mobile-print-sides,
html[data-page="studio"] .mobile-step-actions,
html[data-page="studio"] .mobile-panel-title { display: none; }

@media (max-width: 900px) {
  html[data-page="studio"] {
    --studio-dock-h: calc(62px + env(safe-area-inset-bottom, 0px));
    --studio-menubar-h: 48px;
    --studio-toolbar-h: 0px;
  }
  html[data-page="studio"] .studio.studio-app {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: var(--studio-menubar-h) minmax(0, 1fr) var(--studio-dock-h) !important;
    height: 100vh !important; height: 100dvh !important;
  }
  html[data-page="studio"] .studio-toolbar { display: none !important; }
  html[data-page="studio"] .studio-menubar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    padding: 0 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  html[data-page="studio"] .studio-brand {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    gap: 6px !important;
  }
  html[data-page="studio"] .studio-brand strong {
    font-size: 12px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    min-width: 0 !important;
  }
  html[data-page="studio"] .studio-project-name {
    display: none !important;
  }
  html[data-page="studio"] .studio-menubar-actions { display: none !important; }
  html[data-page="studio"] .studio-menus { display: none !important; }
  html[data-page="studio"] .studio-menubar-mobile {
    display: flex !important;
    align-items: center;
    gap: 4px;
    margin-left: 0;
    flex: 0 0 auto !important;
    max-width: 58%;
    min-width: 0;
  }
  html[data-page="studio"] .studio-menubar-mobile .ghost,
  html[data-page="studio"] .studio-menubar-mobile a.ghost {
    border: 0 !important;
    border-radius: 999px !important;
    padding: 6px 9px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    background: rgba(255,255,255,.1) !important;
    color: #f4f1e9 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    flex: 0 0 auto;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  html[data-page="studio"] .studio-menubar-mobile .ghost.accent-lite,
  html[data-page="studio"] .studio-menubar-mobile #mobileOpenBrandPack {
    background: var(--lime) !important;
    color: #172018 !important;
    font-weight: 800 !important;
    padding: 6px 10px !important;
  }
  html[data-page="studio"] .mobile-brand-hero {
    display: grid !important;
    gap: 8px;
    margin: 0 0 12px !important;
  }
  html[data-page="studio"] .mobile-brand-hero-btn.brand-univ-cta,
  html[data-page="studio"] .brand-univ-cta {
    display: grid !important;
  }
  html[data-page="studio"] .mobile-brand-hero-status {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #e8f6cc;
    border: 1px solid #cfe89a;
  }
  html[data-page="studio"] .mobile-brand-hero-status[hidden] {
    display: none !important;
  }
  html[data-page="studio"] .mobile-brand-hero-status em {
    flex: 1;
    font-style: normal;
    font-size: 12px;
    font-weight: 800;
    color: #173f3f;
  }
  html[data-page="studio"] .mobile-brand-hero-status button {
    border: 0;
    border-radius: 999px;
    padding: 6px 10px;
    background: #fff;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
  }
  html[data-page="studio"][data-identity-mode="advanced"] .identity-advanced-only {
    display: revert !important;
  }
  html[data-page="studio"][data-identity-mode="advanced"] .identity-advanced-block {
    display: grid !important;
  }
  html[data-page="studio"][data-identity-mode="advanced"] .advanced-card-settings {
    display: block !important;
  }
  html[data-page="studio"][data-identity-mode="advanced"] .check-row.logo-cartouche-option {
    display: flex !important;
  }
  html[data-page="studio"][data-identity-mode="advanced"] .upload-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  html[data-page="studio"] .identity-mode-toggle {
    position: sticky;
    top: 0;
    z-index: 4;
  }
  html[data-page="studio"] .identity-brand-cta {
    display: grid !important;
  }
  html[data-page="studio"] .studio-brand em { display: none !important; }
  html[data-page="studio"] .studio-brand strong { font-size: 12px !important; }
  html[data-page="studio"] .studio-brand .mark { width: 18px !important; height: 18px !important; flex: 0 0 auto; }
  html[data-page="studio"] .studio-workspace {
    display: grid !important; grid-template-columns: minmax(0, 1fr) !important;
    position: relative !important; min-height: 0 !important;
  }
  html[data-page="studio"] .studio-panel.left,
  html[data-page="studio"] .controls.studio-panel.left,
  html[data-page="studio"] .studio-panel.right,
  html[data-page="studio"] .studio-canvas,
  html[data-page="studio"] .preview-workspace.studio-canvas {
    position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important;
    display: none !important; border: 0 !important; overflow: hidden !important;
  }
  html[data-page="studio"][data-studio-view="card"] .studio-canvas,
  html[data-page="studio"][data-studio-view="card"] .preview-workspace.studio-canvas,
  html[data-page="studio"][data-studio-view="order"] .studio-canvas,
  html[data-page="studio"][data-studio-view="order"] .preview-workspace.studio-canvas,
  html[data-page="studio"][data-studio-view="models"] .studio-panel.left,
  html[data-page="studio"][data-studio-view="models"] .controls.studio-panel.left,
  html[data-page="studio"][data-studio-view="identity"] .studio-panel.right {
    display: flex !important; z-index: 3;
  }
  html[data-page="studio"] .studio-brand em,
  html[data-page="studio"] .batch-studio,
  html[data-page="studio"] .profile-memory,
  html[data-page="studio"] .quick-fill,
  html[data-page="studio"] .studio-express,
  html[data-page="studio"] .saved-configurations,
  html[data-page="studio"] .panel-intro,
  html[data-page="studio"] .draft-status,
  html[data-page="studio"] .studio-mobile-nav,
  html[data-page="studio"] .studio-panel.left .panel-tabs,
  html[data-page="studio"] .studio-panel.right .control-tabs-visible,
  html[data-page="studio"] .design-browser-head,
  html[data-page="studio"] .design-results-head,
  html[data-page="studio"] .select-model,
  html[data-page="studio"] .design-color-row,
  html[data-page="studio"] .studio-pool-notice,
  html[data-page="studio"] .canvas-status,
  html[data-page="studio"] #panel-data,
  html[data-page="studio"] #removeBackground,
  html[data-page="studio"] .background-mode,
  html[data-page="studio"] .background-tools,
  html[data-page="studio"] .restore-photo-auto,
  html[data-page="studio"] .privacy-note,
  html[data-page="studio"] .mobile-step-models,
  html[data-page="studio"] .desktop-profile-rail,
  html[data-page="studio"] .brand-pack-bar { display: none !important; }

  html[data-page="studio"] .mobile-panel-title,
  html[data-page="studio"] .mobile-step-actions,
  html[data-page="studio"] .mobile-face-toggle,
  html[data-page="studio"] .mobile-editor-bar,
  html[data-page="studio"] .mobile-print-sides,
  html[data-page="studio"] .mobile-only-mirror { display: block !important; }

  html[data-page="studio"] .mobile-panel-title {
    margin: 0 0 8px !important; font: 800 12px/1.2 Manrope, sans-serif !important;
    color: var(--muted) !important; letter-spacing: .06em; text-transform: uppercase;
  }
  html[data-page="studio"] details.identity-extras {
    display: block !important; margin: 6px 0 0 !important; border: 1px solid var(--line) !important;
    border-radius: 10px !important; background: #fff !important; padding: 0 10px !important;
  }
  html[data-page="studio"] details.identity-extras > summary {
    display: block !important; list-style: none; cursor: pointer; padding: 10px 0;
    font-size: 13px; font-weight: 700; color: var(--forest);
  }
  html[data-page="studio"] details.identity-extras > summary::-webkit-details-marker { display: none; }
  html[data-page="studio"] .mobile-step-actions {
    position: sticky; bottom: 0; z-index: 5; margin: 10px -10px -10px !important; padding: 10px !important;
    background: linear-gradient(180deg, transparent, var(--panel) 35%) !important;
  }
  html[data-page="studio"] .mobile-step-actions .mobile-next {
    width: 100%; min-height: 44px !important; border: 0 !important; border-radius: 12px !important;
    background: var(--forest) !important; color: #fff !important; font-size: 14px !important; font-weight: 800 !important;
  }
  html[data-page="studio"] .studio-panel .panel-scroll { padding: 10px !important; }
  html[data-page="studio"] .studio-panel label { margin-bottom: 8px !important; font-size: 11px !important; gap: 3px !important; }
  html[data-page="studio"] .studio-panel input,
  html[data-page="studio"] .studio-panel select,
  html[data-page="studio"] .studio-panel textarea {
    min-height: 42px; padding: 8px 10px !important; font-size: 16px !important; border-radius: 10px !important;
  }
  html[data-page="studio"] .upload-grid { gap: 6px !important; }
  html[data-page="studio"] .studio-panel .upload { min-height: 56px !important; padding: 8px !important; }

  html[data-page="studio"] .profiles-entry {
    display: flex !important;
    margin: 0 0 8px !important;
    padding: 10px 12px !important;
    min-height: 48px;
  }
  html[data-page="studio"] .model-profiles {
    display: none !important;
  }
  html[data-page="studio"] .model-profiles-save-mini {
    display: none !important;
  }
  html[data-page="studio"] .studio-design-card,
  html[data-page="studio"] .studio-designs .studio-design {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    padding: 6px !important;
    gap: 6px !important;
  }
  html[data-page="studio"] .studio-design .design-thumb {
    display: none !important;
  }
  html[data-page="studio"] .studio-design .design-card-viewport,
  html[data-page="studio"] .studio-design .design-choice-viewport {
    display: block !important;
    width: 100% !important;
    min-height: 78px !important;
  }
  html[data-page="studio"] .studio-design em {
    display: grid !important;
  }
  html[data-page="studio"] .design-browser-lite .design-filter-row button {
    min-height: 32px !important;
    font-size: 11px !important;
    padding: 6px 10px !important;
  }
  html[data-page="studio"] .country-chips-lite button {
    min-height: 36px !important;
    padding: 7px 11px !important;
  }
  html[data-page="studio"] .studio-random-tools {
    display: none !important;
  }
  html[data-page="studio"] .identity-tools-fold {
    display: none !important;
  }

  html[data-page="studio"] .design-filter-row {
    display: flex !important; gap: 6px !important; overflow-x: auto; margin: 0 0 8px !important;
    -webkit-overflow-scrolling: touch;
  }
  html[data-page="studio"] .design-filter-row button {
    flex: 0 0 auto; min-height: 32px; padding: 5px 11px !important; border-radius: 999px !important;
    border: 1px solid var(--line) !important; background: #fff !important; font-size: 12px !important; font-weight: 700 !important;
  }
  html[data-page="studio"] .design-filter-row button.active {
    background: var(--forest) !important; color: #fff !important; border-color: var(--forest) !important;
  }
  html[data-page="studio"] .student-country-presets {
    margin: 0 0 8px !important; padding: 8px !important; border-radius: 12px !important; background: #eef2ec !important;
  }
  html[data-page="studio"] .student-country-presets .country-filter-label {
    display: block !important;
  }
  html[data-page="studio"] .student-country-presets .show-all-education { display: none !important; }
  html[data-page="studio"] .student-country-presets button span {
    display: inline !important;
    font-size: 11px !important;
    font-weight: 800 !important;
  }
  html[data-page="studio"] .student-country-presets > div {
    display: flex !important; flex-wrap: wrap; gap: 5px !important; margin: 0 !important;
  }
  html[data-page="studio"] .student-country-presets button {
    flex: 0 0 auto; width: auto !important; height: auto !important; min-height: 36px; padding: 7px 10px !important;
    justify-content: center; border-radius: 999px !important;
  }
  html[data-page="studio"] .student-country-presets button > i { font-size: 14px !important; }
  html[data-page="studio"] .student-country-presets button.active {
    background: var(--forest) !important; color: #fff !important; border-color: var(--forest) !important;
  }
  html[data-page="studio"] .design-filter-status {
    display: flex !important;
  }
  html[data-page="studio"] .design-filter-status[hidden] {
    display: none !important;
  }

  html[data-page="studio"] .studio-designs {
    display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px !important;
    max-height: none !important; overflow: visible !important;
  }
  html[data-page="studio"] .studio-design,
  html[data-page="studio"] .studio-design-card {
    display: flex !important; flex-direction: column !important; align-items: stretch !important;
    grid-template-columns: none !important; gap: 6px !important;
    min-height: 0 !important; padding: 6px !important; border-radius: 12px !important; border-width: 1px !important;
  }
  html[data-page="studio"] .studio-design[hidden] { display: none !important; }
  html[data-page="studio"] .studio-design em { display: grid !important; }
  html[data-page="studio"] .studio-design .design-thumb {
    display: none !important;
  }
  html[data-page="studio"] .studio-design .design-card-viewport,
  html[data-page="studio"] .studio-design .design-choice-viewport {
    display: block !important;
    width: 100% !important;
    min-height: 88px !important;
  }
  html[data-page="studio"] .studio-design-copy {
    display: flex !important; flex-direction: column !important; align-items: flex-start !important;
    justify-content: center !important; gap: 1px !important; padding: 0 2px !important; min-width: 0;
  }
  html[data-page="studio"] .studio-design-copy b { font-size: 12px !important; line-height: 1.2 !important; white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  html[data-page="studio"] .studio-design-copy small { font-size: 11px !important; opacity: .75; white-space: nowrap !important; }
  html[data-page="studio"] .studio-design.active { border-color: var(--forest) !important; background: #eef4ef !important; }

  html[data-page="studio"] .studio-canvas,
  html[data-page="studio"] .preview-workspace.studio-canvas {
    padding: 6px 12px 8px !important; gap: 6px;
    align-items: stretch !important;
  }
  html[data-page="studio"] .mobile-face-toggle {
    display: flex !important; gap: 3px; justify-content: center; margin: 0 auto; padding: 3px;
    background: #e5e5df; border-radius: 999px; width: fit-content;
  }
  html[data-page="studio"] .mobile-face-toggle button {
    border: 0 !important; background: transparent !important; border-radius: 999px !important;
    padding: 6px 14px !important; font-size: 12px !important; font-weight: 700 !important;
    min-height: 30px; color: var(--ink) !important;
  }
  html[data-page="studio"] .mobile-face-toggle button.active { background: var(--forest) !important; color: #fff !important; }
  html[data-page="studio"] .mobile-editor-bar {
    display: flex !important; align-items: center; justify-content: center; gap: 6px;
    margin: 0 auto; width: 100%; max-width: 340px;
  }
  html[data-page="studio"] .mobile-editor-toggle {
    flex: 1 1 auto; min-height: 34px; border: 1px solid #d5ddd7 !important; border-radius: 999px !important;
    background: #fff !important; color: var(--ink) !important; font-size: 13px !important; font-weight: 800 !important;
    padding: 0 12px !important;
  }
  html[data-page="studio"] .mobile-editor-profile {
    flex: 0 0 auto; min-height: 34px; border: 1px solid #d5ddd7 !important; border-radius: 999px !important;
    background: #fff !important; color: var(--forest) !important; font-size: 13px !important; font-weight: 800 !important;
    padding: 0 12px !important;
  }
  html[data-page="studio"] .mobile-editor-profile.active {
    background: var(--forest) !important; color: #fff !important; border-color: var(--forest) !important;
  }
  html[data-page="studio"] .mobile-profile-sheet .mobile-profile-help {
    margin: 0 0 8px; font-size: 11px; line-height: 1.4; color: var(--muted);
  }
  html[data-page="studio"] .mobile-profile-name-label {
    display: grid; gap: 4px; margin: 0 0 8px; font-size: 10px; font-weight: 700; color: var(--muted);
  }
  html[data-page="studio"] .mobile-profile-name-label input {
    min-height: 42px; padding: 8px 10px; font-size: 16px; border-radius: 10px;
    border: 1px solid var(--line); background: #fbfaf6; color: var(--ink); width: 100%;
  }
  html[data-page="studio"] .mobile-profile-save-btn {
    width: 100%; min-height: 42px; border: 0; border-radius: 11px;
    background: var(--forest); color: #fff; font-size: 13px; font-weight: 800; margin-bottom: 8px;
  }
  html[data-page="studio"] .mobile-profile-quick-list {
    display: grid; gap: 5px; max-height: 120px; overflow: auto;
  }
  html[data-page="studio"] .mobile-profile-quick-list > small {
    font-size: 9px; letter-spacing: .08em; font-weight: 800; color: #3f6f66; text-transform: uppercase;
  }
  html[data-page="studio"] .mobile-profile-quick-list > button {
    display: grid; gap: 2px; text-align: left; border: 1px solid #d5ddd2; border-radius: 10px;
    background: #fff; padding: 8px 10px; cursor: pointer;
  }
  html[data-page="studio"] .mobile-profile-quick-list > button b {
    font-size: 12px; color: var(--ink);
  }
  html[data-page="studio"] .mobile-profile-quick-list > button span {
    font-size: 10px; color: var(--muted);
  }
  html[data-page="studio"] .mobile-profile-empty {
    margin: 0; font-size: 11px; color: var(--muted); text-align: center; padding: 6px;
  }
  html[data-page="studio"] .mobile-editor-toggle.active {
    background: var(--forest) !important; color: #fff !important; border-color: var(--forest) !important;
  }
  html[data-page="studio"] .mobile-editor-actions {
    display: flex !important; align-items: center; gap: 4px; flex: 0 0 auto;
  }
  html[data-page="studio"] .mobile-editor-actions[hidden] { display: none !important; }
  html[data-page="studio"] .mobile-editor-actions button {
    width: 34px; height: 34px; min-width: 34px; border: 1px solid #d5ddd7 !important; border-radius: 10px !important;
    background: #fff !important; font-size: 15px !important; font-weight: 700 !important; color: var(--ink) !important;
    padding: 0 !important; display: grid; place-items: center;
  }
  html[data-page="studio"] .mobile-editor-actions button:disabled { opacity: .35; }
  html[data-page="studio"] .mobile-editor-sheet {
    display: none;
    position: absolute;
    left: 8px; right: 8px;
    bottom: 6px;
    z-index: 40;
    max-height: min(34vh, 260px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border: 1px solid #d7ddd4;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(16, 28, 24, .16);
    padding: 8px 10px 10px;
  }
  html[data-page="studio"] .mobile-editor-sheet:not([hidden]) { display: block !important; }
  html[data-page="studio"] .mobile-editor-sheet > header {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px;
  }
  html[data-page="studio"] .mobile-editor-sheet > header b {
    font: 800 13px/1.2 Manrope, sans-serif;
  }
  html[data-page="studio"] #mobileEditorClose {
    border: 0; background: var(--forest); color: #fff; border-radius: 999px; padding: 6px 12px;
    font-size: 12px; font-weight: 800;
  }
  html[data-page="studio"] .mobile-layer-editor label {
    display: grid; gap: 3px; margin: 0 0 6px; font-size: 10px; font-weight: 700; color: var(--muted);
  }
  html[data-page="studio"] .mobile-layer-editor input,
  html[data-page="studio"] .mobile-layer-editor textarea {
    min-height: 38px; padding: 7px 10px; font-size: 16px; border-radius: 9px;
    border: 1px solid var(--line); background: #fbfaf6; color: var(--ink); width: 100%;
  }
  html[data-page="studio"] .mobile-layer-editor textarea { min-height: 56px; }
  html[data-page="studio"] .mobile-layer-editor .layer-content-actions {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 2px;
  }
  html[data-page="studio"] .mobile-layer-editor .layer-content-actions button {
    min-height: 36px; border: 0; border-radius: 9px; background: var(--forest); color: #fff;
    font-size: 12px; font-weight: 800; padding: 6px;
  }
  html[data-page="studio"] .mobile-layer-editor .layer-content-actions button.danger { background: #9a3e32; }
  html[data-page="studio"] .mobile-layer-empty {
    margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--muted);
  }
  html[data-page="studio"] .mobile-editor-tools {
    margin-top: 6px; padding-top: 6px; border-top: 1px solid #e4e8e1;
  }
  html[data-page="studio"] .mobile-editor-tools label {
    display: grid; gap: 2px; font-size: 10px; font-weight: 700; color: var(--muted); margin-bottom: 6px;
  }
  html[data-page="studio"] .mobile-editor-tools output { float: right; color: var(--forest); font-weight: 800; }
  html[data-page="studio"] .mobile-nudge-row {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  }
  html[data-page="studio"] .mobile-nudge-row button {
    min-height: 34px; border: 1px solid #d5ddd7; border-radius: 9px; background: #fff;
    font-size: 14px; font-weight: 700;
  }
  html[data-page="studio"] .studio-canvas .card-stage {
    min-height: 0 !important; flex: 1 1 auto !important; padding: 2px 0 !important;
    display: grid !important; place-items: center !important; width: 100%;
  }
  html[data-page="studio"] .studio-canvas .scaled-card-frame {
    margin-inline: auto !important;
    max-width: 100% !important;
  }
  html[data-page="studio"][data-mobile-sheet="1"] .studio-canvas .card-stage {
    padding-bottom: min(36vh, 270px) !important;
  }

  html[data-page="studio"] .order-bar {
    display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px !important;
    align-items: center; padding: 10px !important; border-radius: 16px !important;
    width: 100% !important; max-width: 480px; margin-inline: auto !important;
  }
  html[data-page="studio"] .mobile-print-sides {
    grid-column: 1 / -1; margin: 0 !important; display: grid !important; gap: 2px;
    font-size: 10px !important; font-weight: 700 !important; color: var(--muted) !important;
  }
  html[data-page="studio"] .mobile-print-sides select {
    min-height: 36px; font-size: 13px !important; border-radius: 8px !important;
    border: 1px solid var(--line); padding: 6px 8px; background: #fff; font-weight: 700;
  }
  html[data-page="studio"] .order-bar .quantity, html[data-page="studio"] .order-bar .price { margin: 0 !important; }
  html[data-page="studio"] .order-bar .quantity button { min-width: 34px !important; min-height: 34px !important; }
  html[data-page="studio"] .order-bar .quantity small,
  html[data-page="studio"] .order-bar .price small,
  html[data-page="studio"] .order-bar #unitPrice { display: none !important; }
  html[data-page="studio"] .order-bar .price strong,
  html[data-page="studio"] .order-bar .quantity strong { font-size: 14px !important; }
  html[data-page="studio"] .order-bar #orderButton {
    grid-column: 1 / -1; min-height: 44px !important; width: 100% !important;
    font-size: 14px !important; font-weight: 800 !important; border-radius: 12px !important; margin: 0 !important; padding: 10px !important;
  }

  html[data-page="studio"] .student-country-presets button.country-all {
    width: auto !important; min-width: 44px; padding: 0 10px !important; font-size: 11px !important; font-weight: 800 !important;
  }
  html[data-page="studio"] .studio-panel.left .panel-scroll {
    flex: 1 1 auto !important; min-height: 0 !important; overflow-y: auto !important; overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch; padding-bottom: 24px !important;
  }

  html[data-page="studio"] .studio-dock {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    gap: 4px !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: var(--studio-dock-h) !important;
    min-height: var(--studio-dock-h) !important;
    max-height: var(--studio-dock-h) !important;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box !important;
    background: #fbfaf6 !important;
    border-top: 1px solid #dde3dc !important;
    box-shadow: 0 -6px 20px rgba(20, 31, 29, .06);
    z-index: 60;
  }
  html[data-page="studio"] .studio-dock button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 48px !important;
    border: 0 !important;
    background: transparent !important;
    color: #61706b !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    padding: 4px 2px !important;
    margin: 0 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: .01em;
    white-space: nowrap;
    box-shadow: none !important;
  }
  html[data-page="studio"] .studio-dock button svg {
    width: 18px;
    height: 18px;
    display: block;
    flex: 0 0 auto;
  }
  html[data-page="studio"] .studio-dock button span {
    font-size: 11px;
    font-weight: 800;
    line-height: 1.1;
  }
  html[data-page="studio"] .studio-dock button.active {
    color: var(--forest) !important;
    background: #e7f0ea !important;
  }
  html[data-page="studio"] .studio-dock button.dock-order {
    color: #fff !important;
    background: var(--forest) !important;
  }
  html[data-page="studio"] .studio-dock button.dock-order.active {
    color: #fff !important;
    background: #14524c !important;
  }
  html[data-page="studio"][data-studio-view="identity"] #panel-identity { display: block !important; }

  html[data-page="studio"][data-layout-editing="1"][data-studio-view="card"] .studio-panel.right,
  html[data-page="studio"][data-layout-editing="1"] #panel-layout {
    display: none !important;
  }
  html[data-page="studio"][data-layout-editing="1"] .order-bar,
  html[data-page="studio"][data-layout-editing="1"] .studio-pool-notice,
  html[data-page="studio"][data-layout-editing="1"] .canvas-status {
    display: none !important;
  }
  html[data-page="studio"] .panel-scroll,
  html[data-page="studio"] .studio-panel.left .panel-scroll,
  html[data-page="studio"] .studio-panel.right .panel-scroll {
    width: 100% !important;
    max-width: 560px;
    margin-inline: auto;
  }
}

/* Recherche + A-Z modèles */
html[data-page="studio"] .profiles-entry {
  box-sizing: border-box;
}
html[data-page="studio"] .design-search-label {
  display: block !important;
  margin: 0 0 8px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .04em;
  color: var(--muted);
}
html[data-page="studio"] .design-search-label input {
  margin-top: 5px !important;
  min-height: 38px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}
html[data-page="studio"] .design-az-hint {
  margin: 4px 0 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
html[data-page="studio"] .design-letter {
  grid-column: 1 / -1;
  margin: 10px 0 4px;
  padding: 2px 0;
  font: 800 12px/1 Manrope, sans-serif;
  letter-spacing: .12em;
  color: #3c786f;
  border-bottom: 1px solid rgba(23, 63, 63, .12);
}
html[data-page="studio"] .design-letter[hidden] {
  display: none !important;
}
html[data-page="studio"] details.model-profiles { display: none !important; }
html[data-page="studio"] details.model-profiles > summary.model-profiles-bar {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
html[data-page="studio"] details.model-profiles > summary.model-profiles-bar::-webkit-details-marker {
  display: none;
}
html[data-page="studio"] details.model-profiles:not([open]) .model-profile-chips,
html[data-page="studio"] details.model-profiles:not([open]) .model-profile-actions-row,
html[data-page="studio"] details.model-profiles:not([open]) .model-profile-list,
html[data-page="studio"] details.model-profiles:not([open]) .model-profile-save {
  display: none !important;
}
html[data-page="studio"] .model-profile-actions-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
html[data-page="studio"] .model-profile-actions-row .model-profiles-save-mini {
  flex: 1;
}

/* Guide d’utilisation studio */
.studio-guide-dialog {
  width: min(440px, 94vw);
  padding: 26px 24px 18px;
  border-radius: 24px;
  border: 0;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(201,255,74,.22), transparent 55%),
    #fbfaf6;
  box-shadow: 0 28px 70px rgba(17,31,28,.28);
  color: var(--ink, #16201e);
}
.studio-guide-dialog::backdrop {
  background: rgba(17,31,28,.5);
  backdrop-filter: blur(5px);
}
.studio-guide-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.studio-guide-badge {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: #173f3f;
  color: #eef8c8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.studio-guide-progress {
  margin-left: auto;
  font: 800 12px Manrope, sans-serif;
  color: #3c786f;
  letter-spacing: .04em;
}
.studio-guide-dialog h2 {
  font-size: clamp(24px, 4.2vw, 30px);
  margin: 0 0 8px;
  line-height: 1.08;
  font-family: Manrope, sans-serif;
  font-weight: 800;
}
.studio-guide-lead {
  margin: 0 0 18px;
  color: var(--muted, #5a645f);
  font-size: 14px;
  line-height: 1.5;
}
.studio-guide-visual {
  display: grid;
  place-items: center;
  margin: 0 0 16px;
  min-height: 88px;
}
.studio-guide-icon {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: #173f3f;
  color: #c9ff4a;
  box-shadow: 0 14px 28px rgba(23,63,63,.22);
}
.studio-guide-icon svg {
  width: 44px;
  height: 44px;
}
.studio-guide-steps {
  min-height: 96px;
}
.studio-guide-step {
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line, #d9dbd2);
}
.studio-guide-step b {
  display: block;
  font: 800 17px/1.2 Manrope, sans-serif;
  margin-bottom: 6px;
  color: #16201e;
}
.studio-guide-step p {
  margin: 0;
  color: #4d5853;
  font-size: 14px;
  line-height: 1.55;
}
.studio-guide-track {
  position: relative;
  height: 4px;
  margin: 18px 0 10px;
  border-radius: 99px;
  background: #e4e7df;
  overflow: hidden;
}
.studio-guide-track span {
  display: block;
  height: 100%;
  width: 25%;
  border-radius: inherit;
  background: linear-gradient(90deg, #173f3f, #c9ff4a);
  transition: width .28s ease;
}
.studio-guide-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 0 0 14px;
}
.studio-guide-dots button {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: #c9d0c6;
  padding: 0;
  cursor: pointer;
}
.studio-guide-dots button.active {
  background: #173f3f;
  width: 22px;
  border-radius: 99px;
}
.studio-guide-actions {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
}
.studio-guide-nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.studio-guide-actions .btn,
.profile-manager .btn,
dialog .dialog-actions .btn,
dialog .btn {
  border: 0 !important;
  border-radius: 999px !important;
  padding: 11px 16px !important;
  font: 700 13px/1.1 "DM Sans", Manrope, sans-serif !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  text-decoration: none !important;
  box-shadow: none !important;
  min-height: 42px;
}
.studio-guide-actions .btn-accent,
.profile-manager .btn-accent,
dialog .dialog-actions .btn-accent,
dialog .btn-accent {
  background: var(--lime, #c9ff4a) !important;
  color: #172018 !important;
}
.studio-guide-actions .btn-ghost,
.profile-manager .btn-ghost,
dialog .dialog-actions .btn-ghost,
dialog .btn-ghost {
  background: #e8ebe3 !important;
  color: var(--ink, #16201e) !important;
  border: 1px solid var(--line, #d9dbd2) !important;
}
.studio-guide-actions .btn:disabled,
dialog .btn:disabled {
  opacity: .45 !important;
  cursor: not-allowed !important;
  transform: none !important;
}
.profile-manager-save-row button,
.mobile-profile-sheet .profile-manager-save-row button {
  border: 0 !important;
  border-radius: 11px !important;
  background: var(--forest, #173f3f) !important;
  color: #fff !important;
  padding: 0 16px !important;
  min-height: 44px !important;
  font: 800 13px Manrope, sans-serif !important;
  cursor: pointer !important;
}
.mobile-profile-sheet > header > button,
#mobileProfileClose {
  border: 0 !important;
  border-radius: 999px !important;
  background: #e8ebe3 !important;
  color: var(--ink, #16201e) !important;
  padding: 8px 14px !important;
  font: 800 12px Manrope, sans-serif !important;
  cursor: pointer !important;
}
.profile-item-actions button {
  border: 0 !important;
  border-radius: 9px !important;
  background: var(--ink, #16201e) !important;
  color: #fff !important;
  padding: 9px 11px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}
.profile-item-actions .danger {
  width: 34px !important;
  padding: 9px 0 !important;
  background: #f3e6e3 !important;
  color: #8b3025 !important;
}
.profiles-entry {
  appearance: none;
  -webkit-appearance: none;
}
.model-profile-dialog-close,
.profile-manager .model-profile-dialog-close {
  width: 34px !important;
  height: 34px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #e8ebe3 !important;
  color: var(--ink) !important;
  font-size: 18px !important;
  cursor: pointer !important;
  display: grid !important;
  place-items: center !important;
}
@media (max-width: 900px) {
  .studio-guide-dialog {
    width: min(100vw - 20px, 420px);
    max-height: min(92dvh, 640px);
    padding: 20px 16px 14px;
    border-radius: 20px;
    overflow: auto;
  }
  .studio-guide-dialog h2 {
    font-size: 23px;
  }
  .studio-guide-lead {
    font-size: 13px;
    margin-bottom: 14px;
  }
  .studio-guide-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }
  .studio-guide-icon svg {
    width: 38px;
    height: 38px;
  }
  .studio-guide-step {
    padding: 12px 14px;
  }
  .studio-guide-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .studio-guide-nav {
    width: 100%;
    margin-left: 0;
  }
  .studio-guide-nav .btn,
  .studio-guide-actions > .btn {
    flex: 1;
  }
  html[data-page="studio"] .studio-menubar-mobile #openStudioGuideMobile {
    display: inline-flex !important;
  }
}

/* ========== STUDIO HUB (accueil projets) ========== */
html[data-page="studio"][data-studio-mode="hub"],
html[data-page="studio"][data-studio-mode="hub"] body {
  overflow: auto !important;
  height: auto !important;
  min-height: 100%;
  background: #e8ebe3 !important;
}

html[data-page="studio"][data-studio-mode="hub"] .config-section {
  min-height: 100vh !important;
  min-height: 100dvh !important;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(201,255,74,.28), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(23,63,63,.12), transparent 50%),
    #e8ebe3 !important;
}

html[data-page="studio"][data-studio-mode="hub"] #studioEditor[hidden],
html[data-page="studio"][data-studio-mode="hub"] #studioEditor {
  display: none !important;
}

html[data-page="studio"][data-studio-mode="hub"] #studioHub {
  display: flex !important;
}

html[data-page="studio"][data-studio-mode="editor"] #studioHub,
html[data-page="studio"][data-studio-mode="editor"] #studioHub[hidden] {
  display: none !important;
}

html[data-page="studio"][data-studio-mode="editor"] #studioEditor {
  display: grid !important;
}

html[data-page="studio"] #studioHub[hidden],
html[data-page="studio"] #studioEditor[hidden] {
  display: none !important;
}

html[data-page="studio"] .studio-hub {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 48px;
  box-sizing: border-box;
}

.studio-hub-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 8px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(#e8ebe3 70%, rgba(232,235,227,0));
}

.studio-hub-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink, #16201e);
  cursor: pointer;
}
.studio-hub-brand:hover strong {
  color: #173f3f;
}
#hubSiteHome {
  display: inline-flex;
  align-items: center;
}

.studio-hub-brand .mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  position: relative;
}

.studio-hub-brand .mark i {
  position: absolute;
  width: 14px;
  height: 22px;
  border: 2px solid #16201e;
  border-radius: 999px;
  transform: rotate(45deg);
}

.studio-hub-brand .mark i:last-child {
  transform: translate(7px, 2px) rotate(45deg);
}

.studio-hub-brand strong {
  font-family: "Manrope", "DM Sans", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.studio-hub-brand strong b {
  font-weight: 700;
  color: #173f3f;
}

.studio-hub-brand em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6c746f;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(23,63,63,.08);
}

.studio-hub-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.studio-hub-bar-actions .ghost,
.studio-hub-bar-actions .accent,
.studio-hub-empty button,
.hub-project-actions button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.studio-hub-bar-actions .ghost,
#hubSiteHome {
  background: rgba(255,255,255,.72);
  color: #16201e;
  border: 1px solid #d5d8ce !important;
}

.studio-hub-bar-actions .accent,
.studio-hub-cta,
.studio-hub-empty button {
  background: #173f3f;
  color: #f7ffe8;
}

.studio-hub-cta {
  appearance: none;
  border: 0;
  border-radius: 16px;
  padding: 16px 22px;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  background: #173f3f;
  color: #f7ffe8;
  box-shadow: 0 14px 30px rgba(23,63,63,.22);
  white-space: nowrap;
}

.studio-hub-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 12px;
}

.studio-hub-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 8px;
  flex-wrap: wrap;
}

.studio-hub-hero .kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  color: #5f6a64;
  margin-bottom: 10px;
}
.studio-admin-badge {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #173f3f;
  opacity: .85;
}
.studio-admin-badge-footer {
  margin: 0;
  padding: 6px 16px 2px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #5d6864;
  opacity: .9;
}

.studio-hub-hero h1 {
  margin: 0 0 10px;
  font-family: "Manrope", "DM Sans", system-ui, sans-serif;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: -.03em;
  color: #12201d;
}

.studio-hub-hero p {
  margin: 0;
  max-width: 42ch;
  color: #5a635e;
  font-size: 15px;
  line-height: 1.5;
}

.studio-hub-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.studio-hub-section-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #3d4843;
}

.studio-hub-section-head span {
  font-size: 12px;
  font-weight: 700;
  color: #7a837c;
}

.studio-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.hub-project-card {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,.78);
  border: 1px solid #d7dbd1;
  border-radius: 18px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.hub-project-card:hover {
  transform: translateY(-2px);
  border-color: #b9c0b4;
  box-shadow: 0 16px 28px rgba(22,32,30,.08);
}

.hub-project-open {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hub-project-thumb {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  min-height: 118px;
  padding: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--p) 92%, #000) 0%, var(--p) 48%, color-mix(in srgb, var(--p) 70%, var(--a)) 100%);
  color: #fff;
}

.hub-project-thumb small {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .82;
}

.hub-project-thumb b {
  font-size: 18px;
  line-height: 1.15;
  font-weight: 800;
}

.hub-project-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 14px 4px;
}

.hub-project-meta b {
  font-size: 14px;
  font-weight: 800;
  color: #16201e;
}

.hub-project-meta small {
  color: #6c746f;
  font-size: 12px;
  font-weight: 600;
}

.hub-project-actions {
  display: flex;
  gap: 8px;
  padding: 12px 14px 14px;
}

.hub-project-actions button {
  flex: 1;
  background: #173f3f;
  color: #f4ffe6;
}

.hub-project-actions .danger {
  flex: 0 0 42px;
  background: #f3e6e3;
  color: #8b3025;
}
.hub-project-more {
  position: relative;
  flex: 0 0 42px;
}
.hub-project-actions .hub-project-more-toggle {
  width: 42px;
  min-width: 42px;
  height: 100%;
  padding: 0;
  letter-spacing: 2px;
  background: #edf1ec;
  color: #173f3f;
}
.hub-project-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 7px);
  z-index: 20;
  width: 174px;
  padding: 6px;
  border: 1px solid #d8ded7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(20,32,30,.16);
}
.hub-project-menu[hidden] { display: none !important; }
.hub-project-actions .hub-project-menu button {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  text-align: left;
  background: transparent;
  color: #173f3f;
}
.hub-project-actions .hub-project-menu button:hover { background: #eef3ed; }
.hub-project-actions .hub-project-menu .danger {
  color: #9b2f27;
  background: transparent;
}

.studio-hub-empty {
  text-align: center;
  padding: 48px 20px;
  border: 1px dashed #c5cbc0;
  border-radius: 20px;
  background: rgba(255,255,255,.55);
}

.studio-hub-empty b {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
  color: #16201e;
}

.studio-hub-empty p {
  margin: 0 auto 18px;
  max-width: 36ch;
  color: #6c746f;
  font-size: 14px;
  line-height: 1.45;
}

.studio-project-name {
  display: inline-block;
  margin-left: 8px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  color: #5f6a64;
  vertical-align: middle;
}

html[data-page="studio"] #studioAdminLink.ghost {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  height: 30px;
  border-radius: 8px;
  background: #e8ebe3;
  color: #16201e;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .studio-hub {
    padding: 0 14px 36px;
  }
  .studio-hub-hero {
    padding-top: 12px;
  }
  .studio-hub-cta {
    width: 100%;
  }
  .studio-hub-brand em {
    display: none;
  }
  .hub-project-thumb {
    min-height: 100px;
  }
}

/* ========== FRAMES DECK (style app) ========== */
html[data-page="studio"] .studio-canvas .canvas-deck {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px;
}
.canvas-deck-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  border: 1px solid #d7dbd1;
}
.canvas-deck-title { display: flex; align-items: baseline; gap: 10px; }
.canvas-deck-title b {
  font-size: 11px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: #3d4843;
}
.canvas-deck-title span { font-size: 12px; font-weight: 700; color: #6c746f; }
.canvas-deck-actions { display: flex; align-items: center; gap: 6px; }
.deck-btn, .deck-pool-chip {
  appearance: none; border: 0; border-radius: 10px; height: 34px;
  padding: 0 12px; font: inherit; font-size: 12px; font-weight: 800;
  cursor: pointer; background: #173f3f; color: #f4ffe6;
}
.deck-pool-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #edf5ef; color: #173f3f; border: 1px solid #cfe0d4;
}
.deck-pool-chip em {
  font-style: normal; font-size: 11px; font-weight: 800;
  padding: 3px 7px; border-radius: 8px; background: #173f3f; color: #fff;
}
.canvas-deck-body {
  flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 10px;
}
.frames-rail {
  min-height: 0; overflow: auto; padding: 4px; border-radius: 14px;
  background: rgba(255,255,255,.45); border: 1px solid #d7dbd1;
  overscroll-behavior: contain;
}
.frames-board { display: flex; flex-direction: column; gap: 8px; }
.board-frame {
  flex: 0 0 auto; border: 1px solid transparent; border-radius: 12px;
  background: rgba(255,255,255,.55); overflow: hidden; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.board-frame:hover { border-color: #c5cbc0; }
.board-frame.active {
  border-color: #173f3f; background: #fff;
  box-shadow: 0 0 0 2px rgba(201,255,74,.45);
}
.board-frame-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 6px; padding: 7px 8px 4px; font-size: 10px; font-weight: 800; color: #6c746f;
}
.board-frame-head b {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 58%; color: #16201e; font-weight: 700;
}
.board-frame-thumb {
  display: block; width: 100%; min-height: 78px; overflow: hidden;
  background: #dfe2d8; pointer-events: none;
}
.board-frame-thumb .design-preview-card { pointer-events: none; }
.board-frame-menu {
  appearance: none; border: 0; background: transparent; color: #5f6a64;
  font-size: 16px; line-height: 1; padding: 0 4px; cursor: pointer; border-radius: 6px;
}
.board-frame-menu:hover { background: #eef0e8; color: #16201e; }
.canvas-main {
  min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 6px;
}
html[data-page="studio"] .studio-canvas .card-stage {
  flex: 1 1 auto !important; display: grid !important; place-items: center !important;
  min-height: 220px !important; padding: 8px !important; border-radius: 16px;
  background: radial-gradient(circle at 70% 18%, rgba(201,255,74,.14), transparent 30%), rgba(255,255,255,.35);
  border: 1px solid rgba(215,219,209,.9); overflow: hidden;
}
.canvas-frame-hint {
  margin: 0; text-align: center; font-size: 11px; font-weight: 600; color: #6c746f;
}
.hub-pvc-thumb {
  position: relative; display: block !important; width: 100%; min-height: 148px; overflow: hidden;
  background: #dfe2d8; border-bottom: 1px solid #d7dbd1;
}
.hub-project-thumb small, .hub-project-thumb > b { display: none; }
.hub-pvc-thumb>.scaled-card-frame{
  position:absolute;
  inset:8px auto auto 50%;
  margin:0!important;
  transform:translateX(-50%);
  transform-origin:top center;
}
.hub-pvc-thumb .hub-preview-status{
  position:absolute;
  z-index:8;
  right:9px;
  bottom:8px;
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:5px 9px;
  border:1px solid rgba(255,255,255,.52);
  border-radius:999px;
  background:rgba(20,31,29,.82);
  color:#fff;
  box-shadow:0 5px 14px rgba(0,0,0,.16);
  backdrop-filter:blur(8px);
  font-size:9px;
  font-weight:900;
  letter-spacing:.04em;
}
.frame-ctx-menu, .studio-ctx-menu {
  position: fixed; z-index: 10050; min-width: 210px; padding: 6px;
  border-radius: 12px; background: #1b2421; color: #f4f7f2;
  box-shadow: 0 18px 40px rgba(0,0,0,.28);
}
.frame-ctx-menu button, .studio-ctx-menu button {
  display: block; width: 100%; border: 0; background: transparent; color: inherit;
  text-align: left; padding: 10px 12px; border-radius: 8px; font: inherit;
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.frame-ctx-menu button:hover, .studio-ctx-menu button:hover { background: rgba(255,255,255,.08); }
.frame-ctx-menu button.danger, .studio-ctx-menu button.danger { color: #ffb4a8; }
html[data-page="studio"] .studio-pool-notice { display: none !important; }
.batch-actions button {
  appearance: none; border: 0; border-radius: 10px; padding: 8px 12px;
  font: inherit; font-size: 12px; font-weight: 800; cursor: pointer;
  background: #173f3f; color: #f4ffe6;
}
.frames-panel-hint { font-size: 12px; color: #6c746f; margin: 0 0 10px; line-height: 1.4; }
@media (max-width: 1100px) {
  .canvas-deck-body { grid-template-columns: 148px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  /* Aperçu mobile : frames en bandeau compact, carte prioritaire */
  html[data-page="studio"][data-studio-view="card"] .studio-canvas,
  html[data-page="studio"][data-studio-view="card"] .preview-workspace.studio-canvas,
  html[data-page="studio"][data-studio-view="order"] .studio-canvas,
  html[data-page="studio"][data-studio-view="order"] .preview-workspace.studio-canvas {
    overflow: hidden !important;
    padding: 4px 10px 6px !important;
    gap: 4px !important;
  }
  html[data-page="studio"] .studio-canvas .canvas-deck {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    gap: 4px !important;
  }
  .canvas-deck-bar {
    padding: 4px 6px;
    border-radius: 10px;
  }
  .canvas-deck-title b { font-size: 10px; }
  .canvas-deck-title span { font-size: 11px; }
  .deck-btn, .deck-pool-chip { height: 30px; padding: 0 10px; border-radius: 8px; }
  .canvas-deck-body {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    flex: 1 1 auto;
    min-height: 0;
    gap: 4px;
  }
  .frames-rail {
    flex: 0 0 auto !important;
    overflow: visible !important;
    max-height: none !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }
  .frames-board,
  .frames-board.frames-board-list {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100%;
    min-width: 0;
    gap: 6px !important;
    padding: 0 0 2px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .frames-board::-webkit-scrollbar { display: none; }
  .board-frame {
    flex: 0 0 auto !important;
    flex-basis: auto !important;
    width: auto !important;
    min-width: 148px;
    max-width: 210px;
    height: 40px !important;
    max-height: 40px !important;
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0 8px !important;
    border-radius: 10px !important;
    background: #fff !important;
    border: 1px solid #d7dbd1 !important;
    box-sizing: border-box;
  }
  .board-frame.active {
    border-color: #173f3f !important;
    box-shadow: inset 0 0 0 1px #173f3f !important;
    background: #eef4ef !important;
  }
  .board-frame-thumb { display: none !important; }
  .board-frame-index {
    flex: 0 0 auto;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #5f6a64;
    white-space: nowrap;
  }
  .board-frame-head { display: none !important; }
  .board-frame-meta {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    justify-content: center;
  }
  .board-frame-meta b {
    font-size: 12px !important;
    font-weight: 800;
    color: #16201e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.15;
  }
  .board-frame-meta small {
    font-size: 10px !important;
    font-weight: 600;
    color: #6c746f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
  }
  .board-frame-menu {
    flex: 0 0 auto !important;
    margin-left: auto;
    padding: 4px 2px !important;
  }
  .mobile-frames-hint { display: none !important; }
  .mobile-preview-toolbar {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin: 0;
    min-height: 0;
  }
  .mobile-preview-toggle {
    border: 1px solid #d5d8ce;
    background: #fff;
    border-radius: 999px;
    padding: 5px 10px;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    color: #173f3f;
    cursor: pointer;
  }
  .mobile-preview-tip { display: none !important; }
  .canvas-main {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    gap: 0 !important;
  }
  html[data-page="studio"] .studio-canvas .card-stage,
  .card-stage {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    padding: 4px 0 !important;
    overflow: hidden !important;
  }
  html[data-preview-collapsed="1"] .frames-rail {
    display: none !important;
  }
  html[data-preview-collapsed="1"] #cardStage {
    display: grid !important;
  }
  .deck-pool-chip span { display: none; }
  .canvas-frame-hint { display: none; }
  html[data-page="studio"] .order-bar {
    flex-shrink: 0 !important;
    margin-top: 4px !important;
    padding: 8px !important;
    gap: 6px !important;
    border-radius: 14px !important;
  }
  html[data-page="studio"] .order-bar #orderButton {
    min-height: 40px !important;
    padding: 8px !important;
  }
  .mobile-panel-lead {
    display: block;
    margin: 0 0 12px;
    font-size: 12px;
    line-height: 1.4;
    color: #6c746f;
  }
  .field-hint {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #6c746f;
  }
  .country-unavailable-note {
    display: block;
    margin: 8px 0 0;
    font-size: 11px;
    color: #6c746f;
  }
}

.mobile-frames-hint,
.mobile-preview-toolbar,
.mobile-panel-lead,
.field-hint {
  display: none;
}
@media (max-width: 900px) {
  .mobile-frames-hint,
  .mobile-preview-toolbar,
  .mobile-panel-lead,
  .field-hint { display: block; }
  .mobile-preview-toolbar { display: flex; }
}

.student-route-note {
  margin: -6px 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: #6c746f;
  padding: 10px 12px;
  border-radius: 12px;
  background: #eef2ec;
  border: 1px solid #dce3d8;
}
.country-unavailable-note {
  margin: 8px 0 0;
  font-size: 11px;
  color: #6c746f;
}

.project-name-dialog,
.pool-explain-dialog,
.invoice-dialog {
  width: min(100vw - 28px, 480px);
  border: 0;
  border-radius: 20px;
  padding: 22px 20px 16px;
  background: #fbfaf6;
  color: #16201e;
  box-shadow: 0 24px 60px rgba(22,32,30,.22);
}
.invoice-dialog { width: min(100vw - 28px, 640px); }
.project-name-dialog::backdrop,
.pool-explain-dialog::backdrop,
.invoice-dialog::backdrop {
  background: rgba(18,28,26,.55);
}
.project-name-dialog label,
.invoice-dialog label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  margin: 12px 0;
}
.project-name-dialog input,
.invoice-dialog input,
.invoice-dialog textarea,
.invoice-dialog select {
  border: 1px solid #d5d8ce;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}
.pool-explain-visual {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
}
.pool-explain-bar {
  flex: 1;
  height: 12px;
  border-radius: 999px;
  background: #e4e7df;
  overflow: hidden;
}
.pool-explain-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #173f3f, #c9ff4a);
  transition: width .35s ease;
}
.pool-explain-steps {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
}
.pool-explain-tip {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #eef6d8;
  font-size: 13px;
  font-weight: 600;
}
.invoice-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 8px 0 12px;
}
.invoice-toolbar button {
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  background: #173f3f;
  color: #f4ffe6;
  font-weight: 800;
  cursor: pointer;
}
.invoice-table-wrap { overflow: auto; max-height: 280px; }
.invoice-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.invoice-table th, .invoice-table td { border-bottom: 1px solid #e2e5dc; padding: 8px 6px; text-align: left; }
.invoice-table input, .invoice-table select {
  width: 100%;
  border: 1px solid #d5d8ce;
  border-radius: 8px;
  padding: 6px 8px;
  font: inherit;
}
.invoice-total-row {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 16px;
  font-weight: 800;
}

@media (max-width: 900px) {
  html[data-page="studio"] .studio-menubar-actions #openInvoiceDialog {
    display: none;
  }
}
@media (max-width: 380px) {
  html[data-page="studio"] .studio-brand strong {
    display: none !important;
  }
  html[data-page="studio"] .studio-menubar-mobile #studioHomeLinkMobile {
    padding: 6px 7px !important;
  }
  html[data-page="studio"] .studio-menubar-mobile #mobileOpenBrandPack {
    padding: 6px 8px !important;
    font-size: 10px !important;
  }
}

/* Admin mobile nav polish */
@media (max-width: 720px) {
  .admin-sidebar-nav {
    gap: 6px !important;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }
  .admin-sidebar-nav button,
  .admin-sidebar-nav a {
    border: 1px solid rgba(255,255,255,.08) !important;
    background: #24302c !important;
  }
  .admin-sidebar-nav button.active {
    background: #173f3f !important;
    border-color: #c9ff4a !important;
  }
}

.invoice-smart-bar{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 12px}.invoice-smart-bar span{background:#e8f6cf;color:#173f3f;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:700}

/* Éditeur libre · couleurs carte (recto + verso) */
html[data-page="studio"] .editor-card-colors{
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(160deg, #f7faf6, #fff);
}
html[data-page="studio"] .editor-card-colors > small{
  display: block;
  margin-bottom: 8px;
  font: 800 8px/1.2 Manrope, sans-serif;
  letter-spacing: .08em;
  color: #3c786f;
}
html[data-page="studio"] .editor-card-colors .editor-color-help{
  margin: 8px 0 0;
  font-size: 8px;
  line-height: 1.4;
  color: var(--muted);
}
html[data-page="studio"] .editor-color-row{
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
html[data-page="studio"] .mobile-card-colors{
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
html[data-page="studio"] .mobile-card-colors > small{
  display: block;
  margin-bottom: 6px;
  font: 800 8px Manrope, sans-serif;
  color: #3c786f;
}
html[data-page="studio"] .mobile-editor-tools #mobileLayerColor{
  width: 100%;
  height: 34px;
  margin-top: 4px;
  padding: 2px;
  border: 0;
}

html[data-page="studio"] .scale-stepper button{min-width:34px}
html[data-page="studio"] .editor-card-colors .color-control{display:flex;align-items:center;gap:6px}

/* Inspecteur v2 — compact, structuré et cohérent */
@media (min-width: 901px) {
  html[data-page="studio"] {
    --studio-right-w: 304px;
  }
}

html[data-page="studio"] .studio-panel.right {
  background: #f4f5f1 !important;
}

html[data-page="studio"] .studio-panel.right .control-tabs-visible {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 5px !important;
  padding: 7px !important;
  background: #ecefe9 !important;
}

html[data-page="studio"] .studio-panel.right .control-tabs-visible button {
  min-height: 32px !important;
  padding: 6px 4px !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

html[data-page="studio"] .studio-panel.right .control-tabs-visible button.active {
  color: #fff !important;
  background: #173f3f !important;
  border-color: #173f3f !important;
  box-shadow: 0 3px 9px rgba(23, 63, 63, .14) !important;
}

html[data-page="studio"] .studio-panel.right .panel-scroll {
  padding: 10px !important;
}

html[data-page="studio"] .studio-panel.right .control-panel > label,
html[data-page="studio"] .studio-panel.right .inspector-section > label {
  margin-bottom: 8px !important;
  font-size: 9px !important;
  line-height: 1.25;
  letter-spacing: .015em;
}

html[data-page="studio"] .studio-panel.right input:not([type="range"]):not([type="checkbox"]):not([type="color"]),
html[data-page="studio"] .studio-panel.right select,
html[data-page="studio"] .studio-panel.right textarea {
  min-height: 36px;
  margin-top: 4px !important;
  padding: 7px 9px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
}

html[data-page="studio"] .identity-mode-toggle {
  gap: 3px;
  margin-bottom: 6px;
  padding: 3px;
  border-radius: 10px;
}

html[data-page="studio"] .identity-mode-toggle button {
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 10px;
}

html[data-page="studio"] .identity-mode-hint,
html[data-page="studio"] .mobile-panel-lead {
  margin: 0 0 8px !important;
  font-size: 9px !important;
  line-height: 1.35 !important;
}

html[data-page="studio"] .identity-brand-cta {
  margin-bottom: 9px;
}

html[data-page="studio"] .brand-univ-cta {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  column-gap: 8px;
  row-gap: 1px;
  min-height: 0 !important;
  padding: 9px 10px !important;
  border-width: 1px !important;
  border-radius: 11px !important;
  box-shadow: 0 4px 12px rgba(23, 63, 63, .16) !important;
}

html[data-page="studio"] .brand-univ-cta:hover,
html[data-page="studio"] .brand-univ-cta:active {
  transform: none;
  box-shadow: 0 4px 12px rgba(23, 63, 63, .16) !important;
}

html[data-page="studio"] .brand-univ-cta-kicker {
  grid-column: 1;
  font-size: 7px !important;
  letter-spacing: .09em;
}

html[data-page="studio"] .brand-univ-cta strong {
  grid-column: 1;
  font-size: 13px !important;
}

html[data-page="studio"] .brand-univ-cta-help {
  grid-column: 1;
  font-size: 8px !important;
  line-height: 1.3;
}

html[data-page="studio"] .brand-univ-cta-action {
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
  margin: 0;
  padding: 7px 9px;
  font-size: 9px;
}

html[data-page="studio"] .inspector-section-head {
  display: grid;
  gap: 2px;
  margin-bottom: 8px;
  padding: 2px 2px 7px;
  border-bottom: 1px solid #dce1da;
}

html[data-page="studio"] .inspector-section-head > span {
  color: #3c786f;
  font: 900 7px/1 Manrope, sans-serif;
  letter-spacing: .12em;
}

html[data-page="studio"] .inspector-section-head > b {
  font: 800 14px/1.2 Manrope, sans-serif;
}

html[data-page="studio"] .inspector-section-head > small {
  color: var(--muted);
  font-size: 8px;
}

html[data-page="studio"] .inspector-section {
  margin-bottom: 8px;
  padding: 9px;
  border: 1px solid #dce1da;
  border-radius: 11px;
  background: #fff;
}

html[data-page="studio"] .inspector-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 7px;
  margin-bottom: 7px;
}

html[data-page="studio"] .inspector-section-title b {
  font: 800 10px/1.2 Manrope, sans-serif;
}

html[data-page="studio"] .inspector-section-title small {
  color: var(--muted);
  font-size: 7px;
  text-align: right;
}

html[data-page="studio"] .options-compact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

html[data-page="studio"] .options-compact-grid label {
  margin: 0 !important;
  font-size: 8px !important;
}

html[data-page="studio"] .inspector-import-section .csv-upload {
  min-height: 58px !important;
  margin: 0 0 7px !important;
  padding: 8px !important;
}

html[data-page="studio"] .inspector-import-section .csv-upload span {
  font-size: 16px !important;
}

html[data-page="studio"] .inspector-import-section .csv-upload b {
  font-size: 9px !important;
}

html[data-page="studio"] .inspector-import-section .csv-upload small {
  font-size: 7px !important;
}

html[data-page="studio"] .inspector-import-section .csv-template-button {
  margin: 0 !important;
  padding: 7px 9px !important;
  font-size: 8px !important;
}

html[data-page="studio"] .layer-panel-hint {
  margin: 0 0 7px !important;
  padding: 7px 9px;
  border-radius: 9px;
  background: #e8eee9;
  color: #435650;
  font-size: 8px !important;
  line-height: 1.35;
}

html[data-page="studio"] .editor-card-colors {
  margin-bottom: 8px;
  padding: 0;
  overflow: hidden;
  border-radius: 11px;
  background: #fff;
}

html[data-page="studio"] .editor-card-colors > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

html[data-page="studio"] .editor-card-colors > summary::-webkit-details-marker {
  display: none;
}

html[data-page="studio"] .editor-card-colors > summary span {
  display: grid;
  gap: 1px;
}

html[data-page="studio"] .editor-card-colors > summary b {
  font: 800 10px/1.2 Manrope, sans-serif;
}

html[data-page="studio"] .editor-card-colors > summary small {
  color: var(--muted);
  font-size: 7px;
}

html[data-page="studio"] .editor-card-colors > summary i {
  font-style: normal;
  font-size: 13px;
  transition: transform .15s ease;
}

html[data-page="studio"] .editor-card-colors[open] > summary i {
  transform: rotate(180deg);
}

html[data-page="studio"] .editor-card-colors-body {
  padding: 0 9px 9px;
  border-top: 1px solid #edf0eb;
}

html[data-page="studio"] .editor-color-row {
  gap: 6px !important;
  margin-top: 7px !important;
}

html[data-page="studio"] .editor-color-row label {
  margin: 0 !important;
  font-size: 7px !important;
}

html[data-page="studio"] .editor-card-colors .color-control {
  gap: 4px;
  margin-top: 3px;
}

html[data-page="studio"] .editor-card-colors input[type="color"] {
  width: 34px !important;
  height: 31px !important;
  min-height: 31px !important;
}

html[data-page="studio"] .editor-card-colors input:not([type="color"]):not([type="checkbox"]) {
  min-height: 31px !important;
  padding: 5px 6px !important;
  font-size: 9px !important;
}

html[data-page="studio"] #layerControls {
  padding: 8px !important;
  border-radius: 11px;
  background: #fff;
}

html[data-page="studio"] .layer-inspector-top {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 6px !important;
  align-items: end !important;
}

html[data-page="studio"] .layer-inspector-top label {
  display: grid !important;
  gap: 3px;
  min-width: 0;
  font-size: 7px !important;
}

html[data-page="studio"] .layer-inspector-top select {
  min-height: 34px !important;
  margin: 0 !important;
  padding: 6px 8px !important;
  font-size: 10px !important;
}

html[data-page="studio"] .layer-inspector-top > b {
  grid-column: 1 / -1;
  grid-row: 2;
  padding: 0 2px !important;
  color: #596862;
  font-size: 8px !important;
  font-weight: 700 !important;
}

html[data-page="studio"] #toggleLayerVisibility {
  min-width: 76px;
  min-height: 34px;
  margin: 0 !important;
  padding: 6px 8px !important;
  border: 1px solid #bad8c9 !important;
  border-radius: 9px !important;
  background: #e8f6ee !important;
  color: #176044 !important;
  font-size: 8px !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

html[data-page="studio"] #toggleLayerVisibility.is-hidden {
  border-color: #ddd9d3 !important;
  background: #f1efeb !important;
  color: #7a7169 !important;
}

html[data-page="studio"] .editor-tool-tabs {
  gap: 3px;
  margin-top: 7px;
  padding: 3px;
  border-radius: 9px;
  background: #ecefe9;
}

html[data-page="studio"] .editor-tool-tabs button {
  min-height: 29px;
  padding: 5px !important;
  border-radius: 7px !important;
  font-size: 8px !important;
  font-weight: 800 !important;
}

html[data-page="studio"] .editor-tool-tabs button.active {
  color: #fff !important;
  background: #173f3f !important;
  box-shadow: none !important;
}

html[data-page="studio"] .editor-tool-panel {
  padding-top: 7px;
}

html[data-page="studio"] .layer-content-summary {
  grid-template-columns: 34px 1fr;
  gap: 7px;
  padding: 7px;
}

html[data-page="studio"] .layer-content-summary > span {
  width: 34px;
  height: 30px;
}

html[data-page="studio"] .layer-content-summary b {
  font-size: 8px;
}

html[data-page="studio"] .layer-content-summary small {
  font-size: 6.5px;
}

html[data-page="studio"] .layer-scale-row,
html[data-page="studio"] .layer-width-row {
  grid-template-columns: 1fr auto;
  gap: 5px 7px;
  margin-bottom: 6px;
  padding: 7px 8px;
  border-radius: 9px;
}

html[data-page="studio"] .layer-scale-row > span,
html[data-page="studio"] .layer-width-row > span {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  font-size: 8px;
}

html[data-page="studio"] .layer-scale-row .scale-stepper,
html[data-page="studio"] .layer-width-row .scale-stepper {
  grid-column: 2;
  grid-row: 1;
}

html[data-page="studio"] .layer-scale-row input[type="range"],
html[data-page="studio"] .layer-width-row input[type="range"] {
  grid-column: 1 / -1;
}

html[data-page="studio"] .scale-stepper {
  gap: 3px;
}

html[data-page="studio"] .scale-stepper button {
  width: 27px;
  height: 27px;
  min-width: 27px;
  border-radius: 7px;
  font-size: 14px;
}

html[data-page="studio"] .scale-stepper b {
  min-width: 42px;
  font-size: 10px;
}

html[data-page="studio"] .layer-quality-hint {
  margin: 4px 0 6px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 7px;
  line-height: 1.3;
}

html[data-page="studio"] .layer-property-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 5px;
}

html[data-page="studio"] .layer-property-grid label {
  min-width: 0;
  padding: 6px;
  border-radius: 8px;
  font-size: 6.5px !important;
}

html[data-page="studio"] .layer-property-grid input[type="color"] {
  height: 24px;
}

html[data-page="studio"] .layer-font-row {
  gap: 5px;
  margin: 6px 0;
}

html[data-page="studio"] .layer-font-row label,
html[data-page="studio"] .layer-color-mode-row {
  margin: 0 !important;
  font-size: 7px !important;
}

html[data-page="studio"] .layer-font-row select,
html[data-page="studio"] .layer-color-mode-row select {
  min-height: 34px;
  padding: 6px 7px;
  border-radius: 8px;
  font-size: 9px;
}

html[data-page="studio"] .photo-frame-editor {
  gap: 6px;
  margin: 6px 0;
  padding: 7px;
  border-radius: 9px;
}

html[data-page="studio"] .style-shortcuts {
  gap: 5px;
}

html[data-page="studio"] .style-shortcuts button {
  min-height: 30px;
  padding: 6px !important;
  font-size: 7px !important;
}

html[data-page="studio"] .layer-position-values {
  display: grid;
  grid-template-columns: 1fr 1fr .8fr;
  gap: 5px;
  margin-bottom: 6px;
}

html[data-page="studio"] .layer-position-values label {
  display: grid;
  gap: 3px;
  margin: 0 !important;
  font-size: 7px !important;
  font-weight: 800;
}

html[data-page="studio"] .layer-position-values input,
html[data-page="studio"] .layer-position-values select {
  min-height: 32px !important;
  margin: 0 !important;
  padding: 5px 6px !important;
  text-align: center;
  font-size: 9px !important;
}

html[data-page="studio"] .layer-align-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 6px;
}

html[data-page="studio"] .layer-align-grid button,
html[data-page="studio"] .layer-action-grid button {
  min-width: 0;
  min-height: 29px;
  padding: 5px 3px !important;
  border: 1px solid #d8ddd6 !important;
  border-radius: 7px !important;
  background: #f7f8f5 !important;
  color: #2e3d38 !important;
  font-size: 7px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

html[data-page="studio"] .layer-action-grid {
  gap: 4px;
  margin-top: 0;
}

html[data-page="studio"] .layer-action-grid button:nth-last-child(-n + 2) {
  grid-column: auto;
}

html[data-page="studio"] .reset-layer-position {
  width: 100%;
  min-height: 30px;
  margin-top: 6px;
  border: 1px solid #e1d8cf;
  border-radius: 8px;
  background: #faf4ed;
  color: #7b4a2e;
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

html[data-page="studio"] .layer-shortcuts {
  margin-top: 6px;
  font-size: 6.5px;
}

@media (max-width: 900px) {
  html[data-page="studio"] .brand-univ-cta {
    grid-template-columns: minmax(0, 1fr) auto !important;
    padding: 8px 9px !important;
  }
  html[data-page="studio"] .brand-univ-cta-help {
    display: none;
  }
  html[data-page="studio"] .brand-univ-cta-action {
    grid-row: 1 / 3;
  }
  html[data-page="studio"] .layer-position-values {
    grid-template-columns: 1fr 1fr .75fr;
  }
  html[data-page="studio"] .layer-align-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ===== Inspecteur droit v3 · liste de calques type studio graphique ===== */
@media (min-width: 901px) {
  html[data-page="studio"] {
    --studio-right-w: 322px;
  }
}

html[data-page="studio"] .layer-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px 8px;
  border-bottom: 1px solid #e3e6df;
  background: #fff;
}

html[data-page="studio"] .layer-editor-heading span {
  display: grid;
  gap: 1px;
}

html[data-page="studio"] .layer-editor-heading b {
  color: #18231f;
  font-size: 11px;
  font-weight: 900;
}

html[data-page="studio"] .layer-editor-heading small {
  color: #7a837e;
  font-size: 7px;
  font-weight: 650;
}

html[data-page="studio"] .layer-editor-heading i {
  color: #63716a;
  font-size: 15px;
  font-style: normal;
}

html[data-page="studio"] #panel-layout {
  padding: 0 !important;
  overflow: hidden;
  border-radius: 0;
  background: #fbfcfa;
}

html[data-page="studio"] #panel-layout > .layer-panel-hint {
  display: none;
}

html[data-page="studio"] #panel-layout > .editor-card-colors {
  display: none;
}

html[data-page="studio"] #panel-layout .layer-inspector {
  padding: 0 9px 10px;
}

html[data-page="studio"] #panel-layout .layer-inspector-top {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  margin: 8px 0 0;
  padding: 7px;
  border: 1px solid #dfe4dd;
  border-radius: 9px;
  background: #fff;
}

html[data-page="studio"] #panel-layout .layer-inspector-top > label {
  display: none;
}

html[data-page="studio"] #selectedLayerName {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  color: #1f2b27;
  font-size: 9px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-page="studio"] #toggleLayerVisibility {
  min-width: 68px;
  min-height: 29px;
  padding: 4px 7px !important;
  font-size: 7px !important;
}

html[data-page="studio"] .editor-tool-tabs-v3 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 7px 0 0;
  padding: 2px;
  border: 1px solid #dfe4dd;
  border-radius: 8px;
  background: #f0f2ee;
}

html[data-page="studio"] .editor-tool-tabs-v3 button {
  min-height: 27px;
  padding: 4px 2px !important;
  border-radius: 6px !important;
  font-size: 6.8px !important;
  letter-spacing: -.01em;
}

html[data-page="studio"] .layer-search-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  margin-bottom: 6px;
  border: 1px solid #dce2db;
  border-radius: 8px;
  background: #fff;
}

html[data-page="studio"] .layer-search-row span {
  color: #66736d;
  text-align: center;
  font-size: 13px;
}

html[data-page="studio"] .layer-search-row input {
  min-height: 30px !important;
  margin: 0 !important;
  padding: 5px 7px 5px 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 8px !important;
}

html[data-page="studio"] .layer-tree-list {
  max-height: 328px;
  overflow: auto;
  padding: 2px;
  border: 1px solid #dfe4dd;
  border-radius: 9px;
  background: #fff;
  scrollbar-width: thin;
}

html[data-page="studio"] #panel-layout .layer-quick-list {
  display: none !important;
}

html[data-page="studio"] .layer-tree-group {
  margin: 0;
  border: 0;
  border-bottom: 1px solid #edf0eb;
}

html[data-page="studio"] .layer-tree-group:last-child {
  border-bottom: 0;
}

html[data-page="studio"] .layer-tree-group > summary {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px;
  min-height: 26px;
  padding: 4px 6px;
  color: #53615b;
  cursor: pointer;
  list-style: none;
}

html[data-page="studio"] .layer-tree-group > summary::-webkit-details-marker {
  display: none;
}

html[data-page="studio"] .layer-tree-group > summary > span {
  font-size: 8px;
  transition: transform .18s ease;
}

html[data-page="studio"] .layer-tree-group:not([open]) > summary > span {
  transform: rotate(-90deg);
}

html[data-page="studio"] .layer-tree-group > summary b {
  font-size: 7.5px;
  font-weight: 850;
}

html[data-page="studio"] .layer-tree-group > summary small {
  min-width: 18px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #edf1ec;
  color: #69746e;
  text-align: center;
  font-size: 6px;
}

html[data-page="studio"] .layer-tree-group-rows {
  padding: 0 3px 4px 11px;
}

html[data-page="studio"] .layer-tree-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 27px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #33413b;
}

html[data-page="studio"] .layer-tree-row:hover {
  background: #f4f7f2;
}

html[data-page="studio"] .layer-tree-row.active {
  border-color: #82b73f;
  background: #eff9df;
  box-shadow: inset 3px 0 #79a936;
}

html[data-page="studio"] .layer-tree-row.is-hidden {
  opacity: .52;
}

html[data-page="studio"] .layer-tree-eye,
html[data-page="studio"] .layer-tree-select {
  min-width: 0 !important;
  min-height: 25px !important;
  margin: 0 !important;
  padding: 2px !important;
  border: 0 !important;
  border-radius: 5px !important;
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
}

html[data-page="studio"] .layer-tree-eye {
  color: #67756e !important;
  font-size: 8px !important;
}

html[data-page="studio"] .layer-tree-select {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  text-align: left;
}

html[data-page="studio"] .layer-tree-select i {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid #dce2db;
  border-radius: 4px;
  background: #f8faf7;
  color: #35524a;
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
}

html[data-page="studio"] .layer-tree-select span {
  overflow: hidden;
  font-size: 7.5px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-page="studio"] .layer-tree-handle {
  color: #a4aca7;
  text-align: center;
  font-size: 9px;
}

html[data-page="studio"] .layer-clipboard-actions{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:4px;
  margin:6px 0 8px;
}
html[data-page="studio"] .layer-clipboard-actions button{
  min-width:0;
  min-height:28px;
  padding:5px 4px;
  border:1px solid #dce3dc;
  border-radius:7px;
  background:#fff;
  color:#173f3f;
  font:800 8px Manrope,sans-serif;
}
html[data-page="studio"] .layer-clipboard-actions button:hover{background:#eef7ed}
html[data-page="studio"] .layer-clipboard-actions button.danger{color:#9f2727}
html[data-page="studio"] .layer-tree-actions{
  display:flex;
  align-items:center;
  gap:2px;
  margin-left:auto;
}
html[data-page="studio"] .layer-tree-actions button{
  width:21px;
  height:21px;
  padding:0;
  border:0;
  border-radius:5px;
  background:transparent;
  color:#66706b;
  font:800 12px/1 Manrope,sans-serif;
}
html[data-page="studio"] .layer-tree-actions button:hover{background:#e8f2e7;color:#173f3f}
html[data-page="studio"] .layer-tree-handle{display:none!important}

html[data-page="studio"] .layer-tree-empty {
  margin: 0;
  padding: 18px 8px;
  color: #78827d;
  text-align: center;
  font-size: 8px;
}

html[data-page="studio"] .selected-layer-content {
  margin-top: 7px;
  padding: 7px;
  border: 1px solid #dfe4dd;
  border-radius: 9px;
  background: #fff;
}

html[data-page="studio"] .selected-layer-content > small {
  display: block;
  margin-bottom: 5px;
  color: #78827d;
  font-size: 6.5px;
  font-weight: 800;
  text-transform: uppercase;
}

html[data-page="studio"] [data-editor-panel="style"] > .editor-card-colors {
  display: block;
  margin: 0 0 7px;
}

html[data-page="studio"] .layer-effects-intro {
  display: grid;
  gap: 2px;
  margin-bottom: 7px;
  padding: 8px;
  border: 1px solid #dfe4dd;
  border-radius: 8px;
  background: #fff;
}

html[data-page="studio"] .layer-effects-intro b {
  font-size: 8px;
}

html[data-page="studio"] .layer-effects-intro small,
html[data-page="studio"] .layer-effects-empty {
  color: #758079;
  font-size: 7px;
  line-height: 1.35;
}

html[data-page="studio"] .layer-effects-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed #d3dad3;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

@media (max-width: 900px) {
  html[data-page="studio"] .layer-tree-list {
    max-height: 260px;
  }
}

/* QR : cadre et motif interne réglables séparément */
html[data-page="studio"] .qr-inner-size-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 8px;
  align-items: center;
  margin: 7px 0;
  padding: 8px;
  border: 1px solid #dce4dc;
  border-radius: 9px;
  background: #fff;
}

html[data-page="studio"] .qr-inner-size-editor[hidden] {
  display: none !important;
}

html[data-page="studio"] .qr-inner-size-editor > span {
  display: grid;
  gap: 1px;
}

html[data-page="studio"] .qr-inner-size-editor b {
  color: #26332e;
  font-size: 8px;
}

html[data-page="studio"] .qr-inner-size-editor small {
  color: #7b8580;
  font-size: 6.5px;
}

html[data-page="studio"] .qr-inner-size-editor output {
  min-width: 38px;
  padding: 4px 6px;
  border-radius: 6px;
  background: #edf3eb;
  color: #244d40;
  text-align: center;
  font-size: 8px;
  font-weight: 900;
}

html[data-page="studio"] .qr-inner-size-editor input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  margin: 1px 0 0 !important;
}

html[data-page="studio"] .layer-height-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 7px;
  margin-bottom: 6px;
  padding: 7px 8px;
  border: 1px solid #e0e4dd;
  border-radius: 9px;
  background: #fff;
}

html[data-page="studio"] .layer-height-row > span {
  align-self: center;
  color: #34423d;
  font-size: 8px;
  font-weight: 800;
}

html[data-page="studio"] .layer-height-row .scale-stepper {
  grid-column: 2;
}

html[data-page="studio"] .layer-height-row input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0 !important;
}

/* Pastilles de couleur explicites dans Palette et Propriétés */
html[data-page="studio"] .editor-card-colors input[type="color"],
html[data-page="studio"] .layer-property-grid input[type="color"],
html[data-page="studio"] .photo-frame-editor input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  width: 32px !important;
  min-width: 32px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 2px !important;
  border: 1px solid #cbd4cc !important;
  border-radius: 7px !important;
  background:
    linear-gradient(45deg,#eef0ec 25%,transparent 25% 75%,#eef0ec 75%) 0 0/8px 8px,
    linear-gradient(45deg,#eef0ec 25%,#fff 25% 75%,#eef0ec 75%) 4px 4px/8px 8px !important;
  box-shadow: 0 1px 2px rgba(20,32,29,.08) !important;
  cursor: pointer;
}

html[data-page="studio"] input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

html[data-page="studio"] input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 4px;
}

html[data-page="studio"] input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: 4px;
}

html[data-page="studio"] .editor-card-colors .color-control {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
}

html[data-page="studio"] .editor-card-colors .color-control .color-reset-mini {
  min-height: 28px;
  padding: 4px 5px !important;
  font-size: 7px !important;
}

html[data-page="studio"] .layer-color-clear-actions{
  display:flex;
  gap:6px;
  margin:0 0 7px;
}
html[data-page="studio"] .layer-color-clear-actions[hidden],
html[data-page="studio"] .layer-color-clear-actions button[hidden]{
  display:none!important;
}
html[data-page="studio"] .layer-color-clear-actions button{
  flex:1;
  min-height:28px;
  border:1px solid #dfe4dc;
  border-radius:8px;
  background:#fff;
  color:#35413e;
  font:750 8px/1 Manrope,sans-serif;
  cursor:pointer;
}
html[data-page="studio"] .layer-color-clear-actions button:hover{
  border-color:#aeb8af;
  background:#f4f7f1;
}

/* Commande multi-frames + facturation administrateur */
.od-frame-picker{display:grid;gap:10px;margin:0 0 14px;padding:12px;border:1px solid #dce3dc;border-radius:14px;background:#f7f9f6}
.od-frame-picker>small{font-size:10px;font-weight:900;letter-spacing:.08em;color:#5f6e67}
.od-frame-picker>div{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px;scrollbar-width:thin}
.od-frame-picker button{display:flex;align-items:center;gap:7px;min-width:max-content;padding:8px 10px;border:1px solid #d7ddd7;border-radius:10px;background:#fff;color:#173f3f;cursor:pointer}
.od-frame-picker button b{display:grid;place-items:center;width:24px;height:24px;border-radius:7px;background:#edf1ed;font-size:10px}
.od-frame-picker button span{max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:800}
.od-frame-picker button.active{border-color:#173f3f;background:#173f3f;color:#fff}
.od-frame-picker button.active b{background:#c9ff4a;color:#173f3f}
.od-invoice-editor{display:grid;gap:14px}
.od-invoice-editor>header{display:flex;align-items:flex-end;justify-content:space-between;gap:16px}
.od-invoice-editor>header small{display:block;margin-bottom:4px;color:#68736e;font-size:10px;font-weight:900;letter-spacing:.08em}
.od-invoice-editor>header h3{margin:0}
.od-invoice-editor>header strong{font-size:24px;color:#173f3f}
.od-invoice-editor>p{margin:0;color:#5e6964;line-height:1.45}
.od-pricing-list{display:grid;gap:7px}
.od-pricing-row{display:grid;grid-template-columns:minmax(0,1fr) 92px 34px auto;align-items:center;gap:8px;padding:8px 10px;border:1px solid #e0e4df;border-radius:11px;background:#fafbf8}
.od-pricing-row>span{display:flex;align-items:center;gap:9px;min-width:0}
.od-pricing-row b{display:grid;place-items:center;flex:0 0 27px;height:27px;border-radius:8px;background:#173f3f;color:#c9ff4a;font-size:10px}
.od-pricing-row em{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:normal;font-size:12px;font-weight:800}
.od-pricing-row input,.od-invoice-mode select{width:100%;border:1px solid #ccd4ce;border-radius:9px;background:#fff;padding:9px;color:#16201e;font:700 13px/1 inherit}
.od-pricing-row i{font-style:normal;font-size:11px;font-weight:900;color:#68736e}
.od-pricing-row .od-split-card{border:1px solid #cbd4ce;border-radius:8px;background:#fff;color:#173f3f;padding:7px 9px;font-size:10px;font-weight:900;cursor:pointer}
.od-invoice-toggle{display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid #d9e0db;border-radius:10px;background:#f7faf6;font-size:11px;font-weight:900;color:#173f3f}
.od-invoice-toggle input{accent-color:#173f3f}
.od-invoice-mode{display:grid;gap:6px;font-size:11px;font-weight:900;color:#39453f}
@media (max-width:680px){
  .od-pricing-row{grid-template-columns:minmax(0,1fr) 78px 30px}
  .od-pricing-row .od-split-card{grid-column:1/-1}
  .od-invoice-editor>header strong{font-size:19px}
}
