/* BFL 1.2.4 — cœur en haut à droite + déplacement responsive.
 * Grille multicolonne : croix directionnelle ← ↑ ↓ →.
 * Une seule colonne : seulement ↑ / ↓.
 */
#bfl-app .bfl-card.bfl-card-controls-v2 {
  position: relative;
}

#bfl-app .bfl-card.bfl-card-controls-v2 > .bfl-identity {
  width: 100%;
  padding-right: 54px;
}

#bfl-app .bfl-card.bfl-card-controls-v2 > .bfl-actions.bfl-card-heart-zone {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: block;
  margin: 0;
}

#bfl-app .bfl-card-heart {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 21px;
  line-height: 1;
}

#bfl-app .bfl-card.bfl-card-controls-v2 > .bfl-moves {
  margin-top: 14px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  width: 100%;
}

#bfl-app .bfl-moves .bfl-native-order-button,
#bfl-app .bfl-desktop-directions button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

#bfl-app .bfl-moves .bfl-native-order-button {
  display: inline-grid;
}

#bfl-app .bfl-moves .bfl-native-order-button:disabled,
#bfl-app .bfl-desktop-directions button:disabled {
  opacity: .38;
}

/* Par défaut : disposition une colonne / mobile, donc seulement ↑ et ↓. */
#bfl-app .bfl-desktop-directions {
  display: none;
}

/* Quand la grille réelle contient plus d'une colonne, afficher les 4 directions. */
#bfl-app.bfl-multicolumn-order .bfl-moves .bfl-native-order-button {
  display: none !important;
}

#bfl-app.bfl-multicolumn-order .bfl-desktop-directions {
  display: grid;
  grid-template-columns: repeat(3, 44px);
  grid-template-rows: repeat(3, 44px);
  grid-template-areas:
    ". up ."
    "left . right"
    ". down .";
  gap: 4px;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

#bfl-app .bfl-dir-up { grid-area: up; }
#bfl-app .bfl-dir-left { grid-area: left; }
#bfl-app .bfl-dir-right { grid-area: right; }
#bfl-app .bfl-dir-down { grid-area: down; }

#bfl-app[data-bfl-order-moving="1"] .bfl-desktop-directions button {
  pointer-events: none;
}

@media (max-width: 600px) {
  #bfl-app .bfl-card-heart,
  #bfl-app .bfl-moves .bfl-native-order-button {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }

  #bfl-app .bfl-card.bfl-card-controls-v2 > .bfl-identity {
    padding-right: 58px;
  }
}


/* 1.2.4 — copie visuelle optimiste pendant la sauvegarde : empêche les flashs du rerendu natif. */
#bfl-app .bfl-grid[data-bfl-order-ghost="1"] {
  pointer-events: none;
}
