/* ══════════════════════════════════════════════════════════
   BTP BEATBOX V3 — Nola Remix
   Charte : #E1FF00 / #111 / Manrope
   Tablette-first, style Incredibox
══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;700;800;900&family=Bebas+Neue&display=swap');

/* ── Variables ───────────────────────────────────────── */
:root {
  --y:   #E1FF00;   /* jaune fluo site */
  --b:   #111111;   /* noir */
  --b2:  #1C1C1C;
  --b3:  #252525;
  --bd:  #2E2E2E;   /* bordure */
  --g:   #666666;   /* gris */
  --w:   #FFFFFF;
  --r:   6px;
  --r2:  12px;
  --font:'Manrope', sans-serif;
  --fontd:'Bebas Neue', sans-serif;

  /* Taille des slots (adaptable) */
  --slot-size: 150px;
  --img-size:  90px;
}

/* ── Reset ───────────────────────────────────────────── */
.bbx-wrap *, .bbx-wrap *::before, .bbx-wrap *::after {
  box-sizing: border-box; margin:0; padding:0;
}
.bbx-wrap {
  font-family: var(--font);
  background: var(--b);
  color: var(--w);
  max-width: 1100px;
  margin: 0 auto;
  border-radius: var(--r2);
  overflow: hidden;
  position: relative;
  /* Barre jaune top */
  border-top: 5px solid var(--y);
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}

/* ══════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════ */
.bbx-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  background: var(--b);
  border-bottom: 2px solid var(--bd);
  gap: 16px;
  position: relative;
}

.bbx-title-block { line-height: 1; background: #FF5650; padding: 12px 20px; border-radius: var(--r2); }

.bbx-title {
  font-family: var(--fontd);
  font-size: 50px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #D3FF00;
}
.bbx-title span { color: #D3FF00; }

.bbx-subtitle {
  font-size: 8px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--w);
  font-weight: 900;
  margin-top: 3px;
}

/* ── Controls (boutons Play / Stop de part et d'autre du titre) ── */
.bbx-btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--y);
  color: var(--b);
  border: none;
  border-radius: var(--r);
  padding: 16px 28px;
  font-family: var(--font);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: .15s;
  text-decoration: none;
  white-space: nowrap;
  min-width: 130px;
  min-height: 56px;
  flex-shrink: 0;
}
.bbx-btn-play:hover { background: var(--w); }
.bbx-btn-play.active {
  animation: pulse-y .9s ease-in-out infinite alternate;
}
@keyframes pulse-y {
  from { box-shadow: 0 0 0 0 rgba(225,255,0,.6); }
  to   { box-shadow: 0 0 0 10px rgba(225,255,0,0); }
}
.bbx-play-ico { font-size: 18px; }

.bbx-btn-stop {
  background: transparent;
  border: 2px solid var(--bd);
  border-radius: var(--r);
  color: var(--g);
  padding: 16px 28px;
  font-family: var(--font);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  transition: .15s;
  white-space: nowrap;
  min-width: 130px;
  min-height: 56px;
  flex-shrink: 0;
}
.bbx-btn-stop:hover { border-color: var(--w); color: var(--w); }

.bbx-bpm {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--g);
}
.bbx-bpm input[type=range] {
  -webkit-appearance: none;
  width: 80px; height: 3px;
  background: var(--bd);
  border-radius: 2px;
  outline: none;
}
.bbx-bpm input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--y);
  border: 2px solid var(--b);
  cursor: pointer;
}
.bbx-bpm-val {
  font-family: var(--fontd);
  font-size: 22px;
  color: var(--y);
  min-width: 28px;
}

/* ══════════════════════════════════════════════════════
   SCÈNE
══════════════════════════════════════════════════════ */
.bbx-scene {
  background: #1A1A1A;
  border-bottom: 2px solid var(--bd);
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  min-height: 280px;
  position: relative;
}

/* Nola row : PLAY | Nola | STOP */
.bbx-nola-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
}

