:root {
  --bg-page: #20242D;
  --bg-panel: #30343D;
  --bg-input: #252932;
  --primary: #4B5160;
  --cyan: #DADDE4;
  --gold: #C1C6D0;
  --violet: #A9ABB2;
  --text-main: #E5E7EB;
  --text-muted: #A9ABB2;
  --border: rgba(169, 171, 178, 0.24);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top right, rgba(169, 171, 178, 0.08), transparent 42%), var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.45;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: linear-gradient(180deg, #2A2E38 0%, #242831 100%);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  flex-wrap: wrap;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.topbar-brand strong { color: var(--gold); }

.demo-env-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(217, 164, 65, 0.16);
  border: 1px solid rgba(217, 164, 65, 0.5);
  color: #FDE68A;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-ui {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.btn-ui:hover { border-color: var(--cyan); }
.btn-ui.primary { background: var(--primary); border-color: var(--cyan); color: #fff; }
.btn-ui.gold { background: rgba(217, 164, 65, 0.18); border-color: var(--gold); color: #FDE68A; }

.profile-shell {
  width: 100%;
  max-width: 100%;
  margin: 14px auto 40px;
  padding: 0 clamp(18px, 2.2vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Hero Banner + Identity Card — jamais d'écrêtage de l'avatar */
.profile-hero-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: visible;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
}

.profile-banner {
  position: relative;
  min-height: 190px;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(169, 171, 178, 0.25);
  transition: background 0.35s ease;
}

.banner-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(32, 36, 45, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #E2E8F0;
}

.banner-customizer {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  background: rgba(32, 36, 45, 0.78);
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(169, 171, 178, 0.25);
}

.banner-customizer span {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.banner-swatch {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(37, 41, 50, 0.9);
  color: #CBD5E1;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.banner-swatch.active {
  background: var(--primary);
  border-color: var(--cyan);
  color: #fff;
}

.profile-hero-card {
  --avatar-size: 140px;
}

.profile-hero-stage {
  position: relative;
  min-height: 196px;
  overflow: visible;
  border-radius: 18px 18px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 12px 22px 16px;
}

.profile-hero-stage .profile-banner {
  position: absolute;
  inset: 0;
  height: 100%;
  min-height: 100%;
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  z-index: 0;
}

/* Voile dégradé Graphite & Argent discret sur la bannière pour garantir la lisibilité */
.profile-hero-stage .profile-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(32, 36, 45, 0.72) 0%,
    rgba(37, 41, 50, 0.62) 48%,
    rgba(32, 36, 45, 0.80) 100%
  );
}

.profile-stage-toolbar {
  position: relative;
  z-index: 6;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 0 8px;
  pointer-events: none;
}

.profile-hero-content {
  position: relative;
  z-index: 4;
  padding-left: calc(var(--avatar-size, 140px) + 40px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.profile-hero-card.is-editing-layout .profile-hero-content {
  pointer-events: none;
  opacity: 0.42;
}

.profile-stage-toolbar > * {
  pointer-events: auto;
}

.stage-edit-btn {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

.layout-edit-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(32, 36, 45, 0.88);
  border: 1px solid rgba(169, 171, 178, 0.55);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
}

.layout-edit-hint {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--cyan);
  padding: 0 4px;
}

.profile-hero-card.is-editing-layout .profile-hero-stage {
  outline: 2px dashed rgba(169, 171, 178, 0.45);
  outline-offset: -4px;
}

.profile-identity-row {
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.avatar-slot-wrap {
  position: absolute;
  left: 24px;
  top: 28px;
  width: var(--avatar-size, 140px);
  max-width: calc(100% - 16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 5;
}

.profile-hero-card.is-editing-layout .avatar-slot-wrap {
  cursor: move;
  touch-action: none;
  user-select: none;
}

.avatar-ring {
  position: relative;
  width: var(--avatar-size, 140px);
  height: var(--avatar-size, 140px);
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  padding: 4px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-hero-card.is-editing-layout .avatar-ring {
  outline: 2px dashed #C7CAD1;
  outline-offset: 4px;
  touch-action: none;
}

.avatar-resize-handle {
  display: none;
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #C7CAD1;
  border: 2px solid #20242D;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
  z-index: 6;
  touch-action: none;
}

.profile-hero-card.is-editing-layout .avatar-resize-handle {
  display: block;
}

.avatar-resize-handle.nw { top: -8px; left: -8px; cursor: nwse-resize; }
.avatar-resize-handle.ne { top: -8px; right: -8px; cursor: nesw-resize; }
.avatar-resize-handle.sw { bottom: -8px; left: -8px; cursor: nesw-resize; }
.avatar-resize-handle.se { bottom: -8px; right: -8px; cursor: nwse-resize; }

.avatar-ring.frame-prestige {
  background: linear-gradient(135deg, #D9A441, #FEF08A, #B45309);
  box-shadow: 0 0 22px rgba(217, 164, 65, 0.45);
}

.avatar-ring.frame-holo {
  background: linear-gradient(135deg, #C7CAD1, #A855F7, #F59E0B, #34D399);
  box-shadow: 0 0 24px rgba(169, 171, 178, 0.45);
}

.avatar-core {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: radial-gradient(circle at 30% 25%, #30343D, #20242D);
  border: 2px solid #20242D;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 2rem;
  color: #F8FAFC;
  letter-spacing: 1px;
  container-type: inline-size;
}

.avatar-pseudo-below {
  width: 100%;
  text-align: center;
  font-weight: 800;
  line-height: 1.2;
  color: #F8FAFC;
  overflow-wrap: anywhere;
  margin-top: 2px;
}

.avatar-frame-caption {
  font-size: 0.66rem;
  color: #94A3B8;
  background: rgba(32, 36, 45, 0.85);
  border: 1px dashed rgba(169, 171, 178, 0.35);
  padding: 2px 8px;
  border-radius: 999px;
}

.identity-meta {
  padding-top: 0;
  padding-bottom: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.identity-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.identity-title-line h1 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.role-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(48, 52, 61, 0.90);
  border: 1px solid rgba(169, 171, 178, 0.36);
  color: #E5E7EB;
}

.identity-handle {
  font-size: 1.25rem;
  font-weight: 800;
  color: #F1F2F6;
  letter-spacing: 0.2px;
}

.social-actions-demo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.social-btn-demo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid rgba(169, 171, 178, 0.32);
  background: rgba(48, 52, 61, 0.88);
  color: #E5E7EB;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.social-btn-demo:hover { background: #3A3F4B; border-color: #DADDE4; color: #FFFFFF; }
.social-btn-demo.highlight {
  background: linear-gradient(180deg, #DADDE4 0%, #C1C6D0 100%);
  border-color: #E4E7ED;
  color: #1B1F27;
}
.social-btn-demo.highlight:hover {
  background: linear-gradient(180deg, #E5E7ED 0%, #CFD3DC 100%);
  color: #1B1F27;
}

.profile-bio-stats {
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.bio-box {
  background: rgba(37, 41, 50, 0.78);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(169, 171, 178, 0.22);
  border-radius: 12px;
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.bio-box p { font-size: 0.88rem; color: #E5E7EB; line-height: 1.45; }

.frame-preview-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.frame-pill {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: var(--bg-input);
  color: #CBD5E1;
  font-size: 0.72rem;
  cursor: pointer;
}

.frame-pill.active { border-color: var(--gold); color: #FDE68A; background: rgba(217, 164, 65, 0.14); }

/* Barre horizontale compacte sous la bannière : formule + biographie + compteurs */
.profile-meta-strip {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 20px;
  background: #252932;
  border-top: 1px solid rgba(169, 171, 178, 0.20);
  border-radius: 0 0 18px 18px;
}

.profile-meta-strip-left {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-strip-bio {
  margin: 0;
  flex: 1 1 240px;
  min-width: 0;
  font-size: 0.85rem;
  color: #E5E7EB;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.stats-grid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.stat-card {
  background: #30343D;
  border: 1px solid rgba(169, 171, 178, 0.22);
  border-radius: 10px;
  padding: 5px 12px;
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
}

.stat-val { font-size: 0.96rem; font-weight: 800; color: #F1F2F6; font-variant-numeric: tabular-nums; }
.stat-lbl { font-size: 0.72rem; color: #A9ABB2; }

/* Tabs & Filters */
.profile-content-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-tabs-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(169, 171, 178, 0.2);
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.ptabs { display: flex; gap: 8px; flex-wrap: wrap; }

.ptab {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(32, 36, 45, 0.55);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.ptab.active {
  background: var(--primary);
  border-color: var(--cyan);
  color: #fff;
}

.filters-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.album-pills, .model-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-pill {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: var(--bg-input);
  color: #CBD5E1;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-pill.active {
  background: rgba(169, 171, 178, 0.16);
  border-color: var(--cyan);
  color: #fff;
}

.filter-pill.future-album {
  border-style: dashed;
  border-color: rgba(217, 164, 65, 0.45);
  color: #FDE68A;
}

/* Collector Cards Gallery — dimensions réelles alignées sur la Grande Galerie Collector (~164x230px, ratio 5:7) */
.cards-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 182px);
  justify-content: start;
  gap: 16px;
}

.gallery-card-item {
  width: 182px;
  max-width: 182px;
  background: linear-gradient(145deg, #333741, #2D313B);
  border: 1px solid rgba(169, 171, 178, 0.24);
  border-radius: 12px;
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.gallery-card-item:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
}

.collector-card-57 {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 7;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.48);
}

.collector-card-57.model-prestige {
  border: 2px solid var(--gold);
  box-shadow: inset 0 0 0 2px rgba(217, 164, 65, 0.42), 0 10px 22px rgba(0, 0, 0, 0.48);
}

.collector-card-57.model-signature {
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, #C7CAD1, #A855F7, #F59E0B, #34D399) 1;
}

.collector-card-57 img.card-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collector-card-57 .card-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 18, 0.15) 0%, transparent 40%, rgba(6, 10, 18, 0.92) 100%);
}

.collector-card-57 .card-meta-overlay {
  position: relative;
  z-index: 2;
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-model-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 3;
  font-size: 0.56rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(32, 36, 45, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #F8FAFC;
}

.card-title-preview { font-size: 0.78rem; font-weight: 800; color: #F8FAFC; letter-spacing: 0.2px; line-height: 1.2; }
.card-sub-preview { font-size: 0.62rem; color: #CBD5E1; line-height: 1.2; }

.card-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.58rem;
  color: #A9ABB2;
}

.gallery-item-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
}

.gallery-item-foot .demo-like-btn,
.gallery-item-foot .btn-ui {
  padding: 4px 7px;
  border-radius: 7px;
  border: 1px solid rgba(169, 171, 178, 0.30);
  background: var(--bg-input);
  color: #E5E7EB;
  font-size: 0.66rem;
  line-height: 1.15;
  white-space: nowrap;
  cursor: pointer;
}

/* About Tab */
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.about-card {
  background: rgba(32, 36, 45, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.about-card h3 { font-size: 0.92rem; color: var(--cyan); }
.about-card p, .about-card li { font-size: 0.82rem; color: #CBD5E1; line-height: 1.5; }
.about-card ul { padding-left: 18px; }

/* Card Inspection Modal (Recto / Verso) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.84);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 60;
}

.modal-backdrop.open { display: flex; }

.inspect-dialog {
  width: 100%;
  max-width: 760px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75);
}

.inspect-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.inspect-body {
  padding: 20px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  align-items: start;
}

.inspect-stage {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 5 / 7;
  margin: 0 auto;
}

.verso-common-preview {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(155deg, #061022 0%, #0C1E3E 52%, #050C1A 100%);
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, #C7CAD1 0%, #A855F7 48%, #F59E0B 100%) 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.verso-common-preview .vh { display: flex; justify-content: space-between; align-items: center; font-size: 0.56rem; font-weight: 800; color: #CBD5E1; border-bottom: 1px solid rgba(169, 171, 178,0.22); padding-bottom: 4px; }
.verso-common-preview .vpill { padding: 2px 6px; border-radius: 999px; background: rgba(217,164,65,0.18); border: 1px solid rgba(217,164,65,0.55); color: #FDE68A; font-size: 0.5rem; }
.verso-common-preview .vhero { text-align: center; }
.verso-common-preview .vhero strong { display: block; font-size: 0.84rem; letter-spacing: 0.9px; }
.verso-common-preview .vhero span { display: inline-block; margin-top: 2px; font-size: 0.52rem; padding: 2px 8px; border-radius: 999px; background: rgba(169, 171, 178,0.14); border: 1px solid rgba(169, 171, 178,0.42); color: #7DD3FC; }
.verso-common-preview .vtbl { background: rgba(11,22,42,0.75); border: 1px solid rgba(148,163,184,0.2); border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; gap: 3px; font-size: 0.6rem; }
.verso-common-preview .vrow { display: flex; justify-content: space-between; gap: 6px; border-bottom: 1px solid rgba(148,163,184,0.12); padding-bottom: 2px; }
.verso-common-preview .vrow:last-child { border-bottom: none; padding-bottom: 0; }
.verso-common-preview .vrow span:first-child { color: #94A3B8; }
.verso-common-preview .vsec { background: rgba(11,22,42,0.82); border: 1px solid rgba(169, 171, 178,0.2); border-radius: 8px; padding: 6px; font-size: 0.56rem; color: #94A3B8; display: flex; flex-direction: column; gap: 4px; }
.verso-common-preview .vslots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.verso-common-preview .vslots span { text-align: center; padding: 2px 4px; border-radius: 4px; border: 1px dashed rgba(217,164,65,0.38); color: #CBD5E1; font-size: 0.5rem; }
.verso-common-preview .vfoot { text-align: center; font-size: 0.52rem; color: #94A3B8; border-top: 1px solid rgba(169, 171, 178,0.18); padding-top: 4px; }

.inspect-side-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.inspect-info { display: flex; flex-direction: column; gap: 10px; font-size: 0.84rem; color: #CBD5E1; }

.demo-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 80;
  background: #20242D;
  border: 1px solid var(--cyan);
  color: #F8FAFC;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.2s ease;
}

.demo-toast.show { opacity: 1; transform: translateY(0); }

/* Sélecteur Gratuit / Premium & Studio Avatar */
.tier-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
}
.tier-btn {
  padding: 5px 11px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}
.tier-btn.active { background: var(--primary); color: #fff; }
.tier-btn.active.premium { background: linear-gradient(135deg, #D9A441, #B45309); color: #20242D; }

.avatar-core {
  position: relative;
  overflow: hidden;
}
.avatar-core img.avatar-custom-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center center;
  pointer-events: none;
}
.avatar-core .avatar-custom-text {
  position: absolute;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: none;
  line-height: 1.1;
  font-weight: 800;
  font-size: 18cqw;
  z-index: 2;
}

.avatar-controls-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.avatar-lock-note {
  padding: 8px 11px;
  border-radius: 9px;
  background: rgba(217, 164, 65, 0.12);
  border: 1px solid rgba(217, 164, 65, 0.42);
  color: #FDE68A;
  font-size: 0.76rem;
  line-height: 1.4;
}
.frame-pill.is-locked {
  opacity: 0.65;
  border-style: dashed;
}

.avatar-studio-dialog {
  width: 100%;
  max-width: 780px;
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.78);
}
.avatar-studio-body {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.avatar-studio-preview-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.avatar-studio-ring {
  width: 240px;
  height: 240px;
  border-radius: 20px;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  user-select: none;
}
.avatar-studio-ring .avatar-core {
  border-radius: 15px;
  cursor: grab;
  font-size: 3.4rem;
}
.avatar-studio-ring .avatar-core:active { cursor: grabbing; }
.drag-mode-pills {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.studio-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}
.studio-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.76rem;
  color: var(--text-muted);
  min-width: 0;
}
.studio-field input,
.studio-field select {
  max-width: 100%;
  min-width: 0;
  width: 100%;
}
.studio-field.full { grid-column: 1 / -1; }
.studio-field input[type="text"],
.studio-field select {
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 0.8rem;
}
.studio-field input[type="color"] {
  width: 100%;
  height: 32px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: var(--bg-input);
  cursor: pointer;
}

@media (max-width: 960px) {
  .cards-gallery-grid { grid-template-columns: repeat(auto-fill, 174px); justify-content: start; gap: 14px; }
  .gallery-card-item { width: 174px; max-width: 174px; }
  .profile-bio-stats { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .topbar { padding: 10px 14px; }
  .profile-shell { padding: 0 12px; margin-top: 14px; }
  .profile-hero-stage { padding: 14px; min-height: auto; gap: 12px; }
  .profile-hero-stage .avatar-slot-wrap {
    position: relative;
    left: auto !important;
    top: auto !important;
    margin: 0 auto;
  }
  .profile-hero-content { padding-left: 0; }
  .profile-stage-toolbar { padding: 0; justify-content: flex-end; }
  .layout-edit-bar { width: 100%; justify-content: flex-start; }
  .profile-identity-row {
    padding: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .profile-bio-stats { padding: 0; }
  .profile-meta-strip { padding: 10px 14px; gap: 10px; }
  .stats-grid { width: 100%; justify-content: flex-start; }
  .profile-content-panel { padding: 14px; }
  .cards-gallery-grid { grid-template-columns: repeat(2, minmax(0, 174px)); justify-content: center; gap: 10px; }
  .gallery-card-item { width: 100%; max-width: 174px; padding: 7px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inspect-body { grid-template-columns: 1fr; }
  .avatar-studio-body { grid-template-columns: 1fr; }
  .avatar-studio-ring { width: 210px; height: 210px; }
  .studio-controls { grid-template-columns: 1fr; }
  .upsell-plans-grid { grid-template-columns: 1fr; }
}

/* Modale de présentation Premium */
.upsell-dialog {
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(160deg, #20242D 0%, #252932 55%, #20242D 100%);
  border: 1px solid rgba(217, 164, 65, 0.55);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.82), 0 0 36px rgba(169, 171, 178, 0.25);
}
.upsell-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(217, 164, 65, 0.22);
}
.upsell-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(217, 164, 65, 0.18);
  border: 1px solid rgba(217, 164, 65, 0.55);
  color: #FDE68A;
}
.upsell-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.upsell-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #F8FAFC;
}
.upsell-sub {
  font-size: 0.9rem;
  color: #BAE6FD;
}
.upsell-feature-ctx {
  font-size: 0.76rem;
  color: #FDE68A;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(217, 164, 65, 0.10);
  border: 1px solid rgba(217, 164, 65, 0.28);
}
.upsell-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.upsell-benefits li {
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(32, 36, 45, 0.65);
  border: 1px solid rgba(169, 171, 178, 0.2);
  font-size: 0.82rem;
  color: #E2E8F0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.upsell-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(169, 171, 178, 0.15);
  color: #7DD3FC;
}
.upsell-tag.future {
  background: rgba(148, 163, 184, 0.16);
  color: #CBD5E1;
}
.upsell-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.upsell-plans-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.upsell-plan-card {
  padding: 14px;
  border-radius: 12px;
  background: rgba(32, 36, 45, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.8rem;
  color: #CBD5E1;
}
.upsell-plan-card.premium {
  border-color: rgba(217, 164, 65, 0.6);
  background: linear-gradient(155deg, rgba(217, 164, 65, 0.10), rgba(32, 36, 45, 0.85));
}

/* Zone de démonstration & tests (séparée du profil public) */
.demo-test-zone {
  margin-top: 22px;
  padding: 18px 20px;
  background: rgba(13, 24, 41, 0.72);
  border: 1px dashed rgba(217, 164, 65, 0.45);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.demo-zone-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.demo-zone-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}
.demo-zone-note {
  margin: 0;
  font-size: 0.78rem;
  color: #FDE68A;
  background: rgba(217, 164, 65, 0.10);
  border: 1px solid rgba(217, 164, 65, 0.28);
  border-radius: 10px;
  padding: 9px 12px;
  line-height: 1.45;
}
.demo-zone-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.demo-zone-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.demo-zone-controls .banner-customizer {
  position: static;
  background: rgba(32, 36, 45, 0.55);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
}
.layout-customizer-row {
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}
.layout-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.layout-group > span {
  font-size: 0.74rem;
  color: var(--text-muted);
}
.layout-preview-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(169, 171, 178, 0.12);
  border: 1px solid rgba(169, 171, 178, 0.35);
  color: var(--cyan);
}
.layout-preview-badge.unsaved {
  background: rgba(217, 164, 65, 0.15);
  border-color: rgba(217, 164, 65, 0.5);
  color: #FDE68A;
}

/* Étape 2 — Session centrale, bannière non connecté & modale d'édition du profil */
.session-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #CBD5E1;
}
.session-pill.is-authed {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.45);
  color: #6EE7B7;
}
.session-pill.is-premium {
  background: rgba(217, 164, 65, 0.18);
  border-color: rgba(217, 164, 65, 0.55);
  color: #FDE68A;
}
.session-pill.is-admin {
  background: rgba(57, 123, 219, 0.18);
  border-color: rgba(57, 123, 219, 0.55);
  color: #93C5FD;
}

.auth-required-card {
  background: var(--bg-panel);
  border: 1px solid rgba(169, 171, 178, 0.38);
  border-radius: 16px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
}
.auth-required-card h2 {
  font-size: 1.15rem;
  color: #F8FAFC;
}
.auth-required-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.auth-required-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-edit-dialog {
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.78);
}
.profile-edit-form {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.profile-edit-form textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  background: #20242D;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 9px 11px;
  font-family: inherit;
  font-size: 0.84rem;
}
.profile-uuid-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: Consolas, monospace;
  word-break: break-all;
}



/* Section privée Date de naissance & Cadeau Anniversaire (propriétaire uniquement) */
.owner-birthday-section {
  margin-top: 18px;
  padding: 20px 22px;
  border: 1px solid rgba(57, 123, 219, 0.45);
  border-radius: 15px;
  background: rgba(37, 41, 50, 0.85);
}

.owner-birthday-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.owner-birthday-head h3 {
  margin: 0;
  font-size: 16px;
  color: #e8ebf0;
}

.owner-birthday-sub {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: #94a3b8;
}

.owner-birthday-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.owner-birthday-box {
  background: rgba(32, 36, 45, 0.65);
  border: 1px solid rgba(169, 171, 178, 0.4);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.owner-birthday-box h4 {
  margin: 0;
  font-size: 14px;
  color: #e8ebf0;
}

.owner-birthday-hint {
  margin: 0;
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.45;
}

.owner-birthdate-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.owner-date-input {
  color-scheme: dark;
  background: #252932;
  border: 1px solid #4B5262;
  color: #e8ebf0;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
}

.owner-birthdate-display {
  font-size: 16px;
  font-weight: 700;
  color: #e8ebf0;
  font-family: monospace;
}

.btn-primary-sm {
  padding: 8px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #4B5262 0%, #4B5262 100%);
  border: 1px solid #4fb3f6;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary-sm:disabled {
  opacity: 0.65;
  cursor: wait;
}

.owner-birthday-msg {
  font-size: 12px;
  font-weight: 600;
}

.owner-birthday-msg.is-error {
  color: #f87171;
}

.owner-birthday-msg.is-ok {
  color: #4ade80;
}

.owner-gift-countdown {
  font-size: 13px;
  font-weight: 700;
  color: #4fb3f6;
  font-family: monospace;
}

.owner-gift-confirmed {
  color: #4ade80;
  font-weight: 600;
  font-size: 13px;
}

.owner-gift-expired {
  color: #f87171;
  font-weight: 600;
  font-size: 13px;
}

@media (max-width: 820px) {
  .owner-birthday-grid {
    grid-template-columns: 1fr;
  }
}


/* ============================================================================
 * STUDIO DE PERSONNALISATION POUR TOUS LES PROFILS COLLECTIONNEURS (PHASE 2B/2C)
 * ============================================================================ */
.profile-banner {
  position: relative;
  overflow: hidden;
}

.public-studio-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: var(--pub-bg-fit, cover);
  transform: translate(var(--pub-bg-x, 0px), var(--pub-bg-y, 0px)) scale(var(--pub-bg-zoom, 1));
  z-index: 1;
  pointer-events: none;
  display: block;
}

.profile-hero-stage.has-studio-banner {
  min-height: var(--pub-stage-h, 300px);
}

.profile-hero-stage.has-studio-banner .profile-banner {
  height: var(--pub-stage-h, 300px);
}

.cs-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 10, 13, 0.92);
  backdrop-filter: blur(12px);
  z-index: 2200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cs-modal-overlay.active {
  display: flex;
}

.cs-modal-overlay.is-expanded {
  padding: 8px;
}

.cs-modal {
  background: #101114;
  border: 1px solid #30343c;
  border-radius: 18px;
  width: min(1080px, 95vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.85), 0 0 36px rgba(57, 123, 219, 0.3);
  transition: width 0.2s ease, height 0.2s ease, max-height 0.2s ease;
}

.cs-modal.is-expanded {
  width: min(97vw, 1840px);
  height: 96vh;
  max-height: 96vh;
}

.cs-modal.is-expanded .cs-modal-body {
  padding: 14px 20px;
  gap: 14px;
}

.cs-modal.is-expanded .cs-panel {
  padding: 12px 16px;
  gap: 10px;
}

.cs-modal-header {
  padding: 16px 24px;
  background: #1b1d22;
  border-bottom: 1px solid #30343c;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-shrink: 0;
}

.cs-modal-header h3 {
  margin: 0;
  font-size: 17px;
  color: #e8ebf0;
}

.cs-modal-sub {
  margin: 3px 0 0;
  font-size: 12px;
  color: #9ba3b0;
}

.cs-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cs-modal-body {
  padding: 22px 24px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cs-modal-body > * {
  flex-shrink: 0;
}

.cs-premium-gate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(57, 123, 219, 0.14);
  border: 1px solid #4B5262;
  color: #e8ebf0;
  font-size: 13px;
}

.cs-preview-card {
  background: #1b1d22;
  border: 1px solid #30343c;
  border-radius: 16px;
  overflow: hidden;
}

.cs-stage-layered {
  position: relative;
  width: 100%;
  height: var(--cs-bg-h, 300px);
  min-height: 180px;
  background: linear-gradient(180deg, #1b1d22 0%, #101114 100%);
  overflow: hidden;
}

.cs-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.cs-stage-layered.no-bg-image .cs-bg-layer {
  display: none;
}

.cs-bg-img {
  width: 100%;
  height: 100%;
  object-fit: var(--cs-bg-fit, cover);
  transform: translate(var(--cs-bg-x, 0px), var(--cs-bg-y, 0px)) scale(var(--cs-bg-zoom, 1));
  display: block;
  user-select: none;
}

.cs-avatar-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.cs-avatar-ring {
  position: absolute;
  left: var(--cs-av-left, 24px);
  top: var(--cs-av-top, 75px);
  width: var(--cs-av-size, 150px);
  height: var(--cs-av-size, 150px);
  border-radius: calc(var(--cs-av-size, 150px) * 0.12 + 6px);
  padding: 5px;
  background: linear-gradient(135deg, #4B5262 0%, #1a2233 100%);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.7), 0 0 22px rgba(57, 123, 219, 0.35);
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.cs-avatar-ring.is-dragging {
  cursor: grabbing;
}

.cs-avatar-ring.frame-prestige {
  background: linear-gradient(135deg, #e8ebf0 0%, #30343c 100%);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.7), 0 0 22px rgba(232, 235, 240, 0.35);
}

.cs-avatar-ring.frame-holo {
  background: linear-gradient(135deg, #2cd07e 0%, #4B5262 50%, #4fb3f6 100%);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(44, 208, 126, 0.4);
}

.cs-avatar-core {
  width: 100%;
  height: 100%;
  border-radius: calc(var(--cs-av-size, 150px) * 0.12);
  background: radial-gradient(circle at 35% 30%, #1b263b 0%, #0d111a 100%);
  border: 3px solid #1b1d22;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  font-size: calc(var(--cs-av-size, 150px) * 0.34);
  overflow: hidden;
}

.cs-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(var(--cs-av-zoom, 1));
  display: block;
}

.cs-online-dot {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2cd07e;
  border: 3px solid #1b1d22;
  box-shadow: 0 0 10px rgba(44, 208, 126, 0.7);
}

.cs-controls-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.cs-controls-grid.is-locked {
  opacity: 0.45;
  pointer-events: none;
}

.cs-panel {
  background: #1b1d22;
  border: 1px solid #30343c;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cs-panel-title {
  margin: 0;
  font-size: 14.5px;
  color: #e8ebf0;
  padding-bottom: 10px;
  border-bottom: 1px solid #30343c;
}

.cs-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cs-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: #9ba3b0;
}

.cs-hint {
  font-size: 11px;
  color: #6e7684;
}

.cs-dual {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #101114;
  border: 1px solid #30343c;
  border-radius: 8px;
  padding: 7px 12px;
}

.cs-dual input[type="range"] {
  flex: 1;
  accent-color: #4B5262;
}

.cs-num {
  width: 72px;
  background: #1b1d22;
  border: 1px solid #30343c;
  color: #e8ebf0;
  text-align: center;
  padding: 4px 6px;
  border-radius: 6px;
  font-family: monospace;
  font-weight: 700;
}

.cs-unit {
  font-size: 12px;
  color: #6e7684;
  font-family: monospace;
}

.cs-btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cs-btn-upload {
  background: rgba(57, 123, 219, 0.16);
  border: 1px solid #4B5262;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.cs-btn-sm {
  background: #101114;
  border: 1px solid #30343c;
  color: #9ba3b0;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.cs-btn-sm.danger:hover {
  border-color: #ef4444;
  color: #ef4444;
}

.cs-check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #e8ebf0;
  margin-top: 4px;
  cursor: pointer;
}

.cs-check-label input {
  accent-color: #4B5262;
}

.cs-opts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 8px;
}

.cs-opt {
  background: #101114;
  border: 1px solid #30343c;
  color: #9ba3b0;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.cs-opt.active {
  border-color: #4B5262;
  background: rgba(57, 123, 219, 0.16);
  color: #ffffff;
}

.cs-opt.is-locked-frame {
  opacity: 0.62;
  border-style: dashed;
  color: #8f98a6;
}

.cs-opt.is-locked-frame:hover {
  border-color: #4B5262;
  color: #e8ebf0;
}

.cs-modal-footer {
  padding: 14px 24px;
  background: #1b1d22;
  border-top: 1px solid #30343c;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.cs-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cs-btn-secondary {
  background: #101114;
  border: 1px solid #30343c;
  color: #e8ebf0;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.cs-btn-primary {
  background: linear-gradient(135deg, #4B5262 0%, #4B5262 100%);
  border: 1px solid #4fb3f6;
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

@media (max-width: 820px) {
  .cs-controls-grid {
    grid-template-columns: 1fr;
  }
  .profile-hero-stage.has-studio-banner,
  .profile-hero-stage.has-studio-banner .profile-banner {
    min-height: 200px;
    height: min(var(--pub-stage-h, 300px), 58vw);
  }
}


/* === Finition Graphite & Argent (Refonte globale) === */
.demo-env-pill {
  background: #30343D !important;
  border-color: rgba(169, 171, 178, 0.36) !important;
  color: #E5E7EB !important;
}
.card,
.panel,
.auth-gate-card,
.profile-card {
  background: linear-gradient(145deg, #333741, #2D313B);
  border-color: rgba(169, 171, 178, 0.26);
}
.btn-primary {
  background: linear-gradient(180deg, #DADDE4 0%, #C1C6D0 100%);
  color: #1B1F27;
  border: 1px solid #E4E7ED;
}
