/* ──────────────────────────────────────────────────────────────
   Screen: Personnalisation (éditeur de thème)
   Extrait du mono-fichier index.html (J3). Regroupe :
   - Preview de la carte (.theme-preview + .preview-*)
   - Sections et champs (.theme-section, .color-row, .color-field)
   - Presets (.preset-row, .btn-preset, .btn-preset-active, .btn-preset-special, .preset-dot)
   - Bouton reset (.btn-reset)
   ────────────────────────────────────────────────────────────── */

.theme-preview {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  position: relative;
}


.preview-header {
  background: linear-gradient(145deg, var(--pv-from, #1C1C1E) 0%, var(--pv-to, #3A3A3C) 100%);
  padding: 18px 16px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.3s;
  position: relative;
  overflow: hidden;
}

.preview-header-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--pv-text, #fff);
  letter-spacing: -0.3px;
}

.preview-body {
  background: #F2F2F7;
  padding: 14px 16px;
  position: relative;
}

.preview-body > *:not(#preview-bg-image) {
  position: relative;
  z-index: 1;
}

.preview-bar-track {
  height: 6px;
  background: #E5E5EA;
  border-radius: 999px;
  overflow: hidden;
}

.preview-bar-fill {
  height: 100%;
  width: 60%;
  border-radius: 999px;
  background: var(--pv-accent, #007AFF);
  transition: background 0.3s;
}

.theme-section { margin-bottom: 18px; }

.theme-section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.color-row {
  display: flex;
  gap: 12px;
}

.color-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--secondary);
  font-weight: 500;
  cursor: pointer;
}

.color-field input[type="color"] {
  width: 100%;
  height: 40px;
  border: 1.5px solid var(--separator);
  border-radius: 10px;
  padding: 3px 4px;
  background: #fff;
  cursor: pointer;
}

/* ── Presets ── */
.preset-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.btn-preset {
  padding: 8px 14px;
  border: 1.5px solid var(--separator);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  background: var(--card);
  color: var(--primary);
  transition: border-color 0.15s, box-shadow 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-preset:hover { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(0,102,255,0.1); }

.btn-preset-active {
  border-color: var(--blue) !important;
  background: rgba(0,102,255,0.06) !important;
  box-shadow: 0 0 0 3px rgba(0,102,255,0.12) !important;
}
.btn-preset-active::after {
  content: '✓';
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  margin-left: 2px;
}

.btn-preset-special {
  border-color: rgba(212,175,55,0.35);
  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(255,245,220,0.6));
}
.btn-preset-special:hover {
  border-color: rgba(212,175,55,0.7);
  box-shadow: 0 0 0 2px rgba(212,175,55,0.15);
}

.preset-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.btn-reset {
  width: 100%;
  padding: 12px;
  background: none;
  border: 1.5px solid var(--separator);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  color: var(--secondary);
  margin-top: 8px;
  transition: background 0.15s;
}

.btn-reset:hover { background: var(--bg); }

/* ── Preview enrichie ── */
.preview-pts-label {
  font-size: 10px;
  color: #9CA3AF;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.preview-pts-value {
  font-size: 22px;
  font-weight: 700;
  color: #1C1C1E;
  letter-spacing: -0.5px;
  margin-top: 2px;
}

.preview-reward {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #F0F0F5;
  border-radius: 8px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 500;
  color: #4B5563;
}

.preview-btn-mock {
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
