/* =================================================================
   theme-picker.css - Selecteur de theme (roues de couleurs)
   Porte depuis Team-UP. Permet de changer accent + fond a la volee.
   2 roues HSV (accent / fond) + fonds auto + presets + palette + preview.

   Structure : .theme-layout > .theme-controls (gauche) + .theme-right (preview)
   ================================================================= */

.theme-layout { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }

.theme-controls {
  width: 620px;
  min-width: 420px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tc-section-title {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 12px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.tc-wheels-row { display: flex; gap: 42px; align-items: flex-start; flex-wrap: wrap; }
.tc-wheel-col { display: flex; flex-direction: column; gap: 8px; }

.wheel-wrap { position: relative; flex-shrink: 0; }
.wheel-wrap canvas { cursor: crosshair; border-radius: 50%; }

.wheel-hex { display: flex; align-items: center; gap: 4px; margin-top: 8px; justify-content: center; }
.wheel-hex-hash { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.wheel-hex input {
  width: 72px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 8px;
  outline: none;
  text-align: center;
  text-transform: uppercase;
}
.wheel-hex input:focus { border-color: var(--accent); }

.tc-fond-row { display: flex; gap: 12px; align-items: flex-start; }
.tc-fond-auto { flex: none; }
.tc-fond-manual { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.tc-fond-manual .tc-sub-title,
.tc-fond-auto .tc-sub-title {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 8px;
}

.auto-swatches { display: grid; grid-template-columns: repeat(3, 46px); gap: 4px; }
.auto-swatch {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.auto-swatch:hover { border-color: var(--accent); transform: scale(1.04); }
.auto-swatch.selected { border-color: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.auto-swatch .as-top { flex: 1; }
.auto-swatch .as-bot { flex: 1; display: flex; }
.auto-swatch .as-surface { flex: 1; }
.auto-swatch .as-card { flex: 2; }
.auto-swatch .as-name {
  position: absolute;
  bottom: 3px;
  left: 0; right: 0;
  text-align: center;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.presets-row { display: flex; gap: 6px; flex-wrap: wrap; }
.preset-btn {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  border: 2px solid transparent;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
}
.preset-btn:hover { border-color: #fff; transform: scale(1.06); }

.theme-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.theme-actions .theme-act-btn { flex: 1; text-align: center; justify-content: center; }

.palette-strip { display: flex; gap: 2px; border-radius: 8px; overflow: hidden; height: 28px; }
.palette-strip-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all 0.15s;
  cursor: default;
  position: relative;
}
.palette-strip-item:hover { flex: 1.5; }
.palette-strip-item .ps-label {
  opacity: 0;
  transition: opacity 0.15s;
  position: absolute;
  font-size: 8px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.palette-strip-item:hover .ps-label { opacity: 1; }

/* === Slider intensite glass === */
.tc-glass-row { display: flex; align-items: center; gap: 12px; }
.tc-glass-row input[type="range"] { flex: 1; accent-color: var(--accent); cursor: pointer; }
.tc-glass-val { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); min-width: 38px; text-align: right; }

/* === Image de fond === */
.tc-bg-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tc-bg-status { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* === Preview live (cote droit) === */
.theme-right {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
}
.theme-right-title {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 12px;
}
.preview-container {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pv-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.pv-logo {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-on, #fff);
  box-shadow: 0 2px 8px var(--accent-glow);
  overflow: hidden;
}
.pv-title { flex: 1; font-size: 13px; font-weight: 600; color: var(--text); }
.pv-title strong { color: var(--accent); }
.pv-btn-tb {
  width: 24px; height: 24px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-icon);
  font-size: 10px;
  color: var(--text-muted);
}
.pv-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.pv-panel-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.pv-panel-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 5px; }
.pv-text-primary { font-size: 12px; color: var(--text); }
.pv-text-secondary { font-size: 11px; color: var(--text-dim); }
.pv-text-tertiary { font-size: 10px; color: var(--text-muted); }
.pv-text-accent { font-size: 12px; color: var(--accent); font-weight: 600; }
.pv-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pv-badge { font-size: 9px; font-weight: 600; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.pv-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font);
  font-size: 11px;
  padding: 6px 10px;
  outline: none;
}
.pv-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pv-card:hover { border-color: var(--accent); box-shadow: var(--shadow-glow); }
.pv-card-name { font-size: 13px; font-weight: 600; color: var(--accent); }
.pv-card-role { font-size: 10px; color: var(--text-muted); font-style: italic; }
.pv-tags { display: flex; gap: 4px; margin-top: 3px; }
.pv-tag {
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--accent-alpha);
  color: var(--accent);
  border: 1px solid var(--accent-glow);
}
.pv-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.pv-table th {
  padding: 6px 10px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  text-align: left;
  background: var(--bg-elevated);
  border-bottom: 2px solid var(--border);
}
.pv-table td {
  padding: 5px 10px;
  font-size: 11px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.pv-table tr:hover td { background: var(--bg-card-hover); }