.bbx-nola-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.bbx-nola {
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(225,255,0,.25));
  animation: nola-float 3s ease-in-out infinite;
}
@keyframes nola-float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.bbx-nola-name {
  font-family: var(--fontd);
  font-size: 25px;
  letter-spacing: 6px;
  color: var(--y);
  background: #FF5650;
  padding: 6px 23px;
  border-radius: 4px;
  text-align: center;
  position: relative;
  margin-top: -10%;
  z-index: 2;
}

/* Hint */
.bbx-scene-hint {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #444;
  text-align: center;
  border: 2px dashed #333;
  border-radius: var(--r2);
  padding: 16px 32px;
  width: 100%;
  max-width: 500px;
}

/* ══════════════════════════════════════════════════════
   SLOTS — 6 pistes en ligne
══════════════════════════════════════════════════════ */
.bbx-slots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.bbx-slot {
  width: var(--slot-size);
  min-height: var(--slot-size);
  border-radius: var(--r2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform .15s;
  user-select: none;
  -webkit-user-select: none;
}

/* Slot vide */
.bbx-slot-empty {
  background: var(--b3);
  border: 2px dashed var(--y);
  gap: 8px;
  touch-action: manipulation;
}
.bbx-slot-empty:hover,
.bbx-slot-empty.drag-over,
.bbx-slot-empty.tap-target {
  background: rgba(225,255,0,.08);
  border-color: var(--y);
  transform: scale(1.04);
}
.bbx-slot-plus {
  font-size: 30px;
  color: var(--y);
  font-weight: 300;
  display: none; /* masqué, on affiche le texte à la place */
}
.bbx-slot-add-lbl {
  font-family: var(--fontd);
  font-size: 16px;
  letter-spacing: 2px;
  color: var(--y);
  text-align: center;
  line-height: 1.4;
}

/* Slot actif */
.bbx-slot-active {
  background: var(--b2);
  border: 2px solid var(--sc, var(--y));
  box-shadow: 0 0 0 0 var(--sc, var(--y));
  transition: box-shadow .3s, transform .15s;
}
.bbx-slot-active.playing {
  animation: slot-glow .7s ease-in-out infinite alternate;
}
@keyframes slot-glow {
  from { box-shadow: 0 0 8px var(--sc,var(--y)); }
  to   { box-shadow: 0 0 22px var(--sc,var(--y)); }
}
.bbx-slot-active.pulse {
  animation: slot-pulse .35s ease;
}
@keyframes slot-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.bbx-slot-active.drag-over { transform: scale(1.06); }

.bbx-slot-img {
  width: var(--img-size);
  height: var(--img-size);
  object-fit: contain;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 8px var(--sc, rgba(225,255,0,.4)));
  pointer-events: none;
}
.bbx-slot-name {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--sc, var(--y));
  text-align: center;
}

.bbx-slot-remove {
  position: absolute;
  top: 5px; right: 5px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,.75);
  border: 1px solid rgba(255,255,255,.2);
  color: var(--w);
  font-size: 10px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .15s;
  z-index: 5;
  line-height: 1;
  padding: 0;
}
.bbx-slot-active:hover .bbx-slot-remove { opacity: 1; }
/* Sur tablette : toujours visible */
@media (hover:none) {
  .bbx-slot-remove { opacity: .7; }
}

/* Bouton rotatif volume par slot */
.bbx-knob {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--b);
  border: 2px solid var(--sc, var(--y));
  position: relative;
  cursor: ns-resize;
  margin-top: 4px;
  flex-shrink: 0;
  touch-action: none;
}
.bbx-knob-track {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--b2);
}
.bbx-knob-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 40%;
  background: var(--sc, var(--y));
  border-radius: 1px;
  transform-origin: bottom center;
  transform: rotate(0deg);
  margin-left: -1px;
  margin-top: -40%;
  transition: none;
}
.bbx-knob:hover {
  border-color: var(--w);
  box-shadow: 0 0 6px var(--sc, var(--y));
}

