/* ============================================================
   HBT Design — Configurateur de tableau personnalisé
   ============================================================ */

.cfg-container {
  padding-top: calc(var(--navbar-h, 72px) + 48px);
  padding-bottom: 100px;
}

/* ── En-tête ── */
.cfg-header {
  text-align: center;
  margin-bottom: 52px;
}
.cfg-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: var(--holo-ring, linear-gradient(90deg, #FFD700, #fff, #FFD700));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}
.cfg-subtitle {
  font-size: 14px;
  color: var(--text-subtle, rgba(255,255,255,0.55));
  letter-spacing: 0.5px;
}

/* ── Layout 2 colonnes ── */
.cfg-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}
.cfg-options {
  flex: 1 1 0;
  min-width: 0;
}
.cfg-preview {
  flex: 0 0 300px;
  width: 300px;
}
.cfg-preview__sticky {
  position: sticky;
  top: calc(var(--navbar-h, 72px) + 24px);
}

/* ── Sections ── */
.cfg-section {
  margin-bottom: 40px;
}
.cfg-section__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.cfg-step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.10);
  border: 1px solid rgba(255, 215, 0, 0.30);
  color: #FFD700;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cfg-section__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted, #fff);
}

/* ── Grille motifs ── */
.cfg-motifs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}
.cfg-motif-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s, transform 0.15s;
  padding: 0;
}
.cfg-motif-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.cfg-motif-thumb:hover { border-color: rgba(255, 255, 255, 0.22); transform: scale(1.02); }
.cfg-motif-thumb.selected { border-color: #FFD700; box-shadow: 0 0 0 1px #FFD700; }
.cfg-motif-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0, 0, 0, 0.68);
  font-size: 9px;
  color: #fff;
  padding: 4px 5px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

/* ── Boutons de choix (taille, film) ── */
.cfg-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cfg-choice-btn {
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--text-subtle, rgba(255,255,255,0.55));
  cursor: pointer;
  transition: all 0.2s;
}
.cfg-choice-btn:hover:not(:disabled):not(.disabled) {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.20);
}
.cfg-choice-btn.selected {
  background: rgba(255, 215, 0, 0.12);
  border-color: rgba(255, 215, 0, 0.40);
  color: #FFD700;
}
.cfg-choice-btn:disabled,
.cfg-choice-btn.disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

/* ── Couleur de fond ── */
.cfg-color-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.cfg-color-preview {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
  background: #1a1a2e;
  transition: background 0.15s;
}
.cfg-color-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-subtle, rgba(255,255,255,0.55));
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  transition: background 0.2s;
}
.cfg-color-label:hover { background: rgba(255,255,255,0.08); }
.cfg-color-label input[type="color"] {
  width: 28px; height: 28px;
  border: none; padding: 0;
  background: none; cursor: pointer;
  border-radius: 4px;
}
.cfg-color-hex {
  font-family: monospace;
  font-size: 13px;
  color: var(--text-subtle, rgba(255,255,255,0.55));
  letter-spacing: 0.5px;
}

/* ── Notes ── */
.cfg-hint {
  font-size: 11px;
  color: var(--text-subtle, rgba(255,255,255,0.55));
  margin-top: 8px;
  font-style: italic;
}
.cfg-note {
  font-size: 10px;
  color: var(--text-subtle, rgba(255,255,255,0.4));
  margin-top: 6px;
  font-style: italic;
}
.cfg-loading, .cfg-empty {
  font-size: 13px;
  color: var(--text-subtle, rgba(255,255,255,0.55));
}

/* ── Aperçu (colonne droite) ── */
.cfg-preview__img-wrap {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  position: relative;
}
.cfg-preview__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cfg-preview__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 14px;
  padding: 28px;
  color: rgba(255,255,255,0.20);
}
.cfg-preview__placeholder svg { width: 56px; height: 56px; }
.cfg-preview__placeholder p { font-size: 12px; text-align: center; }

.cfg-preview__info { padding: 20px 0 0; }
.cfg-preview__titre {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-muted, #fff);
  margin-bottom: 14px;
  line-height: 1.4;
}

.cfg-summary-list {
  list-style: none;
  padding: 0; margin: 0 0 18px;
  display: flex; flex-direction: column; gap: 5px;
}
.cfg-summary-item { font-size: 12px; color: var(--text-subtle, rgba(255,255,255,0.55)); }
.cfg-summary-item em { color: var(--text-muted, #fff); font-style: normal; }

.cfg-preview__prix {
  font-size: 32px;
  font-weight: 900;
  color: #FFD700;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}

.cfg-delivery-note {
  font-size: 11px;
  color: var(--text-subtle, rgba(255,255,255,0.45));
  margin: -10px 0 18px;
  font-style: italic;
  letter-spacing: 0.2px;
}

.cfg-cta-btn { width: 100%; }
.cfg-cta-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.cfg-feedback {
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
  min-height: 20px;
}
.cfg-feedback.success { color: #50C878; }
.cfg-feedback.error   { color: #FF5050; }

.cfg-back-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-subtle, rgba(255,255,255,0.55));
  text-decoration: none;
  transition: color 0.2s;
}
.cfg-back-link:hover { color: var(--text-muted, #fff); }

/* ── Panier — pastille couleur configurateur ── */
.cart-item__specs {
  font-size: 12px;
  color: var(--text-subtle, rgba(255,255,255,0.55));
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.cart-item__color-dot {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.15);
  vertical-align: middle;
  flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .cfg-layout { flex-direction: column-reverse; gap: 32px; }
  .cfg-preview { flex: none; width: 100%; }
  .cfg-preview__sticky { position: static; }
  .cfg-preview__img-wrap { max-width: 320px; margin: 0 auto; }
}

@media (max-width: 600px) {
  .cfg-motifs-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
  .cfg-choice-btn { padding: 9px 16px; font-size: 12px; }
}
