/* 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;
}
html[data-identity-mode="simple"] .identity-advanced-only {
  display: none !important;
}
html[data-identity-mode="simple"] .upload-grid {
  grid-template-columns: 1fr 1fr !important;
}
.identity-advanced-block {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #dde5e0;
  background: #f7f9f6;
  display: grid;
  gap: 10px;
}
.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"].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;
}

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"] .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;
}

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: 43px !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: 38px !important;
}
html[data-page="studio"] .scaled-card-frame .id-row {
  gap: 24px !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 {
  margin: 20px -38px !important;
}
html[data-page="studio"] .scaled-card-frame .live-card[data-template="ribbon"] .live-content {
  margin-top: 62px !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"] .portrait-tools,
  html[data-page="studio"] .admin-studio-tools,
  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(520px, 94vw);
  padding: 28px 26px 22px;
  border-radius: 22px;
}
.studio-guide-dialog h2 {
  font-size: clamp(26px, 4vw, 34px);
  margin: 8px 0 10px;
  line-height: 1.1;
}
.studio-guide-lead {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.studio-guide-device {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef4e8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #2e5f58;
}
.studio-guide-step b {
  display: block;
  font: 800 16px/1.2 Manrope, sans-serif;
  margin-bottom: 8px;
}
.studio-guide-step p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.studio-guide-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 18px 0 8px;
}
.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: var(--forest);
  width: 22px;
  border-radius: 99px;
}
.studio-guide-actions {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.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 - 24px, 440px);
    padding: 22px 18px 16px;
    border-radius: 18px;
  }
  .studio-guide-dialog h2 {
    font-size: 24px;
  }
}

/* ========== 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);
}

.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-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;
}

.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 {
  display: block !important; width: 100%; min-height: 130px; overflow: hidden;
  background: #dfe2d8; border-bottom: 1px solid #d7dbd1;
}
.hub-project-thumb small, .hub-project-thumb > b { display: none; }
.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;
}

.studio-guide-demo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0 16px;
}
.guide-demo-card {
  position: relative;
  width: 148px;
  height: 92px;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(135deg, #173f3f, #2f5d57);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(23,63,63,.25);
  transition: background .4s ease, transform .4s ease;
}
.guide-demo-card[data-anim="model"] { background: linear-gradient(135deg, #173f3f, #c9ff4a); }
.guide-demo-card[data-anim="identity"] .guide-demo-name { animation: guidePulse 1.2s ease infinite alternate; }
.guide-demo-card[data-anim="frames"] { transform: scale(.96); }
.guide-demo-card[data-anim="adjust"] { box-shadow: 0 0 0 3px #c9ff4a, 0 10px 24px rgba(23,63,63,.25); }
.guide-demo-card[data-anim="order"] { background: linear-gradient(135deg, #0f2c2c, #173f3f); }
.guide-demo-org { display: block; font-size: 9px; font-weight: 800; letter-spacing: .08em; opacity: .8; }
.guide-demo-name { display: block; margin-top: 18px; font-size: 15px; }
.guide-demo-photo {
  position: absolute;
  right: 10px;
  top: 28px;
  width: 36px;
  height: 44px;
  border-radius: 8px;
  background: rgba(255,255,255,.25);
}
.guide-demo-frames { display: flex; gap: 6px; }
.guide-demo-frames i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cfd4c8;
}
.guide-demo-frames i.on { background: #173f3f; box-shadow: 0 0 0 3px rgba(201,255,74,.45); }
@keyframes guidePulse {
  from { opacity: .7; transform: translateY(0); }
  to { opacity: 1; transform: translateY(-2px); }
}

@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;
}