/* Ondes animées pendant la lecture */
.bbx-slot-wave {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 16px;
  margin-top: 6px;
}
.bbx-slot-wave span {
  display: block;
  width: 4px;
  border-radius: 2px;
  background: var(--sc, var(--y));
  animation: wave-bar .6s ease-in-out infinite alternate;
}
.bbx-slot-wave span:nth-child(1) { height: 6px;  animation-delay: 0s; }
.bbx-slot-wave span:nth-child(2) { height: 14px; animation-delay: .15s; }
.bbx-slot-wave span:nth-child(3) { height: 10px; animation-delay: .3s; }
.bbx-slot-wave span:nth-child(4) { height: 16px; animation-delay: .45s; }
@keyframes wave-bar {
  from { opacity: .5; transform: scaleY(.5); }
  to   { opacity: 1;  transform: scaleY(1); }
}

/* ── Slot en attente (quantized launch) ─────────── */
.bbx-slot-active.bbx-slot-pending {
  animation: slot-pending-blink .5s ease-in-out infinite alternate;
  border-style: dashed;
}
@keyframes slot-pending-blink {
  from { opacity: .4; }
  to   { opacity: .85; }
}
.bbx-slot-pending-lbl {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--sc, var(--y));
  margin-top: 4px;
  opacity: .7;
}

/* ══════════════════════════════════════════════════════
   BARRE DE PROGRESSION — 4 TEMPS
══════════════════════════════════════════════════════ */
.bbx-progress {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.bbx-progress-track {
  width: 100%;
  height: 6px;
  background: var(--b3);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.bbx-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--y);
  border-radius: 3px;
  transition: none;
  will-change: width;
}
.bbx-progress-dots {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0 2px;
}
.bbx-prog-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--b3);
  border: 2px solid var(--bd);
  color: var(--g);
  font-family: var(--fontd);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .1s, border-color .1s, color .1s, transform .1s;
}
.bbx-prog-dot.active {
  background: var(--y);
  border-color: var(--y);
  color: var(--b);
  transform: scale(1.15);
}

/* ══════════════════════════════════════════════════════
   BANQUE DE SONS
══════════════════════════════════════════════════════ */
.bbx-bank {
  background: var(--b);
  padding: 20px;
  border-bottom: 2px solid var(--bd);
}

.bbx-bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.bbx-sound {
  background: var(--b2);
  border: 1.5px solid var(--bd);
  border-radius: var(--r2);
  padding: 12px 8px 10px;
  text-align: center;
  cursor: grab;
  position: relative;
  transition: all .15s;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.bbx-sound:active { cursor: grabbing; }
.bbx-sound:hover  {
  border-color: var(--sc, var(--y));
  transform: translateY(-2px);
  background: var(--b3);
}
.bbx-sound.dragging { opacity: .4; transform: scale(.94); }

/* Son déjà sur scène */
.bbx-sound.in-scene {
  border-color: var(--sc, var(--y));
  background: color-mix(in srgb, var(--sc,var(--y)) 10%, var(--b2));
}

/* Sélection tactile */
.bbx-sound.touch-selected {
  border-color: var(--sc, var(--y));
  background: color-mix(in srgb, var(--sc,var(--y)) 18%, var(--b2));
  box-shadow: 0 0 0 3px var(--sc, var(--y));
  transform: scale(1.06);
}

.bbx-sound-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
  margin: 0 auto 8px;
  transition: transform .2s;
  pointer-events: none;
}
.bbx-sound:hover .bbx-sound-img {
  transform: scale(1.1);
  filter: drop-shadow(0 0 6px var(--sc, rgba(225,255,0,.5)));
}

.bbx-sound-name {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--w);
  line-height: 1.2;
}

/* Badge "en scène" */
.bbx-sound-badge {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--sc, var(--y));
  color: var(--b);
  font-size: 9px;
  font-weight: 900;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* Indicateur de chargement */
