/* [6.47.32] Mes palettes + couleur personnalisée (palette-club.js). Bureau : panneau de couleurs-bureau.js (#bease-cb) ;
   téléphone : onglets « Mes palettes » / « Perso » de couleurs-mobile.js (.bcm-pastilles). */

/* ── message discret + Annuler ── */
.bpc-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bease-cmplz-h, 0px) + 92px); z-index: 2147483000;   /* au-dessus de la scène 3D (#main-container interceptait « Annuler », préprod 23/10) */
  display: flex; align-items: center; gap: 12px; max-width: 92vw; background: #1e293b; color: #fff; border-radius: 10px;
  padding: 8px 10px 8px 14px; font: 13px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; box-shadow: 0 6px 24px rgba(0,0,0,.2); }
.bpc-toast .bpc-annuler { border: 0; background: transparent; color: #93c5fd; font-weight: 700; cursor: pointer; min-height: 36px; min-width: 44px; font-size: 13px; }

/* ── pastille de palette : 3 ronds + nom ── */
.bpc-pal { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 10px 4px 6px; border: 2px solid #e5e7eb;
  border-radius: 22px; background: #fff; cursor: pointer; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.2; color: #0f172a; max-width: 180px; }
.bpc-pal.is-on { border-color: #0ea5e9; }
.bpc-ronds { display: inline-flex; }
.bpc-rond { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(15,23,42,.18); margin-left: -4px; }
.bpc-rond:first-child { margin-left: 0; }
.bpc-pal-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bpc-plus { flex: none; min-height: 44px; padding: 0 12px; border: 2px dashed #94a3b8; border-radius: 22px; background: #fff; color: #0f172a; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.2; cursor: pointer; white-space: nowrap; }

/* ── bureau ── */
.bease-cb-on #bease-my-palettes-wrap { display: none !important; }   /* remplacé par « Mes palettes » / « Enregistrer ces couleurs » */
.bpc-mes .bpc-liste { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.bpc-mes .bpc-pal { min-height: 36px; }
.bpc-perso-btn, .bpc-enreg { margin-top: 8px; min-height: 36px; padding: 0 12px; border-radius: 8px; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.2; cursor: pointer; }
.bpc-perso-btn { border: 1px solid #94a3b8; background: #fff; color: #0f172a; }
.bpc-enreg { display: block; width: 100%; border: 1px solid #0f172a; background: #0f172a; color: #fff; }
.bpc-perso { display: none; margin-top: 8px; }
.bpc-perso-ouvert .bpc-perso { display: block; }
.bpc-perso-ouvert .bpc-perso-btn { display: none; }

/* ── bloc couleur personnalisée (bureau et onglet « Perso ») ── */
.bpc-perso-ligne { display: flex; align-items: center; gap: 8px; }
.bpc-perso-grande { flex: none; position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(15,23,42,.25); cursor: pointer; overflow: hidden; }
.bpc-perso-grande input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.bpc-perso-code { flex: 1; min-width: 0; min-height: 40px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 16px; }
.bpc-perso-avert { margin: 6px 0 0; font-size: 12px; line-height: 1.35; color: #92400e; }
.bpc-perso-revenir { margin-top: 4px; min-height: 36px; padding: 0; border: 0; background: none; color: #0369a1; font-weight: 700; font-size: 12px; text-decoration: underline; cursor: pointer; }

/* ── téléphone : onglets « Mes palettes » / « Perso » dans la rangée des pastilles ── */
#bmw-shell.bcm-perso .bcm-pastilles { display: block !important; overflow: visible !important; white-space: normal !important; padding: 4px 2px; }
#bmw-shell.bcm-perso .bpc-perso-avert { font-size: 11px; }

/* ── « Quelles couleurs ? » ── */
.bpc-choix { position: fixed; inset: 0; z-index: 100001; background: rgba(15,23,42,.45); display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 769px) { .bpc-choix { align-items: center; } }
.bpc-choix-boite { width: min(420px, 100%); max-height: 80vh; overflow: auto; background: #fff; border-radius: 14px 14px 0 0; padding: 16px; box-shadow: 0 -6px 30px rgba(0,0,0,.2); }
@media (min-width: 769px) { .bpc-choix-boite { border-radius: 14px; } }
.bpc-choix-titre { margin: 0 0 10px; font-size: 16px; font-weight: 800; color: #0f172a; }
/* Maquette « Ouverture — Quelles couleurs ? » (Eric 23/10) : fenêtre 560 px, grille de 3, pied « Aucune… » | « Appliquer ». */
@media (min-width: 769px) { .bpc-choix-boite { width: min(560px, calc(100% - 32px)); padding: 24px; } }
.bpc-choix-titre { font-size: 20px; font-weight: 600; color: #141414; margin-bottom: 4px; }
.bpc-choix-sous { margin: 0 0 16px; font-size: 14px; color: #5B606B; }
.bpc-choix-liste { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bpc-choix-liste .bpc-pal { flex-direction: column; justify-content: center; gap: 6px; min-height: 88px; padding: 12px 8px; border: 1px solid #E4E6EA; border-radius: 12px; background: #fff; }
.bpc-choix-liste .bpc-pal.is-sel { border: 2px solid #141414; }
.bpc-choix-pied { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.bpc-choix-aucune, .bpc-choix-appliquer { min-height: 44px; padding: 0 16px; border-radius: 8px; font-family: inherit; font-size: 14px; cursor: pointer; }
.bpc-choix-aucune { border: 1px solid #D5D8DC; background: #fff; color: #141414; font-weight: 400; }
.bpc-choix-appliquer { border: none; background: #141414; color: #fff; font-weight: 600; padding: 0 20px; }
@media (max-width: 768px) { .bpc-choix-pied > button { flex: 1 1 100%; } }

/* ── enregistrer : en ligne (bureau), en feuille (téléphone) ── */
/* Bureau : le panneau défile jusque sous la barre basse (.bease-bottom-bar, ~65 px) ; sans cette marge le bouton
   « Enregistrer » de la feuille restait caché dessous en 1280×720 (relevé préprod 23/10). */
.bease-panel-content.bease-cb-on { padding-bottom: 88px; }
.bease-panel:has(> .bease-cb-on) { scroll-padding-bottom: 88px; }
.bpc-feuille { margin-top: 8px; }
.bpc-feuille-boite { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bpc-feuille-label { flex-basis: 100%; font-size: 12px; font-weight: 700; color: #334155; }
.bpc-nom { flex: 1; min-width: 0; min-height: 40px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 16px; }
.bpc-feuille-ok { min-height: 40px; padding: 0 14px; border: 0; border-radius: 8px; background: #0f172a; color: #fff; font-weight: 700; cursor: pointer; }
.bpc-feuille-x { min-width: 40px; min-height: 40px; border: 0; background: none; font-size: 22px; color: #64748b; cursor: pointer; }
.bpc-feuille-mobile { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100001; margin: 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  background: #fff; border-radius: 14px 14px 0 0; box-shadow: 0 -6px 30px rgba(0,0,0,.25); }

/* ═══ [6.47.33 lot 2d] retouches d'Eric du 24/10 ═══ */
/* 2. Téléphone : « Couleurs « … » appliquées » sur toute la largeur, juste au-dessus de la barre du bas (bottom posé par
      palette-club.js, placerToast) ; « Annuler » sur une seule ligne. */
.bpc-toast .bpc-annuler { flex: none; white-space: nowrap; }
.bpc-toast > span { min-width: 0; }
@media (max-width: 768px) {
  .bpc-toast { left: 0; right: 0; transform: none; width: auto; max-width: none; border-radius: 0; justify-content: space-between;
    padding: 6px 8px 6px 16px; box-shadow: 0 -4px 16px rgba(0,0,0,.18); }
}
/* 3. Contour du champ actif : noir. Le violet venait du thème (Blocksy : --theme-form-field-border-focus-color =
      --theme-palette-color-1 #7456f1) ; cette feuille n'est chargée qu'avec le configurateur. */
:root { --theme-form-field-border-focus-color: #141414; }
.bpc-nom:focus, .bpc-perso-code:focus, #bdc-overlay input:focus, #bdc-overlay textarea:focus, #bdc-overlay select:focus,
#bpj-overlay input:focus, #bpj-overlay select:focus, #bmw-shell input:focus, #bease-configurator-app input:focus,
#bease-configurator-app select:focus, #bease-configurator-app textarea:focus { border-color: #141414; outline: none; box-shadow: 0 0 0 1px #141414; }
/* 5. Ordinateur : « Enregistrer ces couleurs » = champ « Nom de la palette » + bouton côte à côte (maquette Main). */
.bpc-enreg-bloc .bpc-enreg-ligne { display: flex; flex-wrap: nowrap; gap: 8px; margin: 0; }
.bpc-enreg-ligne .bpc-nom { flex: 1; min-width: 0; min-height: 44px; border: 1px solid #D5D8DC; border-radius: 8px; padding: 0 10px; font-size: 14px; color: #141414; background: #fff; }
.bpc-enreg-ligne .bpc-enreg-ok { flex: none; min-height: 44px; padding: 0 14px; border: 1px solid #141414; border-radius: 8px; background: #fff; color: #141414; font-size: 14px; font-weight: 600; }
.bpc-enreg-ligne .bpc-enreg-ok:disabled { opacity: .6; cursor: default; }
/* 6. « Utilisée pour le maillot » sous la palette retenue par le projet. */
.bpc-choix-liste .bpc-pal-mention { font-size: 11px; font-weight: 400; color: #5B606B; white-space: normal; text-align: center; }