.bbx-sound-dot {
  position: absolute;
  top: 5px; left: 5px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--bd);
  animation: dot-pulse 1.2s infinite;
}
@keyframes dot-pulse { 50% { opacity: .2; } }
.bbx-sound-dot.ready { background: var(--y); animation: none; }
.bbx-sound-dot.error { background: #FF4444; animation: none; }

/* ══════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════ */
.bbx-footer {
  background: var(--b);
  padding: 16px 20px;
}
.bbx-save-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bbx-input {
  flex: 1;
  min-width: 140px;
  background: var(--b2);
  border: 1.5px solid var(--bd);
  border-radius: var(--r);
  padding: 10px 14px;
  color: var(--w);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: border-color .15s;
}
.bbx-input:focus { border-color: var(--y); }
.bbx-input::placeholder { color: #444; }
.bbx-input-sm { flex: 0 0 160px; }

.bbx-btn-save {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--y);
  color: var(--b);
  border: none;
  border-radius: var(--r);
  padding: 10px 22px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: .15s;
  white-space: nowrap;
}
.bbx-btn-save:hover { background: var(--w); }
.bbx-btn-save:disabled { opacity: .5; cursor: not-allowed; }

/* ══════════════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════════════ */
.bbx-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
}
.bbx-modal.active { display: flex; animation: fade-in .18s ease; }
@keyframes fade-in { from {opacity:0} to {opacity:1} }

.bbx-modal-box {
  background: var(--b);
  border: 3px solid var(--y);
  border-radius: var(--r2);
  padding: 32px 28px;
  max-width: 480px;
  width: 100%;
  position: relative;
  text-align: center;
  animation: slide-up .22s ease;
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes slide-up {
  from { transform:translateY(24px); opacity:0 }
  to   { transform:translateY(0);    opacity:1 }
}

.bbx-modal-close {
  position: absolute;
  top: 12px; right: 14px;
  background: none; border: none;
  color: var(--g); font-size: 18px;
  cursor: pointer; padding: 4px 8px;
  font-family: var(--font); font-weight: 700;
  transition: color .12s;
}
.bbx-modal-close:hover { color: var(--w); }

.bbx-modal-icon { font-size: 40px; margin-bottom: 8px; }
.bbx-modal-title {
  font-family: var(--fontd);
  font-size: 30px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--y);
  margin-bottom: 6px;
}
.bbx-modal-sub {
  font-size: 13px;
  font-weight: 600;
  color: var(--g);
  margin-bottom: 18px;
}

.bbx-url-row {
  display: flex; gap: 7px;
  margin-bottom: 20px;
}
.bbx-url-input {
  flex: 1;
  background: var(--b2);
  border: 1.5px solid var(--bd);
  border-radius: var(--r);
  padding: 8px 12px;
  color: var(--w);
  font-size: 11px;
  font-family: var(--font);
  outline: none;
}
.bbx-url-copy {
  background: var(--b3);
  border: 1.5px solid var(--bd);
  border-radius: var(--r);
  color: var(--g);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: .12s;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.bbx-url-copy:hover { border-color: var(--y); color: var(--y); }

/* Boutons de partage */
.bbx-share-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.bbx-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--r);
  text-decoration: none;
  font-family: var(--font);
  font-weight: 700;
  font-size: 13px;
  transition: .15s;
  border: 1.5px solid transparent;
  white-space: nowrap;
}
.bbx-share-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.s-wa       { background:#25D366; color:#fff; }
.s-wa:hover { background:#45e380; }
.s-fb       { background:#1877F2; color:#fff; }
.s-fb:hover { background:#3b9af5; }
.s-sms      { background:#34C759; color:#fff; }
.s-sms:hover{ background:#56d97a; }
.s-playlist, .s-remix {
  background: var(--y);
  color: var(--b);
  font-weight: 900;
  border-color: var(--y);
}
.s-playlist:hover, .s-remix:hover { background: var(--w); border-color: var(--w); }

/* ══════════════════════════════════════════════════════
   PLAYLIST PAGE
══════════════════════════════════════════════════════ */
.bbx-playlist-page .bbx-subtitle span { font-family:var(--fontd); font-size:24px; color:var(--y); }

.bbx-playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  padding: 24px 20px;
}

.bbx-pl-card {
  background: var(--b2);
  border: 1.5px solid var(--bd);
  border-radius: var(--r2);
  padding: 16px;
  transition: .18s;
}
.bbx-pl-card:hover { border-color: var(--y); transform: translateY(-2px); }

.bbx-pl-card-top {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.bbx-pl-ico { font-size: 32px; }
.bbx-pl-card-top strong { display:block; font-size:15px; font-weight:800; color:var(--w); }
.bbx-pl-card-top small  { font-size:11px; font-weight:600; color:var(--g); text-transform:uppercase; letter-spacing:.5px; }

.bbx-pl-card-bot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.bbx-pl-likes, .bbx-pl-date { font-size:11px; font-weight:600; color:var(--g); }
.bbx-btn-listen {
  margin-left: auto;
  background: var(--y);
  color: var(--b);
  border: none;
  border-radius: var(--r);
  padding: 6px 14px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: .12s;
  white-space: nowrap;
}
.bbx-btn-listen:hover { background: var(--w); }

.bbx-pl-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px;
  font-size: 14px;
  font-weight: 700;
  color: var(--g);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.bbx-pl-empty a { color: var(--y); text-decoration: none; }

.bbx-loading {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px;
  color: var(--g);
  font-weight: 600;
  animation: dot-pulse 1s infinite;
}

.bbx-playlist-more { text-align:center; padding: 0 0 24px; }
.bbx-btn-more {
  background: transparent;
  border: 2px solid var(--y);
  border-radius: var(--r);
  color: var(--y);
  padding: 10px 28px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: .15s;
}
.bbx-btn-more:hover { background: var(--y); color: var(--b); }

/* Modal playlist - écoute */
.bbx-listen-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px 0;
  flex-wrap: wrap;
}
.bbx-like-btn {
  background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(255,255,255,.12);
  border-radius: 20px;
  color: var(--w);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  padding: 8px 16px;
  cursor: pointer;
  transition: .15s;
}
.bbx-like-btn:hover { border-color: #FF6464; background: rgba(255,100,100,.15); }

.bbx-listen-sounds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 10px 0;
}
.bbx-listen-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1.5px solid;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.bbx-listen-item img { width:28px; height:28px; object-fit:contain; }

/* ══════════════════════════════════════════════════════
   FULLSCREEN
══════════════════════════════════════════════════════ */
.bbx-btn-fullscreen {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(255,255,255,.08);
  border: 1.5px solid var(--bd);
  border-radius: var(--r);
  color: var(--w);
  font-size: 20px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .15s;
  z-index: 10;
  padding: 0;
  line-height: 1;
}
.bbx-btn-fullscreen:hover {
  background: var(--y);
  color: var(--b);
  border-color: var(--y);
}

/* Mode plein écran actif — desktop */
.bbx-wrap:fullscreen,
.bbx-wrap:-webkit-full-screen {
  max-width: 100%;
  width: 100%;
  height: 100%;
  border-radius: 0;
  border-top: none;
  overflow-y: auto;
  overflow-x: hidden;
}
.bbx-wrap:fullscreen .bbx-btn-fullscreen,
.bbx-wrap:-webkit-full-screen .bbx-btn-fullscreen {
  background: rgba(255,70,70,.2);
  border-color: rgba(255,70,70,.5);
  color: #FF6464;
}
.bbx-wrap:fullscreen .bbx-btn-fullscreen:hover,
.bbx-wrap:-webkit-full-screen .bbx-btn-fullscreen:hover {
  background: #FF6464;
  color: var(--w);
  border-color: #FF6464;
}

/* ── Fullscreen sur tablette (portrait) ──────────── */
@media (max-width: 860px) {
  .bbx-wrap:fullscreen,
  .bbx-wrap:-webkit-full-screen {
    --slot-size: 80px;
    --img-size: 44px;
  }
  /* Header compact */
  .bbx-wrap:fullscreen .bbx-header,
  .bbx-wrap:-webkit-full-screen .bbx-header {
    padding: 6px 10px;
    gap: 8px;
    border-bottom-width: 1px;
  }
  .bbx-wrap:fullscreen .bbx-title,
  .bbx-wrap:-webkit-full-screen .bbx-title {
    font-size: 22px;
    letter-spacing: 2px;
  }
  .bbx-wrap:fullscreen .bbx-title-block,
  .bbx-wrap:-webkit-full-screen .bbx-title-block {
    padding: 5px 10px;
  }
  .bbx-wrap:fullscreen .bbx-subtitle,
  .bbx-wrap:-webkit-full-screen .bbx-subtitle {
    font-size: 7px;
  }
  /* Nola + Play/Stop très compacts */
  .bbx-wrap:fullscreen .bbx-nola-row,
  .bbx-wrap:-webkit-full-screen .bbx-nola-row {
    gap: 8px;
    margin-bottom: 2px;
  }
  .bbx-wrap:fullscreen .bbx-nola-wrap,
  .bbx-wrap:-webkit-full-screen .bbx-nola-wrap {
    display: none;
  }
  .bbx-wrap:fullscreen .bbx-btn-play,
  .bbx-wrap:-webkit-full-screen .bbx-btn-play,
  .bbx-wrap:fullscreen .bbx-btn-stop,
  .bbx-wrap:-webkit-full-screen .bbx-btn-stop {
    padding: 6px 12px;
    font-size: 12px;
    min-width: 70px;
    min-height: 34px;
  }
  /* Scène compacte */
  .bbx-wrap:fullscreen .bbx-scene,
  .bbx-wrap:-webkit-full-screen .bbx-scene {
    padding: 6px 8px;
    gap: 6px;
    min-height: 0;
    border-bottom-width: 1px;
  }
  .bbx-wrap:fullscreen .bbx-slots,
  .bbx-wrap:-webkit-full-screen .bbx-slots {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
  }
  .bbx-wrap:fullscreen .bbx-slot,
  .bbx-wrap:-webkit-full-screen .bbx-slot {
    width: auto;
    min-height: 0;
    padding: 6px 4px;
  }
  .bbx-wrap:fullscreen .bbx-slot-name,
  .bbx-wrap:-webkit-full-screen .bbx-slot-name {
    font-size: 8px;
  }
  .bbx-wrap:fullscreen .bbx-slot-img,
  .bbx-wrap:-webkit-full-screen .bbx-slot-img {
    margin-bottom: 2px;
  }
  .bbx-wrap:fullscreen .bbx-knob,
  .bbx-wrap:-webkit-full-screen .bbx-knob {
    width: 26px;
    height: 26px;
    margin-top: 2px;
  }
  .bbx-wrap:fullscreen .bbx-slot-remove,
  .bbx-wrap:-webkit-full-screen .bbx-slot-remove {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }
  .bbx-wrap:fullscreen .bbx-slot-add-lbl,
  .bbx-wrap:-webkit-full-screen .bbx-slot-add-lbl {
    font-size: 10px;
    line-height: 1.2;
  }
  .bbx-wrap:fullscreen .bbx-slot-wave,
  .bbx-wrap:-webkit-full-screen .bbx-slot-wave {
    height: 10px;
    margin-top: 2px;
  }
  /* Banque de sons compacte */
  .bbx-wrap:fullscreen .bbx-bank,
  .bbx-wrap:-webkit-full-screen .bbx-bank {
    padding: 6px 8px;
    border-bottom-width: 1px;
  }
  .bbx-wrap:fullscreen .bbx-bank-grid,
  .bbx-wrap:-webkit-full-screen .bbx-bank-grid {
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
    gap: 5px;
  }
  .bbx-wrap:fullscreen .bbx-sound,
  .bbx-wrap:-webkit-full-screen .bbx-sound {
    padding: 4px 3px 3px;
    border-radius: 6px;
  }
  .bbx-wrap:fullscreen .bbx-sound-img,
  .bbx-wrap:-webkit-full-screen .bbx-sound-img {
    width: 30px;
    height: 30px;
    margin-bottom: 2px;
  }
  .bbx-wrap:fullscreen .bbx-sound-name,
  .bbx-wrap:-webkit-full-screen .bbx-sound-name {
    font-size: 7px;
    letter-spacing: 0;
  }
  .bbx-wrap:fullscreen .bbx-sound-badge,
  .bbx-wrap:-webkit-full-screen .bbx-sound-badge {
    width: 14px;
    height: 14px;
    font-size: 7px;
  }
  .bbx-wrap:fullscreen .bbx-sound-dot,
  .bbx-wrap:-webkit-full-screen .bbx-sound-dot {
    width: 5px;
    height: 5px;
    top: 3px;
    left: 3px;
  }
  /* Footer compact — tout sur une ligne */
  .bbx-wrap:fullscreen .bbx-footer,
  .bbx-wrap:-webkit-full-screen .bbx-footer {
    padding: 5px 8px;
  }
  .bbx-wrap:fullscreen .bbx-save-row,
  .bbx-wrap:-webkit-full-screen .bbx-save-row {
    display: flex;
    gap: 5px;
  }
  .bbx-wrap:fullscreen .bbx-input,
  .bbx-wrap:-webkit-full-screen .bbx-input {
    padding: 6px 8px;
    font-size: 11px;
    min-width: 0;
    flex: 1;
  }
  .bbx-wrap:fullscreen .bbx-input-sm,
  .bbx-wrap:-webkit-full-screen .bbx-input-sm {
    flex: 0 0 auto;
    width: 100px;
  }
  .bbx-wrap:fullscreen .bbx-btn-save,
  .bbx-wrap:-webkit-full-screen .bbx-btn-save {
    padding: 6px 12px;
    font-size: 11px;
    white-space: nowrap;
  }
  .bbx-wrap:fullscreen .bbx-scene-hint,
  .bbx-wrap:-webkit-full-screen .bbx-scene-hint {
    font-size: 9px;
    padding: 8px 12px;
    border-width: 1px;
  }
  /* Progress bar compact */
  .bbx-wrap:fullscreen .bbx-progress,
  .bbx-wrap:-webkit-full-screen .bbx-progress {
    gap: 3px;
  }
  .bbx-wrap:fullscreen .bbx-progress-track,
  .bbx-wrap:-webkit-full-screen .bbx-progress-track {
    height: 4px;
  }
  .bbx-wrap:fullscreen .bbx-prog-dot,
  .bbx-wrap:-webkit-full-screen .bbx-prog-dot {
    width: 20px; height: 20px; font-size: 11px;
  }
}

/* ── Fullscreen paysage tablette ─────────────────── */
@media (max-width: 860px) and (orientation: landscape) {
  .bbx-wrap:fullscreen,
  .bbx-wrap:-webkit-full-screen {
    --slot-size: 65px;
    --img-size: 36px;
  }
  .bbx-wrap:fullscreen .bbx-header,
  .bbx-wrap:-webkit-full-screen .bbx-header {
    padding: 4px 10px;
  }
  .bbx-wrap:fullscreen .bbx-title,
  .bbx-wrap:-webkit-full-screen .bbx-title {
    font-size: 18px;
  }
  .bbx-wrap:fullscreen .bbx-scene,
  .bbx-wrap:-webkit-full-screen .bbx-scene {
    padding: 4px 8px;
    gap: 4px;
  }
  .bbx-wrap:fullscreen .bbx-slots,
  .bbx-wrap:-webkit-full-screen .bbx-slots {
    gap: 4px;
  }
  .bbx-wrap:fullscreen .bbx-bank,
  .bbx-wrap:-webkit-full-screen .bbx-bank {
    padding: 4px 8px;
  }
  .bbx-wrap:fullscreen .bbx-bank-grid,
  .bbx-wrap:-webkit-full-screen .bbx-bank-grid {
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 4px;
  }
  .bbx-wrap:fullscreen .bbx-sound-img,
  .bbx-wrap:-webkit-full-screen .bbx-sound-img {
    width: 24px;
    height: 24px;
  }
  .bbx-wrap:fullscreen .bbx-footer,
  .bbx-wrap:-webkit-full-screen .bbx-footer {
    padding: 4px 8px;
  }
}

/* ══════════════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════════════ */
.bbx-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(70px);
  background: var(--b);
  border: 1.5px solid var(--y);
  border-radius: 30px;
  padding: 10px 22px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  color: var(--w);
  z-index: 100000;
  transition: transform .28s ease, opacity .28s;
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
}
.bbx-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ══════════════════════════════════════════════════════
   RESPONSIVE — TABLETTE (portrait 768px)
══════════════════════════════════════════════════════ */
@media (max-width: 860px) {
  :root {
    --slot-size: 130px;
    --img-size: 75px;
  }
  .bbx-header  { padding: 14px 16px; }
  .bbx-title   { font-size: 39px; }
  .bbx-scene   { padding: 18px 14px 16px; }

  /* Slots en grille 6x2 */
  .bbx-slots {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
  }
  .bbx-slot {
    width: auto;
    min-height: 0;
  }

  /* #7 — Contraindre la hauteur de Nola */
  .bbx-nola    { max-width: 100%; max-height: 180px; }

  .bbx-bank    { padding: 16px; }

  /* #6 — Espacement grille plus large pour le toucher */
  .bbx-bank-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
  .bbx-sound-img { width: 52px; height: 52px; }

  /* #5 — Textes plus lisibles */
  .bbx-subtitle    { font-size: 10px; }
  .bbx-sound-name  { font-size: 12px; }
  .bbx-slot-name   { font-size: 13px; }
  .bbx-slot-add-lbl{ font-size: 18px; }

  /* #1 — Bouton X de suppression plus grand */
  .bbx-slot-remove { width: 32px; height: 32px; font-size: 14px; top: 4px; right: 4px; }

  /* #2 — Knob volume plus grand */
  .bbx-knob { width: 44px; height: 44px; }

  /* #8 — Footer : inputs côte à côte, bouton en dessous */
  .bbx-footer  { padding: 14px 16px; }
  .bbx-save-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .bbx-input    { width: 100%; }
  .bbx-input-sm { width: 100%; flex: none; }
  .bbx-btn-save { grid-column: 1 / -1; width: 100%; justify-content: center; padding: 14px 22px; }

  /* #1 — Bouton écouter playlist plus grand */
  .bbx-btn-listen { padding: 10px 18px; font-size: 13px; }

  .bbx-playlist-grid { padding: 16px; }
}

/* ── Tablette paysage ─────────────────────────────── */
/* #9 — Optimisation mode paysage */
@media (max-width: 860px) and (orientation: landscape) {
  .bbx-nola { max-height: 120px; }
  .bbx-nola-row { gap: 14px; margin-bottom: 4px; }
  .bbx-scene { padding: 12px 14px 10px; gap: 10px; min-height: auto; }
  .bbx-nola-name { font-size: 18px; padding: 4px 16px; }
  :root {
    --slot-size: 110px;
    --img-size: 65px;
  }
}

/* #4 — Feedback tactile :active */
@media (hover: none) {
  .bbx-sound:active {
    transform: scale(.94);
    opacity: .7;
    transition: none;
  }
  .bbx-slot-empty:active {
    background: rgba(225,255,0,.15);
    transform: scale(.96);
    transition: none;
  }
  .bbx-btn-play:active,
  .bbx-btn-stop:active,
  .bbx-btn-save:active,
  .bbx-btn-listen:active,
  .bbx-btn-more:active {
    transform: scale(.95);
    opacity: .8;
    transition: none;
  }
  .bbx-share-btn:active {
    transform: scale(.94);
    transition: none;
  }
}

@media (max-width: 520px) {
  :root {
    --slot-size: 110px;
    --img-size: 62px;
  }
  .bbx-slots { gap: 8px; }
  .bbx-slot-add-lbl { font-size: 15px; }
  .bbx-bank-grid { grid-template-columns: repeat(auto-fill, minmax(85px, 1fr)); gap: 10px; }
  .bbx-sound-img { width: 48px; height: 48px; }
  .bbx-sound-name { font-size: 11px; }
  .bbx-bpm input[type=range] { width: 55px; }
  .bbx-nola-row { gap: 10px; }
  .bbx-nola { max-height: 140px; }
  .bbx-btn-play, .bbx-btn-stop { padding: 12px 16px; font-size: 14px; min-width: 90px; min-height: 46px; }
}
